/** * Adaptive retry framework for interaction tools * Provides intelligent retry logic with multiple strategies and attempt tracking */ export interface RetryAttempt { strategy: string; success: boolean; error?: string; durationMs: number; } export interface RetryResult { finalResult: T; attempts: RetryAttempt[]; successfulStrategy: string; totalDurationMs: number; } export interface RetryOptions { maxAttempts?: number; strategies?: string[]; onAttempt?: (attempt: number, strategy: string) => void; strategyTimeoutMs?: number; } /** * Execute an action with adaptive retry using multiple strategies * Tries each strategy in sequence until one succeeds or max attempts reached */ export declare function executeWithRetry(strategies: Array<{ name: string; fn: () => Promise; }>, options?: RetryOptions): Promise>; /** * Create a timeout wrapper for any async function */ export declare function withTimeout(fn: () => Promise, timeoutMs: number, timeoutError?: string): Promise; /** * Execute with exponential backoff retry * For operations that might succeed on retry due to transient failures */ export declare function executeWithBackoff(fn: () => Promise, options?: { maxAttempts?: number; initialDelayMs?: number; maxDelayMs?: number; backoffMultiplier?: number; }): Promise;