@hcmai/cli 0.3.17 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1955,7 +1955,7 @@ var init_readline = __esm({
1955
1955
 
1956
1956
  // src/index.ts
1957
1957
  import { Command } from "commander";
1958
- import { migrateLegacyProfiles } from "@hcmai/sdk";
1958
+ import { LEDGER_ONLY_FLAG, migrateLegacyProfiles } from "@hcmai/sdk";
1959
1959
 
1960
1960
  // src/package-version.ts
1961
1961
  import { readFileSync } from "fs";
@@ -7922,10 +7922,46 @@ async function deliveryGate0Command(args) {
7922
7922
  // src/commands/delivery-seed.ts
7923
7923
  init_auth_guard();
7924
7924
  import {
7925
+ APPLY_CAVEAT,
7926
+ ApplyInvariantError,
7927
+ ApplyPremiseError,
7928
+ DRY_RUN_NOTE,
7929
+ DRY_RUN_TAIL,
7930
+ DriftDetected,
7931
+ FORCE_STALE_FLAG,
7925
7932
  HcmClient as HcmClient20,
7926
7933
  INIT_EXIT_CODES,
7927
- baselineRoundPremise as baselineRoundPremise2,
7934
+ JOURNAL_STOP_KINDS,
7935
+ JOURNAL_STOP_UNKNOWN,
7936
+ Journal,
7937
+ JournalError,
7938
+ LeaseViolation,
7928
7939
  MappingError,
7940
+ PlanReadError,
7941
+ WAIVER_REPLAY,
7942
+ acquireLease,
7943
+ applyPlan,
7944
+ applyReportText,
7945
+ applyRc,
7946
+ baselineRoundPremise as baselineRoundPremise2,
7947
+ computeFingerprint,
7948
+ describeWaiver,
7949
+ enforceDriftGate,
7950
+ existingJournalStop,
7951
+ journalNote,
7952
+ judgeDrift,
7953
+ loadMapping,
7954
+ loadRecordedFingerprint,
7955
+ planVsBaselinePremise,
7956
+ buildDeliveryRun,
7957
+ buildReconciliation,
7958
+ isZeroNetwork,
7959
+ ledgerOnlySignpost,
7960
+ notAsked,
7961
+ readImportPlan,
7962
+ verifyRc,
7963
+ verifyText,
7964
+ resolveBaselineDir,
7929
7965
  discardedColumnLines,
7930
7966
  inspectRound as inspectRound3,
7931
7967
  loadExemptions,
@@ -8020,30 +8056,213 @@ function tenantOf(client3) {
8020
8056
  const t = client3?.tenantId;
8021
8057
  return t === void 0 || t === null ? "" : String(t);
8022
8058
  }
8059
+ async function authOrSignpost(args, cmd) {
8060
+ try {
8061
+ return await getActiveAuthContextFromCli(args);
8062
+ } catch (e) {
8063
+ const signpost = ledgerOnlySignpost(cmd);
8064
+ if (!signpost || !(e instanceof Error)) throw e;
8065
+ e.message += signpost;
8066
+ throw e;
8067
+ }
8068
+ }
8023
8069
  async function deliverySeedPlanCommand(args) {
8024
- const ctx = await getActiveAuthContextFromCli(args);
8070
+ const ctx = await authOrSignpost(args, "plan");
8025
8071
  const client3 = HcmClient20.fromAuthContext(ctx);
8026
8072
  process.exitCode = await runSeedPlan(args, seedClient(client3, ctx));
8027
8073
  }
8028
8074
  function seedClient(client3, ctx) {
8029
8075
  const raw = client3.raw();
8076
+ const wrap = async (send) => {
8077
+ try {
8078
+ const res = await send();
8079
+ return {
8080
+ status: res.status,
8081
+ body: res.data,
8082
+ error: "ok",
8083
+ headers: lowerCaseHeaders(res.headers)
8084
+ };
8085
+ } catch (e) {
8086
+ const res = e?.response;
8087
+ const status = res?.status ?? -1;
8088
+ return {
8089
+ status,
8090
+ body: res?.data ?? null,
8091
+ // 🔴 `-1` **不是** HTTP 状态:网络层没走通与「服务端答了个 4xx」在处置上相反,
8092
+ // 执行器正是靠这一格把「确定没建」与「不知道建没建」分开。
8093
+ error: status === -1 ? "network" : `http-${status}`,
8094
+ headers: lowerCaseHeaders(res?.headers)
8095
+ };
8096
+ }
8097
+ };
8030
8098
  return {
8031
8099
  tenantId: ctx.tenantId,
8032
- async post(p, body) {
8033
- try {
8034
- const res = await raw.post(p, body);
8035
- return { status: res.status, body: res.data, error: "ok", headers: {} };
8036
- } catch (e) {
8037
- const status = e?.response?.status ?? -1;
8038
- return {
8039
- status,
8040
- body: e?.response?.data ?? null,
8041
- error: status === -1 ? "network" : `http-${status}`,
8042
- headers: {}
8043
- };
8100
+ capabilities: DEFAULT_CAPABILITIES3,
8101
+ get: (p, params) => wrap(() => raw.get(p, { params })),
8102
+ post: (p, body) => wrap(() => raw.post(p, body))
8103
+ };
8104
+ }
8105
+ function lowerCaseHeaders(headers) {
8106
+ if (headers === null || typeof headers !== "object") return {};
8107
+ const out = {};
8108
+ for (const [k, v] of Object.entries(headers)) {
8109
+ if (typeof v === "string") out[k.toLowerCase()] = v;
8110
+ }
8111
+ return out;
8112
+ }
8113
+ var DEFAULT_CAPABILITIES3 = "default";
8114
+ async function runSeedApply(args, client3) {
8115
+ const out = args.out ?? ".";
8116
+ const tenant2 = tenantOf(client3);
8117
+ const work = seedWorkDir({ out, tenant: tenant2, work: args.work ?? null, mapping: args.mapping ?? null });
8118
+ const mappingPath = seedMappingPath({ out, tenant: tenant2, mapping: args.mapping ?? null }, work);
8119
+ let plan;
8120
+ try {
8121
+ plan = readImportPlan(work);
8122
+ } catch (e) {
8123
+ if (e instanceof PlanReadError) return premise(`\u8BA1\u5212\u8BFB\u4E0D\u56DE\u6765\uFF1A[${e.reason}] ${e.message}`, e.hint);
8124
+ throw e;
8125
+ }
8126
+ let mapping;
8127
+ try {
8128
+ mapping = loadMapping(mappingPath);
8129
+ } catch (e) {
8130
+ if (e instanceof MappingError) return premise(`\u5DE5\u4EF6\u88C5\u4E0D\u8FDB\u6765\uFF1A[${e.reason}] ${e.message}`, e.hint);
8131
+ return premise(
8132
+ `\u8BFB\u4E0D\u5230\u5DE5\u4EF6\uFF1A${mappingPath}\uFF08${e instanceof Error ? e.message : String(e)}\uFF09`,
8133
+ "`apply` \u8981\u62FF\u5DE5\u4EF6\u4E0E\u8BA1\u5212\u5BF9\u8D26\uFF08\u6A21\u578B\u6E05\u5355\u4E0E\u4E1A\u52A1\u952E\uFF09\u3002\u5DE5\u4EF6\u5199\u5728\u522B\u5904\u5C31\u7528 `--mapping <\u8DEF\u5F84>` \u6307\u8FC7\u53BB\u3002"
8134
+ );
8135
+ }
8136
+ let journal;
8137
+ try {
8138
+ journal = Journal.load(work);
8139
+ } catch (e) {
8140
+ if (e instanceof JournalError) return premise(`\u53F0\u8D26\u8BFB\u4E0D\u56DE\u6765\uFF1A[${e.reason}] ${e.message}`, e.hint);
8141
+ throw e;
8142
+ }
8143
+ if (journal.exists && !args.resume) {
8144
+ return premise(...existingJournalStop(journal.path, journal.entries.length));
8145
+ }
8146
+ for (const waiver of journal.waivers) {
8147
+ process.stderr.write(
8148
+ WAIVER_REPLAY.replace("{flag}", FORCE_STALE_FLAG).replace("{detail}", describeWaiver(waiver)) + "\n"
8149
+ );
8150
+ }
8151
+ if (plan.baseline !== null) {
8152
+ const [baselineDir] = resolveBaselineDir(out, plan.baseline.path);
8153
+ if (baselineDir !== null) {
8154
+ const round = inspectRound3(baselineDir);
8155
+ const stale = planVsBaselinePremise(
8156
+ plan.baseline.path,
8157
+ plan.baseline.roundId,
8158
+ round.roundId ?? null
8159
+ );
8160
+ if (stale !== null) return premise(stale[0], stale[1]);
8161
+ for (const p of baselineRoundPremise2(round)) {
8162
+ if (!args.execute) {
8163
+ process.stderr.write(DRY_RUN_NOTE.replace("{message}", p.message) + "\n");
8164
+ continue;
8165
+ }
8166
+ return premise(
8167
+ p.message,
8168
+ `\`${FORCE_STALE_FLAG}\` **\u4E0D\u8C41\u514D\u8FD9\u4E00\u6761** \u2014\u2014 \u5B83\u7BA1\u7684\u662F\u300C\u57FA\u7EBF\u5BF9\u4E0D\u5BF9\u5F97\u4E0A\u8FD9\u4E2A\u73AF\u5883\u300D\uFF0C\u800C\u8FD9\u4E00\u6761\u95EE\u7684\u662F\u300C\u8FD9\u4EFD\u57FA\u7EBF**\u81EA\u5DF1**\u662F\u4E0D\u662F\u4E00\u8F6E\u5B8C\u6574\u8DD1\u51FA\u6765\u7684\u300D\uFF0C\u4E24\u4EF6\u4E8B\u3002\u{1F534} \u8FD9\u4E00\u8F6E**\u4E00\u53D1\u5199\u8BF7\u6C42\u90FD\u6CA1\u6709\u53D1\u51FA\u53BB**\uFF08\u95F8\u6392\u5728\u7B2C\u4E00\u4E2A\u5199\u8BF7\u6C42\u4E4B\u524D\uFF0C\u4E5F\u6392\u5728\u62FF\u5355\u5199\u8005\u79DF\u7EA6\u4E4B\u524D\uFF09\uFF0C\u6240\u4EE5\u5E93\u91CC\u6CA1\u6709\u591A\u51FA\u4EFB\u4F55\u884C\uFF0C\u76D8\u4E0A\u4E5F\u6CA1\u6709\u7559\u4E0B\u79DF\u7EA6\u3002`
8169
+ );
8044
8170
  }
8045
8171
  }
8046
- };
8172
+ }
8173
+ const [recorded, loadCause] = loadRecordedFingerprint(out, plan.baseline?.path ?? null);
8174
+ const current = await computeFingerprint(client3);
8175
+ const verdict = judgeDrift(recorded, current, { baseline: plan.baseline?.path ?? null, loadCause });
8176
+ let note;
8177
+ try {
8178
+ note = enforceDriftGate(verdict, {
8179
+ journal,
8180
+ roundId: plan.roundId,
8181
+ forced: args.forceStale ?? false,
8182
+ dryRun: !args.execute
8183
+ });
8184
+ } catch (e) {
8185
+ if (e instanceof DriftDetected) return premise(e.verdict.message);
8186
+ if (e instanceof JournalError) {
8187
+ return premise(
8188
+ `\u653E\u884C\u8BB0\u5F55\u843D\u4E0D\u8FDB\u53F0\u8D26\uFF1A[${e.reason}] ${e.message}`,
8189
+ (e.hint ?? "") + " \u{1F534} \u8FD9\u4E00\u8F6E**\u4E00\u53D1\u5199\u8BF7\u6C42\u90FD\u6CA1\u6709\u53D1\u51FA\u53BB**\uFF08\u95F8\u6392\u5728\u7B2C\u4E00\u4E2A\u5199\u8BF7\u6C42\u4E4B\u524D\uFF09\uFF0C\u6240\u4EE5\u5E93\u91CC\u6CA1\u6709\u591A\u51FA\u4EFB\u4F55\u884C\u3002" + journalNote(journal.path)
8190
+ );
8191
+ }
8192
+ throw e;
8193
+ }
8194
+ if (note) process.stderr.write(note + "\n");
8195
+ let lease;
8196
+ try {
8197
+ lease = acquireLease(work, plan.roundId);
8198
+ } catch (e) {
8199
+ if (e instanceof LeaseViolation) return premise(`\u62FF\u4E0D\u5230\u5355\u5199\u8005\u79DF\u7EA6\uFF1A[${e.reason}] ${e.message}`, e.hint);
8200
+ throw e;
8201
+ }
8202
+ if (lease.reclaimed) process.stderr.write(`\u26A0\uFE0F \u56DE\u6536\u4E86\u4E00\u4EFD\u9648\u65E7\u79DF\u7EA6\uFF1A${JSON.stringify(lease.reclaimed)}
8203
+ `);
8204
+ let report;
8205
+ try {
8206
+ report = await applyPlan(client3, plan, mapping, journal, {
8207
+ dryRun: !args.execute,
8208
+ sample: args.sample ?? null,
8209
+ onRequestSpent: lease.heartbeatIfDue.bind(lease)
8210
+ });
8211
+ } catch (e) {
8212
+ if (e instanceof ApplyPremiseError) return premise(`\u6267\u884C\u524D\u63D0\u4E0D\u6210\u7ACB\uFF1A[${e.reason}] ${e.message}`, e.hint);
8213
+ if (e instanceof JournalError) {
8214
+ const [headline, nextStep, whenPresent] = JOURNAL_STOP_KINDS[e.reason] ?? JOURNAL_STOP_UNKNOWN;
8215
+ return premise(
8216
+ `${headline}\uFF08[${e.reason}] ${e.message}\uFF09`,
8217
+ (e.hint ?? "") + " " + nextStep + journalNote(journal.path, whenPresent)
8218
+ );
8219
+ }
8220
+ if (e instanceof ApplyInvariantError) {
8221
+ return premise(
8222
+ `\u8FD9\u4E00\u8F6E**\u505C\u5728\u8FD9\u91CC**\uFF1Akit \u7684\u5185\u90E8\u4E0D\u53D8\u91CF\u88AB\u7834\u574F\uFF08${e.name}: ${e.message}\uFF09`,
8223
+ "\u8FD9\u662F kit \u7684\u7F3A\u9677\uFF0C\u4E0D\u662F\u4F60\u7684\u6570\u636E\u95EE\u9898\u3002**\u522B\u6539\u5DE5\u4EF6\u91CD\u8BD5**\uFF0C\u628A\u8FD9\u6BB5\u4FE1\u606F\u539F\u6837\u62A5\u56DE\u6765\uFF1B\u8981\u4E0D\u8981\u7EED\u8DD1\uFF0C\u7B49\u8FD9\u4E2A\u7F3A\u9677\u4FEE\u597D\u4E4B\u540E\u518D\u8BF4\u3002" + journalNote(
8224
+ journal.path,
8225
+ "\u{1F534} **\u62A5\u56DE\u6765\u65F6\u628A\u5B83\u4E00\u8D77\u5E26\u4E0A** \u2014\u2014 \u8FD9\u4E00\u8F6E\u8D70\u5230\u54EA\u4E00\u884C\u3001\u5199\u51FA\u53BB\u4E86\u4EC0\u4E48\uFF0C\u53EA\u6709\u5B83\u8BF4\u5F97\u51FA\u3002"
8226
+ )
8227
+ );
8228
+ }
8229
+ throw e;
8230
+ } finally {
8231
+ lease.release();
8232
+ }
8233
+ process.stdout.write(applyReportText(report) + "\n");
8234
+ if (report.dryRun) process.stdout.write(DRY_RUN_TAIL + "\n");
8235
+ process.stdout.write(APPLY_CAVEAT + "\n");
8236
+ return applyRc(report);
8237
+ }
8238
+ async function deliverySeedApplyCommand(args) {
8239
+ const ctx = await authOrSignpost(args, "apply");
8240
+ const client3 = HcmClient20.fromAuthContext(ctx);
8241
+ process.exitCode = await runSeedApply(args, seedClient(client3, ctx));
8242
+ }
8243
+ async function runSeedVerify(args, client3) {
8244
+ const out = args.out ?? ".";
8245
+ const tenant2 = tenantOf(client3);
8246
+ const work = seedWorkDir({ out, tenant: tenant2, work: args.work ?? null, mapping: args.mapping ?? null });
8247
+ let delivery2;
8248
+ try {
8249
+ delivery2 = buildDeliveryRun(work);
8250
+ } catch (e) {
8251
+ if (e instanceof JournalError) return premise(`\u53F0\u8D26\u8BFB\u4E0D\u56DE\u6765\uFF1A[${e.reason}] ${e.message}`, e.hint ?? "");
8252
+ throw e;
8253
+ }
8254
+ const recon2 = isZeroNetwork(args) ? notAsked(delivery2) : await buildReconciliation(delivery2, client3);
8255
+ process.stdout.write(verifyText(delivery2, recon2));
8256
+ return verifyRc(delivery2, recon2);
8257
+ }
8258
+ async function deliverySeedVerifyCommand(args) {
8259
+ if (isZeroNetwork(args)) {
8260
+ process.exitCode = await runSeedVerify(args, null);
8261
+ return;
8262
+ }
8263
+ const ctx = await authOrSignpost(args, "verify");
8264
+ const client3 = HcmClient20.fromAuthContext(ctx);
8265
+ process.exitCode = await runSeedVerify(args, seedClient(client3, ctx));
8047
8266
  }
8048
8267
 
8049
8268
  // src/commands/delivery-triage.ts
@@ -8058,7 +8277,7 @@ import {
8058
8277
  } from "@hcmai/sdk";
8059
8278
  import { mkdirSync, readFileSync as readFileSync4, writeFileSync as writeFileSync2 } from "fs";
8060
8279
  import * as path8 from "path";
8061
- var DEFAULT_CAPABILITIES3 = "default";
8280
+ var DEFAULT_CAPABILITIES4 = "default";
8062
8281
  function premise2(message, hint) {
8063
8282
  process.stderr.write(`\u{1F534} \u524D\u63D0\u4E0D\u6210\u7ACB\uFF1A${message}
8064
8283
  `);
@@ -8108,7 +8327,7 @@ async function runTriage(args) {
8108
8327
  }
8109
8328
  const ctx = await getActiveAuthContextFromCli(args);
8110
8329
  const client3 = HcmClient21.fromAuthContext(ctx);
8111
- const probe = httpProbe3(client3.raw(), args.capabilities ?? DEFAULT_CAPABILITIES3);
8330
+ const probe = httpProbe3(client3.raw(), args.capabilities ?? DEFAULT_CAPABILITIES4);
8112
8331
  const artifactsDir = args.recon ?? new ReconLayout2(args.out ?? ".", ctx.tenantId, await computeReconSourceKey2(probe)).dir;
8113
8332
  const result = await runTriageRound(probe, artifactsDir, entriesIn);
8114
8333
  if (result.body === null) {
@@ -8856,6 +9075,20 @@ var seed = delivery.command("seed").description(
8856
9075
  "\u628A\u987E\u95EE\u624B\u4E0A\u7684**\u5BA2\u6237\u8868**\u53D8\u6210\u4EA7\u54C1\u91CC\u7684\u884C\u3002\u26A0\uFE0F \u4E0E\u9876\u5C42 `hcm import <path>` \u4E0D\u662F\u4E00\u56DE\u4E8B\uFF1A\u90A3\u4E00\u6761\u5403 DataPackage YAML\uFF08fixture \u6CE8\u5165\u5668\uFF09\uFF0C\u8FD9\u4E00\u65CF\u5403\u5BA2\u6237\u7684 Excel"
8857
9076
  );
8858
9077
  seed.command("plan").description("\u96F6\u5199\uFF1A\u8BFB\u5DE5\u4EF6 + \u6E90\u8868 + \u5200 2 \u7684\u57FA\u7EBF\uFF0C\u7B97\u51FA\u884C\u7EA7\u8BA1\u5212\u4E0E\u98CE\u9669\u6E05\u5355\u843D\u76D8\uFF08\u4E00\u53D1\u5199\u8BF7\u6C42\u90FD\u4E0D\u53D1\uFF09").option("--env <name>", "\u76EE\u6807\u73AF\u5883\u522B\u540D").option("--profile <name>", "\u8EAB\u4EFD\u6863\u6848").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--out <dir>", "recon \u4EA7\u7269\u6839\uFF08\u57FA\u7EBF\u5728 <out>/recon/<\u79DF\u6237\u6BB5>/<\u6765\u6E90\u6BB5>\uFF09", ".").option("--work <dir>", "work \u76EE\u5F55\uFF1B\u4E0D\u7ED9 \u21D2 <out>/work/<\u79DF\u6237\u6BB5>/").option("--mapping <file>", "\u5BFC\u5165\u6620\u5C04\u5DE5\u4EF6\uFF1B\u4E0D\u7ED9 \u21D2 <work>/mapping.json").option("--source-dir <dir>", "\u6E90\u8868\u6240\u5728\u76EE\u5F55\uFF08\u5DE5\u4EF6\u91CC\u5199\u7684\u662F\u76F8\u5BF9\u8DEF\u5F84\u65F6\u7528\u5B83\uFF09").option("--exemptions <file>", "\u7B7E\u5B57\u8C41\u514D\u53F0\u8D26\uFF08JSON \u6570\u7EC4\uFF09\uFF1B\u4E0D\u4F20\u4E0E\u4F20\u4E00\u4EFD\u7A7A\u53F0\u8D26\u662F\u4E24\u4E2A\u503C").action((opts) => deliverySeedPlanCommand(opts));
9078
+ seed.command("apply").description(
9079
+ "\u7167\u8BA1\u5212\u628A\u884C\u5EFA\u8FDB\u53BB\u3002**\u9ED8\u8BA4\u5E72\u8DD1**\uFF08\u4E00\u53D1\u5199\u8BF7\u6C42\u90FD\u4E0D\u53D1\uFF09\uFF0C\u8981\u771F\u5199\u5FC5\u987B\u663E\u5F0F `--execute`"
9080
+ ).option("--env <name>", "\u76EE\u6807\u73AF\u5883\u522B\u540D").option("--profile <name>", "\u8EAB\u4EFD\u6863\u6848").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--out <dir>", "recon \u4EA7\u7269\u6839\uFF08\u57FA\u7EBF\u5728 <out>/recon/<\u79DF\u6237\u6BB5>/<\u6765\u6E90\u6BB5>\uFF09", ".").option("--work <dir>", "work \u76EE\u5F55\uFF1B\u4E0D\u7ED9 \u21D2 <out>/work/<\u79DF\u6237\u6BB5>/").option("--mapping <file>", "\u5BFC\u5165\u6620\u5C04\u5DE5\u4EF6\uFF1B\u4E0D\u7ED9 \u21D2 <work>/mapping.json").option("--execute", "\u771F\u5199\u3002\u4E0D\u52A0\u5219\u662F\u5E72\u8DD1", false).option("--resume", "\u8FD9\u4E2A work \u76EE\u5F55\u5DF2\u6709\u53F0\u8D26\u65F6\u63A5\u7740\u8DD1\uFF08kit \u7EDD\u4E0D\u66FF\u4F60\u5220\u53F0\u8D26\uFF09", false).option("--sample <n>", "\u672C\u8F6E\u6700\u591A\u82B1 n \u4E2A\u5199\u8BF7\u6C42\uFF0C\u5E76\u5BF9\u5B83\u4EEC\u9010\u884C\u56DE\u8BFB\u590D\u9A8C", (v) => Number(v)).option(
9081
+ "--force-stale",
9082
+ "\u57FA\u7EBF\u4E0E\u8FD9\u4E2A\u73AF\u5883\u5BF9\u4E0D\u4E0A\u65F6\u4ECD\u7136\u653E\u884C\uFF0C\u5E76\u628A\u8FD9\u4E00\u7B14\u8BB0\u8FDB\u53F0\u8D26\u3002\u26A0\uFE0F \u4E0D\u8C41\u514D\u300C\u8BA1\u5212 vs \u57FA\u7EBF\u300D\u4E0E\u300C\u57FA\u7EBF\u662F\u4E0D\u662F\u4E00\u8F6E\u300D\u4E24\u6761\u524D\u63D0",
9083
+ false
9084
+ ).action((opts) => deliverySeedApplyCommand(opts));
9085
+ seed.command("verify").description(
9086
+ "\u628A\u4E24\u5C42\u8BC1\u636E\uFF08\u53F0\u8D26+\u8BA1\u5212 / \u5E93\u91CC\u73B0\u5728\u600E\u4E48\u6837\uFF09\u6E32\u67D3\u6210\u4E00\u9875\u53EF\u7B7E\u5B57\u7684\u7EB8\uFF0C\u518D\u7ED9\u4E00\u4E2A\u9000\u51FA\u7801\u3002\u6C14\u9699\u673A\u5668\u4E0A\u7528 `--ledger-only`\uFF1A\u53EA\u51FA\u53F0\u8D26\u90A3\u4E00\u5C42\uFF0C\u4E00\u53D1\u8BF7\u6C42\u90FD\u4E0D\u53D1"
9087
+ ).option("--env <name>", "\u76EE\u6807\u73AF\u5883\u522B\u540D").option("--profile <name>", "\u8EAB\u4EFD\u6863\u6848").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--out <dir>", "recon \u4EA7\u7269\u6839", ".").option("--work <dir>", "work \u76EE\u5F55\uFF1B\u4E0D\u7ED9 \u21D2 <out>/work/<\u79DF\u6237\u6BB5>/").option(
9088
+ LEDGER_ONLY_FLAG,
9089
+ "\u53EA\u51FA\u53F0\u8D26\u90A3\u4E00\u5C42\uFF08\u96F6\u7F51\u7EDC\uFF0C\u4E00\u53D1\u8BF7\u6C42\u90FD\u4E0D\u53D1\uFF09\u3002\u26A0\uFE0F **\u5E93\u91CC\u73B0\u5728\u600E\u4E48\u6837\uFF0C\u90A3\u4E00\u8D9F\u4E00\u4E2A\u5B57\u90FD\u6CA1\u95EE** \u2014\u2014 \u522B\u62FF\u5B83\u5F53\u9A8C\u6536\u901A\u8FC7",
9090
+ false
9091
+ ).action((opts) => deliverySeedVerifyCommand(opts));
8859
9092
  delivery.command("gate0").description(
8860
9093
  "\u96F6\u7F51\u7EDC\uFF1A\u626B\u4E00\u4EFD skill \u7684\u6B63\u6587\uFF0C\u628A\u73AF\u5883\u4E8B\u5B9E / \u672A\u767B\u8BB0\u7684\u534F\u8BAE\u5F62\u6001 / \u4EA7\u7269\u8DEF\u5F84\u6321\u5728\u6210\u7A3F\u4E4B\u5916"
8861
9094
  ).requiredOption("--skills <dir>", "\u8981\u626B\u7684 skill \u6839\u76EE\u5F55\uFF08\u6B63\u6587 + references/ \u5168\u76EE\u5F55\uFF0C\u540C\u4E00\u5224\u636E\uFF09").option("--recon <dir>", "\u57FA\u7EBF\u4EA7\u7269\u76EE\u5F55\uFF08<out>/recon/<\u79DF\u6237\u6BB5>/<\u6765\u6E90\u6BB5>\uFF09", ".").option(