develop #2

Merged
roberto merged 160 commits from develop into main 2026-06-12 15:27:23 +00:00
5 changed files with 13 additions and 13 deletions
Showing only changes of commit b92e72b685 - Show all commits

View File

@@ -39,7 +39,7 @@ from fastapi import APIRouter, WebSocket, WebSocketDisconnect
from jose import JWTError, jwt
from sqlalchemy import update
from app.api.routes.agent_setup import handle_journey_message, handle_journey_start
from app.api.routes.scout_setup import handle_journey_message, handle_journey_start
from app.config.settings import settings
from app.core.agent_runner import trigger_pending_runs
from app.core.agent_session_buffer import session_buffer

View File

@@ -1,12 +1,12 @@
"""Agent routes.
"""Scout routes.
Backend responsibilities are intentionally minimal:
GET /agents/catalog static catalog for UI display
POST /agents/can-create billing eligibility check
POST /agents/trigger trigger a local agent run
GET /scouts/catalog static catalog for UI display
POST /scouts/can-create billing eligibility check
POST /scouts/trigger trigger a local scout run
Agent configuration is owned by the Electron app and is not persisted
in backend agent-config tables.
Scout configuration is owned by the Electron app and is not persisted
in backend scout-config tables.
"""
from __future__ import annotations
@@ -40,7 +40,7 @@ from app.schemas import (
logger = logging.getLogger(__name__)
router = APIRouter(prefix="/agents", tags=["agents"])
router = APIRouter(prefix="/scouts", tags=["scouts"])
# ── Datetime helpers ──────────────────────────────────────────────────

View File

@@ -124,12 +124,12 @@ def create_app() -> FastAPI:
app.add_middleware(SanitizerMiddleware)
app.add_middleware(TierRateLimitMiddleware)
from app.api.routes import agents, auth, billing, chat, device_ws, memory
from app.api.routes import scouts, auth, billing, chat, device_ws, memory
app.include_router(auth.router, prefix="/api/v1")
app.include_router(chat.router, prefix="/api/v1")
app.include_router(billing.router, prefix="/api/v1")
app.include_router(agents.router, prefix="/api/v1")
app.include_router(scouts.router, prefix="/api/v1")
app.include_router(device_ws.router, prefix="/api/v1")
app.include_router(memory.router, prefix="/api/v1")

View File

@@ -37,7 +37,7 @@ from unittest.mock import patch
import pytest
import yaml
from app.api.routes.agent_setup import (
from app.api.routes.scout_setup import (
_CONFIG_END,
_CONFIG_START,
_MAX_TURNS,
@@ -230,7 +230,7 @@ async def test_4_6f_nudge_uses_new_markers():
# Return plain text — no markers — to trigger the nudge path.
return "I still need more information from you."
from app.api.routes.agent_setup import JourneySession
from app.api.routes.scout_setup import JourneySession
fake_session = JourneySession(
session_id=session_id,
@@ -248,7 +248,7 @@ async def test_4_6f_nudge_uses_new_markers():
_sessions[session_id] = fake_session
try:
with patch("app.api.routes.agent_setup._call_llm_with_tools", side_effect=_mock_llm):
with patch("app.api.routes.scout_setup._call_llm_with_tools", side_effect=_mock_llm):
await handle_journey_message(_USER_ID, {
"session_id": session_id,
"message": "one more message to trigger nudge",