@vm0/cli 9.101.0 → 9.102.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.
@@ -49,7 +49,7 @@ if (DSN) {
49
49
  Sentry.init({
50
50
  dsn: DSN,
51
51
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
52
- release: "9.101.0",
52
+ release: "9.102.1",
53
53
  sendDefaultPii: false,
54
54
  tracesSampleRate: 0,
55
55
  shutdownTimeout: 500,
@@ -68,7 +68,7 @@ if (DSN) {
68
68
  }
69
69
  });
70
70
  Sentry.setContext("cli", {
71
- version: "9.101.0",
71
+ version: "9.102.1",
72
72
  command: process.argv.slice(2).join(" ")
73
73
  });
74
74
  Sentry.setContext("runtime", {
@@ -32112,4 +32112,4 @@ export {
32112
32112
  parseTime,
32113
32113
  paginate
32114
32114
  };
32115
- //# sourceMappingURL=chunk-X2L3TKWA.js.map
32115
+ //# sourceMappingURL=chunk-DJWH2DJQ.js.map
package/index.js CHANGED
@@ -61,7 +61,7 @@ import {
61
61
  showNextSteps,
62
62
  volumeConfigSchema,
63
63
  withErrorHandler
64
- } from "./chunk-X2L3TKWA.js";
64
+ } from "./chunk-DJWH2DJQ.js";
65
65
 
66
66
  // src/index.ts
67
67
  import { Command as Command44 } from "commander";
@@ -454,7 +454,7 @@ function getConfigPath() {
454
454
  return join(homedir(), ".vm0", "config.json");
455
455
  }
456
456
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
457
- console.log(chalk3.bold(`VM0 CLI v${"9.101.0"}`));
457
+ console.log(chalk3.bold(`VM0 CLI v${"9.102.1"}`));
458
458
  console.log();
459
459
  const config = await loadConfig();
460
460
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -1581,7 +1581,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
1581
1581
  options.autoUpdate = false;
1582
1582
  }
1583
1583
  if (options.autoUpdate !== false) {
1584
- await startSilentUpgrade("9.101.0");
1584
+ await startSilentUpgrade("9.102.1");
1585
1585
  }
1586
1586
  try {
1587
1587
  let result;
@@ -1655,7 +1655,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
1655
1655
  withErrorHandler(
1656
1656
  async (identifier, prompt, options) => {
1657
1657
  if (options.autoUpdate !== false) {
1658
- await startSilentUpgrade("9.101.0");
1658
+ await startSilentUpgrade("9.102.1");
1659
1659
  }
1660
1660
  const { name, version } = parseIdentifier(identifier);
1661
1661
  let composeId;
@@ -3413,7 +3413,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
3413
3413
  withErrorHandler(
3414
3414
  async (prompt, options) => {
3415
3415
  if (options.autoUpdate !== false) {
3416
- const shouldExit = await checkAndUpgrade("9.101.0", prompt);
3416
+ const shouldExit = await checkAndUpgrade("9.102.1", prompt);
3417
3417
  if (shouldExit) {
3418
3418
  process.exit(0);
3419
3419
  }
@@ -4156,13 +4156,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
4156
4156
  if (latestVersion === null) {
4157
4157
  throw new Error("Could not check for updates. Please try again later.");
4158
4158
  }
4159
- if (latestVersion === "9.101.0") {
4160
- console.log(chalk33.green(`\u2713 Already up to date (${"9.101.0"})`));
4159
+ if (latestVersion === "9.102.1") {
4160
+ console.log(chalk33.green(`\u2713 Already up to date (${"9.102.1"})`));
4161
4161
  return;
4162
4162
  }
4163
4163
  console.log(
4164
4164
  chalk33.yellow(
4165
- `Current version: ${"9.101.0"} -> Latest version: ${latestVersion}`
4165
+ `Current version: ${"9.102.1"} -> Latest version: ${latestVersion}`
4166
4166
  )
4167
4167
  );
4168
4168
  console.log();
@@ -4189,7 +4189,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
4189
4189
  const success = await performUpgrade(packageManager);
4190
4190
  if (success) {
4191
4191
  console.log(
4192
- chalk33.green(`\u2713 Upgraded from ${"9.101.0"} to ${latestVersion}`)
4192
+ chalk33.green(`\u2713 Upgraded from ${"9.102.1"} to ${latestVersion}`)
4193
4193
  );
4194
4194
  return;
4195
4195
  }
@@ -4257,7 +4257,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
4257
4257
 
4258
4258
  // src/index.ts
4259
4259
  var program = new Command44();
4260
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.101.0");
4260
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.102.1");
4261
4261
  program.addCommand(authCommand);
4262
4262
  program.addCommand(infoCommand);
4263
4263
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.101.0",
3
+ "version": "9.102.1",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -114,7 +114,7 @@ import {
114
114
  updateZeroUserPreferences,
115
115
  upsertZeroOrgModelProvider,
116
116
  withErrorHandler
117
- } from "./chunk-X2L3TKWA.js";
117
+ } from "./chunk-DJWH2DJQ.js";
118
118
 
119
119
  // src/zero.ts
120
120
  import { Command as Command77 } from "commander";
@@ -4803,6 +4803,14 @@ var ACTION_COMMANDS = {
4803
4803
  move: "m"
4804
4804
  };
4805
4805
  var VALID_ACTIONS = new Set(Object.keys(ACTION_COMMANDS));
4806
+ async function isCliclickInstalled() {
4807
+ try {
4808
+ await execFileAsync2("which", ["cliclick"]);
4809
+ return true;
4810
+ } catch {
4811
+ return false;
4812
+ }
4813
+ }
4806
4814
  async function checkCliclickInstalled() {
4807
4815
  try {
4808
4816
  await execFileAsync2("which", ["cliclick"]);
@@ -5300,6 +5308,14 @@ var hostStartCommand = new Command74().name("start").description("Start the comp
5300
5308
  "Computer-use host requires macOS\n\nThe host daemon uses macOS-specific commands (screencapture, system_profiler)."
5301
5309
  );
5302
5310
  }
5311
+ if (!await isCliclickInstalled()) {
5312
+ console.log(
5313
+ chalk57.yellow(
5314
+ "\u26A0 cliclick not found. Mouse and keyboard operations will not be available.\n Install with: brew install cliclick"
5315
+ )
5316
+ );
5317
+ console.log();
5318
+ }
5303
5319
  console.log(chalk57.cyan("Registering computer-use host..."));
5304
5320
  const credentials = await registerComputerUseHost();
5305
5321
  const port = await getRandomPort2();
@@ -5349,6 +5365,21 @@ var hostStartCommand = new Command74().name("start").description("Start the comp
5349
5365
  }
5350
5366
  })
5351
5367
  );
5368
+ var hostStopCommand = new Command74().name("stop").description("Stop and unregister the computer-use host").action(
5369
+ withErrorHandler(async () => {
5370
+ console.log(chalk57.cyan("Unregistering computer-use host..."));
5371
+ try {
5372
+ await unregisterComputerUseHost();
5373
+ console.log(chalk57.green("\u2713 Host unregistered"));
5374
+ } catch (error) {
5375
+ if (error instanceof ApiRequestError && error.status === 404) {
5376
+ console.log(chalk57.yellow("No active host registration found"));
5377
+ return;
5378
+ }
5379
+ throw error;
5380
+ }
5381
+ })
5382
+ );
5352
5383
 
5353
5384
  // src/commands/zero/computer-use/client.ts
5354
5385
  import { Command as Command75 } from "commander";
@@ -5620,13 +5651,14 @@ var clientCursorPositionCommand = new Command75().name("cursor-position").descri
5620
5651
  );
5621
5652
 
5622
5653
  // src/commands/zero/computer-use/index.ts
5623
- var hostCommand = new Command76().name("host").description("Manage computer-use host daemon").addCommand(hostStartCommand);
5654
+ var hostCommand = new Command76().name("host").description("Manage computer-use host daemon").addCommand(hostStartCommand).addCommand(hostStopCommand);
5624
5655
  var clientCommand = new Command76().name("client").description("Interact with remote computer-use host").addCommand(clientScreenshotCommand).addCommand(clientZoomCommand).addCommand(clientInfoCommand).addCommand(clientLeftClickCommand).addCommand(clientRightClickCommand).addCommand(clientMiddleClickCommand).addCommand(clientDoubleClickCommand).addCommand(clientTripleClickCommand).addCommand(clientLeftClickDragCommand).addCommand(clientLeftMouseDownCommand).addCommand(clientLeftMouseUpCommand).addCommand(clientScrollCommand).addCommand(clientReadClipboardCommand).addCommand(clientWriteClipboardCommand).addCommand(clientKeyCommand).addCommand(clientHoldKeyCommand).addCommand(clientTypeCommand).addCommand(clientOpenAppCommand).addCommand(clientMouseMoveCommand).addCommand(clientCursorPositionCommand);
5625
5656
  var zeroComputerUseCommand = new Command76().name("computer-use").description("Remote desktop control for cloud agents").addCommand(hostCommand).addCommand(clientCommand).addHelpText(
5626
5657
  "after",
5627
5658
  `
5628
5659
  Examples:
5629
5660
  Start the host daemon (on macOS): zero computer-use host start
5661
+ Stop the host daemon: zero computer-use host stop
5630
5662
  Take a screenshot (from agent): zero computer-use client screenshot
5631
5663
  Zoom into a region (from agent): zero computer-use client zoom --x 0 --y 0 --width 500 --height 500
5632
5664
  Get screen info (from agent): zero computer-use client info
@@ -5697,7 +5729,7 @@ function registerZeroCommands(prog, commands) {
5697
5729
  var program = new Command77();
5698
5730
  program.name("zero").description(
5699
5731
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
5700
- ).version("9.101.0").addHelpText(
5732
+ ).version("9.102.1").addHelpText(
5701
5733
  "after",
5702
5734
  `
5703
5735
  Examples: