import type { AgentTool } from "@kolisachint/hoocode-agent-core"; import { Type } from "typebox"; import type { ToolDefinition } from "../extensions/types.js"; import { type WebFetchContentStatus, type WebFetchResult, WebToolsCache, type WebtoolsTLSConfig } from "./webtools-shared.js"; /** Clamp a requested token budget into `(0, MAX_TOKENS_CAP]`, defaulting when unset. */ export declare function clampMaxTokens(requested?: number): number; declare const webfetchSchema: Type.TObject<{ url: Type.TString; maxTokens: Type.TOptional; output: Type.TOptional, Type.TLiteral<"markdown">]>>; offset: Type.TOptional; outline: Type.TOptional; grep: Type.TOptional; }>; export interface WebFetchToolDetails { finalUrl?: string; title?: string; tokenEstimate?: number; /** The page continued past the token budget: what came back is a prefix. */ truncated?: boolean; /** The budget the cut was made at, so the TUI can say what to raise. */ maxTokens?: number; /** Estimated tokens of the whole page, when the binary reports it. */ totalTokenEstimate?: number; /** Where to resume reading, when the binary reports paging offsets. */ nextOffset?: number; /** How many sections an outline listed, for the TUI to show at a glance. */ sectionCount?: number; /** How many places a search matched, likewise. */ matchCount?: number; contentType?: string; media?: string; /** Non-"ok" means extraction produced nothing usable; see {@link WebFetchContentStatus}. */ status?: WebFetchContentStatus; } export interface WebFetchToolOptions extends WebtoolsTLSConfig { /** Override the result cache (mainly for tests). */ cache?: WebToolsCache; /** Effective per-request timeout (seconds); falls back to env/default when unset. */ timeoutSecs?: number; } export declare function createWebFetchToolDefinition(cwd: string, options?: WebFetchToolOptions): ToolDefinition; export declare function createWebFetchTool(cwd: string, options?: WebFetchToolOptions): AgentTool; export {}; //# sourceMappingURL=webfetch.d.ts.map