/** * Config service — read, write, backup and rollback for Commander-managed config files. * * Supports atomic writes (tmp + rename) and auto-backup before every mutation. */ export type ConfigSource = "codex-multi-account-accounts" | "anthropic-multi-account-state" | "antigravity-accounts" | "opencode"; export type ConfigFileMeta = { source: ConfigSource; path: string; exists: boolean; parseOk: boolean; sizeBytes: number; }; export declare function isValidSource(s: string): s is ConfigSource; /** * List all known config files with metadata. */ export declare function listConfigFiles(): Promise; /** * Read and parse a config file. Throws if missing or unparseable. */ export declare function readConfig(source: ConfigSource): unknown; /** * Write config with atomic tmp+rename and auto-backup. */ export declare function writeConfig(source: ConfigSource, data: unknown): Promise<{ backupPath: string; }>; /** * Rollback config to the latest backup. */ export declare function rollbackConfig(source: ConfigSource): Promise<{ restoredFrom: string; }>; export declare class ConfigError extends Error { status: number; constructor(message: string, status: number); }