Documentation
¶
Overview ¶
Package tools implements executable capabilities (Tools, §49). It is strictly separated from Skills (knowledge) and Executors (coding runtimes).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher is the controlled research web tool (§46). It fetches http(s) URLs to PUBLIC addresses only, blocking SSRF into loopback/private/link-local/ metadata networks (§15, §73). It is deterministic and never takes URLs from raw model output — callers pass validated, config-supplied URLs.
func NewFetcher ¶
func NewFetcher() *Fetcher
NewFetcher builds a fetcher with SSRF-safe dialing and redirect limits.
func (*Fetcher) Fetch ¶
Fetch retrieves url, extracts readable text, and returns it (truncated to the size cap). Only public http(s) addresses are reachable.
func (*Fetcher) FetchJSON ¶ added in v0.7.0
FetchJSON retrieves url as a JSON document (raw bytes, size-capped) through the same SSRF-guarded client as Fetch: public http(s) addresses only, at most 5 redirects, none to a non-http scheme. Unlike Fetch it does not strip markup -- an outcome metric's url source reads a number out of the body with a JSON pointer, and HTML-stripping would corrupt a string value that happened to contain a '<'.