Commit Graph
4 Commits
Author SHA1 Message Date
ZacharyZhang-NYandClaude Opus 5.5 552dfcb6ce Q98: external calls have a time limit and stop with the run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:12:45 -04:00
ZacharyZhang-NYandClaude Opus 5.5 989127bed3 Q97: external calls that report failure are failed calls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:04:15 -04:00
ZacharyZhang-NYandClaude Opus 5.5 4d6c74a21e Q21: fetch_url pages long pages and continues where it stopped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 05:01:28 -04:00
ZacharyZhang-NY 80e70649c3 Every agent gets the live web: web_search and fetch_url by default
"Be ashamed to guess APIs blindly; be proud to look things up carefully" —
until now the agents had no way to look anything up: no search, no fetch,
so market research, API usage, and competitive claims were all invented
from model memory.

agent-web-tools.ts, carried by every agent in every run (same pattern as
the workspace tools, no grant needed):
- web_search: keyless DuckDuckGo HTML backend; parses titles, unwraps the
  /l/?uddg= redirect hrefs, pairs snippets; reports honestly when nothing
  parses instead of fabricating results. Verified against the live endpoint.
- fetch_url: readable-text extraction (dependency-free HTML-to-text with
  entity decoding), 20k-char page cap, 2MB body cap read in chunks, 30s
  timeout.
- SSRF guard on both: hostnames resolve before connecting and loopback,
  private, link-local, CGNAT, and reserved ranges are refused — re-checked
  on every redirect hop, so a public page cannot bounce the agent into
  127.0.0.1 or the cloud metadata address. IPv6 and v4-mapped forms covered.
- The fetcher is injectable, so the test suite covers the guard, redirect
  policy, truncation, extraction, and the DuckDuckGo parser without
  touching the network.
2026-07-09 20:42:12 -04:00