agentvibes 5.6.0 → 5.6.2

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 (101) hide show
  1. package/.agentvibes/config.json +3 -38
  2. package/.claude/config/audio-effects.cfg +1 -1
  3. package/.claude/config/background-music-enabled.txt +1 -1
  4. package/.claude/config/background-music-position.txt +6 -6
  5. package/.claude/github-star-reminder.txt +1 -1
  6. package/.claude/hooks/play-tts-ssh-remote.sh +119 -42
  7. package/.claude/hooks/play-tts-windows-receiver.sh +31 -0
  8. package/.claude/hooks/stop.sh +2 -27
  9. package/.claude/hooks-windows/play-tts-windows-sapi.ps1 +108 -108
  10. package/.claude/hooks-windows/play-tts.ps1 +58 -8
  11. package/.claude/piper-voices-dir.txt +1 -1
  12. package/.clawdbot/skill/README.md +326 -0
  13. package/.mcp.json +17 -27
  14. package/README.md +15 -2
  15. package/RELEASE_NOTES.md +64 -0
  16. package/bin/agent-vibes +39 -39
  17. package/package.json +1 -1
  18. package/src/bmad-detector.js +71 -71
  19. package/src/cli/list-personalities.js +110 -110
  20. package/src/cli/list-voices.js +114 -114
  21. package/src/commands/bmad-voices.js +394 -394
  22. package/src/commands/install-mcp.js +476 -476
  23. package/src/console/brand-colors.js +13 -13
  24. package/src/console/constants/personalities.js +44 -44
  25. package/src/console/modals/modal-overlay.js +247 -247
  26. package/src/console/navigation.js +5 -1
  27. package/src/console/tabs/agents-tab.js +5 -5
  28. package/src/console/tabs/help-tab.js +314 -314
  29. package/src/console/tabs/readme-tab.js +272 -272
  30. package/src/console/tabs/setup-tab.js +32 -17
  31. package/src/console/tabs/voices-tab.js +2 -2
  32. package/src/console/widgets/destroy-list.js +25 -25
  33. package/src/console/widgets/notice.js +55 -55
  34. package/src/console/widgets/personality-picker.js +213 -213
  35. package/src/console/widgets/reverb-picker.js +97 -97
  36. package/src/console/widgets/track-picker.js +1 -1
  37. package/src/i18n/de.js +202 -202
  38. package/src/i18n/es.js +202 -202
  39. package/src/i18n/fr.js +202 -202
  40. package/src/i18n/hi.js +202 -202
  41. package/src/i18n/ja.js +202 -202
  42. package/src/i18n/ko.js +202 -202
  43. package/src/i18n/pt.js +202 -202
  44. package/src/i18n/strings.js +54 -54
  45. package/src/i18n/zh-CN.js +202 -202
  46. package/src/installer/language-screen.js +31 -31
  47. package/src/installer/music-file-input.js +304 -304
  48. package/src/services/agent-voice-store.js +420 -423
  49. package/src/services/config-service.js +264 -264
  50. package/src/services/language-service.js +47 -47
  51. package/src/services/llm-provider-service.js +11 -4
  52. package/src/services/navigation-service.js +34 -10
  53. package/src/services/provider-service.js +143 -143
  54. package/src/utils/audio-duration-validator.js +298 -298
  55. package/src/utils/audio-format-validator.js +277 -277
  56. package/src/utils/dependency-checker.js +469 -469
  57. package/src/utils/file-ownership-verifier.js +358 -358
  58. package/src/utils/list-formatter.js +194 -194
  59. package/src/utils/music-file-validator.js +285 -285
  60. package/src/utils/preview-list-prompt.js +136 -136
  61. package/src/utils/secure-music-storage.js +412 -412
  62. package/.agentvibes/LITE-MODE.md +0 -236
  63. package/.agentvibes/README.md +0 -136
  64. package/.agentvibes/backup/session-start-tts.sh.20251210_212814 +0 -141
  65. package/.agentvibes/backups/agents/analyst_20260204_144958.md +0 -78
  66. package/.agentvibes/backups/agents/architect_20260204_144958.md +0 -72
  67. package/.agentvibes/backups/agents/dev_20260204_144958.md +0 -74
  68. package/.agentvibes/backups/agents/pm_20260204_144958.md +0 -72
  69. package/.agentvibes/backups/agents/quick-flow-solo-dev_20260204_144958.md +0 -64
  70. package/.agentvibes/backups/agents/sm_20260204_144958.md +0 -87
  71. package/.agentvibes/backups/agents/tea_20260204_144958.md +0 -79
  72. package/.agentvibes/backups/agents/tech-writer_20260204_144958.md +0 -82
  73. package/.agentvibes/backups/agents/ux-designer_20260204_144958.md +0 -80
  74. package/.agentvibes/config/README-personality-defaults.md +0 -162
  75. package/.agentvibes/config/agentvibes.json +0 -1
  76. package/.agentvibes/config/mode.txt +0 -1
  77. package/.agentvibes/config/personality-voice-defaults.default.json +0 -21
  78. package/.agentvibes/config/save-audio.txt +0 -1
  79. package/.agentvibes/config/voice-metadata.json +0 -160
  80. package/.agentvibes/hooks/help.sh +0 -191
  81. package/.agentvibes/hooks/post-tool-use-lite.sh +0 -111
  82. package/.agentvibes/hooks/save-audio-manager.sh +0 -162
  83. package/.agentvibes/hooks/session-start-full-optimized.sh +0 -102
  84. package/.agentvibes/hooks/session-start-full.sh +0 -142
  85. package/.agentvibes/hooks/session-start-lite-v2.sh +0 -34
  86. package/.agentvibes/hooks/session-start-lite.sh +0 -29
  87. package/.agentvibes/hooks/stop-lite.sh +0 -115
  88. package/.agentvibes/hooks/switch-mode.sh +0 -215
  89. package/.agentvibes/output-styles/audio-summary.md +0 -30
  90. package/.claude/audio/voice-samples/piper/alan.wav +0 -0
  91. package/.claude/audio/voice-samples/piper/amy.wav +0 -0
  92. package/.claude/audio/voice-samples/piper/charlotte.wav +0 -0
  93. package/.claude/audio/voice-samples/piper/joe.wav +0 -0
  94. package/.claude/audio/voice-samples/piper/john.wav +0 -0
  95. package/.claude/audio/voice-samples/piper/katherine.wav +0 -0
  96. package/.claude/audio/voice-samples/piper/kristin.wav +0 -0
  97. package/.claude/audio/voice-samples/piper/linda.wav +0 -0
  98. package/.claude/audio/voice-samples/piper/marcus.wav +0 -0
  99. package/.claude/audio/voice-samples/piper/ryan.wav +0 -0
  100. package/.claude/hooks/post-response.sh +0 -41
  101. package/bin/ensure-soprano-running.sh +0 -43
@@ -1,162 +0,0 @@
1
- # Personality Voice Defaults
2
-
3
- ## What is this?
4
-
5
- This configuration file (`personality-voice-defaults.json`) maps each AgentVibes personality to a specific Piper TTS voice that sounds best for that character.
6
-
7
- ## How it works for new users
8
-
9
- When someone installs AgentVibes with Piper TTS:
10
-
11
- ### 1. Installation Process
12
-
13
- ```bash
14
- # User installs Piper
15
- .claude/hooks/piper-installer.sh
16
- ```
17
-
18
- **What happens:**
19
- - Piper TTS binary gets installed via `pipx`
20
- - User is asked: "Download voice models now?"
21
- - If yes, runs `piper-download-voices.sh` which downloads:
22
- - **16Speakers** (~25MB) - Multi-voice model with 16 speakers
23
- - **en_GB-alan-medium** (~25MB) - British male voice
24
- - **en_GB-semaine-medium** (~25MB) - British female voice
25
- - Plus a few other standard voices
26
- - Default personality mappings are installed automatically
27
-
28
- ### 2. What gets downloaded
29
-
30
- **Required voices for personality defaults:**
31
- - ✅ **16Speakers** (1 file) - Provides 16 different speakers:
32
- - #0: Cori Samuel (female) - Used for: flirty, dramatic, dry_humor, sassy
33
- - #2: Kristin Hughes (female) - Used for: poetic, sarcastic
34
- - #4: Mike Pelton (male) - Used for: grandpa
35
- - #8: Rose Ibex (female) - Used for: moody
36
- - #13: Jennifer Dorr (female) - Used for: millennial
37
- - #14: Emily Cripps (female) - Used for: zen
38
- - #15: Martin Clifton (male) - Used for: pirate
39
-
40
- - ✅ **en_GB-alan-medium** - British male voice
41
- - Used for: angry, professional, surfer_dude
42
-
43
- - ✅ **en_GB-semaine-medium** - British female voice
44
- - Used for: funny
45
-
46
- **Total download size: ~75MB** (3 voice models)
47
-
48
- ### 3. First time using a personality
49
-
50
- ```bash
51
- # User switches personality
52
- /agent-vibes:personality flirty
53
- ```
54
-
55
- **What happens:**
56
- 1. AgentVibes reads `personality-voice-defaults.json`
57
- 2. Finds that "flirty" → "16Speakers#0" (Cori Samuel)
58
- 3. Checks if 16Speakers is downloaded
59
- 4. **If not downloaded:**
60
- - Prompts: "Voice model not found: 16Speakers. Download? [y/N]"
61
- - User says yes → Downloads automatically from HuggingFace
62
- - Only happens once per voice model
63
- 5. **If already downloaded:**
64
- - Switches to the voice immediately
65
- - Plays personality-appropriate TTS
66
-
67
- ### 4. Graceful fallbacks
68
-
69
- If a user:
70
- - Skips voice downloads during install → On-demand download when needed
71
- - Deletes the defaults file → Falls back to basic `en_US-lessac-medium`
72
- - Uses a personality without a mapping → Uses default voice
73
-
74
- ## For power users
75
-
76
- ### Customizing defaults
77
-
78
- Edit `.claude/personality-voice-defaults.json`:
79
-
80
- ```json
81
- {
82
- "mappings": {
83
- "flirty": {
84
- "voice": "16Speakers#0",
85
- "rating": 10,
86
- "display_name": "Cori Samuel"
87
- }
88
- }
89
- }
90
- ```
91
-
92
- Change the `voice` field to any Piper voice name.
93
-
94
- ### Using the voice tester
95
-
96
- 1. Run the voice tester (in `voice-tester/` folder)
97
- 2. Rate voices for each personality
98
- 3. Export ratings as JSON
99
- 4. Import with: `./import-voice-ratings.sh my-ratings.json`
100
-
101
- ### Available voices
102
-
103
- List all Piper voices: https://huggingface.co/rhasspy/piper-voices
104
-
105
- Any voice can be used - AgentVibes will download it on first use.
106
-
107
- ## FAQ
108
-
109
- **Q: Do new users need to download all voices upfront?**
110
- A: No! Only 3 files (~75MB total) are recommended. Others download on-demand.
111
-
112
- **Q: What if a user doesn't download any voices?**
113
- A: First personality switch will prompt to download the needed voice.
114
-
115
- **Q: Can users change the defaults?**
116
- A: Yes! Edit the JSON file or use the voice tester to rate and export new preferences.
117
-
118
- **Q: What if 16Speakers isn't available?**
119
- A: It's hosted on AgentVibes HuggingFace and included in the download script.
120
-
121
- **Q: What happens on slow connections?**
122
- A: Each voice is ~25MB. Downloads are one-time only and optional.
123
-
124
- ## Architecture
125
-
126
- ```
127
- Installation Flow:
128
- 1. User runs piper-installer.sh
129
-
130
- 2. Piper binary installed via pipx
131
-
132
- 3. Ask: "Download voices?" → Yes
133
-
134
- 4. piper-download-voices.sh runs
135
- - Downloads 16Speakers (custom, HuggingFace)
136
- - Downloads en_GB-alan-medium (official Piper)
137
- - Downloads en_GB-semaine-medium (official Piper)
138
- - Downloads other optional voices
139
-
140
- 5. install-personality-defaults.sh runs
141
- - Copies personality-voice-defaults.json to user config
142
-
143
- 6. Ready! Personalities now auto-select best voices
144
-
145
- Runtime Flow:
146
- User: /agent-vibes:personality flirty
147
-
148
- personality-manager.sh checks:
149
- 1. User defaults (.claude/personality-voice-defaults.json)
150
- 2. Personality file (piper_voice: field)
151
- 3. Global default (en_US-lessac-medium)
152
-
153
- Found: 16Speakers#0
154
-
155
- Check if downloaded → Yes
156
-
157
- Switch to voice & play TTS!
158
- ```
159
-
160
- ## Credits
161
-
162
- Voice selections curated by Paul Preibisch based on extensive testing with the AgentVibes voice tester (16 personalities × 19 voices).
@@ -1 +0,0 @@
1
- {"pretext": "AgentVibes"}
@@ -1 +0,0 @@
1
- full
@@ -1,21 +0,0 @@
1
- {
2
- "version": "1.0",
3
- "description": "Default Piper voice assignments for each personality",
4
- "mappings": {
5
- "angry": {"voice": "en_GB-alan-medium", "rating": 10, "display_name": "English GB - Alan"},
6
- "dramatic": {"voice": "16Speakers#0", "rating": 10, "display_name": "Cori Samuel"},
7
- "dry_humor": {"voice": "16Speakers#0", "rating": 10, "display_name": "Cori Samuel"},
8
- "flirty": {"voice": "16Speakers#0", "rating": 10, "display_name": "Cori Samuel"},
9
- "funny": {"voice": "en_GB-semaine-medium", "rating": 10, "display_name": "English GB - Semaine"},
10
- "grandpa": {"voice": "16Speakers#4", "rating": 10, "display_name": "Mike Pelton"},
11
- "millennial": {"voice": "16Speakers#13", "rating": 10, "display_name": "Jennifer Dorr"},
12
- "moody": {"voice": "16Speakers#8", "rating": 10, "display_name": "Rose Ibex"},
13
- "pirate": {"voice": "16Speakers#15", "rating": 10, "display_name": "Martin Clifton"},
14
- "poetic": {"voice": "16Speakers#2", "rating": 10, "display_name": "Kristin Hughes"},
15
- "professional": {"voice": "en_GB-alan-medium", "rating": 10, "display_name": "English GB - Alan"},
16
- "sarcastic": {"voice": "16Speakers#2", "rating": 10, "display_name": "Kristin Hughes"},
17
- "sassy": {"voice": "16Speakers#0", "rating": 10, "display_name": "Cori Samuel"},
18
- "surfer_dude": {"voice": "en_GB-alan-medium", "rating": 10, "display_name": "English GB - Alan"},
19
- "zen": {"voice": "16Speakers#14", "rating": 10, "display_name": "Emily Cripps"}
20
- }
21
- }
@@ -1 +0,0 @@
1
- true
@@ -1,160 +0,0 @@
1
- {
2
- "version": "1.0.0",
3
- "provider": "piper",
4
- "voices": {
5
- "ryan": {
6
- "id": "en_US-ryan-high",
7
- "displayName": "Ryan",
8
- "gender": "male",
9
- "accent": "American",
10
- "region": "US",
11
- "quality": "high",
12
- "sampleRate": "22050Hz",
13
- "personality": ["professional", "clear", "confident", "authoritative"],
14
- "recommendedFor": ["business", "technical", "presentations", "narrator"],
15
- "description": "Professional American male voice with clear articulation",
16
- "sampleFile": "ryan.wav"
17
- },
18
- "joe": {
19
- "id": "en_US-joe-medium",
20
- "displayName": "Joe",
21
- "gender": "male",
22
- "accent": "American",
23
- "region": "US",
24
- "quality": "medium",
25
- "sampleRate": "22050Hz",
26
- "personality": ["warm", "friendly", "casual", "approachable"],
27
- "recommendedFor": ["casual", "friendly", "conversational", "assistant"],
28
- "description": "Warm and friendly American male voice",
29
- "sampleFile": "joe.wav"
30
- },
31
- "alan": {
32
- "id": "en_GB-alan-medium",
33
- "displayName": "Alan",
34
- "gender": "male",
35
- "accent": "British",
36
- "region": "GB",
37
- "quality": "medium",
38
- "sampleRate": "22050Hz",
39
- "personality": ["refined", "sophisticated", "intelligent", "articulate"],
40
- "recommendedFor": ["formal", "educational", "architect", "expert"],
41
- "description": "Refined British male voice with sophisticated tone",
42
- "sampleFile": "alan.wav"
43
- },
44
- "marcus": {
45
- "id": "en_US-kusal-medium",
46
- "displayName": "Marcus",
47
- "gender": "male",
48
- "accent": "American",
49
- "region": "US",
50
- "quality": "medium",
51
- "sampleRate": "22050Hz",
52
- "personality": ["steady", "reliable", "focused", "analytical"],
53
- "recommendedFor": ["testing", "QA", "technical", "documentation"],
54
- "description": "Steady and reliable American male voice",
55
- "sampleFile": "marcus.wav"
56
- },
57
- "john": {
58
- "id": "en_US-john-medium",
59
- "displayName": "John",
60
- "gender": "male",
61
- "accent": "American",
62
- "region": "US",
63
- "quality": "medium",
64
- "sampleRate": "22050Hz",
65
- "personality": ["energetic", "enthusiastic", "engaging", "dynamic"],
66
- "recommendedFor": ["product-management", "leadership", "motivational", "presentations"],
67
- "description": "Energetic and enthusiastic American male voice",
68
- "sampleFile": "john.wav"
69
- },
70
- "katherine": {
71
- "id": "en_US-lessac-high",
72
- "displayName": "Katherine",
73
- "gender": "female",
74
- "accent": "American",
75
- "region": "US",
76
- "quality": "high",
77
- "sampleRate": "22050Hz",
78
- "personality": ["professional", "articulate", "polished", "executive"],
79
- "recommendedFor": ["business", "executive", "formal", "professional"],
80
- "description": "Professional American female voice with executive presence",
81
- "sampleFile": "katherine.wav"
82
- },
83
- "linda": {
84
- "id": "en_US-ljspeech-high",
85
- "displayName": "Linda",
86
- "gender": "female",
87
- "accent": "American",
88
- "region": "US",
89
- "quality": "high",
90
- "sampleRate": "22050Hz",
91
- "personality": ["clear", "neutral", "precise", "informative"],
92
- "recommendedFor": ["narrator", "audiobooks", "educational", "news"],
93
- "description": "Clear and precise American female narrator voice",
94
- "sampleFile": "linda.wav"
95
- },
96
- "amy": {
97
- "id": "en_US-amy-medium",
98
- "displayName": "Amy",
99
- "gender": "female",
100
- "accent": "American",
101
- "region": "US",
102
- "quality": "medium",
103
- "sampleRate": "22050Hz",
104
- "personality": ["friendly", "approachable", "helpful", "cheerful"],
105
- "recommendedFor": ["assistant", "notifications", "casual", "friendly"],
106
- "description": "Friendly and approachable American female voice",
107
- "sampleFile": "amy.wav"
108
- },
109
- "kristin": {
110
- "id": "en_US-kristin-medium",
111
- "displayName": "Kristin",
112
- "gender": "female",
113
- "accent": "American",
114
- "region": "US",
115
- "quality": "medium",
116
- "sampleRate": "22050Hz",
117
- "personality": ["analytical", "thoughtful", "intelligent", "insightful"],
118
- "recommendedFor": ["analyst", "research", "strategy", "consulting"],
119
- "description": "Thoughtful and analytical American female voice",
120
- "sampleFile": "kristin.wav"
121
- },
122
- "charlotte": {
123
- "id": "en_GB-southern_english_female-low",
124
- "displayName": "Charlotte",
125
- "gender": "female",
126
- "accent": "British",
127
- "region": "GB",
128
- "quality": "low",
129
- "sampleRate": "16000Hz",
130
- "personality": ["elegant", "sophisticated", "cultured", "refined"],
131
- "recommendedFor": ["formal", "sophisticated", "cultural", "narrator"],
132
- "description": "Elegant British female voice with southern English accent",
133
- "sampleFile": "charlotte.wav"
134
- }
135
- },
136
- "defaultVoice": "ryan",
137
- "installerVoices": [
138
- "ryan",
139
- "joe",
140
- "alan",
141
- "marcus",
142
- "john",
143
- "katherine",
144
- "linda",
145
- "amy",
146
- "kristin",
147
- "charlotte"
148
- ],
149
- "bmadAgentDefaults": {
150
- "architect": "alan",
151
- "analyst": "kristin",
152
- "dev": "joe",
153
- "pm": "john",
154
- "sm": "amy",
155
- "tea": "marcus",
156
- "tech-writer": "linda",
157
- "ux-designer": "charlotte",
158
- "bmad-master": "ryan"
159
- }
160
- }
@@ -1,191 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # File: .agentvibes/hooks/help.sh
4
- #
5
- # AgentVibes Help & Diagnostic Tool
6
- # User-friendly status check with actionable suggestions
7
- #
8
-
9
- set -euo pipefail
10
-
11
- # Fix locale warnings
12
- export LC_ALL=C
13
-
14
- # Directories
15
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
- AGENTVIBES_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
17
- CLAUDE_DIR=".claude"
18
- CONFIG_DIR="$AGENTVIBES_DIR/config"
19
-
20
- # Files
21
- MODE_FILE="$CONFIG_DIR/mode.txt"
22
- SESSION_START_HOOK="$CLAUDE_DIR/hooks/session-start-tts.sh"
23
- POST_TOOL_USE_HOOK="$CLAUDE_DIR/hooks/post-tool-use.sh"
24
- PLAY_TTS_SCRIPT="$CLAUDE_DIR/hooks/play-tts.sh"
25
-
26
- # Colors
27
- GREEN='\033[0;32m'
28
- YELLOW='\033[1;33m'
29
- RED='\033[0;31m'
30
- BLUE='\033[0;34m'
31
- GRAY='\033[0;90m'
32
- NC='\033[0m' # No Color
33
-
34
- # Get current mode
35
- get_current_mode() {
36
- if [[ -f "$MODE_FILE" ]]; then
37
- cat "$MODE_FILE"
38
- else
39
- echo "full"
40
- fi
41
- }
42
-
43
- # Get current voice
44
- get_current_voice() {
45
- if [[ -f ".claude/tts-voice.txt" ]]; then
46
- cat ".claude/tts-voice.txt"
47
- elif [[ -f "$HOME/.claude/tts-voice.txt" ]]; then
48
- cat "$HOME/.claude/tts-voice.txt"
49
- else
50
- echo "Default"
51
- fi
52
- }
53
-
54
- # Get current provider
55
- get_current_provider() {
56
- if [[ -f ".claude/tts-provider.txt" ]]; then
57
- cat ".claude/tts-provider.txt"
58
- elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
59
- cat "$HOME/.claude/tts-provider.txt"
60
- else
61
- echo "piper"
62
- fi
63
- }
64
-
65
- # Get current verbosity
66
- get_current_verbosity() {
67
- if [[ -f ".claude/tts-verbosity.txt" ]]; then
68
- cat ".claude/tts-verbosity.txt"
69
- elif [[ -f "$HOME/.claude/tts-verbosity.txt" ]]; then
70
- cat "$HOME/.claude/tts-verbosity.txt"
71
- else
72
- echo "high"
73
- fi
74
- }
75
-
76
- # Check if muted
77
- is_muted() {
78
- if [[ -f "$HOME/.agentvibes-muted" ]] || [[ -f ".claude/agentvibes-muted" ]]; then
79
- return 0 # True - is muted
80
- else
81
- return 1 # False - not muted
82
- fi
83
- }
84
-
85
- # Run diagnostics (returns 0 if all good, 1 if issues)
86
- run_diagnostics() {
87
- local issues=0
88
-
89
- # Check session-start hook
90
- if [[ ! -f "$SESSION_START_HOOK" ]]; then
91
- echo -e "${RED}✗${NC} Session-start hook missing"
92
- echo -e "${GRAY} Expected: $SESSION_START_HOOK${NC}"
93
- ((issues++))
94
- elif [[ ! -x "$SESSION_START_HOOK" ]]; then
95
- echo -e "${YELLOW}⚠${NC} Session-start hook not executable"
96
- echo -e "${GRAY} Run: chmod +x $SESSION_START_HOOK${NC}"
97
- ((issues++))
98
- fi
99
-
100
- # Check play-tts script
101
- if [[ ! -f "$PLAY_TTS_SCRIPT" ]]; then
102
- echo -e "${RED}✗${NC} TTS playback script missing"
103
- echo -e "${GRAY} Expected: $PLAY_TTS_SCRIPT${NC}"
104
- ((issues++))
105
- fi
106
-
107
- # Check if lite mode needs post-tool-use hook
108
- local current_mode=$(get_current_mode)
109
- if [[ "$current_mode" == "lite" ]] && [[ ! -f "$POST_TOOL_USE_HOOK" ]]; then
110
- echo -e "${YELLOW}⚠${NC} Lite mode requires post-tool-use hook"
111
- echo -e "${GRAY} Run: /agent-vibes:mode lite to reinstall${NC}"
112
- ((issues++))
113
- fi
114
-
115
- return $issues
116
- }
117
-
118
- # Main help display
119
- main() {
120
- echo ""
121
- echo "═══════════════════════════════════════════"
122
- echo " AgentVibes Help & Status"
123
- echo "═══════════════════════════════════════════"
124
- echo ""
125
-
126
- # Run diagnostics silently and capture status
127
- local diagnostic_output
128
- diagnostic_output=$(run_diagnostics 2>&1)
129
- local diagnostic_status=$?
130
-
131
- # Show status indicator
132
- if is_muted; then
133
- echo -e "🔇 ${YELLOW}TTS is currently MUTED${NC}"
134
- echo ""
135
- elif [[ $diagnostic_status -eq 0 ]]; then
136
- echo -e "🟢 ${GREEN}TTS is working normally!${NC}"
137
- echo ""
138
- else
139
- echo -e "⚠️ ${YELLOW}TTS may not be working properly${NC}"
140
- echo ""
141
- echo "Issues Found:"
142
- echo "$diagnostic_output"
143
- echo ""
144
- fi
145
-
146
- # Show current settings
147
- local current_mode=$(get_current_mode)
148
- local current_voice=$(get_current_voice)
149
- local current_provider=$(get_current_provider)
150
- local current_verbosity=$(get_current_verbosity)
151
-
152
- echo "Current Settings:"
153
- if [[ "$current_mode" == "lite" ]]; then
154
- echo -e " ${BLUE}Mode:${NC} Lite Mode (minimal overhead)"
155
- else
156
- echo -e " ${BLUE}Mode:${NC} Full Mode (all features)"
157
- fi
158
- echo -e " ${BLUE}Voice:${NC} $current_voice"
159
- echo -e " ${BLUE}Provider:${NC} $current_provider"
160
- echo -e " ${BLUE}Verbosity:${NC} $current_verbosity"
161
- echo ""
162
-
163
- # Show available commands
164
- echo "Available Commands:"
165
- echo -e " ${GREEN}/agent-vibes:mode lite${NC} - Switch to minimal overhead mode"
166
- echo -e " ${GREEN}/agent-vibes:mode full${NC} - Switch to full features mode"
167
- echo -e " ${GREEN}/agent-vibes:mute${NC} - Temporarily silence TTS"
168
- echo -e " ${GREEN}/agent-vibes:unmute${NC} - Re-enable TTS"
169
- echo -e " ${GREEN}/agent-vibes:voices:list${NC} - See available voices"
170
- echo ""
171
-
172
- # Show suggested fixes if issues found
173
- if [[ $diagnostic_status -ne 0 ]]; then
174
- echo "Suggested Fixes:"
175
- echo -e " ${YELLOW}1.${NC} Try reinstalling: ${GREEN}npx agentvibes install${NC}"
176
- echo -e " ${YELLOW}2.${NC} Restore from backup: ${GREEN}/agent-vibes:mode restore${NC}"
177
- echo -e " ${YELLOW}3.${NC} Report issue: ${BLUE}https://github.com/paulpreibisch/AgentVibes/issues${NC}"
178
- echo ""
179
- fi
180
-
181
- # Show help resources
182
- echo "Need Help?"
183
- echo -e " ${BLUE}•${NC} Documentation: ${BLUE}https://agentvibes.org${NC}"
184
- echo -e " ${BLUE}•${NC} GitHub Issues: ${BLUE}https://github.com/paulpreibisch/AgentVibes/issues${NC}"
185
- echo -e " ${BLUE}•${NC} Lite Mode Guide: ${BLUE}.agentvibes/LITE-MODE.md${NC}"
186
- echo ""
187
- echo "═══════════════════════════════════════════"
188
- echo ""
189
- }
190
-
191
- main "$@"
@@ -1,111 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # File: .agentvibes/hooks/post-tool-use-lite.sh
4
- #
5
- # AgentVibes LITE MODE Post-Tool-Use Hook
6
- # Extracts "Audio Summary:" marker and speaks it via TTS
7
- # - No acknowledgment TTS (only completion)
8
- # - Smart verbosity (skip for very short responses)
9
- # - No .wav file saving (direct TTS)
10
- # - Silent operation (no stdout)
11
- #
12
-
13
- set -euo pipefail
14
-
15
- # Fix locale warnings
16
- export LC_ALL=C
17
-
18
- # Get configuration directory
19
- CONFIG_DIR="${HOME}/.config/agentvibes"
20
- if [[ -d ".agentvibes/config" ]]; then
21
- CONFIG_DIR=".agentvibes/config"
22
- fi
23
-
24
- # Read token thresholds
25
- MIN_TOKENS=${AGENTVIBES_MIN_TOKENS:-50} # Skip TTS below this
26
- SHORT_TOKENS=${AGENTVIBES_SHORT_TOKENS:-200} # Simplify to "Done" below this
27
-
28
- # Function to count approximate tokens (words)
29
- count_tokens() {
30
- echo "$1" | wc -w
31
- }
32
-
33
- # Function to extract Audio Summary from Claude's last message
34
- extract_audio_summary() {
35
- local content="$1"
36
-
37
- # Look for "**Audio Summary:**" marker (case-insensitive)
38
- if echo "$content" | grep -qi "Audio Summary:"; then
39
- # Extract text after the marker, removing markdown formatting
40
- echo "$content" | sed -n 's/.*[Aa]udio [Ss]ummary:[[:space:]]*\*\{0,2\}[[:space:]]*\(.*\)/\1/p' | head -1 | sed 's/\*\{0,2\}[[:space:]]*$//'
41
- fi
42
- }
43
-
44
- # Function to play TTS (direct, no file saving)
45
- play_tts() {
46
- local text="$1"
47
-
48
- # Test mode: Save to file for verification
49
- if [[ "${AGENTVIBES_TEST_AUDIO:-}" == "true" ]]; then
50
- local test_file="${AGENTVIBES_TEST_AUDIO_FILE:-/tmp/agentvibes-lite-test.txt}"
51
- echo "[$(date '+%Y-%m-%d %H:%M:%S')] $text" >> "$test_file"
52
- echo "✓ TTS Test Mode: Saved to $test_file" >&2
53
- fi
54
-
55
- # Try different TTS engines (silent operation)
56
- if command -v say >/dev/null 2>&1; then
57
- # macOS
58
- say "$text" >/dev/null 2>&1 &
59
- elif command -v espeak >/dev/null 2>&1; then
60
- # Linux - espeak
61
- espeak "$text" >/dev/null 2>&1 &
62
- elif command -v spd-say >/dev/null 2>&1; then
63
- # Linux - speech-dispatcher
64
- spd-say "$text" >/dev/null 2>&1 &
65
- elif [[ -f ".claude/hooks/play-tts.sh" ]]; then
66
- # Fallback to AgentVibes play-tts.sh (but silent)
67
- bash .claude/hooks/play-tts.sh "$text" >/dev/null 2>&1 &
68
- fi
69
- }
70
-
71
- # Main logic
72
- main() {
73
- # Get Claude's last message from environment or stdin
74
- local claude_output="${CLAUDE_LAST_MESSAGE:-}"
75
-
76
- if [[ -z "$claude_output" ]]; then
77
- # Try reading from stdin if available
78
- if [[ -p /dev/stdin ]]; then
79
- claude_output=$(cat)
80
- else
81
- exit 0
82
- fi
83
- fi
84
-
85
- # Count tokens in full response
86
- local token_count=$(count_tokens "$claude_output")
87
-
88
- # Skip TTS for very short responses (under MIN_TOKENS)
89
- if [[ $token_count -lt $MIN_TOKENS ]]; then
90
- exit 0
91
- fi
92
-
93
- # Extract Audio Summary
94
- local summary=$(extract_audio_summary "$claude_output")
95
-
96
- # If no Audio Summary marker found, exit silently
97
- if [[ -z "$summary" ]]; then
98
- exit 0
99
- fi
100
-
101
- # For short responses, simplify to "Done"
102
- if [[ $token_count -lt $SHORT_TOKENS ]]; then
103
- summary="Done"
104
- fi
105
-
106
- # Play TTS in background (completely silent)
107
- play_tts "$summary"
108
- }
109
-
110
- # Run main function
111
- main "$@"