mirror of
https://github.com/0xWheatyz/handler.git
synced 2026-08-30 10:36:24 +00:00
Add web_search / web_fetch tools for pi-harness agents
pi ships no web tools and claude's WebSearch/WebFetch are Anthropic-server-side (absent on local endpoints), so these are handler-owned: a new handler.webtool module (httpx, already a dependency) exposed through the bridge extension the same way as the memory tools. web_fetch is provider-free — GET, HTML stripped to readable text, size-capped. web_search resolves SEARXNG_URL, then BRAVE_SEARCH_API_KEY, then falls back to DuckDuckGo's HTML endpoint with zero config. Verified live: a pi agent now advertises all 14 tools (7 built-ins + ask_operator + 4 memory + 2 web). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KdGv3u3DfTsP1S188KDhVH
This commit is contained in:
@@ -107,8 +107,10 @@ def test_write_config_renders_provider_and_bridge(pi_env, tmp_path):
|
||||
assert "handler.mcpserver" in text
|
||||
assert "ask_operator" in text
|
||||
# Tool parity: the bridge activates pi's full built-in set (grep/find/ls are off
|
||||
# by default) alongside its own tools.
|
||||
# by default) alongside its own tools, and registers the handler web tools.
|
||||
assert "setActiveTools" in text
|
||||
assert "handler.webtool" in text
|
||||
assert "web_search" in text and "web_fetch" in text
|
||||
assert (base / "APPEND_SYSTEM.md").read_text().strip()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user