import { runChannelsFlow } from "#setup/flows/channels.js"; import { runDeployFlow } from "#setup/flows/deploy.js"; import { runInstallVercelCliFlow } from "#setup/flows/install-vercel-cli.js"; import { runLoginFlow } from "#setup/flows/login.js"; import { runModelFlow } from "#setup/flows/model.js"; import type { Prompter } from "#setup/prompter.js"; import { type TuiPrompterRenderer } from "./tui-prompter.js"; import type { PromptCommandExtensionName } from "./prompt-commands.js"; import type { SetupFlowRenderer } from "./setup-flow.js"; import type { VercelStatusEffect } from "./vercel-status.js"; export type TuiSetupCommand = PromptCommandExtensionName; /** * Human panel titles per command. The bordered panel never repeats the echoed * command verbatim (the transcript already shows it), but it always carries a * title: flows move past their opening question (project pickers, name * prompts), and without a constant header those later questions float * unanchored in the panel. */ export declare const SETUP_FLOW_TITLES: Record; /** The prompter surface plus the working-state interrupt trap a command races against. */ export type TuiSetupCommandRenderer = TuiPrompterRenderer & Pick; export interface TuiSetupCommandInput { command: TuiSetupCommand; /** The local project the in-process dev server is running. */ appRoot: string; /** The renderer surface the TUI-native prompter drives. */ renderer: TuiSetupCommandRenderer; /** Test seam; defaults to the real TUI-native prompter over `renderer`. */ createPrompter?: (renderer: TuiPrompterRenderer) => Prompter; /** Test seam; defaults to the real setup flows. */ flows?: Partial; } /** The flow entry points the commands dispatch to, injectable for tests. */ export interface TuiSetupFlows { runInstallVercelCliFlow: typeof runInstallVercelCliFlow; runLoginFlow: typeof runLoginFlow; runModelFlow: typeof runModelFlow; runChannelsFlow: typeof runChannelsFlow; runDeployFlow: typeof runDeployFlow; } export interface TuiSetupCommandResult { message: string; /** Keep warning/error lines after the bordered panel closes. */ preserveFlowDiagnostics: boolean; /** Status-line effect of this command, when it changed link/deploy state. */ vercelEffect?: VercelStatusEffect; } /** * Runs one TUI setup command (/model, /channels, /deploy) over the * shared setup flows, asking through the TUI's own bordered panel. Never throws: * every outcome — done, cancelled, failed — folds into the returned command * result. Ctrl-C or Esc on the working spinner (no question open) aborts the * active flow, then keeps command ownership until its subprocesses and setup * stack have unwound. */ export declare function runTuiSetupCommand(input: TuiSetupCommandInput): Promise;