@vm0/cli 9.145.14 → 9.145.16

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
@@ -65,7 +65,7 @@ import {
65
65
  source_default,
66
66
  volumeConfigSchema,
67
67
  withErrorHandler
68
- } from "./chunk-V7GEUGSA.js";
68
+ } from "./chunk-6CW5HVRP.js";
69
69
  import {
70
70
  __toESM,
71
71
  init_esm_shims
@@ -398,7 +398,7 @@ function getConfigPath() {
398
398
  return join(os.homedir(), ".vm0", "config.json");
399
399
  }
400
400
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
401
- console.log(source_default.bold(`VM0 CLI v${"9.145.14"}`));
401
+ console.log(source_default.bold(`VM0 CLI v${"9.145.16"}`));
402
402
  console.log();
403
403
  const config = await loadConfig();
404
404
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -4291,7 +4291,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4291
4291
  options.autoUpdate = false;
4292
4292
  }
4293
4293
  if (options.autoUpdate !== false) {
4294
- await startSilentUpgrade("9.145.14");
4294
+ await startSilentUpgrade("9.145.16");
4295
4295
  }
4296
4296
  try {
4297
4297
  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.145.14");
4386
+ await startSilentUpgrade("9.145.16");
4387
4387
  }
4388
4388
  const { name, version } = parseIdentifier(identifier);
4389
4389
  let composeId;
@@ -6170,13 +6170,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6170
6170
  if (latestVersion === null) {
6171
6171
  throw new Error("Could not check for updates. Please try again later.");
6172
6172
  }
