/** * Maximum number of retries for streaming operations. */ export declare const STREAMING_MAX_RETRIES = 3; /** * Wraps an async function to handle Galileo HTTP exceptions for retry. * Re-throws retryable exceptions (404, 408, 429, >= 500) so they can be handled by retry logic. * Re-throws non-retryable exceptions (e.g., 400, 422) so tasks fail properly instead of silently succeeding. * @param fn - The async function to wrap. * @returns A wrapped function that handles HTTP exceptions. */ export declare function handleGalileoHttpExceptionsForRetry Promise>(fn: T): T; /** * Wraps an async function with exponential backoff retry logic. * Only retries errors that are determined to be retryable (404, 408, 429, >= 500). * Non-retryable errors (e.g., 400, 422) fail immediately without retries. * @param fn - The async function to wrap with retry logic. * @param taskId - Optional task ID for logging purposes. * @param maxRetries - Maximum number of retries. Defaults to STREAMING_MAX_RETRIES. * @param onRetry - Optional callback called on each retry attempt. * @returns A promise that resolves with the function result after retries. */ export declare function withRetry(fn: () => Promise, taskId?: string, maxRetries?: number, onRetry?: (error: Error) => void): Promise;