/**
 * Retry Handler - Error recovery and retry logic
 *
 * Handles:
 * - Network error detection
 * - Token expiration handling
 * - Quota management
 * - Account switching
 */
import { CLIProxyProvider } from '../types';
import { CompositeTierConfig } from '../../config/unified-config-types';
/**
 * Check if error is network-related
 */
export declare function isNetworkError(error: Error): boolean;
/**
 * Handle network error with user-friendly message
 */
export declare function handleNetworkError(_error: Error): never;
/**
 * Handle token expiration
 */
export declare function handleTokenExpiration(provider: CLIProxyProvider, verbose: boolean): Promise<void>;
/**
 * Handle quota check and auto-switching for providers with quota-based rotation.
 */
export declare function handleQuotaCheck(provider: CLIProxyProvider): Promise<void>;
/** Error patterns indicating provider failure */
export declare const PROVIDER_ERROR_PATTERNS: RegExp[];
/** Detect which composite tier failed from stderr output */
export declare function detectFailedTier(stderr: string, tiers: {
    opus: CompositeTierConfig;
    sonnet: CompositeTierConfig;
    haiku: CompositeTierConfig;
}): 'opus' | 'sonnet' | 'haiku' | null;
/** Check if Claude exit indicates provider error (vs normal user exit) */
export declare function isProviderError(exitCode: number, stderr: string): boolean;
//# sourceMappingURL=retry-handler.d.ts.map