mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
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). |
||
|---|---|---|
| .. | ||
| middleware | ||
| prompts | ||
| tools | ||
| __init__.py | ||
| test_action_log.py | ||
| test_agent_cache.py | ||
| test_busy_mutex.py | ||
| test_compaction.py | ||
| test_context_editing.py | ||
| test_dedup_tool_calls.py | ||
| test_default_permissions_layering.py | ||
| test_desktop_safety_rules.py | ||
| test_doom_loop.py | ||
| test_feature_flags.py | ||
| test_flatten_system.py | ||
| test_hitl_auto_approve.py | ||
| test_memory_response_content.py | ||
| test_mention_resolver.py | ||
| test_noop_injection.py | ||
| test_otel_span.py | ||
| test_path_resolver.py | ||
| test_permission_middleware.py | ||
| test_permissions.py | ||
| test_plugin_loader.py | ||
| test_prompt_caching.py | ||
| test_resolve_prompt_model_name.py | ||
| test_retry_after.py | ||
| test_rm_rmdir_cloud.py | ||
| test_skills_backends.py | ||
| test_specialized_subagents.py | ||
| test_state_reducers.py | ||
| test_tool_call_repair.py | ||