SurfSense/surfsense_backend/app/agents/new_chat/middleware
CREDO23 28b13ed25b refactor(agents): move context schema + state reducers to app/agents/shared (slice 2)
Continue promoting the shared agent toolkit out of `new_chat` into the
cross-agent `app/agents/shared` kernel.

- state_reducers.py: clean move (no single-agent importer); all 7 importers
  flipped to app.agents.shared.state_reducers.
- context.py: moved to app.agents.shared.context; flipped the multi-agent,
  app, automations, chat-flows and monolith importers. A thin re-export shim
  remains at new_chat/context.py because the not-yet-retired single-agent
  (chat_deepagent) and the new_chat package __init__ still import it; the shim
  goes away with the single-agent deletion.
- Updated the stream parity test's annotation normalizer to strip the new
  app.agents.shared.context. prefix (SurfSenseContextSchema.__module__ changed
  with the move), keeping monolith<->flows signature parity intact.

Behavior-preserving: definitions unchanged; only import paths move. 1219 tests green.
2026-06-04 12:19:22 +02:00
..
__init__.py feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
action_log.py feat: improved agent streaming 2026-04-29 07:20:31 -07:00
anonymous_document.py feat: updated file management for main agent 2026-04-28 04:32:52 -07:00
busy_mutex.py refactor(agents): move error taxonomy to app/agents/shared/errors (slice 1) 2026-06-04 12:13:55 +02:00
compaction.py feat: enhance task management and timeout configurations in multi-agent chat 2026-05-27 14:58:10 -07:00
context_editing.py chore: cleaned comments slop 2026-04-28 23:52:37 -07:00
dedup_tool_calls.py Harden HITL for multi-step tasks: bypass internal MCP gate, full-args dedup, and decision-envelope normalization. 2026-05-04 19:25:27 +02:00
doom_loop.py feat: enhance task management and timeout configurations in multi-agent chat 2026-05-27 14:58:10 -07:00
file_intent.py feat: updated file management for main agent 2026-04-28 04:32:52 -07:00
filesystem.py refactor(agents): move context schema + state reducers to app/agents/shared (slice 2) 2026-06-04 12:19:22 +02:00
flatten_system.py feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
kb_persistence.py refactor(agents): move context schema + state reducers to app/agents/shared (slice 2) 2026-06-04 12:19:22 +02:00
kb_postgres_backend.py feat: improved agent streaming 2026-04-29 07:20:31 -07:00
knowledge_search.py perf(kb-planner): route internal planner calls to dedicated small/fast LLM 2026-05-20 11:42:52 +02:00
knowledge_tree.py perf(new-chat): add knowledge_tree middleware timing log 2026-05-19 21:30:14 +02:00
local_folder_backend.py feat: improved agent streaming 2026-04-29 07:20:31 -07:00
memory_injection.py Merge remote-tracking branch 'upstream/dev' into improvement-agent-speed 2026-05-20 21:23:48 +02:00
multi_root_local_folder_backend.py feat: improved agent streaming 2026-04-29 07:20:31 -07:00
noop_injection.py chore: cleaned comments slop 2026-04-28 23:52:37 -07:00
otel_span.py feat(agents): emit metrics for model and tool calls 2026-05-21 23:02:36 +05:30
permission.py refactor(agents): move error taxonomy to app/agents/shared/errors (slice 1) 2026-06-04 12:13:55 +02:00
retry_after.py feat(chat): add model retry and stream lifecycle events 2026-05-22 17:48:43 +05:30
scoped_model_fallback.py feat(chat): add model retry and stream lifecycle events 2026-05-22 17:48:43 +05:30
skills_backends.py fix: repair pre-existing agent_task, gateway, and skills tests 2026-06-04 10:25:06 +02:00
tool_call_repair.py chore: cleaned comments slop 2026-04-28 23:52:37 -07:00