SurfSense/surfsense_backend/app/tasks/chat/streaming/flows
CREDO23 9c845d562e refactor(agents): colocate main-agent middleware under main_agent/ slice
Vertical-slice colocation: all main-agent code should live under
main_agent/ instead of being split across a parallel middleware/main_agent
tree. Move multi_agent_chat/middleware/main_agent/ -> main_agent/middleware/
and its assembler middleware/stack.py -> main_agent/middleware/stack.py, so
the main-agent slice is self-contained (graph, runtime, system_prompt, tools,
middleware).

Genuinely cross-slice middleware (middleware/shared/, middleware/subagent/)
stays under multi_agent_chat/middleware/ for a later slice; the moved builders
now reference it via absolute imports.

Pure move + import rewrite (git-tracked renames). Verified: full unit suite
green (2430 passed, 1 skipped), including test_import_all and the
checkpointed-subagent middleware suite.
2026-06-04 18:03:49 +02:00
..
new_chat refactor(agents): hardwire multi-agent as the only chat factory (bucket B1) 2026-06-04 13:35:38 +02:00
resume_chat refactor(agents): colocate main-agent middleware under main_agent/ slice 2026-06-04 18:03:49 +02:00
shared refactor(agents): move middleware package to app/agents/shared (slice 5c) 2026-06-04 13:00:41 +02:00
__init__.py refactor(chat): add streaming/flows/resume_chat/orchestrator + flows public API 2026-05-25 21:50:09 +02:00