open-agents-ai 0.187.440 → 0.187.441

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.
package/dist/index.js CHANGED
@@ -526120,6 +526120,8 @@ var init_listen = __esm({
526120
526120
  liveTranscriber = null;
526121
526121
  // TranscribeLive from transcribe-cli or WhisperFallbackTranscriber
526122
526122
  active = false;
526123
+ paused = false;
526124
+ // Pause state for voicechat (stops mic but keeps transcriber)
526123
526125
  silenceTimer = null;
526124
526126
  countdownInterval = null;
526125
526127
  lastTranscriptTime = 0;
@@ -526141,6 +526143,9 @@ var init_listen = __esm({
526141
526143
  get isBlinking() {
526142
526144
  return this.active && this.blinkState;
526143
526145
  }
526146
+ get isPaused() {
526147
+ return this.paused;
526148
+ }
526144
526149
  get currentModel() {
526145
526150
  return this.config.model;
526146
526151
  }
@@ -526367,7 +526372,7 @@ transcribe-cli error: ${transcribeCliError}` : "";
526367
526372
  env: { ...process.env }
526368
526373
  });
526369
526374
  this.micProcess.stdout?.on("data", (chunk) => {
526370
- if (this.active && this.liveTranscriber) {
526375
+ if (this.active && !this.paused && this.liveTranscriber) {
526371
526376
  this.liveTranscriber.write(chunk);
526372
526377
  }
526373
526378
  });
@@ -526443,6 +526448,67 @@ transcribe-cli error: ${transcribeCliError}` : "";
526443
526448
  this.pendingText = "";
526444
526449
  return text;
526445
526450
  }
526451
+ /**
526452
+ * Pause microphone capture (for voicechat during TTS output).
526453
+ * Keeps transcriber alive but stops feeding it audio.
526454
+ */
526455
+ pause() {
526456
+ if (!this.active || this.paused) return;
526457
+ this.paused = true;
526458
+ if (this.blinkTimer) {
526459
+ clearInterval(this.blinkTimer);
526460
+ this.blinkTimer = null;
526461
+ }
526462
+ this.blinkState = false;
526463
+ if (this.micProcess) {
526464
+ try {
526465
+ this.micProcess.kill("SIGTERM");
526466
+ } catch {
526467
+ }
526468
+ this.micProcess = null;
526469
+ }
526470
+ this.emit("paused");
526471
+ this.emit("recording", false);
526472
+ }
526473
+ /**
526474
+ * Resume microphone capture after pause.
526475
+ */
526476
+ async resume() {
526477
+ if (!this.active || !this.paused) return "Not paused.";
526478
+ this.paused = false;
526479
+ const micCmd = findMicCaptureCommand();
526480
+ if (!micCmd) {
526481
+ return "No microphone capture tool found.";
526482
+ }
526483
+ this.micProcess = spawn18(micCmd.cmd, micCmd.args, {
526484
+ stdio: ["pipe", "pipe", "pipe"],
526485
+ env: { ...process.env }
526486
+ });
526487
+ this.micProcess.stdout?.on("data", (chunk) => {
526488
+ if (this.active && !this.paused && this.liveTranscriber) {
526489
+ this.liveTranscriber.write(chunk);
526490
+ }
526491
+ });
526492
+ this.micProcess.stderr?.on("data", () => {
526493
+ });
526494
+ onChildError(this.micProcess, (err) => {
526495
+ this.emit("error", new Error(`Mic capture failed: ${err.message}`));
526496
+ this.stop();
526497
+ });
526498
+ onChildClose(this.micProcess, () => {
526499
+ if (this.active && !this.paused) {
526500
+ this.stop();
526501
+ }
526502
+ });
526503
+ this.blinkState = true;
526504
+ this.blinkTimer = setInterval(() => {
526505
+ this.blinkState = !this.blinkState;
526506
+ this.emit("recording", this.blinkState);
526507
+ }, 500);
526508
+ this.emit("resumed");
526509
+ this.emit("recording", true);
526510
+ return "Resumed listening.";
526511
+ }
526446
526512
  /**
526447
526513
  * Create a standalone transcriber for call sessions.
526448
526514
  * No microphone capture — just an ASR engine you feed PCM chunks to.
@@ -582988,6 +583054,10 @@ ${toolOutput}` });
582988
583054
  this.context.push({ role: "assistant", content: finalSpoken });
582989
583055
  this.setState("SPEAKING");
582990
583056
  this.onAgentSpeech(finalSpoken);
583057
+ try {
583058
+ this.listen.pause();
583059
+ } catch {
583060
+ }
582991
583061
  this.voice.speak(finalSpoken);
582992
583062
  this.voiceTranscript.push({ role: "assistant", content: finalSpoken, ts: Date.now() });
582993
583063
  this.voiceTranscript.push({ role: "assistant", content: response.trim(), ts: Date.now() });
@@ -583014,6 +583084,10 @@ ${toolOutput}` });
583014
583084
  this.abortController = null;
583015
583085
  }
583016
583086
  if (this.active) {
583087
+ try {
583088
+ await this.listen.resume();
583089
+ } catch {
583090
+ }
583017
583091
  this.setState("LISTENING");
583018
583092
  if (this.verbose) this.onStatus("LISTENING...");
583019
583093
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.440",
3
+ "version": "0.187.441",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "open-agents-ai",
9
- "version": "0.187.440",
9
+ "version": "0.187.441",
10
10
  "hasInstallScript": true,
11
11
  "license": "CC-BY-NC-4.0",
12
12
  "dependencies": {
@@ -2630,9 +2630,9 @@
2630
2630
  }
2631
2631
  },
2632
2632
  "node_modules/ajv": {
2633
- "version": "8.18.0",
2634
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
2635
- "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
2633
+ "version": "8.20.0",
2634
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
2635
+ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
2636
2636
  "license": "MIT",
2637
2637
  "dependencies": {
2638
2638
  "fast-deep-equal": "^3.1.3",
@@ -4207,9 +4207,9 @@
4207
4207
  }
4208
4208
  },
4209
4209
  "node_modules/express-rate-limit": {
4210
- "version": "8.4.0",
4211
- "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.4.0.tgz",
4212
- "integrity": "sha512-gDK8yiqKxrGta+3WtON59arrrw6GLmadA1qoFgYXzdcch8fmKDID2XqO8itsi3f1wufXYPT51387dN6cvVBS3Q==",
4210
+ "version": "8.4.1",
4211
+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.4.1.tgz",
4212
+ "integrity": "sha512-NGVYwQSAyEQgzxX1iCM978PP9AdO/hW93gMcF6ZwQCm+rFvLsBH6w4xcXWTcliS8La5EPRN3p9wzItqBwJrfNw==",
4213
4213
  "license": "MIT",
4214
4214
  "dependencies": {
4215
4215
  "ip-address": "10.1.0"
@@ -4794,9 +4794,9 @@
4794
4794
  }
4795
4795
  },
4796
4796
  "node_modules/hono": {
4797
- "version": "4.12.14",
4798
- "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.14.tgz",
4799
- "integrity": "sha512-am5zfg3yu6sqn5yjKBNqhnTX7Cv+m00ox+7jbaKkrLMRJ4rAdldd1xPd/JzbBWspqaQv6RSTrgFN95EsfhC+7w==",
4797
+ "version": "4.12.15",
4798
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.15.tgz",
4799
+ "integrity": "sha512-qM0jDhFEaCBb4TxoW7f53Qrpv9RBiayUHo0S52JudprkhvpjIrGoU1mnnr29Fvd1U335ZFPZQY1wlkqgfGXyLg==",
4800
4800
  "license": "MIT",
4801
4801
  "engines": {
4802
4802
  "node": ">=16.9.0"
@@ -8622,9 +8622,9 @@
8622
8622
  }
8623
8623
  },
8624
8624
  "node_modules/terser": {
8625
- "version": "5.46.1",
8626
- "resolved": "https://registry.npmjs.org/terser/-/terser-5.46.1.tgz",
8627
- "integrity": "sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ==",
8625
+ "version": "5.46.2",
8626
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.46.2.tgz",
8627
+ "integrity": "sha512-uxfo9fPcSgLDYob/w1FuL0c99MWiJDnv+5qXSQc5+Ki5NjVNsYi66INnMFBjf6uFz6OnX12piJQPF4IpjJTNTw==",
8628
8628
  "license": "BSD-2-Clause",
8629
8629
  "peer": true,
8630
8630
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.440",
3
+ "version": "0.187.441",
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",