Repository navigation
Releases: FrankieeW/task-notifier
Release list
v1.0.4 - Notification Batching
🎯 New Feature: Notification Batching
Reduce email notification frequency by intelligently batching low-priority events.
✨ What's New
Smart Batching System
- Low-priority events (TODO completed, session idle) are queued instead of sending immediately
- High-priority events (errors, plan completed) trigger immediate send with queued summary
- Configurable 5-minute auto-flush window (default: 300000ms)
- Queue size limit with automatic oldest-item removal (default: 20)
Configuration
Event Priority
- 🔴 High Priority:
session.error,planCompleted→ Send immediately + flush queue - 🟡 Low Priority:
todo.updated(completed),session.idle→ Queue and wait
Email Format
- High-priority emails append summary block with queued notifications
- Auto-flush sends standalone summary email after windowMs timeout
- Each queued item shows: event label, subject, timestamp, original HTML body
🔧 Technical Details
Files Modified
opencode/task-notifier.ts(285 → 447 lines)opencode/task-notifier.default.jsonc(70 → 91 lines)
Implementation Highlights
NotificationQueueclass with FIFO removalcompletedCountBySessiontracking prevents duplicate queuing- Config validation filters invalid
highPriorityTriggers - Default
enabled: falseensures zero breaking changes for existing users
📦 Installation
Homebrew (recommended)
brew upgrade task-notifierManual Update
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install.sh | bash -s -- --upgradeOpenCode Plugin
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install-opencode.sh | bash -s -- --upgrade🚀 Usage
- Edit
~/.config/opencode/task-notifier.jsonc - Set
"batching": { "enabled": true } - Restart OpenCode
- Enjoy reduced email frequency!
🐛 Bug Fixes
- None (feature release)
📝 Full Changelog
Previous Release: v1.0.3 - HTML email templates
v1.0.3 - HTML Email Templates
🎨 HTML Email Template Support
New Features
- HTML Email Templates: OpenCode plugin now generates HTML-formatted messages for rich email rendering
- Custom Message Templates: Customize email content using HTML templates in config file
- Variable Substitution: Use template variables like
${sessionId},${taskName},${directory}, etc. - Better Email Formatting: Messages display with proper headers, lists, and code blocks
Improvements
- Added
applyTemplate()function for variable replacement - Added
escapeHtml()function to prevent HTML injection - Support for custom templates via
messageTemplatesconfig option - Three detail levels: minimal, standard, detailed
- Full backward compatibility (works with or without custom templates)
Documentation
- Updated README.md and README_zh.md with template examples
- Added comprehensive OPENCODE-PLUGIN-GUIDE.md
Technical Details
Modified Files:
opencode/task-notifier.ts- Plugin now generates HTML messagesopencode/task-notifier.default.jsonc- Added HTML template examplesREADME.md/README_zh.md- Documentation updates
Available Template Variables:
${sessionId}- OpenCode session ID${directory}- Working directory${taskName}- TODO task content${completed}/${remaining}/${total}- Task counts${error}- Error message${todoList}- HTML formatted task list
Example Template
{
"messageTemplates": {
"todoCompleted": {
"standard": "<h2>✅ TODO Completed</h2><p><strong>${taskName}</strong></p><ul><li>📂 Directory: <code>${directory}</code></li></ul>"
}
}
}Upgrade
brew upgrade task-notifierOr via install script:
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install.sh | bash -s -- --upgradeFull Changelog: v1.0.2...v1.0.3
v1.0.2 - Homebrew Integration & Automated Updates
🎉 v1.0.2 - Homebrew 集成与自动化更新
✨ 新功能
🍺 Homebrew 支持
- 新增 Homebrew 安装方式(推荐 macOS 用户使用)
- 支持完整安装(CLI + OpenCode 集成)
- 支持仅安装 CLI 工具(
--without-opencode选项) - 自动管理依赖(Python 3.11)
- 升级时保留配置文件
安装命令:
brew tap frankieew/tap
brew install task-notifier🤖 GitHub Action 自动化
- 发布新版本时自动更新 Homebrew formula
- 自动计算 tarball SHA256
- 自动提交到 homebrew-tap 仓库
- 用户可立即通过
brew upgrade获取更新
📦 版本选择功能
- 安装脚本支持
--version参数 - 可以安装特定版本:
--version=v1.0.0 - 支持版本回退和测试
📚 文档改进
- 新增
docs/AUTOMATED-HOMEBREW-UPDATES.md- 自动化工作原理 - 新增
docs/SETUP-GITHUB-ACTION.md- GitHub Action 设置指南(中文) - 更新 README 和 README_zh,添加 Homebrew 安装说明
- 添加版本徽章和安装示例
🔧 技术改进
- 新增
.github/workflows/update-homebrew-formula.yml工作流 - 新增
Formula/task-notifier.rbHomebrew formula - 新增
VERSION文件作为版本号来源 - 修复 OpenCode 安装脚本的配置文件扩展名(.jsonc)
📊 安装方式对比
| 方式 | 优点 | 适用场景 |
|---|---|---|
| Homebrew | 自动管理依赖、一键升级、系统集成 | macOS/Linux 用户(推荐) |
| 安装脚本 | 轻量、可定制、支持版本选择 | 快速部署、CI/CD |
| 手动安装 | 完全控制、无需网络 | 离线环境、自定义路径 |
🔗 相关链接
- Homebrew Tap: https://github.com/FrankieeW/homebrew-tap
- 工作流运行记录: https://github.com/FrankieeW/task-notifier/actions
- 文档: https://github.com/FrankieeW/task-notifier/tree/main/docs
⬆️ 升级方式
从 v1.0.0 升级:
# Homebrew 用户
brew upgrade task-notifier
# 脚本安装用户
task-notify --upgrade
# 或使用安装脚本
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install.sh | bash -s -- --upgrade🙏 致谢
感谢所有测试和反馈的用户!
完整更新日志: v1.0.0...v1.0.2
v1.0.0 - First Stable Release
Task Notifier v1.0.0 - First Stable Release
🎉 Overview
Task Notifier 的第一个正式稳定版本!一个通用的任务完成邮件通知工具,支持 SMTP、完整的国际化支持(英文/中文),以及 OpenCode AI 编程助手集成。
The first stable release of Task Notifier! A general-purpose task completion email notification tool with SMTP support, full internationalization (English/Chinese), and OpenCode AI assistant integration.
✨ Core Features | 核心功能
📧 Email Notifications | 邮件通知
- ✅ SMTP/SMTP_SSL support with auto-detection | SMTP/SMTP_SSL 支持,自动检测
- ✅ Domain email support (separate login and sender) | 域名邮箱支持(分离登录和发送地址)
- ✅ HTML + plain text dual format | HTML + 纯文本双格式
- ✅ Detailed error messages with troubleshooting | 详细错误消息和故障排除
- ✅ Connection timeout protection | 连接超时保护
🌍 Internationalization (i18n) | 国际化
- ✅ Full English and Chinese support | 完整的英文和中文支持
- ✅ 5-level language detection priority:
--langCLI flag | CLI 标志LANGUAGE=in config file | 配置文件TASK_NOTIFY_LANGenvironment variable | 环境变量- System locale (auto-detects zh_CN, zh_TW, zh_HK) | 系统语言(自动检测中文)
- Default: English | 默认:英文
- ✅ Separate documentation: README.md (EN) / README_zh.md (ZH)
🤖 OpenCode Integration | OpenCode 集成
- ✅ Automatic notifications during AI coding sessions | AI 编程会话期间自动通知
- ✅ Configurable triggers:
- Session idle detection | 会话空闲检测
- TODO completion tracking | TODO 完成追踪
- Plan completion alerts | 计划完成提醒
- Background task monitoring | 后台任务监控
- Error notifications | 错误通知
- ✅ Three detail levels: minimal, standard, detailed | 三种详细程度
- ✅ JSONC config with comments | 支持注释的 JSONC 配置
🚀 Installation & Upgrade | 安装和升级
- ✅ One-line installation script | 一键安装脚本
- ✅ Version selection support:
--version=vX.Y.Z| 版本选择支持 - ✅ Automatic upgrade with config preservation | 自动升级并保留配置
- ✅ OpenCode plugin auto-installation | OpenCode 插件自动安装
- ✅ PATH configuration validation | PATH 配置验证
📦 Installation | 安装
Quick Install | 快速安装
# Install latest version | 安装最新版本
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install.sh | bash
# Install specific version | 安装指定版本
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install.sh | bash -s -- --version=v1.0.0
# Install with language preference | 安装并指定语言
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install.sh | bash -s -- --lang=zh
# Install OpenCode plugin only | 仅安装 OpenCode 插件
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install-opencode.sh | bashConfiguration | 配置
# Create config file | 创建配置文件
task-notify --setup
# Edit config | 编辑配置
vim ~/.task-notify.env📝 Usage Examples | 使用示例
Basic Notification | 基本通知
task-notify "Build completed"
task-notify "构建完成" --lang=zhWith Details | 带详细信息
task-notify "Doc generation done" --details "Generated 42 pages"Chain with Commands | 命令链
make build && task-notify "Build finished"
npm test && task-notify "Tests passed" || task-notify "Tests failed"AI Task Helper | AI 任务助手
# Auto-collects Git info | 自动收集 Git 信息
notify-ai-task "Completed refactoring" --with-diff🔄 Upgrade | 升级
# Upgrade to latest | 升级到最新版本
task-notify --upgrade
# Or via install script | 或使用安装脚本
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install.sh | bash -s -- --upgrade
# Upgrade to specific version | 升级到指定版本
curl -fsSL https://raw.githubusercontent.com/FrankieeW/task-notifier/main/scripts/install.sh | bash -s -- --upgrade --version=v1.0.0📚 Documentation | 文档
- English: README.md
- 中文: README_zh.md
- Testing Guide: docs/TESTING-GUIDE.md
🐛 Bug Fixes in This Release | 本版本修复的问题
- ✅ Fixed
.jsoncextension handling in OpenCode installer - ✅ Fixed hardcoded bilingual strings in upgrade prompts
- ✅ Updated
$schemaURL to GitHub instead of local path
🎯 What's Next | 下一步计划
Future versions may include:
- Web UI for configuration
- More notification channels (Slack, Discord, etc.)
- Task queue management
- Notification history tracking
🙏 Support | 支持
If you find this project helpful, consider buying me a coffee! ☕
EVM (ETH/BSC/Polygon/Arbitrum/Base):
0x000000042c0e28cB7c59209e2FB745614814a4a4
📄 License | 许可证
MIT License
Full Changelog: https://github.com/FrankieeW/task-notifier/commits/v1.0.0
{ "batching": { "enabled": false, // Default: disabled (backward compatible) "windowMs": 300000, // 5 minutes "maxQueueSize": 20, "highPriorityTriggers": ["errorOccurred", "planCompleted"] } }