open-agents-ai 0.73.0 → 0.73.1

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 +38 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31325,6 +31325,30 @@ var init_voice = __esm({
31325
31325
  }, null, 2));
31326
31326
  }
31327
31327
  const voiceRequire = createRequire(join38(voiceDir(), "index.js"));
31328
+ const probeOnnx = () => {
31329
+ try {
31330
+ const result = execSync26(`node -e "try { require('onnxruntime-node'); console.log('OK'); } catch(e) { console.log('FAIL:' + e.message); }"`, { cwd: voiceDir(), stdio: "pipe", timeout: 15e3, env: { ...process.env, NODE_PATH: join38(voiceDir(), "node_modules") } });
31331
+ const output = result.toString().trim();
31332
+ if (output === "OK")
31333
+ return true;
31334
+ if (output.startsWith("FAIL:")) {
31335
+ renderWarning(`ONNX runtime probe failed: ${output.slice(5)}`);
31336
+ return false;
31337
+ }
31338
+ return false;
31339
+ } catch (err) {
31340
+ const msg = err instanceof Error ? err.message : String(err);
31341
+ if (msg.includes("CPUID") || msg.includes("unknown cpu") || msg.includes("signal")) {
31342
+ renderWarning(`ONNX runtime is not compatible with this CPU (${process.platform}-${arch}).`);
31343
+ }
31344
+ return false;
31345
+ }
31346
+ };
31347
+ const onnxNodeModules = join38(voiceDir(), "node_modules", "onnxruntime-node");
31348
+ const onnxInstalled = existsSync28(onnxNodeModules);
31349
+ if (onnxInstalled && !probeOnnx()) {
31350
+ throw new Error(`Voice synthesis unavailable: ONNX runtime crashes on this CPU (${process.platform}-${arch}). This is a known issue with some ARM SoCs where the CPU vendor is not recognized. Voice feedback will be disabled but all other features work normally.`);
31351
+ }
31328
31352
  try {
31329
31353
  this.ort = voiceRequire("onnxruntime-node");
31330
31354
  } catch {
@@ -31335,12 +31359,19 @@ var init_voice = __esm({
31335
31359
  stdio: "pipe",
31336
31360
  timeout: 12e4
31337
31361
  });
31338
- this.ort = voiceRequire("onnxruntime-node");
31339
31362
  } catch (err) {
31340
31363
  const archHint = arch !== "x64" ? ` onnxruntime-node may not have prebuilt binaries for ${process.platform}-${arch}.` : "";
31341
31364
  throw new Error(`Failed to install voice dependencies.${archHint} Try manually: cd ${voiceDir()} && npm install
31342
31365
  Error: ${err instanceof Error ? err.message : String(err)}`);
31343
31366
  }
31367
+ if (!probeOnnx()) {
31368
+ throw new Error(`Voice synthesis unavailable: ONNX runtime crashes on this CPU (${process.platform}-${arch}). This is a known issue with some ARM SoCs where the CPU vendor is not recognized. Voice feedback will be disabled but all other features work normally.`);
31369
+ }
31370
+ try {
31371
+ this.ort = voiceRequire("onnxruntime-node");
31372
+ } catch (err) {
31373
+ throw new Error(`Failed to load ONNX runtime after install. Error: ${err instanceof Error ? err.message : String(err)}`);
31374
+ }
31344
31375
  }
31345
31376
  try {
31346
31377
  const phonemizerMod = voiceRequire("phonemizer");
@@ -39080,7 +39111,12 @@ async function startInteractive(config, repoPath) {
39080
39111
  const callSubAgents = /* @__PURE__ */ new Map();
39081
39112
  const streamRenderer = new StreamRenderer();
39082
39113
  if (savedSettings.voice) {
39083
- voiceEngine.toggle().catch(() => {
39114
+ voiceEngine.toggle().catch((err) => {
39115
+ const msg = err instanceof Error ? err.message : String(err);
39116
+ if (msg.includes("ONNX runtime crashes") || msg.includes("unavailable")) {
39117
+ renderWarning(`Voice disabled: ${msg}`);
39118
+ renderInfo("All other features work normally. Use /voice to retry later.");
39119
+ }
39084
39120
  });
39085
39121
  if (savedSettings.voiceModel) {
39086
39122
  voiceEngine.setModel(savedSettings.voiceModel).catch(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.73.0",
3
+ "version": "0.73.1",
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",