agentvibes 5.12.0 → 5.13.1

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 (73) hide show
  1. package/.agentvibes/install-manifest.json +111 -91
  2. package/.claude/commands/agent-vibes/commands.json +0 -20
  3. package/.claude/commands/agent-vibes/unmute.md +6 -2
  4. package/.claude/config/audio-effects.cfg +6 -6
  5. package/.claude/github-star-reminder.txt +1 -1
  6. package/.claude/hooks/agentvibes-session-id.sh +69 -0
  7. package/.claude/hooks/bmad-party-speak.sh +20 -4
  8. package/.claude/hooks/bmad-speak.sh +60 -2
  9. package/.claude/hooks/bmad-tts-injector.sh +20 -1
  10. package/.claude/hooks/bmad-voice-manager.sh +25 -3
  11. package/.claude/hooks/clawdbot-receiver-SECURE.sh +21 -2
  12. package/.claude/hooks/clawdbot-receiver.sh +19 -1
  13. package/.claude/hooks/elevenlabs-voices.sh +62 -0
  14. package/.claude/hooks/kokoro-installer.sh +20 -10
  15. package/.claude/hooks/language-manager.sh +10 -3
  16. package/.claude/hooks/party-set-room.sh +71 -0
  17. package/.claude/hooks/party-stage-roster.py +328 -0
  18. package/.claude/hooks/personality-manager.sh +19 -2
  19. package/.claude/hooks/piper-voice-manager.sh +3 -2
  20. package/.claude/hooks/play-tts-agentvibes-receiver-for-voiceless-connections.sh +24 -5
  21. package/.claude/hooks/play-tts-elevenlabs.sh +38 -118
  22. package/.claude/hooks/play-tts-kokoro.sh +33 -6
  23. package/.claude/hooks/play-tts-soprano.sh +3 -2
  24. package/.claude/hooks/play-tts-ssh-remote.sh +37 -29
  25. package/.claude/hooks/play-tts-termux-ssh.sh +5 -4
  26. package/.claude/hooks/play-tts.sh +66 -61
  27. package/.claude/hooks/provider-catalog.json +352 -0
  28. package/.claude/hooks/provider-catalog.sh +161 -0
  29. package/.claude/hooks/provider-commands.sh +2 -1
  30. package/.claude/hooks/provider-manager.sh +47 -9
  31. package/.claude/hooks/python-resolver.sh +117 -0
  32. package/.claude/hooks/session-id.sh +56 -0
  33. package/.claude/hooks/session-start-tts.sh +39 -0
  34. package/.claude/hooks/speed-manager.sh +1 -1
  35. package/.claude/hooks/translate-manager.sh +3 -2
  36. package/.claude/hooks/translator.py +1 -1
  37. package/.claude/hooks/voice-manager.sh +242 -10
  38. package/.claude/hooks-windows/language-manager.ps1 +7 -1
  39. package/.claude/hooks-windows/personality-manager.ps1 +16 -1
  40. package/.claude/hooks-windows/play-tts-kokoro.ps1 +20 -4
  41. package/.claude/hooks-windows/play-tts.ps1 +32 -3
  42. package/.claude/hooks-windows/provider-catalog.ps1 +140 -0
  43. package/.claude/hooks-windows/provider-manager.ps1 +63 -8
  44. package/.claude/hooks-windows/tts-watcher.ps1 +33 -12
  45. package/.claude/hooks-windows/voice-manager-windows.ps1 +49 -0
  46. package/.mcp.json +0 -7
  47. package/README.md +12 -3
  48. package/RELEASE_NOTES.md +61 -0
  49. package/mcp-server/server.py +146 -49
  50. package/mcp-server/test_mcp_correctness.py +20 -2
  51. package/mcp-server/test_windows_script_parity.py +0 -2
  52. package/package.json +2 -2
  53. package/src/cli/list-voices.js +218 -114
  54. package/src/console/bling.js +71 -0
  55. package/src/console/music-preview.js +79 -0
  56. package/src/console/tabs/music-tab.js +16 -39
  57. package/src/console/tabs/settings-tab.js +195 -13
  58. package/src/console/tabs/setup-tab.js +9 -34
  59. package/src/console/tabs/voices-tab.js +83 -14
  60. package/src/console/widgets/track-picker.js +82 -0
  61. package/src/installer.js +136 -18
  62. package/src/services/provider-catalog.js +412 -0
  63. package/src/services/provider-voice-catalog.js +52 -73
  64. package/src/services/tts-engine-service.js +29 -0
  65. package/src/utils/provider-validator.js +62 -12
  66. package/.claude/commands/agent-vibes/language.md +0 -23
  67. package/.claude/commands/agent-vibes/learn.md +0 -67
  68. package/.claude/commands/agent-vibes/replay-target.md +0 -14
  69. package/.claude/commands/agent-vibes/target-voice.md +0 -26
  70. package/.claude/commands/agent-vibes/target.md +0 -30
  71. package/.claude/hooks/learn-manager.sh +0 -492
  72. package/.claude/hooks/replay-target-audio.sh +0 -95
  73. package/.claude/hooks-windows/learn-manager.ps1 +0 -241
