@vm0/cli 9.149.2 → 9.150.2

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
@@ -68,7 +68,7 @@ import {
68
68
  source_default,
69
69
  volumeConfigSchema,
70
70
  withErrorHandler
71
- } from "./chunk-5R5HVPYQ.js";
71
+ } from "./chunk-2MLGRQLY.js";
72
72
  import {
73
73
  __toESM,
74
74
  init_esm_shims
@@ -387,7 +387,7 @@ function getConfigPath() {
387
387
  return join(os.homedir(), ".vm0", "config.json");
388
388
  }
389
389
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
390
- console.log(source_default.bold(`VM0 CLI v${"9.149.2"}`));
390
+ console.log(source_default.bold(`VM0 CLI v${"9.150.2"}`));
391
391
  console.log();
392
392
  const config = await loadConfig();
393
393
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -4280,7 +4280,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4280
4280
  options.autoUpdate = false;
4281
4281
  }
4282
4282
  if (options.autoUpdate !== false) {
4283
- await startSilentUpgrade("9.149.2");
4283
+ await startSilentUpgrade("9.150.2");
4284
4284
  }
4285
4285
  try {
4286
4286
  let result;
@@ -4372,7 +4372,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4372
4372
  withErrorHandler(
4373
4373
  async (identifier, prompt, options) => {
4374
4374
  if (options.autoUpdate !== false) {
4375
- await startSilentUpgrade("9.149.2");
4375
+ await startSilentUpgrade("9.150.2");
4376
4376
  }
4377
4377
  const { name, version } = parseIdentifier(identifier);
4378
4378
  let composeId;
@@ -6165,13 +6165,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6165
6165
  if (latestVersion === null) {
6166
6166
  throw new Error("Could not check for updates. Please try again later.");
6167
6167
  }
6168
- if (latestVersion === "9.149.2") {
6169
- console.log(source_default.green(`\u2713 Already up to date (${"9.149.2"})`));
6168
+ if (latestVersion === "9.150.2") {
6169
+ console.log(source_default.green(`\u2713 Already up to date (${"9.150.2"})`));
6170
6170
  return;
6171
6171
  }
6172
6172
  console.log(
6173
6173
  source_default.yellow(
6174
- `Current version: ${"9.149.2"} -> Latest version: ${latestVersion}`
6174
+ `Current version: ${"9.150.2"} -> Latest version: ${latestVersion}`
6175
6175
  )
6176
6176
  );
6177
6177
  console.log();
@@ -6198,7 +6198,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6198
6198
  const success = await performUpgrade(packageManager);
6199
6199
  if (success) {
6200
6200
  console.log(
6201
- source_default.green(`\u2713 Upgraded from ${"9.149.2"} to ${latestVersion}`)
6201
+ source_default.green(`\u2713 Upgraded from ${"9.150.2"} to ${latestVersion}`)
6202
6202
  );
6203
6203
  return;
6204
6204
  }
@@ -6265,7 +6265,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
6265
6265
 
6266
6266
  // src/index.ts
6267
6267
  var program = new Command();
6268
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.149.2");
6268
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.150.2");
6269
6269
  program.addCommand(authCommand);
6270
6270
  program.addCommand(infoCommand);
6271
6271
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.149.2",
3
+ "version": "9.150.2",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -129,7 +129,7 @@ import {
129
129
  withErrorHandler,
130
130
  zeroAgentCustomSkillNameSchema,
131
131
  zeroRemoteAgentCommand
132
- } from "./chunk-5R5HVPYQ.js";
132
+ } from "./chunk-2MLGRQLY.js";
133
133
  import {
134
134
  __toESM,
135
135
  init_esm_shims
@@ -7200,20 +7200,30 @@ function readPrompt(options, usageCommand) {
7200
7200
  cause: new Error(`Usage: ${usageCommand} --prompt "A watercolor fox"`)
7201
7201
  });
7202
7202
  }
7203
+ function parseCompression(value) {
7204
+ if (value === void 0) {
7205
+ return void 0;
7206
+ }
7207
+ const compression = Number(value);
7208
+ if (!Number.isInteger(compression) || compression < 0 || compression > 100) {
7209
+ throw new Error("--compression must be an integer from 0 to 100");
7210
+ }
7211
+ return compression;
7212
+ }
7203
7213
  function createImageGenerateCommand(config) {
7204
7214
  return new Command().name(config.name).description("Generate a billed image file from a prompt").option("--prompt <text>", "Image prompt; can also be piped via stdin").option(
7205
7215
  "--size <size>",
7206
- "Image size: 1024x1024, 1024x1536, or 1536x1024",
7216
+ "Image size: auto or any valid WIDTHxHEIGHT for GPT Image 2",
7207
7217
  "1024x1024"
7208
7218
  ).option(
7209
7219
  "--quality <quality>",
7210
7220
  "Image quality: low, medium, high, or auto",
7211
7221
  "medium"
7212
- ).option(
7213
- "--background <background>",
7214
- "Background: auto, opaque, or transparent",
7222
+ ).option("--background <background>", "Background: auto or opaque", "auto").option("--format <format>", "Output format: png, webp, or jpeg", "png").option("--compression <0-100>", "Output compression for jpeg/webp only").option(
7223
+ "--moderation <moderation>",
7224
+ "Moderation strictness: auto or low",
7215
7225
  "auto"
7216
- ).option("--format <format>", "Output format: png, webp, or jpeg", "png").option("--json", "Print metadata as JSON").addHelpText(
7226
+ ).option("--json", "Print metadata as JSON").addHelpText(
7217
7227
  "after",
7218
7228
  `
7219
7229
  Examples:
@@ -7225,16 +7235,38 @@ Output:
7225
7235
  Notes:
7226
7236
  - Authenticates via ZERO_TOKEN (requires file:write capability)
7227
7237
  - Charges org credits after successful image generation
7228
- - Uses OpenAI gpt-image-2 and bills returned usage tokens`
7238
+ - Uses OpenAI gpt-image-2 and bills returned usage tokens
7239
+
7240
+ GPT Image 2 options:
7241
+ - Prompt: required, up to 32,000 characters; stdin is supported.
7242
+ - Size: use auto or WIDTHxHEIGHT. Popular sizes include 1024x1024,
7243
+ 1536x1024, 1024x1536, 2048x2048, 2048x1152, 3840x2160,
7244
+ and 2160x3840. Custom sizes must have edges <= 3840px, both
7245
+ edges divisible by 16, long:short ratio <= 3:1, and total pixels
7246
+ between 655,360 and 8,294,400. Outputs larger than 2560x1440
7247
+ total pixels are experimental.
7248
+ - Quality: low, medium, high, or auto. Low is fastest for drafts.
7249
+ - Background: auto or opaque. GPT Image 2 does not support transparent
7250
+ backgrounds.
7251
+ - Format: png, jpeg, or webp. Use --compression 0-100 only with jpeg
7252
+ or webp; jpeg is usually lower latency than png.
7253
+ - Moderation: auto or low.
7254
+ - This command generates one text-to-image result. GPT Image 2 also
7255
+ supports image edits, reference images, masks, partial-image streaming,
7256
+ and multiple images per request, but those are not exposed by this
7257
+ built-in Zero command yet.`
7229
7258
  ).action(
7230
7259
  withErrorHandler(async (options) => {
7231
7260
  const prompt = readPrompt(options, config.usageCommand);
7261
+ const compression = parseCompression(options.compression);
7232
7262
  const result = await generateWebImage({
7233
7263
  prompt,
7234
7264
  size: options.size,
7235
7265
  quality: options.quality,
7236
7266
  background: options.background,
7237
- outputFormat: options.format
7267
+ outputFormat: options.format,
7268
+ outputCompression: compression,
7269
+ moderation: options.moderation
7238
7270
  });
7239
7271
  if (options.json) {
7240
7272
  console.log(JSON.stringify(result));
@@ -7245,6 +7277,12 @@ Notes:
7245
7277
  console.log(source_default.dim(` Size: ${result.imageSize}`));
7246
7278
  console.log(source_default.dim(` Quality: ${result.quality}`));
7247
7279
  console.log(source_default.dim(` Format: ${result.outputFormat}`));
7280
+ if (result.outputCompression !== void 0) {
7281
+ console.log(source_default.dim(` Compression: ${result.outputCompression}`));
7282
+ }
7283
+ if (result.moderation) {
7284
+ console.log(source_default.dim(` Moderation: ${result.moderation}`));
7285
+ }
7248
7286
  console.log(source_default.dim(` Credits charged: ${result.creditsCharged}`));
7249
7287
  console.log(source_default.dim(` Model: ${result.model}`));
7250
7288
  })
@@ -7596,7 +7634,7 @@ function registerZeroCommands(prog, commands) {
7596
7634
  var program = new Command();
7597
7635
  program.name("zero").description(
7598
7636
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
7599
- ).version("9.149.2").addHelpText(
7637
+ ).version("9.150.2").addHelpText(
7600
7638
  "after",
7601
7639
  `
7602
7640
  Examples: