agentvibes 5.1.4 → 5.2.1

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 (69) hide show
  1. package/.agentvibes/config.json +23 -13
  2. package/.claude/commands/agent-vibes/verbosity.md +98 -89
  3. package/.claude/config/audio-effects.cfg +4 -1
  4. package/.claude/hooks/audio-cache-utils.sh +246 -246
  5. package/.claude/hooks/background-music-manager.sh +404 -404
  6. package/.claude/hooks/bmad-speak-enhanced.sh +165 -165
  7. package/.claude/hooks/bmad-speak.sh +290 -290
  8. package/.claude/hooks/bmad-tts-injector.sh +568 -568
  9. package/.claude/hooks/bmad-voice-manager.sh +928 -928
  10. package/.claude/hooks/clawdbot-receiver-SECURE.sh +129 -129
  11. package/.claude/hooks/clawdbot-receiver.sh +107 -107
  12. package/.claude/hooks/clean-audio-cache.sh +22 -22
  13. package/.claude/hooks/cleanup-cache.sh +106 -106
  14. package/.claude/hooks/configure-rdp-mode.sh +137 -137
  15. package/.claude/hooks/download-extra-voices.sh +244 -244
  16. package/.claude/hooks/effects-manager.sh +268 -268
  17. package/.claude/hooks/github-star-reminder.sh +154 -154
  18. package/.claude/hooks/language-manager.sh +362 -362
  19. package/.claude/hooks/learn-manager.sh +492 -492
  20. package/.claude/hooks/macos-voice-manager.sh +205 -205
  21. package/.claude/hooks/migrate-background-music.sh +125 -125
  22. package/.claude/hooks/migrate-to-agentvibes.sh +161 -161
  23. package/.claude/hooks/optimize-background-music.sh +87 -87
  24. package/.claude/hooks/path-resolver.sh +60 -60
  25. package/.claude/hooks/personality-manager.sh +448 -448
  26. package/.claude/hooks/piper-download-voices.sh +233 -225
  27. package/.claude/hooks/piper-installer.sh +292 -292
  28. package/.claude/hooks/piper-multispeaker-registry.sh +171 -171
  29. package/.claude/hooks/piper-voice-manager.sh +125 -0
  30. package/.claude/hooks/play-tts-agentvibes-receiver-for-voiceless-connections.sh +97 -90
  31. package/.claude/hooks/play-tts-enhanced.sh +105 -105
  32. package/.claude/hooks/play-tts-piper.sh +16 -5
  33. package/.claude/hooks/play-tts-ssh-remote.sh +168 -167
  34. package/.claude/hooks/play-tts-termux-ssh.sh +169 -169
  35. package/.claude/hooks/play-tts.sh +35 -14
  36. package/.claude/hooks/prepare-release.sh +54 -54
  37. package/.claude/hooks/provider-commands.sh +617 -617
  38. package/.claude/hooks/provider-manager.sh +399 -399
  39. package/.claude/hooks/replay-target-audio.sh +95 -95
  40. package/.claude/hooks/sentiment-manager.sh +201 -201
  41. package/.claude/hooks/session-start-tts.sh +4 -1
  42. package/.claude/hooks/speed-manager.sh +291 -291
  43. package/.claude/hooks/stop-tts.sh +84 -84
  44. package/.claude/hooks/termux-installer.sh +261 -261
  45. package/.claude/hooks/translate-manager.sh +341 -341
  46. package/.claude/hooks/tts-queue-worker.sh +145 -145
  47. package/.claude/hooks/tts-queue.sh +165 -165
  48. package/.claude/hooks/verbosity-manager.sh +185 -178
  49. package/.claude/hooks/voice-manager.sh +552 -548
  50. package/.claude/hooks-windows/download-extra-voices.ps1 +243 -185
  51. package/.claude/hooks-windows/play-tts-piper.ps1 +7 -2
  52. package/.claude/hooks-windows/play-tts.ps1 +9 -3
  53. package/.claude/hooks-windows/session-start-tts.ps1 +2 -1
  54. package/.claude/hooks-windows/verbosity-manager.ps1 +126 -119
  55. package/README.md +19 -2
  56. package/RELEASE_NOTES.md +74 -0
  57. package/bin/agentvibes-voice-browser.js +1939 -1840
  58. package/bin/mcp-server.sh +206 -206
  59. package/mcp-server/server.py +87 -15
  60. package/package.json +1 -1
  61. package/src/console/tabs/receiver-tab.js +1527 -1483
  62. package/src/console/tabs/settings-tab.js +2 -2
  63. package/src/console/tabs/setup-tab.js +112 -31
  64. package/src/console/tabs/voices-tab.js +130 -13
  65. package/src/i18n/en.js +202 -202
  66. package/src/installer.js +79 -213
  67. package/src/services/llm-provider-service.js +126 -75
  68. package/src/services/verbosity-service.js +159 -157
  69. package/templates/agentvibes-receiver.sh +3 -2
