SurfSense/surfsense_backend/app/tasks/chat/streaming
CREDO23 82c5dc5b02 refactor(agents): move mac-only modules out of the cross-agent shared kernel
app/agents/shared/ is a sibling of anonymous_chat/podcaster/multi_agent_chat/
video_presentation, so it should only hold code shared across 2+ of those
agents. In practice podcaster and video_presentation import nothing from it,
and anonymous_chat needs only context + compaction + retry_after + web_search.
Everything else was multi_agent_chat-only (the boundary just passes through).

Move the multi_agent_chat-only cluster into multi_agent_chat/shared/ (files
moved verbatim via git rename; ~116 import sites rewritten):

  errors, feature_flags, filesystem_selection, path_resolver, prompt_caching,
  sandbox, llm_config, mention_resolver
  middleware/busy_mutex, middleware/kb_persistence

busy_mutex/llm_config/mention_resolver are boundary-only but import the moved
modules, so they were folded in to avoid a backwards shared -> multi_agent_chat
dependency. main_agent builders now import the impls directly; the shared
middleware barrel keeps only the genuinely-shared compaction + retry_after.

Also delete the dead leftover shared/plugins and shared/skills dirs (live
copies already live under main_agent/).

Remaining in app/agents/shared/: context, system_prompt(+prompts), checkpointer,
middleware/{compaction,retry_after,dedup_tool_calls}, tools/. checkpointer and
system_prompt are boundary-only infra pending a dedicated home decision.
2026-06-05 12:30:15 +02:00
..
agent refactor(agents): move mac-only modules out of the cross-agent shared kernel 2026-06-05 12:30:15 +02:00
context refactor: remove search_surfsense_docs tool and related references 2026-05-28 22:35:14 -07:00
contract refactor(chat): add streaming/contract/ for file-write contract enforcement 2026-05-25 21:48:14 +02:00
errors refactor(agents): move mac-only modules out of the cross-agent shared kernel 2026-06-05 12:30:15 +02:00
flows refactor(agents): move mac-only modules out of the cross-agent shared kernel 2026-06-05 12:30:15 +02:00
graph_stream refactor: remove memory extraction functions and related components from the new chat agent 2026-05-20 14:03:28 +05:30
handlers refactor(agents): relocate remaining MAC-only kernel (permissions, deliverable_wait) 2026-06-05 10:58:49 +02:00
helpers chat/stream_new_chat: emit one SSE frame per pending interrupt 2026-05-13 20:59:48 +02:00
relay refactor: remove memory extraction functions and related components from the new chat agent 2026-05-20 14:03:28 +05:30
shared refactor(chat): add streaming/shared/ package for StreamResult and utils 2026-05-25 21:48:04 +02:00
__init__.py refactor(chat): drop alternate streaming entry path; use graph_stream 2026-05-07 19:25:20 +02:00