/** * Durable logical-turn state: how many resumes of this turn landed straight * back on unavailable capacity, and the persisted backoff before the next. * The count only grows the backoff; it never ends the turn. */ export declare const CODEX_CAPACITY_RECOVERY_KEY = "codexCapacityRecoveryV1"; /** * The terminal code each core waiter's former false-resumption breaker gave * a turn (one per provider wait vocabulary). Waits no longer stop, but turns * that failed with these codes remain: a human Retry of one clears the shared * recovery state (`CODEX_CAPACITY_RECOVERY_KEY`). */ export declare const SUBSCRIPTION_CORE_WAIT_EXHAUSTED_CODES: { readonly codex: "codex_capacity_recovery_exhausted"; readonly xai: "xai_capacity_recovery_exhausted"; readonly claude: "claude_capacity_recovery_exhausted"; }; export declare function isSubscriptionCoreWaitExhaustedCode(code: unknown): boolean; export type CodexCapacityRecovery = { falseResumptions: number; resumeGeneration: number | null; retryNotBefore: string | null; }; export declare function readCodexCapacityRecovery(metadata: Record | null | undefined): CodexCapacityRecovery; /** Equal jitter, 30–60 seconds initially, capped at 15 minutes. Persist the chosen deadline. */ export declare function codexFalseResumptionBackoffMs(count: number, random?: number): number; export declare function clearCodexCapacityRecovery(metadata: Record): Record;