/** * ~/.clustly/config — the tiny JSON state the CLI remembers between runs (build-plan 2.2: * the picker choice). Best-effort by design: remembering a choice must never break a deploy, * so reads fall back to {} and writes swallow failures. 0700 dir / 0600 file. * * Writes are read-merge-write, so two CLIs writing at once must not lose each other's keys: * the file is re-read at the moment of the write (never trusting a snapshot the caller took * earlier), the per-workspace MAPS are merged key-by-key rather than replaced, and the bytes * land via temp-file + rename so a reader never sees a half-written file. Two concurrent * deploys once dropped a `hostedAgents` entry this way, and the next redeploy of that * workspace minted a duplicate agent (2026-08-22 report). */ export interface CliConfig { /** Workspace path the builder last confirmed — pre-selected when discovery is ambiguous. */ lastWorkspace?: string; /** Workspace path → its hosted marketplace agent id (minted at first deploy, reused after). */ hostedAgents?: Record; /** Workspace path → its CLI-managed listing id (created at first publish, updated after). */ listings?: Record; /** Workspace path → the latest release id this CLI shipped (what `clustly status` reads). */ lastReleases?: Record; } /** The CLI's home dir — also where credentials land (auth/credentials.ts). The one name. */ export declare const CLUSTLY_HOME_DIR = ".clustly"; /** Owner-only modes, shared with auth/credentials.ts — the dir holds key material. */ export declare const OWNER_ONLY_DIR_MODE = 448; export declare const OWNER_ONLY_FILE_MODE = 384; export declare function readCliConfig(home: string): CliConfig; export declare function writeCliConfig(home: string, patch: CliConfig): void;