open-agents-ai 0.187.86 → 0.187.88
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 +106 -42
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -279500,27 +279500,28 @@ var init_status_bar = __esm({
|
|
|
279500
279500
|
return this._cohereActive;
|
|
279501
279501
|
}
|
|
279502
279502
|
// ── Mouse tracking management ──────────────────────────────────────
|
|
279503
|
-
//
|
|
279504
|
-
//
|
|
279505
|
-
//
|
|
279506
|
-
//
|
|
279507
|
-
|
|
279503
|
+
// Uses ?1000h (normal tracking) instead of ?1002h (button-event tracking)
|
|
279504
|
+
// so the terminal handles text selection natively. ?1000h reports:
|
|
279505
|
+
// - Button press + release (header buttons, click-to-select)
|
|
279506
|
+
// - Scroll wheel events (content scrolling)
|
|
279507
|
+
// But does NOT capture drag/motion — the terminal handles that as
|
|
279508
|
+
// native text selection. Users can Ctrl+Shift+C to copy normally.
|
|
279509
|
+
/** Enable mouse tracking (clicks + scroll only — native selection works) */
|
|
279508
279510
|
enableMouseTracking() {
|
|
279509
279511
|
if (this._mouseTrackingEnabled || isOverlayActive())
|
|
279510
279512
|
return;
|
|
279511
279513
|
this._mouseTrackingEnabled = true;
|
|
279512
279514
|
if (process.stdout.isTTY) {
|
|
279513
|
-
this._trueStdoutWrite.call(process.stdout, "\x1B[?
|
|
279515
|
+
this._trueStdoutWrite.call(process.stdout, "\x1B[?1000h\x1B[?1006h");
|
|
279514
279516
|
}
|
|
279515
279517
|
}
|
|
279516
|
-
/** Disable mouse tracking entirely (only for overlay transitions + exit).
|
|
279517
|
-
* NOT called on idle — mouse stays active for clicks, scroll, buttons. */
|
|
279518
|
+
/** Disable mouse tracking entirely (only for overlay transitions + exit). */
|
|
279518
279519
|
disableMouseTracking() {
|
|
279519
279520
|
if (!this._mouseTrackingEnabled || isOverlayActive())
|
|
279520
279521
|
return;
|
|
279521
279522
|
this._mouseTrackingEnabled = false;
|
|
279522
279523
|
if (process.stdout.isTTY) {
|
|
279523
|
-
this._trueStdoutWrite.call(process.stdout, "\x1B[?
|
|
279524
|
+
this._trueStdoutWrite.call(process.stdout, "\x1B[?1000l\x1B[?1006l");
|
|
279524
279525
|
}
|
|
279525
279526
|
}
|
|
279526
279527
|
/** Schedule mouse tracking disable after idle timeout.
|
|
@@ -281185,7 +281186,7 @@ ${tuiBgSeq()}`);
|
|
|
281185
281186
|
function cleanup() {
|
|
281186
281187
|
stdin.removeListener("data", onData);
|
|
281187
281188
|
process.stdout.removeListener("resize", onResize);
|
|
281188
|
-
overlayWrite("\x1B[?1003l\x1B[?1002l\x1B[?1006l\x1B[?1049l\x1B[?25h");
|
|
281189
|
+
overlayWrite("\x1B[?1003l\x1B[?1002l\x1B[?1000l\x1B[?1006l\x1B[?1049l\x1B[?25h");
|
|
281189
281190
|
leaveOverlay();
|
|
281190
281191
|
if (typeof stdin.setRawMode === "function") {
|
|
281191
281192
|
stdin.setRawMode(hadRawMode ?? false);
|
|
@@ -288842,7 +288843,7 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
|
288842
288843
|
}
|
|
288843
288844
|
}
|
|
288844
288845
|
if (process.stdout.isTTY) {
|
|
288845
|
-
process.stdout.write("\x1B[?
|
|
288846
|
+
process.stdout.write("\x1B[?1000h\x1B[?1006h");
|
|
288846
288847
|
}
|
|
288847
288848
|
} catch (err) {
|
|
288848
288849
|
renderWarning(` Could not install system build deps: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -293376,6 +293377,17 @@ async function handleEndpoint(arg, ctx3, local = false) {
|
|
|
293376
293377
|
detail: `${provider2} ${uses}${auth}`
|
|
293377
293378
|
};
|
|
293378
293379
|
});
|
|
293380
|
+
items.push({
|
|
293381
|
+
key: "__add__",
|
|
293382
|
+
label: `${c3.green("+")} Add endpoint`,
|
|
293383
|
+
detail: "Type a URL to add a new endpoint"
|
|
293384
|
+
});
|
|
293385
|
+
items.push({
|
|
293386
|
+
key: "__sponsor__",
|
|
293387
|
+
label: `${c3.cyan("\u2605")} Sponsored endpoints`,
|
|
293388
|
+
detail: "Discover free inference providers via Nexus"
|
|
293389
|
+
});
|
|
293390
|
+
let addedEndpoint = null;
|
|
293379
293391
|
const result = await tuiSelect({
|
|
293380
293392
|
items,
|
|
293381
293393
|
activeKey: ctx3.config.backendUrl,
|
|
@@ -293383,10 +293395,41 @@ async function handleEndpoint(arg, ctx3, local = false) {
|
|
|
293383
293395
|
rl: ctx3.rl,
|
|
293384
293396
|
availableRows: ctx3.availableContentRows?.(),
|
|
293385
293397
|
onDelete: (item, done) => {
|
|
293398
|
+
if (item.key.startsWith("__")) {
|
|
293399
|
+
done(false);
|
|
293400
|
+
return;
|
|
293401
|
+
}
|
|
293386
293402
|
deleteUsageRecord("endpoint", item.key, ctx3.repoRoot);
|
|
293387
293403
|
done(true);
|
|
293404
|
+
},
|
|
293405
|
+
onEnter: (item, { getInput, resolve: resolve39 }) => {
|
|
293406
|
+
if (item.key === "__add__") {
|
|
293407
|
+
getInput("URL", "http://").then(async (url2) => {
|
|
293408
|
+
if (!url2 || !url2.trim())
|
|
293409
|
+
return;
|
|
293410
|
+
const authKey = await getInput("Auth key (optional)", "");
|
|
293411
|
+
const trimmedUrl = url2.trim();
|
|
293412
|
+
const authArg = authKey?.trim() ? ` --auth ${authKey.trim()}` : "";
|
|
293413
|
+
addedEndpoint = `${trimmedUrl}${authArg}`;
|
|
293414
|
+
resolve39({ confirmed: true, key: "__add__", index: -1 });
|
|
293415
|
+
});
|
|
293416
|
+
return true;
|
|
293417
|
+
}
|
|
293418
|
+
if (item.key === "__sponsor__") {
|
|
293419
|
+
resolve39({ confirmed: true, key: "__sponsor__", index: -1 });
|
|
293420
|
+
return true;
|
|
293421
|
+
}
|
|
293422
|
+
return false;
|
|
293388
293423
|
}
|
|
293389
293424
|
});
|
|
293425
|
+
if (result.confirmed && result.key === "__add__" && addedEndpoint) {
|
|
293426
|
+
await handleEndpoint(addedEndpoint, ctx3, local);
|
|
293427
|
+
return;
|
|
293428
|
+
}
|
|
293429
|
+
if (result.confirmed && result.key === "__sponsor__") {
|
|
293430
|
+
await handleSponsoredEndpoint(ctx3, local);
|
|
293431
|
+
return;
|
|
293432
|
+
}
|
|
293390
293433
|
if (result.confirmed && result.key) {
|
|
293391
293434
|
const selectedRecord = history.find((h) => h.value === result.key);
|
|
293392
293435
|
const savedAuth = selectedRecord?.meta?.authKey;
|
|
@@ -293398,34 +293441,55 @@ async function handleEndpoint(arg, ctx3, local = false) {
|
|
|
293398
293441
|
return;
|
|
293399
293442
|
}
|
|
293400
293443
|
const currentProvider = detectProvider(ctx3.config.backendUrl);
|
|
293401
|
-
|
|
293402
|
-
|
|
293403
|
-
|
|
293404
|
-
|
|
293405
|
-
|
|
293406
|
-
|
|
293407
|
-
|
|
293408
|
-
|
|
293409
|
-
|
|
293410
|
-
|
|
293411
|
-
|
|
293412
|
-
|
|
293413
|
-
|
|
293414
|
-
|
|
293415
|
-
|
|
293416
|
-
|
|
293417
|
-
|
|
293418
|
-
|
|
293419
|
-
|
|
293420
|
-
|
|
293421
|
-
|
|
293422
|
-
|
|
293423
|
-
|
|
293424
|
-
|
|
293425
|
-
|
|
293426
|
-
|
|
293427
|
-
|
|
293428
|
-
|
|
293444
|
+
const noHistItems = [
|
|
293445
|
+
{
|
|
293446
|
+
key: ctx3.config.backendUrl,
|
|
293447
|
+
label: `${currentProvider.label} \u2014 ${ctx3.config.backendUrl}`,
|
|
293448
|
+
detail: `${ctx3.config.backendType} ${ctx3.config.apiKey ? "Auth: Bearer token set" : "No auth"}`
|
|
293449
|
+
},
|
|
293450
|
+
{
|
|
293451
|
+
key: "__add__",
|
|
293452
|
+
label: `${c3.green("+")} Add endpoint`,
|
|
293453
|
+
detail: "Type a URL to add a new endpoint"
|
|
293454
|
+
},
|
|
293455
|
+
{
|
|
293456
|
+
key: "__sponsor__",
|
|
293457
|
+
label: `${c3.cyan("\u2605")} Sponsored endpoints`,
|
|
293458
|
+
detail: "Discover free inference providers via Nexus"
|
|
293459
|
+
}
|
|
293460
|
+
];
|
|
293461
|
+
let addedUrl = null;
|
|
293462
|
+
const noHistResult = await tuiSelect({
|
|
293463
|
+
items: noHistItems,
|
|
293464
|
+
activeKey: ctx3.config.backendUrl,
|
|
293465
|
+
title: "Select Endpoint",
|
|
293466
|
+
rl: ctx3.rl,
|
|
293467
|
+
availableRows: ctx3.availableContentRows?.(),
|
|
293468
|
+
onEnter: (item, { getInput, resolve: resolve39 }) => {
|
|
293469
|
+
if (item.key === "__add__") {
|
|
293470
|
+
getInput("URL", "http://").then(async (url2) => {
|
|
293471
|
+
if (!url2?.trim())
|
|
293472
|
+
return;
|
|
293473
|
+
const authKey = await getInput("Auth key (optional)", "");
|
|
293474
|
+
addedUrl = `${url2.trim()}${authKey?.trim() ? ` --auth ${authKey.trim()}` : ""}`;
|
|
293475
|
+
resolve39({ confirmed: true, key: "__add__", index: -1 });
|
|
293476
|
+
});
|
|
293477
|
+
return true;
|
|
293478
|
+
}
|
|
293479
|
+
if (item.key === "__sponsor__") {
|
|
293480
|
+
resolve39({ confirmed: true, key: "__sponsor__", index: -1 });
|
|
293481
|
+
return true;
|
|
293482
|
+
}
|
|
293483
|
+
return false;
|
|
293484
|
+
}
|
|
293485
|
+
});
|
|
293486
|
+
if (noHistResult.confirmed && noHistResult.key === "__add__" && addedUrl) {
|
|
293487
|
+
await handleEndpoint(addedUrl, ctx3, local);
|
|
293488
|
+
} else if (noHistResult.confirmed && noHistResult.key === "__sponsor__") {
|
|
293489
|
+
await handleSponsoredEndpoint(ctx3, local);
|
|
293490
|
+
} else if (!noHistResult.confirmed) {
|
|
293491
|
+
renderInfo("Endpoint selection cancelled.");
|
|
293492
|
+
}
|
|
293429
293493
|
return;
|
|
293430
293494
|
}
|
|
293431
293495
|
if (arg === "stop" || arg === "off" || arg.startsWith("stop ") || arg.startsWith("off ")) {
|
|
@@ -295296,7 +295360,7 @@ async function showExposeDashboard(gateway, rl, ctx3) {
|
|
|
295296
295360
|
stopped = true;
|
|
295297
295361
|
process.stdin.removeListener("data", onData);
|
|
295298
295362
|
if (process.stdout.isTTY) {
|
|
295299
|
-
process.stdout.write("\x1B[?
|
|
295363
|
+
process.stdout.write("\x1B[?1000h\x1B[?1006h");
|
|
295300
295364
|
}
|
|
295301
295365
|
};
|
|
295302
295366
|
const origResolve = resolve39;
|
|
@@ -309720,7 +309784,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
309720
309784
|
process.stdin.setRawMode(true);
|
|
309721
309785
|
}
|
|
309722
309786
|
if (process.stdout.isTTY) {
|
|
309723
|
-
process.stdout.write("\x1B[?
|
|
309787
|
+
process.stdout.write("\x1B[?1000h\x1B[?1006h");
|
|
309724
309788
|
}
|
|
309725
309789
|
function persistHistoryLine(line) {
|
|
309726
309790
|
if (!line.trim())
|
|
@@ -311803,7 +311867,7 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
|
|
|
311803
311867
|
sessionSudoPassword = input;
|
|
311804
311868
|
activeTask.runner.setSudoPassword(input);
|
|
311805
311869
|
if (process.stdout.isTTY) {
|
|
311806
|
-
process.stdout.write("\x1B[?
|
|
311870
|
+
process.stdout.write("\x1B[?1000h\x1B[?1006h");
|
|
311807
311871
|
}
|
|
311808
311872
|
statusBar.setInputStateProvider(() => ({
|
|
311809
311873
|
line: rl.line ?? "",
|
package/package.json
CHANGED