/** * Guard against duplicate todo_write calls within a single user turn. * * - The first write after the per-turn lock is active is blocked and returns a * paired TODO_WRITE_ALREADY_APPLIED rejection result. * - The second equivalent duplicate terminates the active agent run locally with * REPEATED_TOOL_CALL_LOOP. The tool layer throws for this case. * * Counts reset on non-todo tool success or a new user message. */ export declare class TodoLoopGuard { private duplicateRejectionCount; /** * Record a todo_write attempt that was already rejected by the per-turn lock. * Returns whether the call may return a rejection result (first duplicate) * or must terminate the run (second equivalent duplicate). */ recordDuplicate(): boolean; /** * Reset loop guard after a successful non-todo tool call. */ resetOnNonTodoToolSuccess(_toolName: string): void; /** * Reset loop guard when a new user message arrives. */ resetOnNewUserMessage(): void; /** * Reset loop guard manually. */ reset(): void; getDuplicateRejectionCount(): number; isDuplicateLoop(): boolean; } //# sourceMappingURL=todo-loop-guard.d.ts.map