@vm0/cli 9.59.0 → 9.59.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 +32 -26
  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.59.0",
48
+ release: "9.59.1",
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.59.0",
67
+ version: "9.59.1",
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.59.0"}`));
676
+ console.log(chalk4.bold(`VM0 CLI v${"9.59.1"}`));
677
677
  console.log();
678
678
  const config = await loadConfig();
679
679
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -9393,7 +9393,7 @@ async function uploadAssets(agentName, agent, basePath, jsonMode) {
9393
9393
  }
9394
9394
  return skillResults;
9395
9395
  }
9396
- async function collectSkillVariables(skillResults, environment, agentName) {
9396
+ async function collectSkillVariables(skillResults, environment, agentName, options) {
9397
9397
  const skillSecrets = /* @__PURE__ */ new Map();
9398
9398
  const skillVars = /* @__PURE__ */ new Map();
9399
9399
  for (const result of skillResults) {
@@ -9421,12 +9421,15 @@ async function collectSkillVariables(skillResults, environment, agentName) {
9421
9421
  const newVars = [...skillVars.entries()].filter(
9422
9422
  ([name]) => !(name in environment)
9423
9423
  );
9424
- let headSecrets = /* @__PURE__ */ new Set();
9425
- const existingCompose = await getComposeByName(agentName);
9426
- if (existingCompose?.content) {
9427
- headSecrets = getSecretsFromComposeContent(existingCompose.content);
9424
+ let trulyNewSecrets = [];
9425
+ if (!options.json) {
9426
+ let headSecrets = /* @__PURE__ */ new Set();
9427
+ const existingCompose = await getComposeByName(agentName);
9428
+ if (existingCompose?.content) {
9429
+ headSecrets = getSecretsFromComposeContent(existingCompose.content);
9430
+ }
9431
+ trulyNewSecrets = newSecrets.map(([name]) => name).filter((name) => !headSecrets.has(name));
9428
9432
  }
9429
- const trulyNewSecrets = newSecrets.map(([name]) => name).filter((name) => !headSecrets.has(name));
9430
9433
  return { newSecrets, newVars, trulyNewSecrets };
9431
9434
  }
9432
9435
  async function displayAndConfirmVariables(variables, options) {
@@ -9745,9 +9748,8 @@ async function finalizeCompose(config, agent, variables, options) {
9745
9748
  console.log("Uploading compose...");
9746
9749
  }
9747
9750
  const response = await createOrUpdateCompose({ content: config });
9748
- const orgResponse = await getOrg();
9749
9751
  const shortVersionId = response.versionId.slice(0, 8);
9750
- const displayName = `${orgResponse.slug}/${response.name}`;
9752
+ const displayName = options.json ? response.name : `${(await getOrg()).slug}/${response.name}`;
9751
9753
  const result = {
9752
9754
  composeId: response.composeId,
9753
9755
  composeName: response.name,
@@ -9755,11 +9757,13 @@ async function finalizeCompose(config, agent, variables, options) {
9755
9757
  action: response.action,
9756
9758
  displayName
9757
9759
  };
9758
- const missingItems = await checkAndPromptMissingItems(config, options);
9759
- if (missingItems.missingSecrets.length > 0 || missingItems.missingVars.length > 0) {
9760
- result.missingSecrets = missingItems.missingSecrets;
9761
- result.missingVars = missingItems.missingVars;
9762
- result.setupUrl = missingItems.setupUrl;
9760
+ if (!options.json) {
9761
+ const missingItems = await checkAndPromptMissingItems(config, options);
9762
+ if (missingItems.missingSecrets.length > 0 || missingItems.missingVars.length > 0) {
9763
+ result.missingSecrets = missingItems.missingSecrets;
9764
+ result.missingVars = missingItems.missingVars;
9765
+ result.setupUrl = missingItems.setupUrl;
9766
+ }
9763
9767
  }
9764
9768
  if (!options.json) {
9765
9769
  if (response.action === "created") {
@@ -9846,7 +9850,8 @@ async function handleGitHubCompose(url, options) {
9846
9850
  const variables = await collectSkillVariables(
9847
9851
  skillResults,
9848
9852
  environment,
9849
- agentName
9853
+ agentName,
9854
+ options
9850
9855
  );
9851
9856
  return await finalizeCompose(config, agent, variables, options);
9852
9857
  } finally {
@@ -9878,7 +9883,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
9878
9883
  options.autoUpdate = false;
9879
9884
  }
9880
9885
  if (options.autoUpdate !== false) {
9881
- await startSilentUpgrade("9.59.0");
9886
+ await startSilentUpgrade("9.59.1");
9882
9887
  }
9883
9888
  try {
9884
9889
  let result;
@@ -9899,7 +9904,8 @@ var composeCommand = new Command7().name("compose").description("Create or updat
9899
9904
  const variables = await collectSkillVariables(
9900
9905
  skillResults,
9901
9906
  environment,
9902
- agentName
9907
+ agentName,
9908
+ options
9903
9909
  );
9904
9910
  result = await finalizeCompose(config, agent, variables, options);
9905
9911
  }
@@ -11051,7 +11057,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
11051
11057
  withErrorHandler(
11052
11058
  async (identifier, prompt, options) => {
11053
11059
  if (options.autoUpdate !== false) {
11054
- await startSilentUpgrade("9.59.0");
11060
+ await startSilentUpgrade("9.59.1");
11055
11061
  }
11056
11062
  const { org, name, version } = parseIdentifier(identifier);
11057
11063
  if (org && !options.experimentalSharedAgent) {
@@ -12738,7 +12744,7 @@ var cookAction = new Command34().name("cook").description("Quick start: prepare,
12738
12744
  withErrorHandler(
12739
12745
  async (prompt, options) => {
12740
12746
  if (options.autoUpdate !== false) {
12741
- const shouldExit = await checkAndUpgrade("9.59.0", prompt);
12747
+ const shouldExit = await checkAndUpgrade("9.59.1", prompt);
12742
12748
  if (shouldExit) {
12743
12749
  process.exit(0);
12744
12750
  }
@@ -18089,13 +18095,13 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
18089
18095
  if (latestVersion === null) {
18090
18096
  throw new Error("Could not check for updates. Please try again later.");
18091
18097
  }
18092
- if (latestVersion === "9.59.0") {
18093
- console.log(chalk84.green(`\u2713 Already up to date (${"9.59.0"})`));
18098
+ if (latestVersion === "9.59.1") {
18099
+ console.log(chalk84.green(`\u2713 Already up to date (${"9.59.1"})`));
18094
18100
  return;
18095
18101
  }
18096
18102
  console.log(
18097
18103
  chalk84.yellow(
18098
- `Current version: ${"9.59.0"} -> Latest version: ${latestVersion}`
18104
+ `Current version: ${"9.59.1"} -> Latest version: ${latestVersion}`
18099
18105
  )
18100
18106
  );
18101
18107
  console.log();
@@ -18122,7 +18128,7 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
18122
18128
  const success = await performUpgrade(packageManager);
18123
18129
  if (success) {
18124
18130
  console.log(
18125
- chalk84.green(`\u2713 Upgraded from ${"9.59.0"} to ${latestVersion}`)
18131
+ chalk84.green(`\u2713 Upgraded from ${"9.59.1"} to ${latestVersion}`)
18126
18132
  );
18127
18133
  return;
18128
18134
  }
@@ -18136,7 +18142,7 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
18136
18142
 
18137
18143
  // src/index.ts
18138
18144
  var program = new Command91();
18139
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.59.0");
18145
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.59.1");
18140
18146
  program.addCommand(authCommand);
18141
18147
  program.addCommand(infoCommand);
18142
18148
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.59.0",
3
+ "version": "9.59.1",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",