import type { AccountEntry, AccountHealth, ChatSession, GeminiSession } from "./types.js"; export declare class StateManager { /** Per-account state registry */ private accounts; /** Currently active account index */ private activeIndex; private chats; /** Register a new account entry */ addAccount(accountIndex: number, camofoxUserId: string): AccountEntry; /** Remove an account */ removeAccount(accountIndex: number): boolean; /** Get account entry */ getAccount(accountIndex: number): AccountEntry | undefined; /** Get all accounts */ getAllAccounts(): AccountEntry[]; /** Check if account exists */ hasAccount(accountIndex: number): boolean; /** Get active account index */ get activeAccountIndex(): number | null; /** Set active account */ setActiveAccount(accountIndex: number): void; /** Get active account entry */ getActiveAccount(): AccountEntry | undefined; /** Get session for account (or active account if not specified) */ getSession(accountIndex?: number): GeminiSession | null; setSession(accountIndex: number, session: GeminiSession): void; setSession(session: GeminiSession): void; clearSession(accountIndex?: number): void; /** @deprecated Use getSession(accountIndex) instead */ get session(): GeminiSession | null; set session(value: GeminiSession | null); isAuthenticated(accountIndex?: number): boolean; updateTokens(tokens: NonNullable, accountIndex?: number): void; recordRotation(accountIndex?: number): void; isRotationOverdue(accountIndex?: number): boolean; /** Record a successful operation for account */ recordSuccess(accountIndex: number): void; /** Record an error for account */ recordError(accountIndex: number): void; /** Set account health directly */ setHealth(accountIndex: number, health: AccountHealth): void; /** Get healthy accounts (healthy or degraded, not in cooldown) */ getHealthyAccounts(): AccountEntry[]; /** Get next healthy account for failover (round-robin from active) */ getNextHealthyAccount(excludeIndex?: number): AccountEntry | undefined; /** Set tab ID for account */ setTabId(accountIndex: number, tabId: string): void; /** Get tab ID for account */ getTabId(accountIndex?: number): string | null; getChat(conversationId: string): ChatSession | undefined; setChat(conversationId: string, chat: ChatSession): void; deleteChat(conversationId: string): boolean; listChats(): ChatSession[]; /** Clear all state */ clear(): void; } //# sourceMappingURL=state.d.ts.map