export declare const DEFAULT_CURSOR_AFFINITY_KEY = "cursor-cli-oauth-default";
export type CursorAffinityAccountSlot = {
    name: string;
    blockedUntil?: number;
    blockReason?: string;
};
export type CursorAffinityOptions = {
    affinityKey?: string;
    sessionId?: string;
    pinnedAccount?: string;
    /** The user's account order (senpi#3591): tried after the pin, before HRW. */
    accountOrder?: readonly string[];
    now?: number;
};
export declare class AllCursorAccountsBlockedError extends Error {
    readonly soonestUnblockAt: number | undefined;
    constructor(soonestUnblockAt: number | undefined);
}
export declare function getAffinityKey(options: Pick<CursorAffinityOptions, "affinityKey" | "sessionId">): string;
/** Orders accounts by descending highest-random-weight score for the session key. */
export declare function rendezvousOrder<T extends CursorAffinityAccountSlot>(key: string, accounts: readonly T[]): T[];
/** Clears elapsed temporary blocks while retaining auth failures until the account logs in again. */
export declare function clearExpiredBlocks<T extends CursorAffinityAccountSlot>(accounts: readonly T[], now?: number): T[];
/** Selects the pinned account or the first available account in session-stable HRW order. */
export declare function selectAccount<T extends CursorAffinityAccountSlot>(accounts: readonly T[], options?: CursorAffinityOptions): T;
//# sourceMappingURL=affinity.d.ts.map