export type ErrorCategory = "GRAPH" | "NODE" | "EDGE" | "CHECKPOINT" | "STREAM" | "HITL" | "SWARM" | "MODEL" | "STORE" | "CONFIG"; export interface ONIErrorOptions { code: string; category: ErrorCategory; recoverable: boolean; suggestion?: string; context?: Record; } export declare class ONIError extends Error { readonly code: string; readonly category: ErrorCategory; readonly recoverable: boolean; readonly suggestion: string; readonly context: Record; constructor(message: string, opts?: ONIErrorOptions); toJSON(): Record; /** Full serialization including stack and context — for internal logging only. */ toInternalJSON(): Record; } export declare class InvalidSkeletonError extends ONIError { constructor(msg: string); } export declare class RecursionLimitError extends ONIError { constructor(limit: number); } export declare class NodeNotFoundError extends ONIError { constructor(name: string); } export declare class EdgeConflictError extends ONIError { constructor(from: string, to: string); } export declare class NodeExecutionError extends ONIError { constructor(node: string, cause: Error, extraContext?: Record); } export declare class NodeTimeoutError extends ONIError { constructor(node: string, timeoutMs: number); } export declare class CircuitBreakerOpenError extends ONIError { constructor(node: string, resetAfterMs: number); } export declare class SwarmDeadlockError extends ONIError { constructor(agents: string[]); } export declare class ModelAPIError extends ONIError { constructor(provider: string, status: number, body: string, opts?: { suggestion?: string; messageBody?: string; }); } export declare class ModelRateLimitError extends ONIError { constructor(provider: string, retryAfterMs?: number); } export declare class ModelContextLengthError extends ONIError { constructor(provider: string, maxTokens: number); } export declare class CheckpointCorruptError extends ONIError { constructor(threadId: string, detail: string); } export declare class StoreKeyNotFoundError extends ONIError { constructor(namespace: string[], key: string); } /** Thrown at interrupt checkpoints — caught externally to pause/resume */ export declare class ONIInterrupt { readonly node: string; readonly timing: "before" | "after"; readonly state: unknown; readonly isONIInterrupt = true; constructor(node: string, timing: "before" | "after", state: unknown); } //# sourceMappingURL=errors.d.ts.map