open-agents-ai 0.187.340 → 0.187.342

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 +57 -53
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -277911,6 +277911,7 @@ function ensureEmbedDeps() {
277911
277911
  const asrPkgs = [
277912
277912
  "numpy==1.26.4",
277913
277913
  "soundfile",
277914
+ "faster-whisper",
277914
277915
  "openai-whisper",
277915
277916
  // Embedding helpers used elsewhere (kept lightweight compared to full torch stack)
277916
277917
  "Pillow"
@@ -278214,63 +278215,39 @@ var init_listen = __esm({
278214
278215
  return this._ready;
278215
278216
  }
278216
278217
  async start() {
278218
+ let pyPath = "python3";
278219
+ try {
278220
+ const mod2 = await Promise.resolve().then(() => (init_py_embed(), py_embed_exports));
278221
+ const ensure = mod2.ensureEmbedDeps;
278222
+ const getPy = mod2.getVenvPython;
278223
+ if (typeof ensure === "function") {
278224
+ try {
278225
+ const res = ensure();
278226
+ if (res?.log) this.emit("status", res.log.slice(-500));
278227
+ } catch {
278228
+ }
278229
+ }
278230
+ if (typeof getPy === "function") {
278231
+ pyPath = getPy();
278232
+ }
278233
+ } catch {
278234
+ }
278235
+ this.process = spawn18(pyPath, [
278236
+ this.scriptPath,
278237
+ "--model",
278238
+ this.model,
278239
+ "--chunk-seconds",
278240
+ "3",
278241
+ "--window-seconds",
278242
+ "10"
278243
+ ], {
278244
+ stdio: ["pipe", "pipe", "pipe"],
278245
+ env: { ...process.env }
278246
+ });
278217
278247
  return new Promise((resolve40, reject) => {
278218
278248
  const timeout2 = setTimeout(() => {
278219
278249
  reject(new Error("Whisper fallback: model load timeout (5 min). First run downloads the model."));
278220
278250
  }, 3e5);
278221
- (async () => {
278222
- try {
278223
- const mod2 = await Promise.resolve().then(() => (init_py_embed(), py_embed_exports));
278224
- const ensure = mod2.ensureEmbedDeps;
278225
- const getPy = mod2.getVenvPython;
278226
- if (typeof ensure === "function" && typeof getPy === "function") {
278227
- try {
278228
- const res = ensure();
278229
- if (res?.log) this.emit("status", res.log.slice(-500));
278230
- } catch {
278231
- }
278232
- const pyPath = getPy();
278233
- this.process = spawn18(pyPath, [
278234
- this.scriptPath,
278235
- "--model",
278236
- this.model,
278237
- "--chunk-seconds",
278238
- "3",
278239
- "--window-seconds",
278240
- "10"
278241
- ], {
278242
- stdio: ["pipe", "pipe", "pipe"],
278243
- env: { ...process.env }
278244
- });
278245
- } else {
278246
- this.process = spawn18("python3", [
278247
- this.scriptPath,
278248
- "--model",
278249
- this.model,
278250
- "--chunk-seconds",
278251
- "3",
278252
- "--window-seconds",
278253
- "10"
278254
- ], {
278255
- stdio: ["pipe", "pipe", "pipe"],
278256
- env: { ...process.env }
278257
- });
278258
- }
278259
- } catch {
278260
- this.process = spawn18("python3", [
278261
- this.scriptPath,
278262
- "--model",
278263
- this.model,
278264
- "--chunk-seconds",
278265
- "3",
278266
- "--window-seconds",
278267
- "10"
278268
- ], {
278269
- stdio: ["pipe", "pipe", "pipe"],
278270
- env: { ...process.env }
278271
- });
278272
- }
278273
- })();
278274
278251
  const rl = createInterface2({ input: this.process.stdout });
278275
278252
  rl.on("line", (line) => {
278276
278253
  try {
@@ -278464,6 +278441,33 @@ var init_listen = __esm({
278464
278441
  if (tc) {
278465
278442
  const TranscribeLive = tc.TranscribeLive;
278466
278443
  if (TranscribeLive) {
278444
+ let tcUpToDate = false;
278445
+ try {
278446
+ const tcPkgPath = join69(dirname18(__require.resolve?.("transcribe-cli/package.json") || ""), "package.json");
278447
+ if (existsSync53(tcPkgPath)) {
278448
+ const tcPkg = JSON.parse(__require("fs").readFileSync(tcPkgPath, "utf8"));
278449
+ tcUpToDate = tcPkg.version && tcPkg.version >= "2.0.1";
278450
+ }
278451
+ } catch {
278452
+ try {
278453
+ const out = execSync44("npm list -g transcribe-cli --depth=0 --json", { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"], timeout: 1e4 });
278454
+ const parsed = JSON.parse(out);
278455
+ const ver = parsed?.dependencies?.["transcribe-cli"]?.version || "";
278456
+ tcUpToDate = ver >= "2.0.1";
278457
+ } catch {
278458
+ }
278459
+ }
278460
+ if (!tcUpToDate) {
278461
+ try {
278462
+ execSync44("npm i -g transcribe-cli@latest", { stdio: "pipe", timeout: 12e4 });
278463
+ this.transcribeCliAvailable = null;
278464
+ const reloaded = await this.loadTranscribeCli();
278465
+ if (reloaded?.TranscribeLive) {
278466
+ tc = reloaded;
278467
+ }
278468
+ } catch {
278469
+ }
278470
+ }
278467
278471
  const venvReady = ensureVenvForTranscribeCli();
278468
278472
  if (!venvReady) {
278469
278473
  transcribeCliError = "venv Python missing numpy (required by transcribe-cli) — using whisper fallback";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.340",
3
+ "version": "0.187.342",
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",
@@ -83,6 +83,7 @@
83
83
  "ignore": "^6.0.2",
84
84
  "nats.ws": "^1.30.3",
85
85
  "open-agents-nexus": "^1.17.3",
86
+ "transcribe-cli": "^2.0.1",
86
87
  "ws": "^8.20.0",
87
88
  "zod": "^3.24.1"
88
89
  },