@vm0/cli 9.117.1 → 9.118.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.
package/index.js CHANGED
@@ -72,7 +72,7 @@ import {
72
72
  source_default,
73
73
  volumeConfigSchema,
74
74
  withErrorHandler
75
- } from "./chunk-BMBAB5QA.js";
75
+ } from "./chunk-ITF6FVZ7.js";
76
76
 
77
77
  // src/index.ts
78
78
  init_esm_shims();
@@ -465,7 +465,7 @@ function getConfigPath() {
465
465
  return join(homedir(), ".vm0", "config.json");
466
466
  }
467
467
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
468
- console.log(source_default.bold(`VM0 CLI v${"9.117.1"}`));
468
+ console.log(source_default.bold(`VM0 CLI v${"9.118.0"}`));
469
469
  console.log();
470
470
  const config = await loadConfig();
471
471
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -4494,7 +4494,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4494
4494
  options.autoUpdate = false;
4495
4495
  }
4496
4496
  if (options.autoUpdate !== false) {
4497
- await startSilentUpgrade("9.117.1");
4497
+ await startSilentUpgrade("9.118.0");
4498
4498
  }
4499
4499
  try {
4500
4500
  let result;
@@ -4579,7 +4579,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4579
4579
  withErrorHandler(
4580
4580
  async (identifier, prompt, options) => {
4581
4581
  if (options.autoUpdate !== false) {
4582
- await startSilentUpgrade("9.117.1");
4582
+ await startSilentUpgrade("9.118.0");
4583
4583
  }
4584
4584
  const { name, version } = parseIdentifier(identifier);
4585
4585
  let composeId;
@@ -6353,7 +6353,7 @@ var cookAction = new Command().name("cook").description("Quick start: prepare, c
6353
6353
  withErrorHandler(
6354
6354
  async (prompt, options) => {
6355
6355
  if (options.autoUpdate !== false) {
6356
- const shouldExit = await checkAndUpgrade("9.117.1", prompt);
6356
+ const shouldExit = await checkAndUpgrade("9.118.0", prompt);
6357
6357
  if (shouldExit) {
6358
6358
  process.exit(0);
6359
6359
  }
@@ -7120,13 +7120,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
7120
7120
  if (latestVersion === null) {
7121
7121
  throw new Error("Could not check for updates. Please try again later.");
7122
7122
  }
7123
- if (latestVersion === "9.117.1") {
7124
- console.log(source_default.green(`\u2713 Already up to date (${"9.117.1"})`));
7123
+ if (latestVersion === "9.118.0") {
7124
+ console.log(source_default.green(`\u2713 Already up to date (${"9.118.0"})`));
7125
7125
  return;
7126
7126
  }
7127
7127
  console.log(
7128
7128
  source_default.yellow(
7129
- `Current version: ${"9.117.1"} -> Latest version: ${latestVersion}`
7129
+ `Current version: ${"9.118.0"} -> Latest version: ${latestVersion}`
7130
7130
  )
7131
7131
  );
7132
7132
  console.log();
@@ -7153,7 +7153,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
7153
7153
  const success = await performUpgrade(packageManager);
7154
7154
  if (success) {
7155
7155
  console.log(
7156
- source_default.green(`\u2713 Upgraded from ${"9.117.1"} to ${latestVersion}`)
7156
+ source_default.green(`\u2713 Upgraded from ${"9.118.0"} to ${latestVersion}`)
7157
7157
  );
7158
7158
  return;
7159
7159
  }
@@ -7220,7 +7220,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
7220
7220
 
7221
7221
  // src/index.ts
7222
7222
  var program = new Command();
7223
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.117.1");
7223
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.118.0");
7224
7224
  program.addCommand(authCommand);
7225
7225
  program.addCommand(infoCommand);
7226
7226
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.117.1",
3
+ "version": "9.118.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -38,6 +38,7 @@ import {
38
38
  deployZeroSchedule,
39
39
  disableZeroSchedule,
40
40
  downloadSlackFile,
41
+ downloadWebFile,
41
42
  enableZeroSchedule,
42
43
  extractSecretNamesFromApis,
43
44
  findMatchingPermissions,
@@ -132,7 +133,7 @@ import {
132
133
  upsertZeroOrgModelProvider,
133
134
  withErrorHandler,
134
135
  zeroAgentCustomSkillNameSchema
135
- } from "./chunk-BMBAB5QA.js";
136
+ } from "./chunk-ITF6FVZ7.js";
136
137
 
137
138
  // src/zero.ts
138
139
  init_esm_shims();
@@ -4236,6 +4237,13 @@ Output:
4236
4237
  Prints a JSON object to stdout on success:
4237
4238
  {"path":"/tmp/slack-F01234ABCD","mimetype":"image/png","size":12345}
4238
4239
 
4240
+ How to read the downloaded file:
4241
+ - Images (png/jpg/gif/webp/svg): open the file path with your image viewing tool
4242
+ - Videos (mp4/mov/webm): extract frames first with
4243
+ ffmpeg -i <path> -vf "fps=1" -q:v 2 /tmp/<file-id>_frame_%03d.jpg
4244
+ then view the extracted frames
4245
+ - PDF/text/csv/json/markdown: read the file directly
4246
+
4239
4247
  Notes:
4240
4248
  - Uses the bot token on the server side; no user Slack token is needed
4241
4249
  - Streams the file bytes directly to disk`
@@ -6405,6 +6413,56 @@ Examples:
6405
6413
  Append an event: zero voice-chat context append <session-id> --source slow-brain --type directive --content "Done"`
6406
6414
  );
6407
6415
 
6416
+ // src/commands/zero/web/index.ts
6417
+ init_esm_shims();
6418
+
6419
+ // src/commands/zero/web/download-file.ts
6420
+ init_esm_shims();
6421
+ import { join as join6 } from "path";
6422
+ import { tmpdir as tmpdir3 } from "os";
6423
+ function defaultOutPath2(fileId) {
6424
+ return join6(tmpdir3(), `web-${fileId}`);
6425
+ }
6426
+ var downloadFileCommand2 = new Command().name("download-file").description("Download a web-uploaded file by id").argument("<file-id>", "File id (UUID returned by the upload API)").option(
6427
+ "-o, --out <path>",
6428
+ "Output path for the downloaded file (default: /tmp/web-<file-id>)"
6429
+ ).addHelpText(
6430
+ "after",
6431
+ `
6432
+ Examples:
6433
+ Download to default temp path: zero web download-file abc-123-def
6434
+ Download to explicit path: zero web download-file abc-123-def -o /tmp/report.pdf
6435
+
6436
+ Output:
6437
+ Prints a JSON object to stdout on success:
6438
+ {"path":"/tmp/web-abc-123-def","mimetype":"application/pdf","size":12345}
6439
+
6440
+ How to read the downloaded file:
6441
+ - Images (png/jpg/gif/webp/svg): open the file path with your image viewing tool
6442
+ - Videos (mp4/mov/webm): extract frames first with
6443
+ ffmpeg -i <path> -vf "fps=1" -q:v 2 /tmp/<file-id>_frame_%03d.jpg
6444
+ then view the extracted frames
6445
+ - PDF/text/csv/json/markdown: read the file directly
6446
+
6447
+ Notes:
6448
+ - Authenticates via ZERO_TOKEN
6449
+ - Streams the file bytes directly to disk`
6450
+ ).action(
6451
+ withErrorHandler(async (fileId, options) => {
6452
+ const outPath = options.out ?? defaultOutPath2(fileId);
6453
+ const result = await downloadWebFile(fileId, outPath);
6454
+ console.log(JSON.stringify(result));
6455
+ })
6456
+ );
6457
+
6458
+ // src/commands/zero/web/index.ts
6459
+ var zeroWebCommand = new Command().name("web").description("Download files uploaded via the web chat UI").addCommand(downloadFileCommand2).addHelpText(
6460
+ "after",
6461
+ `
6462
+ Examples:
6463
+ Download a file: zero web download-file <file-id> -o /tmp/out.pdf`
6464
+ );
6465
+
6408
6466
  // src/zero.ts
6409
6467
  var COMMAND_CAPABILITY_MAP = {
6410
6468
  agent: "agent:read",
@@ -6420,7 +6478,8 @@ var COMMAND_CAPABILITY_MAP = {
6420
6478
  "developer-support": null,
6421
6479
  "computer-use": "computer-use:write",
6422
6480
  phone: "phone:write",
6423
- "voice-chat": "voice-chat:write"
6481
+ "voice-chat": "voice-chat:write",
6482
+ web: null
6424
6483
  };
6425
6484
  var DEFAULT_COMMANDS = [
6426
6485
  zeroOrgCommand,
@@ -6440,7 +6499,8 @@ var DEFAULT_COMMANDS = [
6440
6499
  zeroDeveloperSupportCommand,
6441
6500
  zeroComputerUseCommand,
6442
6501
  zeroPhoneCommand,
6443
- zeroVoiceChatCommand
6502
+ zeroVoiceChatCommand,
6503
+ zeroWebCommand
6444
6504
  ];
6445
6505
  function shouldHideCommand(name, payload) {
6446
6506
  if (!payload) return false;
@@ -6459,7 +6519,7 @@ function registerZeroCommands(prog, commands) {
6459
6519
  var program = new Command();
6460
6520
  program.name("zero").description(
6461
6521
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
6462
- ).version("9.117.1").addHelpText(
6522
+ ).version("9.118.0").addHelpText(
6463
6523
  "after",
6464
6524
  `
6465
6525
  Examples: