/** * repl/toolHandlers.ts * * Tool call confirmation, spinner lifecycle, mutation budgets, * circuit breaker, and audit logging for the REPL. */ import ora from "ora"; export declare const WRITE_TOOLS: Set; export declare const SESSION_MAX_MUTATIONS = 25; export declare const TURN_MAX_MUTATIONS = 10; export interface ToolHandlerState { sessionMutations: number; turnMutations: number; trustAllCommands: boolean; trustAllWrites: boolean; currentSpinner: ReturnType | null; lastToolCall: { name: string; argsHash: string; count: number; }; } export declare function createToolHandlerState(): ToolHandlerState; /** * Called before a tool executes. Returns true to allow, false to deny. * Manages confirmation prompts, spinner start, and mutation budgets. */ export declare function onToolCall(name: string, args: any, thinkingSpinner: ReturnType, state: ToolHandlerState): Promise; /** * Called after a tool completes. Stops spinner, logs audit entry. */ export declare function onToolResult(name: string, result: any, state: ToolHandlerState): void; //# sourceMappingURL=toolHandlers.d.ts.map