SurfSense/surfsense_backend/app/tasks/chat/streaming/flows
CREDO23 b7ea829371 refactor(agents): relocate boundary-only infra out of shared/
Neither module is imported by any sibling agent package, so neither belongs in
the cross-agent shared kernel:

- checkpointer.py -> app/agents/runtime/checkpointer.py
  LangGraph Postgres checkpoint saver. It's cross-agent *runtime infra* wired by
  the boundary (app lifespan + anonymous_chat & multi_agent_chat flows), not
  agent code. New app/agents/runtime/ layer holds boundary-wired agent infra.

- shared/system_prompt.py + shared/prompts/ -> app/prompts/
  The legacy single-agent prompt composer. The live agents don't use it
  (main_agent has its own system_prompt/ builder; anonymous_chat builds inline);
  its only consumer is new_llm_config_routes for displaying default instructions.
  Moved to the existing non-agent prompt domain:
    system_prompt.py        -> app/prompts/default_system_instructions.py
    prompts/                 -> app/prompts/system_prompt_composer/

app/agents/shared/ now contains only genuinely cross-agent code: context,
middleware/{compaction,retry_after,dedup_tool_calls}, tools/.

NOTE: get_default_system_instructions() (LLM-config UI) composes from the legacy
library, which differs from what the live agents actually run -- pre-existing
latent staleness, not changed here.
2026-06-05 12:36:44 +02:00
..
new_chat refactor(agents): move mac-only modules out of the cross-agent shared kernel 2026-06-05 12:30:15 +02:00
resume_chat refactor(agents): move mac-only modules out of the cross-agent shared kernel 2026-06-05 12:30:15 +02:00
shared refactor(agents): relocate boundary-only infra out of shared/ 2026-06-05 12:36:44 +02:00
__init__.py refactor(chat): add streaming/flows/resume_chat/orchestrator + flows public API 2026-05-25 21:50:09 +02:00