@vm0/cli 9.84.1 → 9.84.3

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-2OLTSQSV.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.3"}`));
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.3");
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.3");
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.3", 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.3") {
4997
+ console.log(chalk36.green(`\u2713 Already up to date (${"9.84.3"})`));
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.3"} -> 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.3"} 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.3");
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.3",
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-2OLTSQSV.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
  })
@@ -2368,7 +2376,7 @@ async function handleScheduleEnabling(params) {
2368
2376
  showEnableHint(agentName);
2369
2377
  }
2370
2378
  }
2371
- var setupCommand2 = new Command38().name("setup").description("Create or edit a schedule for a zero agent").argument("<agent-name>", "Agent name to configure schedule for").option("-n, --name <schedule-name>", 'Schedule name (default: "default")').option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once|loop").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-i, --interval <seconds>", "Interval in seconds for loop mode").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option("--artifact-name <name>", "Artifact name", "artifact").option("-e, --enable", "Enable schedule immediately after creation").option("--notify-email", "Enable email notifications (default: true)").option("--no-notify-email", "Disable email notifications").option("--notify-slack", "Enable Slack notifications (default: true)").option("--no-notify-slack", "Disable Slack notifications").action(
2379
+ var setupCommand2 = new Command38().name("setup").description("Create or edit a schedule for a zero agent").argument("<agent-id>", "Agent ID").option("-n, --name <schedule-name>", 'Schedule name (default: "default")').option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once|loop").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-i, --interval <seconds>", "Interval in seconds for loop mode").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option("--artifact-name <name>", "Artifact name", "artifact").option("-e, --enable", "Enable schedule immediately after creation").option("--notify-email", "Enable email notifications (default: true)").option("--no-notify-email", "Disable email notifications").option("--notify-slack", "Enable Slack notifications (default: true)").option("--no-notify-slack", "Disable Slack notifications").action(
2372
2380
  withErrorHandler(async (agentName, options) => {
2373
2381
  const compose = await getComposeByName(agentName);
2374
2382
  if (!compose) {
@@ -2457,7 +2465,7 @@ var listCommand7 = new Command39().name("list").alias("ls").description("List al
2457
2465
  if (result.schedules.length === 0) {
2458
2466
  console.log(chalk33.dim("No schedules found"));
2459
2467
  console.log(
2460
- chalk33.dim(" Create one with: zero schedule setup <agent-name>")
2468
+ chalk33.dim(" Create one with: zero schedule setup <agent-id>")
2461
2469
  );
2462
2470
  return;
2463
2471
  }
@@ -2559,7 +2567,7 @@ function printTimeSchedule(schedule) {
2559
2567
  console.log(`${"Failures:".padEnd(16)}${failureText}`);
2560
2568
  }
2561
2569
  }
2562
- var statusCommand3 = new Command40().name("status").description("Show detailed status of a zero schedule").argument("<agent-name>", "Agent name").option(
2570
+ var statusCommand3 = new Command40().name("status").description("Show detailed status of a zero schedule").argument("<agent-id>", "Agent ID").option(
2563
2571
  "-n, --name <schedule-name>",
2564
2572
  "Schedule name (required when agent has multiple schedules)"
2565
2573
  ).action(
@@ -2580,7 +2588,7 @@ var statusCommand3 = new Command40().name("status").description("Show detailed s
2580
2588
  // src/commands/zero/schedule/delete.ts
2581
2589
  import { Command as Command41 } from "commander";
2582
2590
  import chalk35 from "chalk";
2583
- var deleteCommand3 = new Command41().name("delete").alias("rm").description("Delete a zero schedule").argument("<agent-name>", "Agent name").option(
2591
+ var deleteCommand3 = new Command41().name("delete").alias("rm").description("Delete a zero schedule").argument("<agent-id>", "Agent ID").option(
2584
2592
  "-n, --name <schedule-name>",
2585
2593
  "Schedule name (required when agent has multiple schedules)"
2586
2594
  ).option("-y, --yes", "Skip confirmation prompt").action(
@@ -2615,7 +2623,7 @@ var deleteCommand3 = new Command41().name("delete").alias("rm").description("Del
2615
2623
  // src/commands/zero/schedule/enable.ts
2616
2624
  import { Command as Command42 } from "commander";
2617
2625
  import chalk36 from "chalk";
2618
- var enableCommand = new Command42().name("enable").description("Enable a zero schedule").argument("<agent-name>", "Agent name").option(
2626
+ var enableCommand = new Command42().name("enable").description("Enable a zero schedule").argument("<agent-id>", "Agent ID").option(
2619
2627
  "-n, --name <schedule-name>",
2620
2628
  "Schedule name (required when agent has multiple schedules)"
2621
2629
  ).action(
@@ -2635,7 +2643,7 @@ var enableCommand = new Command42().name("enable").description("Enable a zero sc
2635
2643
  // src/commands/zero/schedule/disable.ts
2636
2644
  import { Command as Command43 } from "commander";
2637
2645
  import chalk37 from "chalk";
2638
- var disableCommand = new Command43().name("disable").description("Disable a zero schedule").argument("<agent-name>", "Agent name").option(
2646
+ var disableCommand = new Command43().name("disable").description("Disable a zero schedule").argument("<agent-id>", "Agent ID").option(
2639
2647
  "-n, --name <schedule-name>",
2640
2648
  "Schedule name (required when agent has multiple schedules)"
2641
2649
  ).action(
@@ -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.3").addHelpText(
3024
3032
  "after",
3025
3033
  `
3026
3034
  Common scenarios: