@vm0/cli 9.26.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 +54 -80
  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.26.0",
64
+ version: "9.27.1",
65
65
  command: process.argv.slice(2).join(" ")
66
66
  });
67
67
  Sentry.setContext("runtime", {
@@ -72,7 +72,7 @@ if (DSN) {
72
72
  }
73
73
 
74
74
  // src/index.ts
75
- import { Command as Command75 } from "commander";
75
+ import { Command as Command76 } from "commander";
76
76
 
77
77
  // src/commands/auth/index.ts
78
78
  import { Command as Command5 } from "commander";
@@ -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.26.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.26.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.26.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
  });
@@ -14083,12 +14028,40 @@ var setupClaudeCommand = new Command72().name("setup-claude").description("Insta
14083
14028
  );
14084
14029
  });
14085
14030
 
14031
+ // src/commands/dashboard/index.ts
14032
+ import { Command as Command73 } from "commander";
14033
+ import chalk71 from "chalk";
14034
+ var dashboardCommand = new Command73().name("dashboard").description("Quick reference for common query commands").action(() => {
14035
+ console.log();
14036
+ console.log(chalk71.bold("VM0 Dashboard"));
14037
+ console.log();
14038
+ console.log(chalk71.bold("Agents"));
14039
+ console.log(chalk71.dim(" List agents: ") + "vm0 agent list");
14040
+ console.log();
14041
+ console.log(chalk71.bold("Runs"));
14042
+ console.log(chalk71.dim(" Recent runs: ") + "vm0 run list");
14043
+ console.log(chalk71.dim(" View run logs: ") + "vm0 logs <run-id>");
14044
+ console.log();
14045
+ console.log(chalk71.bold("Schedules"));
14046
+ console.log(chalk71.dim(" List schedules: ") + "vm0 schedule list");
14047
+ console.log();
14048
+ console.log(chalk71.bold("Account"));
14049
+ console.log(chalk71.dim(" Usage stats: ") + "vm0 usage");
14050
+ console.log(chalk71.dim(" List secrets: ") + "vm0 secret list");
14051
+ console.log(chalk71.dim(" List variables: ") + "vm0 variable list");
14052
+ console.log();
14053
+ console.log(
14054
+ chalk71.dim("Not logged in? Run: ") + chalk71.cyan("vm0 auth login")
14055
+ );
14056
+ console.log();
14057
+ });
14058
+
14086
14059
  // src/commands/dev-tool/index.ts
14087
- import { Command as Command74 } from "commander";
14060
+ import { Command as Command75 } from "commander";
14088
14061
 
14089
14062
  // src/commands/dev-tool/compose.ts
14090
- import { Command as Command73 } from "commander";
14091
- import chalk71 from "chalk";
14063
+ import { Command as Command74 } from "commander";
14064
+ import chalk72 from "chalk";
14092
14065
  import { initClient as initClient13 } from "@ts-rest/core";
