export type ToolLoopGuardState = { bySignature: Map; byTool: Map; byToolFailure: Map; byWebFetchUrlFailure: Map; /** * Per-file surgical-edit failures (edit_file / multi_edit). Prevents * thrashing the same path with slightly different old_string after reads * go stale — Claude Code "read then edit" discipline at the loop layer. */ byEditPathFailure: Map; webSearchQueries: Set; freshNewsSearchRequested: boolean; hasSufficientRssNewsEvidence: boolean; total: number; }; /** * All workspace paths touched by a surgical edit call. multi_edit / apply_patch * can touch many files — thrash must count every path, not only the first. * @internal exported for tests */ export declare function collectSurgicalEditPathKeys(input?: Record): string[]; export declare function createToolLoopGuardState(): ToolLoopGuardState; export declare function isSoftToolFailureResult(resultText: string | undefined): boolean; export declare function recordToolLoopOutcome(state: ToolLoopGuardState, toolName: string, isError: boolean, resultText?: string, input?: Record): void; export declare function formatToolLoopGuardMessage(reason: string, toolName: string): string; export declare function shouldShortCircuitToolCall(state: ToolLoopGuardState, toolName: string, input: Record, options?: { parallelBatch?: boolean; }): string | null; //# sourceMappingURL=tool-loop-guard.d.ts.map