mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor(agents): group MCP tools into shared/tools/mcp/ subpackage
The three MCP siblings (mcp_client/mcp_tool/mcp_tools_cache) served one objective but sat loose at the top of shared/tools. Grouped them into an mcp/ package and dropped the redundant prefix: client.py, tool.py, cache.py. Updated all importers (routes, mcp_tools subagent, e2e fake patch targets, unit test) to the new paths.
This commit is contained in:
parent
8d0090c6a1
commit
c51aca6ccc
9 changed files with 23 additions and 16 deletions
|
|
@ -137,10 +137,10 @@ def install(active_patches: list[Any]) -> None:
|
|||
"""Patch production MCP streamable-HTTP boundaries exactly once."""
|
||||
targets = [
|
||||
(
|
||||
"app.agents.shared.tools.mcp_tool.streamablehttp_client",
|
||||
"app.agents.shared.tools.mcp.tool.streamablehttp_client",
|
||||
_fake_streamablehttp_client,
|
||||
),
|
||||
("app.agents.shared.tools.mcp_tool.ClientSession", _FakeClientSession),
|
||||
("app.agents.shared.tools.mcp.tool.ClientSession", _FakeClientSession),
|
||||
]
|
||||
for target, replacement in targets:
|
||||
p = patch(target, replacement)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from types import SimpleNamespace
|
|||
|
||||
import pytest
|
||||
|
||||
from app.agents.shared.tools.mcp_tools_cache import (
|
||||
from app.agents.shared.tools.mcp.cache import (
|
||||
CachedMCPToolDef,
|
||||
CachedMCPTools,
|
||||
read_cached_tools,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue