agentvibes 5.6.8 → 5.7.0

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 (128) hide show
  1. package/.agentvibes/config.json +2 -0
  2. package/.claude/commands/agent-vibes-bmad-voices.md +117 -117
  3. package/.claude/commands/agent-vibes-rdp.md +24 -24
  4. package/.claude/config/audio-effects.cfg +2 -2
  5. package/.claude/config/background-music-position.txt +0 -1
  6. package/.claude/docs/TERMUX_SETUP.md +408 -408
  7. package/.claude/github-star-reminder.txt +1 -1
  8. package/.claude/hooks/audio-cache-utils.sh +0 -0
  9. package/.claude/hooks/audio-processor.sh +0 -0
  10. package/.claude/hooks/background-music-manager.sh +0 -0
  11. package/.claude/hooks/bmad-party-manager.sh +225 -0
  12. package/.claude/hooks/bmad-party-speak.sh +0 -0
  13. package/.claude/hooks/bmad-speak-enhanced.sh +0 -0
  14. package/.claude/hooks/bmad-speak.sh +0 -0
  15. package/.claude/hooks/bmad-tts-injector.sh +49 -21
  16. package/.claude/hooks/bmad-voice-manager.sh +0 -0
  17. package/.claude/hooks/clawdbot-receiver-SECURE.sh +0 -0
  18. package/.claude/hooks/clawdbot-receiver.sh +0 -0
  19. package/.claude/hooks/clean-audio-cache.sh +0 -0
  20. package/.claude/hooks/cleanup-cache.sh +0 -0
  21. package/.claude/hooks/configure-rdp-mode.sh +0 -0
  22. package/.claude/hooks/download-extra-voices.sh +0 -0
  23. package/.claude/hooks/effects-manager.sh +0 -0
  24. package/.claude/hooks/github-star-reminder.sh +0 -0
  25. package/.claude/hooks/language-manager.sh +0 -0
  26. package/.claude/hooks/learn-manager.sh +0 -0
  27. package/.claude/hooks/macos-voice-manager.sh +0 -0
  28. package/.claude/hooks/migrate-background-music.sh +0 -0
  29. package/.claude/hooks/migrate-to-agentvibes.sh +0 -0
  30. package/.claude/hooks/optimize-background-music.sh +0 -0
  31. package/.claude/hooks/path-resolver.sh +0 -0
  32. package/.claude/hooks/personality-manager.sh +0 -0
  33. package/.claude/hooks/piper-download-voices.sh +0 -0
  34. package/.claude/hooks/piper-installer.sh +0 -0
  35. package/.claude/hooks/piper-multispeaker-registry.sh +0 -0
  36. package/.claude/hooks/piper-voice-manager.sh +0 -0
  37. package/.claude/hooks/play-tts-agentvibes-receiver-for-voiceless-connections.sh +0 -0
  38. package/.claude/hooks/play-tts-enhanced.sh +0 -0
  39. package/.claude/hooks/play-tts-macos.sh +0 -0
  40. package/.claude/hooks/play-tts-piper.sh +1 -1
  41. package/.claude/hooks/play-tts-soprano.sh +0 -0
  42. package/.claude/hooks/play-tts-ssh-remote.sh +0 -0
  43. package/.claude/hooks/play-tts-termux-ssh.sh +0 -0
  44. package/.claude/hooks/play-tts-windows-receiver.sh +0 -0
  45. package/.claude/hooks/play-tts.sh +4 -0
  46. package/.claude/hooks/prepare-release.sh +0 -0
  47. package/.claude/hooks/provider-commands.sh +16 -4
  48. package/.claude/hooks/provider-manager.sh +38 -0
  49. package/.claude/hooks/replay-target-audio.sh +0 -0
  50. package/.claude/hooks/sentiment-manager.sh +0 -0
  51. package/.claude/hooks/session-start-tts.sh +0 -0
  52. package/.claude/hooks/soprano-gradio-synth.py +0 -0
  53. package/.claude/hooks/speed-manager.sh +0 -0
  54. package/.claude/hooks/stop-tts.sh +0 -0
  55. package/.claude/hooks/stop.sh +38 -0
  56. package/.claude/hooks/termux-installer.sh +0 -0
  57. package/.claude/hooks/translate-manager.sh +0 -0
  58. package/.claude/hooks/translator.py +0 -0
  59. package/.claude/hooks/tts-queue-worker.sh +0 -0
  60. package/.claude/hooks/tts-queue.sh +0 -0
  61. package/.claude/hooks/verbosity-manager.sh +0 -0
  62. package/.claude/hooks/voice-manager.sh +50 -2
  63. package/.claude/hooks-windows/audio-cache-utils.ps1 +119 -119
  64. package/.claude/hooks-windows/play-tts.ps1 +34 -1
  65. package/.claude/hooks-windows/tts-watcher.ps1 +122 -0
  66. package/.claude/piper-voices-dir.txt +1 -0
  67. package/.clawdbot/README.md +105 -105
  68. package/.mcp.json +14 -5
  69. package/README.md +10 -2
  70. package/RELEASE_NOTES.md +61 -0
  71. package/WINDOWS-SETUP.md +208 -208
  72. package/bin/agent-vibes +39 -39
  73. package/bin/agentvibes-voice-browser.js +59 -4
  74. package/bin/agentvibes.js +0 -0
  75. package/bin/mcp-server.js +121 -121
  76. package/bin/mcp-server.sh +0 -0
  77. package/bin/test-bmad-pr +78 -78
  78. package/mcp-server/QUICK_START.md +203 -203
  79. package/mcp-server/README.md +345 -345
  80. package/mcp-server/WINDOWS_SETUP.md +260 -260
  81. package/mcp-server/docs/troubleshooting-audio.md +313 -313
  82. package/mcp-server/examples/claude_desktop_config.json +11 -11
  83. package/mcp-server/examples/claude_desktop_config_piper.json +9 -9
  84. package/mcp-server/examples/custom_instructions.md +169 -169
  85. package/mcp-server/install-deps.js +177 -130
  86. package/mcp-server/server.py +1797 -1787
  87. package/mcp-server/test_server.py +0 -0
  88. package/package.json +1 -1
  89. package/src/bmad-detector.js +85 -71
  90. package/src/cli/list-personalities.js +110 -110
  91. package/src/cli/list-voices.js +114 -114
  92. package/src/commands/bmad-voices.js +394 -394
  93. package/src/commands/install-mcp.js +476 -476
  94. package/src/console/brand-colors.js +13 -13
  95. package/src/console/constants/personalities.js +44 -44
  96. package/src/console/tabs/help-tab.js +314 -314
  97. package/src/console/tabs/music-tab.js +18 -2
  98. package/src/console/tabs/readme-tab.js +272 -272
  99. package/src/console/widgets/destroy-list.js +25 -25
  100. package/src/console/widgets/notice.js +55 -55
  101. package/src/console/widgets/personality-picker.js +213 -213
  102. package/src/i18n/de.js +202 -202
  103. package/src/i18n/es.js +202 -202
  104. package/src/i18n/fr.js +202 -202
  105. package/src/i18n/hi.js +202 -202
  106. package/src/i18n/ja.js +202 -202
  107. package/src/i18n/ko.js +202 -202
  108. package/src/i18n/pt.js +202 -202
  109. package/src/i18n/strings.js +54 -54
  110. package/src/i18n/zh-CN.js +202 -202
  111. package/src/installer/language-screen.js +31 -31
  112. package/src/installer/music-file-input.js +304 -304
  113. package/src/installer.js +70 -7
  114. package/src/services/agent-voice-store.js +59 -12
  115. package/src/services/config-service.js +264 -264
  116. package/src/services/language-service.js +47 -47
  117. package/src/services/provider-service.js +143 -143
  118. package/src/utils/audio-duration-validator.js +298 -298
  119. package/src/utils/audio-format-validator.js +277 -277
  120. package/src/utils/dependency-checker.js +469 -469
  121. package/src/utils/file-ownership-verifier.js +358 -358
  122. package/src/utils/list-formatter.js +194 -194
  123. package/src/utils/music-file-validator.js +285 -285
  124. package/src/utils/preview-list-prompt.js +136 -136
  125. package/src/utils/secure-music-storage.js +412 -412
  126. package/templates/agentvibes-receiver.sh +0 -0
  127. package/templates/audio/welcome-music.mp3 +0 -0
  128. package/.claude/hooks/play-tts-agentvibes-receiver.sh +0 -1
