mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor(agents): split tool registry into pure-data catalog, decouple connectors
Replace the connector-coupled BUILTIN_TOOLS registry with a pure-data catalog so shared/tools no longer imports any connector module, making the connector packages independently deletable. - add shared/tools/catalog.py (ToolMetadata + TOOL_CATALOG, 41 tools, no imports) - point GET /agent/tools (the only live consumer) at the catalog - relocate ToolDefinition into action_log middleware (its sole consumer); drop the inert tool_definitions wiring (no tool defines reverse) - delete shared/tools/registry.py: connector imports, dead factories, dead get_connector_gated_tools, and BUILTIN_TOOLS - drop stale dedup-propagation test (path removed in C1) + refresh docstrings import-all guardrail + agents unit suite green (987 passed).
This commit is contained in:
parent
c3238d8840
commit
003924062d
13 changed files with 154 additions and 826 deletions
|
|
@ -113,12 +113,11 @@ def tools_signature(
|
|||
MCP tools loaded for the user changes, gating rules flip, etc.).
|
||||
* The available connectors / document types for the search space
|
||||
change (new connector added, last connector removed, new document
|
||||
type indexed). Because :func:`get_connector_gated_tools` derives
|
||||
``modified_disabled_tools`` from ``available_connectors``, the
|
||||
tool surface is technically already covered — but we hash the
|
||||
connector list separately so an empty-list "no tools changed"
|
||||
situation still rotates the key when, say, the user re-adds a
|
||||
connector that gates a tool we were already not exposing.
|
||||
type indexed). Connector gating derives disabled tools from
|
||||
``available_connectors``, so the tool surface is technically already
|
||||
covered — but we hash the connector list separately so an empty-list
|
||||
"no tools changed" situation still rotates the key when, say, the user
|
||||
re-adds a connector that gates a tool we were already not exposing.
|
||||
|
||||
Stays stable across:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue