This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
bootstrap/src/prompter/interface.ts
Jason Woltje cdd3ca07be feat: add TypeScript installation wizard with @clack/prompts TUI
Replace bash mosaic-init with a modern 9-stage wizard:
- SOUL.md identity, USER.md profile, TOOLS.md configuration
- Runtime detection (Claude, Codex, OpenCode) + MCP setup
- Skills catalog with categorized selection
- Quick Start and Advanced modes
- HeadlessPrompter for --non-interactive and CI usage
- ConfigService abstraction layer for future DB migration
- Bundled as single dist/mosaic-wizard.mjs via tsdown
- mosaic init now prefers wizard when Node.js is available
- 30 tests covering stages, templates, and integration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:22:44 -06:00

57 lines
1.2 KiB
TypeScript

export interface SelectOption<T = string> {
value: T;
label: string;
hint?: string;
}
export interface MultiSelectOption<T = string> extends SelectOption<T> {
selected?: boolean;
}
export interface ProgressHandle {
update(message: string): void;
stop(message?: string): void;
}
export interface WizardPrompter {
intro(message: string): void;
outro(message: string): void;
note(message: string, title?: string): void;
log(message: string): void;
warn(message: string): void;
text(opts: {
message: string;
placeholder?: string;
defaultValue?: string;
validate?: (value: string) => string | void;
}): Promise<string>;
confirm(opts: {
message: string;
initialValue?: boolean;
}): Promise<boolean>;
select<T>(opts: {
message: string;
options: SelectOption<T>[];
initialValue?: T;
}): Promise<T>;
multiselect<T>(opts: {
message: string;
options: MultiSelectOption<T>[];
required?: boolean;
}): Promise<T[]>;
groupMultiselect<T>(opts: {
message: string;
options: Record<string, MultiSelectOption<T>[]>;
required?: boolean;
}): Promise<T[]>;
spinner(): ProgressHandle;
separator(): void;
}