@@ -7,6 +7,64 @@ import { spawnSync } from 'node:child_process';
7
7
  import path from 'node:path'; // For safe path operations and traversal prevention
8
8
  import fs from 'node:fs'; // For checking file/directory existence
9
9
  import os from 'node:os'; // For os.homedir() to prevent HOME injection attacks
10
+ import { listProviders, displayName as catalogDisplayName } from '../services/provider-catalog.js';
11
+
12
+ /**
13
+ * Canonical set of TTS synthesis providers AgentVibes knows how to use.
14
+ * SINGLE SOURCE OF TRUTH: every user-facing dispatcher (MCP set_provider
15
+ * allowlist, voice switch, voice list, Windows provider manager) must recognise
16
+ * these providers — platform-scoped where noted below. A provider that lives
17
+ * here but is missing from a dispatcher is the "silent drop to Piper / Unknown
18
+ * provider" class of bug (see AVI-S8.1). The dispatcher-parity conformance test
19
+ * asserts this invariant.
20
+ *
21
+ * Platform notes: `macos` is Darwin-only; `windows-sapi`/`windows-piper` are
22
+ * Windows-only. `kokoro` ships a play-tts runtime on BOTH Unix
23
+ * (play-tts-kokoro.sh) and PowerShell (play-tts-kokoro.ps1). `elevenlabs` ships
24
+ * a Unix runtime only (play-tts-elevenlabs.sh) — there is NO
25
+ * play-tts-elevenlabs.ps1 yet — so it is recognised by the portable (bash/JS)
26
+ * dispatchers but intentionally excluded from the Windows provider manager
27
+ * until a PowerShell runtime lands (AVI-S8.2).
28
+ * @type {readonly string[]}
29
+ */
30
+ export const SUPPORTED_PROVIDERS = Object.freeze(listProviders().map((p) => p.id));
31
+
32
+ /**
33
+ * Providers that use the SAME id on every OS and have at least a Unix (bash)
34
+ * runtime. Every PORTABLE dispatcher — the MCP set_provider allowlist,
35
+ * voice-manager.sh, and list-voices.js — must recognise these regardless of
36
+ * platform. DERIVED VIEW over the catalog: the providers with a Unix runtime
37
+ * whose voices are enumerable without disk (static/name-to-id) — i.e. kokoro and
38
+ * elevenlabs.
39
+ * @type {readonly string[]}
40
+ */
41
+ export const CROSS_PLATFORM_PROVIDERS = Object.freeze(
42
+ listProviders()
43
+ .filter((p) => p.runtime.unix !== null && (p.voiceModel === 'static' || p.voiceModel === 'name-to-id'))
44
+ .map((p) => p.id),
45
+ );
46
+
47
+ /**
48
+ * Subset of {@link CROSS_PLATFORM_PROVIDERS} that ALSO ships a PowerShell runtime
49
+ * (play-tts-*.ps1), so the Windows provider manager (provider-manager.ps1) must
50
+ * recognise them too. `elevenlabs` is excluded until play-tts-elevenlabs.ps1
51
+ * exists (AVI-S8.2). DERIVED VIEW over the catalog.
52
+ * @type {readonly string[]}
53
+ */
54
+ export const WINDOWS_RUNTIME_PROVIDERS = Object.freeze(
55
+ listProviders()
56
+ .filter((p) => p.runtime.unix !== null && (p.voiceModel === 'static' || p.voiceModel === 'name-to-id') && p.runtime.windows !== null)
57
+ .map((p) => p.id),
58
+ );
59
+
60
+ /**
61
+ * Is `name` a provider AgentVibes canonically supports?
62
+ * @param {string} name
63
+ * @returns {boolean}
64
+ */
65
+ export function isKnownProvider(name) {
66
+ return SUPPORTED_PROVIDERS.includes(String(name || '').toLowerCase());
67
+ }
10
68
 
