feat: add manual onboarding flow alias

This commit is contained in:
Peter Steinberger
2026-01-22 23:07:40 +00:00
parent 370896e994
commit 814e9a500e
6 changed files with 59 additions and 47 deletions

View File

@@ -42,7 +42,8 @@ export type ProviderChoice = ChannelChoice;
export type OnboardOptions = {
mode?: OnboardMode;
flow?: "quickstart" | "advanced";
/** "manual" is an alias for "advanced". */
flow?: "quickstart" | "advanced" | "manual";
workspace?: string;
nonInteractive?: boolean;
/** Required for non-interactive onboarding; skips the interactive risk prompt when true. */

View File

@@ -12,7 +12,9 @@ import type { OnboardOptions } from "./onboard-types.js";
export async function onboardCommand(opts: OnboardOptions, runtime: RuntimeEnv = defaultRuntime) {
assertSupportedRuntime(runtime);
const authChoice = opts.authChoice === "oauth" ? ("setup-token" as const) : opts.authChoice;
const normalizedOpts = authChoice === opts.authChoice ? opts : { ...opts, authChoice };
const flow = opts.flow === "manual" ? ("advanced" as const) : opts.flow;
const normalizedOpts =
authChoice === opts.authChoice && flow === opts.flow ? opts : { ...opts, authChoice, flow };
if (normalizedOpts.nonInteractive && normalizedOpts.acceptRisk !== true) {
runtime.error(