import type { ClientEntry, ConfigFile } from './types.js'; export declare function configDir(): string; export declare function configPath(): string; export declare function loadConfig(): Promise; /** * Write a file atomically with restrictive permissions: write to a temp file in the * same directory, then rename it into place (rename is atomic on POSIX), so a reader * never sees a half-written file. The caller is responsible for ensuring the parent * directory exists. Shared by `saveConfig` and the pending-record store. */ export declare function atomicWriteFile(filePath: string, data: string, mode?: number): Promise; export declare function saveConfig(cfg: ConfigFile): Promise; export declare function deleteConfig(): Promise; export declare function getClient(cfg: ConfigFile, clientId?: string): ClientEntry | undefined; export declare function upsertClient(entry: ClientEntry, makeDefault?: boolean): Promise; export declare function removeClient(clientId: string): Promise; export declare function setDefault(clientId: string): Promise; /** * Resolves which client to use for an API command. Priority: * explicit clientId arg > COOLHAND_CLIENT_ID env > default_client_id config > * auto-pick if only one client exists > interactive prompt (TTY) or error. * * Prints "Client: ()" to stderr after resolution so the user always * knows which account's data they are looking at. */ export declare function resolveClient(cfg: ConfigFile, clientId?: string): Promise; /** * `resolveClient`, but tolerant of "no clients configured at all" — returns `undefined` in that * one case instead of throwing, so a `--dry-run` caller can still run fully unauthenticated. Any * other resolution error (a bad --client-id, multiple clients with no default set, etc.) * propagates exactly as `resolveClient` would throw it. * * Shared by every command whose `--dry-run` mode should work without any stored credentials * (`analyze-claude-sessions`, `map-claude-projects`, `upload-client-file`, and anything built on * `uploadClientFile`'s shared core). */ export declare function resolveClientForDryRun(cfg: ConfigFile, clientId?: string): Promise; //# sourceMappingURL=config.d.ts.map