open-agents-ai 0.185.64 → 0.185.66
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 +43 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43751,10 +43751,24 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43751
43751
|
if (missing.length === 0) {
|
|
43752
43752
|
} else if (!pm2) {
|
|
43753
43753
|
for (const d of missing)
|
|
43754
|
-
log(`No supported package manager \u2014 ${d.label} unavailable
|
|
43754
|
+
log(`No supported package manager (choco/winget/apt/brew) \u2014 ${d.label} unavailable. Install manually or install Chocolatey: https://chocolatey.org/install`);
|
|
43755
43755
|
} else {
|
|
43756
43756
|
const labels = missing.map((d) => d.label).join(", ");
|
|
43757
|
-
|
|
43757
|
+
if (process.platform === "win32") {
|
|
43758
|
+
let isAdmin = false;
|
|
43759
|
+
try {
|
|
43760
|
+
execSync29("net session", { stdio: "pipe", timeout: 3e3 });
|
|
43761
|
+
isAdmin = true;
|
|
43762
|
+
} catch {
|
|
43763
|
+
}
|
|
43764
|
+
if (!isAdmin) {
|
|
43765
|
+
log(`Installing ${labels} via ${pm2} (non-admin \u2014 some installs may need "Run as Administrator")...`);
|
|
43766
|
+
} else {
|
|
43767
|
+
log(`Installing ${labels} via ${pm2}...`);
|
|
43768
|
+
}
|
|
43769
|
+
} else {
|
|
43770
|
+
log(`Installing ${labels} via ${pm2}...`);
|
|
43771
|
+
}
|
|
43758
43772
|
const needsSudo = pm2 !== "brew" && pm2 !== "choco" && pm2 !== "winget";
|
|
43759
43773
|
for (const d of missing) {
|
|
43760
43774
|
const pkgName = d.pkgs[pm2];
|
|
@@ -43763,6 +43777,7 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43763
43777
|
log(`${d.label} not available for ${pm2}.`);
|
|
43764
43778
|
continue;
|
|
43765
43779
|
}
|
|
43780
|
+
let lastError = "";
|
|
43766
43781
|
if (pkgName) {
|
|
43767
43782
|
let installCmd;
|
|
43768
43783
|
switch (pm2) {
|
|
@@ -43794,20 +43809,43 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43794
43809
|
} else {
|
|
43795
43810
|
execSync29(installCmd, { stdio: "pipe", timeout: 18e4 });
|
|
43796
43811
|
}
|
|
43797
|
-
} catch {
|
|
43812
|
+
} catch (e) {
|
|
43813
|
+
const stderr = e.stderr?.toString?.()?.trim?.() ?? "";
|
|
43814
|
+
const stdout = e.stdout?.toString?.()?.trim?.() ?? "";
|
|
43815
|
+
const msg = e.message ?? "";
|
|
43816
|
+
lastError = stderr || stdout || msg;
|
|
43817
|
+
if (lastError.length > 300)
|
|
43818
|
+
lastError = lastError.slice(0, 300) + "...";
|
|
43819
|
+
if (process.platform === "win32" && /access|denied|elevation|administrator|privilege|0x80070005/i.test(lastError)) {
|
|
43820
|
+
log(`${d.label}: needs admin \u2014 retrying with elevation...`);
|
|
43821
|
+
try {
|
|
43822
|
+
execSync29(`powershell -NoProfile -Command "Start-Process -FilePath 'cmd.exe' -ArgumentList '/c ${installCmd.replace(/"/g, '\\"')}' -Verb RunAs -Wait"`, { stdio: "pipe", timeout: 18e4 });
|
|
43823
|
+
lastError = "";
|
|
43824
|
+
} catch (e2) {
|
|
43825
|
+
const stderr2 = e2.stderr?.toString?.()?.trim?.() ?? "";
|
|
43826
|
+
lastError = `Elevated install failed: ${(stderr2 || e2.message || "").slice(0, 200)}`;
|
|
43827
|
+
}
|
|
43828
|
+
}
|
|
43798
43829
|
}
|
|
43799
43830
|
}
|
|
43800
43831
|
if (!hasCmd(d.binary) && pipPkg) {
|
|
43801
43832
|
try {
|
|
43802
43833
|
const pipCmd = process.platform === "win32" ? `pip install ${pipPkg}` : `pip3 install ${pipPkg}`;
|
|
43803
43834
|
execSync29(pipCmd, { stdio: "pipe", timeout: 12e4 });
|
|
43804
|
-
|
|
43835
|
+
lastError = "";
|
|
43836
|
+
} catch (e) {
|
|
43837
|
+
const stderr = e.stderr?.toString?.()?.trim?.() ?? "";
|
|
43838
|
+
const stdout = e.stdout?.toString?.()?.trim?.() ?? "";
|
|
43839
|
+
const msg = e.message ?? "";
|
|
43840
|
+
const pipError = stderr || stdout || msg;
|
|
43841
|
+
lastError += lastError ? ` | pip: ${pipError.slice(0, 150)}` : pipError.slice(0, 200);
|
|
43805
43842
|
}
|
|
43806
43843
|
}
|
|
43807
43844
|
if (hasCmd(d.binary)) {
|
|
43808
43845
|
log(`${d.label} installed.`);
|
|
43809
43846
|
} else {
|
|
43810
|
-
|
|
43847
|
+
const reason = lastError ? ` Reason: ${lastError}` : " (no error output captured \u2014 may need admin/UAC elevation)";
|
|
43848
|
+
log(`${d.label} could not be installed \u2014 features will be limited.${reason}`);
|
|
43811
43849
|
}
|
|
43812
43850
|
}
|
|
43813
43851
|
}
|
package/package.json
CHANGED