import { EffectAction, SerializedEffectError } from "./types"; import { type ParallelBatch } from "../tasks/batching"; export { suggestCommand, suggestFlag, suggestFix } from "./errorSuggestions"; export { ERROR_TEMPLATES, interpolateTemplate, createErrorMessage, formatErrorWithContext, formatNextSteps, toStructuredError, } from "./errorTemplates"; export type { ErrorTemplateContext, ErrorTemplate, ErrorTemplateKey, FormatErrorOptions, StructuredError, } from "./errorTemplates"; export declare enum ErrorCategory { Configuration = "CONFIGURATION", Validation = "VALIDATION", Runtime = "RUNTIME", External = "EXTERNAL", Internal = "INTERNAL" } export declare const ERROR_CATEGORY_DESCRIPTIONS: Record; export interface BabysitterErrorDetails { [key: string]: unknown; } export interface BabysitterErrorOptions { category?: ErrorCategory; suggestions?: string[]; nextSteps?: string[]; details?: BabysitterErrorDetails; cause?: Error; } export declare class BabysitterRuntimeError extends Error { readonly details?: BabysitterErrorDetails; readonly category: ErrorCategory; readonly suggestions: string[]; readonly nextSteps: string[]; constructor(name: string, message: string, options?: BabysitterErrorOptions | BabysitterErrorDetails); static fromTemplate(name: string, templateKey: string, context: Record, additionalOptions?: Partial): BabysitterRuntimeError; } export declare class BabysitterIntrinsicError extends BabysitterRuntimeError { readonly isIntrinsic = true; constructor(name: string, message: string, options?: BabysitterErrorOptions | BabysitterErrorDetails); } export declare class EffectRequestedError extends BabysitterIntrinsicError { readonly action: EffectAction; constructor(action: EffectAction); } export declare class EffectPendingError extends BabysitterIntrinsicError { readonly action: EffectAction; constructor(action: EffectAction); } export declare class EffectCancelledError extends BabysitterIntrinsicError { readonly effectId: string; readonly reason?: string | undefined; constructor(effectId: string, reason?: string | undefined); } export declare class ParallelPendingError extends BabysitterIntrinsicError { readonly batch: ParallelBatch; readonly effects: EffectAction[]; constructor(batch: ParallelBatch); } export declare class InvocationCollisionError extends BabysitterRuntimeError { readonly invocationKey: string; constructor(invocationKey: string); } export declare class RunFailedError extends BabysitterRuntimeError { constructor(message: string, options?: BabysitterErrorOptions | BabysitterErrorDetails); } export declare class RunHaltedError extends BabysitterRuntimeError { readonly reason: string; readonly payload?: Record; constructor(reason: string, payload?: Record); } export declare class MissingProcessContextError extends BabysitterRuntimeError { constructor(); } export declare class InvalidTaskDefinitionError extends BabysitterRuntimeError { constructor(reason: string); } export declare class InvalidSleepTargetError extends BabysitterRuntimeError { constructor(value: string | number); } export declare function isIntrinsicError(error: unknown): error is BabysitterIntrinsicError; export declare function isBabysitterError(error: unknown): error is BabysitterRuntimeError; export declare function rehydrateSerializedError(data?: SerializedEffectError): Error; //# sourceMappingURL=exceptions.d.ts.map