Chrome's --host-resolver-rules only glob-matches host strings, so the CIDR
entries (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 169.254.0.0/16,
192.168.0.0/16) never matched: pages could fetch private IP literals and
names resolving to private IPs, and the live SSRF test hung dialing
169.254.169.254 until its deadline.
Replace the rules with web.EgressProxy, a loopback HTTP proxy (CONNECT and
absolute-URI HTTP) that resolves each destination, refuses it if any
address is private, and dials the validated IP directly. Chrome is pointed
at it with --proxy-server and <-loopback>, and WebRTC is limited to proxied
UDP. Stagehand's local mode allows only Chrome's own debugging port through,
which its extension needs.
SafeHTTPClient and the proxy now share one safe dialer, which races the
validated addresses happy-eyeballs style so dual-stack hosts with broken
IPv6 don't stall. isPrivateIP also covers multicast, reserved, benchmark,
Teredo and NAT64/6to4/IPv4-compatible addresses embedding a private IPv4.
Add tools/stagehand, a browser tool built on the Stagehand Go SDK
(act/observe/extract/navigate/get_text/screenshot) with persistent named
sessions. Runs on local Chrome by default or Browserbase when an API key
is configured. Stagehand's internal inference is routed through the
harness LLMProvider via NewGenerateFunc, so it shares the agent's
provider, usage observers and admission guards.
The Stagehand SDK requires Go 1.26, so the module now declares go 1.26.0.