agentvibes 5.6.5 → 5.6.7

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.
@@ -1,64 +1 @@
1
- # AgentVibes Audio Effects Configuration|||
2
- # Format: AGENT_NAME|SOX_EFFECTS|BACKGROUND_FILE|BACKGROUND_VOLUME
3
- #|||
4
- # SOX_EFFECTS: sox effect chain (leave empty for none)|||
5
- # - reverb <reverberance> <HF-damping> <room-scale>|||
6
- # - pitch <cents> (100 cents = 1 semitone)|||
7
- # - equalizer <freq> <width>q <gain-dB>|||
8
- # - gain <dB>|||
9
- # - compand <attack,decay> <soft-knee-dB:in-dB,out-dB>|||
10
- #|||
11
- # BACKGROUND_FILE: path to ambient audio (relative to .claude/audio/tracks/)|||
12
- # BACKGROUND_VOLUME: 0.0-1.0 (0.20-0.40 recommended)|||
13
- #|||
14
- # Example: John|reverb 30 50 80|my-track.mp3|0.25
15
- |||
16
- # BMAD Agents - each with unique audio personality|||
17
- |||
18
- # PM John - upbeat, driving energy|||
19
- John|gain -1 equalizer 3000 1q +2|agentvibes_soft_flamenco_loop.mp3|0.30
20
- |||
21
- # Architect Winston - deep, authoritative|||
22
- Winston|reverb 40 50 90 gain -2|agentvibes_soft_flamenco_loop.mp3|0.25
23
- |||
24
- # Developer Amelia - clean, precise|||
25
- Amelia|compand 0.3,1 6:-70,-60,-20|agentvibes_soft_flamenco_loop.mp3|0.25
26
- |||
27
- # Business Analyst Mary - warm, analytical|||
28
- Mary|equalizer 200 1q +3 equalizer 2500 1q -2|agentvibes_soft_flamenco_loop.mp3|0.25
29
- |||
30
- # Scrum Master Bob - refined, organized|||
31
- Bob|reverb 30 40 70 compand 0.2,0.5 6:-70,-60,-20|agentvibes_soft_flamenco_loop.mp3|0.25
32
- |||
33
- # Test Architect Murat - crisp, analytical|||
34
- Murat|equalizer 4000 1q +3 compand 0.1,0.3 6:-70,-60,-20|agentvibes_soft_flamenco_loop.mp3|0.25
35
- |||
36
- # UX Designer Sally - warm, empathetic|||
37
- Sally|reverb 25 40 70 equalizer 300 1q +2|agentvibes_soft_flamenco_loop.mp3|0.25
38
- |||
39
- # Tech Writer Paige - clear, patient|||
40
- Paige|compand 0.2,0.5 6:-70,-60,-20|agentvibes_soft_flamenco_loop.mp3|0.20
41
- |||
42
- # Frame Expert Saif - structured, detail-oriented|||
43
- Saif|equalizer 2000 1q +2|agentvibes_soft_flamenco_loop.mp3|0.25
44
- |||
45
- # BMad Master - wise orchestrator|||
46
- BMad Master|reverb 50 60 100 pitch -100|agentvibes_soft_flamenco_loop.mp3|0.30
47
- |||
48
- # Party mode room ambiance - used when multiple agents are talking|||
49
- _party_mode|compand 0.3,1 6:-70,-60,-20|agent_vibes_dark_chill_step_loop.mp3|0.40
50
- |||
51
- # Default (no agent specified) - clean with Bachata background|||
52
1
  default||agentvibes_soft_flamenco_loop.mp3|0.30
