open-agents-ai 0.185.66 → 0.185.67

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -53419,25 +53419,37 @@ async function handleUpdate(subcommand, ctx) {
53419
53419
  installOverlay.setStatus("Installing package...");
53420
53420
  const installCmd = `${sudoPrefix}npm install -g open-agents-ai@latest --prefer-online`;
53421
53421
  let installOk = await runInstall2(installCmd);
53422
+ if (!installOk && process.platform === "win32" && /EPERM|EACCES|access|denied|permission/i.test(installError)) {
53423
+ installOverlay.setStatus("Needs admin \u2014 retrying with elevation...");
53424
+ installError = "";
53425
+ installOk = await runInstall2(`powershell -NoProfile -Command "Start-Process -FilePath 'npm' -ArgumentList 'install -g open-agents-ai@latest --prefer-online' -Verb RunAs -Wait"`);
53426
+ }
53422
53427
  if (!installOk && /ENOTEMPTY|errno -39/i.test(installError)) {
53423
53428
  installOverlay.setStatus("Cleaning stale artifacts...");
53424
53429
  try {
53425
53430
  const prefix = await execA("npm prefix -g", { timeout: 5e3 });
53426
- const globalModules = prefix.endsWith("/lib") ? prefix + "/node_modules" : prefix + "/lib/node_modules";
53427
- await execA(`${sudoPrefix}find "${globalModules}" -maxdepth 1 -name ".open-agents*" -type d -exec rm -rf {} + 2>/dev/null || true`, { timeout: 15e3 });
53428
- await execA(`${sudoPrefix}rm -rf "${globalModules}/open-agents-ai" 2>/dev/null || true`, { timeout: 15e3 });
53429
- await execA(`${sudoPrefix}npm cache clean --force 2>/dev/null || true`, { timeout: 3e4 });
53431
+ if (process.platform === "win32") {
53432
+ await execA(`powershell -NoProfile -Command "Remove-Item -Recurse -Force '${prefix}\\node_modules\\open-agents-ai' -ErrorAction SilentlyContinue"`, { timeout: 15e3 });
53433
+ await execA(`npm cache clean --force`, { timeout: 3e4 });
53434
+ } else {
53435
+ const globalModules = prefix.endsWith("/lib") ? prefix + "/node_modules" : prefix + "/lib/node_modules";
53436
+ await execA(`${sudoPrefix}find "${globalModules}" -maxdepth 1 -name ".open-agents*" -type d -exec rm -rf {} + 2>/dev/null || true`, { timeout: 15e3 });
53437
+ await execA(`${sudoPrefix}rm -rf "${globalModules}/open-agents-ai" 2>/dev/null || true`, { timeout: 15e3 });
53438
+ await execA(`${sudoPrefix}npm cache clean --force 2>/dev/null || true`, { timeout: 3e4 });
53439
+ }
53430
53440
  } catch {
53431
53441
  }
53432
53442
  installOverlay.setStatus("Retrying install...");
53433
53443
  installError = "";
53434
- installOk = await runInstall2(`${sudoPrefix}npm install -g open-agents-ai@latest --force --prefer-online`);
53444
+ installOk = await runInstall2(`${process.platform === "win32" ? "" : sudoPrefix}npm install -g open-agents-ai@latest --force --prefer-online`);
53435
53445
  }
53436
53446
  if (!installOk) {
53437
53447
  installOverlay.stop("Install failed");
53438
53448
  await new Promise((r) => setTimeout(r, 2e3));
53439
53449
  installOverlay.dismiss();
53440
- renderWarning(`Try manually: ${sudoPrefix}npm i -g open-agents-ai`);
53450
+ const hint = process.platform === "win32" ? `npm i -g open-agents-ai (run terminal as Administrator)` : `${sudoPrefix}npm i -g open-agents-ai`;
53451
+ renderWarning(`Update failed: ${installError.slice(0, 150) || "unknown error"}`);
53452
+ renderWarning(`Try manually: ${hint}`);
53441
53453
  return;
53442
53454
  }
53443
53455
  installOverlay.setStatus(`Package installed (v${info.latestVersion})`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.185.66",
3
+ "version": "0.185.67",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",