1514100951/dsh-notify-plugins
DeepSeek Harness desktop notification plugins: browser + native Windows toasts on task finish/error, blocking waits (approval/question/plan-review), and background job settlement
项目介绍Project Overview
这是 DSH 桌面通知插件,在任务完成/出错、后台任务结束、Agent 请求审批/提问/计划审阅时,通过浏览器 Notification 与 Windows 原生 toast 弹窗提醒,点击可跳转会话。适合需要离开页面仍掌握任务状态、及时响应阻塞的场景。注意:系统通道仅支持 Windows 10/11,原生 toast 应用名显示为 Windows PowerShell;安装需先镜像包再改 cordis.patch 并重启。
This DSH plugin sends desktop notifications when tasks finish or fail, background jobs end, or an Agent blocks on approval, questions, or plan review, using browser notifications and native Windows toasts; clicking opens the session. Use it to track tasks while away from the page. The system channel requires Windows 10/11, native toasts appear as Windows PowerShell, and installation requires mirroring packages before patching cordis config and restarting.
请帮我了解并安装插件:【dsh-notify-plugins】【https://github.com/1514100951/dsh-notify-plugins】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:1514100951/dsh-notify-plugins
把 1514100951/dsh-notify-plugins 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
DeepSeek Harness 桌面通知插件
任务完成/出错、后台任务结束、Agent 被阻塞等你处理(审批/提问/计划审阅)时,在浏览器和 Windows 系统弹出通知提醒(右下角 toast)。包含两个插件,共用一个开关:
| 插件 | 功能 | 默认状态 |
|---|---|---|
dsh-notify |
任务完成/出错、阻塞(审批/提问/计划审阅)、后台任务结束时弹窗(统一开关) | 开(浏览器 + 系统双通道) |
dsh-notify-jobs |
后台任务监听独立包(可选;安装后主包自动让位,共用同一开关) | 跟随统一开关 |
统一开关三档:关 → 浏览器 → 浏览器 + 系统。设置入口:设置 → 通用(「桌面通知」行)。
功能特性
- 浏览器通知:标准 Notification API,Chrome/Edge 下即为 Windows 右下角弹窗,点击通知自动聚焦页面并打开对应会话。
- Windows 系统通知:宿主端通过 PowerShell +
Windows.UI.Notifications弹出原生 toast(使用 powershell.exe 的 AppUserModelID),无需安装任何额外模块;即使浏览器拦截了站点通知,双通道模式下系统通知照常弹出。 - 默认总是提醒:任务完成/出错时,无论页面在前台还是后台都会弹窗(
backgroundOnly: false);如需只在离开页面时提醒,参考"常见问题"改回backgroundOnly: true。 - 通知内容:任务通知带会话标题 + 回答摘要;出错时标题为"任务出错"并带错误信息;后台任务通知带任务类型、命令/委托描述和失败详情。
- 阻塞提醒:借鉴 blocker-notify 的触发条件——Agent 请求授权/提权、向你提问、提交计划审阅时立即弹窗(通知带工具名/原因或问题文本),点击跳转对应会话。与任务完成、后台任务共用同一开关。
- 防打扰:任务通知按回合去重;后台任务只在自己 kill 之外的"完成/失败"时提醒;页面加载前就已结束的任务不会补发。
目录结构
packages/
dsh-notify/ # 主插件(宿主端 + 浏览器端)
package.json # dsh.client 声明(platform: web, exports ./client)
lib/index.js # 宿主端:POST /dsh-notify/native 原生 Windows toast 接口
lib/client.js # 浏览器端:监听 + 通知 + 设置页两行开关
dsh-notify-jobs/ # 后台任务通知独立包(可选;安装后主包会自动让位)
package.json
lib/index.js # 宿主端占位(无行为)
lib/client.js # 浏览器端:后台任务监听 + 设置页开关
cordis.patch.yml # 注册配置(两个 insert 段)
README.md
说明:
dsh-notify的 client.js 内置了后台任务通知(带hasStandaloneJobs探测守卫)。当dsh-notify-jobs独立包同时被加载时,主包会自动跳过自己的后台任务部分,避免重复注册——两种形态功能完全一致,可二选一。
安装(适用于任何 DSH 用户的 profile)
把
packages/dsh-notify(及可选的packages/dsh-notify-jobs)复制到<DSH_HOME>/profiles/web/packages/。先把它们镜像到
<DSH_HOME>/profiles/node_modules/(同名目录,直接复制)。然后把
cordis.patch.yml里的insert段合并进<DSH_HOME>/profiles/web/cordis.patch.yml:- insert: - id: notify name: dsh-notify - insert: - id: notify-jobs name: dsh-notify-jobs # 可选,只装主包时省略这一段⚠️ 顺序很重要:务必先镜像、后改 patch 文件。运行中的
dsh web会热加载 patch——如果注册时镜像还不存在,热加载链会卡死,之后只能重启dsh web生效。稳妥做法:装完直接重启dsh web。刷新浏览器页面(F5)。
打开 设置 → 通用,把开关调到想要的档位;首次选择开启档位会请求浏览器通知权限并立即弹一条测试通知。
验证
# 原生弹窗接口探测
Invoke-RestMethod http://127.0.0.1:3080/dsh-notify/native
# → {"available":true,"platform":"win32"}
# 直接弹一条 Windows toast 测试
$body = @{ title = '测试'; body = '通知功能已就绪' } | ConvertTo-Json -Compress
Invoke-RestMethod http://127.0.0.1:3080/dsh-notify/native -Method Post -ContentType 'application/json' -Body $body
# → {"ok":true}
系统要求
- Windows 10/11:系统弹窗通道可用(依赖 powershell.exe,无需模块)。非 Windows 上系统通道自动不可用,只剩浏览器通知。
- 浏览器需支持 Notification API(Chrome / Edge 等现代浏览器均可)。
- 服务端是
dsh web进程(接口仅限本机回环访问)。
发布到插件市场 / 分发
- 包结构是标准 npm 包形态:
exports["./client"]指向浏览器 bundle,package.json的dsh.client声明platform: "web"——被加载器扫描后自动进入页面插件图。 - npm 发布:在
packages/dsh-notify目录执行npm publish(先npm login);dsh-notify-jobs同理。本仓库已移除"private": true并填好repository字段,可直接发布;如果发布时提示包名已被占用,改成作用域名(如@你的用户名/dsh-notify)即可。 - GitHub 发布:把整个仓库推上去,安装者 clone 后按上面的安装步骤放进自己的 profile。
- 安装者页面会出现与你相同的界面和默认行为(任务通知默认开·双通道·总是提醒,后台任务默认关)。每个浏览器各自请求通知权限、设置存各自 localStorage——你的设置不会同步给他人。
- 原生 toast 的应用名会显示为 "Windows PowerShell",这是该弹窗方式的固有表现。
常见问题
- 通知被浏览器拦截:设置行会显示红色提示;在浏览器站点设置里允许该站点通知,或直接使用"浏览器 + 系统"档位(系统通知不受影响)。
- 只想在离开页面(切后台)时提醒:控制台执行
localStorage.setItem('dsh-notify.settings.v3', JSON.stringify({mode:2, backgroundOnly:true})),刷新页面。默认backgroundOnly:false(总是提醒)。 - 改完 client.js 不生效:镜像目录(
profiles/node_modules/)里的副本才是被加载的版本;改完packages/要重新镜像,再刷新一次页面(F5)——插件是浏览器端代码,页面不刷新不会加载。
License
MIT
nexu-io/open-design
freestylefly/awesome-gpt-image-2
anywhere-labs/dsh-desktop
walkinglabs/learn-harness-engineering
awesome-dsh-plugin/awesome-dsh-plugin
MemTensor/MemOS