open-agents-ai 0.138.39 → 0.138.41
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.
- package/dist/index.js +29 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51331,7 +51331,7 @@ var init_status_bar = __esm({
|
|
|
51331
51331
|
}
|
|
51332
51332
|
this.stopAllMetrics();
|
|
51333
51333
|
const rows = process.stdout.rows ?? 24;
|
|
51334
|
-
|
|
51334
|
+
this.termWrite(`\x1B[1;${rows}r`);
|
|
51335
51335
|
}
|
|
51336
51336
|
/** Whether the status bar is currently active */
|
|
51337
51337
|
get isActive() {
|
|
@@ -51431,7 +51431,7 @@ var init_status_bar = __esm({
|
|
|
51431
51431
|
}
|
|
51432
51432
|
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildBufferContent(w)}${RESET}`;
|
|
51433
51433
|
buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET}\x1B[?7h\x1B[${pos.scrollEnd};1H`;
|
|
51434
|
-
|
|
51434
|
+
this.termWrite(buf);
|
|
51435
51435
|
} else {
|
|
51436
51436
|
this.applyScrollRegion();
|
|
51437
51437
|
let clearBuf = "\x1B[?7l";
|
|
@@ -51439,7 +51439,7 @@ var init_status_bar = __esm({
|
|
|
51439
51439
|
clearBuf += `\x1B[${row};1H\x1B[2K`;
|
|
51440
51440
|
}
|
|
51441
51441
|
clearBuf += "\x1B[?7h";
|
|
51442
|
-
|
|
51442
|
+
this.termWrite(clearBuf);
|
|
51443
51443
|
this.renderFooterAndPositionInput();
|
|
51444
51444
|
if (this._bannerRefresh)
|
|
51445
51445
|
this._bannerRefresh();
|
|
@@ -51466,6 +51466,11 @@ var init_status_bar = __esm({
|
|
|
51466
51466
|
_origWrite = null;
|
|
51467
51467
|
/** True stdout.write captured at construction — immune to interceptor stacking */
|
|
51468
51468
|
_trueStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
51469
|
+
/** Write directly to the terminal, bypassing ALL interceptors.
|
|
51470
|
+
* ALL footer/input/braille rendering MUST use this, never process.stdout.write. */
|
|
51471
|
+
termWrite(data) {
|
|
51472
|
+
this._trueStdoutWrite.call(process.stdout, data);
|
|
51473
|
+
}
|
|
51469
51474
|
beginContentWrite() {
|
|
51470
51475
|
if (!this.active)
|
|
51471
51476
|
return;
|
|
@@ -51605,7 +51610,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
51605
51610
|
return;
|
|
51606
51611
|
const rows = process.stdout.rows ?? 24;
|
|
51607
51612
|
const pos = this.rowPositions(rows);
|
|
51608
|
-
|
|
51613
|
+
this.termWrite(`\x1B[${pos.inputStartRow};1H\x1B[2K\x1B[?25h`);
|
|
51609
51614
|
}
|
|
51610
51615
|
/** Strip ANSI escape codes to measure visible character width */
|
|
51611
51616
|
static visWidth(s) {
|
|
@@ -52025,7 +52030,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52025
52030
|
this.updateFooterHeight();
|
|
52026
52031
|
const rows = process.stdout.rows ?? 24;
|
|
52027
52032
|
const pos = this.rowPositions(rows);
|
|
52028
|
-
|
|
52033
|
+
this.termWrite(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[${pos.scrollEnd};1H`);
|
|
52029
52034
|
}
|
|
52030
52035
|
/**
|
|
52031
52036
|
* Draw the COMPLETE footer — separators, prompt, metrics — in a single
|
|
@@ -52051,15 +52056,15 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52051
52056
|
let scrollUp = `\x1B[${oldScrollEnd};1H`;
|
|
52052
52057
|
for (let i = 0; i < heightDelta; i++)
|
|
52053
52058
|
scrollUp += "\n";
|
|
52054
|
-
|
|
52055
|
-
|
|
52059
|
+
this.termWrite(scrollUp);
|
|
52060
|
+
this.termWrite(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`);
|
|
52056
52061
|
} else {
|
|
52057
52062
|
const absD = Math.abs(heightDelta);
|
|
52058
|
-
|
|
52063
|
+
this.termWrite(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`);
|
|
52059
52064
|
let scrollDown = `\x1B[${this.scrollRegionTop};1H`;
|
|
52060
52065
|
for (let i = 0; i < absD; i++)
|
|
52061
52066
|
scrollDown += "\x1BM";
|
|
52062
|
-
|
|
52067
|
+
this.termWrite(scrollDown);
|
|
52063
52068
|
}
|
|
52064
52069
|
}
|
|
52065
52070
|
const inputWrap = this.wrapInput(w);
|
|
@@ -52073,7 +52078,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52073
52078
|
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildBufferContent(w)}${RESET}`;
|
|
52074
52079
|
buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET}`;
|
|
52075
52080
|
buf += `\x1B[?7h\x1B[${cursorTermRow};${inputWrap.cursorCol}H\x1B[?25h`;
|
|
52076
|
-
|
|
52081
|
+
this.termWrite(buf);
|
|
52077
52082
|
}
|
|
52078
52083
|
/**
|
|
52079
52084
|
* Redraw footer while preserving the current cursor position.
|
|
@@ -52103,7 +52108,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52103
52108
|
const pos = this.rowPositions(rows);
|
|
52104
52109
|
const buf = `\x1B7\x1B[?7l\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildBufferContent(w)}${RESET}\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET}\x1B[?7h\x1B8` + // DEC restore cursor
|
|
52105
52110
|
(this.writeDepth === 0 ? "\x1B[?25h" : "");
|
|
52106
|
-
|
|
52111
|
+
this.termWrite(buf);
|
|
52107
52112
|
}
|
|
52108
52113
|
/**
|
|
52109
52114
|
* Render the input rows during an active content write (streaming).
|
|
@@ -52185,7 +52190,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52185
52190
|
const w = getTermWidth();
|
|
52186
52191
|
const pos = this.rowPositions(rows);
|
|
52187
52192
|
const content = this.buildBufferContent(w);
|
|
52188
|
-
|
|
52193
|
+
this.termWrite(`\x1B7\x1B[?7l\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${content}${RESET}\x1B[?7h\x1B8`);
|
|
52189
52194
|
}
|
|
52190
52195
|
/**
|
|
52191
52196
|
* Hook into process.stdin to redraw footer after every keystroke.
|
|
@@ -53780,6 +53785,7 @@ async function startInteractive(config, repoPath) {
|
|
|
53780
53785
|
}
|
|
53781
53786
|
})).catch(() => {
|
|
53782
53787
|
});
|
|
53788
|
+
let updateNotified = false;
|
|
53783
53789
|
if (!isResumed) {
|
|
53784
53790
|
checkForUpdate(version).then((updateInfo) => {
|
|
53785
53791
|
if (updateInfo) {
|
|
@@ -53788,10 +53794,10 @@ async function startInteractive(config, repoPath) {
|
|
|
53788
53794
|
setTimeout(writeMsg, 3e3);
|
|
53789
53795
|
return;
|
|
53790
53796
|
}
|
|
53797
|
+
updateNotified = true;
|
|
53791
53798
|
if (statusBar?.isActive)
|
|
53792
53799
|
statusBar.beginContentWrite();
|
|
53793
|
-
|
|
53794
|
-
renderInfo(`Run /update to install.`);
|
|
53800
|
+
renderInfo(`Update available: v${updateInfo.currentVersion} \u2192 v${c2.bold(c2.green(updateInfo.latestVersion))}. Run /update to install.`);
|
|
53795
53801
|
if (statusBar?.isActive)
|
|
53796
53802
|
statusBar.endContentWrite();
|
|
53797
53803
|
};
|
|
@@ -53802,14 +53808,19 @@ async function startInteractive(config, repoPath) {
|
|
|
53802
53808
|
}
|
|
53803
53809
|
const AUTO_UPDATE_INTERVAL_MS = 30 * 60 * 1e3;
|
|
53804
53810
|
const autoUpdateTimer = setInterval(() => {
|
|
53811
|
+
if (updateNotified)
|
|
53812
|
+
return;
|
|
53805
53813
|
const updateMode = savedSettings.updateMode ?? "auto";
|
|
53806
53814
|
if (updateMode === "manual")
|
|
53807
53815
|
return;
|
|
53808
53816
|
checkForUpdate(version).then((updateInfo) => {
|
|
53809
|
-
if (updateInfo && statusBar?.isActive) {
|
|
53810
|
-
|
|
53811
|
-
|
|
53812
|
-
|
|
53817
|
+
if (updateInfo && statusBar?.isActive && !updateNotified) {
|
|
53818
|
+
updateNotified = true;
|
|
53819
|
+
if (!statusBar.isStreaming) {
|
|
53820
|
+
statusBar.beginContentWrite();
|
|
53821
|
+
renderInfo(`Update available: v${version} \u2192 v${updateInfo.latestVersion}. Run /update to install.`);
|
|
53822
|
+
statusBar.endContentWrite();
|
|
53823
|
+
}
|
|
53813
53824
|
}
|
|
53814
53825
|
}).catch(() => {
|
|
53815
53826
|
});
|
package/package.json
CHANGED