@vm0/cli 9.114.1 → 9.116.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/index.js CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  clearConfig,
15
15
  collectKeyValue,
16
16
  collectVolumeVersions,
17
+ collectVolumes,
17
18
  commitStorage,
18
19
  configureGlobalProxyFromEnv,
19
20
  createOrUpdateCompose,
@@ -50,6 +51,7 @@ import {
50
51
  loadConfig,
51
52
  loadValues,
52
53
  paginate,
54
+ parseArtifact,
53
55
  parseGitHubTreeUrl,
54
56
  parseGitHubUrl,
55
57
  parseIdentifier,
@@ -70,7 +72,7 @@ import {
70
72
  source_default,
71
73
  volumeConfigSchema,
72
74
  withErrorHandler
73
- } from "./chunk-KFF4XQ5R.js";
75
+ } from "./chunk-N3EY4HQ3.js";
74
76
 
75
77
  // src/index.ts
76
78
  init_esm_shims();
@@ -463,7 +465,7 @@ function getConfigPath() {
463
465
  return join(homedir(), ".vm0", "config.json");
464
466
  }
465
467
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
466
- console.log(source_default.bold(`VM0 CLI v${"9.114.1"}`));
468
+ console.log(source_default.bold(`VM0 CLI v${"9.116.0"}`));
467
469
  console.log();
468
470
  const config = await loadConfig();
469
471
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -4492,7 +4494,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4492
4494
  options.autoUpdate = false;
4493
4495
  }
4494
4496
  if (options.autoUpdate !== false) {
4495
- await startSilentUpgrade("9.114.1");
4497
+ await startSilentUpgrade("9.116.0");
4496
4498
  }
4497
4499
  try {
4498
4500
  let result;
@@ -4539,14 +4541,29 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4539
4541
  "Secrets for ${{ secrets.xxx }} (repeatable, falls back to --env-file or env vars)",
4540
4542
  collectKeyValue,
4541
4543
  {}
4542
- ).option("--artifact-name <name>", "Artifact storage name (required for run)").option(
4543
- "--artifact-version <hash>",
4544
- "Artifact version hash (defaults to latest)"
4544
+ ).option(
4545
+ "--artifact <name[:version]>",
4546
+ "Artifact storage (format: name or name:version)"
4547
+ ).addOption(
4548
+ new Option(
4549
+ "--artifact-name <name>",
4550
+ "[deprecated: use --artifact] Artifact storage name"
4551
+ ).hideHelp()
4552
+ ).addOption(
4553
+ new Option(
4554
+ "--artifact-version <hash>",
4555
+ "[deprecated: use --artifact] Artifact version hash"
4556
+ ).hideHelp()
4545
4557
  ).option(
4546
4558
  "--volume-version <name=version>",
4547
4559
  "Volume version override (repeatable, format: volumeName=version)",
4548
4560
  collectVolumeVersions,
4549
4561
  {}
4562
+ ).option(
4563
+ "--volume <volume>",
4564
+ "Mount a volume (repeatable, format: name:/path or name:version:/path)",
4565
+ collectVolumes,
4566
+ []
4550
4567
  ).option("--memory <name>", "Memory storage name").option(
4551
4568
  "--conversation <id>",
4552
4569
  "Resume from conversation ID (for fine-grained control)"
@@ -4572,7 +4589,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4572
4589
  withErrorHandler(
4573
4590
  async (identifier, prompt, options) => {
4574
4591
  if (options.autoUpdate !== false) {
4575
- await startSilentUpgrade("9.114.1");
4592
+ await startSilentUpgrade("9.116.0");
4576
4593
  }
4577
4594
  const { name, version } = parseIdentifier(identifier);
4578
4595
  let composeId;
@@ -4600,7 +4617,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4600
4617
  agentComposeVersionId = versionInfo.versionId;
4601
4618
  } catch (error) {
4602
4619
  throw new Error(`Version not found: ${version}`, {
4603
- cause: error instanceof Error ? error : void 0
4620
+ cause: error
4604
4621
  });
4605
4622
  }
4606
4623
  }
@@ -4612,16 +4629,37 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4612
4629
  secretNames,
4613
4630
  options.envFile
4614
4631
  );
4632
+ let artifactName = options.artifactName;
4633
+ let artifactVersion = options.artifactVersion;
4634
+ if (options.artifact) {
4635
+ if (options.artifactName || options.artifactVersion) {
4636
+ throw new Error(
4637
+ "Cannot use --artifact with --artifact-name or --artifact-version. Use --artifact <name[:version]> instead."
4638
+ );
4639
+ }
4640
+ const parsed = parseArtifact(options.artifact);
4641
+ artifactName = parsed.artifactName;
4642
+ artifactVersion = parsed.artifactVersion;
4643
+ } else if (options.artifactName) {
4644
+ console.error(
4645
+ source_default.yellow(
4646
+ "\u26A0 --artifact-name is deprecated, use --artifact <name[:version]> instead"
4647
+ )
4648
+ );
4649
+ }
4650
+ const volumeVersions = Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0;
4651
+ const additionalVolumes = options.volume.length > 0 ? options.volume : void 0;
4615
4652
  const response = await createRun({
4616
4653
  // Use agentComposeVersionId if resolved, otherwise use agentComposeId (resolves to HEAD)
4617
4654
  ...agentComposeVersionId ? { agentComposeVersionId } : { agentComposeId: composeId },
4618
4655
  prompt,
4619
4656
  vars,
4620
4657
  secrets,
4621
- artifactName: options.artifactName,
4622
- artifactVersion: options.artifactVersion,
4658
+ artifactName,
4659
+ artifactVersion,
4623
4660
  memoryName: options.memory,
4624
- volumeVersions: Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0,
4661
+ volumeVersions,
4662
+ additionalVolumes,
4625
4663
  conversationId: options.conversation,
4626
4664
  appendSystemPrompt: options.appendSystemPrompt,
4627
4665
  disallowedTools: options.disallowedTools,
@@ -4674,6 +4712,14 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
4674
4712
  "Volume version override (repeatable)",
4675
4713
  collectVolumeVersions,
4676
4714
  {}
4715
+ ).option(
4716
+ "--artifact <name[:version]>",
4717
+ "Artifact storage (format: name or name:version)"
4718
+ ).option(
4719
+ "--volume <volume>",
4720
+ "Mount a volume (repeatable, format: name:/path or name:version:/path)",
4721
+ collectVolumes,
4722
+ []
4677
4723
  ).option(
4678
4724
  "--append-system-prompt <text>",
4679
4725
  "Append text to the agent's system prompt"
@@ -4704,12 +4750,21 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
4704
4750
  const requiredSecretNames = checkpointInfo.agentComposeSnapshot.secretNames || [];
4705
4751
  const envFile = options.envFile || allOpts.envFile;
4706
4752
  const loadedSecrets = loadValues(secrets, requiredSecretNames, envFile);
4753
+ const artifactParsed = parseArtifact(
4754
+ options.artifact || allOpts.artifact
4755
+ );
4756
+ const resolvedVars = Object.keys(vars).length > 0 ? vars : void 0;
4757
+ const volumeVersions = Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0;
4758
+ const additionalVolumes = allOpts.volume.length > 0 ? allOpts.volume : void 0;
4707
4759
  const response = await createRun({
4708
4760
  checkpointId,
4709
4761
  prompt,
4710
- vars: Object.keys(vars).length > 0 ? vars : void 0,
4762
+ vars: resolvedVars,
4711
4763
  secrets: loadedSecrets,
4712
- volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0,
4764
+ artifactName: artifactParsed?.artifactName,
4765
+ artifactVersion: artifactParsed?.artifactVersion,
4766
+ volumeVersions,
4767
+ additionalVolumes,
4713
4768
  appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
4714
4769
  disallowedTools: options.disallowedTools || allOpts.disallowedTools,
4715
4770
  tools: options.tools || allOpts.tools,
@@ -4717,7 +4772,7 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
4717
4772
  permissionPolicies: parsePermissionPolicies(
4718
4773
  options.permissionPolicies || allOpts.permissionPolicies
4719
4774
  ),
4720
- debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
4775
+ debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude
4721
4776
  });
4722
4777
  if (response.status === "failed") {
4723
4778
  throw new Error(
@@ -4753,6 +4808,14 @@ var continueCommand = new Command().name("continue").description(
4753
4808
  "Secrets for ${{ secrets.xxx }} (repeatable, falls back to --env-file or env vars)",
4754
4809
  collectKeyValue,
4755
4810
  {}
4811
+ ).option(
4812
+ "--artifact <name[:version]>",
4813
+ "Artifact storage (format: name or name:version)"
4814
+ ).option(
4815
+ "--volume <volume>",
4816
+ "Mount a volume (repeatable, format: name:/path or name:version:/path)",
4817
+ collectVolumes,
4818
+ []
4756
4819
  ).option(
4757
4820
  "--append-system-prompt <text>",
4758
4821
  "Append text to the agent's system prompt"
@@ -4784,11 +4847,17 @@ var continueCommand = new Command().name("continue").description(
4784
4847
  const requiredSecretNames = sessionInfo.secretNames || [];
4785
4848
  const envFile = options.envFile || allOpts.envFile;
4786
4849
  const loadedSecrets = loadValues(secrets, requiredSecretNames, envFile);
4850
+ const artifactParsed = parseArtifact(
4851
+ options.artifact || allOpts.artifact
4852
+ );
4787
4853
  const response = await createRun({
4788
4854
  sessionId: agentSessionId,
4789
4855
  prompt,
4790
4856
  vars: Object.keys(vars).length > 0 ? vars : void 0,
4791
4857
  secrets: loadedSecrets,
4858
+ artifactName: artifactParsed?.artifactName,
4859
+ artifactVersion: artifactParsed?.artifactVersion,
4860
+ additionalVolumes: allOpts.volume.length > 0 ? allOpts.volume : void 0,
4792
4861
  appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
4793
4862
  disallowedTools: options.disallowedTools || allOpts.disallowedTools,
4794
4863
  tools: options.tools || allOpts.tools,
@@ -6313,7 +6382,7 @@ var cookAction = new Command().name("cook").description("Quick start: prepare, c
6313
6382
  withErrorHandler(
6314
6383
  async (prompt, options) => {
6315
6384
  if (options.autoUpdate !== false) {
6316
- const shouldExit = await checkAndUpgrade("9.114.1", prompt);
6385
+ const shouldExit = await checkAndUpgrade("9.116.0", prompt);
6317
6386
  if (shouldExit) {
6318
6387
  process.exit(0);
6319
6388
  }
@@ -7080,13 +7149,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
7080
7149
  if (latestVersion === null) {
7081
7150
  throw new Error("Could not check for updates. Please try again later.");
7082
7151
  }
7083
- if (latestVersion === "9.114.1") {
7084
- console.log(source_default.green(`\u2713 Already up to date (${"9.114.1"})`));
7152
+ if (latestVersion === "9.116.0") {
7153
+ console.log(source_default.green(`\u2713 Already up to date (${"9.116.0"})`));
7085
7154
  return;
7086
7155
  }
7087
7156
  console.log(
7088
7157
  source_default.yellow(
7089
- `Current version: ${"9.114.1"} -> Latest version: ${latestVersion}`
7158
+ `Current version: ${"9.116.0"} -> Latest version: ${latestVersion}`
7090
7159
  )
7091
7160
  );
7092
7161
  console.log();
@@ -7113,7 +7182,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
7113
7182
  const success = await performUpgrade(packageManager);
7114
7183
  if (success) {
7115
7184
  console.log(
7116
- source_default.green(`\u2713 Upgraded from ${"9.114.1"} to ${latestVersion}`)
7185
+ source_default.green(`\u2713 Upgraded from ${"9.116.0"} to ${latestVersion}`)
7117
7186
  );
7118
7187
  return;
7119
7188
  }
@@ -7180,7 +7249,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
7180
7249
 
7181
7250
  // src/index.ts
7182
7251
  var program = new Command();
7183
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.114.1");
7252
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.116.0");
7184
7253
  program.addCommand(authCommand);
7185
7254
  program.addCommand(infoCommand);
7186
7255
  program.addCommand(composeCommand);