import { getHeader, parseRetryAfterMs } from '../shared/retry-after.js'; export type UsageLimitClassification = { kind: 'oauth-limit'; resetsAt: Date; } | { kind: 'oauth-limit-no-ts'; } | { kind: 'rate-limit-transient'; retryAfterMs?: number; } | { kind: 'credit-exhausted'; }; export declare const RATE_LIMIT_TRANSIENT_MAX_RETRY_AFTER_MS: number; export { getHeader, parseRetryAfterMs }; export declare function classifyUsageLimitError(error: Error): UsageLimitClassification | null; export interface WaitForResetOpts { resetsAt: Date; signal: AbortSignal; readToken?: () => string | undefined; } export declare function waitForReset(opts: WaitForResetOpts): Promise<'aborted' | 'timer' | 'hot-swap'>; export interface WaitForHotSwapOpts { signal: AbortSignal; readToken?: () => string | undefined; retryAfterMs?: number; } export declare function waitForHotSwap(opts: WaitForHotSwapOpts): Promise<'aborted' | 'hot-swap' | 'timer'>;