export type RecoveryActionKind = 'recover'; export type RecoveryActionResult = /** failed → pending via RecoverySweepService.recoverFailedTask */ 'recovered' /** needs_human_review → pending via owner authority reset */ | 'requeued'; export interface RecoveryActionRecord { /** Random id for this audit line */ actionId: string; taskId: string; action: RecoveryActionKind; /** Status before the recovery mutation (e.g. 'failed', 'needs_human_review') */ previousStatus: string; /** Who triggered the action (e.g. 'console'); null when unknown */ operator: string | null; /** Optional owner-supplied reason (bounded free text) */ reason: string | null; /** * True when the recovery bypassed an exhausted attempt budget * (recoverFailedTask force path). Absent on records written before this * field existed and on non-forced recoveries. */ forceApplied?: boolean; createdAt: string; result: RecoveryActionResult; } export interface AppendRecoveryActionInput { taskId: string; previousStatus: string; result: RecoveryActionResult; operator?: string; reason?: string | null; forceApplied?: boolean; } /** * Append a recovery action record to the audit log. * * Best-effort by design: an audit-write failure must not turn an already * committed task recovery into a reported failure, but it is never silent — * the error propagates to the caller, which logs it (rc-9). */ export declare function appendRecoveryAction(workspaceDir: string, input: AppendRecoveryActionInput): RecoveryActionRecord; /** * List recovery action records from the audit log. * * @param workspaceDir - The workspace root directory * @param filter - Optional filter by taskId * @returns Array of recovery action records (oldest first) */ export declare function listRecoveryActions(workspaceDir: string, filter?: { taskId?: string; }): RecoveryActionRecord[]; export type OwnerEvidenceActionKind = 'attach_evidence' | 'resume_evidence'; export interface OwnerEvidenceActionRecord { actionId: string; taskId: string; action: OwnerEvidenceActionKind; /** Canonical pain id the attached selection references. */ painId: string; /** Attach revision of the selection (1 = first attach). */ revision: number; /** `sha256:` digest of the assembled pack this action is anchored to. */ contentDigest: string; /** Only on resume: the attempt budget BEFORE the explicit authority reset. */ previousAttemptCount?: number; /** Operator label (--decidedBy); null when not supplied. */ operator: string | null; createdAt: string; } export interface AppendOwnerEvidenceActionInput { taskId: string; action: OwnerEvidenceActionKind; painId: string; revision: number; contentDigest: string; previousAttemptCount?: number; operator?: string | null; } /** * Append an Owner evidence action to the same audit log. Same best-effort * contract as appendRecoveryAction: errors propagate to the caller (rc-9, * never silent) but the state mutation they audit has already been committed. */ export declare function appendOwnerEvidenceAction(workspaceDir: string, input: AppendOwnerEvidenceActionInput): OwnerEvidenceActionRecord; /** * List Owner evidence action records from the audit log (oldest first). * `recover`-kind lines and corrupt lines are skipped — each record family * reads only its own shape. */ export declare function listOwnerEvidenceActions(workspaceDir: string, filter?: { taskId?: string; }): OwnerEvidenceActionRecord[]; //# sourceMappingURL=recovery-actions-log.d.ts.map