@vm0/cli 9.63.1 → 9.63.2

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 +139 -34
  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.63.1",
48
+ release: "9.63.2",
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.63.1",
67
+ version: "9.63.2",
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.63.1"}`));
676
+ console.log(chalk4.bold(`VM0 CLI v${"9.63.2"}`));
677
677
  console.log();
678
678
  const config = await loadConfig();
679
679
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -2647,8 +2647,23 @@ var MODEL_PROVIDER_TYPES = {
2647
2647
  ANTHROPIC_AUTH_TOKEN: "$secret",
2648
2648
  ANTHROPIC_BASE_URL: "https://ai-gateway.vercel.sh",
2649
2649
  ANTHROPIC_API_KEY: "",
2650
- ANTHROPIC_MODEL: "anthropic/claude-sonnet-4.6"
2651
- }
2650
+ ANTHROPIC_MODEL: "$model",
2651
+ ANTHROPIC_DEFAULT_OPUS_MODEL: "$model",
2652
+ ANTHROPIC_DEFAULT_SONNET_MODEL: "$model",
2653
+ ANTHROPIC_DEFAULT_HAIKU_MODEL: "$model",
2654
+ CLAUDE_CODE_SUBAGENT_MODEL: "$model"
2655
+ },
2656
+ models: [
2657
+ "anthropic/claude-opus-4.6",
2658
+ "anthropic/claude-opus-4.5",
2659
+ "anthropic/claude-sonnet-4.6",
2660
+ "anthropic/claude-sonnet-4.5",
2661
+ "anthropic/claude-haiku-4.5",
2662
+ "moonshotai/kimi-k2.5",
2663
+ "minimax/minimax-m2.5",
2664
+ "zai/glm-5-turbo"
2665
+ ],
2666
+ defaultModel: "anthropic/claude-sonnet-4.6"
2652
2667
  },
2653
2668
  "azure-foundry": {
2654
2669
  framework: "claude-code",
@@ -2816,6 +2831,8 @@ var modelProviderResponseSchema = z14.object({
2816
2831
  // For multi-auth providers
2817
2832
  isDefault: z14.boolean(),
2818
2833
  selectedModel: z14.string().nullable(),
2834
+ scope: z14.enum(["org", "user"]).optional(),
2835
+ // Optional for backward compat
2819
2836
  createdAt: z14.string(),
2820
2837
  updatedAt: z14.string()
2821
2838
  });
@@ -7247,6 +7264,94 @@ var skillsResolveContract = c24.router({
7247
7264
  }
7248
7265
  });
7249
7266
 
