SurfSense/surfsense_backend/tests/unit/agents/new_chat
CREDO23 9493519c61 refactor(agents): colocate 8 main-agent-only middleware as per-concept folders
Each main-agent-only middleware now lives in its own folder under
main_agent/middleware/<concept>/ with builder.py (flag-gated construction)
+ middleware.py (the impl), re-exported via __init__.py. This kills the
cross-folder hop into agents/shared/middleware and keeps each middleware's
two responsibilities (build vs behavior) as colocated siblings.

Moved (impl from shared/middleware, builder from main_agent/middleware):
action_log, anonymous_document, context_editing, doom_loop, knowledge_tree,
noop_injection, otel_span, tool_call_repair.

Impls moved verbatim (git rename, no body edits) so behavior is unchanged.
Builders now import from the local .middleware sibling. stack.py import
paths updated for the 3 renamed folders; shared middleware barrel trimmed;
tests repointed (imports + patch targets).
2026-06-05 11:42:58 +02:00
..
middleware refactor(agents): delete single-agent stack + new_chat shim package (bucket B3/B4) 2026-06-04 13:40:44 +02:00
prompts refactor(agents): move connector_searchable_types, agent_cache, system_prompt + prompts to app/agents/shared (slice 7b) 2026-06-04 13:21:45 +02:00
tools refactor(agents): group MCP tools into shared/tools/mcp/ subpackage 2026-06-04 20:35:38 +02:00
__init__.py feat: updated agent harness 2026-04-28 09:22:19 -07:00
test_action_log.py refactor(agents): colocate 8 main-agent-only middleware as per-concept folders 2026-06-05 11:42:58 +02:00
test_agent_cache.py refactor(agents): colocate main_agent-only kernel into main_agent/ 2026-06-04 21:25:39 +02:00
test_busy_mutex.py refactor(agents): move middleware package to app/agents/shared (slice 5c) 2026-06-04 13:00:41 +02:00
test_compaction.py refactor(agents): move middleware package to app/agents/shared (slice 5c) 2026-06-04 13:00:41 +02:00
test_context_editing.py refactor(agents): colocate 8 main-agent-only middleware as per-concept folders 2026-06-05 11:42:58 +02:00
test_dedup_tool_calls.py refactor(agents): split dedup_tool_calls; move HITL middleware to main_agent 2026-06-05 11:17:44 +02:00
test_default_permissions_layering.py refactor(agents): relocate remaining MAC-only kernel (permissions, deliverable_wait) 2026-06-05 10:58:49 +02:00
test_desktop_safety_rules.py refactor(agents): relocate remaining MAC-only kernel (permissions, deliverable_wait) 2026-06-05 10:58:49 +02:00
test_doom_loop.py refactor(agents): colocate 8 main-agent-only middleware as per-concept folders 2026-06-05 11:42:58 +02:00
test_feature_flags.py refactor(agents): move feature flags to app/agents/shared/feature_flags (slice 2b) 2026-06-04 12:23:12 +02:00
test_hitl_auto_approve.py refactor(agents): move tools package to app/agents/shared (slice 6) 2026-06-04 13:11:56 +02:00
test_memory_response_content.py feat: refine private and team memory protocols 2026-05-20 02:02:10 +05:30
test_mention_resolver.py refactor(agents): move checkpointer + mention_resolver to app/agents/shared (slice 5b) 2026-06-04 12:52:54 +02:00
test_noop_injection.py refactor(agents): colocate 8 main-agent-only middleware as per-concept folders 2026-06-05 11:42:58 +02:00
test_otel_span.py refactor(agents): colocate 8 main-agent-only middleware as per-concept folders 2026-06-05 11:42:58 +02:00
test_path_resolver.py refactor(agents): move filesystem_state, path_resolver, sandbox to app/agents/shared (slice 3b) 2026-06-04 12:34:28 +02:00
test_permission_middleware.py refactor(agents): relocate remaining MAC-only kernel (permissions, deliverable_wait) 2026-06-05 10:58:49 +02:00
test_permissions.py refactor(agents): relocate remaining MAC-only kernel (permissions, deliverable_wait) 2026-06-05 10:58:49 +02:00
test_plugin_loader.py refactor(agents): colocate main_agent-only kernel into main_agent/ 2026-06-04 21:25:39 +02:00
test_prompt_caching.py refactor(agents): move llm_config + prompt_caching to app/agents/shared (slice 4b) 2026-06-04 12:41:52 +02:00
test_retry_after.py refactor(agents): move middleware package to app/agents/shared (slice 5c) 2026-06-04 13:00:41 +02:00
test_skills_backends.py refactor(agents): colocate main_agent-only kernel into main_agent/ 2026-06-04 21:25:39 +02:00
test_state_reducers.py refactor(agents): move MAC graph-state schema into multi_agent_chat/shared/state/ 2026-06-05 10:54:15 +02:00
test_tool_call_repair.py refactor(agents): colocate 8 main-agent-only middleware as per-concept folders 2026-06-05 11:42:58 +02:00