53
- |||
54
- # Per-LLM routing rows — looked up by play-tts.sh / play-tts.ps1 when -llm is passed|||
55
- # Format: llm:<name>|REVERB_PRESET|BACKGROUND_FILE|BACKGROUND_VOLUME|VOICE|PRETEXT|ENGINE|||
56
- |||
57
- # Claude Code (claude-code CLI via CLAUDECODE=1 env or AGENTVIBES_LLM=claude-code)|||
58
- llm:claude-code|||0.15||Agent Vibes Here|piper
59
- |||
60
- # GitHub Copilot Chat (VS Code MCP or AGENTVIBES_LLM=copilot)|||
61
- llm:copilot|off||||Agent Vibes Here|piper
62
- |||
63
- # OpenAI Codex CLI (AGENTVIBES_LLM=codex)|||
64
- llm:codex|off||||Agent Vibes Here|piper
@@ -20,8 +20,8 @@ agent_vibes_bossa_nova_v2_loop.mp3:5.369524
20
20
  agent_vibes_salsa_v2_loop.mp3:9.972790
21
21
  agent_vibes_arabic_v2_loop.mp3:.00000000000000000006132724
22
22
  agent_vibes_cumbia_v1_loop.mp3:.00000000000000000010256000
23
- agentvibes_soft_flamenco_loop.mp3:7.389660
24
23
  agent_vibes_bachata_v1_loop.mp3:5.125714
25
24
  agent_vibes_chillwave_v2_loop.mp3:.00000000000000000003308191
26
25
  Midnight Charleston Stomp.mp3:.00000000000000000010960000
27
26
  agent_vibes_japanese_city_pop_v1_loop.mp3:11.702675
27
+ agentvibes_soft_flamenco_loop.mp3:9.589660
@@ -1 +1 @@
1
- 20260507
1
+ 20260508
@@ -42,18 +42,44 @@ BACKGROUNDS_DIR="$(cd "$SCRIPT_DIR/../audio" && pwd)/tracks"
42
42
  ENABLED_FILE="$(cd "$SCRIPT_DIR/.." && pwd)/config/background-music-enabled.txt"
43
43
  GLOBAL_ENABLED_FILE="$HOME/.claude/config/background-music-enabled.txt"
44
44
 
45
- # Check if background music is enabled (project-local, then global fallback)
45
+ # When the user's project dir differs from the package dir (e.g. npm link),
46
+ # CLAUDE_PROJECT_DIR holds the project path — check its audio-effects.cfg first
47
+ # so per-LLM settings written by the TUI are found (mirrors play-tts.sh search order).
48
+ CLAUDE_PROJECT_CFG=""
49
+ if [[ -n "${CLAUDE_PROJECT_DIR:-}" ]]; then
50
+ _candidate="${CLAUDE_PROJECT_DIR}/.claude/config/audio-effects.cfg"
51
+ _pkg_cfg_dir="$(cd "$SCRIPT_DIR/.." && pwd)/config"
52
+ if [[ "$(dirname "$_candidate")" != "$_pkg_cfg_dir" ]] && [[ -f "$_candidate" ]]; then
53
+ CLAUDE_PROJECT_CFG="$_candidate"
54
+ fi
55
+ unset _candidate _pkg_cfg_dir
56
+ fi
57
+
58
+ # Check if background music is enabled.
59
+ # Search order: CLAUDE_PROJECT_DIR config → package config → global fallback.
60
+ # CLAUDE_PROJECT_DIR takes priority so TUI preview writes to the project dir and
61
+ # audio-processor.sh (running from the package hooks dir) still finds the flag.
46
62
  is_background_music_enabled() {
47
- local enabled=""
63
+ local enabled="" _f
64
+ # 1. Project dir (set by TUI preview via CLAUDE_PROJECT_DIR env var)
65
+ if [[ -n "${CLAUDE_PROJECT_DIR:-}" ]]; then
66
+ _f="${CLAUDE_PROJECT_DIR}/.claude/config/background-music-enabled.txt"
67
+ if [[ -f "$_f" ]]; then
68
+ enabled=$(cat "$_f" 2>/dev/null | tr -d '[:space:]')
69
+ [[ "$enabled" == "true" ]] && return 0
70
+ [[ "$enabled" == "false" ]] && return 1
71
+ fi
72
+ fi
73
+ # 2. Package/hooks dir config
48
74
  if [[ -f "$ENABLED_FILE" ]]; then
49
75
  enabled=$(cat "$ENABLED_FILE" 2>/dev/null | tr -d '[:space:]')
76
+ # 3. Global fallback
50
77
  elif [[ -f "$GLOBAL_ENABLED_FILE" ]]; then
51
78
  enabled=$(cat "$GLOBAL_ENABLED_FILE" 2>/dev/null | tr -d '[:space:]')
52
79
  else
53
80
  return 1 # Disabled by default
54
81
  fi
55
82
 
56
- # Return 0 (true) if enabled, 1 (false) otherwise
57
83
  [[ "$enabled" == "true" ]]
58
84
  }
59
85
 
@@ -83,22 +109,33 @@ fi
83
109
  # @returns Pipe-separated config line or default
84
110
  get_agent_config() {
85
111
  local agent="$1"
112
+ local config=""
86
113
 
87
- if [[ ! -f "$CONFIG_FILE" ]]; then
114
+ # Search order: CLAUDE_PROJECT_DIR config (user project) → package config.
115
+ # This ensures per-LLM settings saved by the TUI are found even when the
116
+ # package dir differs from the project dir (e.g. npm link / global install).
117
+ local _search_files=()
118
+ [[ -n "$CLAUDE_PROJECT_CFG" ]] && _search_files+=("$CLAUDE_PROJECT_CFG")
119
+ [[ -f "$CONFIG_FILE" ]] && _search_files+=("$CONFIG_FILE")
120
+
121
+ if [[ ${#_search_files[@]} -eq 0 ]]; then
88
122
  echo "default|gain -8||0.0"
89
123
  return
90
124
  fi
91
125
 
92
- # Try exact match first (use awk for safe literal matching)
93
- local config
94
- config=$(awk -F'|' -v agent="$agent" 'tolower($1) == tolower(agent)' "$CONFIG_FILE" 2>/dev/null | head -1)
126
+ for _cfg_file in "${_search_files[@]}"; do
127
+ config=$(awk -F'|' -v agent="$agent" 'tolower($1) == tolower(agent)' "$_cfg_file" 2>/dev/null | head -1)
128
+ [[ -n "$config" ]] && break
129
+ done
95
130
 
96
- # Fall back to default
131
+ # Fall back to default row from first available config
97
132
  if [[ -z "$config" ]]; then
98
- config=$(grep "^default|" "$CONFIG_FILE" 2>/dev/null | head -1)
133
+ for _cfg_file in "${_search_files[@]}"; do
134
+ config=$(grep "^default|" "$_cfg_file" 2>/dev/null | head -1)
135
+ [[ -n "$config" ]] && break
136
+ done
99
137
  fi
100
138
 
101
- # Return config or empty default
102
139
  if [[ -n "$config" ]]; then
103
140
  echo "$config"
104
141
  else
@@ -362,8 +399,10 @@ main() {
362
399
  local config
363
400
  config=$(get_agent_config "$AGENT_NAME")
364
401
 
365
- # Parse config (format: NAME|EFFECTS|BACKGROUND|VOLUME)
366
- IFS='|' read -r _ sox_effects background_file bg_volume <<< "$config"
402
+ # Parse config (format: NAME|EFFECTS|BACKGROUND|VOLUME[|voice|pretext|engine...])
403
+ # LLM rows have 7 fields; _rest absorbs columns 5+ so bg_volume stays numeric.
404
+ local _rest
405
+ IFS='|' read -r _ sox_effects background_file bg_volume _rest <<< "$config"
367
406
 
368
407
  # Translate reverb preset names (stored by the console Configure UI) to sox effects strings.
369
408
  # LLM per-agent rows store human-readable names like "light"; sox needs the raw effect string.
@@ -462,17 +501,29 @@ main() {
462
501
  background_path="$custom_music_path"
463
502
  echo " → Using custom background music" >&2
464
503
  elif [[ -n "$background_file" ]]; then
465
- # Fall back to default background music from audio-effects.cfg
466
- background_path="$BACKGROUNDS_DIR/$background_file"
467
- # SECURITY: Validate resolved path stays within BACKGROUNDS_DIR (prevent path traversal
468
- # via crafted entries like "../../etc/hostname" in audio-effects.cfg)
469
- local _resolved_bg _safe_base
470
- _resolved_bg=$(realpath -m "$background_path" 2>/dev/null || echo "$background_path")
471
- _safe_base=$(realpath -m "$BACKGROUNDS_DIR" 2>/dev/null || echo "$BACKGROUNDS_DIR")
472
- if [[ "$_resolved_bg" != "${_safe_base}/"* ]] && [[ "$_resolved_bg" != "$_safe_base" ]]; then
473
- echo "Warning: background_file resolves outside allowed directory, skipping: $background_file" >&2
474
- background_path=""
504
+ # Fall back to default background music from audio-effects.cfg.
505
+ # Search order: package tracks dir → CLAUDE_PROJECT_DIR tracks dir.
506
+ # The project dir fallback covers npm link / global install where the
507
+ # hooks run from the package but tracks were installed into the project.
508
+ local _candidate_dirs=("$BACKGROUNDS_DIR")
509
+ if [[ -n "${CLAUDE_PROJECT_DIR:-}" ]]; then
510
+ _candidate_dirs+=("${CLAUDE_PROJECT_DIR}/.claude/audio/tracks")
475
511
  fi
512
+ for _tracks_dir in "${_candidate_dirs[@]}"; do
513
+ local _candidate_path="$_tracks_dir/$background_file"
514
+ # SECURITY: Validate resolved path stays within the tracks dir
515
+ local _resolved_bg _safe_base
516
+ _resolved_bg=$(realpath -m "$_candidate_path" 2>/dev/null || echo "$_candidate_path")
517
+ _safe_base=$(realpath -m "$_tracks_dir" 2>/dev/null || echo "$_tracks_dir")
518
+ if [[ "$_resolved_bg" != "${_safe_base}/"* ]] && [[ "$_resolved_bg" != "$_safe_base" ]]; then
519
+ echo "Warning: background_file resolves outside allowed directory, skipping: $background_file" >&2
520
+ continue
521
+ fi
522
+ if [[ -f "$_candidate_path" ]]; then
523
+ background_path="$_candidate_path"
524
+ break
525
+ fi
526
+ done
476
527
  fi
477
528
 
478
529
  # Per-agent profile enables music independently of the global flag.
@@ -89,11 +89,22 @@ if (-not (Test-Path $ProviderScript)) {
89
89
  exit 1
90
90
  }
91
91
 
92
- # Check if background music is enabled
92
+ # Check if background music is enabled.
93
+ # Search order: CLAUDE_PROJECT_DIR (set by TUI preview) → package config dir.
94
+ # This mirrors audio-processor.sh behaviour on Linux so preview writes to the
95
+ # project dir and play-tts.ps1 still finds the flag regardless of where the
96
+ # package is installed (global, npm link, etc.).
93
97
  $ConfigDir = "$ClaudeDir\config"
94
98
  $BgEnabled = $false
95
99
  $BgEnabledFile = "$ConfigDir\background-music-enabled.txt"
96
- if (Test-Path $BgEnabledFile) {
100
+ if ($env:CLAUDE_PROJECT_DIR) {
101
+ $_projBgFile = Join-Path $env:CLAUDE_PROJECT_DIR ".claude\config\background-music-enabled.txt"
102
+ if (Test-Path $_projBgFile) {
103
+ $BgEnabled = (Get-Content $_projBgFile -Raw).Trim() -eq "true"
104
+ } elseif (Test-Path $BgEnabledFile) {
105
+ $BgEnabled = (Get-Content $BgEnabledFile -Raw).Trim() -eq "true"
106
+ }
107
+ } elseif (Test-Path $BgEnabledFile) {
97
108
  $BgEnabled = (Get-Content $BgEnabledFile -Raw).Trim() -eq "true"
98
109
  }
99
110
 
@@ -203,10 +214,16 @@ $_LlmBgFile = ""
203
214
  $_LlmBgVol = ""
204
215
  $_LlmKey = "llm:$llm"
205
216
 
206
- $_AudioEffectsCfgPaths = @(
207
- (Join-Path $ClaudeDir "config\audio-effects.cfg"),
208
- (Join-Path $env:USERPROFILE ".claude\config\audio-effects.cfg")
209
- )
217
+ # Search order: CLAUDE_PROJECT_DIR → package config → user profile.
218
+ # CLAUDE_PROJECT_DIR is set by the TUI preview (targetDir) and by Claude Code
219
+ # hooks (the project being coded in), so per-LLM config written there is found
220
+ # even in npm link / global install setups where the package dir is elsewhere.
221
+ $_AudioEffectsCfgPaths = [System.Collections.Generic.List[string]]::new()
222
+ if ($env:CLAUDE_PROJECT_DIR) {
223
+ $_AudioEffectsCfgPaths.Add((Join-Path $env:CLAUDE_PROJECT_DIR ".claude\config\audio-effects.cfg"))
224
+ }
225
+ $_AudioEffectsCfgPaths.Add((Join-Path $ClaudeDir "config\audio-effects.cfg"))
226
+ $_AudioEffectsCfgPaths.Add((Join-Path $env:USERPROFILE ".claude\config\audio-effects.cfg"))
210
227
 
211
228
  $_LlmFound = $false
212
229
  :llmCfgSearch foreach ($_cfgFile in $_AudioEffectsCfgPaths) {
@@ -309,15 +326,24 @@ if ($OverrideEffects -ne "" -and $OverrideEffects -in @("off", "light", "medium"
309
326
  # TTS to a remote host — overriding with a local engine would synthesize on
310
327
  # the wrong machine.
311
328
  if ($_LlmEngine) {
312
- $allowedLocalEngines = @("windows-sapi", "windows-piper", "soprano")
313
- if ($allowedLocalEngines -contains $_LlmEngine) {
314
- switch ($_LlmEngine) {
315
- "windows-sapi" { $ProviderScript = "$HooksDir\play-tts-windows-sapi.ps1" }
316
- "windows-piper" { $ProviderScript = "$HooksDir\play-tts-windows-piper.ps1" }
317
- "soprano" { $ProviderScript = "$HooksDir\play-tts-soprano.ps1" }
329
+ # Accept both canonical Windows names and the cross-platform aliases the TUI
330
+ # writes (e.g. "piper" saved on a Linux/WSL install that is later read on
331
+ # Windows, or "sapi" as a short form). Unknown values keep the global default.
332
+ # Mirror the global-provider switch: prefer the PS-5.1-compatible script name,
333
+ # fall back to the alternate name if the first doesn't exist on disk.
334
+ switch ($_LlmEngine) {
335
+ { $_ -in "windows-sapi", "sapi" } {
336
+ $ProviderScript = "$HooksDir\play-tts-sapi.ps1"
337
+ if (-not (Test-Path $ProviderScript)) { $ProviderScript = "$HooksDir\play-tts-windows-sapi.ps1" }
338
+ }
339
+ { $_ -in "windows-piper", "piper" } {
340
+ $ProviderScript = "$HooksDir\play-tts-piper.ps1"
341
+ if (-not (Test-Path $ProviderScript)) { $ProviderScript = "$HooksDir\play-tts-windows-piper.ps1" }
342
+ }
343
+ "soprano" { $ProviderScript = "$HooksDir\play-tts-soprano.ps1" }
344
+ default {
345
+ Write-Host "[INFO] play-tts.ps1: Unrecognised engine '$_LlmEngine' — keeping default provider" -ForegroundColor DarkGray
318
346
  }
319
- } else {
320
- Write-Host "[INFO] play-tts.ps1: Unrecognised engine '$_LlmEngine' in audio-effects.cfg — keeping default provider" -ForegroundColor DarkGray
321
347
  }
322
348
  }
323
349
 
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  [![Publish](https://github.com/paulpreibisch/AgentVibes/actions/workflows/publish.yml/badge.svg)](https://github.com/paulpreibisch/AgentVibes/actions/workflows/publish.yml)
12
12
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
13
13
 
14
- **Author**: Paul Preibisch ([@997Fire](https://x.com/997Fire)) | **Version**: v5.6.5
14
+ **Author**: Paul Preibisch ([@997Fire](https://x.com/997Fire)) | **Version**: v5.6.7
15
15
 
16
16
  ---
17
17
 
@@ -40,7 +40,17 @@ Whether you're coding in Claude Code, chatting in Claude Desktop, using Warp Ter
40
40
 
41
41
  ---
42
42
 
43
- ## 🌟 NEW IN v5.6.4Critical Uninstall Safety Fix
43
+ ## 🌟 NEW IN v5.6.7Windows Preview Fixed
44
+
45
+ The **Preview button in LLM audio configuration now works correctly on Windows**. It plays the voice, reverb, and background track you configured — no more defaulting to the wrong voice or playing silence.
46
+
47
+ ## v5.6.6 — Preview Button Works in WSL + Comprehensive Windows Test Suite
48
+
49
+ **The Preview button in LLM audio configuration now works correctly in WSL.** When configuring a voice, reverb, and background track for each LLM, clicking Preview now plays your full audio setup — voice, music, and effects — exactly as it will sound during a real session. Previously, background music was silently dropped in `npm link` and global-install setups.
50
+
51
+ A **comprehensive Windows test suite** has been added to CI, running alongside the existing Linux BATS suite. Windows-specific audio paths are now verified on every push — regressions can't slip through silently.
52
+
53
+ ## v5.6.4 — Critical Uninstall Safety Fix
44
54
 
45
55
  `uninstall --global` was removing your entire `~/.claude/` directory — settings, CLAUDE.md, skills, MCP configs, everything. Fixed: AgentVibes now performs a surgical removal, only touching files it created. A regression test in CI enforces this going forward — if it ever regresses, the build breaks before it ships.
46
56
 
package/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # AgentVibes Release Notes
2
2
 
3
+ ## 🪟 v5.6.7 — Windows Preview Fixed
4
+
5
+ **Released:** 2026-05-08
6
+
7
+ ### 🐛 Preview Button Now Works Correctly on Windows
8
+
9
+ When configuring audio per LLM on Windows, clicking **Preview** was playing the wrong voice (defaulting to Windows SAPI) with no background music or reverb. Now it plays exactly the voice, reverb, and background track you configured.
10
+
11
+ ### 🧪 Regression Tests Added
12
+
13
+ Two new Windows CI tests verify the preview config lookup — so this can't regress silently in a future release.
14
+
15
+ ---
16
+
17
+ ## 🎵 v5.6.6 — Preview Button Works in WSL + Comprehensive Windows Test Suite
18
+
19
+ **Released:** 2026-05-08
20
+
21
+ ### 🐛 Background Music Silently Missing from Preview (npm link / Global Install)
22
+
23
+ When you clicked **Preview** in the LLM configure modal with a background track set, you heard only the voice — no music — unless AgentVibes was installed as a local dependency. Fixed regardless of how you install AgentVibes.
24
+
25
+ **Root cause:** In `npm link` and global-install setups, a sync script using `rsync --delete` periodically erased `background-music-enabled.txt` from the package directory because the file is gitignored. After deletion, `audio-processor.sh` fell back to a global config that had music disabled — silence.
26
+
27
+ **Fix:** `audio-processor.sh` now checks `CLAUDE_PROJECT_DIR/.claude/config/background-music-enabled.txt` **first**. The TUI Preview also writes the flag to the project directory (not the package directory), so it survives any package-dir sync.
28
+
29
+ ### 🐛 Per-LLM Config Not Found in npm link / Global Installs
30
+
31
+ In the same setups, `audio-processor.sh` couldn't find per-LLM audio configuration (voice, reverb, background track) when your project wasn't the AgentVibes package itself.
32
+
33
+ **Fix:** The script now searches `CLAUDE_PROJECT_DIR/.claude/config/audio-effects.cfg` before falling back to the package config.
34
+
35
+ ### 🐛 Background Track "Not Found" After Correct Config
36
+
37
+ When a background track was configured but AgentVibes was installed globally or via `npm link`, the track file couldn't be found — only the package directory was searched.
38
+
39
+ **Fix:** `audio-processor.sh` now also searches `CLAUDE_PROJECT_DIR/.claude/audio/tracks/` when the track isn't in the package directory.
40
+
41
+ ### 🐛 LLM Config Row Parsing — Volume Absorbing Extra Columns
42
+
43
+ With a full 7-column LLM row (the format the TUI writes), the volume field absorbed all trailing columns. ffmpeg received a malformed volume string and silently fell back to voice-only audio.
44
+
45
+ **Fix:** Parser now captures only the numeric volume field, leaving extra columns in `_rest`.
46
+
47
+ ### 🧪 Windows CI Test Suite
48
+
49
+ Windows-native tests now run in CI alongside the Linux BATS suite, gating publishing so Windows-specific paths can't regress silently.
50
+
51
+ ---
52
+
3
53
  ## 🛡️ v5.6.4 — Critical Uninstall Safety Fix
4
54
 
5
55
  **Released:** 2026-05-08
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": "5.6.5",
4
+ "version": "5.6.7",
5
5
  "description": "Now your AI Agents can finally talk back! Professional TTS voice for Claude Code, Claude Desktop (via MCP), and Clawdbot with multi-provider support.",
6
6
  "homepage": "https://agentvibes.org",
7
7
  "keywords": [
@@ -1790,8 +1790,21 @@ export function createSetupTab(screen, services) {
1790
1790
  // Save first so play-tts picks up current settings
1791
1791
  _autoSave(true);
1792
1792
 
1793
+ const hooksSubdir = process.platform === 'win32' ? 'hooks-windows' : 'hooks';
1794
+ const isWin = process.platform === 'win32' && !process.env.WSL_DISTRO_NAME;
1795
+ // Don't include pretext — play-tts already prepends it from the config
1796
+ const sampleText = 'This is how your audio settings sound right now.';
1797
+
1798
+ // Prefer package hooks (always up-to-date) over project-local copies which
1799
+ // may be stale installs from an older version. Fall back to targetDir if
1800
+ // the package hook doesn't exist (e.g. custom project-only setups).
1801
+ const _playTtsName = path.join('.claude', hooksSubdir, isWin ? 'play-tts.ps1' : 'play-tts.sh');
1802
+ const _hooksBase = fs.existsSync(path.join(packageDir, _playTtsName)) ? packageDir : targetDir;
1803
+
1793
1804
  // Temporarily enable background music for preview if a track is configured.
1794
- // audio-processor.sh reads background-music-enabled.txt — write directly to that file.
1805
+ // Write to targetDir (project): audio-processor.sh checks CLAUDE_PROJECT_DIR first
1806
+ // (which is set to targetDir in the subprocess env), so this survives npm-link syncs
1807
+ // that would delete files from the package dir via rsync --delete.
1795
1808
  if (!!draft.bgTrack) {
1796
1809
  const bgEnabledFile = path.join(targetDir, '.claude', 'config', 'background-music-enabled.txt');
1797
1810
  let bgWas = false;
@@ -1805,17 +1818,6 @@ export function createSetupTab(screen, services) {
1805
1818
  }
1806
1819
  }
1807
1820
 
1808
- const hooksSubdir = process.platform === 'win32' ? 'hooks-windows' : 'hooks';
1809
- const isWin = process.platform === 'win32' && !process.env.WSL_DISTRO_NAME;
1810
- // Don't include pretext — play-tts already prepends it from the config
1811
- const sampleText = 'This is how your audio settings sound right now.';
1812
-
1813
- // Prefer package hooks (always up-to-date) over project-local copies which
1814
- // may be stale installs from an older version. Fall back to targetDir if
1815
- // the package hook doesn't exist (e.g. custom project-only setups).
1816
- const _playTtsName = path.join('.claude', hooksSubdir, isWin ? 'play-tts.ps1' : 'play-tts.sh');
1817
- const _hooksBase = fs.existsSync(path.join(packageDir, _playTtsName)) ? packageDir : targetDir;
1818
-
1819
1821
  let cmd, args;
1820
1822
  if (isWin) {
1821
1823
  const script = path.join(_hooksBase, '.claude', hooksSubdir, 'play-tts.ps1');
@@ -1 +0,0 @@
1
- true