1
0

fix: prune dead web_search tool — ddgs never installed (#87)

Remove DuckDuckGoTools import, all web_search registrations across 4 toolkit
factories, catalog entry, safety classification, prompt references, and
session regex. Total: -41 lines of dead code.

consult_grok is functional (grok_enabled=True, API key set) and opt-in,
so it stays — but Timmy never calls it autonomously, which is correct
sovereign behavior (no cloud calls unless user permits).

Closes #87
This commit is contained in:
2026-03-14 18:13:51 -04:00
parent 7ff012883a
commit b3a1e0ce36
7 changed files with 14 additions and 55 deletions

View File

@@ -29,7 +29,7 @@ def clear_usage():
class TestToolTracking:
def test_track_creates_agent_entry(self):
_track_tool_usage("agent-1", "web_search", success=True)
_track_tool_usage("agent-1", "calculator", success=True)
assert "agent-1" in _TOOL_USAGE
assert len(_TOOL_USAGE["agent-1"]) == 1
@@ -132,7 +132,6 @@ class TestToolCatalog:
def test_catalog_contains_base_tools(self):
catalog = get_all_available_tools()
base_tools = {
"web_search",
"shell",
"python",
"read_file",
@@ -141,6 +140,8 @@ class TestToolCatalog:
}
for tool_id in base_tools:
assert tool_id in catalog, f"Missing base tool: {tool_id}"
# web_search removed — dead code, ddgs never installed (#87)
assert "web_search" not in catalog
def test_catalog_tool_structure(self):
catalog = get_all_available_tools()
@@ -153,7 +154,6 @@ class TestToolCatalog:
def test_catalog_orchestrator_has_all_base_tools(self):
catalog = get_all_available_tools()
base_tools = {
"web_search",
"shell",
"python",
"read_file",
@@ -167,7 +167,6 @@ class TestToolCatalog:
def test_catalog_echo_research_tools(self):
catalog = get_all_available_tools()
assert "echo" in catalog["web_search"]["available_in"]
assert "echo" in catalog["read_file"]["available_in"]
# Echo should NOT have shell
assert "echo" not in catalog["shell"]["available_in"]