open-agents-ai 0.187.254 → 0.187.255

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 +45 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -299450,6 +299450,7 @@ var init_voice = __esm({
299450
299450
  * - "action": only narrate tool calls/results (current default behavior)
299451
299451
  * - "chat": only speak streamed model text responses (normal pitch/volume)
299452
299452
  * - "verbose": both chat + action (chat at normal tone, actions at subordinate volume)
299453
+ * - "voicechat": live mic + TTS conversation via sub agent (no tool narration)
299453
299454
  */
299454
299455
  voiceMode = "action";
299455
299456
  /**
@@ -302916,20 +302917,35 @@ async function handleSlashCommand(input, ctx3) {
302916
302917
  }
302917
302918
  if (arg.startsWith("mode")) {
302918
302919
  const modeArg = arg.replace(/^mode\s*/, "").trim().toLowerCase();
302919
- if (modeArg === "chat" || modeArg === "action" || modeArg === "verbose") {
302920
+ if (modeArg === "chat" || modeArg === "action" || modeArg === "verbose" || modeArg === "voicechat") {
302920
302921
  ctx3.voiceSetMode?.(modeArg);
302921
302922
  save2({ voiceMode: modeArg });
302923
+ if (modeArg === "voicechat" && ctx3.voiceChatStart && !ctx3.isVoiceChatActive?.()) {
302924
+ try {
302925
+ await ctx3.voiceChatStart();
302926
+ } catch (err) {
302927
+ renderWarning(`Voice chat mic failed: ${err instanceof Error ? err.message : String(err)}`);
302928
+ }
302929
+ }
302930
+ if (modeArg !== "voicechat" && ctx3.isVoiceChatActive?.()) {
302931
+ try {
302932
+ await ctx3.voiceChatStop?.();
302933
+ } catch {
302934
+ }
302935
+ }
302922
302936
  const modeDesc = {
302923
302937
  chat: "chat — speaks model responses only",
302924
302938
  action: "action — speaks tool call narrations only",
302925
- verbose: "verbose — speaks both model responses and tool narrations"
302939
+ verbose: "verbose — speaks both model responses and tool narrations",
302940
+ voicechat: "voicechat — live mic + TTS conversation via sub agent"
302926
302941
  };
302927
302942
  renderInfo(`Voice mode: ${modeDesc[modeArg]}${hasLocal ? " (project-local)" : ""}`);
302928
302943
  } else {
302929
- renderInfo("Usage: /voice mode <chat|action|verbose>");
302930
- renderInfo(" chat — speaks streamed model text responses at normal pitch");
302931
- renderInfo(" action — speaks tool call descriptions with emotion-modulated pitch");
302932
- renderInfo(" verbose — speaks both (chat at normal tone, actions at variable pitch)");
302944
+ renderInfo("Usage: /voice mode <chat|action|verbose|voicechat>");
302945
+ renderInfo(" chat — speaks streamed model text responses at normal pitch");
302946
+ renderInfo(" action — speaks tool call descriptions with emotion-modulated pitch");
302947
+ renderInfo(" verbose — speaks both (chat at normal tone, actions at variable pitch)");
302948
+ renderInfo(" voicechat — live mic + TTS back-and-forth conversation");
302933
302949
  const current = ctx3.voiceGetMode?.() ?? "action";
302934
302950
  renderInfo(`Current mode: ${current}`);
302935
302951
  }
@@ -305105,7 +305121,8 @@ async function handleVoiceMenu(ctx3, save2, hasLocal) {
305105
305121
  const modeItems = [
305106
305122
  { key: "chat", label: "Chat", detail: "speaks streamed model text at normal pitch" },
305107
305123
  { key: "action", label: "Action", detail: "speaks tool call narrations with emotion pitch" },
305108
- { key: "verbose", label: "Verbose", detail: "speaks both chat and actions" }
305124
+ { key: "verbose", label: "Verbose", detail: "speaks both chat and actions" },
305125
+ { key: "voicechat", label: "Voice Chat", detail: "live mic + TTS conversation alongside agent" }
305109
305126
  ];
305110
305127
  const modeResult = await tuiSelect({
305111
305128
  items: modeItems,
@@ -305119,6 +305136,18 @@ async function handleVoiceMenu(ctx3, save2, hasLocal) {
305119
305136
  const mode = modeResult.key;
305120
305137
  ctx3.voiceSetMode?.(mode);
305121
305138
  save2({ voiceMode: mode });
305139
+ if (mode === "voicechat" && ctx3.voiceChatStart && !ctx3.isVoiceChatActive?.()) {
305140
+ try {
305141
+ await ctx3.voiceChatStart();
305142
+ } catch {
305143
+ }
305144
+ }
305145
+ if (mode !== "voicechat" && ctx3.isVoiceChatActive?.()) {
305146
+ try {
305147
+ await ctx3.voiceChatStop?.();
305148
+ } catch {
305149
+ }
305150
+ }
305122
305151
  }
305123
305152
  continue;
305124
305153
  }
@@ -327029,6 +327058,7 @@ var init_voicechat = __esm({
327029
327058
  silenceTimeout;
327030
327059
  onStatus;
327031
327060
  onUserSpeech;
327061
+ onPartialTranscript;
327032
327062
  onAgentSpeech;
327033
327063
  transcriptBuffer = "";
327034
327064
  silenceTimer = null;
@@ -327046,6 +327076,8 @@ var init_voicechat = __esm({
327046
327076
  });
327047
327077
  this.onUserSpeech = opts.onUserSpeech ?? (() => {
327048
327078
  });
327079
+ this.onPartialTranscript = opts.onPartialTranscript ?? (() => {
327080
+ });
327049
327081
  this.onAgentSpeech = opts.onAgentSpeech ?? (() => {
327050
327082
  });
327051
327083
  }
@@ -327065,6 +327097,7 @@ var init_voicechat = __esm({
327065
327097
  const { text, isFinal } = evt;
327066
327098
  if (!text?.trim()) return;
327067
327099
  this.transcriptBuffer = text.trim();
327100
+ this.onPartialTranscript(this.transcriptBuffer);
327068
327101
  if (this.silenceTimer) clearTimeout(this.silenceTimer);
327069
327102
  if (isFinal || this.silenceTimeout === 0) {
327070
327103
  this.submitTranscript();
@@ -331414,6 +331447,11 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
331414
331447
  onUserSpeech(text) {
331415
331448
  writeContent(() => renderInfo(`\x1B[38;5;45m[you]\x1B[0m ${text}`));
331416
331449
  },
331450
+ onPartialTranscript(text) {
331451
+ writeContent(() => {
331452
+ process.stdout.write(`\r\x1B[2K\x1B[38;5;243m [hearing] ${text.slice(0, 70)}\x1B[0m`);
331453
+ });
331454
+ },
331417
331455
  onAgentSpeech(text) {
331418
331456
  writeContent(() => renderInfo(`\x1B[38;5;178m[agent]\x1B[0m ${text.slice(0, 120)}`));
331419
331457
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.254",
3
+ "version": "0.187.255",
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",