Extract WebSocket business logic into AgentSessionOrchestrator
- Create navi/core/orchestrator.py with AgentSessionOrchestrator and SessionRun
- Orchestrator owns _runs, _busy_sessions, Agent creation, run_agent(), run_recall()
- Transport-agnostic: accepts notify callback from WebSocket handler
- WebSocket handler (websocket.py) now only does serialization/deserialization
- _fire_recall delegates to orchestrator.run_recall() instead of inline logic
- recall_scheduler_loop now accepts orchestrator parameter
- AppContainer gains .orchestrator field, created in create_container()
- deps.py: add get_orchestrator()
- Update integration tests for scheduler_loop and websocket unit tests

All 392 tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 1d5a808 commit 59b3cfa805f407c45f5c84018675c1e56161def8
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 18 May
Showing 8 changed files
View
navi/api/deps.py
View
navi/api/websocket.py
View
navi/core/container.py
View
navi/core/orchestrator.py
View
navi/core/scheduler.py
View
navi/main.py
View
tests/integration/test_scheduler_loop.py
View
tests/unit/api/test_websocket.py