import type { SwitcherDeps } from './switcher-deps.js'; export type { SwitcherDeps } from './switcher-deps.js'; export { checkPendingRestore, clearPendingRestore, savePendingRestore } from './switcher-pending.js'; export { reAuthOutcome, reAuthenticate } from './switcher-reauth.js'; export { runTemporarySwitch } from './switcher-temporary.js'; export declare function switchTo(targetEmail: string, claudeJsonPath: string, accountsDirPath: string): string; interface SwitchOutcome { /** Human-readable status line (already includes any warning). */ message: string; /** Whether the new account has a saved API key. */ hasApiKey: boolean; /** Whether the fallback flag was actually flipped during this call. */ fallbackFlipped: boolean; } /** * Switch + atomically reconcile the global fallback flag with the new * account's API-key capability, all under one `withLock`. The single-lock * invariant is what protects against this race: caller A reads `hasKey` * for account B, B becomes active, A's deferred `setFallbackEnabled(true)` * lands and the system is now `active=B / fallback=ON / B has no key`. * * Bundling the read and write here closes the window. Mirrors the lock * pattern in `bin/cli.ts:1263` (`passthrough` snapshot). */ export declare function switchToAndSyncFallback(targetEmail: string, claudeJsonPath: string, accountsDirPath: string, options: { autoFlipFallback: boolean; }): SwitchOutcome; export declare function fuzzyMatch(input: string, accounts: string[]): string[]; export declare function switchInteractive(claudeJsonPath: string, accountsDirPath: string, deps?: SwitcherDeps): Promise; export declare function addAccount(claudeBin: string, claudeJsonPath: string, accountsDirPath: string, deps?: SwitcherDeps): Promise;