@onereach/step-voice 7.0.42-VOIC1782.0 → 7.0.42

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.
@@ -258,12 +258,14 @@ class VoiceAgent extends voice_1.default {
258
258
  }
259
259
  if ('pre_tool_speech_phrases' in raw && raw.pre_tool_speech_phrases != null) {
260
260
  const phrases = raw.pre_tool_speech_phrases;
261
- if (Array.isArray(phrases) &&
262
- phrases.length >= 1 &&
263
- phrases.length <= 20 &&
264
- phrases.every((p) => typeof p === 'string' && p.trim().length > 0)) {
265
- result.pre_tool_speech_phrases = phrases;
261
+ if (!Array.isArray(phrases) ||
262
+ phrases.length < 1 ||
263
+ phrases.length > 20 ||
264
+ !phrases.every((p) => typeof p === 'string' && p.trim().length > 0)) {
265
+ this.log.warn(`Voice Agent: invalid feedback.pre_tool_speech_phrases for tool "${toolName}" — per-tool feedback excluded`);
266
+ return null;
266
267
  }
268
+ result.pre_tool_speech_phrases = phrases;
267
269
  }
268
270
  if ('tool_call_sound' in raw && raw.tool_call_sound != null) {
269
271
  const valid = ['typing', 'none'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.42-VOIC1782.0",
3
+ "version": "7.0.42",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",