open-agents-ai 0.185.46 → 0.185.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 +22 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43428,11 +43428,25 @@ function detectPkgManager() {
|
|
|
43428
43428
|
if (plat === "win32") {
|
|
43429
43429
|
if (hasCmd("choco"))
|
|
43430
43430
|
return "choco";
|
|
43431
|
+
if (hasCmd("winget"))
|
|
43432
|
+
return "winget";
|
|
43433
|
+
try {
|
|
43434
|
+
execSync28(`powershell -NoProfile -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"`, { stdio: "pipe", timeout: 12e4 });
|
|
43435
|
+
if (hasCmd("choco"))
|
|
43436
|
+
return "choco";
|
|
43437
|
+
} catch {
|
|
43438
|
+
}
|
|
43431
43439
|
return null;
|
|
43432
43440
|
}
|
|
43433
43441
|
if (plat === "darwin") {
|
|
43434
43442
|
if (hasCmd("brew"))
|
|
43435
43443
|
return "brew";
|
|
43444
|
+
try {
|
|
43445
|
+
execSync28('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"', { stdio: "pipe", timeout: 3e5, env: { ...process.env, NONINTERACTIVE: "1" } });
|
|
43446
|
+
if (hasCmd("brew"))
|
|
43447
|
+
return "brew";
|
|
43448
|
+
} catch {
|
|
43449
|
+
}
|
|
43436
43450
|
return null;
|
|
43437
43451
|
}
|
|
43438
43452
|
if (hasCmd("apt-get"))
|
|
@@ -43563,10 +43577,10 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43563
43577
|
const getPassword = getSudoPassword ?? (() => Promise.resolve(null));
|
|
43564
43578
|
const allDeps = [
|
|
43565
43579
|
// Vision + OCR
|
|
43566
|
-
{ binary: "tesseract", label: "tesseract-ocr", pkgs: { apt: "tesseract-ocr", dnf: "tesseract", pacman: "tesseract", brew: "tesseract", choco: "tesseract" } },
|
|
43567
|
-
{ binary: "pdftotext", label: "poppler-utils", pkgs: { apt: "poppler-utils", dnf: "poppler-utils", pacman: "poppler", brew: "poppler", choco: "poppler" } },
|
|
43568
|
-
{ binary: "gs", label: "ghostscript", pkgs: { apt: "ghostscript", dnf: "ghostscript", pacman: "ghostscript", brew: "ghostscript", choco: "ghostscript" } },
|
|
43569
|
-
{ binary: "ocrmypdf", label: "ocrmypdf", pkgs: { apt: "ocrmypdf", dnf: "ocrmypdf", pacman: "ocrmypdf", brew: "ocrmypdf", choco: "ocrmypdf" } },
|
|
43580
|
+
{ binary: "tesseract", label: "tesseract-ocr", pkgs: { apt: "tesseract-ocr", dnf: "tesseract", pacman: "tesseract", brew: "tesseract", choco: "tesseract", winget: "UB-Mannheim.TesseractOCR" } },
|
|
43581
|
+
{ binary: "pdftotext", label: "poppler-utils", pkgs: { apt: "poppler-utils", dnf: "poppler-utils", pacman: "poppler", brew: "poppler", choco: "poppler", winget: "freedesktop.poppler" } },
|
|
43582
|
+
{ binary: "gs", label: "ghostscript", pkgs: { apt: "ghostscript", dnf: "ghostscript", pacman: "ghostscript", brew: "ghostscript", choco: "ghostscript", winget: "ArtifexSoftware.GhostScript" } },
|
|
43583
|
+
{ binary: "ocrmypdf", label: "ocrmypdf", pkgs: { apt: "ocrmypdf", dnf: "ocrmypdf", pacman: "ocrmypdf", brew: "ocrmypdf", choco: "ocrmypdf", winget: "" } },
|
|
43570
43584
|
// Desktop interaction — screenshot + mouse control for desktop_click/desktop_describe
|
|
43571
43585
|
...process.platform === "darwin" ? [
|
|
43572
43586
|
// macOS: screencapture is built-in, cliclick needed for mouse control
|
|
@@ -43592,7 +43606,7 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43592
43606
|
} else {
|
|
43593
43607
|
const labels = missing.map((d) => d.label).join(", ");
|
|
43594
43608
|
log(`Installing ${labels}...`);
|
|
43595
|
-
const needsSudo = pm2 !== "brew" && pm2 !== "choco";
|
|
43609
|
+
const needsSudo = pm2 !== "brew" && pm2 !== "choco" && pm2 !== "winget";
|
|
43596
43610
|
let batchCmd;
|
|
43597
43611
|
switch (pm2) {
|
|
43598
43612
|
case "apt":
|
|
@@ -43610,6 +43624,9 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43610
43624
|
case "choco":
|
|
43611
43625
|
batchCmd = `choco install -y ${pkgNames.join(" ")}`;
|
|
43612
43626
|
break;
|
|
43627
|
+
case "winget":
|
|
43628
|
+
batchCmd = pkgNames.map((p) => `winget install --accept-source-agreements --accept-package-agreements ${p}`).join(" && ");
|
|
43629
|
+
break;
|
|
43613
43630
|
default:
|
|
43614
43631
|
batchCmd = `echo "unsupported pm: ${pm2}" && exit 1`;
|
|
43615
43632
|
break;
|
package/package.json
CHANGED