SurfSense/surfsense_backend/app/tasks/chat/streaming/flows
CREDO23 a7a642fedc refactor(agents): move busy_mutex middleware into main_agent (owner)
The busy-mutex impl (BusyMutexMiddleware + cancel/turn-lifecycle primitives)
lived in shared/middleware/ but no subagent uses it -- consumers are the
main_agent builder and the boundary (turn lifecycle). Colocate with its owner
using the folder-per-middleware shape; __init__ re-exports the public surface so
boundary import sites only change package path:

  main_agent/middleware/busy_mutex.py    -> busy_mutex/builder.py
  shared/middleware/busy_mutex.py        -> busy_mutex/middleware.py
2026-06-05 14:08:45 +02:00
..
new_chat refactor(agents): move busy_mutex middleware into main_agent (owner) 2026-06-05 14:08:45 +02:00
resume_chat refactor(agents): move busy_mutex middleware into main_agent (owner) 2026-06-05 14:08:45 +02:00
shared refactor(agents): move busy_mutex middleware into main_agent (owner) 2026-06-05 14:08:45 +02:00
__init__.py refactor(chat): add streaming/flows/resume_chat/orchestrator + flows public API 2026-05-25 21:50:09 +02:00