open-agents-ai 0.187.213 → 0.187.215

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 +61 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -280923,11 +280923,12 @@ function layout() {
280923
280923
  const footerBoxBottom = footerMetrics - 1;
280924
280924
  const footerBoxTop = rows - fh + 1;
280925
280925
  const footerInput = footerBoxTop + 1;
280926
+ const FOOTER_SPACER_ROWS = 1;
280926
280927
  let tasksBottom;
280927
280928
  let tasksTop;
280928
280929
  let contentBottom;
280929
280930
  if (th > 0) {
280930
- tasksBottom = footerBoxTop - 1;
280931
+ tasksBottom = footerBoxTop - 1 - FOOTER_SPACER_ROWS;
280931
280932
  tasksTop = tasksBottom - th + 1;
280932
280933
  contentBottom = tasksTop - 1 - CONTENT_SPACER_ROWS;
280933
280934
  } else {
@@ -288496,7 +288497,7 @@ import { existsSync as existsSync57, readFileSync as readFileSync43, watch as fs
288496
288497
  import { join as join74 } from "node:path";
288497
288498
  import { homedir as homedir24 } from "node:os";
288498
288499
  function panelEffectivelyVisible() {
288499
- return _enabled && !_scopeOverlayActive && !_scopeNeovimActive && _scopeMainViewActive;
288500
+ return _enabled && !_scopeOverlayActive && !_scopeNeovimActive && !_scopePagerActive && _scopeMainViewActive;
288500
288501
  }
288501
288502
  function todoDir2() {
288502
288503
  return join74(homedir24(), ".open-agents", "todos");
@@ -288545,6 +288546,10 @@ function setTuiTasksScope(scope) {
288545
288546
  _scopeNeovimActive = scope.neovimActive;
288546
288547
  changed = true;
288547
288548
  }
288549
+ if (scope.pagerActive !== void 0 && scope.pagerActive !== _scopePagerActive) {
288550
+ _scopePagerActive = scope.pagerActive;
288551
+ changed = true;
288552
+ }
288548
288553
  if (changed) {
288549
288554
  if (!panelEffectivelyVisible()) {
288550
288555
  clearLastPaintedRows();
@@ -288560,6 +288565,7 @@ function getTuiTasksScope() {
288560
288565
  overlayActive: _scopeOverlayActive,
288561
288566
  mainViewActive: _scopeMainViewActive,
288562
288567
  neovimActive: _scopeNeovimActive,
288568
+ pagerActive: _scopePagerActive,
288563
288569
  visible: panelEffectivelyVisible()
288564
288570
  };
288565
288571
  }
@@ -288695,9 +288701,12 @@ function render() {
288695
288701
  let out = HIDE + SAVE;
288696
288702
  const newTop = L.tasksTop;
288697
288703
  const newBottom = Math.min(L.tasksBottom, L.tasksTop + lines.length - 1);
288704
+ const safeClearTop = L.headerBottom + 1;
288705
+ const safeClearBottom = L.contentBottom;
288698
288706
  if (_lastPaintedTop >= 0 && _lastPaintedBottom >= _lastPaintedTop) {
288699
288707
  for (let row = _lastPaintedTop; row <= _lastPaintedBottom; row++) {
288700
288708
  if (row >= newTop && row <= newBottom) continue;
288709
+ if (row < safeClearTop || row > safeClearBottom) continue;
288701
288710
  out += `\x1B[${row};1H${CLEAR_LINE}`;
288702
288711
  }
288703
288712
  }
@@ -288716,8 +288725,12 @@ function render() {
288716
288725
  }
288717
288726
  function clearLastPaintedRows() {
288718
288727
  if (_lastPaintedTop < 0 || _lastPaintedBottom < _lastPaintedTop) return;
288728
+ const L = layout();
288729
+ const safeTop = L.headerBottom + 1;
288730
+ const safeBottom = Math.max(L.contentBottom, safeTop - 1);
288719
288731
  let out = HIDE + SAVE;
288720
288732
  for (let row = _lastPaintedTop; row <= _lastPaintedBottom; row++) {
288733
+ if (row < safeTop || row > safeBottom) continue;
288721
288734
  out += `\x1B[${row};1H${CLEAR_LINE}`;
288722
288735
  }
288723
288736
  out += RESTORE + SHOW;
@@ -288728,7 +288741,7 @@ function clearLastPaintedRows() {
288728
288741
  _lastPaintedTop = -1;
288729
288742
  _lastPaintedBottom = -1;
288730
288743
  }
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;
288744
+ 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
288745
  var init_tui_tasks_renderer = __esm({
288733
288746
  "packages/cli/src/tui/tui-tasks-renderer.ts"() {
288734
288747
  "use strict";
@@ -288742,6 +288755,7 @@ var init_tui_tasks_renderer = __esm({
288742
288755
  _scopeOverlayActive = false;
288743
288756
  _scopeMainViewActive = true;
288744
288757
  _scopeNeovimActive = false;
288758
+ _scopePagerActive = false;
288745
288759
  _lastPaintedTop = -1;
288746
288760
  _lastPaintedBottom = -1;
288747
288761
  MAX_VISIBLE_ROWS = 8;
@@ -290451,9 +290465,13 @@ var init_status_bar = __esm({
290451
290465
  /**
290452
290466
  * Update the top boundary of the scroll region (e.g. after carousel retirement).
290453
290467
  * When the scroll region starts at row 1, most terminals preserve scrollback.
290468
+ * DEFENSIVE: clamps to headerBottom + 1 so the scroll region never starts
290469
+ * inside the header zone (which would let content overwrite the version +
290470
+ * buttons row when fillContentArea / repaintContent run).
290454
290471
  */
290455
290472
  setScrollRegionTop(top) {
290456
- this.scrollRegionTop = top;
290473
+ const minTop = layout().headerBottom + 1;
290474
+ this.scrollRegionTop = Math.max(minTop, top);
290457
290475
  if (this.active) {
290458
290476
  this.applyScrollRegion();
290459
290477
  this.renderFooterAndPositionInput();
@@ -290584,13 +290602,19 @@ ${CONTENT_BG_SEQ}`);
290584
290602
  // Content scrollback — virtual scroll through buffered output lines
290585
290603
  // -----------------------------------------------------------------------
290586
290604
  /** 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 */
290605
+ /** Paint the entire content area with CONTENT_BG — called on activation and resize.
290606
+ * DEFENSIVE: never writes inside the header zone (rows 1..headerBottom),
290607
+ * even if scrollRegionTop is misconfigured. Without this guard, a stale
290608
+ * scrollRegionTop = 1 (set by retireCarousel when bannerActive is false)
290609
+ * would clear the header content row where the version + buttons live. */
290588
290610
  fillContentArea() {
290589
290611
  const h = this.contentHeight;
290612
+ const headerSafeFloor = layout().headerBottom + 1;
290590
290613
  let buf = "\x1B7\x1B[?25l";
290591
290614
  for (let r2 = 0; r2 < h; r2++) {
290592
290615
  const screenRow = this.scrollRegionTop + r2;
290593
290616
  if (screenRow > termRows()) break;
290617
+ if (screenRow < headerSafeFloor) continue;
290594
290618
  buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K`;
290595
290619
  }
290596
290620
  buf += "\x1B8\x1B[?25h";
@@ -290626,15 +290650,15 @@ ${CONTENT_BG_SEQ}`);
290626
290650
  this._contentLines.splice(-n2, n2);
290627
290651
  if (this.active) this.refreshDisplay();
290628
290652
  }
290629
- /** Number of visible content rows */
290653
+ /** Number of visible content rows. Derived directly from layout() so it
290654
+ * always matches the same source of truth used by the tasks renderer
290655
+ * and the spacer math. Previous version hard-coded SPACER_ROWS = 1,
290656
+ * which got out of sync when the FOOTER_SPACER_ROWS row was added
290657
+ * below the tasks panel — leaving content writes that overlapped the
290658
+ * tasks panel or the footer spacer. */
290630
290659
  get contentHeight() {
290631
290660
  const L = layout();
290632
- const tasksRows = L.tasksHeight;
290633
- const SPACER_ROWS = 1;
290634
- return Math.max(
290635
- 1,
290636
- termRows() - (this.scrollRegionTop - 1) - this._currentFooterHeight - tasksRows - SPACER_ROWS
290637
- );
290661
+ return Math.max(1, L.contentBottom - this.scrollRegionTop + 1);
290638
290662
  }
290639
290663
  /** Whether user has scrolled back from live */
290640
290664
  get isScrolledBack() {
@@ -290649,6 +290673,7 @@ ${CONTENT_BG_SEQ}`);
290649
290673
  this._autoScroll = false;
290650
290674
  const maxOffset = Math.max(0, this._contentLines.length - this.contentHeight);
290651
290675
  this._contentScrollOffset = Math.min(maxOffset, this._contentScrollOffset + lines);
290676
+ this._syncPagerScope();
290652
290677
  this.repaintContent();
290653
290678
  this.scheduleMouseIdle();
290654
290679
  }
@@ -290659,8 +290684,9 @@ ${CONTENT_BG_SEQ}`);
290659
290684
  this.cancelMouseIdle();
290660
290685
  this.enableMouseTracking();
290661
290686
  this._contentScrollOffset = Math.max(0, this._contentScrollOffset - lines);
290662
- this.repaintContent();
290663
290687
  if (this._contentScrollOffset === 0) this._autoScroll = true;
290688
+ this._syncPagerScope();
290689
+ this.repaintContent();
290664
290690
  this.scheduleMouseIdle();
290665
290691
  }
290666
290692
  /** Page up — scroll by visible height */
@@ -290675,8 +290701,22 @@ ${CONTENT_BG_SEQ}`);
290675
290701
  jumpToLive() {
290676
290702
  this._contentScrollOffset = 0;
290677
290703
  this._autoScroll = true;
290704
+ this._syncPagerScope();
290678
290705
  this.repaintContent();
290679
290706
  }
290707
+ /**
290708
+ * WO-TASK-02 — sync the tasks panel "pager" scope flag with the current
290709
+ * scroll-back state. While the user is scrolled back through content
290710
+ * history (PgUp/PgDn/wheel), the tasks panel must release its reserved
290711
+ * zone so the pager content owns the entire scrollable area and the
290712
+ * agent's todo_write updates don't trigger layout reflows that wipe
290713
+ * the page mid-read.
290714
+ */
290715
+ _syncPagerScope() {
290716
+ const pagerOn = this._contentScrollOffset > 0;
290717
+ Promise.resolve().then(() => (init_tui_tasks_renderer(), tui_tasks_renderer_exports)).then((m2) => m2.setTuiTasksScope({ pagerActive: pagerOn })).catch(() => {
290718
+ });
290719
+ }
290680
290720
  /**
290681
290721
  * Repaint content area from buffer at current scroll position.
290682
290722
  *
@@ -290691,6 +290731,7 @@ ${CONTENT_BG_SEQ}`);
290691
290731
  const totalLines = this._contentLines.length;
290692
290732
  const startIdx = Math.max(0, totalLines - h - this._contentScrollOffset);
290693
290733
  const w = termCols();
290734
+ const headerSafeFloor = layout().headerBottom + 1;
290694
290735
  let buf = "\x1B[?2026h";
290695
290736
  buf += "\x1B7";
290696
290737
  buf += "\x1B[?25l";
@@ -290698,6 +290739,7 @@ ${CONTENT_BG_SEQ}`);
290698
290739
  const lineIdx = startIdx + row;
290699
290740
  let line = lineIdx < totalLines ? this._contentLines[lineIdx] : "";
290700
290741
  const screenRow = this.scrollRegionTop + row;
290742
+ if (screenRow < headerSafeFloor) continue;
290701
290743
  line = line.replace(/\x1B\[0m/g, `\x1B[0m${CONTENT_BG_SEQ}`);
290702
290744
  buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K${line}`;
290703
290745
  }
@@ -291231,8 +291273,10 @@ ${CONTENT_BG_SEQ}`);
291231
291273
  let buf = "\x1B[?7l";
291232
291274
  const boxInner = w - 2;
291233
291275
  buf += `\x1B[${pos.inputStartRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_TL}${BOX_H.repeat(Math.max(0, boxInner))}${BOX_TR}${RESET2}`;
291276
+ const Lspacer = layout();
291234
291277
  const spacerRow = pos.inputStartRow - 1;
291235
- if (spacerRow >= this.scrollRegionTop) {
291278
+ const tasksOccupiesSpacer = Lspacer.tasksHeight > 0 && spacerRow >= Lspacer.tasksTop && spacerRow <= Lspacer.tasksBottom;
291279
+ if (spacerRow >= this.scrollRegionTop && !tasksOccupiesSpacer) {
291236
291280
  buf += `\x1B[${spacerRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET2}`;
291237
291281
  }
291238
291282
  for (let i2 = 0; i2 < inputWrap.lines.length; i2++) {
@@ -328798,9 +328842,8 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
328798
328842
  if (!carouselRetired && carousel.isRunning) {
328799
328843
  carousel.stop();
328800
328844
  carouselRetired = true;
328801
- const bannerActive = banner.getDesign() !== null;
328802
328845
  if (statusBar.isActive) {
328803
- statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
328846
+ statusBar.setScrollRegionTop(headerHeight() + 1);
328804
328847
  }
328805
328848
  }
328806
328849
  },
@@ -329261,8 +329304,7 @@ Execute this skill now. Follow the behavioral guidance above.`;
329261
329304
  if (!carouselRetired && carousel.isRunning) {
329262
329305
  carousel.stop();
329263
329306
  carouselRetired = true;
329264
- const bannerActive = banner.getDesign() !== null;
329265
- if (statusBar.isActive) statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
329307
+ if (statusBar.isActive) statusBar.setScrollRegionTop(headerHeight() + 1);
329266
329308
  }
329267
329309
  writeContent(() => renderUserMessage(`/${cmdResult.name}${cmdResult.args ? " " + cmdResult.args : ""}`));
329268
329310
  lastSubmittedPrompt = skillPrompt;
@@ -329535,8 +329577,7 @@ Summarize or analyze this transcription as appropriate.`;
329535
329577
  if (!carouselRetired && carousel.isRunning) {
329536
329578
  carousel.stop();
329537
329579
  carouselRetired = true;
329538
- const bannerActive = banner.getDesign() !== null;
329539
- if (statusBar.isActive) statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
329580
+ if (statusBar.isActive) statusBar.setScrollRegionTop(headerHeight() + 1);
329540
329581
  }
329541
329582
  const inputLineCount = fullInput.split("\n").length;
329542
329583
  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.215",
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",