@@ -1 +1 @@
1
- 20260509
1
+ 20260511
File without changes
File without changes
File without changes
@@ -0,0 +1,225 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # File: .claude/hooks/bmad-party-manager.sh
4
+ #
5
+ # AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
6
+ # Website: https://agentvibes.org
7
+ # Repository: https://github.com/paulpreibisch/AgentVibes
8
+ #
9
+ # Co-created by Paul Preibisch with Claude AI
10
+ # Copyright (c) 2025 Paul Preibisch
11
+ #
12
+ # Licensed under the Apache License, Version 2.0 (the "License");
13
+ # you may not use this file except in compliance with the License.
14
+ # You may obtain a copy of the License at
15
+ #
16
+ # http://www.apache.org/licenses/LICENSE-2.0
17
+ #
18
+ # Unless required by applicable law or agreed to in writing, software
19
+ # distributed under the License is distributed on an "AS IS" BASIS,
20
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ # See the License for the specific language governing permissions and
22
+ # limitations under the License.
23
+ #
24
+ # DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ # express or implied, including but not limited to the warranties of
26
+ # merchantability, fitness for a particular purpose and noninfringement.
27
+ # In no event shall the authors or copyright holders be liable for any claim,
28
+ # damages or other liability, whether in an action of contract, tort or
29
+ # otherwise, arising from, out of or in connection with the software or the
30
+ # use or other dealings in the software.
31
+ #
32
+ # ---
33
+ #
34
+ # @fileoverview BMAD Party Mode Voice Integration Manager
35
+ # @context Controls auto-enable/disable of multi-agent voice switching during BMAD party mode
36
+ # @architecture Opt-out flag management, auto-detection, status reporting
37
+ # @dependencies .bmad/_cfg/agent-manifest.csv, bmad-voices-enabled.flag, user-prompt-output.sh
38
+ # @entrypoints /agent-vibes:bmad-party slash command
39
+ # @patterns Auto-enable with opt-out, graceful degradation, feature detection
40
+ # @related user-prompt-output.sh, bmad-voice-manager.sh, Issue #33
41
+
42
+ # Fix locale warnings
43
+ export LC_ALL=C
44
+
45
+ PLUGIN_DIR=".claude/plugins"
46
+ DISABLE_FLAG="$PLUGIN_DIR/bmad-party-mode-disabled.flag"
47
+ BMAD_VOICES_FLAG="$PLUGIN_DIR/bmad-voices-enabled.flag"
48
+ BMAD_MANIFEST=".bmad/_cfg/agent-manifest.csv"
49
+
50
+ # Colors
51
+ GREEN='\033[0;32m'
52
+ YELLOW='\033[1;33m'
53
+ RED='\033[0;31m'
54
+ CYAN='\033[0;36m'
55
+ GRAY='\033[0;90m'
56
+ NC='\033[0m' # No Color
57
+
58
+ #
59
+ # @function is_bmad_installed
60
+ # @context Check if BMAD v6 is installed
61
+ # @returns 0=installed, 1=not installed
62
+ #
63
+ is_bmad_installed() {
64
+ [[ -f "$BMAD_MANIFEST" ]]
65
+ }
66
+
67
+ #
68
+ # @function is_bmad_voices_enabled
69
+ # @context Check if BMAD voice plugin is enabled
70
+ # @returns 0=enabled, 1=disabled
71
+ #
72
+ is_bmad_voices_enabled() {
73
+ [[ -f "$BMAD_VOICES_FLAG" ]]
74
+ }
75
+
76
+ #
77
+ # @function is_party_mode_enabled
78
+ # @context Check if party mode voice integration is enabled
79
+ # @returns 0=enabled, 1=disabled
80
+ #
81
+ is_party_mode_enabled() {
82
+ # Disabled if opt-out flag exists
83
+ [[ -f "$DISABLE_FLAG" ]] && return 1
84
+
85
+ # Enabled if BMAD + voice plugin active
86
+ is_bmad_installed && is_bmad_voices_enabled
87
+ }
88
+
89
+ #
90
+ # @function show_status
91
+ # @context Display current party mode voice integration status
92
+ #
93
+ show_status() {
94
+ echo -e "${CYAN}🎭 BMAD Party Mode Voice Integration${NC}"
95
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
96
+ echo ""
97
+
98
+ # Check BMAD installation
99
+ if ! is_bmad_installed; then
100
+ echo -e "${RED}❌ BMAD not installed${NC}"
101
+ echo -e "${GRAY} Party mode voice integration requires BMAD v6${NC}"
102
+ echo -e "${GRAY} Install: https://github.com/bmad-method/bmad${NC}"
103
+ echo ""
104
+ return 1
105
+ fi
106
+
107
+ echo -e "${GREEN}✅ BMAD v6 detected${NC}"
108
+
109
+ # Check voice plugin
110
+ if ! is_bmad_voices_enabled; then
111
+ echo -e "${RED}❌ BMAD voice plugin disabled${NC}"
112
+ echo -e "${GRAY} Enable: /agent-vibes:bmad enable${NC}"
113
+ echo ""
114
+ return 1
115
+ fi
116
+
117
+ echo -e "${GREEN}✅ BMAD voice plugin enabled${NC}"
118
+
119
+ # Check party mode status
120
+ if is_party_mode_enabled; then
121
+ echo -e "${GREEN}✅ Party mode voices: ENABLED${NC}"
122
+ echo ""
123
+ echo -e "${CYAN}How it works:${NC}"
124
+ echo " When you run /bmad:core:workflows:party-mode,"
125
+ echo " each agent speaks with their unique voice:"
126
+ echo ""
127
+ echo " 🏗️ Winston (Architect) → Michael"
128
+ echo " 📋 John (PM) → Jessica Anne Bogart"
129
+ echo " 💻 Amelia (Dev) → Matthew Schmitz"
130
+ echo " 📊 Mary (Analyst) → kristin"
131
+ echo " ... and more!"
132
+ echo ""
133
+ echo -e "${GRAY}Disable with: /agent-vibes:bmad-party disable${NC}"
134
+ else
135
+ echo -e "${YELLOW}⚠️ Party mode voices: DISABLED (opt-out active)${NC}"
136
+ echo ""
137
+ echo -e "${GRAY}Enable with: /agent-vibes:bmad-party enable${NC}"
138
+ fi
139
+
140
+ echo ""
141
+ }
142
+
143
+ #
144
+ # @function enable_party_mode
145
+ # @context Enable party mode voice integration (remove opt-out flag)
146
+ #
147
+ enable_party_mode() {
148
+ # Verify prerequisites
149
+ if ! is_bmad_installed; then
150
+ echo -e "${RED}❌ Cannot enable: BMAD not installed${NC}"
151
+ echo -e "${GRAY} Install BMAD v6 first${NC}"
152
+ return 1
153
+ fi
154
+
155
+ if ! is_bmad_voices_enabled; then
156
+ echo -e "${RED}❌ Cannot enable: BMAD voice plugin disabled${NC}"
157
+ echo -e "${GRAY} Enable with: /agent-vibes:bmad enable${NC}"
158
+ return 1
159
+ fi
160
+
161
+ # Remove opt-out flag if it exists
162
+ if [[ -f "$DISABLE_FLAG" ]]; then
163
+ rm -f "$DISABLE_FLAG"
164
+ echo -e "${GREEN}✅ Party mode voices enabled${NC}"
165
+ echo ""
166
+ echo -e "${CYAN}🎭 Multi-agent voice switching activated!${NC}"
167
+ echo " Run /bmad:core:workflows:party-mode to hear agents speak"
168
+ else
169
+ echo -e "${GREEN}✅ Party mode voices already enabled${NC}"
170
+ echo ""
171
+ echo -e "${GRAY}(Auto-enabled when BMAD detected)${NC}"
172
+ fi
173
+
174
+ echo ""
175
+ }
176
+
177
+ #
178
+ # @function disable_party_mode
179
+ # @context Disable party mode voice integration (create opt-out flag)
180
+ #
181
+ disable_party_mode() {
182
+ mkdir -p "$PLUGIN_DIR"
183
+
184
+ if [[ -f "$DISABLE_FLAG" ]]; then
185
+ echo -e "${YELLOW}⚠️ Party mode voices already disabled${NC}"
186
+ return 0
187
+ fi
188
+
189
+ # Create opt-out flag
190
+ touch "$DISABLE_FLAG"
191
+
192
+ echo -e "${GREEN}✅ Party mode voices disabled${NC}"
193
+ echo ""
194
+ echo -e "${GRAY}Party mode will continue to work, but agents won't speak${NC}"
195
+ echo -e "${GRAY}Enable again with: /agent-vibes:bmad-party enable${NC}"
196
+ echo ""
197
+ }
198
+
199
+ # Main command dispatcher
200
+ case "${1:-status}" in
201
+ enable)
202
+ enable_party_mode
203
+ ;;
204
+ disable)
205
+ disable_party_mode
206
+ ;;
207
+ status)
208
+ show_status
209
+ ;;
210
+ *)
211
+ echo -e "${CYAN}AgentVibes BMAD Party Mode Manager${NC}"
212
+ echo ""
213
+ echo "Usage: bmad-party-manager.sh {enable|disable|status}"
214
+ echo ""
215
+ echo "Commands:"
216
+ echo " enable Enable party mode voice integration"
217
+ echo " disable Disable party mode voice integration (opt-out)"
218
+ echo " status Show current status and configuration"
219
+ echo ""
220
+ echo "Party Mode Voice Integration:"
221
+ echo " • Auto-enabled when BMAD v6 detected"
222
+ echo " • Each agent speaks with unique voice during party mode"
223
+ echo " • Opt-out available via disable command"
224
+ ;;
225
+ esac
File without changes
File without changes
File without changes
@@ -49,7 +49,7 @@ GRAY='\033[0;90m'
49
49
  NC='\033[0m' # No Color
