/** * Per-section `--config-json` → {@link WizardOptions} merger. * * Extracted from `packages/cleo/src/cli/commands/setup.ts` per the AGENTS.md * Package-Boundary Check: this is pure JSON-schema merging logic with no * citty / readline / browser dependencies — it belongs in core where it * can be unit-tested without spinning up the CLI and reused by any consumer * (Studio routes, programmatic API, scripts) that needs the same merge. * * The function mutates the supplied {@link WizardOptions} bag in place, * preserving the long-standing contract that the flat `args` bag takes * precedence over `configJson` values (explicit flags win). * * @task T9985 * @epic T9985 (E8-CLI-LAYERING) * @saga T9977 (SG-WORKTRUNK-OWN) * @see AGENTS.md § "Package-Boundary Check (MANDATORY)" */ import type { WizardOptions } from './wizard.js'; /** * Section IDs recognised by the built-in setup wizard. Keys outside this set * are silently dropped during merging — preserves forward-compatibility while * still preventing typos from leaking arbitrary fields into `WizardOptions`. * * Mirrors {@link createBuiltinSections} in `./index.ts`. * * @public */ export declare const WIZARD_SECTION_IDS: ReadonlySet; /** * Merge a per-section config-json bag into the flat {@link WizardOptions} bag. * * The `configJson` object maps section IDs to WizardOptions sub-objects. * Only keys recognised as WizardOptions fields are merged; unknown keys and * unrecognised section IDs are silently ignored. The flat `out` bag takes * precedence over `configJson` values (explicit CLI flags win). * * The function mutates `out` in place and also stores the original parsed bag * at `out.configJson` so sections can inspect the per-section sub-object if * they need to. * * @param parsed - Already-parsed JSON object (caller ensures this is an object). * @param out - Mutable WizardOptions being assembled — merged into here. * * @public * @task T9985 */ export declare function mergeConfigJson(parsed: Record>, out: WizardOptions): void; //# sourceMappingURL=config-json-merge.d.ts.map