/** * Persistent stall-detection state for the iterate loop. * * Tracks the fingerprint of the last iterate result and when that fingerprint * was first seen. If the fingerprint does not change for stallTimeoutSeconds * the iterate command escalates instead of repeating the same action. * * State lives in `$TMPDIR/pr-shepherd-state/-//iterate-stall.json`. */ interface StallState { /** Canonicalized JSON fingerprint of the material iterate inputs. */ fingerprint: string; /** Unix timestamp (seconds) when this fingerprint was first seen. */ firstSeenAt: number; } interface StateKey { owner: string; repo: string; pr: number; } /** Read the current stall state. Returns null on miss, corrupt data, or invalid shape. */ export declare function readStallState(key: StateKey): Promise; /** Clear stall state so the next invocation starts a fresh timer (fire-and-forget — never throws). */ export declare function clearStallState(key: StateKey): Promise; /** Write stall state (fire-and-forget — never throws). */ export declare function writeStallState(key: StateKey, state: StallState): Promise; export {};