open-agents-ai 0.185.54 → 0.185.55

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -28576,13 +28576,10 @@ ${transcript}`
28576
28576
  const tmpIn = join77(tmpdir11(), `oa_img_in_${Date.now()}.png`);
28577
28577
  const tmpOut = join77(tmpdir11(), `oa_img_out_${Date.now()}.jpg`);
28578
28578
  writeFileSync30(tmpIn, buffer);
28579
- execSync36(`python3 -c "
28580
- from PIL import Image
28581
- img = Image.open('${tmpIn}')
28582
- img.thumbnail((512, 512), Image.LANCZOS)
28583
- img = img.convert('RGB')
28584
- img.save('${tmpOut}', 'JPEG', quality=75)
28585
- "`, { timeout: 1e4, stdio: "pipe" });
28579
+ const pyBin = process.platform === "win32" ? "python" : "python3";
28580
+ const escapedIn = tmpIn.replace(/\\/g, "\\\\");
28581
+ const escapedOut = tmpOut.replace(/\\/g, "\\\\");
28582
+ execSync36(`${pyBin} -c "from PIL import Image; img = Image.open('${escapedIn}'); img.thumbnail((512, 512), Image.LANCZOS); img = img.convert('RGB'); img.save('${escapedOut}', 'JPEG', quality=75)"`, { timeout: 1e4, stdio: "pipe" });
28586
28583
  const resizedBuf = readFileSync45(tmpOut);
28587
28584
  resizedBase64 = `data:image/jpeg;base64,${resizedBuf.toString("base64")}`;
28588
28585
  try {
@@ -28609,7 +28606,7 @@ img.save('${tmpOut}', 'JPEG', quality=75)
28609
28606
  this.emit({ type: "status", content: `Downconverted images to 512px JPEG \u2014 retrying`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
28610
28607
  return true;
28611
28608
  }
28612
- this.emit({ type: "status", content: `Downconversion unavailable \u2014 describing images via vision model...`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
28609
+ this.emit({ type: "status", content: `Downconversion failed \u2014 trying vision model fallback...`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
28613
28610
  const ollamaHost = process.env["OLLAMA_HOST"] || "http://127.0.0.1:11434";
28614
28611
  let described = false;
28615
28612
  for (const entry of imageEntries) {
@@ -28684,7 +28681,7 @@ ${description}`
28684
28681
  this.emit({ type: "status", content: `Images replaced with descriptions \u2014 retrying`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
28685
28682
  return true;
28686
28683
  }
28687
- this.emit({ type: "status", content: `No vision model available \u2014 stripping images (text context preserved)`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
28684
+ this.emit({ type: "status", content: `Image could not be processed \u2014 stripping images (text context preserved)`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
28688
28685
  for (const msg of messages) {
28689
28686
  if (Array.isArray(msg.content)) {
28690
28687
  const textParts = msg.content.filter((p) => p.type !== "image_url");
@@ -67773,8 +67770,9 @@ ${entry.fullContent}`
67773
67770
  process.stdout.write = ((chunk, ...args) => {
67774
67771
  const text = typeof chunk === "string" ? chunk : new TextDecoder().decode(chunk);
67775
67772
  for (const line of text.split("\n")) {
67776
- if (line.length > 0)
67773
+ if (line.replace(/\x1B\[[0-9;]*[A-Za-z]/g, "").length > 0) {
67777
67774
  statusBar.bufferContentLine(line);
67775
+ }
67778
67776
  }
67779
67777
  return boundWrite(chunk, ...args);
67780
67778
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.185.54",
3
+ "version": "0.185.55",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",