refactor(models): rename Agent classes to Scout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,7 @@ from app.core.agent_runner import (
|
||||
)
|
||||
from app.core.device_manager import DeviceConnectionManager
|
||||
from app.core.langfuse_client import get_langfuse
|
||||
from app.models import AgentRunLog, LocalAgentConfig
|
||||
from app.models import ScoutRunLog, LocalScoutConfig
|
||||
from tests.conftest import TEST_USER_IDS
|
||||
|
||||
# ── Constants ─────────────────────────────────────────────────────────────
|
||||
@@ -127,8 +127,8 @@ def _make_config(
|
||||
agent_config: dict | None = None,
|
||||
directory: str = "/emails",
|
||||
device_id: str = "dev-001",
|
||||
) -> LocalAgentConfig:
|
||||
return LocalAgentConfig(
|
||||
) -> LocalScoutConfig:
|
||||
return LocalScoutConfig(
|
||||
id=str(uuid.uuid4()),
|
||||
user_id=_USER_ID,
|
||||
device_id=device_id,
|
||||
@@ -136,7 +136,7 @@ def _make_config(
|
||||
directory_paths=[directory],
|
||||
data_types=["tasks", "notes", "timelines"],
|
||||
prompt_template="",
|
||||
agent_config=agent_config or _AGENT_CONFIG,
|
||||
scout_config=agent_config or _AGENT_CONFIG,
|
||||
file_extensions=[".html", ".eml"],
|
||||
schedule_cron="0 */6 * * *",
|
||||
enabled=True,
|
||||
@@ -144,11 +144,11 @@ def _make_config(
|
||||
)
|
||||
|
||||
|
||||
def _make_run_log(agent_id: str) -> AgentRunLog:
|
||||
return AgentRunLog(
|
||||
def _make_run_log(agent_id: str) -> ScoutRunLog:
|
||||
return ScoutRunLog(
|
||||
id=str(uuid.uuid4()),
|
||||
agent_id=agent_id,
|
||||
agent_type="local",
|
||||
scout_id=agent_id,
|
||||
scout_type="local",
|
||||
user_id=_USER_ID,
|
||||
status="running",
|
||||
started_at=datetime.now(timezone.utc),
|
||||
|
||||
@@ -22,7 +22,7 @@ import pytest
|
||||
from app.core.device_manager import DeviceConnectionManager
|
||||
from app.db import get_session
|
||||
from app.main import app
|
||||
from app.models import AgentRunLog
|
||||
from app.models import ScoutRunLog
|
||||
from tests.conftest import TEST_USER_IDS, make_jwt
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -262,10 +262,10 @@ async def test_mark_runs_disconnected_updates_db(db_session):
|
||||
|
||||
user_id = TEST_USER_IDS["free"]
|
||||
|
||||
run_log = AgentRunLog(
|
||||
run_log = ScoutRunLog(
|
||||
id=str(uuid.uuid4()),
|
||||
agent_id=str(uuid.uuid4()),
|
||||
agent_type="local",
|
||||
scout_id=str(uuid.uuid4()),
|
||||
scout_type="local",
|
||||
user_id=user_id,
|
||||
status="running",
|
||||
started_at=datetime.now(timezone.utc),
|
||||
@@ -280,7 +280,7 @@ async def test_mark_runs_disconnected_updates_db(db_session):
|
||||
# Verify through the same session factory.
|
||||
async with _TestSessionLocal() as s:
|
||||
result = await s.execute(
|
||||
select(AgentRunLog).where(AgentRunLog.id == run_log.id)
|
||||
select(ScoutRunLog).where(ScoutRunLog.id == run_log.id)
|
||||
)
|
||||
updated = result.scalar_one_or_none()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user