import type { CadenceConfig } from '@manehorizons/cadence-types'; import type { CommandIO } from '../services/io.js'; import type { EditableField } from './fields.js'; import { type ConfigChange } from './apply.js'; /** Render+read one field's answer (raw line). The CLI supplies the readline impl. */ export type Ask = (field: EditableField) => Promise; /** Show the change summary and read a yes/no. The CLI supplies the readline impl. */ export type Confirm = (changes: ConfigChange[]) => Promise; /** Outcome of the wizard — the impure CLI does the actual write on `apply`. */ export type WizardResult = { status: 'noop'; } | { status: 'apply'; config: CadenceConfig; changes: ConfigChange[]; } | { status: 'invalid'; field: string; message: string; }; /** * Drive the curated wizard over `fields`, collecting answers via the injected * `ask`, then assemble → validate → diff → confirm. Pure of real I/O: all * prompting is delegated to `ask`/`confirm`, so the flow is fully testable with * scripted callbacks. The single write is the CLI's job (on `status: 'apply'`). */ export declare function runWizard(config: CadenceConfig, fields: EditableField[], io: CommandIO, hooks: { ask: Ask; confirm: Confirm; }): Promise; //# sourceMappingURL=wizard.d.ts.map