/** * Shared provider-failure retry helper: wraps generation calls (harness or * --self) so transient provider errors (network_error, timeouts, 5xx, * rate limits) are retried with backoff, while permanent failures (auth, * model-not-found, billing) fail fast on the first attempt. Any successful * call returns immediately - the failure count never carries over. */ export declare const RETRY_ATTEMPTS = 3; export declare const RETRY_DELAYS_MS: number[]; export declare function isTransientProviderError(err: unknown): boolean; /** * Runs `fn`, retrying up to RETRY_ATTEMPTS total tries when it throws a * transient provider error (see isTransientProviderError), sleeping * RETRY_DELAYS_MS between attempts. A success returns at once; permanent * errors and exhausted attempts rethrow the last error. * * `onAttempt` fires before each try with the 1-based attempt number, so * callers can mutate their closure between attempts (e.g. IMP-913: warn the * model that a previous crashed attempt may have already created items). */ export declare function withProviderRetry(fn: () => Promise, log?: (text: string) => void, onAttempt?: (attempt: number) => void): Promise;