/** * Interactive install wizard. * * Pure readline — no extra deps. Each prompt is decomposed into a small * `Prompt` so the test can drive the wizard with a scripted Iterable of * answers. Production code wires the prompts to stdin. */ import type { SupportedPlatform } from './platform.js'; export interface WizardDefaults { dataDir: string; uiPort: number; upnpEnabled: boolean; /** Values a command-line flag already supplied: the wizard does not ask for them again. */ given?: { dataDir?: boolean; uiPort?: boolean; upnpEnabled?: boolean; }; /** * The public IPv4 an interface holds (`publicInterfaceAddress`), when one does: the machine is * reached directly (a VPS), so there is no router to ask about UPnP. */ publicInterfaceIp?: string | null; } export interface WizardAnswers { dataDir: string; uiPort: number; upnpEnabled: boolean; } export declare const DEFAULT_UI_PORT = 8765; export declare function defaultsForPlatform(platform: SupportedPlatform): WizardDefaults; /** * Drive the wizard with a function that returns the next user answer for * a prompt. Used both by the readline-backed `runWizard` and by tests. */ export declare function runWizardWith(defaults: WizardDefaults, ask: (label: string, fallback: string) => Promise, say?: (line: string) => void): Promise; /** Production entrypoint — drives the wizard over stdin/stdout. */ export declare function runWizard(defaults: WizardDefaults): Promise;