refactor(agents): remove dead tool-building machinery from registry

After the main agent moved to its own build_main_agent_tools, nothing calls
the shared registry's builders. Delete the dead functions (build_tools,
build_tools_async, get_tool_by_name, get_all_tool_names,
get_default_enabled_tools) plus the now-orphaned load_mcp_tools import and the
stale __init__ re-exports.

BUILTIN_TOOLS, ToolDefinition, and get_connector_gated_tools are retained:
the catalog is still consumed for tool *metadata* (action_log revert/dedup
resolvers and the /agent/tools listing). Also drop stale references to the
deleted chat_deepagent.py within the agents module.

Verified: full unit suite green (2431 passed, 1 skipped); lints clean.
This commit is contained in:
CREDO23 2026-06-04 19:24:17 +02:00
parent 66103c68f6
commit c3238d8840
4 changed files with 8 additions and 249 deletions

View file

@ -7,8 +7,8 @@ composer module docstring for credits). This module preserves the public
function surface (``build_surfsense_system_prompt`` /
``build_configurable_system_prompt`` /
``get_default_system_instructions`` / ``SURFSENSE_SYSTEM_PROMPT``) so
that existing call sites `chat_deepagent.py`, anonymous chat routes,
and the configurable-prompt admin path keep working without churn.
that existing call sites the multi-agent chat factory, anonymous chat
routes, and the configurable-prompt admin path keep working without churn.
For new call sites prefer importing ``compose_system_prompt`` directly
from :mod:`app.agents.shared.prompts.composer`.