open-agents-ai 0.185.67 → 0.185.69
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 +15 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43754,18 +43754,16 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43754
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
|
+
let winNeedsElevation = false;
|
|
43757
43758
|
if (process.platform === "win32") {
|
|
43758
|
-
let isAdmin = false;
|
|
43759
43759
|
try {
|
|
43760
43760
|
execSync29("net session", { stdio: "pipe", timeout: 3e3 });
|
|
43761
|
-
isAdmin = true;
|
|
43762
43761
|
} catch {
|
|
43762
|
+
winNeedsElevation = true;
|
|
43763
|
+
log(`Installing ${labels} via ${pm2} (requires admin \u2014 UAC prompt will appear)...`);
|
|
43763
43764
|
}
|
|
43764
|
-
if (!
|
|
43765
|
-
log(`Installing ${labels} via ${pm2} (non-admin \u2014 some installs may need "Run as Administrator")...`);
|
|
43766
|
-
} else {
|
|
43765
|
+
if (!winNeedsElevation)
|
|
43767
43766
|
log(`Installing ${labels} via ${pm2}...`);
|
|
43768
|
-
}
|
|
43769
43767
|
} else {
|
|
43770
43768
|
log(`Installing ${labels} via ${pm2}...`);
|
|
43771
43769
|
}
|
|
@@ -43806,6 +43804,8 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43806
43804
|
try {
|
|
43807
43805
|
if (needsSudo) {
|
|
43808
43806
|
await sudoInstall(installCmd, getPassword, log, cachedPasswordRef, 18e4);
|
|
43807
|
+
} else if (winNeedsElevation) {
|
|
43808
|
+
execSync29(`powershell -NoProfile -Command "Start-Process -FilePath 'cmd.exe' -ArgumentList '/c ${installCmd.replace(/'/g, "''")}' -Verb RunAs -Wait"`, { stdio: "pipe", timeout: 18e4 });
|
|
43809
43809
|
} else {
|
|
43810
43810
|
execSync29(installCmd, { stdio: "pipe", timeout: 18e4 });
|
|
43811
43811
|
}
|
|
@@ -43816,16 +43816,6 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43816
43816
|
lastError = stderr || stdout || msg;
|
|
43817
43817
|
if (lastError.length > 300)
|
|
43818
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
|
-
}
|
|
43829
43819
|
}
|
|
43830
43820
|
}
|
|
43831
43821
|
if (!hasCmd(d.binary) && pipPkg) {
|
|
@@ -43841,10 +43831,18 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
|
|
|
43841
43831
|
lastError += lastError ? ` | pip: ${pipError.slice(0, 150)}` : pipError.slice(0, 200);
|
|
43842
43832
|
}
|
|
43843
43833
|
}
|
|
43834
|
+
if (process.platform === "win32" && !hasCmd(d.binary)) {
|
|
43835
|
+
try {
|
|
43836
|
+
const freshPath = execSync29(`powershell -NoProfile -Command "[System.Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path','User')"`, { encoding: "utf8", timeout: 5e3, stdio: "pipe" }).trim();
|
|
43837
|
+
if (freshPath)
|
|
43838
|
+
process.env.PATH = freshPath;
|
|
43839
|
+
} catch {
|
|
43840
|
+
}
|
|
43841
|
+
}
|
|
43844
43842
|
if (hasCmd(d.binary)) {
|
|
43845
43843
|
log(`${d.label} installed.`);
|
|
43846
43844
|
} else {
|
|
43847
|
-
const reason = lastError ? ` Reason: ${lastError}` : " (
|
|
43845
|
+
const reason = lastError ? ` Reason: ${lastError}` : " (binary not found in PATH after install \u2014 may need terminal restart or admin elevation)";
|
|
43848
43846
|
log(`${d.label} could not be installed \u2014 features will be limited.${reason}`);
|
|
43849
43847
|
}
|
|
43850
43848
|
}
|
package/package.json
CHANGED