6173
- if (latestVersion === "9.145.14") {
6174
- console.log(source_default.green(`\u2713 Already up to date (${"9.145.14"})`));
6173
+ if (latestVersion === "9.145.16") {
6174
+ console.log(source_default.green(`\u2713 Already up to date (${"9.145.16"})`));
6175
6175
  return;
6176
6176
  }
6177
6177
  console.log(
6178
6178
  source_default.yellow(
6179
- `Current version: ${"9.145.14"} -> Latest version: ${latestVersion}`
6179
+ `Current version: ${"9.145.16"} -> Latest version: ${latestVersion}`
6180
6180
  )
6181
6181
  );
6182
6182
  console.log();
@@ -6203,7 +6203,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6203
6203
  const success = await performUpgrade(packageManager);
6204
6204
  if (success) {
6205
6205
  console.log(
6206
- source_default.green(`\u2713 Upgraded from ${"9.145.14"} to ${latestVersion}`)
6206
+ source_default.green(`\u2713 Upgraded from ${"9.145.16"} to ${latestVersion}`)
6207
6207
  );
6208
6208
  return;
6209
6209
  }
@@ -6270,7 +6270,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
6270
6270
 
6271
6271
  // src/index.ts
6272
6272
  var program = new Command();
6273
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.145.14");
6273
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.145.16");
6274
6274
  program.addCommand(authCommand);
6275
6275
  program.addCommand(infoCommand);
6276
6276
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.145.14",
3
+ "version": "9.145.16",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -128,7 +128,7 @@ import {
128
128
  upsertZeroOrgModelProvider,
129
129
  withErrorHandler,
130
130
  zeroAgentCustomSkillNameSchema
131
- } from "./chunk-V7GEUGSA.js";
131
+ } from "./chunk-6CW5HVRP.js";
132
132
  import {
133
133
  __toESM,
134
134
  init_esm_shims
@@ -4740,10 +4740,10 @@ Notes:
4740
4740
 
4741
4741
  // src/commands/zero/slack/download-file.ts
4742
4742
  init_esm_shims();
4743
- import { join } from "path";
4743
+ import { basename as basename2, join } from "path";
4744
4744
  import { tmpdir } from "os";
4745
4745
  function defaultOutPath(fileId) {
4746
- return join(tmpdir(), `slack-${fileId}`);
4746
+ return join(tmpdir(), `slack-${basename2(fileId)}`);
4747
4747
  }
4748
4748
  var downloadFileCommand = new Command().name("download-file").description("Download a Slack file by id using the bot token").argument("<file-id>", "Slack file id (e.g. F01234ABCD)").option(
4749
4749
  "-o, --out <path>",
@@ -4875,10 +4875,10 @@ Examples:
4875
4875
 
4876
4876
  // src/commands/zero/telegram/download-file.ts
4877
4877
  init_esm_shims();
4878
- import { join as join2 } from "path";
4878
+ import { basename as basename3, join as join2 } from "path";
4879
4879
  import { tmpdir as tmpdir2 } from "os";
4880
4880
  function defaultOutPath2(fileId) {
4881
- return join2(tmpdir2(), `telegram-${fileId}`);
4881
+ return join2(tmpdir2(), `telegram-${basename3(fileId)}`);
4882
4882
  }
4883
4883
  var downloadFileCommand2 = new Command().name("download-file").description("Download a Telegram file by id using the bot token").argument("<file-id>", "Telegram file id from a [Telegram file] block").option(
4884
4884
  "-o, --out <path>",
@@ -4987,7 +4987,7 @@ Examples:
4987
4987
  // src/commands/zero/telegram/upload-file.ts
4988
4988
  init_esm_shims();
4989
4989
  import { readFileSync as readFileSync8, statSync as statSync2 } from "fs";
4990
- import { basename as basename2, extname } from "path";
4990
+ import { basename as basename4, extname } from "path";
4991
4991
  var MIME_BY_EXTENSION = {
4992
4992
  ".png": "image/png",
4993
4993
  ".jpg": "image/jpeg",
@@ -5051,7 +5051,7 @@ Notes:
5051
5051
  if (fileSize === 0) {
5052
5052
  throw new Error("File is empty");
5053
5053
  }
5054
- const filename = basename2(options.file);
5054
+ const filename = basename4(options.file);
5055
5055
  const contentType = options.contentType ?? inferContentType(options.file);
5056
5056
  const messageThreadId = parseMessageThreadId(options.messageThreadId);
5057
5057
  const prepared = await initTelegramFileUpload({
@@ -6850,7 +6850,7 @@ var hostStopCommand = new Command().name("stop").description("Stop and unregiste
6850
6850
  // src/commands/zero/computer-use/client.ts
6851
6851
  init_esm_shims();
6852
6852
  import { writeFile, mkdir } from "fs/promises";
6853
- import { join as join5 } from "path";
6853
+ import { basename as basename5, join as join5 } from "path";
6854
6854
 
6855
6855
  // src/lib/computer-use/client.ts
6856
6856
  init_esm_shims();
@@ -6894,6 +6894,9 @@ async function callHost(path, options) {
6894
6894
  }
6895
6895
 
6896
6896
  // src/commands/zero/computer-use/client.ts
6897
+ function safeFormat(format) {
6898
+ return basename5(format);
6899
+ }
6897
6900
  function mouseClickCommand(name, action, description) {
6898
6901
  return new Command().name(name).description(description).argument("<x>", "X coordinate (points)").argument("<y>", "Y coordinate (points)").action(
6899
6902
  withErrorHandler(async (xStr, yStr) => {
@@ -6918,7 +6921,10 @@ var clientScreenshotCommand = new Command().name("screenshot").description("Capt
6918
6921
  const dir = "/tmp/computer-use";
6919
6922
  await mkdir(dir, { recursive: true });
6920
6923
  const timestamp = Date.now();
6921
- const filePath = join5(dir, `screenshot-${timestamp}.${data.format}`);
6924
+ const filePath = join5(
6925
+ dir,
6926
+ `screenshot-${timestamp}.${safeFormat(data.format)}`
6927
+ );
6922
6928
  const buffer = Buffer.from(data.image, "base64");
6923
6929
  await writeFile(filePath, buffer);
6924
6930
  process.stdout.write(`${filePath}
@@ -6946,7 +6952,10 @@ var clientZoomCommand = new Command().name("zoom").description("Capture a region
6946
6952
  const dir = "/tmp/computer-use";
6947
6953
  await mkdir(dir, { recursive: true });
6948
6954
  const timestamp = Date.now();
6949
- const filePath = join5(dir, `zoom-${timestamp}.${data.format}`);
6955
+ const filePath = join5(
6956
+ dir,
6957
+ `zoom-${timestamp}.${safeFormat(data.format)}`
6958
+ );
6950
6959
  const buffer = Buffer.from(data.image, "base64");
6951
6960
  await writeFile(filePath, buffer);
6952
6961
  process.stdout.write(`${filePath}
@@ -7312,10 +7321,10 @@ init_esm_shims();
7312
7321
 
7313
7322
  // src/commands/zero/web/download-file.ts
7314
7323
  init_esm_shims();
7315
- import { join as join6 } from "path";
7324
+ import { basename as basename6, join as join6 } from "path";
7316
7325
  import { tmpdir as tmpdir4 } from "os";
7317
7326
  function defaultOutPath3(fileId) {
7318
- return join6(tmpdir4(), `web-${fileId}`);
7327
+ return join6(tmpdir4(), `web-${basename6(fileId)}`);
7319
7328
  }
7320
7329
  var downloadFileCommand3 = 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(
7321
7330
  "-o, --out <path>",
@@ -7457,7 +7466,7 @@ function registerZeroCommands(prog, commands) {
7457
7466
  var program = new Command();
7458
7467
  program.name("zero").description(
7459
7468
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
7460
- ).version("9.145.14").addHelpText(
7469
+ ).version("9.145.16").addHelpText(
7461
7470
  "after",
7462
7471
  `
7463
7472
  Examples: