/**
 * StuckLoopView — detects when an agent calls the same tool with the
 * same (or structurally similar) arguments ≥ N times in a short window.
 *
 * Rationale: agents that loop are the number-one production failure
 * mode on long-horizon flows. The view returns (runId, toolName,
 * argHash, occurrences, windowMs) for each detected loop plus a
 * fraction of runs affected.
 */
import type { TraceStore } from '../trace/store';
export interface StuckLoopFinding {
    runId: string;
    toolName: string;
    argHash: string;
    occurrences: number;
    spanIds: string[];
    /** Milliseconds between first and last call in the loop. */
    windowMs: number;
}
export interface StuckLoopReport {
    findings: StuckLoopFinding[];
    affectedRunRatio: number;
    totalRuns: number;
}
export interface StuckLoopOptions {
    /** Minimum call count to flag a loop (default 3). */
    minOccurrences?: number;
    /** Filter to a specific runId; omit to scan the entire corpus. */
    runId?: string;
}
export declare function stuckLoopView(store: TraceStore, options?: StuckLoopOptions): Promise<StuckLoopReport>;
//# sourceMappingURL=stuck-loop.d.ts.map