open-agents-ai 0.125.0 → 0.126.0

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 +14 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -42485,9 +42485,13 @@ async function handleUpdate(subcommand, ctx) {
42485
42485
  if (needsSudo) {
42486
42486
  process.stdout.write("\x1B[?1049l");
42487
42487
  renderInfo("Global npm directory requires elevated permissions.");
42488
+ renderInfo("Enter your password if prompted...");
42488
42489
  safeWrite("\n");
42489
42490
  try {
42490
- es2("sudo -v", { stdio: "inherit", timeout: 6e4 });
42491
+ const { spawnSync } = await import("node:child_process");
42492
+ const sudoResult = spawnSync("sudo", ["-v"], { stdio: "inherit", timeout: 6e4 });
42493
+ if (sudoResult.status !== 0)
42494
+ throw new Error("sudo failed");
42491
42495
  } catch {
42492
42496
  renderWarning("Could not acquire sudo credentials. Try: sudo npm i -g open-agents-ai");
42493
42497
  return;
@@ -42507,17 +42511,22 @@ async function handleUpdate(subcommand, ctx) {
42507
42511
  const installCmd = `${sudoPrefix}npm install -g open-agents-ai@latest --prefer-online`;
42508
42512
  let installOk = await runInstall2(installCmd);
42509
42513
  if (!installOk && /ENOTEMPTY|errno -39/i.test(installError)) {
42510
- installSpinner.stop("Cleaning stale npm temp files...");
42514
+ installSpinner.stop("ENOTEMPTY \u2014 cleaning stale npm artifacts...");
42515
+ process.stdout.write(` ${c2.dim("\u2502")} Removing stale temp directories and npm cache...
42516
+ `);
42511
42517
  try {
42512
42518
  const prefix = await execA("npm prefix -g", { timeout: 5e3 });
42513
42519
  const globalModules = prefix.endsWith("/lib") ? prefix + "/node_modules" : prefix + "/lib/node_modules";
42514
- await execA(`${sudoPrefix}find "${globalModules}" -maxdepth 1 -name ".open-agents-ai-*" -type d -exec rm -rf {} + 2>/dev/null || true`, { timeout: 15e3 });
42520
+ await execA(`${sudoPrefix}find "${globalModules}" -maxdepth 1 -name ".open-agents*" -type d -exec rm -rf {} + 2>/dev/null || true`, { timeout: 15e3 });
42515
42521
  await execA(`${sudoPrefix}rm -rf "${globalModules}/open-agents-ai" 2>/dev/null || true`, { timeout: 15e3 });
42522
+ await execA(`${sudoPrefix}npm cache clean --force 2>/dev/null || true`, { timeout: 3e4 });
42516
42523
  } catch {
42517
42524
  }
42518
- const retrySpinner = startInlineSpinner("Retrying install");
42525
+ process.stdout.write(` ${c2.dim("\u2502")} Retrying with --force...
42526
+ `);
42527
+ const retrySpinner = startInlineSpinner("Retrying install (force)");
42519
42528
  installError = "";
42520
- installOk = await runInstall2(installCmd);
42529
+ installOk = await runInstall2(`${sudoPrefix}npm install -g open-agents-ai@latest --force --prefer-online`);
42521
42530
  if (!installOk) {
42522
42531
  retrySpinner.stop("Retry failed.");
42523
42532
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.125.0",
3
+ "version": "0.126.0",
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",