import type { SessionAttemptOutcome } from '../shared/types.js'; /** * What a Todo's execution attempts say, and as of when. * * The reconciler derives status from linked sessions; this module decides which * of them still get to speak. It also settles the run ledger from the same * receipts, because the two readings must agree about what an attempt did. */ /** Session lifecycle states, mirrored from `Session.status` in shared/types.ts. */ export type SessionStatus = 'idle' | 'running' | 'error' | 'waiting' | 'interrupted'; export interface WorkItemAttemptEvidence { status: SessionStatus; outcome: SessionAttemptOutcome | null; } /** What a Todo's attempts say, and what the operator said last. */ export interface WorkItemAttemptReading { /** The receipts still entitled to speak, newest-first. */ attempts: WorkItemAttemptEvidence[]; /** When the operator last moved this Todo himself, if he ever has. Attempts at * or before it were dropped; an empty `attempts` alongside it means nothing * has happened since he decided. */ humanDecisionAt?: string; } /** * The receipts a Todo's status may be derived from, newest-first (the ordering * `listSessionsByWorkItem` returns and `deriveWorkItemStatus` relies on). * Settles the run ledger on the way through, for every non-phase attempt — * bookkeeping about a finished attempt stays true regardless of whether that * attempt still counts as evidence. */ export declare function collectAttemptEvidence(workItemId: string): WorkItemAttemptReading; //# sourceMappingURL=attempt-evidence.d.ts.map