/**
 * OwlCoda Native Tool Dispatcher
 *
 * Routes tool_use blocks from the model to native tool implementations,
 * executes them, and returns tool_result blocks for the conversation.
 */
import type { AnthropicToolUseBlock, AnthropicContentBlock } from './protocol/types.js';
import type { NativeToolDef, ToolExecutionContext, ToolResult } from './tools/types.js';
import type { MCPManager } from './mcp/manager.js';
/** Tool execution result with the original tool_use_id. */
export interface ToolExecutionResult {
    toolUseId: string;
    toolName: string;
    result: ToolResult;
    durationMs: number;
}
export declare class ToolDispatcher {
    private mcpManager?;
    private tools;
    constructor(mcpManager?: MCPManager | undefined);
    /** Register a tool. */
    register<T>(tool: NativeToolDef<T>): void;
    /** Remove a registered tool by name. */
    unregister(name: string): boolean;
    /** Get all registered tool names. */
    getToolNames(): string[];
    /** Check if a tool is registered. */
    has(name: string): boolean;
    /**
     * Resolve the description authored by the tool's factory. Returns
     * `undefined` when the tool isn't registered or didn't supply one.
     *
     * Wire-the-honest-text exists because `buildNativeToolDefs` and
     * `ToolSearch` previously hardcoded a `"Native ${name} tool"`
     * placeholder, which silently dropped honest stub-disclosure copy
     * (e.g. SendMessage's "There is no consumer wired up to drain these
     * queues" or McpAuth's "tokens are NOT validated"). The LLM never
     * saw what the maintainer wrote.
     */
    getToolDescription(name: string): string | undefined;
    /** Execute a single tool_use block. */
    executeTool(block: AnthropicToolUseBlock, context?: ToolExecutionContext): Promise<ToolExecutionResult>;
    /** Execute all tool_use blocks (sequentially to avoid race conditions). */
    executeAll(blocks: AnthropicToolUseBlock[], context?: ToolExecutionContext): Promise<ToolExecutionResult[]>;
    /** Convert execution results to tool_result content blocks for the next message. */
    toContentBlocks(results: ToolExecutionResult[]): AnthropicContentBlock[];
    private registerDefaults;
}
