



























@@ -1,3 +1,4 @@
1+/** CLI command orchestration for migration list, plan, and apply flows. */
12import { cancel, confirm, isCancel, log } from "@clack/prompts";
23import {
34stylePromptHint,
@@ -130,6 +131,8 @@ async function createInteractiveMigrationPlanWithAuthPrompt(
130131}
131132return initialPlan;
132133}
134+// Build the first plan without secrets, then only rescan with secrets after
135+// explicit consent so credential handling is opt-in for interactive users.
133136const includeSecrets = await confirm({
134137message: stylePromptMessage("Do you want to migrate your auth credentials as well?"),
135138initialValue: true,
@@ -334,6 +337,7 @@ function logNoCodexSelection(runtime: RuntimeEnv, plan: MigrationPlan): void {
334337runtime.log("No Codex skills or native Codex plugins selected for migration.");
335338}
336339340+/** Lists available migration providers as JSON or terse terminal rows. */
337341export async function migrateListCommand(runtime: RuntimeEnv, opts: { json?: boolean } = {}) {
338342const cfg = getRuntimeConfig();
339343ensureStandaloneMigrationProviderRegistryLoaded({ cfg });
@@ -363,6 +367,7 @@ export async function migrateListCommand(runtime: RuntimeEnv, opts: { json?: boo
363367);
364368}
365369370+/** Creates and prints a migration plan without applying it. */
366371export async function migratePlanCommand(
367372runtime: RuntimeEnv,
368373opts: MigrateCommonOptions,
@@ -387,10 +392,12 @@ export async function migratePlanCommand(
387392return plan;
388393}
389394395+/** Applies a migration non-interactively when `yes` is true. */
390396export async function migrateApplyCommand(
391397runtime: RuntimeEnv,
392398opts: MigrateApplyOptions & { yes: true },
393399): Promise<MigrationApplyResult>;
400+/** Plans interactively when needed, prompts, then applies the selected migration. */
394401export async function migrateApplyCommand(
395402runtime: RuntimeEnv,
396403opts: MigrateApplyOptions,
@@ -458,6 +465,7 @@ export async function migrateApplyCommand(
458465});
459466}
460467468+/** Default migrate command: list providers, plan, dry-run, or apply based on flags. */
461469export async function migrateDefaultCommand(
462470runtime: RuntimeEnv,
463471opts: MigrateDefaultOptions,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。