/**
 * Retry Strategy Utility
 *
 * Reusable exponential-backoff retry wrapper extracted from
 * scattered retry logic in glmt-proxy and binary/downloader.
 *
 * Usage:
 *   const data = await withRetry(() => fetch(url), { maxRetries: 3, baseDelayMs: 100 });
 */
/** Configuration options for retry behavior */
export interface RetryOptions {
    /** Maximum number of retry attempts (default: 3) */
    maxRetries: number;
    /** Base delay in ms for the first retry (default: 1000) */
    baseDelayMs: number;
    /** Upper bound for the computed backoff delay. Note: server-provided `retryAfter` (from RetryableError) takes precedence and may exceed this cap. */
    maxDelayMs?: number;
    /** Multiplier applied per attempt (default: 2). Values <1 produce degrowth. */
    backoffMultiplier?: number;
    /** Override the default retryability check */
    retryableCheck?: (error: unknown) => boolean;
    /** Callback fired before each retry. Errors thrown by this callback are swallowed to prevent aborting the retry loop. */
    onRetry?: (error: Error, attempt: number) => void;
}
/**
 * Execute `fn` with automatic retries on retryable failures.
 *
 * Retryability defaults to checking for `RetryableError` instances
 * and CCSError with `recoverable === true`. Override with `retryableCheck`.
 *
 * @param fn - The async function to execute
 * @param options - Retry configuration
 * @returns The resolved value from `fn`
 * @throws The last error encountered after exhausting retries
 */
export declare function withRetry<T>(fn: () => Promise<T>, options: RetryOptions): Promise<T>;
//# sourceMappingURL=retry-strategy.d.ts.map