open-agents-ai 0.184.82 → 0.184.84
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 +37 -20
- 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);
|
|
@@ -65612,18 +65624,20 @@ Review its full output in the [${id}] tab or via full_sub_agent(action='output',
|
|
|
65612
65624
|
sessionSudoPassword = pw;
|
|
65613
65625
|
resolve36(pw);
|
|
65614
65626
|
};
|
|
65615
|
-
const
|
|
65627
|
+
const pwPrompt = `
|
|
65628
|
+
${c2.bold(c2.yellow("\u{1F511} Password needed for dependency install:"))}
|
|
65629
|
+
${c2.dim("Type your sudo password below and press Enter.")}
|
|
65616
65630
|
`;
|
|
65617
|
-
const pwPrompt2 = ` ${c2.bold(c2.yellow("\u{1F511} Password:"))} `;
|
|
65618
65631
|
if (isNeovimActive()) {
|
|
65619
|
-
writeToNeovimOutput(
|
|
65632
|
+
writeToNeovimOutput(pwPrompt);
|
|
65620
65633
|
} else {
|
|
65621
65634
|
if (statusBar?.isActive)
|
|
65622
65635
|
statusBar.beginContentWrite();
|
|
65623
|
-
process.stdout.write(
|
|
65624
|
-
process.stdout.write(pwPrompt2);
|
|
65636
|
+
process.stdout.write(pwPrompt);
|
|
65625
65637
|
if (statusBar?.isActive)
|
|
65626
65638
|
statusBar.endContentWrite();
|
|
65639
|
+
if (statusBar?.isActive)
|
|
65640
|
+
statusBar.handleResize();
|
|
65627
65641
|
}
|
|
65628
65642
|
})).catch(() => {
|
|
65629
65643
|
});
|
|
@@ -67815,6 +67829,21 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
|
|
|
67815
67829
|
};
|
|
67816
67830
|
};
|
|
67817
67831
|
rl.on("line", (line) => {
|
|
67832
|
+
if (depSudoPromptPending && depSudoResolver) {
|
|
67833
|
+
const pw = line.trim();
|
|
67834
|
+
depSudoPromptPending = false;
|
|
67835
|
+
const resolver = depSudoResolver;
|
|
67836
|
+
depSudoResolver = null;
|
|
67837
|
+
if (pw)
|
|
67838
|
+
sessionSudoPassword = pw;
|
|
67839
|
+
if (statusBar?.isActive) {
|
|
67840
|
+
statusBar.beginContentWrite();
|
|
67841
|
+
renderInfo("\u{1F511} Password received");
|
|
67842
|
+
statusBar.endContentWrite();
|
|
67843
|
+
}
|
|
67844
|
+
resolver(pw || null);
|
|
67845
|
+
return;
|
|
67846
|
+
}
|
|
67818
67847
|
if (!setupReady)
|
|
67819
67848
|
return;
|
|
67820
67849
|
persistHistoryLine(line);
|
|
@@ -67846,18 +67875,6 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
|
|
|
67846
67875
|
}, 50);
|
|
67847
67876
|
});
|
|
67848
67877
|
async function processLine(input) {
|
|
67849
|
-
if (depSudoPromptPending && depSudoResolver) {
|
|
67850
|
-
const pw = input.trim();
|
|
67851
|
-
passwordShowPlain = false;
|
|
67852
|
-
statusBar.setInputStateProvider(() => ({
|
|
67853
|
-
line: rl.line ?? "",
|
|
67854
|
-
cursor: rl.cursor ?? 0
|
|
67855
|
-
}));
|
|
67856
|
-
writeContent(() => renderInfo("\u{1F511} Password received"));
|
|
67857
|
-
depSudoResolver(pw || null);
|
|
67858
|
-
showPrompt();
|
|
67859
|
-
return;
|
|
67860
|
-
}
|
|
67861
67878
|
if (sudoPromptPending && activeTask) {
|
|
67862
67879
|
sudoPromptPending = false;
|
|
67863
67880
|
passwordShowPlain = false;
|
package/package.json
CHANGED