/** * Interactive System One setup: `cleo decide config` on a TTY, and the * `system-one` section of `cleo setup`. * * Steps: pick the provider (layahost first, recommended) → name the profile * (Enter keeps `default`; the profile is `/`, T12733) → use * the provider's default URL (stored as `default`) or enter an override → * the API key through {@link WizardIO.secret} (masked) → probe * `GET /v1/models` → pick the model (layahost defaults to its routing model) * → save (probes again and re-detects capabilities; other profiles are kept) * → when another profile is active, whether to make this one active → * optionally one smoke-test question through the saved profile. * * All logic lives here; the IO is injected, so tests drive it with a stub and * the CLI with readline. Nothing this module returns or prints carries the * key: only the masked last-4 preview from the saved summary. * * @task T12713 * @task T12733 * @epic T12486 */ import type { WizardIO } from '../setup/wizard.js'; import { type DecideAskResult, type DecideConfigureResult } from './operations.js'; /** How many times the wizard re-asks for a URL or model name before giving up. */ export declare const DECIDE_WIZARD_MAX_ATTEMPTS = 3; /** State the setup smoke test judges. */ export declare const DECIDE_SMOKE_STATE = "CLEO setup check: the System One provider was just configured."; /** The setup smoke test's yes/no question; the answer should be "yes". */ export declare const DECIDE_SMOKE_QUESTION = "The text says a provider was configured."; /** Options for {@link runDecideWizard}. */ export interface DecideWizardOptions { /** `fetch` for the model probe and the save-time probe; tests inject a stub. */ readonly fetch?: typeof fetch; /** Deadline for each probe, ms. Default {@link DEFAULT_DECIDE_PROBE_TIMEOUT_MS}. */ readonly timeoutMs?: number; /** Smoke-test runner. Default: one `decide ask` through the saved settings. */ readonly smoke?: () => Promise; /** Project root for the smoke test's audit line. Default: the resolved project root. */ readonly projectRoot?: string; } /** Result of {@link runDecideWizard}. Secret-free. */ export interface DecideWizardResult { /** Whether settings were saved. */ readonly configured: boolean; /** One-line human summary. */ readonly summary: string; /** The saved settings, when saved. */ readonly config?: DecideConfigureResult; /** The smoke-test answer, when one ran. */ readonly smoke?: DecideAskResult; } /** * Run the interactive System One setup. * * @param io - Prompt surface. The key is read with {@link WizardIO.secret}. * @param opts - Injectable `fetch`, deadline and smoke runner. * @returns Whether settings were saved, a summary and the secret-free results. * @throws {DecideCredentialsError} Only when the save itself rejects the settings. */ export declare function runDecideWizard(io: WizardIO, opts?: DecideWizardOptions): Promise; //# sourceMappingURL=wizard.d.ts.map