import type { Logger } from 'pino';
import type { ToolApprovalPolicy } from '../../../core/approvals/types.js';
import { type AutonomyEvaluation } from '../../../core/approvals/index.js';
import { ToolExecutionService, type ToolRegistry } from '../../../core/tools/index.js';
import type { ToolCall, ToolDefinition } from '../../../core/types.js';
import type { AgentRunLiveRecorder, RunAgentOptions } from '../types.js';
type ToolAuthorizationResult = {
    type: 'allowed';
    autonomyEvaluation?: AutonomyEvaluation;
} | {
    type: 'denied';
    result: {
        ok: false;
        error: string;
    };
};
/**
 * Owns tool approval, execution, deduplication, and inspect-to-mutate fallback.
 *
 * ToolTurnService decides when tool calls are needed; this dispatcher owns how
 * a single call is authorized, executed, traced, and optionally retried.
 */
export declare class AgentToolDispatcher {
    static authorizeToolCall(args: {
        call: ToolCall;
        tool: ToolDefinition | undefined;
        step: number;
        now: () => string;
        approvalPolicies?: ToolApprovalPolicy[];
        approveToolCall: RunAgentOptions['approveToolCall'];
        workspaceRoot?: string;
        live: AgentRunLiveRecorder;
        log: Logger;
    }): Promise<ToolAuthorizationResult>;
    static executeToolCallWithFallback(args: {
        call: ToolCall;
        autonomyEvaluation?: AutonomyEvaluation;
        step: number;
        now: () => string;
        registry: ToolRegistry;
        seenToolCalls: Map<string, number>;
        approvalPolicies?: ToolApprovalPolicy[];
        approveToolCall: RunAgentOptions['approveToolCall'];
        workspaceRoot?: string;
        live: AgentRunLiveRecorder;
        log: Logger;
    }): Promise<{
        effectiveCall: ToolCall;
        result: Awaited<ReturnType<typeof ToolExecutionService.execute>>;
    }>;
    private static executeRecordedToolCall;
    private static getInspectFallbackReason;
    private static getInspectMutateFallbackReason;
}
export {};
//# sourceMappingURL=tool-dispatcher.d.ts.map