/** * @file retry.ts * @description Retry utilities with exponential backoff for resilient remote MCP operations */ export interface RetryOptions { /** Maximum number of retry attempts (default: 3) */ maxAttempts?: number; /** Initial delay in milliseconds (default: 1000) */ initialDelayMs?: number; /** Maximum delay in milliseconds (default: 30000) */ maxDelayMs?: number; /** Backoff multiplier (default: 2) */ backoffMultiplier?: number; /** Jitter factor 0-1 to randomize delays (default: 0.1) */ jitterFactor?: number; /** Function to determine if error is retryable (default: all errors) */ isRetryable?: (error: Error) => boolean; /** Callback on each retry attempt */ onRetry?: (attempt: number, error: Error, delayMs: number) => void; } /** * Execute an operation with retry logic and exponential backoff */ export declare function withRetry(operation: () => Promise, options?: RetryOptions): Promise; /** * Common retryable error detection for MCP operations */ export declare function isTransientError(error: Error): boolean; /** * Check if error is a connection error (requires reconnection) */ export declare function isConnectionError(error: Error): boolean; /** * Check if error is an authentication error */ export declare function isAuthError(error: Error): boolean; //# sourceMappingURL=retry.d.ts.map