/** * Top-level property names this text declares more than once. * * Duplicates split the two readers a format-preserving write sits between: * `jsonc-parser`'s `modify` targets the FIRST property with a name, while every * consumer of the file — {@link parseJsoncText}, `JSON.parse`, the client * itself — takes the LAST. An edit aimed at the first occurrence lands under a * shadow: the bytes change, the effective value does not, and a re-apply sees * nothing left to do. Callers that would edit in place check this first and * fall back to rendering the whole file, which collapses the duplicates to the * value every reader already agreed on. */ export declare function duplicateRootKeys(text: string): string[]; /** * Parse JSON or JSONC text (tolerant of comments + trailing commas). Returns * `undefined` for empty input. Throws {@link MergeError} on a genuine syntax * error: `jsonc-parser` returns a PARTIAL value for malformed input (incomplete * braces, trailing garbage), and merging onto a partial parse would silently * drop the user's real config — so we fail closed and ask for a manual fix * instead of overwriting from a half-read file. */ export declare function parseJsoncText(text: string): unknown; export declare function isPlainObject(v: unknown): v is Record; /** * Deep-merge `incoming` (harness-generated) onto `base` (existing user config), * preserving every key that exists only in `base`. Objects merge recursively; * primitive arrays become a deduped union (base order first) so things like * `permissions.deny` accumulate instead of clobbering; for any other type * mismatch, `incoming` wins. */ export declare function deepMerge(base: unknown, incoming: unknown): unknown;