11
69
  /**
12
70
  * Helper: Check if command exists in PATH
@@ -603,16 +661,8 @@ function getPackageInfo(pkgName) {
603
661
  * @returns {string} Display name
604
662
  */
605
663
  export function getProviderDisplayName(providerName) {
606
- const names = {
607
- soprano: 'Soprano TTS',
608
- piper: 'Piper TTS',
609
- kokoro: 'Kokoro TTS',
610
- elevenlabs: 'ElevenLabs',
611
- macos: 'macOS Say',
612
- sapi: 'Windows SAPI',
613
- 'windows-sapi': 'Windows SAPI',
614
- 'windows-piper': 'Piper TTS'
615
- };
616
-
617
- return names[providerName] || providerName;
664
+ // DERIVED VIEW: delegate to the Provider Catalog (single source of truth for
665
+ // display names). The catalog resolves aliases (e.g. 'sapi' → Windows SAPI) and
666
+ // passes unknown ids through unchanged, preserving this function's contract.
667
+ return catalogDisplayName(providerName);
618
668
  }
@@ -1,23 +0,0 @@
1
- ---
2
- description: Set your main/native language for learning mode
3
- ---
4
-
5
- Set your main/native language. This is the language you already know and will hear first when learning mode is enabled.
6
-
7
- Usage:
8
- ```
9
- /agent-vibes:language english
10
- /agent-vibes:language spanish
11
- /agent-vibes:language french
12
- ```
13
-
14
- The main language uses your currently selected voice. When learning mode is ON, TTS will speak in your main language FIRST, then translate to your target language.
15
-
16
- Default: english
17
-
18
- Supported languages: english, spanish, french, german, italian, portuguese, chinese, japanese, korean, hindi, arabic, polish, dutch, turkish, swedish, russian, and 15+ more.
19
-
20
- After setting your main language:
21
- 1. Set your target language with `/agent-vibes:target <language>`
22
- 2. Set target voice with `/agent-vibes:target-voice <voice>`
23
- 3. Enable learning mode with `/agent-vibes:learn`
@@ -1,67 +0,0 @@
1
- ---
2
- description: Enable or disable language learning mode
3
- ---
4
-
5
- Turn language learning mode ON or OFF. When enabled, Claude will speak acknowledgments and completions in BOTH your main language and target language.
6
-
7
- Usage:
8
- ```
9
- /agent-vibes:learn # Turn ON
10
- /agent-vibes:learn off # Turn OFF
11
- /agent-vibes:learn status # Show current setup
12
- ```
13
-
14
- ## How Learning Mode Works:
15
-
16
- When learning mode is **ON**:
17
- 1. **First**: Speak in your main language (using your current voice)
18
- 2. **Then**: Speak the SAME message translated to your target language (using target voice)
19
-
20
- Example:
21
- ```
22
- Main language (English, Aria): "I'll check that for you"
23
- Target language (Spanish, Antoni): "Lo verificaré para ti"
24
- ```
25
-
26
- ## Setup Steps:
27
-
28
- 1. Set your main language:
29
- ```
30
- /agent-vibes:language english
31
- ```
32
-
33
- 2. Set your target language:
34
- ```
35
- /agent-vibes:target spanish
36
- ```
37
-
38
- 3. Set target voice (recommended):
39
- ```
40
- /agent-vibes:target-voice Antoni
41
- ```
42
-
43
- 4. Enable learning mode:
44
- ```
45
- /agent-vibes:learn
46
- ```
47
-
48
- 5. Check your setup:
49
- ```
50
- /agent-vibes:learn status
51
- ```
52
-
53
- ## Notes:
54
-
55
- - Translations are **direct translations** of what was said in the main language
56
- - Same **personality/sentiment** applies to both languages
57
- - Works with all AgentVibes features (BMAD, personalities, etc.)
58
- - Requires multilingual voices for target language (Antoni, Rachel, Domi, Bella, etc.)
59
- - Small pause (0.5s) between main and target language announcements
60
-
61
- ## Disable Learning Mode:
62
-
63
- ```
64
- /agent-vibes:learn off
65
- ```
66
-
67
- This returns to normal single-language TTS mode.
@@ -1,14 +0,0 @@
1
- ---
2
- description: Replay the last target language audio (for language learning mode)
3
- ---
4
-
5
- Replay the last message that was spoken in your target language during language learning mode.
6
-
7
- This is useful when learning a new language - you can hear the translation again without triggering a new one.
8
-
9
- Usage:
10
- - `/agent-vibes:replay-target` - Replay the last target language audio
11
-
12
- **Note:** This only works when language learning mode is active (`/agent-vibes:learn`).
13
-
14
- !bash .claude/hooks/replay-target-audio.sh
@@ -1,26 +0,0 @@
1
- ---
2
- description: Set the voice for your target language
3
- ---
4
-
5
- Set which voice to use when speaking your target language. This should typically be a multilingual voice that supports your target language.
6
-
7
- Usage:
8
- ```
9
- /agent-vibes:target-voice Antoni
10
- /agent-vibes:target-voice Rachel
11
- /agent-vibes:target-voice Domi
12
- ```
13
-
14
- Recommended multilingual voices:
15
- - **Antoni** - Best for Spanish, Portuguese
16
- - **Rachel** - Best for French, English
17
- - **Domi** - Best for German, European languages
18
- - **Bella** - Best for Italian, Romance languages
19
- - **Charlotte** - European languages
20
- - **Matilda** - Latin languages
21
-
22
- These voices support 30+ languages using Piper TTS' Multilingual v2 model.
23
-
24
- After setting your target voice:
25
- - Enable learning mode with `/agent-vibes:learn`
26
- - Check your setup with `/agent-vibes:learn status`
@@ -1,30 +0,0 @@
1
- ---
2
- description: Set the language you want to learn
3
- ---
4
-
5
- Set the target language you want to learn. When learning mode is enabled, TTS will speak in your main language FIRST, then speak the translation in your target language.
6
-
7
- Usage:
8
- ```
9
- /agent-vibes:target spanish
10
- /agent-vibes:target french
11
- /agent-vibes:target german
12
- ```
13
-
14
- Recommended voices by target language:
15
- - Spanish → Antoni (Piper TTS) / es_ES-davefx-medium (Piper)
16
- - French → Rachel (Piper TTS) / fr_FR-siwis-medium (Piper)
17
- - German → Domi (Piper TTS) / de_DE-thorsten-medium (Piper)
18
- - Italian → Bella (Piper TTS) / it_IT-riccardo-x_low (Piper)
19
- - Portuguese → Matilda (Piper TTS) / pt_BR-faber-medium (Piper)
20
- - Chinese → Amy (Piper TTS) / zh_CN-huayan-medium (Piper)
21
- - Japanese → Antoni (Piper TTS) / ja_JP-hikari-medium (Piper)
22
- - Other languages → Antoni (Piper TTS) / check available Piper voices
23
-
24
- **Note:** The system will automatically suggest the correct voice based on your active TTS provider. After setting your target language, the suggestion will match whether you're using Piper TTS or Piper.
25
-
26
- After setting your target language:
27
- 1. Set the voice for target language with `/agent-vibes:target-voice <voice>`
28
- 2. Enable learning mode with `/agent-vibes:learn`
29
-
30
- Supported languages: spanish, french, german, italian, portuguese, chinese, japanese, korean, hindi, arabic, polish, dutch, turkish, swedish, russian, and 15+ more.