agentvibes 5.12.0-alpha.0 → 5.13.0

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 (129) hide show
  1. package/.agentvibes/config.json +15 -1
  2. package/.agentvibes/install-manifest.json +342 -0
  3. package/.claude/activation-instructions +54 -54
  4. package/.claude/commands/agent-vibes/commands.json +0 -20
  5. package/.claude/commands/agent-vibes/unmute.md +6 -2
  6. package/.claude/commands/agent-vibes-bmad-voices.md +117 -117
  7. package/.claude/commands/agent-vibes-rdp.md +24 -24
  8. package/.claude/config/audio-effects.cfg +6 -6
  9. package/.claude/config/audio-effects.cfg.bak-kokoro +7 -0
  10. package/.claude/config/background-music-enabled.txt +1 -1
  11. package/.claude/config/background-music-position.txt +27 -0
  12. package/.claude/config/background-music-volume.txt +1 -0
  13. package/.claude/config/background-music.cfg +1 -0
  14. package/.claude/config/background-music.txt +1 -0
  15. package/.claude/config/language.txt +1 -0
  16. package/.claude/config/personality.txt +1 -0
  17. package/.claude/config/tts-speech-rate.txt +1 -0
  18. package/.claude/config/tts-verbosity.txt +1 -0
  19. package/.claude/docs/TERMUX_SETUP.md +408 -408
  20. package/.claude/github-star-reminder.txt +1 -1
  21. package/.claude/hooks/agentvibes-session-id.sh +69 -0
  22. package/.claude/hooks/bmad-party-speak.sh +20 -4
  23. package/.claude/hooks/bmad-speak.sh +60 -2
  24. package/.claude/hooks/bmad-tts-injector.sh +20 -1
  25. package/.claude/hooks/bmad-voice-manager.sh +25 -3
  26. package/.claude/hooks/clawdbot-receiver-SECURE.sh +21 -2
  27. package/.claude/hooks/clawdbot-receiver.sh +19 -1
  28. package/.claude/hooks/elevenlabs-voices.sh +62 -0
  29. package/.claude/hooks/kokoro-installer.sh +20 -10
  30. package/.claude/hooks/language-manager.sh +10 -3
  31. package/.claude/hooks/party-set-room.sh +71 -0
  32. package/.claude/hooks/party-stage-roster.py +328 -0
  33. package/.claude/hooks/personality-manager.sh +19 -2
  34. package/.claude/hooks/piper-voice-manager.sh +3 -2
  35. package/.claude/hooks/play-tts-agentvibes-receiver-for-voiceless-connections.sh +24 -5
  36. package/.claude/hooks/play-tts-elevenlabs.sh +38 -118
  37. package/.claude/hooks/play-tts-kokoro.sh +33 -6
  38. package/.claude/hooks/play-tts-soprano.sh +3 -2
  39. package/.claude/hooks/play-tts-ssh-remote.sh +72 -27
  40. package/.claude/hooks/play-tts-termux-ssh.sh +5 -4
  41. package/.claude/hooks/play-tts.sh +86 -69
  42. package/.claude/hooks/provider-catalog.json +352 -0
  43. package/.claude/hooks/provider-catalog.sh +161 -0
  44. package/.claude/hooks/provider-commands.sh +2 -1
  45. package/.claude/hooks/provider-manager.sh +47 -9
  46. package/.claude/hooks/python-resolver.sh +117 -0
  47. package/.claude/hooks/session-id.sh +56 -0
  48. package/.claude/hooks/session-start-tts.sh +39 -0
  49. package/.claude/hooks/speed-manager.sh +1 -1
  50. package/.claude/hooks/translate-manager.sh +3 -2
  51. package/.claude/hooks/translator.py +1 -1
  52. package/.claude/hooks/voice-manager.sh +242 -10
  53. package/.claude/hooks-windows/audio-cache-utils.ps1.user.bak +119 -0
  54. package/.claude/hooks-windows/language-manager.ps1 +7 -1
  55. package/.claude/hooks-windows/personality-manager.ps1 +16 -1
  56. package/.claude/hooks-windows/play-tts-kokoro.ps1 +20 -4
  57. package/.claude/hooks-windows/play-tts.ps1 +32 -3
  58. package/.claude/hooks-windows/provider-catalog.ps1 +140 -0
  59. package/.claude/hooks-windows/provider-manager.ps1 +63 -8
  60. package/.claude/hooks-windows/soprano-gradio-synth.py.user.bak +153 -0
  61. package/.claude/hooks-windows/tts-watcher.ps1 +84 -8
  62. package/.claude/hooks-windows/voice-manager-windows.ps1 +49 -0
  63. package/.claude/piper-voices-dir.txt +1 -0
  64. package/.clawdbot/README.md +105 -105
  65. package/.mcp.json +15 -0
  66. package/LICENSE +190 -190
  67. package/README.md +20 -6
  68. package/RELEASE_NOTES.md +81 -0
  69. package/WINDOWS-SETUP.md +208 -208
  70. package/bin/agent-vibes +39 -39
  71. package/bin/mcp-server.js +121 -121
  72. package/bin/test-bmad-pr +78 -78
  73. package/mcp-server/QUICK_START.md +203 -203
  74. package/mcp-server/README.md +345 -345
  75. package/mcp-server/examples/claude_desktop_config.json +11 -11
  76. package/mcp-server/examples/claude_desktop_config_piper.json +9 -9
  77. package/mcp-server/examples/custom_instructions.md +169 -169
  78. package/mcp-server/pyproject.toml +52 -52
  79. package/mcp-server/requirements.txt +2 -2
  80. package/mcp-server/server.py +146 -49
  81. package/mcp-server/test_mcp_correctness.py +20 -2
  82. package/mcp-server/test_server.py +395 -395
  83. package/mcp-server/test_windows_script_parity.py +0 -2
  84. package/package.json +1 -1
  85. package/src/cli/list-personalities.js +110 -110
  86. package/src/cli/list-voices.js +115 -11
  87. package/src/commands/bmad-voices.js +394 -394
  88. package/src/console/app.js +1 -9
  89. package/src/console/bling.js +71 -0
  90. package/src/console/brand-colors.js +13 -13
  91. package/src/console/constants/personalities.js +44 -44
  92. package/src/console/footer-config.js +0 -4
  93. package/src/console/music-preview.js +79 -0
  94. package/src/console/navigation.js +0 -1
  95. package/src/console/tabs/agents-tab.js +14 -2
  96. package/src/console/tabs/help-tab.js +314 -314
  97. package/src/console/tabs/music-tab.js +81 -5
  98. package/src/console/tabs/placeholder-tab.js +0 -2
  99. package/src/console/tabs/readme-tab.js +272 -272
  100. package/src/console/tabs/settings-tab.js +207 -14
  101. package/src/console/tabs/setup-tab.js +39 -36
  102. package/src/console/tabs/voices-tab.js +102 -23
  103. package/src/console/widgets/destroy-list.js +25 -25
  104. package/src/console/widgets/notice.js +55 -55
  105. package/src/console/widgets/track-picker.js +82 -0
  106. package/src/installer/language-screen.js +31 -31
  107. package/src/installer/music-file-input.js +304 -304
  108. package/src/installer.js +124 -10
  109. package/src/services/language-service.js +47 -47
  110. package/src/services/navigation-service.js +1 -1
  111. package/src/services/provider-catalog.js +412 -0
  112. package/src/services/provider-voice-catalog.js +52 -73
  113. package/src/services/tts-engine-service.js +29 -0
  114. package/src/utils/audio-format-validator.js +277 -277
  115. package/src/utils/dependency-checker.js +469 -469
  116. package/src/utils/file-ownership-verifier.js +358 -358
  117. package/src/utils/music-file-validator.js +285 -285
  118. package/src/utils/preview-list-prompt.js +144 -144
  119. package/src/utils/provider-validator.js +62 -12
  120. package/src/utils/secure-music-storage.js +412 -412
  121. package/voice-assignments.json +8244 -8244
  122. package/.claude/commands/agent-vibes/language.md +0 -23
  123. package/.claude/commands/agent-vibes/learn.md +0 -67
  124. package/.claude/commands/agent-vibes/replay-target.md +0 -14
  125. package/.claude/commands/agent-vibes/target-voice.md +0 -26
  126. package/.claude/commands/agent-vibes/target.md +0 -30
  127. package/.claude/hooks/learn-manager.sh +0 -492
  128. package/.claude/hooks/replay-target-audio.sh +0 -95
  129. package/.claude/hooks-windows/learn-manager.ps1 +0 -241
