"Blessed are the code smiths, for they shall inherit productivity."
A divine plugin for OpenCode that brings blessed multi-agent orchestration to your development workflow.
AgentBlessed transforms your OpenCode experience into a blessed workflow where you have full visibility and control over your AI agents. Track session activity, receive notifications when work completes, and gain insights into your development process.
Key Blessings:
- ๐ฏ Activity Tracking: Monitor all tool invocations and file changes
- ๐ Smart Notifications: Get notified when sessions complete or encounter errors
- ๐ Session Statistics: Track productivity metrics in real-time
- ๐ก๏ธ Permission Awareness: Never miss an approval request
- ๐ฎ Custom Commands: Built-in
/blessand/statscommands
# Clone into your project
git clone https://github.com/yourusername/opencode-agentblessed.git .opencode/plugins/agentblessed
# Or create manually
mkdir -p .opencode/plugins/agentblessed
curl -o .opencode/plugins/agentblessed/index.ts https://raw.githubusercontent.com/yourusername/opencode-agentblessed/main/index.ts# Create global plugin directory
mkdir -p ~/.config/opencode/plugins/agentblessed
# Copy the plugin file
cp index.ts ~/.config/opencode/plugins/agentblessed/npm install -g opencode-agentblessedThen add to your ~/.config/opencode/opencode.json:
{
"plugin": ["opencode-agentblessed"]
}Once installed, AgentBlessed works automatically in the background:
- โ Session Tracking: Every session is blessed and monitored
- โ Tool Logging: See what tools are being invoked in real-time
- โ File Change Tracking: Know which files are being modified
- โ Notifications: Get system notifications when work completes
- โ Error Alerts: Immediate notification when something goes wrong
AgentBlessed adds these blessed commands to OpenCode:
/bless
Get a random coding blessing for inspiration:
๐ A BLESSING FOR YOUR CODE ๐
May your functions be pure and your side effects minimal.
/stats
See your blessed productivity metrics:
๐ AGENTBLESSED STATISTICS
Active Sessions: 3
Total Tools Invoked: 47
Unique Files Modified: 12
When you start OpenCode with AgentBlessed installed:
$ opencode
๐ AgentBlessed initialized
Project: my-awesome-project
Directory: /home/dev/projects/my-awesome-project
Working Tree: /home/dev/projects/my-awesome-project
May your code be blessed!
# When you start working
โจ Blessed session created: a1b2c3d4...
# As tools are invoked
๐ Blessed write: src/components/Button.tsx
โ
write completed successfully
โก Blessed command: npm run build
๐ค Blessed agent invoked: Find all API endpoints...
# When session completes
๐ Session completed in 5m 23s
Tools invoked: 12
Files modified: 4
๐ [System Notification] Session completedAgentBlessed works out of the box with sensible defaults. No configuration required!
Create .opencode/agentblessed.json:
{
"agentblessed": {
"notifications": {
"enabled": true,
"sound": true,
"onComplete": true,
"onError": true
},
"logging": {
"level": "info",
"showTimestamps": true
},
"features": {
"trackFileChanges": true,
"trackToolUsage": true,
"showBlessingOnComplete": false
}
}
}Every session is monitored from creation to completion:
- Created: Session starts, timer begins
- Updated: Ongoing activity tracked
- Idle: Work completed, stats calculated
- Error: Immediate error detection
See exactly what tools are being used:
| Tool Type | Blessed Output |
|---|---|
write |
๐ Blessed write: filepath |
edit |
๐ Blessed edit: filepath |
bash |
โก Blessed command: command |
task |
๐ค Blessed agent invoked: prompt |
grep |
๐ Blessed search: pattern |
Know what's being modified:
- Tracks unique files modified per session
- Prevents duplicate entries
- Shows final count on completion
Cross-platform notifications:
- โ macOS: Native notifications with sound
- โ Linux: notify-send support
- โ Windows: PowerShell notifications
- โ Fallback: Console logging
Never miss an approval:
โณ Awaiting your blessing...
Tool: bash
Action: execute
Press 'a' to allow, 'd' to deny
AgentBlessed Plugin
โโโ Session Lifecycle Hooks
โ โโโ session.created
โ โโโ session.updated
โ โโโ session.idle
โ โโโ session.error
โโโ Tool Execution Hooks
โ โโโ tool.execute.before
โ โโโ tool.execute.after
โโโ File Operation Hooks
โ โโโ file.edited
โ โโโ file.watcher.updated
โโโ Permission Hooks
โ โโโ permission.asked
โ โโโ permission.replied
โโโ TUI Hooks
โ โโโ tui.command.execute
โ โโโ tui.toast.show
โโโ Helper Functions
โโโ sendBlessedNotification
โโโ showBlessing
โโโ showStats
- OpenCode installed
- TypeScript knowledge (optional, for modifications)
- Node.js and npm (for type definitions)
# 1. Clone the repository
git clone https://github.com/yourusername/opencode-agentblessed.git
cd opencode-agentblessed
# 2. Install TypeScript definitions (optional)
npm install --save-dev @opencode-ai/plugin
# 3. Link to your test project
ln -s $(pwd) /path/to/your/project/.opencode/plugins/agentblessed
# 4. Run OpenCode in debug mode
opencode -dAgentBlessed/
โโโ index.ts # Main plugin file
โโโ README.md # This file
โโโ package.json # NPM metadata (optional)
โโโ tsconfig.json # TypeScript config (optional)
โโโ docs/ # Documentation
โโโ API.md
โโโ HOOKS.md
AgentBlessed uses these OpenCode hooks:
| Hook | Purpose |
|---|---|
session.created |
Initialize session tracking |
session.updated |
Monitor ongoing sessions |
session.idle |
Handle completion, send notifications |
session.error |
Error detection and alerts |
tool.execute.before |
Pre-execution logging |
tool.execute.after |
Post-execution confirmation |
file.edited |
File change tracking |
permission.asked |
Alert user to pending approvals |
tui.command.execute |
Handle custom commands |
Want to extend AgentBlessed? Here are some ideas:
// Add a new hook
"session.compacted": async (input, output) => {
console.log("๐ฆ Session compacted to save tokens")
},
// Add cost tracking
"tool.execute.after": async (input, output) => {
// Estimate token usage
// Track costs per session
// Alert if approaching budget
}- Plugin loads without errors
- Session creation shows blessing message
- Tool execution shows appropriate icons
- File modifications are tracked
- Session completion shows stats
- Notifications appear (if supported)
-
/blesscommand works -
/statscommand works - Permission requests are highlighted
Run OpenCode with debug flag to see detailed logs:
opencode -d# Build
npm run build
# Publish
npm publishUsers can install via:
git clone https://github.com/yourusername/opencode-agentblessed.git \
.opencode/plugins/agentblessedContributions are blessed! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-blessing) - Commit your changes (
git commit -m 'Add amazing blessing') - Push to the branch (
git push origin feature/amazing-blessing) - Open a Pull Request
- Add more blessings to the collection
- Create dashboard visualization
- Add cost tracking features
- Support for custom notification sounds
- Integration with external analytics
- More blessed commands
- Theme support (colors, icons)
# Check file location
ls -la .opencode/plugins/agentblessed/index.ts
# Verify syntax
npx tsc --noEmit index.ts
# Run with debug
opencode -d- macOS: Ensure Terminal has notification permissions
- Linux: Install
notify-send(sudo apt install libnotify-bin) - Windows: PowerShell execution policy may need adjustment
# Install types
npm install --save-dev @opencode-ai/plugin
# Or add to package.json in config directory
cat > ~/.config/opencode/package.json << 'EOF'
{
"dependencies": {
"@opencode-ai/plugin": "latest"
}
}
EOFMIT License - see LICENSE file
- OpenCode Team: For the amazing platform
- Oh My OpenCode: Inspiration for multi-agent patterns
- Community: For feedback and contributions
- v0.2.0: Dashboard overlay (
Ctrl+B) - v0.3.0: Cost tracking and budget alerts
- v0.4.0: Smart agent routing
- v0.5.0: Agent marketplace integration
- v1.0.0: Full multi-agent orchestration
- ๐ Bug Reports: GitHub Issues
- ๐ก Feature Requests: GitHub Discussions
- ๐ฌ Community: OpenCode Discord
May your code be blessed and your bugs be few. ๐