import { TaskState, RetryInfo } from '../types.js'; /** * Check if an error/output indicates rate limiting. * Prefers structured failureContext over string parsing when available. */ export declare function isRateLimitError(output: string[], error?: string, task?: TaskState): boolean; /** * Extract rate limit wait time from error message if present. * Returns milliseconds or null if not found. * Prefers quotaInfo.resetDate for precise timing when available. */ export declare function extractWaitTime(output: string[], error?: string, task?: TaskState): number | null; /** * Calculate next retry time based on retry count and task data. * Uses quotaInfo.resetDate when available for precise timing. */ export declare function calculateNextRetryTime(retryCount: number, suggestedWaitMs?: number | null, task?: TaskState): string; /** * Create retry info for a rate-limited task. * Uses structured task data for better timing when available. */ export declare function createRetryInfo(task: TaskState, reason: string, existingRetryInfo?: RetryInfo): RetryInfo; /** * Check if a task should be retried now. * Considers quota info when deciding whether to retry. */ export declare function shouldRetryNow(task: TaskState): boolean; /** * Check if a task has exceeded max retries. */ export declare function hasExceededMaxRetries(task: TaskState): boolean; /** * Check if handoff is recommended instead of retry. * Uses task data to make intelligent recommendations. */ export declare function shouldRecommendHandoff(task: TaskState): boolean; /** * Get recommended action for a rate-limited task. */ export declare function getRecommendedAction(task: TaskState): 'retry' | 'handoff' | 'wait' | 'give_up'; //# sourceMappingURL=retry-queue.d.ts.map