@@ -11,16 +11,20 @@
11
11
 
12
12
  import fs from 'node:fs';
13
13
  import path from 'node:path';
14
- import os from 'node:os';
15
14
  import { fileURLToPath } from 'node:url';
16
15
  import { buildAudioEnv, spawnMp3Player } from '../audio-env.js';
16
+ import { resolveMusicProvider, spawnMusicRemote } from '../music-preview.js';
17
+ import { playBlingCue } from '../bling.js';
17
18
  import { t } from '../../i18n/strings.js';
18
19
 
20
+ const _MUSIC_TAB_DIR = path.dirname(fileURLToPath(import.meta.url));
21
+
22
+ // AgentVibes package/repo root — used to resolve bundled assets (tracks dir,
23
+ // bling cue) and as the package fallback when resolving the active provider.
24
+ const _PKG_ROOT = path.resolve(_MUSIC_TAB_DIR, '..', '..', '..');
25
+
19
26
  // Package-relative tracks dir — used as fallback when cwd has no .claude/audio/tracks/
20
- const _PKG_TRACKS_DIR = path.resolve(
21
- path.dirname(fileURLToPath(import.meta.url)),
22
- '..', '..', '..', '.claude', 'audio', 'tracks'
23
- );
27
+ const _PKG_TRACKS_DIR = path.join(_PKG_ROOT, '.claude', 'audio', 'tracks');
24
28
 
