@vm0/cli 9.171.0 → 9.172.0

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.
@@ -74083,7 +74083,7 @@ if (DSN) {
74083
74083
  init2({
74084
74084
  dsn: DSN,
74085
74085
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
74086
- release: "9.171.0",
74086
+ release: "9.172.0",
74087
74087
  sendDefaultPii: false,
74088
74088
  tracesSampleRate: 0,
74089
74089
  shutdownTimeout: 500,
@@ -74102,7 +74102,7 @@ if (DSN) {
74102
74102
  }
74103
74103
  });
74104
74104
  setContext("cli", {
74105
- version: "9.171.0",
74105
+ version: "9.172.0",
74106
74106
  command: process.argv.slice(2).join(" ")
74107
74107
  });
74108
74108
  setContext("runtime", {
@@ -135117,4 +135117,4 @@ undici/lib/web/fetch/body.js:
135117
135117
  undici/lib/web/websocket/frame.js:
135118
135118
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
135119
135119
  */
135120
- //# sourceMappingURL=chunk-HL3E2RLS.js.map
135120
+ //# sourceMappingURL=chunk-ZGYPAEOF.js.map
package/index.js CHANGED
@@ -69,7 +69,7 @@ import {
69
69
  source_default,
70
70
  volumeConfigSchema,
71
71
  withErrorHandler
72
- } from "./chunk-HL3E2RLS.js";
72
+ } from "./chunk-ZGYPAEOF.js";
73
73
  import {
74
74
  __toESM,
75
75
  init_esm_shims
@@ -388,7 +388,7 @@ function getConfigPath() {
388
388
  return join(os.homedir(), ".vm0", "config.json");
389
389
  }
390
390
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
391
- console.log(source_default.bold(`VM0 CLI v${"9.171.0"}`));
391
+ console.log(source_default.bold(`VM0 CLI v${"9.172.0"}`));
392
392
  console.log();
393
393
  const config = await loadConfig();
394
394
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -4281,7 +4281,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4281
4281
  options.autoUpdate = false;
4282
4282
  }
4283
4283
  if (options.autoUpdate !== false) {
4284
- await startSilentUpgrade("9.171.0");
4284
+ await startSilentUpgrade("9.172.0");
4285
4285
  }
4286
4286
  try {
4287
4287
  let result;
@@ -4383,7 +4383,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4383
4383
  withErrorHandler(
4384
4384
  async (identifier, prompt, options) => {
4385
4385
  if (options.autoUpdate !== false) {
4386
- await startSilentUpgrade("9.171.0");
4386
+ await startSilentUpgrade("9.172.0");
4387
4387
  }
4388
4388
  const { name, version } = parseIdentifier(identifier);
4389
4389
  let composeId;
@@ -6177,13 +6177,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6177
6177
  if (latestVersion === null) {
6178
6178
  throw new Error("Could not check for updates. Please try again later.");
6179
6179
  }
6180
- if (latestVersion === "9.171.0") {
6181
- console.log(source_default.green(`\u2713 Already up to date (${"9.171.0"})`));
6180
+ if (latestVersion === "9.172.0") {
6181
+ console.log(source_default.green(`\u2713 Already up to date (${"9.172.0"})`));
6182
6182
  return;
6183
6183
  }
6184
6184
  console.log(
6185
6185
  source_default.yellow(
6186
- `Current version: ${"9.171.0"} -> Latest version: ${latestVersion}`
6186
+ `Current version: ${"9.172.0"} -> Latest version: ${latestVersion}`
6187
6187
  )
6188
6188
  );
6189
6189
  console.log();
@@ -6210,7 +6210,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6210
6210
  const success = await performUpgrade(packageManager);
6211
6211
  if (success) {
6212
6212
  console.log(
6213
- source_default.green(`\u2713 Upgraded from ${"9.171.0"} to ${latestVersion}`)
6213
+ source_default.green(`\u2713 Upgraded from ${"9.172.0"} to ${latestVersion}`)
6214
6214
  );
6215
6215
  return;
6216
6216
  }
@@ -6277,7 +6277,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
6277
6277
 
6278
6278
  // src/index.ts
6279
6279
  var program = new Command();
6280
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.171.0");
6280
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.172.0");
6281
6281
  program.addCommand(authCommand);
6282
6282
  program.addCommand(infoCommand);
6283
6283
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.171.0",
3
+ "version": "9.172.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -152,7 +152,7 @@ import {
152
152
  zeroAgentCustomSkillNameSchema,
153
153
  zeroLocalAgentCommand,
154
154
  zeroTokenAllowsFeatureSwitch
155
- } from "./chunk-HL3E2RLS.js";
155
+ } from "./chunk-ZGYPAEOF.js";
156
156
  import {
157
157
  __toESM,
158
158
  init_esm_shims
@@ -6560,7 +6560,7 @@ Notes:
6560
6560
  init_esm_shims();
6561
6561
  import { mkdir, writeFile } from "fs/promises";
6562
6562
  import { join as join6 } from "path";
6563
- var COMPUTER_USE_SCREENSHOT_DIR = "/tmp/vm0/computer-use";
6563
+ var COMPUTER_USE_OUTPUT_DIR = "/tmp/vm0/computer-use";
6564
6564
  var DATA_URL_PATTERN = /^data:([^;,]+);base64,(.*)$/s;
6565
6565
  var COMPUTER_USE_HELP_TEXT = `
6566
6566
  Workflow:
@@ -6571,8 +6571,10 @@ Workflow:
6571
6571
  4. Prefer element actions with --snapshot-id and --element-index. Use --x/--y
6572
6572
  only when the target is visible in the returned screenshot but has no useful
6573
6573
  accessibility element.
6574
- 5. Read the JSON result. Screenshot data is saved under /tmp/vm0/computer-use
6575
- and replaced with a local file path in CLI output.
6574
+ 5. Read the JSON result. Screenshot and App State data are saved under
6575
+ /tmp/vm0/computer-use and replaced with local file paths in CLI output.
6576
+ Files are named from app and snapshotId; rerunning the same snapshot
6577
+ overwrites the same files.
6576
6578
 
6577
6579
  Notes:
6578
6580
  Write commands are sent to the connected Desktop host and may wait for local
@@ -6698,13 +6700,24 @@ async function writeScreenshotDataUrl(result, dataUrl) {
6698
6700
  const appName = sanitizeFilenamePart(result.app, "app");
6699
6701
  const snapshotId = sanitizeFilenamePart(result.snapshotId, "snapshot");
6700
6702
  const outputPath = join6(
6701
- COMPUTER_USE_SCREENSHOT_DIR,
6703
+ COMPUTER_USE_OUTPUT_DIR,
6702
6704
  `${appName}-${snapshotId}.${extensionForMimeType(mimeType)}`
6703
6705
  );
6704
- await mkdir(COMPUTER_USE_SCREENSHOT_DIR, { recursive: true });
6706
+ await mkdir(COMPUTER_USE_OUTPUT_DIR, { recursive: true });
6705
6707
  await writeFile(outputPath, Buffer.from(base64Data, "base64"));
6706
6708
  return outputPath;
6707
6709
  }
6710
+ async function writeAppStateText(result, appState) {
6711
+ const appName = sanitizeFilenamePart(result.app, "app");
6712
+ const snapshotId = sanitizeFilenamePart(result.snapshotId, "snapshot");
6713
+ const outputPath = join6(
6714
+ COMPUTER_USE_OUTPUT_DIR,
6715
+ `${appName}-${snapshotId}.appState.txt`
6716
+ );
6717
+ await mkdir(COMPUTER_USE_OUTPUT_DIR, { recursive: true });
6718
+ await writeFile(outputPath, appState, "utf8");
6719
+ return outputPath;
6720
+ }
6708
6721
  function compactActionResult(action) {
6709
6722
  const compact = {};
6710
6723
  for (const [key, value] of Object.entries(action)) {
@@ -6726,7 +6739,7 @@ async function formatComputerUseResultForConsole(result) {
6726
6739
  }
6727
6740
  const appState = stringField(result, "appState");
6728
6741
  if (appState) {
6729
- printable.appState = appState;
6742
+ printable.appState = await writeAppStateText(result, appState);
6730
6743
  }
6731
6744
  const screenshot = stringField(result, "screenshot");
6732
6745
  if (screenshot) {
@@ -12824,7 +12837,7 @@ function registerZeroCommands(prog, commands) {
12824
12837
  var program = new Command();
12825
12838
  program.name("zero").description(
12826
12839
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
12827
- ).version("9.171.0").addHelpText("after", () => {
12840
+ ).version("9.172.0").addHelpText("after", () => {
12828
12841
  return buildZeroHelpText();
12829
12842
  });
12830
12843
  if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {