open-agents-ai 0.138.60 → 0.138.62

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 +126 -46
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -40440,43 +40440,42 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
40440
40440
  renderInfo(" Installing LuxTTS dependencies...");
40441
40441
  const pipCmd = JSON.stringify(venvPy);
40442
40442
  const isArm = process.arch === "arm64" || process.arch === "arm";
40443
- const coreDeps = isArm ? `lhotse huggingface_hub safetensors pydub librosa "transformers<=4.57.6" inflect numpy "setuptools<81"` : `lhotse huggingface_hub safetensors pydub onnxruntime librosa "transformers<=4.57.6" inflect numpy vocos "setuptools<81"`;
40444
40443
  if (isArm) {
40445
- renderInfo(" ARM device detected \u2014 skipping onnxruntime (no ARM wheels available); vocos install is non-fatal.");
40446
- }
40447
- const installSteps = [
40444
+ renderInfo(" ARM device detected \u2014 installing deps individually (some optional packages may be skipped).");
40445
+ }
40446
+ const installSteps = isArm ? [
40447
+ // ARM: install each dep individually so one failure doesn't cascade.
40448
+ // Only deps truly required for LuxTTS inference are fatal.
40449
+ // Everything else is non-fatal — missing deps degrade features, not crash.
40450
+ //
40451
+ // Critical for inference (fatal):
40452
+ { cmd: `${pipCmd} -m pip install --quiet "setuptools<81" wheel`, fatal: true, label: "setuptools" },
40453
+ { cmd: `${pipCmd} -m pip install --quiet numpy`, fatal: true, label: "numpy" },
40454
+ { cmd: `${pipCmd} -m pip install --quiet huggingface_hub safetensors`, fatal: true, label: "huggingface_hub + safetensors" },
40455
+ { cmd: `${pipCmd} -m pip install --quiet "transformers<=4.57.6"`, fatal: true, label: "transformers" },
40456
+ { cmd: `${pipCmd} -m pip install --quiet pydub`, fatal: true, label: "pydub" },
40457
+ // Non-fatal — may fail on ARM due to native compilation deps:
40458
+ { cmd: `${pipCmd} -m pip install --quiet inflect`, fatal: false, label: "inflect" },
40459
+ { cmd: `${pipCmd} -m pip install --quiet lhotse`, fatal: false, label: "lhotse (audio processing \u2014 may need build tools on ARM)" },
40460
+ { cmd: `${pipCmd} -m pip install --quiet librosa`, fatal: false, label: "librosa (needs numba/llvmlite \u2014 may fail on ARM)" },
40461
+ { cmd: `${pipCmd} -m pip install --quiet vocos`, fatal: false, label: "vocos" },
40462
+ { cmd: `${pipCmd} -m pip install --quiet piper-phonemize --find-links https://k2-fsa.github.io/icefall/piper_phonemize.html`, fatal: false, label: "piper-phonemize" },
40463
+ // Text processing + codec (non-fatal on ARM):
40464
+ { cmd: `${pipCmd} -m pip install --quiet jieba pypinyin cn2an`, fatal: false, label: "Chinese text processing" },
40465
+ { cmd: `${pipCmd} -m pip install --quiet "git+https://github.com/ysharma3501/LinaCodec.git"`, fatal: false, label: "LinaCodec" },
40466
+ // LuxTTS itself (fatal — this is what we're installing):
40467
+ { cmd: `${pipCmd} -m pip install --quiet -e ${JSON.stringify(repoDir)}`, fatal: true, label: "LuxTTS (editable install)" }
40468
+ ] : [
40469
+ // x86_64: all-in-one (fast, all wheels available)
40448
40470
  {
40449
- cmd: `${pipCmd} -m pip install --quiet ${coreDeps}`,
40471
+ cmd: `${pipCmd} -m pip install --quiet lhotse huggingface_hub safetensors pydub onnxruntime librosa "transformers<=4.57.6" inflect numpy vocos "setuptools<81"`,
40450
40472
  fatal: true,
40451
40473
  label: "core LuxTTS deps"
40452
40474
  },
40453
- // On ARM, vocos is installed separately as non-fatal (may lack prebuilt wheels).
40454
- // On x86_64 it is already included in coreDeps above and this step is skipped.
40455
- ...isArm ? [{
40456
- cmd: `${pipCmd} -m pip install --quiet vocos`,
40457
- fatal: false,
40458
- label: "vocos"
40459
- }] : [],
40460
- {
40461
- cmd: `${pipCmd} -m pip install --quiet piper-phonemize --find-links https://k2-fsa.github.io/icefall/piper_phonemize.html`,
40462
- fatal: false,
40463
- label: "piper-phonemize"
40464
- },
40465
- {
40466
- cmd: `${pipCmd} -m pip install --quiet jieba pypinyin cn2an`,
40467
- fatal: true,
40468
- label: "Chinese text processing deps"
40469
- },
40470
- {
40471
- cmd: `${pipCmd} -m pip install --quiet "git+https://github.com/ysharma3501/LinaCodec.git"`,
40472
- fatal: false,
40473
- label: "LinaCodec"
40474
- },
40475
- {
40476
- cmd: `${pipCmd} -m pip install --quiet -e ${JSON.stringify(repoDir)}`,
40477
- fatal: true,
40478
- label: "LuxTTS (editable install)"
40479
- }
40475
+ { cmd: `${pipCmd} -m pip install --quiet piper-phonemize --find-links https://k2-fsa.github.io/icefall/piper_phonemize.html`, fatal: false, label: "piper-phonemize" },
40476
+ { cmd: `${pipCmd} -m pip install --quiet jieba pypinyin cn2an`, fatal: true, label: "Chinese text processing" },
40477
+ { cmd: `${pipCmd} -m pip install --quiet "git+https://github.com/ysharma3501/LinaCodec.git"`, fatal: false, label: "LinaCodec" },
40478
+ { cmd: `${pipCmd} -m pip install --quiet -e ${JSON.stringify(repoDir)}`, fatal: true, label: "LuxTTS (editable install)" }
40480
40479
  ];
40481
40480
  for (const step of installSteps) {
40482
40481
  try {
@@ -40484,8 +40483,7 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
40484
40483
  } catch (err) {
40485
40484
  const msg = err instanceof Error ? err.message : String(err);
40486
40485
  if (!step.fatal) {
40487
- const armNote = isArm && (step.label === "piper-phonemize" || step.label === "vocos") ? " (expected on ARM \u2014 no prebuilt wheels)" : "";
40488
- renderWarning(` Non-critical install warning (${step.label})${armNote}: ${msg.slice(0, 120)}`);
40486
+ renderWarning(` Skipped (${step.label}): ${msg.slice(0, 150)}`);
40489
40487
  } else {
40490
40488
  throw new Error(`Failed to install LuxTTS dependencies (${step.label}): ${msg}`);
40491
40489
  }
@@ -43418,7 +43416,7 @@ async function handlePeerEndpoint(peerId, authKey, ctx, local) {
43418
43416
  }
43419
43417
  }
43420
43418
  async function handleParallel(arg, ctx) {
43421
- const { execSync: execSync29 } = await import("node:child_process");
43419
+ const { execSync: execSync30 } = await import("node:child_process");
43422
43420
  const baseUrl = ctx.config.backendUrl || "http://localhost:11434";
43423
43421
  const isRemote = ctx.config.backendType === "nexus";
43424
43422
  if (isRemote) {
@@ -43442,7 +43440,7 @@ async function handleParallel(arg, ctx) {
43442
43440
  }
43443
43441
  let systemdVal = "";
43444
43442
  try {
43445
- const out = execSync29("systemctl show ollama.service -p Environment 2>/dev/null || true", { encoding: "utf8" });
43443
+ const out = execSync30("systemctl show ollama.service -p Environment 2>/dev/null || true", { encoding: "utf8" });
43446
43444
  const match = out.match(/OLLAMA_NUM_PARALLEL=(\d+)/);
43447
43445
  if (match)
43448
43446
  systemdVal = match[1];
@@ -43471,7 +43469,7 @@ async function handleParallel(arg, ctx) {
43471
43469
  }
43472
43470
  const isSystemd = (() => {
43473
43471
  try {
43474
- const out = execSync29("systemctl is-active ollama.service 2>/dev/null", { encoding: "utf8" }).trim();
43472
+ const out = execSync30("systemctl is-active ollama.service 2>/dev/null", { encoding: "utf8" }).trim();
43475
43473
  return out === "active" || out === "inactive";
43476
43474
  } catch {
43477
43475
  return false;
@@ -43485,10 +43483,10 @@ async function handleParallel(arg, ctx) {
43485
43483
  const overrideContent = `[Service]
43486
43484
  Environment="OLLAMA_NUM_PARALLEL=${n}"
43487
43485
  `;
43488
- execSync29(`sudo mkdir -p ${overrideDir}`, { stdio: "pipe" });
43489
- execSync29(`echo '${overrideContent}' | sudo tee ${overrideFile} > /dev/null`, { stdio: "pipe" });
43490
- execSync29("sudo systemctl daemon-reload", { stdio: "pipe" });
43491
- execSync29("sudo systemctl restart ollama.service", { stdio: "pipe" });
43486
+ execSync30(`sudo mkdir -p ${overrideDir}`, { stdio: "pipe" });
43487
+ execSync30(`echo '${overrideContent}' | sudo tee ${overrideFile} > /dev/null`, { stdio: "pipe" });
43488
+ execSync30("sudo systemctl daemon-reload", { stdio: "pipe" });
43489
+ execSync30("sudo systemctl restart ollama.service", { stdio: "pipe" });
43492
43490
  let ready = false;
43493
43491
  for (let i = 0; i < 30 && !ready; i++) {
43494
43492
  await new Promise((r) => setTimeout(r, 500));
@@ -43515,7 +43513,7 @@ Environment="OLLAMA_NUM_PARALLEL=${n}"
43515
43513
  renderInfo(`Setting OLLAMA_NUM_PARALLEL=${n}...`);
43516
43514
  try {
43517
43515
  try {
43518
- execSync29("pkill -f 'ollama serve' 2>/dev/null || true", { stdio: "pipe" });
43516
+ execSync30("pkill -f 'ollama serve' 2>/dev/null || true", { stdio: "pipe" });
43519
43517
  } catch {
43520
43518
  }
43521
43519
  await new Promise((r) => setTimeout(r, 1e3));
@@ -53513,6 +53511,7 @@ import { createRequire as createRequire2 } from "node:module";
53513
53511
  import { fileURLToPath as fileURLToPath12 } from "node:url";
53514
53512
  import { readFileSync as readFileSync32, writeFileSync as writeFileSync18, appendFileSync as appendFileSync4, rmSync as rmSync2, readdirSync as readdirSync16, mkdirSync as mkdirSync19 } from "node:fs";
53515
53513
  import { existsSync as existsSync43 } from "node:fs";
53514
+ import { execSync as execSync29 } from "node:child_process";
53516
53515
  import { homedir as homedir13 } from "node:os";
53517
53516
  function formatTimeAgo(date) {
53518
53517
  const seconds = Math.floor((Date.now() - date.getTime()) / 1e3);
@@ -56600,13 +56599,94 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
56600
56599
  }
56601
56600
  },
56602
56601
  destroyProject() {
56602
+ const bgKilled = taskManager.stopAll();
56603
+ if (bgKilled > 0) {
56604
+ writeContent(() => renderInfo(`Killed ${bgKilled} background task(s).`));
56605
+ }
56606
+ try {
56607
+ const nexusDir = join59(repoRoot, OA_DIR, "nexus");
56608
+ const pidFile = join59(nexusDir, "daemon.pid");
56609
+ if (existsSync43(pidFile)) {
56610
+ const pid = parseInt(readFileSync32(pidFile, "utf8").trim(), 10);
56611
+ if (pid > 0) {
56612
+ try {
56613
+ if (process.platform === "win32") {
56614
+ try {
56615
+ execSync29(`taskkill /F /PID ${pid}`, { timeout: 5e3, stdio: "ignore" });
56616
+ } catch {
56617
+ }
56618
+ } else {
56619
+ try {
56620
+ process.kill(pid, "SIGTERM");
56621
+ } catch {
56622
+ }
56623
+ }
56624
+ writeContent(() => renderInfo(`Killed nexus daemon (PID ${pid}).`));
56625
+ } catch {
56626
+ }
56627
+ }
56628
+ }
56629
+ } catch {
56630
+ }
56631
+ try {
56632
+ const voiceDir2 = join59(homedir13(), ".open-agents", "voice");
56633
+ const voicePidFiles = ["luxtts-daemon.pid", "piper-daemon.pid"];
56634
+ for (const pf of voicePidFiles) {
56635
+ const pidPath = join59(voiceDir2, pf);
56636
+ if (existsSync43(pidPath)) {
56637
+ try {
56638
+ const pid = parseInt(readFileSync32(pidPath, "utf8").trim(), 10);
56639
+ if (pid > 0) {
56640
+ if (process.platform === "win32") {
56641
+ try {
56642
+ execSync29(`taskkill /F /PID ${pid}`, { timeout: 5e3, stdio: "ignore" });
56643
+ } catch {
56644
+ }
56645
+ } else {
56646
+ try {
56647
+ process.kill(pid, "SIGTERM");
56648
+ } catch {
56649
+ }
56650
+ }
56651
+ }
56652
+ } catch {
56653
+ }
56654
+ }
56655
+ }
56656
+ } catch {
56657
+ }
56658
+ try {
56659
+ execSync29(process.platform === "win32" ? "timeout /t 1 /nobreak >nul" : "sleep 0.5", { timeout: 3e3, stdio: "ignore" });
56660
+ } catch {
56661
+ }
56603
56662
  const oaPath = join59(repoRoot, OA_DIR);
56604
56663
  if (existsSync43(oaPath)) {
56605
- try {
56606
- rmSync2(oaPath, { recursive: true, force: true });
56664
+ let deleted = false;
56665
+ for (let attempt = 0; attempt < 3; attempt++) {
56666
+ try {
56667
+ rmSync2(oaPath, { recursive: true, force: true });
56668
+ deleted = true;
56669
+ break;
56670
+ } catch (err) {
56671
+ if (attempt < 2) {
56672
+ try {
56673
+ execSync29(process.platform === "win32" ? "timeout /t 1 /nobreak >nul" : "sleep 0.3", { timeout: 3e3, stdio: "ignore" });
56674
+ } catch {
56675
+ }
56676
+ } else {
56677
+ writeContent(() => renderWarning(`Could not fully remove ${OA_DIR}/: ${err instanceof Error ? err.message : String(err)}`));
56678
+ if (process.platform === "win32") {
56679
+ try {
56680
+ execSync29(`rd /s /q "${oaPath}"`, { timeout: 1e4, stdio: "ignore" });
56681
+ deleted = true;
56682
+ } catch {
56683
+ }
56684
+ }
56685
+ }
56686
+ }
56687
+ }
56688
+ if (deleted) {
56607
56689
  writeContent(() => renderInfo(`Removed ${OA_DIR}/ directory.`));
56608
- } catch (err) {
56609
- writeContent(() => renderWarning(`Could not remove ${OA_DIR}/: ${err instanceof Error ? err.message : String(err)}`));
56610
56690
  }
56611
56691
  } else {
56612
56692
  writeContent(() => renderInfo(`No ${OA_DIR}/ directory found.`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.60",
3
+ "version": "0.138.62",
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",