open-agents-ai 0.184.82 → 0.184.83
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 +15 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51501,9 +51501,20 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
51501
51501
|
const { execPath, argv } = process;
|
|
51502
51502
|
try {
|
|
51503
51503
|
const { spawn: spawnChild } = await import("node:child_process");
|
|
51504
|
+
if (ctx.hasActiveTask?.())
|
|
51505
|
+
ctx.abortActiveTask?.();
|
|
51506
|
+
ctx.exit();
|
|
51504
51507
|
if (process.stdout.isTTY) {
|
|
51505
|
-
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?25h\x1B[?1049l\x1B[0m");
|
|
51508
|
+
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[r\x1B[?25h\x1B[?1049l\x1B[0m");
|
|
51509
|
+
}
|
|
51510
|
+
if (process.stdin.isTTY && typeof process.stdin.setRawMode === "function") {
|
|
51511
|
+
process.stdin.setRawMode(false);
|
|
51506
51512
|
}
|
|
51513
|
+
process.stdin.pause();
|
|
51514
|
+
process.stdin.removeAllListeners();
|
|
51515
|
+
process.removeAllListeners("SIGINT");
|
|
51516
|
+
process.removeAllListeners("SIGTERM");
|
|
51517
|
+
process.removeAllListeners("exit");
|
|
51507
51518
|
const child = spawnChild(execPath, argv.slice(1), {
|
|
51508
51519
|
stdio: "inherit",
|
|
51509
51520
|
env: { ...process.env, __OA_RESUMED: resumeFlag },
|
|
@@ -51512,8 +51523,9 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
51512
51523
|
child.on("exit", (code) => {
|
|
51513
51524
|
process.exit(code ?? 0);
|
|
51514
51525
|
});
|
|
51515
|
-
|
|
51516
|
-
|
|
51526
|
+
child.on("error", () => {
|
|
51527
|
+
process.exit(1);
|
|
51528
|
+
});
|
|
51517
51529
|
} catch {
|
|
51518
51530
|
process.stderr.write("\x1B[0m\nRestart oa manually to use the new version.\n");
|
|
51519
51531
|
process.exit(1);
|
package/package.json
CHANGED