imgx-cli 0.7.0 → 0.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 (2026-02-27)
4
+
5
+ ### Fixed
6
+
7
+ - **MCP inline preview size guard** — images exceeding ~780KB base64 (Claude Desktop's 1MB tool result limit) are now gracefully skipped from inline preview. Full-quality images are always saved to disk. Previously, oversized images caused silent display failures in Claude Desktop.
8
+
9
+ ## 0.7.1 (2026-02-27)
10
+
11
+ ### Fixed
12
+
13
+ - Remove `MULTIPLE_OUTPUTS` capability from Gemini provider — `gemini-3-pro-image-preview` does not support `candidateCount`, causing errors when `count > 1`
14
+
3
15
  ## 0.7.0 (2026-02-27)
4
16
 
5
17
  ### Added
@@ -124,7 +136,7 @@ Initial release.
124
136
  - `edit` command: image editing with text instructions
125
137
  - `providers` command: list available providers
126
138
  - `capabilities` command: show provider capabilities
127
- - Gemini provider with 7 capabilities (generate, edit, aspect ratio, resolution, multi-output, reference images, person control)
139
+ - Gemini provider with 6 capabilities (generate, edit, aspect ratio, resolution, reference images, person control)
128
140
  - Capability-based provider abstraction (model-independent core + model-dependent providers)
129
141
  - JSON output for scripting and tool integration
130
142
  - Single-file esbuild bundle
@@ -39235,7 +39235,9 @@ function fallbackOutputDir(outputDir) {
39235
39235
  }
39236
39236
  function saveImage(image, outputPath, outputDir) {
39237
39237
  const ext = MIME_TO_EXT[image.mimeType] || ".png";
39238
- const filePath = outputPath ? resolve2(outputPath) : resolve2(fallbackOutputDir(outputDir), `imgx-${randomUUID().slice(0, 8)}${ext}`);
39238
+ const resolvedDir = fallbackOutputDir(outputDir);
39239
+ const filePath = outputPath ? resolve2(outputPath) : resolve2(resolvedDir, `imgx-${randomUUID().slice(0, 8)}${ext}`);
39240
+ console.error(`[imgx-debug] homedir=${homedir2()} cwd=${process.cwd()} outputPath=${outputPath} outputDir=${outputDir} resolvedDir=${resolvedDir} filePath=${filePath}`);
39239
39241
  mkdirSync2(dirname(filePath), { recursive: true });
39240
39242
  writeFileSync2(filePath, image.data);
39241
39243
  return filePath;
@@ -39265,7 +39267,6 @@ var GEMINI_PROVIDER_INFO = {
39265
39267
  Capability.ASPECT_RATIO,
39266
39268
  Capability.IMAGE_EDITING,
39267
39269
  Capability.RESOLUTION_CONTROL,
39268
- Capability.MULTIPLE_OUTPUTS,
39269
39270
  Capability.REFERENCE_IMAGES,
39270
39271
  Capability.PERSON_CONTROL
39271
39272
  ]),
@@ -39777,7 +39778,7 @@ function showAll() {
39777
39778
  }
39778
39779
 
39779
39780
  // build/cli/index.js
39780
- var VERSION2 = "0.7.0";
39781
+ var VERSION2 = "0.8.0";
39781
39782
  var HELP = `imgx v${VERSION2} \u2014 AI image generation and editing CLI
39782
39783
 
39783
39784
  Commands:
@@ -69273,7 +69273,9 @@ function fallbackOutputDir(outputDir) {
69273
69273
  }
69274
69274
  function saveImage(image, outputPath, outputDir) {
69275
69275
  const ext = MIME_TO_EXT[image.mimeType] || ".png";
69276
- const filePath = outputPath ? resolve2(outputPath) : resolve2(fallbackOutputDir(outputDir), `imgx-${randomUUID().slice(0, 8)}${ext}`);
69276
+ const resolvedDir = fallbackOutputDir(outputDir);
69277
+ const filePath = outputPath ? resolve2(outputPath) : resolve2(resolvedDir, `imgx-${randomUUID().slice(0, 8)}${ext}`);
69278
+ console.error(`[imgx-debug] homedir=${homedir2()} cwd=${process.cwd()} outputPath=${outputPath} outputDir=${outputDir} resolvedDir=${resolvedDir} filePath=${filePath}`);
69277
69279
  mkdirSync2(dirname(filePath), { recursive: true });
69278
69280
  writeFileSync2(filePath, image.data);
69279
69281
  return filePath;
@@ -69303,7 +69305,6 @@ var GEMINI_PROVIDER_INFO = {
69303
69305
  Capability.ASPECT_RATIO,
69304
69306
  Capability.IMAGE_EDITING,
69305
69307
  Capability.RESOLUTION_CONTROL,
69306
- Capability.MULTIPLE_OUTPUTS,
69307
69308
  Capability.REFERENCE_IMAGES,
69308
69309
  Capability.PERSON_CONTROL
69309
69310
  ]),
@@ -69598,17 +69599,28 @@ function initOpenAI() {
69598
69599
  }
69599
69600
 
69600
69601
  // build/mcp/server.js
69602
+ var MAX_INLINE_BASE64 = 8e5;
69601
69603
  function buildImageContent(images, paths, extra) {
69602
69604
  const content = [];
69605
+ let skipped = 0;
69603
69606
  for (const img of images) {
69604
- content.push({ type: "image", data: img.data.toString("base64"), mimeType: img.mimeType });
69607
+ const b64 = img.data.toString("base64");
69608
+ if (b64.length <= MAX_INLINE_BASE64) {
69609
+ content.push({ type: "image", data: b64, mimeType: img.mimeType });
69610
+ } else {
69611
+ skipped++;
69612
+ }
69613
+ }
69614
+ const info = { success: true, filePaths: paths, ...extra };
69615
+ if (skipped > 0) {
69616
+ info.note = `${skipped} image(s) too large for inline preview. Open file(s) directly.`;
69605
69617
  }
69606
- content.push({ type: "text", text: JSON.stringify({ success: true, filePaths: paths, ...extra }) });
69618
+ content.push({ type: "text", text: JSON.stringify(info) });
69607
69619
  return content;
69608
69620
  }
69609
69621
  var server = new McpServer({
69610
69622
  name: "imgx",
69611
- version: "0.7.0"
69623
+ version: "0.8.0"
69612
69624
  });
69613
69625
  initGemini();
69614
69626
  initOpenAI();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imgx-cli",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "mcpName": "io.github.somacoffeekyoto/imgx",
5
5
  "description": "AI image generation and editing CLI with provider abstraction",
6
6
  "type": "module",