/** * Named toolset groups on an Agent (Python parity: `Agent(toolsets=[...])`, * `agent/agent.py` lines 2358-2392, over `toolsets.py`). * * `toolsets: ['web']` resolves the named group to its tool names, drops the * ones the agent already has, and attaches the rest. Resolution and * attachment are deliberately split: * * - {@link resolveToolsetToolNames} runs in the CONSTRUCTOR and throws on an * unknown toolset name, exactly as Python does — a typo must not survive * until the first model turn. * - {@link loadToolsetTools} runs on first use, because each builtin lives * behind a dynamic import and pulling four provider SDKs into the module * graph for an agent that never calls one is a cost nobody asked for. * * A Python tool name with no TypeScript builtin is reported and skipped: * `resolveToolsetBuiltinIds` never invents a tool, and silently pretending a * toolset was attached would be worse than saying it was not. */ /** * The tool names a list of toolsets resolves to, ordered for `model`'s family * (Python `resolve_toolsets_for_model`). Throws on an unknown toolset name. */ export declare function resolveToolsetToolNames(names: readonly string[], model?: string): string[]; /** A tool object the Agent can accept (`name` + `execute`). */ export interface ToolsetTool { name: string; description?: string; parameters?: Record; execute: (...args: unknown[]) => unknown; } /** * Instantiate the TypeScript builtins behind `toolNames`, skipping those the * agent already has. `onWarning` is called once per name that has no * TypeScript builtin, so a partially-supported toolset is audible. */ export declare function loadToolsetTools(toolNames: readonly string[], existingToolNames: ReadonlySet, onWarning?: (message: string) => void): Promise;