import type { IMatrixContext } from '../engine/core/IMatrixContext';
import type { IRrRequestOptions } from '../engine/remoting/RequestReply';
export interface IRetryOptions {
    maxAttempts?: number;
    baseDelayMs?: number;
    maxDelayMs?: number;
    jitter?: boolean;
    shouldRetry?: (err: Error) => boolean;
}
/**
 * Creates a retry wrapper for a function that might fail.
 * Uses unknown[] for maximum type safety while preserving function signature inference.
 */
export declare function withRetry<TArgs extends unknown[], TResult>(fn: (...args: TArgs) => Promise<TResult>, options?: IRetryOptions): (...args: TArgs) => Promise<TResult>;
/**
 * Creates a retry-enabled version of RequestReply.execute.
 */
export declare function createRetryingRR(context: IMatrixContext, options?: IRetryOptions): <TReq, TRes>(childMount: string, op: string, params: TReq, rrOptions?: IRrRequestOptions | undefined) => Promise<TRes>;
//# sourceMappingURL=retry.d.ts.map