@hcmai/cli 0.26.3 → 0.27.1
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/README.md +22 -0
- package/dist/index.js +69 -6
- package/dist/index.js.map +1 -1
- package/dist/skills/manifest.json +14 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -132,3 +132,25 @@ Run these commands from the bound local workspace. Plan files require an existin
|
|
|
132
132
|
outside its real physical root and are created exclusively; use a new filename each time.
|
|
133
133
|
For API boundaries, field-policy failures and recovery, see the
|
|
134
134
|
[workspace workflow](../../docs/how-to/agent-workspace-workflow.md#规模辅助材料清理与受检封箱).
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### Standard release lifecycle and scopes (ADR-464)
|
|
138
|
+
|
|
139
|
+
These commands require a Core build that implements ADR-464. They are standard product capabilities.
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
hcm workspace release-plan 2.0.0 --policy-version RUNTIME_ASSETS_V2 --plan /tmp/release-2.json
|
|
143
|
+
hcm workspace release --plan /tmp/release-2.json
|
|
144
|
+
hcm workspace cancel-release <releaseId> --reason 'Unused candidate'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
New previews default to `RUNTIME_ASSETS_V2`. Unknown paths block publication. Choose
|
|
148
|
+
`ALL_WORKSPACE_PATCH_FILES_V1` explicitly to retain the previous all-patch behavior.
|
|
149
|
+
The selected policy is saved with the reviewed digest and sent unchanged for checked creation;
|
|
150
|
+
an older Core ignoring V2 is rejected before saving an executable plan. Existing V1 plans remain compatible.
|
|
151
|
+
|
|
152
|
+
Cancellation requires both workspace ownership and configuration administrator authorization.
|
|
153
|
+
Any deployment/MR history, package installation/recovery dependency or unknown evidence blocks it.
|
|
154
|
+
Release bytes, audit and version reservation remain; cancelled releases cannot be deployed, merged,
|
|
155
|
+
or used for a new workspace. Cancellation disables automatic retries. A lost response remains UNKNOWN;
|
|
156
|
+
read the original release and its cancellation audit before deciding whether to retry that exact ID.
|
package/dist/index.js
CHANGED
|
@@ -2253,6 +2253,12 @@ import {
|
|
|
2253
2253
|
workspaceDeliveryError,
|
|
2254
2254
|
workspaceObjectActionBase
|
|
2255
2255
|
} from "@hcmai/sdk";
|
|
2256
|
+
var RELEASE_POLICY_V1 = "ALL_WORKSPACE_PATCH_FILES_V1";
|
|
2257
|
+
var RELEASE_POLICY_V2 = "RUNTIME_ASSETS_V2";
|
|
2258
|
+
function releasePolicy(value) {
|
|
2259
|
+
if (value === RELEASE_POLICY_V1 || value === RELEASE_POLICY_V2) return value;
|
|
2260
|
+
throw workspaceDeliveryError("RELEASE_SCOPE_UNSUPPORTED", "\u4E0D\u652F\u6301\u7684\u53D1\u5E03\u8303\u56F4\uFF1B\u8BF7\u9009\u62E9 ALL_WORKSPACE_PATCH_FILES_V1 \u6216 RUNTIME_ASSETS_V2\uFF0C\u672A\u6267\u884C\u5C01\u7BB1\u3002");
|
|
2261
|
+
}
|
|
2256
2262
|
async function connect(args) {
|
|
2257
2263
|
const root = path.resolve(args.dir ?? ".");
|
|
2258
2264
|
let binding;
|
|
@@ -2356,11 +2362,17 @@ async function workspaceCleanupCommand(args) {
|
|
|
2356
2362
|
}
|
|
2357
2363
|
async function workspaceReleasePlanCommand(version2, args) {
|
|
2358
2364
|
return command(args, async (target) => {
|
|
2365
|
+
const policyVersion = releasePolicy(args.policyVersion ?? RELEASE_POLICY_V2);
|
|
2359
2366
|
const action = await workspaceObjectActionBase(target.client.raw(), target.workspaceKey);
|
|
2360
|
-
const
|
|
2367
|
+
const form = { version: text(version2, "version"), ...policyVersion === RELEASE_POLICY_V2 ? { policyVersion } : {} };
|
|
2368
|
+
const response = await target.client.raw().post(`${action}/release-plan`, { form });
|
|
2361
2369
|
const plan = readReleasePlan(workspaceActionPayload(response.data), target.workspaceKey, version2);
|
|
2370
|
+
if (plan.policyVersion !== policyVersion) throw workspaceDeliveryError(
|
|
2371
|
+
"RELEASE_SCOPE_MISMATCH",
|
|
2372
|
+
"Core \u6CA1\u6709\u6309\u9009\u5B9A\u7684\u53D1\u5E03\u8303\u56F4\u751F\u6210\u8BA1\u5212\uFF1B\u8BF7\u5347\u7EA7\u652F\u6301\u8BE5\u7B56\u7565\u7684 Core \u540E\u91CD\u65B0\u9884\u68C0\uFF0C\u672C\u6B21\u672A\u4FDD\u5B58\u8BA1\u5212\u3002"
|
|
2373
|
+
);
|
|
2362
2374
|
if (args.plan) await savePlan("workspace-release-plan", plan, target, args.plan);
|
|
2363
|
-
process.stderr.write("\u53D1\u5E03\u9884\u68C0\
|
|
2375
|
+
process.stderr.write(policyVersion === RELEASE_POLICY_V2 ? "\u53D1\u5E03\u9884\u68C0\u4F7F\u7528\u8FD0\u884C\u8D44\u4EA7 V2\uFF0C\u672A\u77E5\u8DEF\u5F84\u4F1A\u963B\u6B62\u53D1\u5E03\u3002\u6838\u5BF9 files/deletedPaths \u540E\uFF0C\u7528\u539F\u8BA1\u5212\u6267\u884C workspace release\u3002\n" : "\u53D1\u5E03\u9884\u68C0\u4F7F\u7528\u517C\u5BB9 V1 \u5168\u6587\u4EF6 patch \u89C4\u5219\uFF1B\u672A\u77E5\u7528\u9014\u6587\u4EF6\u4ECD\u53EF\u80FD\u8FDB\u5165\u5236\u54C1\u3002\u6838\u5BF9 files/deletedPaths \u4E0E classification \u540E\uFF0C\u7528\u539F\u8BA1\u5212\u6267\u884C workspace release\u3002\n");
|
|
2364
2376
|
writeResult(plan, args);
|
|
2365
2377
|
process.exitCode = 0;
|
|
2366
2378
|
});
|
|
@@ -2373,17 +2385,55 @@ async function workspaceReleaseCommand(args) {
|
|
|
2373
2385
|
workspaceKey: target.workspaceKey,
|
|
2374
2386
|
version: plan.version,
|
|
2375
2387
|
description: args.description ?? "",
|
|
2376
|
-
planDigest: plan.planDigest
|
|
2388
|
+
planDigest: plan.planDigest,
|
|
2389
|
+
...plan.policyVersion === RELEASE_POLICY_V2 ? { policyVersion: plan.policyVersion } : {}
|
|
2377
2390
|
};
|
|
2378
2391
|
const response = await target.client.raw().post("/api/models/TenantExtensionRelease/action/create-checked", { form }, { __skipRetry: true });
|
|
2379
2392
|
const result = workspaceActionPayload(response.data);
|
|
2380
|
-
if (typeof result.id !== "string" || !result.id.trim() || result.workspaceKey !== target.workspaceKey || result.version !== plan.version) {
|
|
2393
|
+
if (typeof result.id !== "string" || !result.id.trim() || result.workspaceKey !== target.workspaceKey || result.version !== plan.version || plan.policyVersion === RELEASE_POLICY_V2 && result.policyVersion !== plan.policyVersion) {
|
|
2381
2394
|
throw workspaceDeliveryError("INVALID_WORKSPACE_RELEASE_RECEIPT", "create-checked \u56DE\u6267\u4E0E\u53D7\u68C0\u7A7A\u95F4\u6216\u7248\u672C\u4E0D\u7B26\uFF1B\u5C01\u7BB1\u7ED3\u679C\u672A\u77E5\uFF0C\u4E0D\u80FD\u81EA\u52A8\u91CD\u8BD5\u3002");
|
|
2382
2395
|
}
|
|
2383
2396
|
writeResult(result, args);
|
|
2384
2397
|
process.exitCode = 0;
|
|
2385
2398
|
});
|
|
2386
2399
|
}
|
|
2400
|
+
async function workspaceCancelReleaseCommand(releaseId, args) {
|
|
2401
|
+
return command(args, async (target) => {
|
|
2402
|
+
if (!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(releaseId))
|
|
2403
|
+
throw new Error("releaseId \u5FC5\u987B\u662F\u5408\u6CD5 UUID\uFF1B\u672A\u6267\u884C\u53D6\u6D88\u3002");
|
|
2404
|
+
const reason = text(args.reason, "--reason").trim();
|
|
2405
|
+
if (reason.length > 1800) throw new Error("\u53D6\u6D88\u539F\u56E0\u4E0D\u80FD\u8D85\u8FC7 1800 \u5B57\uFF1B\u672A\u6267\u884C\u53D6\u6D88\u3002");
|
|
2406
|
+
const url = `/api/models/TenantExtensionRelease/${releaseId}`;
|
|
2407
|
+
const before = workspaceActionPayload((await target.client.raw().get(url)).data);
|
|
2408
|
+
if (before.id !== releaseId || before.workspaceKey !== target.workspaceKey)
|
|
2409
|
+
throw new Error("release \u4E0D\u5C5E\u4E8E\u5F53\u524D workspace\uFF0C\u672A\u6267\u884C\u53D6\u6D88\u3002");
|
|
2410
|
+
let result;
|
|
2411
|
+
try {
|
|
2412
|
+
result = workspaceActionPayload((await target.client.raw().post(
|
|
2413
|
+
`${url}/action/cancel-release`,
|
|
2414
|
+
{ form: { reason } },
|
|
2415
|
+
{ __skipRetry: true }
|
|
2416
|
+
)).data);
|
|
2417
|
+
} catch (error) {
|
|
2418
|
+
if (error?.response) throw error;
|
|
2419
|
+
throw new CliError3({
|
|
2420
|
+
code: CliErrorCode2.NETWORK_ERROR,
|
|
2421
|
+
message: "\u53D6\u6D88\u672A\u6536\u5230\u53EF\u786E\u8BA4\u56DE\u6267\uFF0C\u7ED3\u679C UNKNOWN\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002",
|
|
2422
|
+
cause: error,
|
|
2423
|
+
context: {
|
|
2424
|
+
reason: "RELEASE_CANCELLATION_UNKNOWN",
|
|
2425
|
+
releaseId,
|
|
2426
|
+
commitState: "UNKNOWN",
|
|
2427
|
+
nextStep: "\u6309\u539F releaseId \u56DE\u8BFB\u72B6\u6001\u53CA\u53D6\u6D88\u5BA1\u8BA1\uFF1B\u4FDD\u7559\u539F\u539F\u56E0\uFF0C\u786E\u8BA4\u540E\u4EC5\u5BF9\u539F ID \u91CD\u8BD5\uFF0C\u4E0D\u80FD\u521B\u5EFA\u66FF\u4EE3\u7248\u672C\u6216\u5220\u9664\u5236\u54C1\u3002"
|
|
2428
|
+
}
|
|
2429
|
+
});
|
|
2430
|
+
}
|
|
2431
|
+
if (result.id !== releaseId || result.workspaceKey !== target.workspaceKey || result.status !== "CANCELLED" || result.commitState !== "COMMITTED" || typeof result.alreadyCancelled !== "boolean" || typeof result.reason !== "string" || !result.reason.trim() || !result.cancelledBy || result.contentHash !== before.contentHash || !Array.isArray(result.postCommitErrors))
|
|
2432
|
+
throw workspaceDeliveryError("INVALID_RELEASE_CANCELLATION_RECEIPT", "\u53D6\u6D88\u56DE\u6267\u4E0D\u5B8C\u6574\uFF1B\u7ED3\u679C\u672A\u77E5\uFF0C\u8BF7\u6309\u539F ID \u6838\u5BF9\u72B6\u6001\u53CA\u53D6\u6D88\u5BA1\u8BA1\uFF0C\u4E0D\u81EA\u52A8\u91CD\u8BD5\u3002");
|
|
2433
|
+
writeResult(result, args);
|
|
2434
|
+
process.exitCode = result.postCommitErrors.length ? 3 : 0;
|
|
2435
|
+
});
|
|
2436
|
+
}
|
|
2387
2437
|
function readCleanupPlan(result, workspaceKey) {
|
|
2388
2438
|
if (result.protocolVersion !== 1 || result.workspaceKey !== workspaceKey || result.complete !== true || result.ownerDeclaration !== true || result.eligibilityBasis !== "ownerDeclaration" || result.referenceCoverage !== "knownConsumersOnly" || typeof result.canExecute !== "boolean") {
|
|
2389
2439
|
throw workspaceDeliveryError("INVALID_WORKSPACE_CLEANUP_PLAN", "\u6E05\u7406\u9884\u68C0\u672A\u8FD4\u56DE\u5B8C\u6574\u534F\u8BAE\u3001\u58F0\u660E\u6216\u68C0\u67E5\u8986\u76D6\u8303\u56F4\u3002");
|
|
@@ -2412,6 +2462,7 @@ function readReleasePlan(result, workspaceKey, version2) {
|
|
|
2412
2462
|
text(result.version, "version");
|
|
2413
2463
|
text(result.planDigest, "planDigest");
|
|
2414
2464
|
text(result.policyVersion, "policyVersion");
|
|
2465
|
+
releasePolicy(result.policyVersion);
|
|
2415
2466
|
const files = result.files;
|
|
2416
2467
|
if (!Array.isArray(files) || !nonnegativeInteger(result.filesCount) || result.filesCount !== files.length || !nonnegativeInteger(result.totalSize) || new Set(files.map((item) => item?.relativePath)).size !== files.length || files.some((item) => !item || !isWorkspaceRelativePath(item.relativePath) || !nonnegativeInteger(item.fileSize) || typeof item.contentHash !== "string" || !/^sha256:[a-f0-9]{64}$/.test(item.contentHash)) || files.reduce((sum, item) => sum + item.fileSize, 0) !== result.totalSize) {
|
|
2417
2468
|
throw workspaceDeliveryError("INVALID_WORKSPACE_RELEASE_PLAN", "\u53D1\u5E03 patch \u6E05\u5355\u3001\u8BA1\u6570\u3001\u5B57\u8282\u6570\u6216\u5B9E\u9645\u54C8\u5E0C\u4E0D\u5B8C\u6574\uFF1B\u672A\u6267\u884C\u5C01\u7BB1\u3002");
|
|
@@ -4253,6 +4304,11 @@ function buildQueryDsl(args) {
|
|
|
4253
4304
|
function printQueryResult(result, fmt, dsl = {}) {
|
|
4254
4305
|
const out = formatRows(result.rows, { format: fmt });
|
|
4255
4306
|
process.stdout.write(out + "\n");
|
|
4307
|
+
for (const w of result.warnings ?? []) {
|
|
4308
|
+
const text2 = [w.message, w.suggestion].filter((s) => s && s.length > 0).join("\uFF1B");
|
|
4309
|
+
process.stderr.write(`\u63D0\u793A [${w.code}]${text2 ? " " + text2 : ""}
|
|
4310
|
+
`);
|
|
4311
|
+
}
|
|
4256
4312
|
if (fmt === "table" && result.total !== void 0) {
|
|
4257
4313
|
process.stdout.write(`Showing ${result.rows.length} of ${result.total} results.
|
|
4258
4314
|
`);
|
|
@@ -5008,7 +5064,7 @@ function formatDescriptionTable(desc, verbose = false) {
|
|
|
5008
5064
|
const req = f.required ? " required" : " ";
|
|
5009
5065
|
const extras = verbose ? [f.label, f.description, formatEnumValues(f.enums)] : [f.label];
|
|
5010
5066
|
const lbl = extras.filter((s) => s && s.length > 0).map((s) => ` ${s}`).join("");
|
|
5011
|
-
const hints = [f.i18n && "i18n", f.jsonObject && "json", f.decimalNumber && "decimal"].filter(Boolean).map((hint) => ` (${hint})`).join("");
|
|
5067
|
+
const hints = [f.i18n && "i18n", f.jsonObject && "json", f.decimalNumber && "decimal", f.valueMatch && "match"].filter(Boolean).map((hint) => ` (${hint})`).join("");
|
|
5012
5068
|
const type = f.type + hints;
|
|
5013
5069
|
const writeHints = [f.readOnly && "readonly", f.systemManaged && "system-managed"].filter(Boolean).map((hint) => ` [${hint}]`).join("");
|
|
5014
5070
|
const objectRef = f.object ? ` \u2192 ${f.object}` : "";
|
|
@@ -5030,6 +5086,11 @@ function formatDescriptionTable(desc, verbose = false) {
|
|
|
5030
5086
|
' \u2139\uFE0F (i18n) = \u591A\u8BED\u8A00\u5B57\u6BB5\uFF0C\u503C\u5F62\u5982 {zh_CN: "\u2026"}\uFF1B\u4E0D\u5E26 --i18n \u65F6\u4F20\u5B57\u7B26\u4E32\u53EA\u6539\u5F53\u524D\u8BED\u8A00\uFF0C\u5E26 --i18n \u5219\u6309 Map \u6574\u4EFD\u66FF\u6362'
|
|
5031
5087
|
);
|
|
5032
5088
|
}
|
|
5089
|
+
if (desc.fields.some((f) => f.valueMatch)) {
|
|
5090
|
+
lines.push(
|
|
5091
|
+
' \u2139\uFE0F (match) = \u53EF\u7528\u8BED\u4E49\u5339\u914D\uFF1Afilter \u5199 {"field":"<\u5B57\u6BB5>","op":"match","value":"<\u7B80\u79F0\u6216\u53E3\u8BED>"}\uFF0C\u670D\u52A1\u7AEF\u6309\u8BED\u4E49\u7EB3\u5165\u771F\u5B9E\u53D6\u503C\u518D\u6539\u5199\u6210 in\uFF1B\u7EB3\u5165\u4E86\u54EA\u4E9B\u503C\u3001\u662F\u5426\u964D\u7EA7\u4E3A\u5B57\u9762\u5305\u542B\uFF0C\u89C1 hcm query \u6253\u5230 stderr \u7684\u63D0\u793A'
|
|
5092
|
+
);
|
|
5093
|
+
}
|
|
5033
5094
|
lines.push(`actions (${desc.actions.length}):`);
|
|
5034
5095
|
for (const a of desc.actions) {
|
|
5035
5096
|
const call = [a.scope, a.httpMethod].filter(Boolean).join(" ");
|
|
@@ -19539,6 +19600,7 @@ function classify(argv, actionResolution) {
|
|
|
19539
19600
|
return guarded("managed-local-write", "workspace-local-change");
|
|
19540
19601
|
}
|
|
19541
19602
|
if (subcommand === "cleanup") return guarded("tenant-write", "workspace-cleanup");
|
|
19603
|
+
if (subcommand === "cancel-release") return guarded("tenant-write", "workspace-release-cancel");
|
|
19542
19604
|
if (subcommand === "rm") return guarded("managed-local-write", "workspace-local-change");
|
|
19543
19605
|
if (subcommand === "create") return guarded("tenant-write", "workspace-create");
|
|
19544
19606
|
if (subcommand === "activate") return guarded("tenant-write", "workspace-activate");
|
|
@@ -21468,7 +21530,8 @@ for (const definition of [
|
|
|
21468
21530
|
item.action((opts) => definition.run(opts));
|
|
21469
21531
|
}
|
|
21470
21532
|
workspace.command("cleanup-plan <paths...>").description("\u53EA\u8BFB\u5C55\u5F00\u8F85\u52A9\u7269\u6599\u6E05\u7406\u5019\u9009\uFF1B\u5C55\u793A\u5DF2\u77E5\u6D88\u8D39\u8005\u68C0\u67E5\u8986\u76D6\uFF0Cowner \u987B\u58F0\u660E\u53EF\u4EE5\u4E22\u5F03").option("--workspace <key>", "\u5F00\u53D1\u7A7A\u95F4 key\uFF1B\u672A\u63D0\u4F9B\u65F6\u8BFB\u53D6\u672C\u5730\u7ED1\u5B9A").option("--dir <path>", "\u5DE5\u4F5C\u7A7A\u95F4\u672C\u5730\u76EE\u5F55", ".").option("--env <name>", "\u672C\u6B21\u4F7F\u7528\u7684\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--profile <name>", "[deprecated] \u7528 --env \u66FF\u4EE3").requiredOption("--purpose <text>", "\u5019\u9009\u6750\u6599\u7528\u9014\u8BF4\u660E").requiredOption("--reason <text>", "\u6E05\u7406\u539F\u56E0").option("--owner-declaration", "\u58F0\u660E\u8FD9\u4E9B\u6750\u6599\u53EF\u4EE5\u4E22\u5F03\uFF1B\u4E0D\u80FD\u7ED5\u8FC7\u5DF2\u77E5\u8D44\u4EA7\u3001\u5F15\u7528\u6216\u5220\u9664\u610F\u56FE\u68C0\u67E5").option("--plan <path>", "\u628A\u539F execution \u4E0E\u6458\u8981\u4FDD\u5B58\u5230 workspace \u5916\u7684\u65B0 JSON \u6587\u4EF6").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").action((paths, opts) => workspaceCleanupPlanCommand(paths, opts));
|
|
21471
|
-
workspace.command("release-plan <version>").description("\u53EA\u8BFB\u9884\u68C0\u672C\u6B21\u771F\u5B9E patch \u6587\u4EF6\u4E0E\u5220\u9664\u96C6\uFF0C\u751F\u6210\u7ED1\u5B9A\u7248\u672C\u548C\u5185\u5BB9\u7684\u5C01\u7BB1\u6458\u8981").option("--workspace <key>", "\u5F00\u53D1\u7A7A\u95F4 key\uFF1B\u672A\u63D0\u4F9B\u65F6\u8BFB\u53D6\u672C\u5730\u7ED1\u5B9A").option("--dir <path>", "\u5DE5\u4F5C\u7A7A\u95F4\u672C\u5730\u76EE\u5F55", ".").option("--env <name>", "\u672C\u6B21\u4F7F\u7528\u7684\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--profile <name>", "[deprecated] \u7528 --env \u66FF\u4EE3").option("--plan <path>", "\u628A\u539F\u9884\u68C0\u56DE\u6267\u4FDD\u5B58\u5230 workspace \u5916\u7684\u65B0 JSON \u6587\u4EF6").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").action((version2, opts) => workspaceReleasePlanCommand(version2, opts));
|
|
21533
|
+
workspace.command("release-plan <version>").description("\u53EA\u8BFB\u9884\u68C0\u672C\u6B21\u771F\u5B9E patch \u6587\u4EF6\u4E0E\u5220\u9664\u96C6\uFF0C\u751F\u6210\u7ED1\u5B9A\u7248\u672C\u548C\u5185\u5BB9\u7684\u5C01\u7BB1\u6458\u8981").option("--workspace <key>", "\u5F00\u53D1\u7A7A\u95F4 key\uFF1B\u672A\u63D0\u4F9B\u65F6\u8BFB\u53D6\u672C\u5730\u7ED1\u5B9A").option("--dir <path>", "\u5DE5\u4F5C\u7A7A\u95F4\u672C\u5730\u76EE\u5F55", ".").option("--env <name>", "\u672C\u6B21\u4F7F\u7528\u7684\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--profile <name>", "[deprecated] \u7528 --env \u66FF\u4EE3").option("--plan <path>", "\u628A\u539F\u9884\u68C0\u56DE\u6267\u4FDD\u5B58\u5230 workspace \u5916\u7684\u65B0 JSON \u6587\u4EF6").option("--policy-version <id>", "\u53D1\u5E03\u8303\u56F4\uFF1ARUNTIME_ASSETS_V2 \u6216 ALL_WORKSPACE_PATCH_FILES_V1", "RUNTIME_ASSETS_V2").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").action((version2, opts) => workspaceReleasePlanCommand(version2, opts));
|
|
21534
|
+
workspace.command("cancel-release <releaseId>").description("\u53D6\u6D88\u672A\u4F7F\u7528\u7684 CREATED \u5236\u54C1\uFF1B\u4FDD\u7559\u5236\u54C1\u6587\u4EF6\u3001\u5BA1\u8BA1\u548C\u7248\u672C\u5360\u4F4D").option("--workspace <key>", "\u5F00\u53D1\u7A7A\u95F4 key\uFF1B\u672A\u63D0\u4F9B\u65F6\u8BFB\u53D6\u672C\u5730\u7ED1\u5B9A").option("--dir <path>", "\u5DE5\u4F5C\u7A7A\u95F4\u672C\u5730\u76EE\u5F55", ".").option("--env <name>", "\u672C\u6B21\u4F7F\u7528\u7684\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--profile <name>", "[deprecated] \u7528 --env \u66FF\u4EE3").requiredOption("--reason <text>", "\u53D6\u6D88\u539F\u56E0\uFF0C\u6700\u591A 1800 \u5B57").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "json").action((releaseId, opts) => workspaceCancelReleaseCommand(releaseId, opts));
|
|
21472
21535
|
var workspaceAdd = workspace.command("add").description("\u5411\u5DF2\u7ED1\u5B9A\u5F00\u53D1\u7A7A\u95F4\u6DFB\u52A0 artifact");
|
|
21473
21536
|
workspaceAdd.command("mini <appCode>").description("\u65B0\u589E\u8F7B\u5E94\u7528 artifact\uFF08\u5199\u5165 mini_apps/<appCode>/\uFF09").option("--dir <path>", "\u5DE5\u4F5C\u7A7A\u95F4\u672C\u5730\u76EE\u5F55", ".").option("--name <name>", "\u8F7B\u5E94\u7528\u5C55\u793A\u540D").option("--template <kind>", "\u6A21\u677F\uFF1Adashboard | multi-page | writable-workbench", "dashboard").option("--sdk-version <semver>", "\u76EE\u6807 Core \u7684\u8F7B\u5E94\u7528\u8FD0\u884C\u65F6 ABI\uFF08\u9ED8\u8BA4 0.1.0\uFF0C\u72EC\u7ACB\u4E8E CLI \u5305\u7248\u672C\uFF1B\u4E0D\u63A2\u6D4B\u7EBF\u4E0A\u7248\u672C\uFF09").option("--model <Model>", "\u53EF\u5199\u5DE5\u4F5C\u53F0\u7ED1\u5B9A\u7684 Model\uFF0C\u4F8B\u5982 OrgUnit").option("--fields <csv|auto>", "\u53EF\u5199\u5DE5\u4F5C\u53F0\u8868\u5355\u5B57\u6BB5\u5217\u8868\uFF1B\u4F20 auto \u65F6\u6839\u636E Model \u5143\u6570\u636E\u63A8\u65AD").option("--defaults <JSON|auto>", "\u53EF\u5199\u5DE5\u4F5C\u53F0\u521B\u5EFA\u9ED8\u8BA4\u503C\uFF1B\u4F20 auto \u65F6\u6839\u636E Model \u5143\u6570\u636E\u63A8\u65AD").option(
|
|
21474
21537
|
"--surface <surface>",
|