/** * Setup onboarding component. * * Walks the user through a multi-step wizard: * 1. Welcome * 2. Auth / Login prompt * 3. Mode pack selection (build / plan / fast model preset) * 4. OM pack selection (observational memory model) * 5. YOLO mode toggle * * The component renders as a settings overlay. On completion it fires * `onComplete` with the collected choices. */ import { Box } from '@mariozechner/pi-tui'; import type { Focusable, TUI } from '@mariozechner/pi-tui'; import type { ModePack, OMPack } from './packs.js'; export interface OnboardingResult { modePack: ModePack; omPack: OMPack; yolo: boolean; /** True if the user chose to log in (auth flow handled externally). */ loginRequested: boolean; loginProvider?: string; } /** Previously saved selections to pre-populate when re-running /setup. */ export interface PreviousSetupChoices { modePackId: string | null; omPackId: string | null; yolo: boolean | null; } export interface OnboardingOptions { tui: TUI; /** OAuth providers available for login. label=display name, value=provider id */ authProviders: Array<{ label: string; value: string; loggedIn: boolean; }>; /** Available mode packs (pre-filtered by provider access). */ modePacks: ModePack[]; /** Available OM packs (pre-filtered by provider access). */ omPacks: OMPack[]; /** Whether the user has any provider access (API key or OAuth) — even for providers without a built-in pack. */ hasProviderAccess: boolean; /** Previously saved choices — used to highlight current selections when re-running. */ previous?: PreviousSetupChoices; /** Called when the wizard completes. */ onComplete: (result: OnboardingResult) => void; /** Called if the user cancels the wizard (Esc on welcome). */ onCancel: () => void; /** Called when the user requests login during onboarding. */ onLogin: (providerId: string, done: () => void) => void; /** Show the model selector overlay and return the chosen model ID (or undefined on cancel). */ onSelectModel: (title: string, modeColor?: string) => Promise; } export declare class OnboardingInlineComponent extends Box implements Focusable { private tui; private options; private currentStep; private stepBox; private selectList?; private activeInlineQuestion?; private _finished; private loginRequested; private loginProvider?; private selectedModePack; private selectedOmPack; private selectedYolo; private _focused; get focused(): boolean; set focused(value: boolean); constructor(options: OnboardingOptions); get finished(): boolean; /** Programmatically cancel the wizard (e.g. on Ctrl+C). */ cancel(): void; /** Refresh the available mode packs (e.g. after a login grants new provider access). */ updateModePacks(packs: ModePack[]): void; /** Refresh the available OM packs (e.g. after a login grants new provider access). */ updateOmPacks(packs: OMPack[]): void; /** Update whether the user has any provider access (e.g. after a login). */ updateHasProviderAccess(hasAccess: boolean): void; private clearStep; private renderStep; private stepCount; private makeBox; private renderWelcome; private renderAuth; /** Text component showing details for the currently highlighted mode pack. */ private modePackDetail?; private renderModePack; private updateModePackDetail; private promptCustomPackName; private runCustomPackFlow; private renderOmPack; private runCustomOmFlow; private renderYolo; private renderDone; private collapseStep; handleInput(data: string): void; } //# sourceMappingURL=onboarding-inline.d.ts.map