/** * Detectors for the shapes that mean "the agent is stuck". * * Nothing in a transcript says "I am looping". Stuckness only exists at the level * of the whole run: the same call issued again, the same test failing again, a file * edited back to what it was. Each detector below returns Findings carrying real * event indices so the UI can jump to the evidence. */ import { type Finding, type Run, type TraceEvent } from "../model.js"; /** brief: "repeated identical tool call 3+ times" */ export declare const IDENTICAL_CALL_THRESHOLD = 3; /** brief: "failed the same command/test multiple times" */ export declare const SAME_FAILURE_THRESHOLD = 2; export declare const FILE_CHURN_THRESHOLD = 4; export declare function detectIdenticalCalls(run: Run): Finding[]; export declare function detectRepeatedFailures(run: Run): Finding[]; export declare function detectFileChurn(run: Run): Finding[]; /** An edit that undoes a previous edit to the same file: A→B then B→A. */ export declare function detectReverts(run: Run): Finding[]; /** A long tail of activity after the last file change produced nothing. */ export declare function detectStall(run: Run): Finding[]; export declare function allLoopFindings(run: Run): Finding[]; /** exported for tests */ export type { TraceEvent };