import { type ProviderCredentialState } from "../provider-setup.js"; import { type WizardAnswers } from "./answers.js"; /** The outcome of a wizard run: collected answers, or a clean cancellation. */ export type WizardOutcome = { readonly status: "answers"; readonly answers: WizardAnswers; readonly runProviderSetup: boolean; readonly providerSetupSecrets: Readonly>; readonly providerEnvironmentSecrets: Readonly>; readonly piApiKeyPersistenceByProvider: Readonly>; readonly credentialStates: Readonly>; /** Required selected module secrets, kept in memory until secure init persists them. */ readonly moduleSecrets: Readonly>; } | { readonly status: "cancelled"; }; /** Context supplied by the CLI after it has resolved paths and parsed `.env`. */ export interface WizardRunContext { readonly cwd: string; readonly piAuthPath?: string; /** Values parsed from the destination `.env`; shell-only values must not be supplied here. */ readonly persistedEnv?: Readonly>; } /** Ephemeral setup state retained while the CLI repairs a pre-write plan. */ export interface SetupRepairRunContext extends WizardRunContext { /** Optional focused edit step; omitted starts at Creation review. */ readonly initialStep?: number; readonly answers: WizardAnswers; readonly runProviderSetup: boolean; readonly providerSetupSecrets: Readonly>; readonly providerEnvironmentSecrets: Readonly>; readonly piApiKeyPersistenceByProvider: Readonly>; readonly credentialStates: Readonly>; readonly moduleSecrets: Readonly>; } /** * The interactive `init` wizard: a colourful, step-by-step flow that COLLECTS a * {@link WizardAnswers} and hands it back — it never writes anything. The caller * (`runInit`) does the scaffold/validate/print. Ctrl-C at any prompt unwinds * through {@link WizardCancelled} to a single clean `p.cancel`, so a cancelled * wizard leaves the folder untouched. */ export declare function runInitWizard(ctx: WizardRunContext): Promise; /** * Re-open an already reviewed setup at the Creation review. The caller keeps * ownership of the original state: Escape returns `cancelled`, and no mutable * credential or answer state is exposed unless the operator confirms a repair. */ export declare function runSetupRepairWizard(ctx: SetupRepairRunContext): Promise; export declare function guidedModelRefProblem(model: string): string | undefined; //# sourceMappingURL=run.d.ts.map