@vm0/cli 9.62.2 → 9.62.4

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.
Files changed (2) hide show
  1. package/index.js +76 -39
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -45,7 +45,7 @@ if (DSN) {
45
45
  Sentry.init({
46
46
  dsn: DSN,
47
47
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
48
- release: "9.62.2",
48
+ release: "9.62.4",
49
49
  sendDefaultPii: false,
50
50
  tracesSampleRate: 0,
51
51
  shutdownTimeout: 500,
@@ -64,7 +64,7 @@ if (DSN) {
64
64
  }
65
65
  });
66
66
  Sentry.setContext("cli", {
67
- version: "9.62.2",
67
+ version: "9.62.4",
68
68
  command: process.argv.slice(2).join(" ")
69
69
  });
70
70
  Sentry.setContext("runtime", {
@@ -673,7 +673,7 @@ function getConfigPath() {
673
673
  return join2(homedir2(), ".vm0", "config.json");
674
674
  }
675
675
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
676
- console.log(chalk4.bold(`VM0 CLI v${"9.62.2"}`));
676
+ console.log(chalk4.bold(`VM0 CLI v${"9.62.4"}`));
677
677
  console.log();
678
678
  const config = await loadConfig();
679
679
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -801,7 +801,7 @@ var firewallSchema = z3.object({
801
801
  ref: z3.string(),
802
802
  apis: z3.array(firewallApiSchema)
803
803
  });
804
- var experimentalFirewallSchema = z3.array(firewallSchema);
804
+ var experimentalFirewallsSchema = z3.array(firewallSchema);
805
805
  var firewallConfigSchema = z3.object({
806
806
  name: z3.string().min(1, "Firewall name is required"),
807
807
  description: z3.string().optional(),
@@ -817,10 +817,10 @@ var composeVersionQuerySchema = z4.string().min(1, "Missing version query parame
817
817
  );
818
818
  var AGENT_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]{1,62}[a-zA-Z0-9]$/;
819
819
  var VALID_CAPABILITIES = [
820
- "storage:read",
821
- "storage:write",
822
820
  "agent:read",
823
821
  "agent:write",
822
+ "artifact:read",
823
+ "artifact:write",
824
824
  "agent-run:read",
825
825
  "agent-run:write",
826
826
  "schedule:read",
@@ -869,7 +869,7 @@ var agentDefinitionSchema = z4.object({
869
869
  * CLI input: map format { slack: { permissions: [...] | "all" } }
870
870
  * — expanded by CLI to full ExpandedFirewallConfig[] before API call.
871
871
  */
872
- experimental_firewall: z4.record(
872
+ experimental_firewalls: z4.record(
873
873
  z4.string(),
874
874
  z4.object({
875
875
  permissions: z4.union([z4.literal("all"), z4.array(z4.string()).min(1)])
@@ -928,7 +928,7 @@ var agentComposeApiContentSchema = z4.object({
928
928
  agents: z4.record(
929
929
  z4.string(),
930
930
  agentDefinitionSchema.extend({
931
- experimental_firewall: z4.array(expandedFirewallConfigSchema).optional()
931
+ experimental_firewalls: z4.array(expandedFirewallConfigSchema).optional()
932
932
  })
933
933
  ),
934
934
  volumes: z4.record(z4.string(), volumeConfigSchema).optional()
@@ -1606,10 +1606,9 @@ var logsSearchContract = c3.router({
1606
1606
  });
1607
1607
  var queueEntrySchema = z6.object({
1608
1608
  position: z6.number(),
1609
- agentName: z6.string(),
1610
- userEmail: z6.string(),
1609
+ agentName: z6.string().nullable(),
1610
+ userEmail: z6.string().nullable(),
1611
1611
  createdAt: z6.string(),
1612
- isOwner: z6.boolean(),
1613
1612
  runId: z6.string().nullable()
1614
1613
  });
1615
1614
  var concurrencyInfoSchema = z6.object({
@@ -2539,6 +2538,8 @@ var MODEL_PROVIDER_TYPES = {
2539
2538
  CLAUDE_CODE_SUBAGENT_MODEL: "$model"
2540
2539
  },
2541
2540
  models: [
2541
+ "anthropic/claude-sonnet-4.6",
2542
+ "anthropic/claude-opus-4.6",
2542
2543
  "anthropic/claude-sonnet-4.5",
2543
2544
  "anthropic/claude-opus-4.5",
2544
2545
  "anthropic/claude-haiku-4.5"
@@ -2626,6 +2627,21 @@ var MODEL_PROVIDER_TYPES = {
2626
2627
  models: ["glm-5", "glm-4.7", "glm-4.5-air"],
2627
2628
  defaultModel: "glm-4.7"
2628
2629
  },
2630
+ "vercel-ai-gateway": {
2631
+ framework: "claude-code",
2632
+ secretName: "VERCEL_AI_GATEWAY_API_KEY",
2633
+ label: "Vercel AI Gateway",
2634
+ secretLabel: "API key",
2635
+ helpText: "Get your API key from the Vercel AI Gateway dashboard",
2636
+ featureFlag: "vercelAiGateway" /* VercelAiGateway */,
2637
+ environmentMapping: {
2638
+ ANTHROPIC_AUTH_TOKEN: "$secret",
2639
+ ANTHROPIC_BASE_URL: "https://ai-gateway.vercel.sh",
2640
+ ANTHROPIC_API_KEY: "",
2641
+ ANTHROPIC_MODEL: "moonshotai/kimi-k2.5",
2642
+ ANTHROPIC_CUSTOM_HEADERS: "x-ai-gateway-providers-only: moonshot"
2643
+ }
2644
+ },
2629
2645
  "azure-foundry": {
2630
2646
  framework: "claude-code",
2631
2647
  label: "Azure Foundry",
@@ -2735,6 +2751,7 @@ var modelProviderTypeSchema = z14.enum([
2735
2751
  "minimax-api-key",
2736
2752
  "deepseek-api-key",
2737
2753
  "zai-api-key",
2754
+ "vercel-ai-gateway",
2738
2755
  "azure-foundry",
2739
2756
  "aws-bedrock"
2740
2757
  ]);
@@ -3148,7 +3165,7 @@ var storedExecutionContextSchema = z16.object({
3148
3165
  // Memory storage name (for first-run when manifest.memory is null)
3149
3166
  memoryName: z16.string().optional(),
3150
3167
  // Experimental firewall for proxy-side token replacement
3151
- experimentalFirewall: experimentalFirewallSchema.optional(),
3168
+ experimentalFirewalls: experimentalFirewallsSchema.optional(),
3152
3169
  // Experimental capabilities for agent permission enforcement
3153
3170
  experimentalCapabilities: z16.array(z16.enum(VALID_CAPABILITIES)).optional()
3154
3171
  });
@@ -3182,7 +3199,7 @@ var executionContextSchema = z16.object({
3182
3199
  // Memory storage name (for first-run when manifest.memory is null)
3183
3200
  memoryName: z16.string().optional(),
3184
3201
  // Experimental firewall for proxy-side token replacement
3185
- experimentalFirewall: experimentalFirewallSchema.optional(),
3202
+ experimentalFirewalls: experimentalFirewallsSchema.optional(),
3186
3203
  // Experimental capabilities for agent permission enforcement
3187
3204
  experimentalCapabilities: z16.array(z16.enum(VALID_CAPABILITIES)).optional()
3188
3205
  });
@@ -6818,7 +6835,7 @@ async function expandFirewallConfigs(config, fetchFn) {
6818
6835
  const compose = config;
6819
6836
  if (!compose?.agents) return;
6820
6837
  for (const agent of Object.values(compose.agents)) {
6821
- const configs = agent.experimental_firewall;
6838
+ const configs = agent.experimental_firewalls;
6822
6839
  if (!configs) continue;
6823
6840
  if (Array.isArray(configs)) continue;
6824
6841
  const expanded = [];
@@ -6860,7 +6877,7 @@ async function expandFirewallConfigs(config, fetchFn) {
6860
6877
  entry.placeholders = serviceConfig.placeholders;
6861
6878
  expanded.push(entry);
6862
6879
  }
6863
- agent.experimental_firewall = expanded;
6880
+ agent.experimental_firewalls = expanded;
6864
6881
  }
6865
6882
  }
6866
6883
 
@@ -7364,6 +7381,11 @@ var FEATURE_SWITCHES = {
7364
7381
  enabled: false,
7365
7382
  enabledUserHashes: STAFF_USER_HASHES
7366
7383
  },
7384
+ ["vercelAiGateway" /* VercelAiGateway */]: {
7385
+ maintainer: "ethan@vm0.ai",
7386
+ enabled: false,
7387
+ enabledUserHashes: STAFF_USER_HASHES
7388
+ },
7367
7389
  ["zero" /* Zero */]: {
7368
7390
  maintainer: "ethan@vm0.ai",
7369
7391
  enabled: false,
@@ -7407,27 +7429,29 @@ function parseSkillFrontmatter(content) {
7407
7429
  }
7408
7430
 
7409
7431
  // ../../packages/core/src/instructions-frontmatter.ts
7410
- var PROFILE_START = "<!-- ZERO_PROFILE";
7411
- var PROFILE_END = "ZERO_PROFILE -->";
7412
- function stripProfileBlocks(content) {
7432
+ var LEGACY_PROFILE_START = "<!-- ZERO_PROFILE";
7433
+ var LEGACY_PROFILE_END = "ZERO_PROFILE -->";
7434
+ var PROFILE_START = "[AGENT_PROFILE]";
7435
+ var PROFILE_END = "[/AGENT_PROFILE]";
7436
+ function stripMarkerBlocks(content, startMarker, endMarker) {
7413
7437
  let result = "";
7414
7438
  let searchFrom = 0;
7415
7439
  while (searchFrom < content.length) {
7416
- const startIdx = content.indexOf(PROFILE_START + "\n", searchFrom);
7440
+ const startIdx = content.indexOf(startMarker + "\n", searchFrom);
7417
7441
  if (startIdx === -1) {
7418
7442
  result += content.slice(searchFrom);
7419
7443
  break;
7420
7444
  }
7421
7445
  result += content.slice(searchFrom, startIdx);
7422
7446
  const endIdx = content.indexOf(
7423
- PROFILE_END,
7424
- startIdx + PROFILE_START.length + 1
7447
+ endMarker,
7448
+ startIdx + startMarker.length + 1
7425
7449
  );
7426
7450
  if (endIdx === -1) {
7427
7451
  result += content.slice(startIdx);
7428
7452
  break;
7429
7453
  }
7430
- let afterEnd = endIdx + PROFILE_END.length;
7454
+ let afterEnd = endIdx + endMarker.length;
7431
7455
  if (content[afterEnd] === "\n") {
7432
7456
  afterEnd++;
7433
7457
  }
@@ -7435,6 +7459,14 @@ function stripProfileBlocks(content) {
7435
7459
  }
7436
7460
  return result;
7437
7461
  }
7462
+ function stripProfileBlocks(content) {
7463
+ const withoutLegacy = stripMarkerBlocks(
7464
+ content,
7465
+ LEGACY_PROFILE_START,
7466
+ LEGACY_PROFILE_END
7467
+ );
7468
+ return stripMarkerBlocks(withoutLegacy, PROFILE_START, PROFILE_END);
7469
+ }
7438
7470
  var LEGACY_METADATA_KEYS = /* @__PURE__ */ new Set(["name", "tone"]);
7439
7471
  function stripLegacyFrontmatter(content) {
7440
7472
  const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---(\r?\n|$)/);
@@ -7492,15 +7524,14 @@ ${paragraph}
7492
7524
  ${PROFILE_END}`;
7493
7525
  const stripped = stripProfileBlocks(
7494
7526
  stripLegacyFrontmatter(content)
7495
- ).trimEnd();
7527
+ ).trimStart();
7496
7528
  if (!stripped) {
7497
7529
  return `${block}
7498
7530
  `;
7499
7531
  }
7500
- return `${stripped}
7532
+ return `${block}
7501
7533
 
7502
- ${block}
7503
- `;
7534
+ ${stripped}`;
7504
7535
  }
7505
7536
 
7506
7537
  // src/lib/api/core/http.ts
@@ -9502,7 +9533,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
9502
9533
  options.autoUpdate = false;
9503
9534
  }
9504
9535
  if (options.autoUpdate !== false) {
9505
- await startSilentUpgrade("9.62.2");
9536
+ await startSilentUpgrade("9.62.4");
9506
9537
  }
9507
9538
  try {
9508
9539
  let result;
@@ -10324,7 +10355,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
10324
10355
  withErrorHandler(
10325
10356
  async (identifier, prompt, options) => {
10326
10357
  if (options.autoUpdate !== false) {
10327
- await startSilentUpgrade("9.62.2");
10358
+ await startSilentUpgrade("9.62.4");
10328
10359
  }
10329
10360
  const { org, name, version } = parseIdentifier(identifier);
10330
10361
  let composeId;
@@ -10721,8 +10752,14 @@ var queueCommand = new Command13().name("queue").description("Show org run queue
10721
10752
  );
10722
10753
  console.log();
10723
10754
  const posWidth = Math.max(1, String(queue.length).length);
10724
- const agentWidth = Math.max(5, ...queue.map((e) => e.agentName.length));
10725
- const emailWidth = Math.max(4, ...queue.map((e) => e.userEmail.length));
10755
+ const agentWidth = Math.max(
10756
+ 5,
10757
+ ...queue.map((e) => (e.agentName ?? "-").length)
10758
+ );
10759
+ const emailWidth = Math.max(
10760
+ 4,
10761
+ ...queue.map((e) => (e.userEmail ?? "-").length)
10762
+ );
10726
10763
  const header = [
10727
10764
  "#".padEnd(posWidth),
10728
10765
  "AGENT".padEnd(agentWidth),
@@ -10731,11 +10768,11 @@ var queueCommand = new Command13().name("queue").description("Show org run queue
10731
10768
  ].join(" ");
10732
10769
  console.log(chalk12.dim(header));
10733
10770
  for (const entry of queue) {
10734
- const marker = entry.isOwner ? chalk12.cyan(" \u2190 you") : "";
10771
+ const marker = entry.runId !== null ? chalk12.cyan(" \u2190 you") : "";
10735
10772
  const row = [
10736
10773
  String(entry.position).padEnd(posWidth),
10737
- entry.agentName.padEnd(agentWidth),
10738
- entry.userEmail.padEnd(emailWidth),
10774
+ (entry.agentName ?? "-").padEnd(agentWidth),
10775
+ (entry.userEmail ?? "-").padEnd(emailWidth),
10739
10776
  formatRelativeTime(entry.createdAt)
10740
10777
  ].join(" ");
10741
10778
  console.log(row + marker);
@@ -12038,7 +12075,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
12038
12075
  withErrorHandler(
12039
12076
  async (prompt, options) => {
12040
12077
  if (options.autoUpdate !== false) {
12041
- const shouldExit = await checkAndUpgrade("9.62.2", prompt);
12078
+ const shouldExit = await checkAndUpgrade("9.62.4", prompt);
12042
12079
  if (shouldExit) {
12043
12080
  process.exit(0);
12044
12081
  }
@@ -17172,13 +17209,13 @@ var upgradeCommand = new Command86().name("upgrade").description("Upgrade vm0 CL
17172
17209
  if (latestVersion === null) {
17173
17210
  throw new Error("Could not check for updates. Please try again later.");
17174
17211
  }
17175
- if (latestVersion === "9.62.2") {
17176
- console.log(chalk79.green(`\u2713 Already up to date (${"9.62.2"})`));
17212
+ if (latestVersion === "9.62.4") {
17213
+ console.log(chalk79.green(`\u2713 Already up to date (${"9.62.4"})`));
17177
17214
  return;
17178
17215
  }
17179
17216
  console.log(
17180
17217
  chalk79.yellow(
17181
- `Current version: ${"9.62.2"} -> Latest version: ${latestVersion}`
17218
+ `Current version: ${"9.62.4"} -> Latest version: ${latestVersion}`
17182
17219
  )
17183
17220
  );
17184
17221
  console.log();
@@ -17205,7 +17242,7 @@ var upgradeCommand = new Command86().name("upgrade").description("Upgrade vm0 CL
17205
17242
  const success = await performUpgrade(packageManager);
17206
17243
  if (success) {
17207
17244
  console.log(
17208
- chalk79.green(`\u2713 Upgraded from ${"9.62.2"} to ${latestVersion}`)
17245
+ chalk79.green(`\u2713 Upgraded from ${"9.62.4"} to ${latestVersion}`)
17209
17246
  );
17210
17247
  return;
17211
17248
  }
@@ -17219,7 +17256,7 @@ var upgradeCommand = new Command86().name("upgrade").description("Upgrade vm0 CL
17219
17256
 
17220
17257
  // src/index.ts
17221
17258
  var program = new Command87();
17222
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.62.2");
17259
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.62.4");
17223
17260
  program.addCommand(authCommand);
17224
17261
  program.addCommand(infoCommand);
17225
17262
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.62.2",
3
+ "version": "9.62.4",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",