/** * IterationTracker — Manages per-agent iteration budgets and diminishing returns * * Each agent has a maximum number of iterations. For agents like the * code reviewer (Agent 7), we also track whether improvements are * diminishing — if iteration N improves less than the threshold over N-1, * we stop early. */ import type { HealthIssue } from '../types.js'; import type { AgentId, IterationSummary } from './types.js'; export declare class IterationTracker { private readonly maxIterations; private readonly diminishingReturnsThreshold; private records; private currentIteration; constructor(maxIterations: number, diminishingReturnsThreshold?: number); /** * Record the result of an iteration. * @returns Whether another iteration is warranted. */ recordIteration(score: number, issues: HealthIssue[]): boolean; /** Check if we should continue iterating */ shouldContinue(): boolean; /** Get the summary of all iterations */ getSummary(agentId: AgentId): IterationSummary; /** Check if the same error appeared in the last two iterations (for quality gate bail) */ hasSameErrorTwice(): boolean; } //# sourceMappingURL=iteration-tracker.d.ts.map