/** * writeConfig — serialise a Config object to YAML and write it to disk. * * No external yaml package required. The Config shape is flat enough that * a purpose-built emitter is both simpler and faster to load than a full * YAML library — the one list field (`security.redaction.customPatterns`) * is handled as a flow-sequence via `arrayLine` below, not a real YAML * parser. Add the `yaml` package if Config ever needs nested lists of * objects, multi-line strings, or anchors. */ import type { Config } from './config.js'; export declare function findMissingConfigKeys(cfg: Config, emittedYaml: string): string[]; /** * Serialise Config to a YAML string. * * The emitted YAML is intentionally hand-readable and round-trippable by * `js-yaml` / `yaml` if the user installs one later. */ export declare function configToYaml(cfg: Config): string; /** * Write config.yaml to `path`, creating parent directories as needed. * * FEAT-433: writes atomically via a sibling tmp file + rename rather than * truncating `path` in place. A plain truncate-then-write leaves a window * where a concurrent reader (daemon boot's `loadConfigFromDisk`, which reads * config.yaml exactly once — there is no live reload) can observe a torn * file: empty, or a YAML fragment with only some keys written. `rename()` is * atomic on the same filesystem (POSIX rename(2); Windows via Node's * MoveFileEx binding), so a concurrent reader always sees either the * complete old file or the complete new one, never a partial write. */ export declare function writeConfig(cfg: Config, path: string): void;