/** * Cascading recovery chain (ยง4.4, C6). * * Layer 0โ€“1: fix-attempt (inject evaluator issues into next worker turn) * Layer 2: microcompact + reenter worker mode * Layer 3: full rework (reset stage to pending) * Terminal: worker_unrecoverable * * Each layer is a function that returns the next state + nextAction. * The advance() dispatcher calls the appropriate layer based on recoveryAttempts. */ import type { SagaState, Transition } from '../coordinator/state.js'; export interface RecoveryDecision { layer: number; method: 'fix-attempt' | 'microcompact-retry' | 'full-rework' | 'escalate-human' | 'terminal'; transition: Transition | undefined; nextAction: 'revision_queued' | 'worker_mode_queued' | 'await_human' | 'terminated'; diagnostic: string; } /** * Decide which recovery layer to apply based on attempt count. * * attempt 0โ€“1: fix-attempt (cheapest โ€” just re-inject with issues) * attempt 2: microcompact + reenter * attempt 3: full rework * beyond: terminal */ export declare function classifyRecovery(state: SagaState, stageId: string, issues: string[]): RecoveryDecision; /** * Apply a recovery decision to state. * Returns new state with updated recoveryAttempts and transition. */ export declare function applyRecovery(state: SagaState, decision: RecoveryDecision): SagaState; //# sourceMappingURL=cascading-chain.d.ts.map