/** * Real web tools for research workflows. These execute in the extension host * process (which has network access), not in a subagent sandbox, so they perform * genuine HTTP requests via Node's fetch. * * - web_search: best-effort Bing HTML scrape -> result {url, title} * - web_fetch: fetch a URL and return readable text (HTML stripped, truncated) */ import { type ToolDefinition } from "@earendil-works/pi-coding-agent"; export declare function htmlToText(html: string): string; export declare function parseBingResults(html: string, limit: number): Array<{ url: string; title: string; }>; /** A tool that searches the web (best-effort) and returns result URLs + titles. */ export declare function createWebSearchTool(): ToolDefinition; /** * Fetch a URL and return its readable text. * * Private-network policy (issue #122, documented — NOT yet enforced): * Today the model selects any absolute URL and it is fetched on the host * process's network, including loopback / link-local / RFC1918 private ranges * (SSRF exposure). The intended future policy is to reject non-public URLs, * but that network hardening is deferred pending a small accepted design — * the issue explicitly says to "decide and document … before adding network * hardening". When that design lands, add a guard here (resolve the host and * reject loopback/private/link-local) rather than in the workflow script. */ export declare function createWebFetchTool(maxChars?: number): ToolDefinition; /** Both web tools, for injecting into a research workflow's agents. */ export declare function createWebTools(): ToolDefinition[];