SurfSense/surfsense_backend/app/tasks/chat/streaming
CREDO23 227983a104 refactor(agents): move middleware package to app/agents/shared (slice 5c)
Relocate the entire new_chat/middleware/ package to the shared kernel as one
cohesive unit (it is live shared infrastructure: the multi-agent stack wraps
nearly every middleware via multi_agent_chat/middleware/main_agent/*, and
anonymous_agent consumes it too). Flip 69 live importers across both the
package-path and submodule-path forms.

Shims left for the frozen single-agent stack: a package __init__ re-export plus
submodule shims for permission, skills_backends, and scoped_model_fallback
(the three imported via submodule path by chat_deepagent/subagents).

Cycle break: importing shared.middleware previously reached back into
new_chat.tools at module load, which dragged in new_chat.__init__ ->
chat_deepagent -> the middleware shim -> half-initialized shared.middleware.
Made action_log's ToolDefinition import TYPE_CHECKING-only and
tool_call_repair's INVALID_TOOL_NAME import function-local. These tools-package
back-edges fully resolve in slice 6.

Asset note: skills_backends._default_builtin_root now walks to
app/agents/new_chat/skills/builtin (the skills/ tree migrates in slice 7).
2026-06-04 13:00:41 +02:00
..
agent refactor(agents): move middleware package to app/agents/shared (slice 5c) 2026-06-04 13:00:41 +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 middleware package to app/agents/shared (slice 5c) 2026-06-04 13:00:41 +02:00
flows refactor(agents): move middleware package to app/agents/shared (slice 5c) 2026-06-04 13:00:41 +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 feat: enhance task management and timeout configurations in multi-agent chat 2026-05-27 14:58:10 -07: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