@vm0/cli 9.27.0 → 9.27.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.
Files changed (2) hide show
  1. package/index.js +7 -62
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -61,7 +61,7 @@ if (DSN) {
61
61
  }
62
62
  });
63
63
  Sentry.setContext("cli", {
64
- version: "9.27.0",
64
+ version: "9.27.1",
65
65
  command: process.argv.slice(2).join(" ")
66
66
  });
67
67
  Sentry.setContext("runtime", {
@@ -5922,7 +5922,7 @@ async function finalizeCompose(config, agent, variables, options) {
5922
5922
  );
5923
5923
  }
5924
5924
  if (options.autoUpdate !== false) {
5925
- await silentUpgradeAfterCommand("9.27.0");
5925
+ await silentUpgradeAfterCommand("9.27.1");
5926
5926
  }
5927
5927
  return result;
5928
5928
  }
@@ -8372,7 +8372,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
8372
8372
  }
8373
8373
  showNextSteps(result);
8374
8374
  if (options.autoUpdate !== false) {
8375
- await silentUpgradeAfterCommand("9.27.0");
8375
+ await silentUpgradeAfterCommand("9.27.1");
8376
8376
  }
8377
8377
  } catch (error) {
8378
8378
  handleRunError(error, identifier);
@@ -9471,7 +9471,6 @@ import { readFile as readFile7, mkdir as mkdir6 } from "fs/promises";
9471
9471
  import { existsSync as existsSync9 } from "fs";
9472
9472
  import path11 from "path";
9473
9473
  import { parse as parseYaml4 } from "yaml";
9474
- import { config as dotenvConfig2 } from "dotenv";
9475
9474
 
9476
9475
  // src/lib/domain/cook-state.ts
9477
9476
  import { homedir as homedir2 } from "os";
@@ -9665,34 +9664,6 @@ async function autoPullArtifact(runOutput, artifactDir) {
9665
9664
  }
9666
9665
 
9667
9666
  // src/commands/cook/cook.ts
9668
- function extractRequiredVarNames(config) {
9669
- const refs = extractVariableReferences(config);
9670
- const grouped = groupVariablesBySource(refs);
9671
- const varNames = grouped.vars.map((r) => r.name);
9672
- const secretNames = grouped.secrets.map((r) => r.name);
9673
- return [.../* @__PURE__ */ new Set([...varNames, ...secretNames])];
9674
- }
9675
- function checkMissingVariables(varNames, envFilePath) {
9676
- let fileValues = {};
9677
- if (envFilePath) {
9678
- if (!existsSync9(envFilePath)) {
9679
- throw new Error(`Environment file not found: ${envFilePath}`);
9680
- }
9681
- const result = dotenvConfig2({ path: envFilePath, quiet: true });
9682
- if (result.parsed) {
9683
- fileValues = result.parsed;
9684
- }
9685
- }
9686
- const missing = [];
9687
- for (const name of varNames) {
9688
- const inEnv = process.env[name] !== void 0;
9689
- const inFile = fileValues[name] !== void 0;
9690
- if (!inEnv && !inFile) {
9691
- missing.push(name);
9692
- }
9693
- }
9694
- return missing;
9695
- }
9696
9667
  async function loadAndValidateConfig2() {
9697
9668
  console.log(chalk29.bold(`Reading config: ${CONFIG_FILE2}`));
9698
9669
  if (!existsSync9(CONFIG_FILE2)) {
@@ -9723,33 +9694,6 @@ async function loadAndValidateConfig2() {
9723
9694
  );
9724
9695
  return { config, agentName, volumeCount };
9725
9696
  }
9726
- function validateEnvVariables(config, envFile) {
9727
- const requiredVarNames = extractRequiredVarNames(config);
9728
- if (requiredVarNames.length === 0) {
9729
- return;
9730
- }
9731
- try {
9732
- const missingVars = checkMissingVariables(requiredVarNames, envFile);
9733
- if (missingVars.length > 0) {
9734
- console.error();
9735
- console.error(chalk29.red("\u2717 Missing required variables:"));
9736
- for (const varName of missingVars) {
9737
- console.error(chalk29.red(` ${varName}`));
9738
- }
9739
- console.error(
9740
- chalk29.dim(
9741
- "\n Provide via --env-file, or set as environment variables"
9742
- )
9743
- );
9744
- process.exit(1);
9745
- }
9746
- } catch (error) {
9747
- if (error instanceof Error) {
9748
- console.error(chalk29.red(`\u2717 ${error.message}`));
9749
- }
9750
- process.exit(1);
9751
- }
9752
- }
9753
9697
  async function processVolumes(config, cwd) {
9754
9698
  if (!config.volumes || Object.keys(config.volumes).length === 0) {
9755
9699
  return;
@@ -9850,6 +9794,7 @@ async function runAgent(agentName, artifactDir, prompt, cwd, options) {
9850
9794
  agentName,
9851
9795
  "--artifact-name",
9852
9796
  ARTIFACT_DIR,
9797
+ ...options.envFile ? ["--env-file", options.envFile] : [],
9853
9798
  ...options.verbose ? ["--verbose"] : [],
9854
9799
  ...options.debugNoMockClaude ? ["--debug-no-mock-claude"] : [],
9855
9800
  prompt
@@ -9874,19 +9819,19 @@ var cookAction = new Command27().name("cook").description("Quick start: prepare,
9874
9819
  ).option("-y, --yes", "Skip confirmation prompts").option("-v, --verbose", "Show full tool inputs and outputs").addOption(new Option5("--debug-no-mock-claude").hideHelp()).addOption(new Option5("--no-auto-update").hideHelp()).action(
9875
9820
  async (prompt, options) => {
9876
9821
  if (options.autoUpdate !== false) {
9877
- const shouldExit = await checkAndUpgrade("9.27.0", prompt);
9822
+ const shouldExit = await checkAndUpgrade("9.27.1", prompt);
9878
9823
  if (shouldExit) {
9879
9824
  process.exit(0);
9880
9825
  }
9881
9826
  }
9882
9827
  const cwd = process.cwd();
9883
9828
  const { config, agentName } = await loadAndValidateConfig2();
9884
- validateEnvVariables(config, options.envFile);
9885
9829
  await processVolumes(config, cwd);
9886
9830
  const artifactDir = await processArtifact(cwd);
9887
9831
  await composeAgent(cwd, options.yes ?? false);
9888
9832
  if (prompt) {
9889
9833
  await runAgent(agentName, artifactDir, prompt, cwd, {
9834
+ envFile: options.envFile,
9890
9835
  verbose: options.verbose,
9891
9836
  debugNoMockClaude: options.debugNoMockClaude
9892
9837
  });
@@ -14272,7 +14217,7 @@ var devToolCommand = new Command75().name("dev-tool").description("Developer too
14272
14217
 
14273
14218
  // src/index.ts
14274
14219
  var program = new Command76();
14275
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.27.0");
14220
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.27.1");
14276
14221
  program.addCommand(authCommand);
14277
14222
  program.addCommand(infoCommand);
14278
14223
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.27.0",
3
+ "version": "9.27.1",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",