@vm0/cli 9.84.1 → 9.84.2

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
@@ -51,7 +51,7 @@ import {
51
51
  searchLogs,
52
52
  volumeConfigSchema,
53
53
  withErrorHandler
54
- } from "./chunk-A5NPNEP5.js";
54
+ } from "./chunk-UTY3UDKG.js";
55
55
 
56
56
  // src/index.ts
57
57
  import { Command as Command44 } from "commander";
@@ -436,7 +436,7 @@ function getConfigPath() {
436
436
  return join(homedir(), ".vm0", "config.json");
437
437
  }
438
438
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
439
- console.log(chalk3.bold(`VM0 CLI v${"9.84.1"}`));
439
+ console.log(chalk3.bold(`VM0 CLI v${"9.84.2"}`));
440
440
  console.log();
441
441
  const config = await loadConfig();
442
442
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -1662,7 +1662,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
1662
1662
  options.autoUpdate = false;
1663
1663
  }
1664
1664
  if (options.autoUpdate !== false) {
1665
- await startSilentUpgrade("9.84.1");
1665
+ await startSilentUpgrade("9.84.2");
1666
1666
  }
1667
1667
  try {
1668
1668
  let result;
@@ -2497,7 +2497,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
2497
2497
  withErrorHandler(
2498
2498
  async (identifier, prompt, options) => {
2499
2499
  if (options.autoUpdate !== false) {
2500
- await startSilentUpgrade("9.84.1");
2500
+ await startSilentUpgrade("9.84.2");
2501
2501
  }
2502
2502
  const { org, name, version } = parseIdentifier(identifier);
2503
2503
  let composeId;
@@ -4253,7 +4253,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
4253
4253
  withErrorHandler(
4254
4254
  async (prompt, options) => {
4255
4255
  if (options.autoUpdate !== false) {
4256
- const shouldExit = await checkAndUpgrade("9.84.1", prompt);
4256
+ const shouldExit = await checkAndUpgrade("9.84.2", prompt);
4257
4257
  if (shouldExit) {
4258
4258
  process.exit(0);
4259
4259
  }
@@ -4993,13 +4993,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
4993
4993
  if (latestVersion === null) {
4994
4994
  throw new Error("Could not check for updates. Please try again later.");
4995
4995
  }
4996
- if (latestVersion === "9.84.1") {
4997
- console.log(chalk36.green(`\u2713 Already up to date (${"9.84.1"})`));
4996
+ if (latestVersion === "9.84.2") {
4997
+ console.log(chalk36.green(`\u2713 Already up to date (${"9.84.2"})`));
4998
4998
  return;
4999
4999
  }
5000
5000
  console.log(
5001
5001
  chalk36.yellow(
5002
- `Current version: ${"9.84.1"} -> Latest version: ${latestVersion}`
5002
+ `Current version: ${"9.84.2"} -> Latest version: ${latestVersion}`
5003
5003
  )
5004
5004
  );
5005
5005
  console.log();
@@ -5026,7 +5026,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
5026
5026
  const success = await performUpgrade(packageManager);
5027
5027
  if (success) {
5028
5028
  console.log(
5029
- chalk36.green(`\u2713 Upgraded from ${"9.84.1"} to ${latestVersion}`)
5029
+ chalk36.green(`\u2713 Upgraded from ${"9.84.2"} to ${latestVersion}`)
5030
5030
  );
5031
5031
  return;
5032
5032
  }
@@ -5094,7 +5094,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
5094
5094
 
5095
5095
  // src/index.ts
5096
5096
  var program = new Command44();
5097
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.84.1");
5097
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.84.2");
5098
5098
  program.addCommand(authCommand);
5099
5099
  program.addCommand(infoCommand);
5100
5100
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.84.1",
3
+ "version": "9.84.2",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -82,7 +82,7 @@ import {
82
82
  updateZeroUserPreferences,
83
83
  upsertZeroOrgModelProvider,
84
84
  withErrorHandler
85
- } from "./chunk-A5NPNEP5.js";
85
+ } from "./chunk-UTY3UDKG.js";
86
86
 
87
87
  // src/zero.ts
88
88
  import { Command as Command57 } from "commander";
@@ -1839,10 +1839,18 @@ var missingTokenCommand = new Command35().name("missing-token").description(
1839
1839
  );
1840
1840
  }
1841
1841
  const { label } = CONNECTOR_TYPES[connectorType];
1842
- const baseUrl = await getApiUrl();
1842
+ const apiUrl = await getApiUrl();
1843
+ const parsed = new URL(apiUrl);
1844
+ const parts = parsed.hostname.split(".");
1845
+ if (parts[0] === "www" || parts[0] === "platform") {
1846
+ parts[0] = "app";
1847
+ } else if (parts[0] !== "app" && parts[0] !== "localhost") {
1848
+ parts.unshift("app");
1849
+ }
1850
+ parsed.hostname = parts.join(".");
1843
1851
  const agentId = process.env.ZERO_AGENT_ID;
1844
1852
  const path = agentId ? `/team/${agentId}` : "/team";
1845
- const url = `${baseUrl}${path}?tab=connectors`;
1853
+ const url = `${parsed.origin}${path}?tab=connectors`;
1846
1854
  console.log(`${tokenName} is provided by the ${label} connector.`);
1847
1855
  console.log(`Ask the user to connect it at: ${url}`);
1848
1856
  })
@@ -3020,7 +3028,7 @@ function registerZeroCommands(prog, commands) {
3020
3028
  var program = new Command57();
3021
3029
  program.name("zero").description(
3022
3030
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
3023
- ).version("9.84.1").addHelpText(
3031
+ ).version("9.84.2").addHelpText(
3024
3032
  "after",
3025
3033
  `
3026
3034
  Common scenarios: