agentvibes 5.2.0 → 5.3.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 (52) hide show
  1. package/.claude/config/audio-effects.cfg +1 -1
  2. package/.claude/hooks/audio-cache-utils.sh +246 -246
  3. package/.claude/hooks/background-music-manager.sh +404 -404
  4. package/.claude/hooks/bmad-speak-enhanced.sh +165 -165
  5. package/.claude/hooks/bmad-speak.sh +290 -290
  6. package/.claude/hooks/bmad-tts-injector.sh +568 -568
  7. package/.claude/hooks/bmad-voice-manager.sh +928 -928
  8. package/.claude/hooks/clawdbot-receiver-SECURE.sh +129 -129
  9. package/.claude/hooks/clawdbot-receiver.sh +107 -107
  10. package/.claude/hooks/clean-audio-cache.sh +22 -22
  11. package/.claude/hooks/cleanup-cache.sh +106 -106
  12. package/.claude/hooks/configure-rdp-mode.sh +137 -137
  13. package/.claude/hooks/download-extra-voices.sh +244 -244
  14. package/.claude/hooks/effects-manager.sh +268 -268
  15. package/.claude/hooks/github-star-reminder.sh +154 -154
  16. package/.claude/hooks/language-manager.sh +362 -362
  17. package/.claude/hooks/learn-manager.sh +492 -492
  18. package/.claude/hooks/macos-voice-manager.sh +205 -205
  19. package/.claude/hooks/migrate-background-music.sh +125 -125
  20. package/.claude/hooks/migrate-to-agentvibes.sh +161 -161
  21. package/.claude/hooks/optimize-background-music.sh +87 -87
  22. package/.claude/hooks/path-resolver.sh +60 -60
  23. package/.claude/hooks/personality-manager.sh +448 -448
  24. package/.claude/hooks/piper-installer.sh +292 -292
  25. package/.claude/hooks/piper-multispeaker-registry.sh +171 -171
  26. package/.claude/hooks/play-tts-enhanced.sh +105 -105
  27. package/.claude/hooks/play-tts-ssh-remote.sh +104 -10
  28. package/.claude/hooks/play-tts-termux-ssh.sh +169 -169
  29. package/.claude/hooks/play-tts.sh +31 -11
  30. package/.claude/hooks/prepare-release.sh +54 -54
  31. package/.claude/hooks/provider-commands.sh +617 -617
  32. package/.claude/hooks/provider-manager.sh +399 -399
  33. package/.claude/hooks/replay-target-audio.sh +95 -95
  34. package/.claude/hooks/sentiment-manager.sh +201 -201
  35. package/.claude/hooks/speed-manager.sh +291 -291
  36. package/.claude/hooks/stop-tts.sh +84 -84
  37. package/.claude/hooks/termux-installer.sh +261 -261
  38. package/.claude/hooks/translate-manager.sh +341 -341
  39. package/.claude/hooks/tts-queue-worker.sh +145 -145
  40. package/.claude/hooks/tts-queue.sh +165 -165
  41. package/.claude/hooks/voice-manager.sh +552 -548
  42. package/.claude/hooks-windows/bmad-party-speak.ps1 +5 -1
  43. package/.claude/hooks-windows/play-tts.ps1 +91 -59
  44. package/README.md +21 -2
  45. package/RELEASE_NOTES.md +130 -0
  46. package/bin/mcp-server.sh +206 -206
  47. package/mcp-server/server.py +35 -6
  48. package/package.json +1 -1
  49. package/src/console/tabs/setup-tab.js +68 -29
  50. package/src/console/tabs/voices-tab.js +9 -3
  51. package/src/installer.js +79 -213
  52. package/src/services/llm-provider-service.js +139 -75
@@ -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
- bash "$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