import type { UsageSnapshot } from './usage.js'; export interface AccountUsage { name: string; /** null when the account has no usage cache yet (never used); treated as full headroom. */ usage: UsageSnapshot | null; } export interface RotateDecision { shouldRotate: boolean; reason: string; target?: string; } export interface RotateInput { active: string; accounts: AccountUsage[]; /** Percent at which an account is considered capped (e.g. 95 for proactive rotation). */ threshold: number; /** Judged against this instant, so a window that has reset is not a cap. */ now?: number; } /** * Decide whether to rotate off the active account and to which account. Rotates * only when the active account is capped and a non-capped account exists; picks * the candidate with the most headroom. */ export declare function decideRotation(input: RotateInput): RotateDecision;