/**
 * WIZ.3 + WAB-SUB.3 — interactive chat-setup wizard. Implements
 * `docs/tasks/WIZ.1-flow.md` storyboard with the WAB-SUB.3 mode-choice
 * extension: detection → mode choice (api | subscription) → mode-specific
 * alias setup → chat_agent.yaml authoring → dry-run preview → confirm →
 * atomic write with backup → outro.
 *
 * Audit invariants:
 *   - No write without explicit `confirm()` → true after dry-run preview.
 *   - `isCancel()` checked after EVERY prompt; cancel path emits a "nothing
 *     written" message and exits clean.
 *   - Secrets prompted via `password()` (masked) IN api mode only; subscription
 *     mode never prompts for a key. Dry-run preview shows `=…<last4>` only.
 *   - Both `mode=api` and `mode=subscription` are first-class choices —
 *     NEITHER pre-selected as `initialValue` (WAB-SUB.3 spec criterion A).
 *   - Existing config (idempotency branch) treats BOTH modes as valid;
 *     Replace walks the mode-choice prompt again.
 *   - `OPENSQUID_NO_BILLED_CALLS=1` skips step (f) entirely.
 *   - `~/.opensquid/setup-chat.lock` via proper-lockfile prevents concurrent runs.
 *
 * Writes delegated to `./chat_actions_writers.ts`; prompt sub-flows to
 * `./chat_actions_prompts.ts`. This file orchestrates only.
 */
import { type ChatDaemonState } from './chat_state.js';
export interface WizardDeps {
    /** Override for OPENSQUID_HOME (test injection). Defaults to env var. */
    opensquidHome?: string;
    /** Override for ~/.loop/.env path. */
    envPath?: string;
    /** Exit code sink — tests assert against this without process.exit. */
    setExitCode?: (code: number) => void;
    /**
     * WIZ.5 `--dry-run`. Wizard walks prompts + renders the plan, then exits
     * WITHOUT calling `executePlan`. The dry-run preview is the deliverable;
     * no files are written, no backups created. Final confirm prompt is
     * skipped (we wouldn't honor a `true` answer anyway).
     */
    dryRun?: boolean;
    /**
     * WIZ.5 `--replace`. Skips the existing-config (idempotency) branch and
     * always proceeds to author fresh config — overwriting any existing
     * fast_chat alias. Backup of the prior models.yaml is still made.
     */
    replace?: boolean;
    /** T-FIX-FIRST-RUN-SETUP A: project-identity probe seams (test injection).
     *  Default process.cwd()/process.env — same pattern as opensquidHome/envPath. */
    projectCwd?: string;
    projectEnv?: NodeJS.ProcessEnv;
}
export interface WizardResult {
    outcome: 'completed' | 'aborted' | 'no_changes' | 'concurrent_lock' | 'dry_run';
    written?: string[];
}
export declare function runChatSetupWizard(deps?: WizardDeps): Promise<WizardResult>;
export type { ChatDaemonState };
export { runChatSetupWizard as runWizard };
//# sourceMappingURL=chat_actions.d.ts.map