dsh-windows-approval-notify
Manifest valid★ 1DSH plugin: pop a Windows toast the moment an approval is requested, so you notice even when DSH is in the background. | DSH (DeepSeek Harness) plugin: pops a native Windows notification when a task requires approval or completes, only reminding you when DSH is not in the foreground.
Windows 消息通知(DSH 插件)
English | 简体中文
DSH 需要提权、等待你授权,或一轮任务正常结束时,弹出一条 Windows 通知(显示为 DeepSeek Harness)。 只有 DSH 不是当前前台程序 时才弹:你正盯着 DSH 界面时不打扰。 插件只做转发:不参与授权决策,不改变审批结果,也不做其它任何事情。
触发条件
| 触发 | 来源 | 标题 |
|---|---|---|
| 有操作请求授权 | approval/request(兜底 approval/asked) | DSH 需要提权 |
| 一轮任务正常结束 | session/event 的 turn/end,且 reason.kind === 'completed' | DSH 任务完成 |
- 只有主会话才会提示任务完成;子代理(
header.parentSession/origin: 'subagent')的会话不提示。 turn/end的原因不是completed(中止、报错、被拦截、超长截断等)时不提示,也不把中止说成“完成”。- 前台抑制对两类通知都生效:前台窗口标题包含
DeepSeek Harness时直接跳过,判定逻辑在foreground.ps1。
实现
- 常驻一个 PowerShell 通知宿主,插件激活即预热;之后每条通知只写一行 JSON。
- PowerShell 侧先读前台窗口标题判断是否前台(Win32
GetForegroundWindow+GetWindowText),需要真正弹窗时才加载 WinRT Toast API。 - 弹窗延迟:预热后约 5–10ms;进程被回收/被杀时退化为一次性弹窗并退避重启宿主。
- 通知标签:授权
dshApproval、完成dshTaskDone,同组dshNotify;同类通知互相替换,不同类各自保留一条。
文案
- 授权正文优先用 DSH 自己的
displayReason(优先中文),其次reason;都没有时显示<工具名> 正在请求你的授权。 - 完成正文为
「<会话标题>」已完成,没有标题时显示当前会话的这一轮任务已完成。 - 正文最多 220 字符,超出截断。
环境要求
- Windows 10/11,系统通知未关闭。
powershell.exe(Windows 自带)。- 通知宿主以
com.deepseek.dsh(DSH 桌面端的 AppUserModelID)发布,所以通知卡片显示为 DeepSeek Harness。
文件
| 文件 | 作用 |
|---|---|
index.js | Host 插件:事件监听 + 通知通道(常驻进程、失败退避重启、一次性兜底) |
notify-host.ps1 | 纯 ASCII 的 PowerShell 通知宿主,从 stdin 逐行读取 JSON,按需弹 Toast |
foreground.ps1 | 前台窗口标题匹配(判断 DSH 是不是当前主程序) |
cordis.patch.yml | 插入 windows-approval-notify 行 |
locale/{en,zh}.json | 插件管理器的标题/描述 |
icon.svg | 插件图标 |
安装
把本仓库克隆(或解压发布包)到任意目录,在 DSH 里执行:
plugin_manager install_bundle target = <本目录的绝对路径>
例如:
plugin_manager install_bundle target = D:\plugins\dsh-windows-approval-notify
安装后插件行立即生效,无需重启 DSH。卸载:
plugin_manager remove_bundle target = dsh-windows-approval-notify
License
MIT,见 LICENSE。
Comments
Loading…
From the same category
by awesome-dsh-plugin
A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表
★ 20.5k
CC0-1.0
Python
Oct 25, 2026
by 0xsline
DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.
★ 1.3k
CC0-1.0
Python
Oct 16, 2026
by pax-beehive
Open-source CLI, schemas, resolver, and DSH agent tools for DSH Plugin Hub
★ 277
MIT
TypeScript
Oct 20, 2026
by xiajiajun516
DeepSeek Harness (DSH) backup & restore plugin — export, import, migrate and sync your complete DSH configuration, plugins, MCP servers, skills and workspace. One-click migration to another machine.
★ 240
MIT
TypeScript
Oct 24, 2026
dsh plugin --profile web add dsh-config-managerby yjh051108
推荐组件(非必须):DeepSeek Harness 运行时注入器;已随 dsh-routing-suite 单仓库化保留,本仓库继续维护/发布。
★ 167
TypeScript
Oct 16, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injectorby Yuuyuko-uu
DSH 鱼的记忆:给会话一份会淡忘的长期记忆,每条都带时间
★ 132
MIT
JavaScript
Oct 24, 2026
dsh plugin --profile web add dsh-fish-memory