Desktop notification plugin for CoStrict.
Monitors human intervention events and sends notifications via multiple channels when:
- Permission requests - Tool execution requires user permission
- Question asked - AI needs user input
- Session idle - AI waiting for user input
Desktop notifications using node-notifier - works across Windows, macOS, and Linux.
Push notifications via Bark service (iOS/macOS).
Push notifications via WeChat Work (企微) webhook service.
Configure notification channels using environment variables:
# Enable/disable notification channels
NOTIFY_ENABLE_SYSTEM=true # System notification (default: true, set to false to disable)
NOTIFY_ENABLE_BARK=false # Bark notification (default: false)
NOTIFY_ENABLE_WECOM=false # WeChat Work notification (default: false)
# Bark configuration (required if Bark enabled)
BARK_URL="https://api.day.app/YOUR_BARK_KEY"
# WeChat Work configuration (required if WeChat Work enabled)
# Option 1: Full webhook URL
WECOM_WEBHOOK_URL="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"
# Option 2: Just the KEY (URL will use default base)
WECOM_WEBHOOK_KEY="YOUR_KEY"Enable system notifications:
export NOTIFY_ENABLE_SYSTEM=trueEnable Bark notifications:
export NOTIFY_ENABLE_BARK=true
export BARK_URL="https://api.day.app/YOUR_BARK_KEY"Enable multiple channels:
export NOTIFY_ENABLE_SYSTEM=true
export NOTIFY_ENABLE_BARK=true
export BARK_URL="https://api.day.app/YOUR_BARK_KEY"Enable WeChat Work notifications (with KEY only):
export NOTIFY_ENABLE_WECOM=true
export WECOM_WEBHOOK_KEY="YOUR_KEY"Enable WeChat Work notifications (with full URL):
export NOTIFY_ENABLE_WECOM=true
export WECOM_WEBHOOK_URL="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"Enable all channels:
export NOTIFY_ENABLE_SYSTEM=true
export NOTIFY_ENABLE_BARK=true
export NOTIFY_ENABLE_WECOM=true
export BARK_URL="https://api.day.app/YOUR_BARK_KEY"
export WECOM_WEBHOOK_KEY="YOUR_KEY"The plugin implements a single hook:
- intervention.required hook - Receives notification events and displays desktop notifications
The filtering logic for idle events (main session vs sub-agent) is handled by the TDD plugin which triggers this hook. This plugin simply displays whatever notifications it receives.
Add to your ~/.config/costrict/config.json:
{
"plugin": ["@costrict/notify"]
}cd D:/DEV/costrict-notify
bun installNo build step required - pure JavaScript implementation.
Copy .env.example to create your own environment configuration:
cp .env.example .env
# Edit .env with your notification settingscostrict-notify/
├── src/
│ └── index.js # Main plugin code with multi-channel support
├── package.json # Dependencies and scripts
├── .env.example # Environment configuration template
├── .gitignore # Git ignore rules
├── LICENSE # MIT License
└── README.md # This file
- Trigger:
intervention.requiredhook (type: "permission") - Title: "需要权限"
- Message: Permission request message
- Trigger:
intervention.requiredhook (type: "question") - Title: "问题"
- Message: First question text
- Trigger:
intervention.requiredhook (type: "idle") - Title: "会话空闲"
- Message: "AI 正在等待您的输入"
- Filtered: Only for main sessions (handled by TDD plugin)
- Uses
node-notifierv10.0.1 for cross-platform desktop notifications - Supports multiple notification channels (System, Bark, WeChat Work)
- Configurable via environment variables
- Implements
intervention.requiredhook - Pure JavaScript - no build step required
- Compatible with CoStrict plugin system
- Smart filtering delegated to TDD plugin
MIT