@@ -1,84 +1,84 @@
1
- #!/usr/bin/env bash
2
- set -eo pipefail
3
- #
4
- # File: .claude/hooks/stop-tts.sh
5
- #
6
- # AgentVibes Stop Hook — Auto-speak Claude's response via TTS
7
- # Reads last_assistant_message from stdin JSON and speaks it.
8
- #
9
-
10
- # Fix locale warnings
11
- export LC_ALL=C
12
-
13
- # Get script directory
14
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
15
-
16
- # Check if AgentVibes play-tts.sh exists
17
- if [[ ! -f "$SCRIPT_DIR/play-tts.sh" ]]; then
18
- exit 0
19
- fi
20
-
21
- # Check if muted
22
- if [[ -f "${CLAUDE_PROJECT_DIR:-.}/.claude/tts-muted.txt" ]] || [[ -f "$HOME/.claude/tts-muted.txt" ]]; then
23
- MUTED=$(cat "${CLAUDE_PROJECT_DIR:-.}/.claude/tts-muted.txt" 2>/dev/null || cat "$HOME/.claude/tts-muted.txt" 2>/dev/null || echo "")
24
- if [[ "$MUTED" == "true" ]]; then
25
- exit 0
26
- fi
27
- fi
28
-
29
- # Read JSON from stdin
30
- INPUT=$(cat)
31
-
32
- # Extract last_assistant_message using node (available in Claude Code env)
33
- MESSAGE=$(echo "$INPUT" | node -e "
34
- let d = '';
35
- process.stdin.on('data', c => d += c);
36
- process.stdin.on('end', () => {
37
- try {
38
- const j = JSON.parse(d);
39
- const msg = j.last_assistant_message || '';
40
- // Strip markdown before TTS — prevent "asterisk asterisk" being spoken literally
41
- const stripped = msg
42
- .replace(/\*\*/g, '').replace(/\*/g, '')
43
- .replace(/`[^`]*`/g, '').replace(/`/g, '')
44
- .replace(/#+\s*/g, '')
45
- .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1'); // [text](url) → text
46
- // Truncate to 150 chars for TTS
47
- const trimmed = stripped.replace(/\n/g, ' ').replace(/\s+/g, ' ').trim();
48
- process.stdout.write(trimmed.length > 150 ? trimmed.slice(0, 147) + '...' : trimmed);
49
- } catch(e) {
50
- process.exit(0);
51
- }
52
- });
53
- " 2>/dev/null) || exit 0
54
-
55
- # Skip if empty or too short
56
- if [[ -z "$MESSAGE" ]] || [[ ${#MESSAGE} -lt 2 ]]; then
57
- exit 0
58
- fi
59
-
60
- # Check if a BMAD agent is active — route through bmad-speak.sh for per-agent voice
61
- PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
62
- BMAD_CONTEXT="$PROJECT_DIR/.bmad-agent-context"
63
- BMAD_SPEAK="$PROJECT_DIR/.claude/hooks/bmad-speak.sh"
64
-
65
- if [[ -f "$BMAD_CONTEXT" ]] && [[ -f "$BMAD_SPEAK" ]]; then
66
- AGENT_ID=$(head -1 "$BMAD_CONTEXT" 2>/dev/null | tr -d '[:space:]')
67
-
68
- # Party mode: context file contains "party-mode" — skip stop hook TTS entirely.
69
- # Party mode handles its own TTS inline via bmad-speak.sh per agent.
70
- if [[ "$AGENT_ID" == "party-mode" ]]; then
71
- exit 0
72
- fi
73
-
74
- if [[ -n "$AGENT_ID" ]] && [[ "$AGENT_ID" =~ ^[a-zA-Z0-9_-]+$ ]]; then
75
- # Single agent mode: use bmad-speak for per-agent voice/pretext
76
- bash "$BMAD_SPEAK" "$AGENT_ID" "$MESSAGE" &
77
- exit 0
78
- fi
79
- fi
80
-
81
- # Default: speak with global voice (run in background so we don't block Claude)
82
- "$SCRIPT_DIR/play-tts.sh" "$MESSAGE" &
83
-
84
- exit 0
1
+ #!/usr/bin/env bash
2
+ set -eo pipefail
3
+ #
4
+ # File: .claude/hooks/stop-tts.sh
5
+ #
6
+ # AgentVibes Stop Hook — Auto-speak Claude's response via TTS
7
+ # Reads last_assistant_message from stdin JSON and speaks it.
8
+ #
9
+
10
+ # Fix locale warnings
11
+ export LC_ALL=C
12
+
13
+ # Get script directory
14
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
15
+
16
+ # Check if AgentVibes play-tts.sh exists
17
+ if [[ ! -f "$SCRIPT_DIR/play-tts.sh" ]]; then
18
+ exit 0
19
+ fi
20
+
21
+ # Check if muted
22
+ if [[ -f "${CLAUDE_PROJECT_DIR:-.}/.claude/tts-muted.txt" ]] || [[ -f "$HOME/.claude/tts-muted.txt" ]]; then
23
+ MUTED=$(cat "${CLAUDE_PROJECT_DIR:-.}/.claude/tts-muted.txt" 2>/dev/null || cat "$HOME/.claude/tts-muted.txt" 2>/dev/null || echo "")
24
+ if [[ "$MUTED" == "true" ]]; then
25
+ exit 0
26
+ fi
27
+ fi
28
+
29
+ # Read JSON from stdin
30
+ INPUT=$(cat)
31
+
32
+ # Extract last_assistant_message using node (available in Claude Code env)
33
+ MESSAGE=$(echo "$INPUT" | node -e "
34
+ let d = '';
35
+ process.stdin.on('data', c => d += c);
36
+ process.stdin.on('end', () => {
37
+ try {
38
+ const j = JSON.parse(d);
39
+ const msg = j.last_assistant_message || '';
40
+ // Strip markdown before TTS — prevent "asterisk asterisk" being spoken literally
41
+ const stripped = msg
42
+ .replace(/\*\*/g, '').replace(/\*/g, '')
43
+ .replace(/`[^`]*`/g, '').replace(/`/g, '')
44
+ .replace(/#+\s*/g, '')
45
+ .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1'); // [text](url) → text
46
+ // Truncate to 150 chars for TTS
47
+ const trimmed = stripped.replace(/\n/g, ' ').replace(/\s+/g, ' ').trim();
48
+ process.stdout.write(trimmed.length > 150 ? trimmed.slice(0, 147) + '...' : trimmed);
49
+ } catch(e) {
50
+ process.exit(0);
51
+ }
52
+ });
53
+ " 2>/dev/null) || exit 0
54
+
55
+ # Skip if empty or too short
56
+ if [[ -z "$MESSAGE" ]] || [[ ${#MESSAGE} -lt 2 ]]; then
57
+ exit 0
58
+ fi
59
+
60
+ # Check if a BMAD agent is active — route through bmad-speak.sh for per-agent voice
61
+ PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
62
+ BMAD_CONTEXT="$PROJECT_DIR/.bmad-agent-context"
63
+ BMAD_SPEAK="$PROJECT_DIR/.claude/hooks/bmad-speak.sh"
64
+
65
+ if [[ -f "$BMAD_CONTEXT" ]] && [[ -f "$BMAD_SPEAK" ]]; then
66
+ AGENT_ID=$(head -1 "$BMAD_CONTEXT" 2>/dev/null | tr -d '[:space:]')
67
+
68
+ # Party mode: context file contains "party-mode" — skip stop hook TTS entirely.
69
+ # Party mode handles its own TTS inline via bmad-speak.sh per agent.
70
+ if [[ "$AGENT_ID" == "party-mode" ]]; then
71
+ exit 0
72
+ fi
73
+
74
+ if [[ -n "$AGENT_ID" ]] && [[ "$AGENT_ID" =~ ^[a-zA-Z0-9_-]+$ ]]; then
75
+ # Single agent mode: use bmad-speak for per-agent voice/pretext
76
+ bash "$BMAD_SPEAK" "$AGENT_ID" "$MESSAGE" &
77
+ exit 0
78
+ fi
79
+ fi
80
+
81
+ # Default: speak with global voice (run in background so we don't block Claude)
82
+ bash "$SCRIPT_DIR/play-tts.sh" "$MESSAGE" &
83
+
84
+ exit 0