open-agents-ai 0.187.213 → 0.187.214

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 +49 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -288496,7 +288496,7 @@ import { existsSync as existsSync57, readFileSync as readFileSync43, watch as fs
288496
288496
  import { join as join74 } from "node:path";
288497
288497
  import { homedir as homedir24 } from "node:os";
288498
288498
  function panelEffectivelyVisible() {
288499
- return _enabled && !_scopeOverlayActive && !_scopeNeovimActive && _scopeMainViewActive;
288499
+ return _enabled && !_scopeOverlayActive && !_scopeNeovimActive && !_scopePagerActive && _scopeMainViewActive;
288500
288500
  }
288501
288501
  function todoDir2() {
288502
288502
  return join74(homedir24(), ".open-agents", "todos");
@@ -288545,6 +288545,10 @@ function setTuiTasksScope(scope) {
288545
288545
  _scopeNeovimActive = scope.neovimActive;
288546
288546
  changed = true;
288547
288547
  }
288548
+ if (scope.pagerActive !== void 0 && scope.pagerActive !== _scopePagerActive) {
288549
+ _scopePagerActive = scope.pagerActive;
288550
+ changed = true;
288551
+ }
288548
288552
  if (changed) {
288549
288553
  if (!panelEffectivelyVisible()) {
288550
288554
  clearLastPaintedRows();
@@ -288560,6 +288564,7 @@ function getTuiTasksScope() {
288560
288564
  overlayActive: _scopeOverlayActive,
288561
288565
  mainViewActive: _scopeMainViewActive,
288562
288566
  neovimActive: _scopeNeovimActive,
288567
+ pagerActive: _scopePagerActive,
288563
288568
  visible: panelEffectivelyVisible()
288564
288569
  };
288565
288570
  }
@@ -288695,9 +288700,12 @@ function render() {
288695
288700
  let out = HIDE + SAVE;
288696
288701
  const newTop = L.tasksTop;
288697
288702
  const newBottom = Math.min(L.tasksBottom, L.tasksTop + lines.length - 1);
288703
+ const safeClearTop = L.headerBottom + 1;
288704
+ const safeClearBottom = L.contentBottom;
288698
288705
  if (_lastPaintedTop >= 0 && _lastPaintedBottom >= _lastPaintedTop) {
288699
288706
  for (let row = _lastPaintedTop; row <= _lastPaintedBottom; row++) {
288700
288707
  if (row >= newTop && row <= newBottom) continue;
288708
+ if (row < safeClearTop || row > safeClearBottom) continue;
288701
288709
  out += `\x1B[${row};1H${CLEAR_LINE}`;
288702
288710
  }
288703
288711
  }
@@ -288716,8 +288724,12 @@ function render() {
288716
288724
  }
288717
288725
  function clearLastPaintedRows() {
288718
288726
  if (_lastPaintedTop < 0 || _lastPaintedBottom < _lastPaintedTop) return;
288727
+ const L = layout();
288728
+ const safeTop = L.headerBottom + 1;
288729
+ const safeBottom = Math.max(L.contentBottom, safeTop - 1);
288719
288730
  let out = HIDE + SAVE;
288720
288731
  for (let row = _lastPaintedTop; row <= _lastPaintedBottom; row++) {
288732
+ if (row < safeTop || row > safeBottom) continue;
288721
288733
  out += `\x1B[${row};1H${CLEAR_LINE}`;
288722
288734
  }
288723
288735
  out += RESTORE + SHOW;
@@ -288728,7 +288740,7 @@ function clearLastPaintedRows() {
288728
288740
  _lastPaintedTop = -1;
288729
288741
  _lastPaintedBottom = -1;
288730
288742
  }
288731
- var _activeSessionId, _watcher, _lastTodos, _enabled, _redrawScheduled, _onResizeChange, _scopeOverlayActive, _scopeMainViewActive, _scopeNeovimActive, _lastPaintedTop, _lastPaintedBottom, MAX_VISIBLE_ROWS, SAVE, RESTORE, HIDE, SHOW, CLEAR_LINE, RESET, BG, DIM_LABEL, GOLD, GREEN, MUTED_GREEN, GREY, RED;
288743
+ var _activeSessionId, _watcher, _lastTodos, _enabled, _redrawScheduled, _onResizeChange, _scopeOverlayActive, _scopeMainViewActive, _scopeNeovimActive, _scopePagerActive, _lastPaintedTop, _lastPaintedBottom, MAX_VISIBLE_ROWS, SAVE, RESTORE, HIDE, SHOW, CLEAR_LINE, RESET, BG, DIM_LABEL, GOLD, GREEN, MUTED_GREEN, GREY, RED;
288732
288744
  var init_tui_tasks_renderer = __esm({
288733
288745
  "packages/cli/src/tui/tui-tasks-renderer.ts"() {
288734
288746
  "use strict";
@@ -288742,6 +288754,7 @@ var init_tui_tasks_renderer = __esm({
288742
288754
  _scopeOverlayActive = false;
288743
288755
  _scopeMainViewActive = true;
288744
288756
  _scopeNeovimActive = false;
288757
+ _scopePagerActive = false;
288745
288758
  _lastPaintedTop = -1;
288746
288759
  _lastPaintedBottom = -1;
288747
288760
  MAX_VISIBLE_ROWS = 8;
@@ -290451,9 +290464,13 @@ var init_status_bar = __esm({
290451
290464
  /**
290452
290465
  * Update the top boundary of the scroll region (e.g. after carousel retirement).
290453
290466
  * When the scroll region starts at row 1, most terminals preserve scrollback.
290467
+ * DEFENSIVE: clamps to headerBottom + 1 so the scroll region never starts
290468
+ * inside the header zone (which would let content overwrite the version +
290469
+ * buttons row when fillContentArea / repaintContent run).
290454
290470
  */
290455
290471
  setScrollRegionTop(top) {
290456
- this.scrollRegionTop = top;
290472
+ const minTop = layout().headerBottom + 1;
290473
+ this.scrollRegionTop = Math.max(minTop, top);
290457
290474
  if (this.active) {
290458
290475
  this.applyScrollRegion();
290459
290476
  this.renderFooterAndPositionInput();
@@ -290584,13 +290601,19 @@ ${CONTENT_BG_SEQ}`);
290584
290601
  // Content scrollback — virtual scroll through buffered output lines
290585
290602
  // -----------------------------------------------------------------------
290586
290603
  /** Record a content line for scrollback. Called by the stream renderer intercept. */
290587
- /** Paint the entire content area with CONTENT_BG — called on activation and resize */
290604
+ /** Paint the entire content area with CONTENT_BG — called on activation and resize.
290605
+ * DEFENSIVE: never writes inside the header zone (rows 1..headerBottom),
290606
+ * even if scrollRegionTop is misconfigured. Without this guard, a stale
290607
+ * scrollRegionTop = 1 (set by retireCarousel when bannerActive is false)
290608
+ * would clear the header content row where the version + buttons live. */
290588
290609
  fillContentArea() {
290589
290610
  const h = this.contentHeight;
290611
+ const headerSafeFloor = layout().headerBottom + 1;
290590
290612
  let buf = "\x1B7\x1B[?25l";
290591
290613
  for (let r2 = 0; r2 < h; r2++) {
290592
290614
  const screenRow = this.scrollRegionTop + r2;
290593
290615
  if (screenRow > termRows()) break;
290616
+ if (screenRow < headerSafeFloor) continue;
290594
290617
  buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K`;
290595
290618
  }
290596
290619
  buf += "\x1B8\x1B[?25h";
@@ -290649,6 +290672,7 @@ ${CONTENT_BG_SEQ}`);
290649
290672
  this._autoScroll = false;
290650
290673
  const maxOffset = Math.max(0, this._contentLines.length - this.contentHeight);
290651
290674
  this._contentScrollOffset = Math.min(maxOffset, this._contentScrollOffset + lines);
290675
+ this._syncPagerScope();
290652
290676
  this.repaintContent();
290653
290677
  this.scheduleMouseIdle();
290654
290678
  }
@@ -290659,8 +290683,9 @@ ${CONTENT_BG_SEQ}`);
290659
290683
  this.cancelMouseIdle();
290660
290684
  this.enableMouseTracking();
290661
290685
  this._contentScrollOffset = Math.max(0, this._contentScrollOffset - lines);
290662
- this.repaintContent();
290663
290686
  if (this._contentScrollOffset === 0) this._autoScroll = true;
290687
+ this._syncPagerScope();
290688
+ this.repaintContent();
290664
290689
  this.scheduleMouseIdle();
290665
290690
  }
290666
290691
  /** Page up — scroll by visible height */
@@ -290675,8 +290700,22 @@ ${CONTENT_BG_SEQ}`);
290675
290700
  jumpToLive() {
290676
290701
  this._contentScrollOffset = 0;
290677
290702
  this._autoScroll = true;
290703
+ this._syncPagerScope();
290678
290704
  this.repaintContent();
290679
290705
  }
290706
+ /**
290707
+ * WO-TASK-02 — sync the tasks panel "pager" scope flag with the current
290708
+ * scroll-back state. While the user is scrolled back through content
290709
+ * history (PgUp/PgDn/wheel), the tasks panel must release its reserved
290710
+ * zone so the pager content owns the entire scrollable area and the
290711
+ * agent's todo_write updates don't trigger layout reflows that wipe
290712
+ * the page mid-read.
290713
+ */
290714
+ _syncPagerScope() {
290715
+ const pagerOn = this._contentScrollOffset > 0;
290716
+ Promise.resolve().then(() => (init_tui_tasks_renderer(), tui_tasks_renderer_exports)).then((m2) => m2.setTuiTasksScope({ pagerActive: pagerOn })).catch(() => {
290717
+ });
290718
+ }
290680
290719
  /**
290681
290720
  * Repaint content area from buffer at current scroll position.
290682
290721
  *
@@ -290691,6 +290730,7 @@ ${CONTENT_BG_SEQ}`);
290691
290730
  const totalLines = this._contentLines.length;
290692
290731
  const startIdx = Math.max(0, totalLines - h - this._contentScrollOffset);
290693
290732
  const w = termCols();
290733
+ const headerSafeFloor = layout().headerBottom + 1;
290694
290734
  let buf = "\x1B[?2026h";
290695
290735
  buf += "\x1B7";
290696
290736
  buf += "\x1B[?25l";
@@ -290698,6 +290738,7 @@ ${CONTENT_BG_SEQ}`);
290698
290738
  const lineIdx = startIdx + row;
290699
290739
  let line = lineIdx < totalLines ? this._contentLines[lineIdx] : "";
290700
290740
  const screenRow = this.scrollRegionTop + row;
290741
+ if (screenRow < headerSafeFloor) continue;
290701
290742
  line = line.replace(/\x1B\[0m/g, `\x1B[0m${CONTENT_BG_SEQ}`);
290702
290743
  buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K${line}`;
290703
290744
  }
@@ -328798,9 +328839,8 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
328798
328839
  if (!carouselRetired && carousel.isRunning) {
328799
328840
  carousel.stop();
328800
328841
  carouselRetired = true;
328801
- const bannerActive = banner.getDesign() !== null;
328802
328842
  if (statusBar.isActive) {
328803
- statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
328843
+ statusBar.setScrollRegionTop(headerHeight() + 1);
328804
328844
  }
328805
328845
  }
328806
328846
  },
@@ -329261,8 +329301,7 @@ Execute this skill now. Follow the behavioral guidance above.`;
329261
329301
  if (!carouselRetired && carousel.isRunning) {
329262
329302
  carousel.stop();
329263
329303
  carouselRetired = true;
329264
- const bannerActive = banner.getDesign() !== null;
329265
- if (statusBar.isActive) statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
329304
+ if (statusBar.isActive) statusBar.setScrollRegionTop(headerHeight() + 1);
329266
329305
  }
329267
329306
  writeContent(() => renderUserMessage(`/${cmdResult.name}${cmdResult.args ? " " + cmdResult.args : ""}`));
329268
329307
  lastSubmittedPrompt = skillPrompt;
@@ -329535,8 +329574,7 @@ Summarize or analyze this transcription as appropriate.`;
329535
329574
  if (!carouselRetired && carousel.isRunning) {
329536
329575
  carousel.stop();
329537
329576
  carouselRetired = true;
329538
- const bannerActive = banner.getDesign() !== null;
329539
- if (statusBar.isActive) statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
329577
+ if (statusBar.isActive) statusBar.setScrollRegionTop(headerHeight() + 1);
329540
329578
  }
329541
329579
  const inputLineCount = fullInput.split("\n").length;
329542
329580
  const displayText = isImage ? `[Image: ${cleanPath}]` : inputLineCount > 1 ? `[pasted ${inputLineCount} lines]` : fullInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.213",
3
+ "version": "0.187.214",
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",