open-agents-ai 0.138.36 → 0.138.38

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 +33 -26
  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 {
@@ -53359,6 +53365,7 @@ ${entry.fullContent}`
53359
53365
  streamTextBuffer = "";
53360
53366
  if (!isNeovimActive()) {
53361
53367
  if (stream?.enabled) {
53368
+ stream?.muteReadline?.();
53362
53369
  if (statusBar?.isActive)
53363
53370
  statusBar.beginContentWrite();
53364
53371
  stream.renderer.onStreamStart();
@@ -53398,6 +53405,7 @@ ${entry.fullContent}`
53398
53405
  stream.renderer.onStreamEnd();
53399
53406
  if (statusBar?.isActive)
53400
53407
  statusBar.endContentWrite();
53408
+ stream?.unmuteReadline?.();
53401
53409
  }
53402
53410
  if (config.verbose && streamDurationMs > 0) {
53403
53411
  const streamChars = event.content?.length ?? 0;
@@ -54053,23 +54061,9 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
54053
54061
  statusBar.scrollContentDown(lines);
54054
54062
  });
54055
54063
  process.stdin.pipe(mouseFilter);
54056
- const { PassThrough } = await import("node:stream");
54057
- const rlOutput = new PassThrough();
54058
- rlOutput.on("data", (chunk) => {
54059
- if (!statusBar.isActive) {
54060
- process.stdout.write(chunk);
54061
- return;
54062
- }
54063
- if (statusBar.isStreaming) {
54064
- return;
54065
- }
54066
- process.stdout.write(chunk);
54067
- });
54068
54064
  const rl = readline2.createInterface({
54069
54065
  input: mouseFilter,
54070
- // filtered stream, NOT raw stdin
54071
- output: rlOutput,
54072
- // forced to input row, NOT raw stdout
54066
+ output: process.stdout,
54073
54067
  prompt: idlePrompt,
54074
54068
  terminal: true,
54075
54069
  historySize: MAX_HISTORY_LINES,
@@ -55750,7 +55744,20 @@ Execute this skill now. Follow the behavioral guidance above.`;
55750
55744
  statusBar.setProcessing(true);
55751
55745
  const task = startTask(skillPrompt, currentConfig, repoRoot, voiceEngine, {
55752
55746
  enabled: streamEnabled,
55753
- renderer: streamRenderer
55747
+ renderer: streamRenderer,
55748
+ muteReadline: () => {
55749
+ if (rl.output) {
55750
+ rl._savedOutput = rl.output;
55751
+ rl.output = null;
55752
+ }
55753
+ },
55754
+ unmuteReadline: () => {
55755
+ if (rl._savedOutput) {
55756
+ rl.output = rl._savedOutput;
55757
+ delete rl._savedOutput;
55758
+ }
55759
+ showPrompt();
55760
+ }
55754
55761
  }, {
55755
55762
  contextStores,
55756
55763
  taskMemoryStore: taskMemoryStore ?? void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.36",
3
+ "version": "0.138.38",
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",