25
29
  const IS_TEST = process.env.AGENTVIBES_TEST_MODE === 'true';
26
30
 
@@ -540,6 +544,10 @@ export function createMusicTab(screen, services) {
540
544
 
541
545
  let _playingProcess = null;
542
546
  let _playingTrackId = null;
547
+ // Remote playback is fire-and-forget (the local sender exits in ms while the
548
+ // receiver keeps playing), so the on/off toggle tracks the intended remote
549
+ // track here rather than relying on a live local process.
550
+ let _remotePlayingTrackId = null;
543
551
 
544
552
  function _killPlayingProcess() {
545
553
  if (_playingProcess) {
@@ -550,6 +558,44 @@ export function createMusicTab(screen, services) {
550
558
 
551
559
  const _spawnEnv = buildAudioEnv();
552
560
 
561
+ /**
562
+ * Spawn the SSH sender to play a music track on the receiver, or stop the
563
+ * current one. Fire-and-forget (the sender exits after handing the payload to
564
+ * SSH; the receiver plays/stops asynchronously). Returns true if the send was
565
+ * launched. On a play error the remote-playing state is cleared so the toggle
566
+ * doesn't get stuck "on".
567
+ * @param {{remote:boolean, projectDir:string}} mp
568
+ * @param {{track?:string, stop?:boolean}} opts
569
+ */
570
+ function _sendMusicRemote(mp, { track = null, stop = false } = {}) {
571
+ let rproc;
572
+ try {
573
+ rproc = spawnMusicRemote({ packageRoot: _PKG_ROOT, projectDir: mp.projectDir, env: _spawnEnv, track, stop });
574
+ } catch {
575
+ previewLine.setContent('{red-fg}Remote music preview failed{/red-fg}');
576
+ screen.render();
577
+ setTimeout(() => { previewLine.setContent(_listFocused ? _hintText() : ''); screen.render(); }, 4000);
578
+ return false;
579
+ }
580
+ let _rerr = '';
581
+ if (rproc.stderr) rproc.stderr.on('data', d => { _rerr += d.toString(); });
582
+ rproc.on('exit', (code) => {
583
+ if (stop || code === 0) return;
584
+ if (_remotePlayingTrackId === track) _remotePlayingTrackId = null;
585
+ const msg = _rerr.trim().split('\n').pop() || 'Remote preview failed';
586
+ previewLine.setContent(`{red-fg}♪ ${msg}{/red-fg}`);
587
+ screen.render();
588
+ setTimeout(() => { previewLine.setContent(_listFocused ? _hintText() : ''); screen.render(); }, 4000);
589
+ });
590
+ rproc.on('error', () => {
591
+ if (stop) return;
592
+ if (_remotePlayingTrackId === track) _remotePlayingTrackId = null;
593
+ previewLine.setContent('{red-fg}Remote music preview failed{/red-fg}');
594
+ screen.render();
595
+ });
596
+ return true;
597
+ }
598
+
553
599
  process.on('exit', () => { _killPlayingProcess(); });
554
600
 
555
601
  /**
@@ -566,6 +612,32 @@ export function createMusicTab(screen, services) {
566
612
  return;
567
613
  }
568
614
 
615
+ // Remote provider: forward to the receiver instead of local playback (which
616
+ // is silent on a headless box). The receiver auto-stops any prior track when
617
+ // a new one arrives; pressing Space on the currently-playing track sends an
618
+ // explicit stop (toggle off).
619
+ const _mp = resolveMusicProvider(_PKG_ROOT);
620
+ if (_mp.remote) {
621
+ if (_remotePlayingTrackId === trackId) {
622
+ _sendMusicRemote(_mp, { stop: true });
623
+ _remotePlayingTrackId = null;
624
+ previewLine.setContent(_listFocused ? _hintText() : '');
625
+ screen.render();
626
+ return;
627
+ }
628
+ // Bling first (fire-and-forget, plays locally) — same readiness cue as the
629
+ // voice preview — then forward the track to the receiver.
630
+ playBlingCue(_PKG_ROOT);
631
+ const rlabel = _allTracks.find(t => t.id === trackId)?.label ?? formatTrackLabel(trackId);
632
+ if (_sendMusicRemote(_mp, { track: trackId })) {
633
+ _remotePlayingTrackId = trackId;
634
+ previewLine.setContent(`{${COLORS.playingFg}-fg}♪ Playing on receiver: ${rlabel} (Space to stop){/${COLORS.playingFg}-fg}`);
635
+ }
636
+ screen.render();
637
+ return;
638
+ }
639
+
640
+ // ── Local playback ──────────────────────────────────────────────────────
569
641
  // Toggle: second press on the same track → stop
570
642
  if (_playingTrackId === trackId) {
571
643
  _killPlayingProcess();
@@ -579,6 +651,10 @@ export function createMusicTab(screen, services) {
579
651
  _killPlayingProcess();
580
652
  _playingTrackId = null;
581
653
 
654
+ // Bling first (fire-and-forget) — same readiness cue as the voice preview —
655
+ // then start local playback.
656
+ playBlingCue(_PKG_ROOT);
657
+
582
658
  const proc = spawnMp3Player(trackPath, _spawnEnv);
583
659
  if (!proc) {
584
660
  const installHint = process.platform === 'win32'
@@ -38,7 +38,6 @@ export function createPlaceholderTab(contentArea, label) {
38
38
  /** Map of tabId → display label for all tabs */
39
39
  export const TAB_DISPLAY_LABELS = {
40
40
  settings: 'Settings',
41
- voices: 'Voices',
42
41
  music: 'Music',
43
42
  agents: 'BMad',
44
43
  receiver: 'Receiver',
@@ -66,7 +65,6 @@ export function getTabLabel(id, lang = 'en') {
66
65
  const keyMap = {
67
66
  setup: 'tabSetup',
68
67
  settings: 'tabSettings',
69
- voices: 'tabVoices',
70
68
  music: 'tabMusic',
71
69
  agents: 'tabBmad',
72
70
  receiver: 'tabReceiver',