import { WorkflowContext } from './context.types'; export declare enum ErrorHandlingDecision { CONTINUE = "continue", EXIT = "exit", FAIL = "fail", FAIL_NO_PERSIST = "fail_no_persist", TRANSITION_TO = "transition_to", STOP_RETRY = "stop_retry" } export interface TransitionToDecision = Record, TOutputs extends Record = Record> { decision: ErrorHandlingDecision.TRANSITION_TO; targetState: string; output?: any; onContextTransform?: (context: WorkflowContext) => void; } export type ErrorHandlingResult = Record, TOutputs extends Record = Record> = ErrorHandlingDecision | TransitionToDecision; export type ErrorPhase = 'lock_acquisition' | 'workflow_start' | 'before_state' | 'state_execute' | 'after_state' | 'workflow_complete'; export interface ErrorContext = Record, TOutputs extends Record = Record> { error: Error; phase: ErrorPhase; workflowContext: WorkflowContext; attempt?: number; maxAttempts?: number; } export interface ErrorHandler = Record, TOutputs extends Record = Record> { handle(context: ErrorContext): Promise> | ErrorHandlingResult; } //# sourceMappingURL=error-handler.types.d.ts.map