/**
 * retry.ts — exponential backoff helper with abort signal.
 *
 * Used by driver implementations that want to retry transient transport
 * failures (DriverInvocationError) before giving up. Pure, dependency-free.
 */
export interface RetryOptions {
    /** Total maximum attempts including the first. Default 3. */
    readonly max_attempts?: number;
    /** Initial delay in ms before the second attempt. Default 100. */
    readonly base_delay_ms?: number;
    /** Cap each delay at this many ms. Default 5000. */
    readonly max_delay_ms?: number;
    /**
     * Multiplier applied to delay after each failed attempt. Default 2 →
     * 100ms, 200ms, 400ms, 800ms, …
     */
    readonly multiplier?: number;
    /** Optional AbortSignal — abort short-circuits the retry loop. */
    readonly signal?: AbortSignal;
    /**
     * Optional predicate. When provided, only retry when shouldRetry(err) is
     * true; otherwise re-throw immediately. Default: retry every error.
     */
    readonly shouldRetry?: (err: unknown) => boolean;
}
/**
 * Run `fn` with exponential backoff. Returns the result of the first
 * successful call. If every attempt fails (or the signal aborts), throws
 * the last error.
 */
export declare function retryWithBackoff<T>(fn: () => Promise<T>, opts?: RetryOptions): Promise<T>;
//# sourceMappingURL=retry.d.ts.map