/** * OPC Agent Error Hierarchy - v1.0.0 * Custom error classes with user-friendly messages and recovery hints. */ export declare class OPCError extends Error { readonly code: string; readonly hint?: string; readonly context?: Record; readonly timestamp: number; constructor(message: string, opts?: { code?: string; hint?: string; context?: Record; cause?: Error; }); toJSON(): Record; toUserMessage(): string; } export declare class ProviderError extends OPCError { readonly provider: string; readonly statusCode?: number; constructor(provider: string, message: string, opts?: { statusCode?: number; hint?: string; cause?: Error; }); } export declare class ValidationError extends OPCError { readonly field?: string; readonly errors: string[]; constructor(message: string, errors?: string[], field?: string); } export declare class ConfigError extends OPCError { constructor(message: string, hint?: string); } export declare class ChannelError extends OPCError { readonly channelType: string; constructor(channelType: string, message: string, opts?: { hint?: string; cause?: Error; }); } export declare class PluginError extends OPCError { readonly pluginName: string; constructor(pluginName: string, message: string, opts?: { hint?: string; cause?: Error; }); } export declare class RateLimitError extends OPCError { readonly retryAfterMs?: number; constructor(message?: string, retryAfterMs?: number); } export declare class SecurityError extends OPCError { constructor(message: string, hint?: string); } export declare class TimeoutError extends OPCError { constructor(operation: string, timeoutMs: number); } /** * Wrap an unknown thrown value into an OPCError. */ export declare function wrapError(err: unknown, fallbackMessage?: string): OPCError; /** * Format error for user display (no stack traces). */ export declare function formatErrorForUser(err: unknown): string; //# sourceMappingURL=errors.d.ts.map