open-agents-ai 0.185.53 → 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 +17 -13
  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");
@@ -62164,7 +62161,7 @@ function setTerminalTitle(task, version) {
62164
62161
  const title = task ? `${task.slice(0, 60)} \xB7 ${ver}` : ver;
62165
62162
  process.stdout.write(`\x1B]2;${title}\x07`);
62166
62163
  }
62167
- var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG, CONTENT_BG, TEXT_PRIMARY, TEXT_DIM, PANEL_BG_SEQ, CONTENT_BG_SEQ, RESET, StatusBar;
62164
+ var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG, CONTENT_BG, TEXT_PRIMARY, TEXT_DIM, PANEL_BG_SEQ, CONTENT_BG_SEQ, RESET, _isWindows, StatusBar;
62168
62165
  var init_status_bar = __esm({
62169
62166
  "packages/cli/dist/tui/status-bar.js"() {
62170
62167
  "use strict";
@@ -62337,6 +62334,7 @@ var init_status_bar = __esm({
62337
62334
  PANEL_BG_SEQ = `\x1B[48;5;${PANEL_BG}m`;
62338
62335
  CONTENT_BG_SEQ = `\x1B[48;5;${CONTENT_BG}m`;
62339
62336
  RESET = "\x1B[0m";
62337
+ _isWindows = process.platform === "win32";
62340
62338
  StatusBar = class _StatusBar {
62341
62339
  metrics = {
62342
62340
  promptTokens: 0,
@@ -63580,6 +63578,8 @@ var init_status_bar = __esm({
63580
63578
  if (this._bannerRefresh)
63581
63579
  this._bannerRefresh();
63582
63580
  }
63581
+ if (_isWindows)
63582
+ this.termWrite("\x1B[3J");
63583
63583
  }
63584
63584
  /**
63585
63585
  * Update the top boundary of the scroll region (e.g. after carousel retirement).
@@ -63631,7 +63631,8 @@ ${CONTENT_BG_SEQ}`);
63631
63631
  }
63632
63632
  process.stdout.write(`\x1B[?25l` + // hide cursor
63633
63633
  CONTENT_BG_SEQ + // set content area bg (#111)
63634
- `\x1B[${this.scrollRegionTop};${scrollEnd}r\x1B[${scrollEnd};1H`);
63634
+ `\x1B[${this.scrollRegionTop};${scrollEnd}r` + (_isWindows ? "\x1B[3J" : "") + // Windows: clear accumulated scrollback
63635
+ `\x1B[${scrollEnd};1H`);
63635
63636
  }
63636
63637
  /**
63637
63638
  * Call AFTER writing content to the scrollable area.
@@ -63652,6 +63653,8 @@ ${CONTENT_BG_SEQ}`);
63652
63653
  process.stdout.write(RESET);
63653
63654
  this._brailleSpinner.setMetrics({ isStreaming: false });
63654
63655
  this.renderFooterAndPositionInput();
63656
+ if (_isWindows)
63657
+ this.termWrite("\x1B[3J");
63655
63658
  this.scheduleMouseIdle();
63656
63659
  }
63657
63660
  }
@@ -64221,7 +64224,7 @@ ${CONTENT_BG_SEQ}`);
64221
64224
  this.updateFooterHeight();
64222
64225
  const rows = process.stdout.rows ?? 24;
64223
64226
  const pos = this.rowPositions(rows);
64224
- this.termWrite(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[${pos.scrollEnd};1H`);
64227
+ this.termWrite(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[${pos.scrollEnd};1H` + (_isWindows ? "\x1B[3J" : ""));
64225
64228
  }
64226
64229
  /**
64227
64230
  * Draw the COMPLETE footer — separators, prompt, metrics — in a single
@@ -67767,8 +67770,9 @@ ${entry.fullContent}`
67767
67770
  process.stdout.write = ((chunk, ...args) => {
67768
67771
  const text = typeof chunk === "string" ? chunk : new TextDecoder().decode(chunk);
67769
67772
  for (const line of text.split("\n")) {
67770
- if (line.length > 0)
67773
+ if (line.replace(/\x1B\[[0-9;]*[A-Za-z]/g, "").length > 0) {
67771
67774
  statusBar.bufferContentLine(line);
67775
+ }
67772
67776
  }
67773
67777
  return boundWrite(chunk, ...args);
67774
67778
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.185.53",
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",