omoclaw
v3.2.4
Published
OpenCode session monitor plugin — native event-driven webhook notifications for session state changes
Downloads
2,125
Maintainers
Readme
omoclaw
Native event-driven monitoring for OpenCode sessions
OpenCode plugin that monitors session state changes and sends webhook notifications. Replaces tmux-based scraping daemons with native event-driven monitoring.
Installation
Add the plugin to your ~/.config/opencode/opencode.json file:
{
"plugin": ["omoclaw@latest"]
}OpenCode will automatically install the plugin on the next restart.
Configuration
Create a configuration file at ~/.config/opencode/opencode-monitor.json:
{
"webhook": {
"url": "http://your-webhook-endpoint/hooks/wake",
"token": "your-bearer-token"
},
"staleTimeoutMs": 900000,
"permissionReminderMs": 120000,
"dedupTtlMs": 30000,
"idleConfirmDelayMs": 1500,
"debug": false,
"enabled": true
}Configuration Fields
- webhook.url: The endpoint where notifications will be sent.
- webhook.token: Bearer token for authentication.
- staleTimeoutMs: Timeout for busy sessions (default: 15 minutes).
- permissionReminderMs: Interval to re-notify when waiting for permissions (default: 2 minutes).
- dedupTtlMs: Time window for deduplicating similar notifications (default: 30 seconds).
- idleConfirmDelayMs: Delay before confirming an idle state.
- debug: Enable file logging to
/tmp/opencode-monitor-debug.log. - enabled: Toggle the plugin on or off.
Features
- Session state monitoring (idle/busy/error/retry transitions)
- Permission wait detection with reminders
- Agent tracking (Prometheus -> Atlas -> Hephaestus chain)
- Stale session detection (default: 15 minutes)
- Deduplication to prevent webhook spam
- Completion notification with full agent chain
Webhook Payload Format
The plugin sends a POST request to the configured URL.
Headers
- Authorization: Bearer
- Content-Type: application/json
Body
{
"text": "[OpenCode] ...",
"mode": "now"
}License
MIT
