agentvibes 1.0.7 โ 1.0.9
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.
- package/.claude/hooks/voice-manager.sh +21 -2
- package/README.md +2 -0
- package/RELEASE_PROCESS.md +204 -0
- package/package.json +1 -1
- package/test/helpers/test-helper.bash +11 -1
- package/test/unit/voice-manager.bats +43 -5
|
@@ -260,7 +260,24 @@ case "$1" in
|
|
|
260
260
|
|
|
261
261
|
replay)
|
|
262
262
|
# Replay recent TTS audio from history
|
|
263
|
-
|
|
263
|
+
# Use project-local directory with same logic as play-tts.sh
|
|
264
|
+
if [[ -n "$CLAUDE_PROJECT_DIR" ]]; then
|
|
265
|
+
AUDIO_DIR="$CLAUDE_PROJECT_DIR/.claude/audio"
|
|
266
|
+
else
|
|
267
|
+
# Fallback: try to find .claude directory in current path
|
|
268
|
+
CURRENT_DIR="$PWD"
|
|
269
|
+
while [[ "$CURRENT_DIR" != "/" ]]; do
|
|
270
|
+
if [[ -d "$CURRENT_DIR/.claude" ]]; then
|
|
271
|
+
AUDIO_DIR="$CURRENT_DIR/.claude/audio"
|
|
272
|
+
break
|
|
273
|
+
fi
|
|
274
|
+
CURRENT_DIR=$(dirname "$CURRENT_DIR")
|
|
275
|
+
done
|
|
276
|
+
# Final fallback to global if no project .claude found
|
|
277
|
+
if [[ -z "$AUDIO_DIR" ]]; then
|
|
278
|
+
AUDIO_DIR="$HOME/.claude/audio"
|
|
279
|
+
fi
|
|
280
|
+
fi
|
|
264
281
|
|
|
265
282
|
# Default to replay last audio (N=1)
|
|
266
283
|
N="${2:-1}"
|
|
@@ -298,7 +315,9 @@ case "$1" in
|
|
|
298
315
|
exit 1
|
|
299
316
|
fi
|
|
300
317
|
|
|
301
|
-
echo "๐ Replaying audio #$N:
|
|
318
|
+
echo "๐ Replaying audio #$N:"
|
|
319
|
+
echo " File: $(basename "$AUDIO_FILE")"
|
|
320
|
+
echo " Path: $AUDIO_FILE"
|
|
302
321
|
|
|
303
322
|
# Play the audio file in background
|
|
304
323
|
(paplay "$AUDIO_FILE" 2>/dev/null || aplay "$AUDIO_FILE" 2>/dev/null || mpg123 "$AUDIO_FILE" 2>/dev/null) &
|
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
> Professional text-to-speech narration powered by ElevenLabs AI
|
|
6
6
|
|
|
7
7
|
[](https://badge.fury.io/js/agentvibes)
|
|
8
|
+
[](https://github.com/paulpreibisch/AgentVibes/actions/workflows/test.yml)
|
|
9
|
+
[](https://github.com/paulpreibisch/AgentVibes/actions/workflows/publish.yml)
|
|
8
10
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
9
11
|
|
|
10
12
|
**Author**: Paul Preibisch ([@997Fire](https://x.com/997Fire))
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# AgentVibes Release Process
|
|
2
|
+
|
|
3
|
+
## ๐ฆ npm Publishing Best Practices
|
|
4
|
+
|
|
5
|
+
### Current Setup โ
|
|
6
|
+
|
|
7
|
+
AgentVibes follows industry best practices for npm package releases:
|
|
8
|
+
|
|
9
|
+
1. **Semantic Versioning (SemVer)**
|
|
10
|
+
- `MAJOR.MINOR.PATCH` format (e.g., 1.0.7)
|
|
11
|
+
- MAJOR: Breaking changes
|
|
12
|
+
- MINOR: New features (backward compatible)
|
|
13
|
+
- PATCH: Bug fixes
|
|
14
|
+
|
|
15
|
+
2. **Conventional Commits**
|
|
16
|
+
- `feat:` โ New features (MINOR bump)
|
|
17
|
+
- `fix:` โ Bug fixes (PATCH bump)
|
|
18
|
+
- `docs:` โ Documentation only
|
|
19
|
+
- `test:` โ Test updates
|
|
20
|
+
- `chore:` โ Maintenance tasks
|
|
21
|
+
|
|
22
|
+
3. **Automated Publishing**
|
|
23
|
+
- GitHub Actions handles all releases
|
|
24
|
+
- No manual `npm publish` needed
|
|
25
|
+
- Publishes on git tag push
|
|
26
|
+
|
|
27
|
+
4. **Dual Release Strategy**
|
|
28
|
+
- npm package (automated)
|
|
29
|
+
- GitHub Release (automated with categorized notes)
|
|
30
|
+
|
|
31
|
+
## ๐ How to Release
|
|
32
|
+
|
|
33
|
+
### Simple Release Process
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# 1. Make your changes and commit using conventional commits
|
|
37
|
+
git add -A
|
|
38
|
+
git commit -m "feat: Add new voice preview feature"
|
|
39
|
+
|
|
40
|
+
# 2. Bump version and create tag (this triggers everything)
|
|
41
|
+
npm version patch # For bug fixes (1.0.7 โ 1.0.8)
|
|
42
|
+
npm version minor # For new features (1.0.7 โ 1.1.0)
|
|
43
|
+
npm version major # For breaking changes (1.0.7 โ 2.0.0)
|
|
44
|
+
|
|
45
|
+
# 3. Push with tags
|
|
46
|
+
git push origin master --follow-tags
|
|
47
|
+
|
|
48
|
+
# 4. Update v1 branch (optional but recommended)
|
|
49
|
+
git checkout v1 && git merge master --no-edit && git push origin v1 && git checkout master
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**That's it!** GitHub Actions automatically:
|
|
53
|
+
- โ
Publishes to npm
|
|
54
|
+
- โ
Creates GitHub Release
|
|
55
|
+
- โ
Generates categorized changelog
|
|
56
|
+
- โ
Tags the release
|
|
57
|
+
|
|
58
|
+
## ๐ What Happens Automatically
|
|
59
|
+
|
|
60
|
+
### When you push a version tag (e.g., v1.0.8):
|
|
61
|
+
|
|
62
|
+
1. **npm Publishing** (`.github/workflows/publish.yml`)
|
|
63
|
+
- Runs on Ubuntu latest
|
|
64
|
+
- Uses Node.js 20
|
|
65
|
+
- Runs `npm ci` for clean install
|
|
66
|
+
- Publishes to npm registry
|
|
67
|
+
- Uses `NPM_TOKEN` secret for authentication
|
|
68
|
+
|
|
69
|
+
2. **GitHub Release Creation**
|
|
70
|
+
- Extracts version from tag
|
|
71
|
+
- Categorizes commits by type:
|
|
72
|
+
- โจ New Features (feat:)
|
|
73
|
+
- ๐ Bug Fixes (fix:)
|
|
74
|
+
- ๐ Documentation (docs:)
|
|
75
|
+
- ๐งช Testing (test:)
|
|
76
|
+
- ๐ง Maintenance (chore:)
|
|
77
|
+
- Generates formatted release notes
|
|
78
|
+
- Includes installation instructions
|
|
79
|
+
- Adds links to npm, docs, and issues
|
|
80
|
+
- Uses GitHub's auto-generated notes too
|
|
81
|
+
|
|
82
|
+
3. **Testing** (`.github/workflows/test.yml`)
|
|
83
|
+
- Runs all BATS tests
|
|
84
|
+
- Validates no regressions
|
|
85
|
+
- Shows status in PR/commit
|
|
86
|
+
|
|
87
|
+
## ๐ท๏ธ Release Notes Format
|
|
88
|
+
|
|
89
|
+
Example output:
|
|
90
|
+
```markdown
|
|
91
|
+
## AgentVibes v1.0.8
|
|
92
|
+
|
|
93
|
+
> Professional text-to-speech narration for Claude Code sessions
|
|
94
|
+
|
|
95
|
+
### ๐ฆ Installation
|
|
96
|
+
\`\`\`bash
|
|
97
|
+
npx agentvibes@1.0.8 install
|
|
98
|
+
\`\`\`
|
|
99
|
+
|
|
100
|
+
### ๐ What's Changed
|
|
101
|
+
|
|
102
|
+
### โจ New Features
|
|
103
|
+
- Add voice preview feature (abc123)
|
|
104
|
+
- Support custom personalities (def456)
|
|
105
|
+
|
|
106
|
+
### ๐ Bug Fixes
|
|
107
|
+
- Fix audio save directory detection (ghi789)
|
|
108
|
+
- Resolve double-audio bug in personality switching (jkl012)
|
|
109
|
+
|
|
110
|
+
### ๐ Documentation
|
|
111
|
+
- Update README with new commands (mno345)
|
|
112
|
+
|
|
113
|
+
### ๐ Links
|
|
114
|
+
- ๐ฆ [npm package](https://www.npmjs.com/package/agentvibes/v/1.0.8)
|
|
115
|
+
- ๐ [Full Documentation](https://github.com/paulpreibisch/AgentVibes#readme)
|
|
116
|
+
- ๐ [Report Issues](https://github.com/paulpreibisch/AgentVibes/issues)
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
**Built with โค๏ธ by Paul Preibisch | Powered by ElevenLabs AI**
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## ๐ Secrets Configuration
|
|
124
|
+
|
|
125
|
+
Required GitHub secrets:
|
|
126
|
+
- `NPM_TOKEN` - Automation token from npmjs.com
|
|
127
|
+
- `GITHUB_TOKEN` - Auto-provided by GitHub Actions
|
|
128
|
+
|
|
129
|
+
## ๐ Release Checklist
|
|
130
|
+
|
|
131
|
+
Before releasing:
|
|
132
|
+
- [ ] All tests passing locally (`npm test`)
|
|
133
|
+
- [ ] Conventional commit messages used
|
|
134
|
+
- [ ] CHANGELOG reflects changes (auto-generated)
|
|
135
|
+
- [ ] Version bump appropriate for changes
|
|
136
|
+
- [ ] Both master and v1 branches updated
|
|
137
|
+
|
|
138
|
+
After releasing:
|
|
139
|
+
- [ ] Check npm package published: https://www.npmjs.com/package/agentvibes
|
|
140
|
+
- [ ] Verify GitHub Release created
|
|
141
|
+
- [ ] Test installation: `npx agentvibes@VERSION install`
|
|
142
|
+
- [ ] Check badges on README (should be green)
|
|
143
|
+
|
|
144
|
+
## ๐ฏ Best Practices We Follow
|
|
145
|
+
|
|
146
|
+
โ
**Automated Everything**
|
|
147
|
+
- No manual npm publish
|
|
148
|
+
- No manual release notes
|
|
149
|
+
- No manual changelog
|
|
150
|
+
|
|
151
|
+
โ
**Semantic Versioning**
|
|
152
|
+
- Clear version meaning
|
|
153
|
+
- Predictable upgrades
|
|
154
|
+
|
|
155
|
+
โ
**Conventional Commits**
|
|
156
|
+
- Auto-categorized changes
|
|
157
|
+
- Better git history
|
|
158
|
+
|
|
159
|
+
โ
**Comprehensive Testing**
|
|
160
|
+
- 29+ tests with mocks
|
|
161
|
+
- No API token usage
|
|
162
|
+
- CI/CD integration
|
|
163
|
+
|
|
164
|
+
โ
**Clear Documentation**
|
|
165
|
+
- Installation in release notes
|
|
166
|
+
- Links to resources
|
|
167
|
+
- Version-specific npx commands
|
|
168
|
+
|
|
169
|
+
## ๐จ Common Issues
|
|
170
|
+
|
|
171
|
+
**Release didn't trigger:**
|
|
172
|
+
- Ensure tag format is `v*.*.*` (e.g., v1.0.8)
|
|
173
|
+
- Check GitHub Actions tab for errors
|
|
174
|
+
- Verify NPM_TOKEN is valid
|
|
175
|
+
|
|
176
|
+
**Tests failing:**
|
|
177
|
+
- Run `npm test` locally first
|
|
178
|
+
- Check test output in Actions tab
|
|
179
|
+
- Fix issues before releasing
|
|
180
|
+
|
|
181
|
+
**npm already has this version:**
|
|
182
|
+
- Can't republish same version
|
|
183
|
+
- Bump version again
|
|
184
|
+
- Delete tag if needed: `git tag -d v1.0.8 && git push origin :refs/tags/v1.0.8`
|
|
185
|
+
|
|
186
|
+
## ๐ Version History
|
|
187
|
+
|
|
188
|
+
Current release: **v1.0.7**
|
|
189
|
+
|
|
190
|
+
Recent changes (unreleased):
|
|
191
|
+
- test: Add tests for replay command directory detection and output
|
|
192
|
+
- fix: Replay command now uses project-local audio directory
|
|
193
|
+
- feat: Show full file path in replay command output
|
|
194
|
+
- docs: Add GitHub Actions status badges for tests and publishing
|
|
195
|
+
|
|
196
|
+
Next release will be: **v1.0.8** (PATCH - bug fixes and tests)
|
|
197
|
+
|
|
198
|
+
## ๐ฎ Future Improvements
|
|
199
|
+
|
|
200
|
+
- [ ] Automated security scanning
|
|
201
|
+
- [ ] Performance benchmarks
|
|
202
|
+
- [ ] Pre-release/beta channel support
|
|
203
|
+
- [ ] Automatic dependency updates (Dependabot)
|
|
204
|
+
- [ ] Release candidate workflow
|
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": "1.0.
|
|
4
|
+
"version": "1.0.9",
|
|
5
5
|
"description": "Beautiful ElevenLabs TTS voice commands for Claude Code - Add professional narration to your AI coding sessions",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"elevenlabs",
|
|
@@ -95,7 +95,17 @@ EOF
|
|
|
95
95
|
|
|
96
96
|
# Copy AgentVibes scripts to test location
|
|
97
97
|
setup_agentvibes_scripts() {
|
|
98
|
-
|
|
98
|
+
# BATS_TEST_DIRNAME points to test/unit/, so go up two levels to repo root
|
|
99
|
+
local REPO_ROOT="${BATS_TEST_DIRNAME}/../.."
|
|
100
|
+
|
|
101
|
+
# Verify paths exist before copying
|
|
102
|
+
if [[ ! -d "$REPO_ROOT/.claude/hooks" ]]; then
|
|
103
|
+
echo "Error: Cannot find .claude/hooks at $REPO_ROOT/.claude/hooks"
|
|
104
|
+
echo "BATS_TEST_DIRNAME: $BATS_TEST_DIRNAME"
|
|
105
|
+
echo "REPO_ROOT: $REPO_ROOT"
|
|
106
|
+
ls -la "$REPO_ROOT" || true
|
|
107
|
+
return 1
|
|
108
|
+
fi
|
|
99
109
|
|
|
100
110
|
# Copy hooks to test .claude directory
|
|
101
111
|
cp -r "$REPO_ROOT/.claude/hooks" "$TEST_CLAUDE_DIR/"
|
|
@@ -30,8 +30,8 @@ teardown() {
|
|
|
30
30
|
run "$VOICE_MANAGER" get
|
|
31
31
|
|
|
32
32
|
[ "$status" -eq 0 ]
|
|
33
|
-
# Should return Cowboy Bob as default
|
|
34
|
-
|
|
33
|
+
# Should return Cowboy Bob as default (may include warnings)
|
|
34
|
+
assert_output_contains "Cowboy Bob"
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@test "voice-manager switch changes voice" {
|
|
@@ -40,9 +40,9 @@ teardown() {
|
|
|
40
40
|
[ "$status" -eq 0 ]
|
|
41
41
|
assert_output_contains "Voice switched to: Aria"
|
|
42
42
|
|
|
43
|
-
# Verify voice was saved
|
|
43
|
+
# Verify voice was saved (may include warnings)
|
|
44
44
|
run "$VOICE_MANAGER" get
|
|
45
|
-
|
|
45
|
+
assert_output_contains "Aria"
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
@test "voice-manager switch by number works" {
|
|
@@ -80,9 +80,47 @@ teardown() {
|
|
|
80
80
|
assert_output_contains "Voice: Aria"
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
@test "voice-manager replay uses project-local directory" {
|
|
84
|
+
# Create test audio file in project-local directory
|
|
85
|
+
mkdir -p "$CLAUDE_PROJECT_DIR/.claude/audio"
|
|
86
|
+
touch "$CLAUDE_PROJECT_DIR/.claude/audio/tts-123456.mp3"
|
|
87
|
+
|
|
88
|
+
run "$VOICE_MANAGER" replay 1
|
|
89
|
+
|
|
90
|
+
[ "$status" -eq 0 ]
|
|
91
|
+
assert_output_contains "Replaying audio #1"
|
|
92
|
+
assert_output_contains "$CLAUDE_PROJECT_DIR/.claude/audio/tts-123456.mp3"
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@test "voice-manager replay falls back to HOME when no project directory" {
|
|
96
|
+
unset CLAUDE_PROJECT_DIR
|
|
97
|
+
mkdir -p "$TEST_HOME/.claude/audio"
|
|
98
|
+
touch "$TEST_HOME/.claude/audio/tts-789012.mp3"
|
|
99
|
+
|
|
100
|
+
cd "$TEST_HOME"
|
|
101
|
+
|
|
102
|
+
run "$VOICE_MANAGER" replay 1
|
|
103
|
+
|
|
104
|
+
[ "$status" -eq 0 ]
|
|
105
|
+
assert_output_contains "Replaying audio #1"
|
|
106
|
+
assert_output_contains "$TEST_HOME/.claude/audio/tts-789012.mp3"
|
|
107
|
+
}
|
|
108
|
+
|
|
83
109
|
@test "voice-manager replay with no audio history fails gracefully" {
|
|
84
110
|
run "$VOICE_MANAGER" replay 1
|
|
85
111
|
|
|
86
112
|
[ "$status" -eq 1 ]
|
|
87
|
-
|
|
113
|
+
# Accept either error message format
|
|
114
|
+
[[ "$output" =~ "No audio history found"|"Audio #1 not found in history" ]]
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@test "voice-manager replay shows both filename and path" {
|
|
118
|
+
mkdir -p "$CLAUDE_PROJECT_DIR/.claude/audio"
|
|
119
|
+
touch "$CLAUDE_PROJECT_DIR/.claude/audio/tts-999999.mp3"
|
|
120
|
+
|
|
121
|
+
run "$VOICE_MANAGER" replay 1
|
|
122
|
+
|
|
123
|
+
[ "$status" -eq 0 ]
|
|
124
|
+
assert_output_contains "File: tts-999999.mp3"
|
|
125
|
+
assert_output_contains "Path: $CLAUDE_PROJECT_DIR/.claude/audio/tts-999999.mp3"
|
|
88
126
|
}
|