agentvibes 2.1.3 โ†’ 2.1.4

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.
@@ -65,11 +65,22 @@ if [[ -n "$VOICE_OVERRIDE" ]]; then
65
65
  VOICE_MODEL="$VOICE_OVERRIDE"
66
66
  echo "๐ŸŽค Using voice: $VOICE_OVERRIDE (session-specific)"
67
67
  else
68
- # Try to get voice from voice file (project-local first, then global)
68
+ # Try to get voice from voice file (check CLAUDE_PROJECT_DIR first for MCP context)
69
69
  VOICE_FILE=""
70
- if [[ -f "$SCRIPT_DIR/../tts-voice.txt" ]]; then
70
+
71
+ # Priority order:
72
+ # 1. CLAUDE_PROJECT_DIR env var (set by MCP for project-specific settings)
73
+ # 2. Script location (for direct slash command usage)
74
+ # 3. Global ~/.claude (fallback)
75
+
76
+ if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -f "$CLAUDE_PROJECT_DIR/.claude/tts-voice.txt" ]]; then
77
+ # MCP context: Use the project directory where MCP was invoked
78
+ VOICE_FILE="$CLAUDE_PROJECT_DIR/.claude/tts-voice.txt"
79
+ elif [[ -f "$SCRIPT_DIR/../tts-voice.txt" ]]; then
80
+ # Direct usage: Use script location
71
81
  VOICE_FILE="$SCRIPT_DIR/../tts-voice.txt"
72
82
  elif [[ -f "$HOME/.claude/tts-voice.txt" ]]; then
83
+ # Fallback: Use global
73
84
  VOICE_FILE="$HOME/.claude/tts-voice.txt"
74
85
  fi
75
86
 
@@ -77,8 +88,10 @@ else
77
88
  FILE_VOICE=$(cat "$VOICE_FILE" 2>/dev/null)
78
89
 
79
90
  # Check for multi-speaker voice (model + speaker ID stored separately)
80
- MODEL_FILE="$SCRIPT_DIR/../tts-piper-model.txt"
81
- SPEAKER_ID_FILE="$SCRIPT_DIR/../tts-piper-speaker-id.txt"
91
+ # Use same directory as VOICE_FILE for consistency
92
+ VOICE_DIR=$(dirname "$VOICE_FILE")
93
+ MODEL_FILE="$VOICE_DIR/tts-piper-model.txt"
94
+ SPEAKER_ID_FILE="$VOICE_DIR/tts-piper-speaker-id.txt"
82
95
 
83
96
  if [[ -f "$MODEL_FILE" ]] && [[ -f "$SPEAKER_ID_FILE" ]]; then
84
97
  # Multi-speaker voice
package/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,90 @@
1
1
  # ๐ŸŽค AgentVibes Release Notes
2
2
 
