import type { ToolResult } from './types.js';
export type KnownToolFailureCategory = 'remote:auth_or_permission' | 'remote:rate_limit' | 'remote:api_error' | 'tool:fs_policy_denied' | 'tool:intent_guard_blocked' | 'tool:task_guard_blocked' | 'tool:timeout' | 'tool:aborted';
export type ToolFailureCategory = KnownToolFailureCategory | (string & {});
export interface ToolFailurePolicy {
    category: ToolFailureCategory;
    reason: string;
    terminal: boolean;
    retryable: boolean;
    evidence: string;
    source: 'remote-output' | 'tool-metadata';
}
export declare function classifyToolFailurePolicy(toolName: string, input: Record<string, unknown>, result: ToolResult): ToolFailurePolicy | null;
export declare function classifySemanticToolFailure(toolName: string, input: Record<string, unknown>, result: ToolResult): ToolFailurePolicy | null;
export declare function applyToolFailurePolicy(toolName: string, input: Record<string, unknown>, result: ToolResult): ToolResult;
export declare const applySemanticToolFailure: typeof applyToolFailurePolicy;
