/** * Read a settings JSON file into a plain object; a missing file reads as `{}`. * * This read backs read-merge-write persistence, so a file it cannot parse is * about to be overwritten by the merge that follows. Discarding it silently * (what the bare `catch` here used to do) destroyed the only copy of whatever * the user had on disk. The unparseable file is now quarantined first, moved * aside with a `.why` receipt and logged at error level, and the merge starts * from `{}` as before, so the settings the caller is writing still land while * the previous file survives for inspection. */ export declare function readRawSettingsFile(path: string): Record; /** Set a dot-path within a raw settings object, creating intermediate objects. */ export declare function writeRawDotPath(root: Record, key: string, value: unknown): void; /** * Delete a dot-path leaf from a raw settings object, pruning any parent objects * it empties. Returns true when something was removed. Mirrors the shared-tier * removeSharedKey pruning so a cleared key leaves no `{ section: {} }` shell. */ export declare function deleteRawDotPath(root: Record, key: string): boolean; /** * True when a raw settings file looks like a whole-config dump the old save() * produced, every top-level default domain is present. This is the provenance * signal the read-time strip migration keys off: a full dump is the frozen- * defaults artifact and is safe to minimize; a sparse, hand-authored file * (even one whose lone key happens to equal a default) is deliberate user * intent and is left untouched. Keeps the migration conservative. */ export declare function isFrozenDefaultDump(raw: Record, defaults?: Record): boolean; /** * Drop every leaf whose value equals the shipped default at the same path, * the "frozen defaults" a whole-config write used to bake in. Keys absent from * the defaults (genuine user data we cannot classify) are kept as-is; a value * that DIFFERS from its default is kept; an object emptied by stripping is * pruned. Conservative by construction: only default-equal, defaults-known * leaves are removed. Returns the stripped object and whether anything changed. */ export declare function stripFrozenDefaults(raw: Record, defaults?: Record): { config: Record; changed: boolean; }; //# sourceMappingURL=settings-io.d.ts.map