50
50
 
51
51
  # Detect BMAD installation and version
52
- # Supports both v4 (.bmad-core/) and v6-alpha (.bmad/) installations
52
+ # Supports both v4 (.bmad-core/) and v6-alpha (.bmad/, _bmad/) installations
53
53
  detect_bmad() {
54
54
  local bmad_core_dir=""
55
55
 
@@ -58,6 +58,11 @@ detect_bmad() {
58
58
  bmad_core_dir=".bmad"
59
59
  elif [[ -d "../.bmad" ]]; then
60
60
  bmad_core_dir="../.bmad"
61
+ # Check for _bmad (current BMAD installer default — underscore prefix, project-local)
62
+ elif [[ -d "_bmad" ]]; then
63
+ bmad_core_dir="_bmad"
64
+ elif [[ -d "../_bmad" ]]; then
65
+ bmad_core_dir="../_bmad"
61
66
  # Check for v6-alpha without dot (legacy naming)
62
67
  elif [[ -d "bmad" ]]; then
63
68
  bmad_core_dir="bmad"
@@ -73,6 +78,11 @@ detect_bmad() {
73
78
  bmad_core_dir="bmad-core"
74
79
  elif [[ -d "../bmad-core" ]]; then
75
80
  bmad_core_dir="../bmad-core"
81
+ # Check home-dir global BMAD install (~/_bmad is the default for standalone BMAD installs)
82
+ elif [[ -d "$HOME/_bmad" ]]; then
83
+ bmad_core_dir="$HOME/_bmad"
84
+ elif [[ -d "$HOME/.bmad" ]]; then
85
+ bmad_core_dir="$HOME/.bmad"
76
86
  else
77
87
  echo -e "${RED}❌ BMAD installation not found${NC}" >&2
78
88
  echo -e "${GRAY} Looked for bmad/, .bmad-core/, or bmad-core/ directory${NC}" >&2
@@ -85,21 +95,34 @@ detect_bmad() {
85
95
  # Find all BMAD agents
86
96
  find_agents() {
87
97
  local bmad_core="$1"
88
- local agents_dir=""
98
+ local found=0
99
+
100
+ # v6.6+: agents under .claude/skills/*/agents/ (new BMAD structure)
101
+ local skills_dir=".claude/skills"
102
+ if [[ -d "$skills_dir" ]]; then
103
+ while IFS= read -r -d '' agent_file; do
104
+ echo "$agent_file"
105
+ found=1
106
+ done < <(find "$skills_dir" -path "*/agents/*.md" -type f -print0 2>/dev/null)
107
+ fi
89
108
 
90
- # Check for v6-alpha structure (bmad/bmm/agents/)
109
+ # v6.x: bmad/bmm/agents/
91
110
  if [[ -d "$bmad_core/bmm/agents" ]]; then
92
- agents_dir="$bmad_core/bmm/agents"
93
- # Check for v4 structure (.bmad-core/agents/)
94
- elif [[ -d "$bmad_core/agents" ]]; then
95
- agents_dir="$bmad_core/agents"
96
- else
111
+ find "$bmad_core/bmm/agents" -name "*.md" -type f
112
+ found=1
113
+ fi
114
+
115
+ # v4: .bmad-core/agents/
116
+ if [[ -d "$bmad_core/agents" ]]; then
117
+ find "$bmad_core/agents" -name "*.md" -type f
118
+ found=1
119
+ fi
120
+
121
+ if [[ $found -eq 0 ]]; then
97
122
  echo -e "${RED}❌ Agents directory not found in $bmad_core${NC}" >&2
98
- echo -e "${GRAY} Tried: $bmad_core/bmm/agents/ and $bmad_core/agents/${NC}" >&2
123
+ echo -e "${GRAY} Tried: $bmad_core/bmm/agents/, $bmad_core/agents/, .claude/skills/*/agents/${NC}" >&2
99
124
  return 1
100
125
  fi
101
-
102
- find "$agents_dir" -name "*.md" -type f
103
126
  }
104
127
 
105
128
  # Check if agent has TTS injection
@@ -217,6 +240,15 @@ inject_tts() {
217
240
  return 0
218
241
  fi
219
242
 
243
+ # Detect format BEFORE creating backups — skip v6.6+ plain Markdown agents (no activation section)
244
+ local is_v6=false
245
+ if grep -q "<activation" "$agent_file"; then
246
+ is_v6=true
247
+ elif ! grep -q "activation-instructions:" "$agent_file"; then
248
+ echo -e "${GRAY} ℹ️ Skipped (v6.6+ format): $(basename "$agent_file")${NC}"
249
+ return 2
250
+ fi
251
+
220
252
  # Create backup directory for centralized timestamped backups
221
253
  local backup_dir=".agentvibes/backups/agents"
222
254
  mkdir -p "$backup_dir"
@@ -231,15 +263,6 @@ inject_tts() {
231
263
 
232
264
  echo -e "${GRAY} 📦 Backup saved: $backup_dir/$backup_name${NC}"
233
265
 
234
- # Detect v4 vs v6 structure
235
- local is_v6=false
236
- if grep -q "<activation" "$agent_file"; then
237
- is_v6=true
238
- elif ! grep -q "activation-instructions:" "$agent_file"; then
239
- echo -e "${RED}❌ No activation section found in: $(basename "$agent_file")${NC}"
240
- return 1
241
- fi
242
-
243
266
  # Create TTS injection script based on version
244
267
  if [[ "$is_v6" == "true" ]]; then
245
268
  # v6 format: XML-style with <step n="4.5">
@@ -411,6 +434,7 @@ enable_all() {
411
434
  local agents=$(find_agents "$bmad_core")
412
435
  local success_count=0
413
436
  local skip_count=0
437
+ local format_skip_count=0
414
438
  local fail_count=0
415
439
 
416
440
  # Track modified files and backups for summary
@@ -423,7 +447,10 @@ enable_all() {
423
447
  continue
424
448
  fi
425
449
 
426
- if inject_tts "$agent_file"; then
450
+ inject_tts "$agent_file" && local inject_result=0 || local inject_result=$?
451
+ if [[ $inject_result -eq 2 ]]; then
452
+ format_skip_count=$((format_skip_count + 1))
453
+ elif [[ $inject_result -eq 0 ]]; then
427
454
  success_count=$((success_count + 1))
428
455
  modified_files+=("$agent_file")
429
456
  # Track the backup file that was created
@@ -444,6 +471,7 @@ enable_all() {
444
471
  # Show results
445
472
  echo -e "${GREEN}✅ Successfully modified: $success_count agents${NC}"
446
473
  [[ $skip_count -gt 0 ]] && echo -e "${YELLOW}⏭️ Skipped (already enabled): $skip_count agents${NC}"
474
+ [[ $format_skip_count -gt 0 ]] && echo -e "${GRAY} ℹ️ Skipped (v6.6+ format, not supported): $format_skip_count agents${NC}"
447
475
  [[ $fail_count -gt 0 ]] && echo -e "${RED}❌ Failed: $fail_count agents${NC}"
448
476
  echo ""
449
477
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -468,7 +468,7 @@ if [[ -f "$SCRIPT_DIR/audio-processor.sh" ]]; then
468
468
  # audio-processor.sh returns: FILE_PATH|BACKGROUND_FILE
469
469
  # Lookup order: LLM key (from --llm) → default
470
470
  _AGENT_KEY="${AGENTVIBES_LLM_KEY:-default}"
471
- PROCESSOR_OUTPUT=$("$SCRIPT_DIR/audio-processor.sh" "$TEMP_FILE" "$_AGENT_KEY" "$PROCESSED_FILE" "$AGENT_PROFILE_FILE" 2>/dev/null) || {
471
+ PROCESSOR_OUTPUT=$(bash "$SCRIPT_DIR/audio-processor.sh" "$TEMP_FILE" "$_AGENT_KEY" "$PROCESSED_FILE" "$AGENT_PROFILE_FILE" 2>/dev/null) || {
472
472
  echo "Warning: Audio processing failed, using unprocessed audio" >&2
473
473
  PROCESSED_FILE="$TEMP_FILE"
474
474
  PROCESSOR_OUTPUT="$TEMP_FILE|"
File without changes
File without changes
File without changes
File without changes
@@ -203,6 +203,10 @@ if [[ -n "$LLM_PROVIDER" ]]; then
203
203
  fi
204
204
  # Export LLM key for child scripts (process-local, not system-wide)
205
205
  export AGENTVIBES_LLM_KEY="llm:${LLM_PROVIDER}"
206
+ # Emit routing info when verbose debugging is enabled (used by tests and diagnostics)
207
+ if [[ "${AGENTVIBES_VERBOSE:-0}" == "1" ]]; then
208
+ echo "llm=${LLM_PROVIDER}" >&2
209
+ fi
206
210
  fi
207
211
 
208
212
  # Prepend intro text (pretext) if configured
File without changes
@@ -449,6 +449,14 @@ provider_preview() {
449
449
  echo "🎤 Voice Preview ($current_provider)"
450
450
  echo ""
451
451
 
452
+ # Detect routing LLM so preview audio reaches SSH/remote receivers
453
+ # (without --llm, play-tts.sh plays locally on headless servers instead of
454
+ # forwarding to the configured Windows/remote receiver)
455
+ local _preview_llm _preview_llm_args
456
+ _preview_llm=$(detect_routing_llm 2>/dev/null || echo "")
457
+ _preview_llm_args=()
458
+ [[ -n "$_preview_llm" ]] && _preview_llm_args=(--llm "$_preview_llm")
459
+
452
460
  case "$current_provider" in
453
461
  piper)
454
462
  # Use the Piper voice manager's list functionality
@@ -468,7 +476,8 @@ provider_preview() {
468
476
  if verify_voice "$voice_arg"; then
469
477
  echo "🎤 Previewing Piper voice: $voice_arg"
470
478
  echo ""
471
- "$SCRIPT_DIR/play-tts.sh" "Hello, this is the $voice_arg voice. How do you like it?" "$voice_arg"
479
+ "$SCRIPT_DIR/play-tts.sh" "Hello, this is the $voice_arg voice. How do you like it?" \
480
+ "$voice_arg" "${_preview_llm_args[@]+"${_preview_llm_args[@]}"}"
472
481
  else
473
482
  echo "❌ Voice model not found: $voice_arg"
474
483
  echo ""
@@ -506,7 +515,8 @@ provider_preview() {
506
515
  local display_name="${voice_entry##*:}"
507
516
 
508
517
  echo "🔊 ${display_name}..."
509
- "$SCRIPT_DIR/play-tts.sh" "Hi, my name is ${display_name}" "$voice_name"
518
+ "$SCRIPT_DIR/play-tts.sh" "Hi, my name is ${display_name}" \
519
+ "$voice_name" "${_preview_llm_args[@]+"${_preview_llm_args[@]}"}"
510
520
 
511
521
  # Wait for the voice to finish playing before starting next one
512
522
  sleep 3
@@ -532,7 +542,8 @@ provider_preview() {
532
542
  if say -v ? 2>/dev/null | grep -qi "^${voice_arg} "; then
533
543
  echo "🎤 Previewing macOS voice: $voice_arg"
534
544
  echo ""
535
- "$SCRIPT_DIR/play-tts.sh" "Hello, this is ${voice_arg}. How do you like my voice?" "$voice_arg"
545
+ "$SCRIPT_DIR/play-tts.sh" "Hello, this is ${voice_arg}. How do you like my voice?" \
546
+ "$voice_arg" "${_preview_llm_args[@]+"${_preview_llm_args[@]}"}"
536
547
  else
537
548
  echo "❌ Voice not found: $voice_arg"
538
549
  echo ""
@@ -554,7 +565,8 @@ provider_preview() {
554
565
  for voice in "${sample_voices[@]}"; do
555
566
  if say -v ? 2>/dev/null | grep -qi "^${voice} "; then
556
567
  echo "🔊 ${voice}..."
557
- "$SCRIPT_DIR/play-tts.sh" "Hi, my name is ${voice}" "$voice"
568
+ "$SCRIPT_DIR/play-tts.sh" "Hi, my name is ${voice}" \
569
+ "$voice" "${_preview_llm_args[@]+"${_preview_llm_args[@]}"}"
558
570
  sleep 3
559
571
  fi
560
572
  done
@@ -356,6 +356,44 @@ get_provider_script_path() {
356
356
  echo "$provider_script"
357
357
  }
358
358
 
359
+ # @function detect_routing_llm
360
+ # @intent Detect the LLM name to use for SSH/remote routing in preview and sample commands
361
+ # @why preview/sample call play-tts.sh without --llm, so SSH routing is skipped and audio
362
+ # plays locally (no sound on headless servers). Detecting the remote LLM and passing
363
+ # --llm mirrors normal hook behaviour so audio reaches the configured receiver.
364
+ # @returns Echoes LLM name (e.g. "claude-code") or empty string if no remote routing configured
365
+ # @exitcode 0=always
366
+ detect_routing_llm() {
367
+ # Priority 1: AGENTVIBES_LLM_KEY env var (set during active TTS sessions)
368
+ if [[ -n "${AGENTVIBES_LLM_KEY:-}" ]] && [[ "$AGENTVIBES_LLM_KEY" =~ ^llm:([a-zA-Z0-9][a-zA-Z0-9_-]*)$ ]]; then
369
+ echo "${BASH_REMATCH[1]}"
370
+ return 0
371
+ fi
372
+
373
+ # Priority 2: First mode=remote entry in transport-config.json
374
+ local _transport_cfg="$HOME/.agentvibes/transport-config.json"
375
+ if [[ -f "$_transport_cfg" ]] && command -v python3 &>/dev/null; then
376
+ local _remote_llm
377
+ _remote_llm=$(AGENTVIBES_CFG="$_transport_cfg" python3 - <<'PYEOF'
378
+ import json, os, sys
379
+ try:
380
+ d = json.load(open(os.environ['AGENTVIBES_CFG'], encoding='utf-8'))
381
+ hits = [k for k, v in d.items() if isinstance(v, dict) and v.get('mode') == 'remote']
382
+ print(hits[0] if hits else '')
383
+ except Exception:
384
+ print('')
385
+ PYEOF
386
+ )
387
+ # Validate the key is a safe LLM name before returning
388
+ if [[ -n "$_remote_llm" ]] && [[ "$_remote_llm" =~ ^[a-zA-Z0-9][a-zA-Z0-9_-]*$ ]]; then
389
+ echo "$_remote_llm"
390
+ return 0
391
+ fi
392
+ fi
393
+
394
+ echo ""
395
+ }
396
+
359
397
  # AI NOTE: This file provides the core abstraction layer for multi-provider TTS.
360
398
  # All provider state is managed through simple text files for simplicity and reliability.
361
399
  # Project-local configuration takes precedence over global to support per-project providers.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # File: .claude/hooks/stop.sh
4
+ #
5
+ # AgentVibes Stop Hook - Wrapper that delegates to .agentvibes/
6
+ # This hook runs in LITE mode to extract and speak "Audio Summary:" markers
7
+ #
8
+
9
+ # Fix locale warnings
10
+ export LC_ALL=C
11
+
12
+ # Get script directory
13
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
+ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
15
+
16
+ # Path to mode configuration
17
+ MODE_FILE="$PROJECT_ROOT/.agentvibes/config/mode.txt"
18
+
19
+ # Check if AgentVibes is installed
20
+ AGENTVIBES_HOOKS="$PROJECT_ROOT/.agentvibes/hooks"
21
+ if [[ ! -d "$AGENTVIBES_HOOKS" ]]; then
22
+ # AgentVibes not installed, exit silently
23
+ exit 0
24
+ fi
25
+
26
+ # Read current mode (default to full if not set)
27
+ CURRENT_MODE="full"
28
+ if [[ -f "$MODE_FILE" ]]; then
29
+ CURRENT_MODE=$(cat "$MODE_FILE" 2>/dev/null | tr -d '[:space:]')
30
+ fi
31
+
32
+ # Only run stop hook in LITE mode
33
+ # (Full mode uses tool calls for TTS, not stop hooks)
34
+ if [[ "$CURRENT_MODE" == "lite" ]]; then
35
+ if [[ -f "$AGENTVIBES_HOOKS/stop-lite.sh" ]]; then
36
+ bash "$AGENTVIBES_HOOKS/stop-lite.sh" "$@"
37
+ fi
38
+ fi
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes