@vm0/cli 9.115.0 → 9.116.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/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,
@@ -71,7 +72,7 @@ import {
71
72
  source_default,
72
73
  volumeConfigSchema,
73
74
  withErrorHandler
74
- } from "./chunk-ONKLFZRY.js";
75
+ } from "./chunk-5FGI5P6M.js";
75
76
 
76
77
  // src/index.ts
77
78
  init_esm_shims();
@@ -464,7 +465,7 @@ function getConfigPath() {
464
465
  return join(homedir(), ".vm0", "config.json");
465
466
  }
466
467
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
467
- console.log(source_default.bold(`VM0 CLI v${"9.115.0"}`));
468
+ console.log(source_default.bold(`VM0 CLI v${"9.116.1"}`));
468
469
  console.log();
469
470
  const config = await loadConfig();
470
471
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -4401,7 +4402,7 @@ async function finalizeCompose(config, agent, options) {
4401
4402
  console.log(" Run your agent:");
4402
4403
  console.log(
4403
4404
  source_default.cyan(
4404
- ` vm0 run ${displayName}:${shortVersionId} --artifact-name <artifact> "your prompt"`
4405
+ ` vm0 run ${displayName}:${shortVersionId} --artifact <artifact> "your prompt"`
4405
4406
  )
4406
4407
  );
4407
4408
  }
@@ -4493,7 +4494,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4493
4494
  options.autoUpdate = false;
4494
4495
  }
4495
4496
  if (options.autoUpdate !== false) {
4496
- await startSilentUpgrade("9.115.0");
4497
+ await startSilentUpgrade("9.116.1");
4497
4498
  }
4498
4499
  try {
4499
4500
  let result;
@@ -4558,6 +4559,11 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4558
4559
  "Volume version override (repeatable, format: volumeName=version)",
4559
4560
  collectVolumeVersions,
4560
4561
  {}
4562
+ ).option(
4563
+ "--volume <volume>",
4564
+ "Mount a volume (repeatable, format: name:/path or name:version:/path)",
4565
+ collectVolumes,
4566
+ []
4561
4567
  ).option("--memory <name>", "Memory storage name").option(
4562
4568
  "--conversation <id>",
4563
4569
  "Resume from conversation ID (for fine-grained control)"
@@ -4583,7 +4589,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4583
4589
  withErrorHandler(
4584
4590
  async (identifier, prompt, options) => {
4585
4591
  if (options.autoUpdate !== false) {
4586
- await startSilentUpgrade("9.115.0");
4592
+ await startSilentUpgrade("9.116.1");
4587
4593
  }
4588
4594
  const { name, version } = parseIdentifier(identifier);
4589
4595
  let composeId;
@@ -4611,7 +4617,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4611
4617
  agentComposeVersionId = versionInfo.versionId;
4612
4618
  } catch (error) {
4613
4619
  throw new Error(`Version not found: ${version}`, {
4614
- cause: error instanceof Error ? error : void 0
4620
+ cause: error
4615
4621
  });
4616
4622
  }
4617
4623
  }
@@ -4641,6 +4647,8 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4641
4647
  )
4642
4648
  );
4643
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;
4644
4652
  const response = await createRun({
4645
4653
  // Use agentComposeVersionId if resolved, otherwise use agentComposeId (resolves to HEAD)
4646
4654
  ...agentComposeVersionId ? { agentComposeVersionId } : { agentComposeId: composeId },
@@ -4650,7 +4658,8 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4650
4658
  artifactName,
4651
4659
  artifactVersion,
4652
4660
  memoryName: options.memory,
4653
- volumeVersions: Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0,
4661
+ volumeVersions,
4662
+ additionalVolumes,
4654
4663
  conversationId: options.conversation,
4655
4664
  appendSystemPrompt: options.appendSystemPrompt,
4656
4665
  disallowedTools: options.disallowedTools,
@@ -4706,6 +4715,11 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
4706
4715
  ).option(
4707
4716
  "--artifact <name[:version]>",
4708
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
+ []
4709
4723
  ).option(
4710
4724
  "--append-system-prompt <text>",
4711
4725
  "Append text to the agent's system prompt"
@@ -4739,14 +4753,18 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
4739
4753
  const artifactParsed = parseArtifact(
4740
4754
  options.artifact || allOpts.artifact
4741
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;
4742
4759
  const response = await createRun({
4743
4760
  checkpointId,
4744
4761
  prompt,
4745
- vars: Object.keys(vars).length > 0 ? vars : void 0,
4762
+ vars: resolvedVars,
4746
4763
  secrets: loadedSecrets,
4747
4764
  artifactName: artifactParsed?.artifactName,
4748
4765
  artifactVersion: artifactParsed?.artifactVersion,
4749
- volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0,
4766
+ volumeVersions,
4767
+ additionalVolumes,
4750
4768
  appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
4751
4769
  disallowedTools: options.disallowedTools || allOpts.disallowedTools,
4752
4770
  tools: options.tools || allOpts.tools,
@@ -4754,7 +4772,7 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
4754
4772
  permissionPolicies: parsePermissionPolicies(
4755
4773
  options.permissionPolicies || allOpts.permissionPolicies
4756
4774
  ),
4757
- debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
4775
+ debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude
4758
4776
  });
4759
4777
  if (response.status === "failed") {
4760
4778
  throw new Error(
@@ -4793,6 +4811,11 @@ var continueCommand = new Command().name("continue").description(
4793
4811
  ).option(
4794
4812
  "--artifact <name[:version]>",
4795
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
+ []
4796
4819
  ).option(
4797
4820
  "--append-system-prompt <text>",
4798
4821
  "Append text to the agent's system prompt"
@@ -4834,6 +4857,7 @@ var continueCommand = new Command().name("continue").description(
4834
4857
  secrets: loadedSecrets,
4835
4858
  artifactName: artifactParsed?.artifactName,
4836
4859
  artifactVersion: artifactParsed?.artifactVersion,
4860
+ additionalVolumes: allOpts.volume.length > 0 ? allOpts.volume : void 0,
4837
4861
  appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
4838
4862
  disallowedTools: options.disallowedTools || allOpts.disallowedTools,
4839
4863
  tools: options.tools || allOpts.tools,
@@ -6326,14 +6350,12 @@ async function composeAgent(cwd, skipConfirm) {
6326
6350
  async function runAgent(agentName, artifactDir, prompt, cwd, options) {
6327
6351
  console.log();
6328
6352
  console.log(source_default.bold("Running agent:"));
6329
- printCommand(
6330
- `vm0 run ${agentName} --artifact-name ${ARTIFACT_DIR} "${prompt}"`
6331
- );
6353
+ printCommand(`vm0 run ${agentName} --artifact ${ARTIFACT_DIR} "${prompt}"`);
6332
6354
  console.log();
6333
6355
  const runArgs = [
6334
6356
  "run",
6335
6357
  agentName,
6336
- "--artifact-name",
6358
+ "--artifact",
6337
6359
  ARTIFACT_DIR,
6338
6360
  ...options.envFile ? ["--env-file", options.envFile] : [],
6339
6361
  ...options.verbose ? ["--verbose"] : [],
@@ -6358,7 +6380,7 @@ var cookAction = new Command().name("cook").description("Quick start: prepare, c
6358
6380
  withErrorHandler(
6359
6381
  async (prompt, options) => {
6360
6382
  if (options.autoUpdate !== false) {
6361
- const shouldExit = await checkAndUpgrade("9.115.0", prompt);
6383
+ const shouldExit = await checkAndUpgrade("9.116.1", prompt);
6362
6384
  if (shouldExit) {
6363
6385
  process.exit(0);
6364
6386
  }
@@ -6378,7 +6400,7 @@ var cookAction = new Command().name("cook").description("Quick start: prepare, c
6378
6400
  console.log();
6379
6401
  console.log("To run your agent:");
6380
6402
  printCommand(
6381
- `vm0 run ${agentName} --artifact-name ${ARTIFACT_DIR} "your prompt"`
6403
+ `vm0 run ${agentName} --artifact ${ARTIFACT_DIR} "your prompt"`
6382
6404
  );
6383
6405
  }
6384
6406
  }
@@ -7125,13 +7147,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
7125
7147
  if (latestVersion === null) {
7126
7148
  throw new Error("Could not check for updates. Please try again later.");
7127
7149
  }
7128
- if (latestVersion === "9.115.0") {
7129
- console.log(source_default.green(`\u2713 Already up to date (${"9.115.0"})`));
7150
+ if (latestVersion === "9.116.1") {
7151
+ console.log(source_default.green(`\u2713 Already up to date (${"9.116.1"})`));
7130
7152
  return;
7131
7153
  }
7132
7154
  console.log(
7133
7155
  source_default.yellow(
7134
- `Current version: ${"9.115.0"} -> Latest version: ${latestVersion}`
7156
+ `Current version: ${"9.116.1"} -> Latest version: ${latestVersion}`
7135
7157
  )
7136
7158
  );
7137
7159
  console.log();
@@ -7158,7 +7180,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
7158
7180
  const success = await performUpgrade(packageManager);
7159
7181
  if (success) {
7160
7182
  console.log(
7161
- source_default.green(`\u2713 Upgraded from ${"9.115.0"} to ${latestVersion}`)
7183
+ source_default.green(`\u2713 Upgraded from ${"9.116.1"} to ${latestVersion}`)
7162
7184
  );
7163
7185
  return;
7164
7186
  }
@@ -7225,7 +7247,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
7225
7247
 
7226
7248
  // src/index.ts
7227
7249
  var program = new Command();
7228
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.115.0");
7250
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.116.1");
7229
7251
  program.addCommand(authCommand);
7230
7252
  program.addCommand(infoCommand);
7231
7253
  program.addCommand(composeCommand);