open-agents-ai 0.138.47 → 0.138.48
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
|
@@ -52215,7 +52215,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52215
52215
|
* before readline splits them into garbage text. Scroll wheel support
|
|
52216
52216
|
* is keyboard-only (Page Up/Down, Shift+Up/Down).
|
|
52217
52217
|
*/
|
|
52218
|
-
hookReadlineScroll(rl, onEscape) {
|
|
52218
|
+
hookReadlineScroll(rl, onEscape, onCtrlO) {
|
|
52219
52219
|
if (!rl || !rl._ttyWrite)
|
|
52220
52220
|
return;
|
|
52221
52221
|
const self = this;
|
|
@@ -52233,6 +52233,10 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52233
52233
|
if (cursor <= 0)
|
|
52234
52234
|
return;
|
|
52235
52235
|
}
|
|
52236
|
+
if (key?.ctrl && key?.name === "o" && onCtrlO) {
|
|
52237
|
+
onCtrlO();
|
|
52238
|
+
return;
|
|
52239
|
+
}
|
|
52236
52240
|
if (s && (/\x1B\[</.test(s) || /^\d+;\d+;\d*[Mm]/.test(s) || /^;\d+[Mm]/.test(s) || /\[<\d/.test(s))) {
|
|
52237
52241
|
return;
|
|
52238
52242
|
}
|
|
@@ -54083,6 +54087,12 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
54083
54087
|
let _escapeHandler = null;
|
|
54084
54088
|
statusBar.hookReadlineScroll(rl, () => {
|
|
54085
54089
|
_escapeHandler?.();
|
|
54090
|
+
}, () => {
|
|
54091
|
+
if (sudoPromptPending) {
|
|
54092
|
+
passwordShowPlain = !passwordShowPlain;
|
|
54093
|
+
if (statusBar.isActive)
|
|
54094
|
+
statusBar.handleResize();
|
|
54095
|
+
}
|
|
54086
54096
|
});
|
|
54087
54097
|
rl.output = null;
|
|
54088
54098
|
if (process.stdin.isTTY && typeof process.stdin.setRawMode === "function") {
|
|
@@ -54337,6 +54347,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
54337
54347
|
}
|
|
54338
54348
|
})().catch(() => {
|
|
54339
54349
|
});
|
|
54350
|
+
let passwordShowPlain = false;
|
|
54340
54351
|
function handleSudoRequest(_command) {
|
|
54341
54352
|
if (sudoPromptPending)
|
|
54342
54353
|
return;
|
|
@@ -54345,12 +54356,20 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
54345
54356
|
return;
|
|
54346
54357
|
}
|
|
54347
54358
|
sudoPromptPending = true;
|
|
54348
|
-
|
|
54349
|
-
|
|
54350
|
-
|
|
54351
|
-
|
|
54352
|
-
|
|
54359
|
+
writeContent(() => renderInfo("Password required for sudo. Type below, Enter to submit. Ctrl+O to show/hide."));
|
|
54360
|
+
const pwPrompt = `\x1B[38;5;178m\u{1F511}\x1B[0m `;
|
|
54361
|
+
rl.setPrompt(pwPrompt);
|
|
54362
|
+
if (statusBar.isActive) {
|
|
54363
|
+
const origProvider = statusBar.inputStateProvider;
|
|
54364
|
+
statusBar.inputStateProvider = () => {
|
|
54365
|
+
const state = origProvider?.() ?? { line: "", cursor: 0 };
|
|
54366
|
+
if (passwordShowPlain)
|
|
54367
|
+
return state;
|
|
54368
|
+
return { line: "\u25CF".repeat(state.line.length), cursor: state.cursor };
|
|
54369
|
+
};
|
|
54370
|
+
statusBar.setPromptText(pwPrompt, 3);
|
|
54353
54371
|
}
|
|
54372
|
+
showPrompt();
|
|
54354
54373
|
}
|
|
54355
54374
|
async function handleAskUser(question, options, allowMultiple) {
|
|
54356
54375
|
if (statusBar?.isActive)
|
|
@@ -55686,28 +55705,26 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
|
|
|
55686
55705
|
async function processLine(input) {
|
|
55687
55706
|
if (depSudoPromptPending && depSudoResolver) {
|
|
55688
55707
|
const pw = input.trim();
|
|
55689
|
-
|
|
55690
|
-
|
|
55691
|
-
|
|
55692
|
-
|
|
55693
|
-
}
|
|
55694
|
-
|
|
55695
|
-
}
|
|
55708
|
+
passwordShowPlain = false;
|
|
55709
|
+
statusBar.setInputStateProvider(() => ({
|
|
55710
|
+
line: rl.line ?? "",
|
|
55711
|
+
cursor: rl.cursor ?? 0
|
|
55712
|
+
}));
|
|
55713
|
+
writeContent(() => renderInfo("\u{1F511} Password received"));
|
|
55696
55714
|
depSudoResolver(pw || null);
|
|
55697
55715
|
showPrompt();
|
|
55698
55716
|
return;
|
|
55699
55717
|
}
|
|
55700
55718
|
if (sudoPromptPending && activeTask) {
|
|
55701
55719
|
sudoPromptPending = false;
|
|
55720
|
+
passwordShowPlain = false;
|
|
55702
55721
|
sessionSudoPassword = input;
|
|
55703
55722
|
activeTask.runner.setSudoPassword(input);
|
|
55704
|
-
|
|
55705
|
-
|
|
55706
|
-
|
|
55707
|
-
|
|
55708
|
-
}
|
|
55709
|
-
process.stdout.write(pwRecvMsg2);
|
|
55710
|
-
}
|
|
55723
|
+
statusBar.setInputStateProvider(() => ({
|
|
55724
|
+
line: rl.line ?? "",
|
|
55725
|
+
cursor: rl.cursor ?? 0
|
|
55726
|
+
}));
|
|
55727
|
+
writeContent(() => renderInfo("\u{1F511} Password received"));
|
|
55711
55728
|
showPrompt();
|
|
55712
55729
|
return;
|
|
55713
55730
|
}
|
package/package.json
CHANGED