open-agents-ai 0.185.52 → 0.185.54
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 +65 -55
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41431,8 +41431,8 @@ var init_daemon_registry = __esm({
|
|
|
41431
41431
|
*/
|
|
41432
41432
|
renderBar(width) {
|
|
41433
41433
|
this.refresh();
|
|
41434
|
+
const PANEL_BG2 = "\x1B[48;5;234m";
|
|
41434
41435
|
const BTN_BG = "\x1B[48;5;236m";
|
|
41435
|
-
const RST = "\x1B[0m";
|
|
41436
41436
|
let bar = "";
|
|
41437
41437
|
for (const [, d] of this.daemons) {
|
|
41438
41438
|
const dotColor = d.status === "running" ? "32" : (
|
|
@@ -41445,7 +41445,7 @@ var init_daemon_registry = __esm({
|
|
|
41445
41445
|
)
|
|
41446
41446
|
)
|
|
41447
41447
|
);
|
|
41448
|
-
bar +=
|
|
41448
|
+
bar += `${PANEL_BG2} ${BTN_BG}\x1B[35m ${d.name} \x1B[${dotColor}m\u25CF\x1B[35m `;
|
|
41449
41449
|
}
|
|
41450
41450
|
for (const [, a] of this.subAgents) {
|
|
41451
41451
|
if (a.status === "completed")
|
|
@@ -41453,12 +41453,12 @@ var init_daemon_registry = __esm({
|
|
|
41453
41453
|
const dotColor = a.status === "active" ? "32" : "33";
|
|
41454
41454
|
const fgColor = a.type === "call" ? "33" : "36";
|
|
41455
41455
|
const label = `${a.type}:${a.id.length > 6 ? a.id.slice(-6) : a.id}`;
|
|
41456
|
-
bar +=
|
|
41456
|
+
bar += `${PANEL_BG2} ${BTN_BG}\x1B[${fgColor}m ${label} \x1B[${dotColor}m\u25CF\x1B[${fgColor}m `;
|
|
41457
41457
|
}
|
|
41458
41458
|
if (!bar) {
|
|
41459
|
-
return
|
|
41459
|
+
return `${PANEL_BG2} \x1B[38;5;240m\u2800 no active daemons`;
|
|
41460
41460
|
}
|
|
41461
|
-
return bar;
|
|
41461
|
+
return bar + PANEL_BG2;
|
|
41462
41462
|
}
|
|
41463
41463
|
/** True if any daemons or sub-agents are registered */
|
|
41464
41464
|
get hasEntries() {
|
|
@@ -43715,7 +43715,7 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43715
43715
|
{ binary: "tesseract", label: "tesseract-ocr", pkgs: { apt: "tesseract-ocr", dnf: "tesseract", pacman: "tesseract", brew: "tesseract", choco: "tesseract", winget: "UB-Mannheim.TesseractOCR" } },
|
|
43716
43716
|
{ binary: "pdftotext", label: "poppler-utils", pkgs: { apt: "poppler-utils", dnf: "poppler-utils", pacman: "poppler", brew: "poppler", choco: "poppler", winget: "freedesktop.poppler" } },
|
|
43717
43717
|
{ binary: "gs", label: "ghostscript", pkgs: { apt: "ghostscript", dnf: "ghostscript", pacman: "ghostscript", brew: "ghostscript", choco: "ghostscript", winget: "ArtifexSoftware.GhostScript" } },
|
|
43718
|
-
{ binary: "ocrmypdf", label: "ocrmypdf", pkgs: { apt: "ocrmypdf", dnf: "ocrmypdf", pacman: "ocrmypdf", brew: "ocrmypdf", choco: "ocrmypdf", winget: "" } },
|
|
43718
|
+
{ binary: "ocrmypdf", label: "ocrmypdf", pkgs: { apt: "ocrmypdf", dnf: "ocrmypdf", pacman: "ocrmypdf", brew: "ocrmypdf", choco: "ocrmypdf", winget: "", pip: "ocrmypdf" } },
|
|
43719
43719
|
// Desktop interaction — screenshot + mouse control for desktop_click/desktop_describe
|
|
43720
43720
|
...process.platform === "darwin" ? [
|
|
43721
43721
|
// macOS: screencapture is built-in, cliclick needed for mouse control
|
|
@@ -43734,58 +43734,62 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43734
43734
|
for (const d of missing)
|
|
43735
43735
|
log(`No supported package manager \u2014 ${d.label} unavailable.`);
|
|
43736
43736
|
} else {
|
|
43737
|
-
const
|
|
43738
|
-
|
|
43739
|
-
|
|
43737
|
+
const labels = missing.map((d) => d.label).join(", ");
|
|
43738
|
+
log(`Installing ${labels}...`);
|
|
43739
|
+
const needsSudo = pm2 !== "brew" && pm2 !== "choco" && pm2 !== "winget";
|
|
43740
|
+
for (const d of missing) {
|
|
43741
|
+
const pkgName = d.pkgs[pm2];
|
|
43742
|
+
const pipPkg = d.pkgs.pip;
|
|
43743
|
+
if (!pkgName && !pipPkg) {
|
|
43740
43744
|
log(`${d.label} not available for ${pm2}.`);
|
|
43741
|
-
|
|
43742
|
-
const labels = missing.map((d) => d.label).join(", ");
|
|
43743
|
-
log(`Installing ${labels}...`);
|
|
43744
|
-
const needsSudo = pm2 !== "brew" && pm2 !== "choco" && pm2 !== "winget";
|
|
43745
|
-
let batchCmd;
|
|
43746
|
-
switch (pm2) {
|
|
43747
|
-
case "apt":
|
|
43748
|
-
batchCmd = `apt-get update -qq && apt-get install -y -qq ${pkgNames.join(" ")}`;
|
|
43749
|
-
break;
|
|
43750
|
-
case "dnf":
|
|
43751
|
-
batchCmd = `dnf install -y -q ${pkgNames.join(" ")}`;
|
|
43752
|
-
break;
|
|
43753
|
-
case "pacman":
|
|
43754
|
-
batchCmd = `pacman -S --noconfirm ${pkgNames.join(" ")}`;
|
|
43755
|
-
break;
|
|
43756
|
-
case "brew":
|
|
43757
|
-
batchCmd = `brew install ${pkgNames.join(" ")}`;
|
|
43758
|
-
break;
|
|
43759
|
-
case "choco":
|
|
43760
|
-
batchCmd = `choco install -y ${pkgNames.join(" ")}`;
|
|
43761
|
-
break;
|
|
43762
|
-
case "winget":
|
|
43763
|
-
batchCmd = pkgNames.map((p) => `winget install --accept-source-agreements --accept-package-agreements ${p}`).join(" && ");
|
|
43764
|
-
break;
|
|
43765
|
-
default:
|
|
43766
|
-
batchCmd = `echo "unsupported pm: ${pm2}" && exit 1`;
|
|
43767
|
-
break;
|
|
43745
|
+
continue;
|
|
43768
43746
|
}
|
|
43769
|
-
|
|
43770
|
-
|
|
43771
|
-
|
|
43772
|
-
|
|
43747
|
+
if (pkgName) {
|
|
43748
|
+
let installCmd;
|
|
43749
|
+
switch (pm2) {
|
|
43750
|
+
case "apt":
|
|
43751
|
+
installCmd = `apt-get update -qq && apt-get install -y -qq ${pkgName}`;
|
|
43752
|
+
break;
|
|
43753
|
+
case "dnf":
|
|
43754
|
+
installCmd = `dnf install -y -q ${pkgName}`;
|
|
43755
|
+
break;
|
|
43756
|
+
case "pacman":
|
|
43757
|
+
installCmd = `pacman -S --noconfirm ${pkgName}`;
|
|
43758
|
+
break;
|
|
43759
|
+
case "brew":
|
|
43760
|
+
installCmd = `brew install ${pkgName}`;
|
|
43761
|
+
break;
|
|
43762
|
+
case "choco":
|
|
43763
|
+
installCmd = `choco install -y ${pkgName}`;
|
|
43764
|
+
break;
|
|
43765
|
+
case "winget":
|
|
43766
|
+
installCmd = `winget install --accept-source-agreements --accept-package-agreements ${pkgName}`;
|
|
43767
|
+
break;
|
|
43768
|
+
default:
|
|
43769
|
+
installCmd = "exit 1";
|
|
43770
|
+
break;
|
|
43771
|
+
}
|
|
43773
43772
|
try {
|
|
43774
|
-
|
|
43775
|
-
|
|
43773
|
+
if (needsSudo) {
|
|
43774
|
+
await sudoInstall(installCmd, getPassword, log, cachedPasswordRef, 18e4);
|
|
43775
|
+
} else {
|
|
43776
|
+
execSync29(installCmd, { stdio: "pipe", timeout: 18e4 });
|
|
43777
|
+
}
|
|
43776
43778
|
} catch {
|
|
43777
|
-
ok = false;
|
|
43778
43779
|
}
|
|
43779
43780
|
}
|
|
43780
|
-
|
|
43781
|
-
|
|
43782
|
-
|
|
43783
|
-
|
|
43784
|
-
|
|
43785
|
-
} else {
|
|
43786
|
-
log(`${d.label} install completed but binary not found.`);
|
|
43781
|
+
if (!hasCmd(d.binary) && pipPkg) {
|
|
43782
|
+
try {
|
|
43783
|
+
const pipCmd = process.platform === "win32" ? `pip install ${pipPkg}` : `pip3 install ${pipPkg}`;
|
|
43784
|
+
execSync29(pipCmd, { stdio: "pipe", timeout: 12e4 });
|
|
43785
|
+
} catch {
|
|
43787
43786
|
}
|
|
43788
43787
|
}
|
|
43788
|
+
if (hasCmd(d.binary)) {
|
|
43789
|
+
log(`${d.label} installed.`);
|
|
43790
|
+
} else {
|
|
43791
|
+
log(`${d.label} could not be installed \u2014 features will be limited.`);
|
|
43792
|
+
}
|
|
43789
43793
|
}
|
|
43790
43794
|
}
|
|
43791
43795
|
}
|
|
@@ -56283,14 +56287,14 @@ var init_stream_renderer = __esm({
|
|
|
56283
56287
|
this.lineStarted = false;
|
|
56284
56288
|
}
|
|
56285
56289
|
if (this.thinkingTokenCount % 50 === 0) {
|
|
56286
|
-
this.writeRaw(`\x1B[1A\x1B[2K${dimText(" \u23BF ")}${dimItalic(`thinking... (${this.thinkingTokenCount} tokens)`)}
|
|
56290
|
+
this.writeRaw(`\x1B[1A\x1B[48;5;233m\x1B[2K${dimText(" \u23BF ")}${dimItalic(`thinking... (${this.thinkingTokenCount} tokens)`)}
|
|
56287
56291
|
`);
|
|
56288
56292
|
}
|
|
56289
56293
|
return;
|
|
56290
56294
|
}
|
|
56291
56295
|
if (this.thinkingIndicatorShown && kind === "content") {
|
|
56292
56296
|
this.thinkingIndicatorShown = false;
|
|
56293
|
-
this.writeRaw(`\x1B[1A\x1B[2K${dimText(" \u23BF ")}${dimItalic(`thought for ${this.thinkingTokenCount} tokens`)}
|
|
56297
|
+
this.writeRaw(`\x1B[1A\x1B[48;5;233m\x1B[2K${dimText(" \u23BF ")}${dimItalic(`thought for ${this.thinkingTokenCount} tokens`)}
|
|
56294
56298
|
`);
|
|
56295
56299
|
this.thinkingTokenCount = 0;
|
|
56296
56300
|
this.lineStarted = false;
|
|
@@ -62160,7 +62164,7 @@ function setTerminalTitle(task, version) {
|
|
|
62160
62164
|
const title = task ? `${task.slice(0, 60)} \xB7 ${ver}` : ver;
|
|
62161
62165
|
process.stdout.write(`\x1B]2;${title}\x07`);
|
|
62162
62166
|
}
|
|
62163
|
-
var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG, CONTENT_BG, TEXT_PRIMARY, TEXT_DIM, PANEL_BG_SEQ, CONTENT_BG_SEQ, RESET, StatusBar;
|
|
62167
|
+
var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG, CONTENT_BG, TEXT_PRIMARY, TEXT_DIM, PANEL_BG_SEQ, CONTENT_BG_SEQ, RESET, _isWindows, StatusBar;
|
|
62164
62168
|
var init_status_bar = __esm({
|
|
62165
62169
|
"packages/cli/dist/tui/status-bar.js"() {
|
|
62166
62170
|
"use strict";
|
|
@@ -62333,6 +62337,7 @@ var init_status_bar = __esm({
|
|
|
62333
62337
|
PANEL_BG_SEQ = `\x1B[48;5;${PANEL_BG}m`;
|
|
62334
62338
|
CONTENT_BG_SEQ = `\x1B[48;5;${CONTENT_BG}m`;
|
|
62335
62339
|
RESET = "\x1B[0m";
|
|
62340
|
+
_isWindows = process.platform === "win32";
|
|
62336
62341
|
StatusBar = class _StatusBar {
|
|
62337
62342
|
metrics = {
|
|
62338
62343
|
promptTokens: 0,
|
|
@@ -63576,6 +63581,8 @@ var init_status_bar = __esm({
|
|
|
63576
63581
|
if (this._bannerRefresh)
|
|
63577
63582
|
this._bannerRefresh();
|
|
63578
63583
|
}
|
|
63584
|
+
if (_isWindows)
|
|
63585
|
+
this.termWrite("\x1B[3J");
|
|
63579
63586
|
}
|
|
63580
63587
|
/**
|
|
63581
63588
|
* Update the top boundary of the scroll region (e.g. after carousel retirement).
|
|
@@ -63627,7 +63634,8 @@ ${CONTENT_BG_SEQ}`);
|
|
|
63627
63634
|
}
|
|
63628
63635
|
process.stdout.write(`\x1B[?25l` + // hide cursor
|
|
63629
63636
|
CONTENT_BG_SEQ + // set content area bg (#111)
|
|
63630
|
-
`\x1B[${this.scrollRegionTop};${scrollEnd}r\x1B[
|
|
63637
|
+
`\x1B[${this.scrollRegionTop};${scrollEnd}r` + (_isWindows ? "\x1B[3J" : "") + // Windows: clear accumulated scrollback
|
|
63638
|
+
`\x1B[${scrollEnd};1H`);
|
|
63631
63639
|
}
|
|
63632
63640
|
/**
|
|
63633
63641
|
* Call AFTER writing content to the scrollable area.
|
|
@@ -63648,6 +63656,8 @@ ${CONTENT_BG_SEQ}`);
|
|
|
63648
63656
|
process.stdout.write(RESET);
|
|
63649
63657
|
this._brailleSpinner.setMetrics({ isStreaming: false });
|
|
63650
63658
|
this.renderFooterAndPositionInput();
|
|
63659
|
+
if (_isWindows)
|
|
63660
|
+
this.termWrite("\x1B[3J");
|
|
63651
63661
|
this.scheduleMouseIdle();
|
|
63652
63662
|
}
|
|
63653
63663
|
}
|
|
@@ -64217,7 +64227,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
64217
64227
|
this.updateFooterHeight();
|
|
64218
64228
|
const rows = process.stdout.rows ?? 24;
|
|
64219
64229
|
const pos = this.rowPositions(rows);
|
|
64220
|
-
this.termWrite(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[${pos.scrollEnd};1H`);
|
|
64230
|
+
this.termWrite(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[${pos.scrollEnd};1H` + (_isWindows ? "\x1B[3J" : ""));
|
|
64221
64231
|
}
|
|
64222
64232
|
/**
|
|
64223
64233
|
* Draw the COMPLETE footer — separators, prompt, metrics — in a single
|
package/package.json
CHANGED