@mcpcloud/cli 0.22.0 → 0.22.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/dist/index.js +30 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7472,7 +7472,11 @@ function registerServerLifecycleCommands(servers) {
|
|
|
7472
7472
|
"terminal at": formatDate(terminalEvent.timestamp)
|
|
7473
7473
|
} : {}
|
|
7474
7474
|
});
|
|
7475
|
-
if (!accessMode && dep.accessMode === "public" && await isOnlyDeployment({
|
|
7475
|
+
if (!accessMode && dep.accessMode === "public" && await isOnlyDeployment({
|
|
7476
|
+
deploymentId: dep.deploymentId,
|
|
7477
|
+
orgId,
|
|
7478
|
+
serverId
|
|
7479
|
+
})) {
|
|
7476
7480
|
printWarn("This first deployment is public — anyone with the URL can call it. Redeploy with --access-mode privateOrg or unlisted to require sign-in (recommended when the upstream API needs credentials).");
|
|
7477
7481
|
}
|
|
7478
7482
|
if (!opts.wait && dep.status === "queued") {
|
|
@@ -7541,7 +7545,8 @@ function registerServerLifecycleCommands(servers) {
|
|
|
7541
7545
|
preserveEnrichment: Boolean(opts.enrichOnChange)
|
|
7542
7546
|
});
|
|
7543
7547
|
if (!result.ok) {
|
|
7544
|
-
|
|
7548
|
+
const hint = result.code === "insufficient_scope" ? " push-spec --apply regenerates the server’s code, which needs the servers:build scope; mint the key with --preset ci-build or add --scope servers:build." : "";
|
|
7549
|
+
throw new Error(`Spec regen failed: ${result.message} (code: ${result.code})${hint}`);
|
|
7545
7550
|
}
|
|
7546
7551
|
const summary = summarizeDiff(result.diff);
|
|
7547
7552
|
if (!isJsonMode()) {
|
|
@@ -7552,7 +7557,14 @@ function registerServerLifecycleCommands(servers) {
|
|
|
7552
7557
|
printInfo(summary.text);
|
|
7553
7558
|
}
|
|
7554
7559
|
if (result.applied) {
|
|
7555
|
-
const {
|
|
7560
|
+
const {
|
|
7561
|
+
dryRun,
|
|
7562
|
+
inserted,
|
|
7563
|
+
removedKeys,
|
|
7564
|
+
unchanged,
|
|
7565
|
+
updated,
|
|
7566
|
+
warnings
|
|
7567
|
+
} = result.applied;
|
|
7556
7568
|
printInfo(` → ${dryRun ? "would apply" : "applied"}: ${updated.length} updated, ${inserted.length} added, ${unchanged} unchanged`);
|
|
7557
7569
|
if (removedKeys.length > 0) {
|
|
7558
7570
|
printWarn(` ! ${removedKeys.length} tool(s) no longer in the spec, left in place: ${removedKeys.join(", ")}`);
|
|
@@ -7683,7 +7695,11 @@ function registerServerLifecycleCommands(servers) {
|
|
|
7683
7695
|
"terminal at": formatDate(terminalEvent.timestamp)
|
|
7684
7696
|
} : {}
|
|
7685
7697
|
});
|
|
7686
|
-
if (!accessMode && dep.accessMode === "public" && await isOnlyDeployment({
|
|
7698
|
+
if (!accessMode && dep.accessMode === "public" && await isOnlyDeployment({
|
|
7699
|
+
deploymentId: dep.deploymentId,
|
|
7700
|
+
orgId,
|
|
7701
|
+
serverId
|
|
7702
|
+
})) {
|
|
7687
7703
|
printWarn("This first deployment is public — anyone with the URL can call it. Redeploy with --access-mode privateOrg or unlisted to require sign-in (recommended when the upstream API needs credentials).");
|
|
7688
7704
|
}
|
|
7689
7705
|
if (!opts.wait && dep.status === "queued") {
|
|
@@ -29076,7 +29092,10 @@ function grantBodyFromOptions(opts) {
|
|
|
29076
29092
|
...opts.clearOrg ? { orgId: null } : opts.org ? { orgId: opts.org } : {}
|
|
29077
29093
|
};
|
|
29078
29094
|
}
|
|
29079
|
-
var API_KEY_KIND = {
|
|
29095
|
+
var API_KEY_KIND = {
|
|
29096
|
+
label: "api key",
|
|
29097
|
+
listHint: "mcp api-keys list"
|
|
29098
|
+
};
|
|
29080
29099
|
async function resolveApiKeyId(reference) {
|
|
29081
29100
|
const ref = reference.trim();
|
|
29082
29101
|
if (isIdShape(ref))
|
|
@@ -29084,7 +29103,10 @@ async function resolveApiKeyId(reference) {
|
|
|
29084
29103
|
let candidates;
|
|
29085
29104
|
try {
|
|
29086
29105
|
const data = await api.get("/api/v1/api-keys");
|
|
29087
|
-
candidates = data.apiKeys.filter((k) => typeof k.id === "string").map((k) => ({
|
|
29106
|
+
candidates = data.apiKeys.filter((k) => typeof k.id === "string").map((k) => ({
|
|
29107
|
+
id: k.id,
|
|
29108
|
+
name: typeof k.name === "string" ? k.name : ""
|
|
29109
|
+
}));
|
|
29088
29110
|
} catch {
|
|
29089
29111
|
return ref;
|
|
29090
29112
|
}
|
|
@@ -29116,7 +29138,7 @@ function registerApiKeyCommands(program) {
|
|
|
29116
29138
|
{ key: "expires", label: "Expires", width: 22 }
|
|
29117
29139
|
], data);
|
|
29118
29140
|
}));
|
|
29119
|
-
apiKeys.command("create").description("Create a new API key (the secret is shown once)").requiredOption("--name <name>", "Display name for the key").option("--expires-in <duration>", "Auto-expire the key after this long: 90d, 12w, 6m, or a day count (1–365). Default: never.").option("--preset <preset>", "Scope preset: full, agent, read-only, or ci-
|
|
29141
|
+
apiKeys.command("create").description("Create a new API key (the secret is shown once)").requiredOption("--name <name>", "Display name for the key").option("--expires-in <duration>", "Auto-expire the key after this long: 90d, 12w, 6m, or a day count (1–365). Default: never.").option("--preset <preset>", "Scope preset: full, agent, read-only, ci-deploy (redeploy the stored bundle), or ci-build (also regenerate code). Default: full authority.").option("--scope <scope>", "Grant a single scope (repeatable, e.g. --scope servers:read --scope servers:deploy). Mutually exclusive with --preset.", collectScope, []).option("--org <orgId>", "Pin the key to one organization (must be one you belong to).").action(runAction(async (opts) => {
|
|
29120
29142
|
const name = opts.name.trim();
|
|
29121
29143
|
if (!name)
|
|
29122
29144
|
throw new Error("--name must not be empty.");
|
|
@@ -32114,7 +32136,7 @@ async function runWithRuntime(args) {
|
|
|
32114
32136
|
preserveEnrichment: args.enrichOnChange
|
|
32115
32137
|
});
|
|
32116
32138
|
if (!result.ok) {
|
|
32117
|
-
printError(`Spec regen failed: ${result.message}`);
|
|
32139
|
+
printError(`Spec regen failed: ${result.message}${result.code === "insufficient_scope" ? " Regenerating code needs the servers:build scope (--preset ci-build, or --scope servers:build)." : ""}`);
|
|
32118
32140
|
return;
|
|
32119
32141
|
}
|
|
32120
32142
|
const summary = summarizeDiff(result.diff);
|