7267
+ // ../../packages/core/src/contracts/org-model-providers.ts
7268
+ import { z as z28 } from "zod";
7269
+ var c25 = initContract();
7270
+ var orgModelProvidersMainContract = c25.router({
7271
+ list: {
7272
+ method: "GET",
7273
+ path: "/api/org/model-providers",
7274
+ headers: authHeadersSchema,
7275
+ responses: {
7276
+ 200: modelProviderListResponseSchema,
7277
+ 401: apiErrorSchema,
7278
+ 500: apiErrorSchema
7279
+ },
7280
+ summary: "List org-level model providers"
7281
+ },
7282
+ upsert: {
7283
+ method: "PUT",
7284
+ path: "/api/org/model-providers",
7285
+ headers: authHeadersSchema,
7286
+ body: upsertModelProviderRequestSchema,
7287
+ responses: {
7288
+ 200: upsertModelProviderResponseSchema,
7289
+ 201: upsertModelProviderResponseSchema,
7290
+ 400: apiErrorSchema,
7291
+ 401: apiErrorSchema,
7292
+ 403: apiErrorSchema,
7293
+ 500: apiErrorSchema
7294
+ },
7295
+ summary: "Create or update an org-level model provider (admin only)"
7296
+ }
7297
+ });
7298
+ var orgModelProvidersByTypeContract = c25.router({
7299
+ delete: {
7300
+ method: "DELETE",
7301
+ path: "/api/org/model-providers/:type",
7302
+ headers: authHeadersSchema,
7303
+ pathParams: z28.object({
7304
+ type: modelProviderTypeSchema
7305
+ }),
7306
+ responses: {
7307
+ 204: c25.noBody(),
7308
+ 401: apiErrorSchema,
7309
+ 403: apiErrorSchema,
7310
+ 404: apiErrorSchema,
7311
+ 500: apiErrorSchema
7312
+ },
7313
+ summary: "Delete an org-level model provider (admin only)"
7314
+ }
7315
+ });
7316
+ var orgModelProvidersSetDefaultContract = c25.router({
7317
+ setDefault: {
7318
+ method: "POST",
7319
+ path: "/api/org/model-providers/:type/set-default",
7320
+ headers: authHeadersSchema,
7321
+ pathParams: z28.object({
7322
+ type: modelProviderTypeSchema
7323
+ }),
7324
+ body: z28.undefined(),
7325
+ responses: {
7326
+ 200: modelProviderResponseSchema,
7327
+ 401: apiErrorSchema,
7328
+ 403: apiErrorSchema,
7329
+ 404: apiErrorSchema,
7330
+ 500: apiErrorSchema
7331
+ },
7332
+ summary: "Set org-level model provider as default (admin only)"
7333
+ }
7334
+ });
7335
+ var orgModelProvidersUpdateModelContract = c25.router({
7336
+ updateModel: {
7337
+ method: "PATCH",
7338
+ path: "/api/org/model-providers/:type/model",
7339
+ headers: authHeadersSchema,
7340
+ pathParams: z28.object({
7341
+ type: modelProviderTypeSchema
7342
+ }),
7343
+ body: updateModelRequestSchema,
7344
+ responses: {
7345
+ 200: modelProviderResponseSchema,
7346
+ 401: apiErrorSchema,
7347
+ 403: apiErrorSchema,
7348
+ 404: apiErrorSchema,
7349
+ 500: apiErrorSchema
7350
+ },
7351
+ summary: "Update model selection for org-level provider (admin only)"
7352
+ }
7353
+ });
7354
+
7250
7355
  // ../../packages/core/src/org-reference.ts
7251
7356
  function isLegacySystemTemplate(reference) {
7252
7357
  return reference.startsWith("vm0-");
@@ -8341,8 +8446,8 @@ async function resolveSkills(skillUrls) {
8341
8446
  }
8342
8447
 
8343
8448
  // src/lib/domain/yaml-validator.ts
8344
- import { z as z28 } from "zod";
8345
- var cliAgentNameSchema = z28.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
8449
+ import { z as z29 } from "zod";
8450
+ var cliAgentNameSchema = z29.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
8346
8451
  /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
8347
8452
  "Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
8348
8453
  );
@@ -8356,7 +8461,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
8356
8461
  resolveSkillRef(skillRef);
8357
8462
  } catch (error) {
8358
8463
  ctx.addIssue({
8359
- code: z28.ZodIssueCode.custom,
8464
+ code: z29.ZodIssueCode.custom,
8360
8465
  message: error instanceof Error ? error.message : `Invalid skill reference: ${skillRef}`,
8361
8466
  path: ["skills", i]
8362
8467
  });
@@ -8366,15 +8471,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
8366
8471
  }
8367
8472
  }
8368
8473
  );
