open-agents-ai 0.138.14 → 0.138.16
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 +120 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36415,6 +36415,18 @@ var init_setup = __esm({
|
|
|
36415
36415
|
});
|
|
36416
36416
|
|
|
36417
36417
|
// packages/cli/dist/tui/overlay-lock.js
|
|
36418
|
+
var overlay_lock_exports = {};
|
|
36419
|
+
__export(overlay_lock_exports, {
|
|
36420
|
+
bufferIfOverlay: () => bufferIfOverlay,
|
|
36421
|
+
enterOverlay: () => enterOverlay,
|
|
36422
|
+
isOverlayActive: () => isOverlayActive,
|
|
36423
|
+
leaveOverlay: () => leaveOverlay,
|
|
36424
|
+
onOverlayLeave: () => onOverlayLeave,
|
|
36425
|
+
overlayWrite: () => overlayWrite
|
|
36426
|
+
});
|
|
36427
|
+
function onOverlayLeave(cb) {
|
|
36428
|
+
_onLeaveCallback = cb;
|
|
36429
|
+
}
|
|
36418
36430
|
function isOverlayActive() {
|
|
36419
36431
|
return _overlayActive;
|
|
36420
36432
|
}
|
|
@@ -36464,6 +36476,12 @@ function leaveOverlay() {
|
|
|
36464
36476
|
process.stderr.write = _origStderrWrite;
|
|
36465
36477
|
_origStderrWrite = null;
|
|
36466
36478
|
}
|
|
36479
|
+
if (_onLeaveCallback) {
|
|
36480
|
+
try {
|
|
36481
|
+
_onLeaveCallback();
|
|
36482
|
+
} catch {
|
|
36483
|
+
}
|
|
36484
|
+
}
|
|
36467
36485
|
const pending = _buffer;
|
|
36468
36486
|
_buffer = [];
|
|
36469
36487
|
for (const { stream, data } of pending) {
|
|
@@ -36475,7 +36493,7 @@ function leaveOverlay() {
|
|
|
36475
36493
|
}
|
|
36476
36494
|
}
|
|
36477
36495
|
}
|
|
36478
|
-
var _overlayActive, _depth, _buffer, _origStdoutWrite, _origStderrWrite;
|
|
36496
|
+
var _overlayActive, _depth, _buffer, _origStdoutWrite, _origStderrWrite, _onLeaveCallback;
|
|
36479
36497
|
var init_overlay_lock = __esm({
|
|
36480
36498
|
"packages/cli/dist/tui/overlay-lock.js"() {
|
|
36481
36499
|
"use strict";
|
|
@@ -36484,6 +36502,7 @@ var init_overlay_lock = __esm({
|
|
|
36484
36502
|
_buffer = [];
|
|
36485
36503
|
_origStdoutWrite = null;
|
|
36486
36504
|
_origStderrWrite = null;
|
|
36505
|
+
_onLeaveCallback = null;
|
|
36487
36506
|
}
|
|
36488
36507
|
});
|
|
36489
36508
|
|
|
@@ -51331,9 +51350,7 @@ var init_status_bar = __esm({
|
|
|
51331
51350
|
const pos = this.rowPositions(rows);
|
|
51332
51351
|
const w = getTermWidth();
|
|
51333
51352
|
const sep = `\x1B[38;5;236m${"\u2500".repeat(w)}\x1B[0m`;
|
|
51334
|
-
const
|
|
51335
|
-
const wrapOverhead = Math.max(0, this._currentFooterHeight * (wrapFactor - 1));
|
|
51336
|
-
const clearStart = Math.max(1, pos.bufferRow - wrapOverhead);
|
|
51353
|
+
const clearStart = Math.max(this.scrollRegionTop + 1, pos.scrollEnd + 1);
|
|
51337
51354
|
if (this.writeDepth > 0) {
|
|
51338
51355
|
const inputWrap = this.wrapInput(w);
|
|
51339
51356
|
let buf = `\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[?25l\x1B[?7l`;
|
|
@@ -52146,6 +52163,88 @@ var init_status_bar = __esm({
|
|
|
52146
52163
|
}
|
|
52147
52164
|
});
|
|
52148
52165
|
|
|
52166
|
+
// packages/cli/dist/tui/mouse-filter.js
|
|
52167
|
+
var mouse_filter_exports = {};
|
|
52168
|
+
__export(mouse_filter_exports, {
|
|
52169
|
+
MouseFilterStream: () => MouseFilterStream
|
|
52170
|
+
});
|
|
52171
|
+
import { Transform } from "node:stream";
|
|
52172
|
+
var MouseFilterStream;
|
|
52173
|
+
var init_mouse_filter = __esm({
|
|
52174
|
+
"packages/cli/dist/tui/mouse-filter.js"() {
|
|
52175
|
+
"use strict";
|
|
52176
|
+
MouseFilterStream = class extends Transform {
|
|
52177
|
+
buffer = "";
|
|
52178
|
+
onScroll = null;
|
|
52179
|
+
flushTimer = null;
|
|
52180
|
+
constructor(scrollHandler) {
|
|
52181
|
+
super();
|
|
52182
|
+
this.onScroll = scrollHandler;
|
|
52183
|
+
}
|
|
52184
|
+
_transform(chunk, _encoding, callback) {
|
|
52185
|
+
this.buffer += chunk.toString();
|
|
52186
|
+
this.processBuffer(callback);
|
|
52187
|
+
}
|
|
52188
|
+
processBuffer(callback) {
|
|
52189
|
+
let output = "";
|
|
52190
|
+
let i = 0;
|
|
52191
|
+
while (i < this.buffer.length) {
|
|
52192
|
+
if (this.buffer[i] === "\x1B") {
|
|
52193
|
+
const remaining = this.buffer.slice(i);
|
|
52194
|
+
const mouseMatch = remaining.match(/^\x1B\[<(\d+);(\d+);(\d+)([Mm])/);
|
|
52195
|
+
if (mouseMatch) {
|
|
52196
|
+
const btn = parseInt(mouseMatch[1]);
|
|
52197
|
+
if (btn === 64 && this.onScroll)
|
|
52198
|
+
this.onScroll("up", 3);
|
|
52199
|
+
else if (btn === 65 && this.onScroll)
|
|
52200
|
+
this.onScroll("down", 3);
|
|
52201
|
+
i += mouseMatch[0].length;
|
|
52202
|
+
continue;
|
|
52203
|
+
}
|
|
52204
|
+
if (remaining.startsWith("\x1B[<") && remaining.length < 15) {
|
|
52205
|
+
break;
|
|
52206
|
+
}
|
|
52207
|
+
if (remaining.startsWith("\x1B[") && remaining.length === 2) {
|
|
52208
|
+
break;
|
|
52209
|
+
}
|
|
52210
|
+
if (remaining.length === 1) {
|
|
52211
|
+
break;
|
|
52212
|
+
}
|
|
52213
|
+
}
|
|
52214
|
+
output += this.buffer[i];
|
|
52215
|
+
i++;
|
|
52216
|
+
}
|
|
52217
|
+
this.buffer = this.buffer.slice(i);
|
|
52218
|
+
if (output.length > 0) {
|
|
52219
|
+
this.push(output);
|
|
52220
|
+
}
|
|
52221
|
+
if (this.buffer.length > 0) {
|
|
52222
|
+
if (this.flushTimer)
|
|
52223
|
+
clearTimeout(this.flushTimer);
|
|
52224
|
+
this.flushTimer = setTimeout(() => {
|
|
52225
|
+
if (this.buffer.length > 0) {
|
|
52226
|
+
this.push(this.buffer);
|
|
52227
|
+
this.buffer = "";
|
|
52228
|
+
}
|
|
52229
|
+
}, 50);
|
|
52230
|
+
}
|
|
52231
|
+
callback();
|
|
52232
|
+
}
|
|
52233
|
+
_flush(callback) {
|
|
52234
|
+
if (this.flushTimer) {
|
|
52235
|
+
clearTimeout(this.flushTimer);
|
|
52236
|
+
this.flushTimer = null;
|
|
52237
|
+
}
|
|
52238
|
+
if (this.buffer.length > 0) {
|
|
52239
|
+
this.push(this.buffer);
|
|
52240
|
+
this.buffer = "";
|
|
52241
|
+
}
|
|
52242
|
+
callback();
|
|
52243
|
+
}
|
|
52244
|
+
};
|
|
52245
|
+
}
|
|
52246
|
+
});
|
|
52247
|
+
|
|
52149
52248
|
// packages/cli/dist/tui/interactive.js
|
|
52150
52249
|
import * as readline2 from "node:readline";
|
|
52151
52250
|
import { Writable } from "node:stream";
|
|
@@ -53314,7 +53413,7 @@ async function startInteractive(config, repoPath) {
|
|
|
53314
53413
|
initOaDirectory(repoRoot);
|
|
53315
53414
|
const savedSettings = resolveSettings(repoRoot);
|
|
53316
53415
|
if (process.stdout.isTTY) {
|
|
53317
|
-
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
|
|
53416
|
+
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
|
|
53318
53417
|
const restoreScreen = () => {
|
|
53319
53418
|
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?25h\x1B[?1049l");
|
|
53320
53419
|
};
|
|
@@ -53403,6 +53502,12 @@ async function startInteractive(config, repoPath) {
|
|
|
53403
53502
|
const scrollTop = carouselLines > 0 ? carouselLines + 1 : 1;
|
|
53404
53503
|
statusBar.activate(scrollTop);
|
|
53405
53504
|
statusBar.setBannerRefresh(() => banner.renderCurrentFrame());
|
|
53505
|
+
const { onOverlayLeave: onOverlayLeave2 } = await Promise.resolve().then(() => (init_overlay_lock(), overlay_lock_exports));
|
|
53506
|
+
onOverlayLeave2(() => {
|
|
53507
|
+
banner.renderCurrentFrame();
|
|
53508
|
+
if (statusBar.isActive)
|
|
53509
|
+
statusBar.handleResize();
|
|
53510
|
+
});
|
|
53406
53511
|
if (isResumed) {
|
|
53407
53512
|
statusBar.beginContentWrite();
|
|
53408
53513
|
const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.` : `Updated to v${version}.`;
|
|
@@ -53742,8 +53847,17 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
53742
53847
|
}
|
|
53743
53848
|
} catch {
|
|
53744
53849
|
}
|
|
53850
|
+
const { MouseFilterStream: MouseFilterStream2 } = await Promise.resolve().then(() => (init_mouse_filter(), mouse_filter_exports));
|
|
53851
|
+
const mouseFilter = new MouseFilterStream2((direction, lines) => {
|
|
53852
|
+
if (direction === "up")
|
|
53853
|
+
statusBar.scrollContentUp(lines);
|
|
53854
|
+
else
|
|
53855
|
+
statusBar.scrollContentDown(lines);
|
|
53856
|
+
});
|
|
53857
|
+
process.stdin.pipe(mouseFilter);
|
|
53745
53858
|
const rl = readline2.createInterface({
|
|
53746
|
-
input:
|
|
53859
|
+
input: mouseFilter,
|
|
53860
|
+
// filtered stream, NOT raw stdin
|
|
53747
53861
|
output: process.stdout,
|
|
53748
53862
|
prompt: idlePrompt,
|
|
53749
53863
|
terminal: true,
|
package/package.json
CHANGED