14093
14066
  function sleep2(ms) {
14094
14067
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -14140,7 +14113,7 @@ async function pollUntilComplete(jobId, intervalMs, timeoutMs, jsonMode) {
14140
14113
  const job = await getComposeJobStatus(jobId);
14141
14114
  if (!jsonMode) {
14142
14115
  console.log(
14143
- chalk71.dim(`[${timestamp()}] Polling... status=${job.status}`)
14116
+ chalk72.dim(`[${timestamp()}] Polling... status=${job.status}`)
14144
14117
  );
14145
14118
  }
14146
14119
  if (job.status === "completed" || job.status === "failed") {
@@ -14150,7 +14123,7 @@ async function pollUntilComplete(jobId, intervalMs, timeoutMs, jsonMode) {
14150
14123
  }
14151
14124
  throw new Error(`Timeout after ${timeoutMs / 1e3} seconds`);
14152
14125
  }
14153
- var composeCommand2 = new Command73().name("compose").description("Test server-side GitHub compose API").argument("<github-url>", "GitHub URL to compose from").option("--overwrite", "Overwrite existing compose", false).option(
14126
+ var composeCommand2 = new Command74().name("compose").description("Test server-side GitHub compose API").argument("<github-url>", "GitHub URL to compose from").option("--overwrite", "Overwrite existing compose", false).option(
14154
14127
  "--interval <seconds>",
14155
14128
  "Polling interval in seconds",
14156
14129
  (v) => parseInt(v, 10),
@@ -14173,7 +14146,7 @@ var composeCommand2 = new Command73().name("compose").description("Test server-s
14173
14146
  options.overwrite
14174
14147
  );
14175
14148
  if (!options.json) {
14176
- console.log(`Job ID: ${chalk71.cyan(jobId)}`);
14149
+ console.log(`Job ID: ${chalk72.cyan(jobId)}`);
14177
14150
  console.log();
14178
14151
  }
14179
14152
  if (initialStatus === "completed" || initialStatus === "failed") {
@@ -14207,7 +14180,7 @@ var composeCommand2 = new Command73().name("compose").description("Test server-s
14207
14180
  );
14208
14181
  } else {
14209
14182
  console.error(
14210
- chalk71.red(
14183
+ chalk72.red(
14211
14184
  `\u2717 ${error instanceof Error ? error.message : String(error)}`
14212
14185
  )
14213
14186
  );
@@ -14218,21 +14191,21 @@ var composeCommand2 = new Command73().name("compose").description("Test server-s
14218
14191
  );
14219
14192
  function displayResult(job) {
14220
14193
  if (job.status === "completed" && job.result) {
14221
- console.log(chalk71.green("\u2713 Compose completed!"));
14222
- console.log(` Compose ID: ${chalk71.cyan(job.result.composeId)}`);
14223
- console.log(` Name: ${chalk71.cyan(job.result.composeName)}`);
14224
- console.log(` Version: ${chalk71.cyan(job.result.versionId.slice(0, 8))}`);
14194
+ console.log(chalk72.green("\u2713 Compose completed!"));
14195
+ console.log(` Compose ID: ${chalk72.cyan(job.result.composeId)}`);
14196
+ console.log(` Name: ${chalk72.cyan(job.result.composeName)}`);
14197
+ console.log(` Version: ${chalk72.cyan(job.result.versionId.slice(0, 8))}`);
14225
14198
  if (job.result.warnings.length > 0) {
14226
14199
  console.log();
14227
- console.log(chalk71.yellow(" Warnings:"));
14200
+ console.log(chalk72.yellow(" Warnings:"));
14228
14201
  for (const warning of job.result.warnings) {
14229
- console.log(chalk71.yellow(` - ${warning}`));
14202
+ console.log(chalk72.yellow(` - ${warning}`));
14230
14203
  }
14231
14204
  }
14232
14205
  } else if (job.status === "failed") {
14233
- console.error(chalk71.red("\u2717 Compose failed"));
14206
+ console.error(chalk72.red("\u2717 Compose failed"));
14234
14207
  if (job.error) {
14235
- console.error(` Error: ${chalk71.red(job.error)}`);
14208
+ console.error(` Error: ${chalk72.red(job.error)}`);
14236
14209
  }
14237
14210
  } else {
14238
14211
  console.log(`Status: ${job.status}`);
@@ -14240,11 +14213,11 @@ function displayResult(job) {
14240
14213
  }
14241
14214
 
14242
14215
  // src/commands/dev-tool/index.ts
14243
- var devToolCommand = new Command74().name("dev-tool").description("Developer tools for testing and debugging").addCommand(composeCommand2);
14216
+ var devToolCommand = new Command75().name("dev-tool").description("Developer tools for testing and debugging").addCommand(composeCommand2);
14244
14217
 
14245
14218
  // src/index.ts
14246
- var program = new Command75();
14247
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.26.0");
14219
+ var program = new Command76();
14220
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.27.1");
14248
14221
  program.addCommand(authCommand);
14249
14222
  program.addCommand(infoCommand);
14250
14223
  program.addCommand(composeCommand);
@@ -14264,6 +14237,7 @@ program.addCommand(modelProviderCommand);
14264
14237
  program.addCommand(connectorCommand);
14265
14238
  program.addCommand(onboardCommand);
14266
14239
  program.addCommand(setupClaudeCommand);
14240
+ program.addCommand(dashboardCommand);
14267
14241
  program.addCommand(devToolCommand, { hidden: true });
14268
14242
  if (process.argv[1]?.endsWith("index.js") || process.argv[1]?.endsWith("index.ts") || process.argv[1]?.endsWith("vm0")) {
14269
14243
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.26.0",
3
+ "version": "9.27.1",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",