This implementation adds audio notifications to the Agent Callisto 2 terminal plugin for status updates and completion messages. The system is designed to provide unobtrusive audio feedback for important terminal events without overwhelming the user.
Claude's AI assistant can use various "tools" or "functions" that provide additional capabilities beyond text generation. In the context of this project, the goal was to implement a similar concept for terminal notifications - providing audio feedback at appropriate moments.
- Selective Notifications: Play sounds only for meaningful events (completions, status updates, requests for approval)
- Avoid Spam: Don't play sounds for every line of output
- Pseudo-Random Selection: Vary the audio to make notifications less monotonous
- User Control: Allow users to enable/disable the feature
The system now supports multiple verbosity levels for fine-grained control over notifications:
- Off: No audio notifications
- Minimal: Only critical events (errors, fatal issues, major completions like builds and tests)
- Normal: All standard status messages (default behavior)
- Verbose: Extended pattern matching for comprehensive coverage
This approach is inspired by Agent Vibes TTS, which pioneered selective audio notifications with configurable verbosity in Claude Code environments.
The system uses regular expressions to detect status messages in terminal output:
- Code Review:
code review completed,review completed - Build Status:
build succeeded,build successful - Test Results:
test passed,tests passed - Deployment:
deployment successful,deployment complete - Approval Requests:
approval required,waiting for approval,ready for review - Merge Operations:
merge completed,successfully merged - General Completion:
operation completed
All patterns are case-insensitive to catch variations in output formatting.
- Cooldown Timer: 3-second delay between notifications prevents rapid-fire sounds
- Buffer Management: Only keeps the last 500 characters of terminal output to avoid excessive memory usage
- Settings Check: Respects both global sound settings and notification-specific settings
Notification sounds are pseudo-randomly selected from a pool of available sound effects:
ui_hacking_charenter_01.wavui_hacking_charenter_02.wavui_hacking_charenter_03.wavpoweron.mp3
The getRandom() function ensures consecutive notifications don't use the same sound.
- Terminal Output Stream: Intercepts the
term.write()method to monitor terminal output - Settings Menu: Adds menu option under Plugins to toggle notifications
- Global Settings: Maintains state via
global.settings.notificationsEnabled - Proper Cleanup: Restores original write method on component unmount to prevent memory leaks
Note: The Hyper terminal integration is currently broken due to xterm.js migration. The primary focus is now on Claude Code plugin support.
- Install the plugin as documented in README.md
- For Hyper terminal (legacy): Access menu Plugins > Status notification sounds
- For Claude Code: Configure via
.claude-plugin/config.json - Run commands that produce status messages to hear notifications
The system can be extended by:
- Adding more patterns to
STATUS_PATTERNSarray - Adding custom sound files to the
sounds/directory - Adjusting
NOTIFICATION_COOLDOWNfor different timing - Modifying buffer size (currently 500 chars) for different detection ranges
Pattern matching is tested with a variety of messages to ensure:
- True positives: Status messages trigger notifications
- True negatives: Regular output doesn't trigger notifications
- Case insensitivity: Patterns match regardless of case
Possible improvements:
- Configurable patterns via settings
- Different sound sets for different event types
- Adjustable cooldown period
- Volume control for notifications separately from typing sounds
- Custom sound file support