/** * Persistent attempt counter for the iterate escalation guard. * * Tracks how many caller-visible times each review thread has been dispatched to * the fix_code handler without being resolved. Body edits reset the count. * * State lives in `$TMPDIR/pr-shepherd-state/-//fix-attempts.json`. */ export interface FixAttemptsState { /** HEAD SHA at the time the counts were last written, retained for observability/compatibility. */ headSha: string; /** Map from thread ID → number of fix_code dispatches that included this thread. */ threadAttempts: Record; /** Map from thread ID → body hash used for the associated attempt count. */ threadBodyHashes?: Record; } interface StateKey { owner: string; repo: string; pr: number; } /** Read the current attempt state. Returns null on miss. */ export declare function readFixAttempts(key: StateKey): Promise; /** Write attempt state (fire-and-forget — never throws). */ export declare function writeFixAttempts(key: StateKey, state: FixAttemptsState): Promise; export {};