open-agents-ai 0.185.51 → 0.185.53
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 +80 -55
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41418,26 +41418,47 @@ var init_daemon_registry = __esm({
|
|
|
41418
41418
|
d.status = "stopped";
|
|
41419
41419
|
}
|
|
41420
41420
|
}
|
|
41421
|
-
/**
|
|
41421
|
+
/**
|
|
41422
|
+
* Render the monitoring bar as an ANSI string.
|
|
41423
|
+
*
|
|
41424
|
+
* Each button is rendered with a slightly lighter grey background (236)
|
|
41425
|
+
* against the panel background (234), giving a subtle raised-button look
|
|
41426
|
+
* without bracket characters. Status dot is colored inline.
|
|
41427
|
+
*
|
|
41428
|
+
* Daemon buttons: magenta text on 236 bg
|
|
41429
|
+
* Call agent buttons: yellow text on 236 bg
|
|
41430
|
+
* Task agent buttons: cyan text on 236 bg
|
|
41431
|
+
*/
|
|
41422
41432
|
renderBar(width) {
|
|
41423
41433
|
this.refresh();
|
|
41434
|
+
const PANEL_BG2 = "\x1B[48;5;234m";
|
|
41435
|
+
const BTN_BG = "\x1B[48;5;236m";
|
|
41424
41436
|
let bar = "";
|
|
41425
41437
|
for (const [, d] of this.daemons) {
|
|
41426
|
-
const
|
|
41427
|
-
|
|
41438
|
+
const dotColor = d.status === "running" ? "32" : (
|
|
41439
|
+
// green
|
|
41440
|
+
d.status === "error" ? "31" : (
|
|
41441
|
+
// red
|
|
41442
|
+
d.status === "starting" ? "33" : (
|
|
41443
|
+
// yellow
|
|
41444
|
+
"31"
|
|
41445
|
+
)
|
|
41446
|
+
)
|
|
41447
|
+
);
|
|
41448
|
+
bar += `${PANEL_BG2} ${BTN_BG}\x1B[35m ${d.name} \x1B[${dotColor}m\u25CF\x1B[35m `;
|
|
41428
41449
|
}
|
|
41429
41450
|
for (const [, a] of this.subAgents) {
|
|
41430
41451
|
if (a.status === "completed")
|
|
41431
41452
|
continue;
|
|
41432
|
-
const
|
|
41433
|
-
const
|
|
41453
|
+
const dotColor = a.status === "active" ? "32" : "33";
|
|
41454
|
+
const fgColor = a.type === "call" ? "33" : "36";
|
|
41434
41455
|
const label = `${a.type}:${a.id.length > 6 ? a.id.slice(-6) : a.id}`;
|
|
41435
|
-
bar +=
|
|
41456
|
+
bar += `${PANEL_BG2} ${BTN_BG}\x1B[${fgColor}m ${label} \x1B[${dotColor}m\u25CF\x1B[${fgColor}m `;
|
|
41436
41457
|
}
|
|
41437
41458
|
if (!bar) {
|
|
41438
|
-
return
|
|
41459
|
+
return `${PANEL_BG2} \x1B[38;5;240m\u2800 no active daemons`;
|
|
41439
41460
|
}
|
|
41440
|
-
return bar;
|
|
41461
|
+
return bar + PANEL_BG2;
|
|
41441
41462
|
}
|
|
41442
41463
|
/** True if any daemons or sub-agents are registered */
|
|
41443
41464
|
get hasEntries() {
|
|
@@ -43694,7 +43715,7 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43694
43715
|
{ binary: "tesseract", label: "tesseract-ocr", pkgs: { apt: "tesseract-ocr", dnf: "tesseract", pacman: "tesseract", brew: "tesseract", choco: "tesseract", winget: "UB-Mannheim.TesseractOCR" } },
|
|
43695
43716
|
{ binary: "pdftotext", label: "poppler-utils", pkgs: { apt: "poppler-utils", dnf: "poppler-utils", pacman: "poppler", brew: "poppler", choco: "poppler", winget: "freedesktop.poppler" } },
|
|
43696
43717
|
{ binary: "gs", label: "ghostscript", pkgs: { apt: "ghostscript", dnf: "ghostscript", pacman: "ghostscript", brew: "ghostscript", choco: "ghostscript", winget: "ArtifexSoftware.GhostScript" } },
|
|
43697
|
-
{ 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" } },
|
|
43698
43719
|
// Desktop interaction — screenshot + mouse control for desktop_click/desktop_describe
|
|
43699
43720
|
...process.platform === "darwin" ? [
|
|
43700
43721
|
// macOS: screencapture is built-in, cliclick needed for mouse control
|
|
@@ -43713,58 +43734,62 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43713
43734
|
for (const d of missing)
|
|
43714
43735
|
log(`No supported package manager \u2014 ${d.label} unavailable.`);
|
|
43715
43736
|
} else {
|
|
43716
|
-
const
|
|
43717
|
-
|
|
43718
|
-
|
|
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) {
|
|
43719
43744
|
log(`${d.label} not available for ${pm2}.`);
|
|
43720
|
-
|
|
43721
|
-
const labels = missing.map((d) => d.label).join(", ");
|
|
43722
|
-
log(`Installing ${labels}...`);
|
|
43723
|
-
const needsSudo = pm2 !== "brew" && pm2 !== "choco" && pm2 !== "winget";
|
|
43724
|
-
let batchCmd;
|
|
43725
|
-
switch (pm2) {
|
|
43726
|
-
case "apt":
|
|
43727
|
-
batchCmd = `apt-get update -qq && apt-get install -y -qq ${pkgNames.join(" ")}`;
|
|
43728
|
-
break;
|
|
43729
|
-
case "dnf":
|
|
43730
|
-
batchCmd = `dnf install -y -q ${pkgNames.join(" ")}`;
|
|
43731
|
-
break;
|
|
43732
|
-
case "pacman":
|
|
43733
|
-
batchCmd = `pacman -S --noconfirm ${pkgNames.join(" ")}`;
|
|
43734
|
-
break;
|
|
43735
|
-
case "brew":
|
|
43736
|
-
batchCmd = `brew install ${pkgNames.join(" ")}`;
|
|
43737
|
-
break;
|
|
43738
|
-
case "choco":
|
|
43739
|
-
batchCmd = `choco install -y ${pkgNames.join(" ")}`;
|
|
43740
|
-
break;
|
|
43741
|
-
case "winget":
|
|
43742
|
-
batchCmd = pkgNames.map((p) => `winget install --accept-source-agreements --accept-package-agreements ${p}`).join(" && ");
|
|
43743
|
-
break;
|
|
43744
|
-
default:
|
|
43745
|
-
batchCmd = `echo "unsupported pm: ${pm2}" && exit 1`;
|
|
43746
|
-
break;
|
|
43745
|
+
continue;
|
|
43747
43746
|
}
|
|
43748
|
-
|
|
43749
|
-
|
|
43750
|
-
|
|
43751
|
-
|
|
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
|
+
}
|
|
43752
43772
|
try {
|
|
43753
|
-
|
|
43754
|
-
|
|
43773
|
+
if (needsSudo) {
|
|
43774
|
+
await sudoInstall(installCmd, getPassword, log, cachedPasswordRef, 18e4);
|
|
43775
|
+
} else {
|
|
43776
|
+
execSync29(installCmd, { stdio: "pipe", timeout: 18e4 });
|
|
43777
|
+
}
|
|
43755
43778
|
} catch {
|
|
43756
|
-
ok = false;
|
|
43757
43779
|
}
|
|
43758
43780
|
}
|
|
43759
|
-
|
|
43760
|
-
|
|
43761
|
-
|
|
43762
|
-
|
|
43763
|
-
|
|
43764
|
-
} else {
|
|
43765
|
-
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 {
|
|
43766
43786
|
}
|
|
43767
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
|
+
}
|
|
43768
43793
|
}
|
|
43769
43794
|
}
|
|
43770
43795
|
}
|
|
@@ -56262,14 +56287,14 @@ var init_stream_renderer = __esm({
|
|
|
56262
56287
|
this.lineStarted = false;
|
|
56263
56288
|
}
|
|
56264
56289
|
if (this.thinkingTokenCount % 50 === 0) {
|
|
56265
|
-
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)`)}
|
|
56266
56291
|
`);
|
|
56267
56292
|
}
|
|
56268
56293
|
return;
|
|
56269
56294
|
}
|
|
56270
56295
|
if (this.thinkingIndicatorShown && kind === "content") {
|
|
56271
56296
|
this.thinkingIndicatorShown = false;
|
|
56272
|
-
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`)}
|
|
56273
56298
|
`);
|
|
56274
56299
|
this.thinkingTokenCount = 0;
|
|
56275
56300
|
this.lineStarted = false;
|
package/package.json
CHANGED