import type Anthropic from '@anthropic-ai/sdk'; import type { ProviderEvent } from '../../../provider.js'; import type { AuthMode, RunTurnInput } from '../types.js'; export { TWO_HOURS_MS, RATE_LIMIT_TRANSIENT_MAX_RETRIES, RATE_LIMIT_RETRY_MAX_WAIT_MS, } from './retry-constants.js'; export type { RetryTierContext, UsageLimitWaitResult } from './retry-context.js'; export interface RetryLayerOptions { client: Anthropic; authMode: AuthMode; initSessionId: string; baseUrl?: string; tokenRefresher?: () => Promise; autoResumeOnUsageLimit: boolean; surface?: string; } export declare class RetryLayer { private _client; private readonly _authMode; private readonly initSessionId; private readonly baseUrl?; private readonly tokenRefresher?; private readonly autoResumeOnUsageLimit; private readonly surface?; private refreshPromise; private usageLimitWaitPromise; private credentialSnapshotStale; constructor(opts: RetryLayerOptions); get client(): Anthropic; get authMode(): AuthMode; private rotateHeaders; private tierContext; forceClientRefresh(): Promise<{ accountId: string; swapped: boolean; } | null>; turnWithRetries(runInput: RunTurnInput, isClosed: () => boolean): AsyncGenerator; }