import type { RiskDecision } from "../safety/classifier.js"; import type { ToolResult } from "../types.js"; export interface ExternalToolCallOptions { readonly signal?: AbortSignal | undefined; readonly timeoutMs?: number | undefined; } export interface ExternalToolDispatcher { toolNames(): readonly string[]; hasTool(name: string): boolean; callTool(name: string, args: Record, options?: ExternalToolCallOptions): Promise; canonicalizeToolName?(name: string): string; classify?(name: string): RiskDecision | undefined; isParallelSafe?(name: string): boolean; unavailableToolMessage?(name: string): string; } export declare function registerExternalToolDispatcher(dispatcher: ExternalToolDispatcher): () => void; export declare function externalToolDispatcher(): ExternalToolDispatcher | undefined; export declare function externalToolNames(): readonly string[]; export declare function isExternalToolName(name: string): boolean; export declare function externalToolRisk(name: string): RiskDecision | undefined; export declare function isExternalToolParallelSafe(name: string): boolean; export declare function canonicalizeExternalToolName(name: string): string;