/** * Single read/write path for clusters.json. * * All callers that need the raw registry (Orchestrator, id-detector, gc, * socket-discovery, CLI) go through readClustersFileSync/writeClustersFileAtomic * instead of ad-hoc JSON.parse(fs.readFileSync(...)) / fs.writeFileSync(...). * * Writes are atomic (temp file + rename) so a reader can never observe a * partially-written file, even without taking the write lock. Callers that * read-modify-write (Orchestrator._saveClusters) still need proper-lockfile * around the whole operation to avoid losing concurrent updates. */ declare function clustersFilePath(storageDir: string): string; /** Read clusters.json. Returns an empty registry if the file is missing. */ declare function readClustersFileSync(storageDir: string): unknown; /** Write clusters.json atomically through a process-scoped temporary file. */ declare function writeClustersFileAtomic(storageDir: string, data: unknown): void; declare const _default: { clustersFilePath: typeof clustersFilePath; readClustersFileSync: typeof readClustersFileSync; writeClustersFileAtomic: typeof writeClustersFileAtomic; }; export = _default;