/**
 * OCR Error Classes - Local GPU Processing
 *
 * FAIL-FAST: These errors propagate immediately, no fallbacks.
 * Must match Python error categories in python/ocr_worker_local.py.
 *
 * Categories for local processing:
 *   OCR_FILE_ERROR  - File access or validation errors
 *   OCR_TIMEOUT     - Processing timeout exceeded
 *   OCR_MODEL_ERROR - Model loading or inference errors
 *   OCR_GPU_ERROR   - GPU memory or CUDA errors
 */
type OCRErrorCategory = 'OCR_FILE_ERROR' | 'OCR_TIMEOUT' | 'OCR_MODEL_ERROR' | 'OCR_GPU_ERROR';
export declare class OCRError extends Error {
    readonly category: OCRErrorCategory;
    constructor(message: string, category: OCRErrorCategory);
}
export declare class OCRTimeoutError extends OCRError {
    constructor(message: string);
}
export declare class OCRFileError extends OCRError {
    readonly filePath: string;
    constructor(message: string, filePath: string);
}
export declare class OCRModelError extends OCRError {
    constructor(message: string);
}
export declare class OCRGPUError extends OCRError {
    constructor(message: string);
}
/**
 * Classify whether an error is transient (retryable) or permanent.
 *
 * TRANSIENT errors keep document status='pending' for retry:
 *   - OCR_TIMEOUT: timeout, will likely succeed on retry
 *   - OCR_MODEL_ERROR with "No module named": missing dependency, fixed by image rebuild
 *   - OCR_GPU_ERROR: GPU OOM or CUDA error, may work after memory freed
 *   - InsufficientBalanceError: user needs to add funds, then retry
 *
 * PERMANENT errors mark document status='failed':
 *   - OCR_FILE_ERROR: file not found, corrupt file, unsupported format
 *   - Any other unclassified error: fail fast, make user investigate
 */
export declare function isTransientError(error: unknown): boolean;
/**
 * Return a human-readable transient error category label for logging.
 */
export declare function transientErrorCategory(error: unknown): string;
/**
 * Map Python error JSON to TypeScript error class.
 * FAIL-FAST: Unknown categories throw OCRError.
 */
export declare function mapPythonError(category: string, message: string, details: Record<string, unknown>): OCRError;
export {};
//# sourceMappingURL=errors.d.ts.map