Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions agents/ailine_agents/resilience.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ def is_open(self) -> bool:

def _maybe_transition_to_half_open(self) -> None:
"""Transition from open to half_open if cooldown expired (must hold _lock)."""
if self._state == "open" and self._circuit_open_until is not None:
if time.monotonic() >= self._circuit_open_until:
self._state = "half_open"
self._probe_in_flight = False
log.info("circuit_breaker.half_open", failure_count=self._failure_count)
if (
self._state == "open"
and self._circuit_open_until is not None
and time.monotonic() >= self._circuit_open_until
):
self._state = "half_open"
self._probe_in_flight = False
log.info("circuit_breaker.half_open", failure_count=self._failure_count)

def check(self) -> bool:
with self._lock:
Expand Down
2 changes: 1 addition & 1 deletion agents/ailine_agents/workflows/_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _is_transient(exc: BaseException) -> bool:
return exc.__cause__ is not None and _is_transient(exc.__cause__)


async def with_retry(
async def with_retry[T](
fn: Callable[[], Awaitable[T]],
*,
max_attempts: int = 3,
Expand Down
3 changes: 1 addition & 2 deletions agents/ailine_agents/workflows/_skills_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
from typing import Any

import structlog
from langgraph.types import RunnableConfig

from ailine_runtime.api.streaming.events import SSEEventType
from langgraph.types import RunnableConfig

from ..skills.accessibility_policy import (
ACCESSIBILITY_NEED_CATEGORIES,
Expand Down
4 changes: 2 additions & 2 deletions agents/ailine_agents/workflows/tutor_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def _sanitize_user_message(message: str) -> str:
return message
sanitized = message
# Strip known injection markers (case-insensitive)
_INJECTION_PATTERNS = [
_injection_patterns = [
"ignore previous instructions",
"ignore all instructions",
"system:",
Expand All @@ -439,7 +439,7 @@ def _sanitize_user_message(message: str) -> str:
"override:",
]
lower = sanitized.lower()
for pattern in _INJECTION_PATTERNS:
for pattern in _injection_patterns:
if pattern in lower:
# Replace the injection pattern with a neutralized version
idx = lower.find(pattern)
Expand Down
2 changes: 1 addition & 1 deletion agents/tests/test_skill_composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def test_generator_input(self) -> None:

from collections.abc import Generator

def gen() -> Generator[ActivatedSkill, None, None]:
def gen() -> Generator[ActivatedSkill]:
yield _make_skill(name="gen-skill")

result = compose_skills_fragment(gen(), token_budget=5000) # type: ignore[arg-type]
Expand Down
1 change: 0 additions & 1 deletion agents/tests/test_skills_workflow_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
make_tutor_skills_node,
)


# ---------------------------------------------------------------------------
# _resolve_skills_from_request — Explicit selection mode
# ---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion agents/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
24 changes: 22 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,23 @@
"e2e:ui": "playwright test --ui"
},
"dependencies": {
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-toast": "^1.2.15",
"@radix-ui/react-tooltip": "^1.2.8",
"canvas-confetti": "^1.9.4",
"class-variance-authority": "^0.7.1",
"clsx": "2.1.1",
"dompurify": "3.3.1",
"lucide-react": "^0.577.0",
"mermaid": "^11.12.2",
"motion": "12.34.3",
"next": "16.1.6",
Expand All @@ -42,12 +56,18 @@
"@types/react-dom": "^19.0.0",
"@vitest/coverage-v8": "^4.0.18",
"babel-plugin-react-compiler": "^1.0.0",
"eslint": "^9.0.0",
"eslint": "^9.39.2",
"eslint-config-next": "16.1.6",
"jsdom": "^28.0.0",
"postcss": "^8.5.0",
"tailwindcss": "4.2.1",
"typescript": "^5.9.0",
"vitest": "^4.0.18"
},
"pnpm": {
"overrides": {
"minimatch": "^9.0.7",
"rollup": "^4.59.0"
}
}
}
}
Loading
Loading