open-agents-ai 0.187.333 → 0.187.334

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 +61 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -297267,6 +297267,63 @@ async function runSudoScript(ctx3, script) {
297267
297267
  } catch {
297268
297268
  }
297269
297269
  }
297270
+ async function ensureVoiceDeps(ctx3) {
297271
+ try {
297272
+ const mod2 = await Promise.resolve().then(() => (init_py_embed(), py_embed_exports));
297273
+ if (typeof mod2.ensureEmbedDeps === "function") {
297274
+ const res = mod2.ensureEmbedDeps();
297275
+ if (res?.log) renderInfo2(res.log.split("\n").slice(-3).join(" ").slice(0, 200));
297276
+ }
297277
+ } catch {
297278
+ }
297279
+ const missing = [];
297280
+ const has = (cmd) => {
297281
+ try {
297282
+ nodeExecSync(`which ${cmd}`, { stdio: "pipe" });
297283
+ return true;
297284
+ } catch {
297285
+ return false;
297286
+ }
297287
+ };
297288
+ const isLinux = process.platform === "linux";
297289
+ const isDarwin = process.platform === "darwin";
297290
+ if (isLinux) {
297291
+ if (!has("arecord") && !has("ffmpeg")) missing.push("ffmpeg");
297292
+ try {
297293
+ nodeExecSync("python3 -m venv --help", { stdio: "pipe" });
297294
+ } catch {
297295
+ missing.push("python3-venv");
297296
+ }
297297
+ } else if (isDarwin) {
297298
+ if (!has("sox") && !has("ffmpeg")) missing.push("sox", "ffmpeg");
297299
+ }
297300
+ if (missing.length === 0) return;
297301
+ let script = "";
297302
+ if (isLinux) {
297303
+ if (has("apt-get")) {
297304
+ const pkgs = missing.join(" ");
297305
+ script = `apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y ${pkgs}`;
297306
+ } else if (has("dnf")) {
297307
+ const pkgs = missing.map((p2) => p2 === "python3-venv" ? "python3-venv" : p2).join(" ");
297308
+ script = `dnf install -y ${pkgs}`;
297309
+ } else if (has("pacman")) {
297310
+ const pkgs = missing.map((p2) => p2 === "python3-venv" ? "python-virtualenv" : p2).join(" ");
297311
+ script = `pacman -Sy --noconfirm ${pkgs}`;
297312
+ } else if (has("zypper")) {
297313
+ const pkgs = missing.map((p2) => p2 === "python3-venv" ? "python311-venv" : p2).join(" ");
297314
+ script = `zypper install -y ${pkgs}`;
297315
+ }
297316
+ } else if (isDarwin && has("brew")) {
297317
+ const pkgs = [...new Set(missing)].join(" ");
297318
+ script = `brew install ${pkgs}`;
297319
+ }
297320
+ if (script) {
297321
+ renderInfo2(`Installing OS dependencies: ${missing.join(", ")}`);
297322
+ await runSudoScript(ctx3, script);
297323
+ } else {
297324
+ renderWarning2(`Missing tools: ${missing.join(", ")}. Please install them manually.`);
297325
+ }
297326
+ }
297270
297327
  function findPidsByPattern(pattern) {
297271
297328
  const isWin2 = process.platform === "win32";
297272
297329
  try {
@@ -299862,6 +299919,10 @@ sleep 1
299862
299919
  return "handled";
299863
299920
  }
299864
299921
  renderInfo2("Starting voice chat — mic will capture your speech, agent will respond via TTS...");
299922
+ try {
299923
+ await ensureVoiceDeps(ctx3);
299924
+ } catch {
299925
+ }
299865
299926
  try {
299866
299927
  await ctx3.voiceChatStart();
299867
299928
  renderInfo2("Voice chat active. Speak naturally — agent hears you and responds. /hangup to stop.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.333",
3
+ "version": "0.187.334",
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",