open-agents-ai 0.104.22 → 0.104.24

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 +43 -25
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -47628,9 +47628,6 @@ var init_status_bar = __esm({
47628
47628
  _countdown = 0;
47629
47629
  _recBlink = true;
47630
47630
  _recBlinkTimer = null;
47631
- /** Alive blinker: green/black dot at 0.5s, always on when status bar active */
47632
- _aliveBlink = true;
47633
- _aliveBlinkTimer = null;
47634
47631
  /** Whether agent is actively processing (braille animation) */
47635
47632
  _processing = false;
47636
47633
  _brailleSpinner = new BrailleSpinner();
@@ -47827,7 +47824,7 @@ var init_status_bar = __esm({
47827
47824
  /** Current active peer/connection count — drives LED color spectrum */
47828
47825
  _exposePeerCount = 0;
47829
47826
  /**
47830
- * Blue→magenta color spectrum based on peer count.
47827
+ * Blue→magenta color spectrum based on peer count (expose section LED).
47831
47828
  * 256-color ANSI codes: 33(blue) → 69 → 105 → 141 → 177 → 201(magenta)
47832
47829
  * 1 peer = blue, 5+ peers = magenta, 0 = dim gray (240).
47833
47830
  */
@@ -47839,6 +47836,19 @@ var init_status_bar = __esm({
47839
47836
  const idx = Math.min(n - 1, stops.length - 1);
47840
47837
  return stops[idx];
47841
47838
  }
47839
+ /**
47840
+ * Cyan→magenta color spectrum for the alive LED (section 0).
47841
+ * 256-color ramp through the RGB cube: (0,5,5)→(5,0,5).
47842
+ * 1 peer = cyan, 5+ peers = magenta, 0 = dim gray (240).
47843
+ */
47844
+ _aliveLedColor() {
47845
+ const n = this._exposePeerCount;
47846
+ if (n <= 0)
47847
+ return 240;
47848
+ const stops = [51, 81, 111, 141, 171, 201];
47849
+ const idx = Math.min(n - 1, stops.length - 1);
47850
+ return stops[idx];
47851
+ }
47842
47852
  /** Update expose gateway status — only stores state, no blink timers */
47843
47853
  setExposeStatus(status) {
47844
47854
  this._expose = status;
@@ -48168,14 +48178,6 @@ var init_status_bar = __esm({
48168
48178
  if (!this._metricsCollector.isActive) {
48169
48179
  this.startLocalMetrics();
48170
48180
  }
48171
- this._aliveBlink = true;
48172
- if (this._aliveBlinkTimer)
48173
- clearInterval(this._aliveBlinkTimer);
48174
- this._aliveBlinkTimer = setInterval(() => {
48175
- this._aliveBlink = !this._aliveBlink;
48176
- if (this.active)
48177
- this.renderFooterPreserveCursor();
48178
- }, 500);
48179
48181
  }
48180
48182
  /** Deactivate — restore full-screen scroll region */
48181
48183
  deactivate() {
@@ -48185,10 +48187,6 @@ var init_status_bar = __esm({
48185
48187
  clearTimeout(this._resizeTimer);
48186
48188
  this._resizeTimer = null;
48187
48189
  }
48188
- if (this._aliveBlinkTimer) {
48189
- clearInterval(this._aliveBlinkTimer);
48190
- this._aliveBlinkTimer = null;
48191
- }
48192
48190
  this.stopAllMetrics();
48193
48191
  const rows = process.stdout.rows ?? 24;
48194
48192
  process.stdout.write(`\x1B[1;${rows}r`);
@@ -48379,9 +48377,10 @@ var init_status_bar = __esm({
48379
48377
  const compactOrder = [];
48380
48378
  let modelSectionIdx = -1;
48381
48379
  let versionSectionIdx = -1;
48382
- {
48383
- const dot = this._aliveBlink ? "\u{1F7E2}" : "\u26AB";
48384
- sections.push({ expanded: dot, compact: dot, expandedW: 2, compactW: 2, empty: false });
48380
+ if (this._exposeFlashOn) {
48381
+ const ledColor = this._aliveLedColor();
48382
+ const dot = `\x1B[38;5;${ledColor}m\u2B24\x1B[0m`;
48383
+ sections.push({ expanded: dot, compact: dot, expandedW: 1, compactW: 1, empty: false });
48385
48384
  }
48386
48385
  const tokInRaw = m.promptTokens > 0 ? m.promptTokens : Math.max(m.estimatedContextTokens, 0);
48387
48386
  const effectiveOut = this.effectiveCompletionTokens;
@@ -48702,6 +48701,19 @@ var init_status_bar = __esm({
48702
48701
  * Wrap input text into lines of availWidth characters.
48703
48702
  * Returns the lines, plus cursor position within the wrapped layout.
48704
48703
  */
48704
+ /**
48705
+ * Insert a reverse-video block cursor at position `pos` in plain text `text`.
48706
+ * If pos is at end of text, renders a reverse-video space (block cursor).
48707
+ * If pos is mid-text, renders the character at pos with reverse video.
48708
+ */
48709
+ static insertVisualCursor(text, pos) {
48710
+ const REV = "\x1B[7m";
48711
+ const RST = "\x1B[0m";
48712
+ if (pos >= text.length) {
48713
+ return text + REV + " " + RST;
48714
+ }
48715
+ return text.slice(0, pos) + REV + text[pos] + RST + text.slice(pos + 1);
48716
+ }
48705
48717
  wrapInput(termWidth) {
48706
48718
  const availWidth = Math.max(1, termWidth - this.promptWidth);
48707
48719
  const inputState = this.inputStateProvider?.();
@@ -48709,21 +48721,27 @@ var init_status_bar = __esm({
48709
48721
  const cursorPos = inputState?.cursor ?? 0;
48710
48722
  const ghost = this.getGhostText(fullLine, cursorPos);
48711
48723
  if (fullLine.length <= availWidth) {
48712
- const displayLine = ghost ? fullLine + `\x1B[2m\x1B[38;5;240m${ghost}\x1B[0m` : fullLine;
48724
+ let displayLine;
48725
+ if (ghost) {
48726
+ displayLine = fullLine + `\x1B[7m\x1B[38;5;240m${ghost[0]}\x1B[0m\x1B[2m\x1B[38;5;240m${ghost.slice(1)}\x1B[0m`;
48727
+ } else {
48728
+ displayLine = _StatusBar.insertVisualCursor(fullLine, cursorPos);
48729
+ }
48713
48730
  return {
48714
48731
  lines: [displayLine],
48715
48732
  cursorRow: 0,
48716
48733
  cursorCol: this.promptWidth + cursorPos + 1
48717
48734
  };
48718
48735
  }
48719
- const lines = [];
48736
+ const rawLines = [];
48720
48737
  for (let i = 0; i < fullLine.length; i += availWidth) {
48721
- lines.push(fullLine.slice(i, i + availWidth));
48738
+ rawLines.push(fullLine.slice(i, i + availWidth));
48722
48739
  }
48723
- if (lines.length === 0)
48724
- lines.push("");
48725
- const cursorLineIdx = Math.min(Math.floor(cursorPos / availWidth), lines.length - 1);
48740
+ if (rawLines.length === 0)
48741
+ rawLines.push("");
48742
+ const cursorLineIdx = Math.min(Math.floor(cursorPos / availWidth), rawLines.length - 1);
48726
48743
  const cursorColInLine = cursorPos - cursorLineIdx * availWidth;
48744
+ const lines = rawLines.map((line, i) => i === cursorLineIdx ? _StatusBar.insertVisualCursor(line, cursorColInLine) : line);
48727
48745
  return {
48728
48746
  lines,
48729
48747
  cursorRow: cursorLineIdx,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.104.22",
3
+ "version": "0.104.24",
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",