export declare class VisionError extends Error { readonly code: string; readonly context?: Record; readonly recoverable: boolean; constructor(message: string, code: string, recoverable?: boolean, context?: Record); } export declare class CameraError extends VisionError { constructor(message: string, context?: Record); } export declare class ScreenCaptureError extends VisionError { constructor(message: string, context?: Record); } export declare class ModelInitializationError extends VisionError { constructor(message: string, modelName: string, context?: Record); } export declare class ProcessingError extends VisionError { constructor(message: string, context?: Record); } export declare class ConfigurationError extends VisionError { constructor(message: string, context?: Record); } export declare class APIError extends VisionError { readonly statusCode?: number; readonly endpoint?: string; constructor(message: string, statusCode?: number, endpoint?: string, context?: Record); } export interface RecoveryStrategy { canRecover(error: VisionError): boolean; recover(error: VisionError): Promise; } export declare class ErrorRecoveryManager { private strategies; private errorCounts; private readonly maxRetries; constructor(); private registerDefaultStrategies; registerStrategy(errorCode: string, strategy: RecoveryStrategy): void; handleError(error: VisionError): Promise; resetErrorCount(errorCode: string): void; resetAllCounts(): void; } export declare class CircuitBreaker { private readonly threshold; private readonly timeout; private readonly name; private failures; private lastFailureTime; private state; constructor(threshold: number, timeout: number, // 1 minute name: string); execute(operation: () => Promise): Promise; private onSuccess; private onFailure; getState(): string; reset(): void; } export declare class VisionErrorHandler { private static instance; private recoveryManager; private circuitBreakers; private constructor(); static getInstance(): VisionErrorHandler; getCircuitBreaker(name: string, threshold?: number, timeout?: number): CircuitBreaker; handle(error: any): Promise; resetCircuitBreaker(name: string): void; resetAllCircuitBreakers(): void; }