3
+ ## ๐Ÿ“ฆ v2.1.4 - Critical Voice Switching Fix for MCP Projects (2025-10-26)
4
+
5
+ ### ๐ŸŽฏ Overview
6
+
7
+ This patch release fixes a **critical bug** where voice switching didn't work correctly when using AgentVibes via MCP (Model Context Protocol) in project-specific directories. After switching voices, TTS would continue using the old voice instead of the newly selected one.
8
+
9
+ **Release Date:** October 26, 2025
10
+ **Git Tag:** v2.1.4
11
+ **Type:** Patch release (bug fix)
12
+ **Impact:** Voice switching now works correctly in all contexts (MCP, direct commands, global settings)
13
+
14
+ ---
15
+
16
+ ### ๐Ÿค– AI Summary
17
+
18
+ Medium bug fix: Voice switching now works correctly in MCP project contexts. Previously, after switching voices via MCP (Claude Desktop, Claude Code), TTS would continue using the old voice. This release fixes play-tts-piper.sh to respect CLAUDE_PROJECT_DIR environment variable, ensuring project-specific voice settings take priority. Voice switching now persists correctly across all contexts (MCP, direct commands, global settings).
19
+
20
+ ---
21
+
22
+ ### ๐Ÿ› Bug Fixes
23
+
24
+ - **Fixed Voice Switching in MCP Project Contexts** ๐ŸŽค
25
+ - Voice switches now persist correctly when using AgentVibes MCP server
26
+ - `play-tts-piper.sh` now respects `CLAUDE_PROJECT_DIR` environment variable
27
+ - Project-specific voice settings take priority over package/global settings
28
+ - Multi-speaker voice configurations (model + speaker ID) also fixed
29
+
30
+ ### ๐Ÿ”ง Technical Details
31
+
32
+ **Root Cause:**
33
+ - When MCP server runs in a project directory (e.g., `/home/user/my-project/`), it sets `CLAUDE_PROJECT_DIR` environment variable
34
+ - Voice switching correctly saved to project's `.claude/tts-voice.txt`
35
+ - However, `play-tts-piper.sh` didn't check `CLAUDE_PROJECT_DIR`, so it read voice from package directory instead
36
+ - Result: Voice appeared switched in config, but TTS still used old voice
37
+
38
+ **Solution:**
39
+ - Updated voice file resolution priority in `play-tts-piper.sh`:
40
+ 1. Check `CLAUDE_PROJECT_DIR/.claude/tts-voice.txt` (MCP project context)
41
+ 2. Check script location `$SCRIPT_DIR/../tts-voice.txt` (direct usage)
42
+ 3. Fall back to `~/.claude/tts-voice.txt` (global)
43
+ - Applied same logic to multi-speaker model/speaker ID files
44
+
45
+ ### ๐Ÿ“ Files Changed
46
+
47
+ - `.claude/hooks/play-tts-piper.sh` (lines 68-94)
48
+ - Added `CLAUDE_PROJECT_DIR` environment variable check
49
+ - Updated multi-speaker file path resolution
50
+ - Added detailed comments explaining priority order
51
+
52
+ ### ๐ŸŽ“ User Impact
53
+
54
+ **Before This Fix:**
55
+ ```bash
56
+ # In project directory
57
+ /agent-vibes:switch kristin
58
+ # โœ… Shows: "Voice switched to: kristin"
59
+
60
+ # But when TTS runs...
61
+ # ๐Ÿ› Still plays with old voice (e.g., lessac)
62
+ ```
63
+
64
+ **After This Fix:**
65
+ ```bash
66
+ # In project directory
67
+ /agent-vibes:switch kristin
68
+ # โœ… Shows: "Voice switched to: kristin"
69
+
70
+ # TTS runs...
71
+ # โœ… Plays with kristin voice correctly!
72
+ ```
73
+
74
+ ### ๐Ÿงช Testing
75
+
76
+ Verified fix with:
77
+ - โœ… MCP server context with project-local `.claude/` directory
78
+ - โœ… Direct slash command usage
79
+ - โœ… Global `~/.claude/` fallback
80
+ - โœ… Multi-speaker voices (16Speakers model)
81
+
82
+ ### ๐Ÿ“š Related Issues
83
+
84
+ This fix resolves user-reported issue where voices weren't switching in MCP-enabled projects like Claude Desktop and Claude Code.
85
+
86
+ ---
87
+
3
88
  ## ๐Ÿ“ฆ v2.1.0 - Streamlined Installation & CI Improvements (2025-10-26)
4
89
 
5
90
  ### ๐ŸŽฏ Overview
@@ -50,111 +135,24 @@ This minor release delivers **automated Piper TTS installation** and **improved
50
135
  # โœ… Done! Fully automated.
51
136
  ```
52
137
 
53
- **For Developers:**
54
- - CI workflow now only monitors `master` branch (v1 deprecated)
55
- - Tests run on all PRs to master with 110 test coverage
56
- - Cleaner GitHub Actions logs
57
-
58
- **Technical Details:**
59
- The installer now checks for Piper binary (`piper --version`) after provider selection. If not found, it prompts for installation and executes `piper-installer.sh` which handles:
60
- 1. pipx installation (if needed)
61
- 2. Piper TTS installation via pipx
62
- 3. Optional voice download
63
- 4. PATH configuration
64
-
65
- ### ๐Ÿค– AI Summary
66
-
67
- This release eliminates manual steps for Piper TTS users by auto-installing the binary during setup, and streamlines the CI workflow by removing deprecated branch references. Installation is now fully hands-off with human approval checkpoints.
68
-
69
- ---
70
-
71
- ## ๐Ÿ“ฆ v2.0.24 - Performance Optimization (2025-10-21)
72
-
73
- ### ๐ŸŽฏ Overview
74
-
75
- This patch release delivers a **significant performance optimization** to the output style, reducing CLI overhead by consolidating multiple bash commands into a single efficient call. This makes TTS acknowledgments and completions faster and produces cleaner output.
76
-
77
- **Release Date:** October 21, 2025
78
- **Git Tag:** v2.0.24
79
- **Impact:** Performance improvement, cleaner CLI output
80
-
81
- ---
82
-
83
- ### โšก Performance Improvements
84
-
85
- - **Optimized Settings Check**: Reduced three separate bash commands (checking language, sentiment, and personality settings) into one efficient `eval` command
86
- - **Before**: 3 separate `cat` commands for each setting file
87
- - **After**: Single compound command that checks all three settings at once
88
- - **Result**: Faster acknowledgment/completion responses, cleaner CLI output
89
-
90
- ### ๐Ÿ“ Files Changed
91
-
92
- - `.claude/output-styles/agent-vibes.md` - Optimized settings check from 3 commands to 1
93
-
94
- ### ๐ŸŽ“ User Impact
95
-
96
- **For All Users:**
97
- - Faster TTS acknowledgments and completions
98
- - Cleaner CLI output with less visual noise
99
- - No behavioral changes - all features work exactly the same
100
-
101
- **Technical Details:**
102
- The optimization uses bash `eval` to combine three sequential file reads into a single compound operation, reducing the number of bash tool calls visible in the Claude Code CLI from 3 to 1 per acknowledgment/completion.
103
-
104
- ---
138
+ **For CI/CD Automation:**
139
+ - Unattended installation now possible:
140
+ ```bash
141
+ npx agentvibes install --provider piper --yes
142
+ # Piper installed automatically without prompts
143
+ ```
105
144
 
106
- ## ๐Ÿ“ฆ v2.0.21 - Test Suite & Quality Improvements (2025-10-22)
145
+ ### ๐Ÿ”„ Upgrade Path
107
146
 
108
- ### ๐ŸŽฏ Overview
147
+ No breaking changes. Existing installations continue working.
109
148
 
110
- This patch release focuses on **test reliability** and **user experience improvements**, making the testing process completely silent and replacing distracting tongue twisters with simple test messages.
111
-
112
- **Release Date:** October 22, 2025
113
- **Git Tag:** v2.0.21
114
- **NPM tests:** All 110 tests passing โœ…
149
+ To benefit from automatic Piper installation:
150
+ ```bash
151
+ npx agentvibes update
152
+ ```
115
153
 
116
154
  ---
117
155
 
118
- ### โœจ New Features
119
-
120
- - **Silent Test Mode**: Tests now run completely silently when `AGENTVIBES_TEST_MODE=true` is set
121
-
122
- ### ๐Ÿ› Bug Fixes
123
-
124
- - **Fixed provider-manager tests**: Updated 2 failing tests that expected "voice reset to default" but code outputs "voice set to: [voice_name]"
125
- - **Removed tongue twisters**: Replaced distracting tongue twisters with simple test messages:
126
- - "Testing speed change"
127
- - "Speed test in progress"
128
- - "Checking audio speed"
129
- - "Speed configuration test"
130
- - "Audio speed test"
131
-
132
- ### ๐Ÿงช Testing Improvements
156
+ ## ๐Ÿ“ฆ v2.0.18 - Speed Control & AI Documentation Standards (2025-10-19)
133
157
 
134
- - **Test configuration**: `npm test` now automatically sets `AGENTVIBES_TEST_MODE=true` for silent execution
135
- - **Audio playback control**: Both Piper and ElevenLabs TTS scripts now respect `AGENTVIBES_TEST_MODE` flag
136
- - **Updated test assertions**: Speed manager tests now check for simple messages instead of tongue twisters
137
-
138
- ### ๐Ÿ“ Files Changed
139
-
140
- - `.claude/hooks/play-tts-piper.sh` - Added AGENTVIBES_TEST_MODE check
141
- - `.claude/hooks/play-tts-elevenlabs.sh` - Added AGENTVIBES_TEST_MODE check
142
- - `.claude/hooks/speed-manager.sh` - Replaced tongue twisters with simple messages
143
- - `mcp-server/server.py` - Replaced tongue twisters with simple messages
144
- - `test/unit/provider-manager.bats` - Fixed 2 failing tests
145
- - `test/unit/speed-manager.bats` - Updated test assertions
146
- - `package.json` - Added AGENTVIBES_TEST_MODE to test scripts
147
-
148
- ### ๐ŸŽ“ User Impact
149
-
150
- **For Developers:**
151
- - Running `npm test` is now completely silent - no more disruptive audio during test runs
152
- - Clearer test output without tongue twister noise
153
- - More reliable test suite (all 110 tests passing)
154
-
155
- **For Users:**
156
- - Speed changes still announce themselves during normal use
157
- - Test mode only affects automated testing, not regular usage
158
- - No changes to normal TTS behavior
159
-
160
- ---
158
+ [Previous release notes continue below...]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "agentvibes",
4
- "version": "2.1.3",
4
+ "version": "2.1.4",
5
5
  "description": "Now your AI Agents can finally talk back! Professional TTS voice for Claude Code and Claude Desktop (via MCP) with multi-provider support.",
6
6
  "homepage": "https://agentvibes.org",
7
7
  "keywords": [