8369
- var cliComposeSchema = z28.object({
8370
- version: z28.string().min(1, "Missing config.version"),
8371
- agents: z28.record(cliAgentNameSchema, cliAgentDefinitionSchema),
8372
- volumes: z28.record(z28.string(), volumeConfigSchema).optional()
8474
+ var cliComposeSchema = z29.object({
8475
+ version: z29.string().min(1, "Missing config.version"),
8476
+ agents: z29.record(cliAgentNameSchema, cliAgentDefinitionSchema),
8477
+ volumes: z29.record(z29.string(), volumeConfigSchema).optional()
8373
8478
  }).superRefine((config, ctx) => {
8374
8479
  const agentKeys = Object.keys(config.agents);
8375
8480
  if (agentKeys.length === 0) {
8376
8481
  ctx.addIssue({
8377
- code: z28.ZodIssueCode.custom,
8482
+ code: z29.ZodIssueCode.custom,
8378
8483
  message: "agents must have at least one agent defined",
8379
8484
  path: ["agents"]
8380
8485
  });
@@ -8382,7 +8487,7 @@ var cliComposeSchema = z28.object({
8382
8487
  }
8383
8488
  if (agentKeys.length > 1) {
8384
8489
  ctx.addIssue({
8385
- code: z28.ZodIssueCode.custom,
8490
+ code: z29.ZodIssueCode.custom,
8386
8491
  message: "Multiple agents not supported yet. Only one agent allowed.",
8387
8492
  path: ["agents"]
8388
8493
  });
@@ -8394,7 +8499,7 @@ var cliComposeSchema = z28.object({
8394
8499
  if (agentVolumes && agentVolumes.length > 0) {
8395
8500
  if (!config.volumes) {
8396
8501
  ctx.addIssue({
8397
- code: z28.ZodIssueCode.custom,
8502
+ code: z29.ZodIssueCode.custom,
8398
8503
  message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
8399
8504
  path: ["volumes"]
8400
8505
  });
@@ -8404,7 +8509,7 @@ var cliComposeSchema = z28.object({
8404
8509
  const parts = volDeclaration.split(":");
8405
8510
  if (parts.length !== 2) {
8406
8511
  ctx.addIssue({
8407
- code: z28.ZodIssueCode.custom,
8512
+ code: z29.ZodIssueCode.custom,
8408
8513
  message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
8409
8514
  path: ["agents", agentName, "volumes"]
8410
8515
  });
@@ -8413,7 +8518,7 @@ var cliComposeSchema = z28.object({
8413
8518
  const volumeKey = parts[0].trim();
8414
8519
  if (!config.volumes[volumeKey]) {
8415
8520
  ctx.addIssue({
8416
- code: z28.ZodIssueCode.custom,
8521
+ code: z29.ZodIssueCode.custom,
8417
8522
  message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
8418
8523
  path: ["volumes", volumeKey]
8419
8524
  });
@@ -9650,7 +9755,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
9650
9755
  options.autoUpdate = false;
9651
9756
  }
9652
9757
  if (options.autoUpdate !== false) {
9653
- await startSilentUpgrade("9.63.1");
9758
+ await startSilentUpgrade("9.63.2");
9654
9759
  }
9655
9760
  try {
9656
9761
  let result;
@@ -10472,7 +10577,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
10472
10577
  withErrorHandler(
10473
10578
  async (identifier, prompt, options) => {
10474
10579
  if (options.autoUpdate !== false) {
10475
- await startSilentUpgrade("9.63.1");
10580
+ await startSilentUpgrade("9.63.2");
10476
10581
  }
10477
10582
  const { org, name, version } = parseIdentifier(identifier);
10478
10583
  let composeId;
@@ -12192,7 +12297,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
12192
12297
  withErrorHandler(
12193
12298
  async (prompt, options) => {
12194
12299
  if (options.autoUpdate !== false) {
12195
- const shouldExit = await checkAndUpgrade("9.63.1", prompt);
12300
+ const shouldExit = await checkAndUpgrade("9.63.2", prompt);
12196
12301
  if (shouldExit) {
12197
12302
  process.exit(0);
12198
12303
  }
@@ -13475,7 +13580,7 @@ var statusCommand5 = new Command41().name("status").description("View current or
13475
13580
  console.log(chalk37.bold("Organization Information:"));
13476
13581
  console.log(` Slug: ${chalk37.green(org.slug)}`);
13477
13582
  } catch (error) {
13478
- if (error instanceof Error && error.message.includes("No org configured")) {
13583
+ if (error instanceof ApiRequestError && error.status === 404) {
13479
13584
  throw new Error("No organization configured", {
13480
13585
  cause: new Error("Set your organization with: vm0 org set <slug>")
13481
13586
  });
@@ -13794,7 +13899,7 @@ var listCommand6 = new Command52().name("list").alias("ls").description("List al
13794
13899
  );
13795
13900
  return;
13796
13901
  }
13797
- const nameWidth = Math.max(4, ...data.composes.map((c25) => c25.name.length));
13902
+ const nameWidth = Math.max(4, ...data.composes.map((c26) => c26.name.length));
13798
13903
  const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
13799
13904
  " "
13800
13905
  );
@@ -14398,7 +14503,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
14398
14503
  if (!isInteractive()) {
14399
14504
  throw new Error("--frequency is required (daily|weekly|monthly|once|loop)");
14400
14505
  }
14401
- const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c25) => c25.value === existingFrequency) : 0;
14506
+ const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c26) => c26.value === existingFrequency) : 0;
14402
14507
  frequency = await promptSelect(
14403
14508
  "Schedule frequency",
14404
14509
  FREQUENCY_CHOICES,
@@ -14423,7 +14528,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
14423
14528
  throw new Error("--day is required for weekly/monthly");
14424
14529
  }
14425
14530
  if (frequency === "weekly") {
14426
- const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c25) => c25.value === existingDay) : 0;
14531
+ const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c26) => c26.value === existingDay) : 0;
14427
14532
  const day2 = await promptSelect(
14428
14533
  "Day of week",
14429
14534
  DAY_OF_WEEK_CHOICES,
@@ -16425,7 +16530,7 @@ import chalk69 from "chalk";
16425
16530
  var listCommand11 = new Command78().name("list").alias("ls").description("List all connectors and their status").action(
16426
16531
  withErrorHandler(async () => {
16427
16532
  const result = await listConnectors();
16428
- const connectedMap = new Map(result.connectors.map((c25) => [c25.type, c25]));
16533
+ const connectedMap = new Map(result.connectors.map((c26) => [c26.type, c26]));
16429
16534
  const allTypesRaw = Object.keys(CONNECTOR_TYPES);
16430
16535
  const allTypes = [];
16431
16536
  for (const type2 of allTypesRaw) {
@@ -16957,16 +17062,16 @@ async function handleModelProvider(ctx) {
16957
17062
  const providerType = await step.prompt(
16958
17063
  () => promptSelect(
16959
17064
  "Select provider type:",
16960
- choices.map((c25) => ({
16961
- title: c25.label,
16962
- value: c25.type
17065
+ choices.map((c26) => ({
17066
+ title: c26.label,
17067
+ value: c26.type
16963
17068
  }))
16964
17069
  )
16965
17070
  );
16966
17071
  if (!providerType) {
16967
17072
  process.exit(0);
16968
17073
  }
16969
- const selectedChoice = choices.find((c25) => c25.type === providerType);
17074
+ const selectedChoice = choices.find((c26) => c26.type === providerType);
16970
17075
  if (selectedChoice?.helpText) {
16971
17076
  for (const line of selectedChoice.helpText.split("\n")) {
16972
17077
  step.detail(chalk75.dim(line));
@@ -17320,13 +17425,13 @@ var upgradeCommand = new Command86().name("upgrade").description("Upgrade vm0 CL
17320
17425
  if (latestVersion === null) {
17321
17426
  throw new Error("Could not check for updates. Please try again later.");
17322
17427
  }
17323
- if (latestVersion === "9.63.1") {
17324
- console.log(chalk79.green(`\u2713 Already up to date (${"9.63.1"})`));
17428
+ if (latestVersion === "9.63.2") {
17429
+ console.log(chalk79.green(`\u2713 Already up to date (${"9.63.2"})`));
17325
17430
  return;
17326
17431
  }
17327
17432
  console.log(
17328
17433
  chalk79.yellow(
17329
- `Current version: ${"9.63.1"} -> Latest version: ${latestVersion}`
17434
+ `Current version: ${"9.63.2"} -> Latest version: ${latestVersion}`
17330
17435
  )
17331
17436
  );
17332
17437
  console.log();
@@ -17353,7 +17458,7 @@ var upgradeCommand = new Command86().name("upgrade").description("Upgrade vm0 CL
17353
17458
  const success = await performUpgrade(packageManager);
17354
17459
  if (success) {
17355
17460
  console.log(
17356
- chalk79.green(`\u2713 Upgraded from ${"9.63.1"} to ${latestVersion}`)
17461
+ chalk79.green(`\u2713 Upgraded from ${"9.63.2"} to ${latestVersion}`)
17357
17462
  );
17358
17463
  return;
17359
17464
  }
@@ -17367,7 +17472,7 @@ var upgradeCommand = new Command86().name("upgrade").description("Upgrade vm0 CL
17367
17472
 
17368
17473
  // src/index.ts
17369
17474
  var program = new Command87();
17370
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.63.1");
17475
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.63.2");
17371
17476
  program.addCommand(authCommand);
17372
17477
  program.addCommand(infoCommand);
17373
17478
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.63.1",
3
+ "version": "9.63.2",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",