/** * Smart Retry Engine * * Core retry logic with multiple strategies and adaptive behavior. */ import type { RetryConfig, RetryResult, RetryRecommendation } from './types.js'; /** * Test execution function type */ export type TestExecutor = () => Promise; /** * Smart Retry Engine */ export declare class SmartRetryEngine { private config; constructor(config?: Partial); /** * Execute a test with retry logic */ executeWithRetry(testId: string, executor: TestExecutor, context?: { testName?: string; gate?: string; flakinessScore?: number; patternType?: string; }): Promise; /** * Get retry recommendation based on flakiness and pattern */ getRetryRecommendation(params: { flakinessScore?: number; patternType?: string; errorType?: string; errorCount?: number; recentAttempts?: number; }): RetryRecommendation; /** * Calculate delay before retry attempt */ private calculateDelay; /** * Get effective strategy based on context */ private getEffectiveStrategy; /** * Calculate intelligent delay based on common patterns */ private getIntelligentDelay; /** * Apply jitter to delay to avoid thundering herd */ private applyJitter; /** * Check if error type is non-retriable */ private isNonRetriableError; /** * Check if error is an assertion failure */ private isAssertionError; /** * Check if error is a timeout */ private isTimeoutError; /** * Delay for specified milliseconds */ private delay; /** * Update retry configuration */ updateConfig(config: Partial): void; /** * Get current configuration */ getConfig(): RetryConfig; } /** * Create a smart retry engine */ export declare function createSmartRetryEngine(config?: Partial): SmartRetryEngine;