open-agents-ai 0.138.35 → 0.138.37

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 +20 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -51464,6 +51464,8 @@ var init_status_bar = __esm({
51464
51464
  * endContentWrite() drops it back to 1 without touching the footer.
51465
51465
  */
51466
51466
  _origWrite = null;
51467
+ /** True stdout.write captured at construction — immune to interceptor stacking */
51468
+ _trueStdoutWrite = process.stdout.write.bind(process.stdout);
51467
51469
  beginContentWrite() {
51468
51470
  if (!this.active)
51469
51471
  return;
@@ -51472,8 +51474,8 @@ var init_status_bar = __esm({
51472
51474
  const rows = process.stdout.rows ?? 24;
51473
51475
  const scrollEnd = Math.max(rows - this._currentFooterHeight, this.scrollRegionTop + 1);
51474
51476
  if (this.writeDepth === 1 && !this._origWrite) {
51475
- this._origWrite = process.stdout.write;
51476
- const origBound = this._origWrite.bind(process.stdout);
51477
+ this._origWrite = this._trueStdoutWrite;
51478
+ const origBound = this._trueStdoutWrite;
51477
51479
  process.stdout.write = ((chunk, ...args) => {
51478
51480
  if (typeof chunk === "string") {
51479
51481
  chunk = chunk.replace(/\x1B\[0m/g, `\x1B[0m${CONTENT_BG_SEQ}`);
@@ -52089,7 +52091,9 @@ ${CONTENT_BG_SEQ}`);
52089
52091
  if (!this.active || this._resizing)
52090
52092
  return;
52091
52093
  if (this.footerHeightChanged()) {
52092
- if (this.writeDepth === 0) {
52094
+ if (this.writeDepth > 0) {
52095
+ this.renderInputRowDuringStream();
52096
+ } else {
52093
52097
  this.renderFooterAndPositionInput();
52094
52098
  }
52095
52099
  return;
@@ -52146,16 +52150,18 @@ ${CONTENT_BG_SEQ}`);
52146
52150
  } else {
52147
52151
  buf += `\x1B[${Math.abs(heightDelta)}B`;
52148
52152
  }
52149
- process.stdout.write(buf);
52153
+ const w1 = this._origWrite ?? this._trueStdoutWrite;
52154
+ w1.call(process.stdout, buf);
52150
52155
  } else {
52151
52156
  let buf = "\x1B7\x1B[?7l";
52152
52157
  for (let i = 0; i < inputWrap.lines.length; i++) {
52153
52158
  const row = pos.inputStartRow + i;
52154
52159
  const prefix = i === 0 ? this.promptText : " ".repeat(this.promptWidth);
52155
- buf += `\x1B[${row};1H\x1B[2K${prefix}${inputWrap.lines[i]}`;
52160
+ buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${prefix}${inputWrap.lines[i]}${RESET}`;
52156
52161
  }
52157
52162
  buf += "\x1B[?7h\x1B8";
52158
- process.stdout.write(buf);
52163
+ const w2 = this._origWrite ?? this._trueStdoutWrite;
52164
+ w2.call(process.stdout, buf);
52159
52165
  }
52160
52166
  }
52161
52167
  /**
@@ -53233,8 +53239,9 @@ ${entry.fullContent}`
53233
53239
  return;
53234
53240
  }
53235
53241
  if (statusBar?.isActive) {
53236
- const origWrite = process.stdout.write;
53237
- const boundWrite = origWrite.bind(process.stdout);
53242
+ statusBar.beginContentWrite();
53243
+ const postInterceptWrite = process.stdout.write;
53244
+ const boundWrite = postInterceptWrite.bind(process.stdout);
53238
53245
  process.stdout.write = ((chunk, ...args) => {
53239
53246
  const text = typeof chunk === "string" ? chunk : new TextDecoder().decode(chunk);
53240
53247
  for (const line of text.split("\n")) {
@@ -53243,11 +53250,10 @@ ${entry.fullContent}`
53243
53250
  }
53244
53251
  return boundWrite(chunk, ...args);
53245
53252
  });
53246
- statusBar.beginContentWrite();
53247
53253
  try {
53248
53254
  fn();
53249
53255
  } finally {
53250
- process.stdout.write = origWrite;
53256
+ process.stdout.write = postInterceptWrite;
53251
53257
  statusBar.endContentWrite();
53252
53258
  }
53253
53259
  } else {
@@ -54060,13 +54066,10 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
54060
54066
  process.stdout.write(chunk);
54061
54067
  return;
54062
54068
  }
54063
- const rows = process.stdout.rows ?? 24;
54064
- const fh = statusBar._currentFooterHeight ?? 3;
54065
- const inputRow = rows - fh + 1;
54066
- const writer = statusBar._origWrite ? statusBar._origWrite.bind(process.stdout) : process.stdout.write.bind(process.stdout);
54067
- writer(`\x1B7\x1B[${inputRow};1H`);
54068
- writer(chunk);
54069
- writer(`\x1B8`);
54069
+ if (statusBar.isStreaming) {
54070
+ return;
54071
+ }
54072
+ process.stdout.write(chunk);
54070
54073
  });
54071
54074
  const rl = readline2.createInterface({
54072
54075
  input: mouseFilter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.35",
3
+ "version": "0.138.37",
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",