Repository navigation
DSH | dsh-herald 传令官 | 长任务不用盯着屏幕等了:审批·回复·后台任务完成,桌面通知自动弹出(浏览器关闭也送达) #6624
bululuburuarua666
started this conversation in
Show Your Plugins!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Herald (传令官) — task notifications that reach your desktop even when the browser is closed
npm · GitHub · Releases
The problem it fixes
DSH runs long agent turns, background jobs, subagents and workflows. Step away for two minutes and you miss the approval prompt. Notification plugins built on the browser
NotificationAPI die silently when the tab is hidden (background tabs pause polling), when timers get throttled, or when the browser is simply closed.Herald fixes the delivery architecture itself — the DSH host process is the notifier: it raises OS notifications directly (PowerShell WinRT on Windows,
osascripton macOS,notify-sendon Linux). Browser open, hidden or fully closed — the toast still lands.Three independently switchable channels
NotificationAPIsettings.json, cross-browser, headless-friendly)C off + B onis a real preference Herald makes expressible — browser-branded banners while you're at the page, silence when you're not. It's also right for remote GUI access: host toasts land on the server machine, browser banners on yours.DSH_TASK_NOTIFY_OS=0|1overrides and locks channel C for headless operations.Channel C — raised straight from the host process, no browser involved:
The bell panel — card-based channel settings with per-channel test buttons, dark follows the DSH theme, light built-in, 中/EN UI:
Highlights
osascript/notify-send, graceful degradation when no adapter existspullSincechange feed, adaptive polling 1.5→5s, legacy-host fallbackInstall
Restart
dsh web, hard-refresh the page (Ctrl+F5), then click the 🔔 bell → expand the drawer (▸) — the three channel switches with their test buttons live there. Host-direct toasts need no permission grant; channel B asks for the browser grant via its own test button.Also available in the community plugin marketplace: dsh-herald is listed in awesome-dsh-plugin (category
notify), so if you use the dsh-market plugin you can search dsh-herald in the Plugin Market panel and install it from there.Upgrading from upstream dsh-task-notify? History records, channel settings and per-browser preferences carry over untouched.
A field note for Windows users
If host-direct toasts ever "stop working", check Focus / Do Not Disturb (勿扰/专注模式) first — while DND is on, Windows still accepts the toast (the plugin reports it as sent) but suppresses the banner; everything lands silently in the notification center (Win+N). This one cost us an afternoon of debugging of which the plugin itself was entirely innocent.
Relation to upstream
Herald began as kaotusi/dsh-task-notify (MIT) and grew a reworked delivery architecture, the tri-channel model and a new UI system. Upstream bugs found and fixed along the way (CHANGELOG): a web-composition inject deadlock, and a gateway parameter-dispatch mismatch that silently degraded incremental pulls, cross-tab acks and settings writes.
MIT licensed — feedback, issues and PRs welcome!
传令官(Herald)—— 浏览器关掉,通知照达
npm · GitHub · Releases
解决什么问题
DSH 的长任务、后台作业、子代理和工作流一跑就是几分钟起步。你离开两分钟,恰好错过审批请求。依赖浏览器
NotificationAPI 的通知插件,在页面转后台(后台标签页会暂停轮询)、被节流、或浏览器关闭时静默失效。Herald 修的是投递架构本身 —— 由 DSH 宿主进程担任通知人:Windows 走 PowerShell WinRT、macOS 走
osascript、Linux 走notify-send。浏览器开着、隐藏、或彻底关闭,通知都会到达。三条可独立开关的通道
NotificationAPI 请求的横幅settings.json,跨浏览器,无头环境也生效)「C 关 + B 开」是 Herald 才能表达的偏好——在页面前时收浏览器样式的横幅,离开时静默;远程打开 GUI 时也适用(宿主横幅落在服务器机器上,浏览器横幅落在你的机器上)。
DSH_TASK_NOTIFY_OS=0|1可覆盖并锁定通道 C,适合无头运维。安装
安装后重启
dsh web并硬刷新页面(Ctrl+F5);点侧栏 🔔 铃铛 → 展开抽屉(▸),三个通道开关与各自的测试按钮都在里面。宿主直发无需任何授权;通道 B 点其测试按钮时才请求浏览器通知权限。也已收录进社区插件市场:dsh-herald 已在 awesome-dsh-plugin 市场收录(
notify分类),装有 dsh-market 插件的同学可以直接在 Plugin Market 面板搜索 dsh-herald 安装。从上游 dsh-task-notify 升级:历史记录、通道设置与各浏览器偏好全部无损沿用。
给 Windows 用户的一条实战提示
如果宿主直发某天"失灵",先查勿扰/专注模式——勿扰开启时 Windows 依然受理 toast(插件侧显示已发送),但横幅被压制、静默落进通知中心(Win+N 可回看)。这个坑排查起来完全不像插件自己的问题。
与上游的关系
Herald 起源于 kaotusi/dsh-task-notify(MIT),发展出重构的投递架构、三通道模型与 UI 体系;过程中发现并修复了上游的 web 组合 inject 死锁与网关参数派发缺陷(详见 CHANGELOG)。
MIT 协议,欢迎反馈、issue 与 PR!
All reactions