import { type AccountStorage, type RateLimitState, type ModelFamily } from "./storage"; import type { OAuthAuthDetails, RefreshParts } from "./types"; export type { ModelFamily } from "./storage"; export interface ManagedAccount { index: number; email?: string; addedAt: number; lastUsed: number; parts: RefreshParts; access?: string; expires?: number; rateLimitResetTimes: RateLimitState; lastSwitchReason?: "rate-limit" | "initial" | "rotation"; } /** * In-memory multi-account manager with sticky account selection. * * Uses the same account until it hits a rate limit (429), then switches. * Rate limits are tracked per-model-family (claude/gemini) so an account * rate-limited for Claude can still be used for Gemini. * * Source of truth for the pool is `antigravity-accounts.json`. */ export declare class AccountManager { private accounts; private cursor; private currentAccountIndex; private lastToastAccountIndex; private lastToastTime; static loadFromDisk(authFallback?: OAuthAuthDetails): Promise; constructor(authFallback?: OAuthAuthDetails, stored?: AccountStorage | null); getAccountCount(): number; getAccountsSnapshot(): ManagedAccount[]; getCurrentAccount(): ManagedAccount | null; markSwitched(account: ManagedAccount, reason: "rate-limit" | "initial" | "rotation"): void; shouldShowAccountToast(accountIndex: number, debounceMs?: number): boolean; markToastShown(accountIndex: number): void; getCurrentOrNextForFamily(family: ModelFamily): ManagedAccount | null; getNextForFamily(family: ModelFamily): ManagedAccount | null; markRateLimited(account: ManagedAccount, retryAfterMs: number, family: ModelFamily): void; removeAccount(account: ManagedAccount): boolean; updateFromAuth(account: ManagedAccount, auth: OAuthAuthDetails): void; toAuthDetails(account: ManagedAccount): OAuthAuthDetails; getMinWaitTimeForFamily(family: ModelFamily): number; getAccounts(): ManagedAccount[]; saveToDisk(): Promise; } //# sourceMappingURL=accounts.d.ts.map