open-agents-ai 0.138.96 → 0.138.97
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 +10 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44191,8 +44191,14 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
44191
44191
|
const rows = process.stdout.rows ?? 24;
|
|
44192
44192
|
const bgDark = 234;
|
|
44193
44193
|
const yellow = 178;
|
|
44194
|
-
|
|
44195
|
-
const
|
|
44194
|
+
const contentTop = 4;
|
|
44195
|
+
const contentBottom = rows - 3;
|
|
44196
|
+
const contentHeight = Math.max(5, contentBottom - contentTop + 1);
|
|
44197
|
+
let buf = "\x1B[?2026h\x1B7\x1B[?25l";
|
|
44198
|
+
for (let r = contentTop; r <= contentBottom; r++) {
|
|
44199
|
+
buf += `\x1B[${r};1H\x1B[48;5;${bgDark}m\x1B[2K`;
|
|
44200
|
+
}
|
|
44201
|
+
const centerRow = contentTop + Math.floor(contentHeight / 2);
|
|
44196
44202
|
const centerCol = Math.floor(cols / 2);
|
|
44197
44203
|
const boxW = Math.min(44, cols - 4);
|
|
44198
44204
|
const boxH = 7;
|
|
@@ -44229,15 +44235,14 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
44229
44235
|
const vLabel = `v${version}`;
|
|
44230
44236
|
const vCol = centerCol - Math.floor(vLabel.length / 2);
|
|
44231
44237
|
buf += `\x1B[${centerRow};${vCol}H\x1B[0;38;5;245m\x1B[48;5;${bgDark}m${vLabel}`;
|
|
44232
|
-
if (statusLine) {
|
|
44238
|
+
if (statusLine && centerRow + 2 <= contentBottom) {
|
|
44233
44239
|
const sCol = centerCol - Math.floor(statusLine.length / 2);
|
|
44234
44240
|
buf += `\x1B[${centerRow + 2};${Math.max(1, sCol)}H\x1B[38;5;240m\x1B[48;5;${bgDark}m${statusLine.slice(0, cols - 2)}`;
|
|
44235
44241
|
}
|
|
44236
|
-
buf += `\x1B[0m`;
|
|
44242
|
+
buf += `\x1B[0m\x1B8\x1B[?25h\x1B[?2026l`;
|
|
44237
44243
|
process.stdout.write(buf);
|
|
44238
44244
|
}
|
|
44239
44245
|
function startInstallOverlay(version) {
|
|
44240
|
-
process.stdout.write("\x1B[?1049h\x1B[?25l");
|
|
44241
44246
|
let frame = 0;
|
|
44242
44247
|
let status = "";
|
|
44243
44248
|
renderInstallFrame(version, frame, status);
|
|
@@ -44378,7 +44383,6 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
44378
44383
|
});
|
|
44379
44384
|
if (needsSudo) {
|
|
44380
44385
|
installOverlay.stop("Requesting permissions...");
|
|
44381
|
-
process.stdout.write("\x1B[?1049l\x1B[?25h");
|
|
44382
44386
|
renderInfo("Global npm directory requires elevated permissions.");
|
|
44383
44387
|
renderInfo("Enter your password if prompted...");
|
|
44384
44388
|
safeWrite("\n");
|
|
@@ -44418,7 +44422,6 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
44418
44422
|
if (!installOk) {
|
|
44419
44423
|
installOverlay.stop("Install failed");
|
|
44420
44424
|
await new Promise((r) => setTimeout(r, 1500));
|
|
44421
|
-
process.stdout.write("\x1B[?1049l\x1B[?25h");
|
|
44422
44425
|
renderWarning(`Try manually: ${sudoPrefix}npm i -g open-agents-ai`);
|
|
44423
44426
|
return;
|
|
44424
44427
|
}
|
|
@@ -44450,7 +44453,6 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
44450
44453
|
if (!primaryUpdated && !depsUpdated && !doRebuild && !doPython && !doCloudflared) {
|
|
44451
44454
|
installOverlay.stop("No changes needed");
|
|
44452
44455
|
await new Promise((r) => setTimeout(r, 1500));
|
|
44453
|
-
process.stdout.write("\x1B[?1049l\x1B[?25h");
|
|
44454
44456
|
return;
|
|
44455
44457
|
}
|
|
44456
44458
|
if (doRebuild) {
|
|
@@ -44523,7 +44525,6 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
44523
44525
|
if (!primaryUpdated) {
|
|
44524
44526
|
installOverlay.stop("Done");
|
|
44525
44527
|
await new Promise((r) => setTimeout(r, 1500));
|
|
44526
|
-
process.stdout.write("\x1B[?1049l\x1B[?25h");
|
|
44527
44528
|
return;
|
|
44528
44529
|
}
|
|
44529
44530
|
installOverlay.setStatus("Reloading...");
|
|
@@ -44533,7 +44534,6 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
44533
44534
|
const resumeFlag = hadActiveTask ? "1" : "update-only";
|
|
44534
44535
|
installOverlay.stop("Reloading\u2026");
|
|
44535
44536
|
await new Promise((r) => setTimeout(r, 300));
|
|
44536
|
-
process.stdout.write("\x1B[?1049l\x1B[?25h");
|
|
44537
44537
|
const { execPath, argv } = process;
|
|
44538
44538
|
try {
|
|
44539
44539
|
const { execFileSync } = await import("node:child_process");
|
package/package.json
CHANGED