MuziIsabel/dsh-win-notify

DSH 插件:代理任务完成时弹出带声音的 Windows Toast 通知,点击通知即可直接切回并前台显示 DSH 标签页

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that adds Windows toast notifications with sound for completed agent tasks. To install the plugin, you run the command dsh plugin --profile web add github:MuziIsabel/dsh-win-notify in your terminal, then restart your DSH profile or wait for HMR to activate the plugin. It works on all DSH profiles including web, headless, and tui, and only requires Windows 10 or 11 with the pre-installed PowerShell 5.1, no extra dependencies needed.

The plugin only triggers notifications for top-level agent turns, keeping child agent rounds silent. It includes a focus awareness feature that suppresses notifications for any session that is already open and visible in the foreground DSH GUI, so you will not be interrupted when you are already viewing the session. Notifications display the DeepSeek app name and official whale icon, and the notification body shows the most recent user prompt, with a configurable maximum character limit of 64 characters by default.

On first activation, the plugin automatically registers a notification identity with Windows by creating a small placeholder executable and a start menu shortcut that carries the required AppUserModelID. Users can configure multiple aspects of the plugin via their profile’s cordis.patch.yml file, including whether to notify on errors, approval waits, user questions, and what notification sound to use. The plugin is licensed under the MIT license, and it logs all registration and notification activity to $DSH_HOME/dsh-win-notify.log for troubleshooting if notifications stop working.

这是一款专为 DeepSeek Harness(DSH)开发的原生 Windows 通知插件,当 DSH 的顶层代理任务完成、出错或是需要用户审批、回复时,会在 Windows 系统上弹出带官方 DeepSeek 鲸鱼图标的带声音 Toast 通知。它仅依赖 Windows 自带的 PowerShell 5.1,无需安装额外依赖,支持所有 DSH 运行配置(web、headless、tui),适用系统为 Windows 10 和 Windows 11。

该插件针对需要后台运行 DSH 任务、不想错过任务完成状态的用户设计,只有当代理任务从运行状态切换到空闲状态,且用户当前没有在前台查看对应会话的 GUI 页面时,才会弹出通知避免打扰。通知正文会显示最近一条用户提示词,点击通知可以直接切换并前台显示已有的 DSH GUI 标签,不会产生多余的临时浏览器标签。

用户可以通过 dsh plugin --profile <profile名> add github:MuziIsabel/dsh-win-notify 命令将其安装到任意 DSH profile,安装后需要重启对应配置文件或等待 HMR 生效即可激活。所有通知行为都可通过 profile 的 cordis.patch.yml 自定义配置,包括通知声音、触发场景、前台切换规则等,项目采用 MIT 许可证开源。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:MuziIsabel/dsh-win-notify

把 MuziIsabel/dsh-win-notify 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-win-notify

简体中文(默认) | English

一个 DeepSeek Harness(dsh)插件:代理任务完成时在 Windows 上弹出带声音的 Toast 通知。

  • 通知显示应用名 DeepSeek 与官方鲸鱼图标
  • 顶层代理回合完成(running → idle)时通知;子代理回合保持静默
  • 通知正文显示最近一条用户提示词
  • 任务出错时也会通知(可配置)
  • 点击通知直接切换并前台显示现有 GUI 标签 —— 不产生临时浏览器标签;仅当没有存活 GUI 时才新开标签(?session=<id> 深链)
  • 等待沙箱/权限审批时也会通知(可配置)
  • 代理通过 ask_user_question 提问等待回复时也会通知(可配置)
  • 聚焦感知: GUI 页面处于前台且正显示触发事件的会话时,抑制该会话的通知 —— 你正在查看时不会被打扰
  • 手动停止的任务不算完成 —— 不弹通知
  • 仅依赖 Windows 自带的 PowerShell 5.1 —— 无额外依赖

环境要求

  • Windows 10/11
  • dsh(DeepSeek Harness)—— 任意 profile(web、headless、tui)

安装

dsh plugin --profile web add github:MuziIsabel/dsh-win-notify

dsh plugin 会在 profile 目录内转发给 pnpm;bundle 会把自身合并进 profile 的 dsh.profile.bundles 列表。重启 profile(或让 profile 的 HMR 生效)即可激活。

插件适用于任意 profile —— 如需在其他 profile 收到通知,可用同样的方式添加到 headless 等 profile。

卸载

dsh plugin --profile web remove dsh-win-notify

配置

bundle 会在 profile 中插入加载行 win-notify。在 profile 的 cordis.patch.yml 中覆盖其配置:

- id: win-notify
  config:
    enabled: true          # 启用插件(默认 true)
    sound: default         # default | reminder | sms | alarm | silent
    onError: true          # 任务出错时也通知(默认 true)
    openOnClick: true      # 点击通知打开/切换 GUI 会话(默认 true)
    directActivate: true   # 优先投递给存活的本机回环 GUI 标签;否则走浏览器深链
    baseUrl: ''            # 自定义 GUI 根地址(默认自动取 webServer 端口)
    approval: true         # 等待用户审批时通知(默认 true)
    approvalWaitMs: 3000   # 审批等待多久后弹通知
    question: true         # 等待用户回复时通知(默认 true)
    questionWaitMs: 3000   # 提问等待多久后弹通知
    suppressWhenVisible: true  # 正查看的会话抑制通知(默认 true)
    visibilityTtlMs: 25000      # 前台状态新鲜度窗口(客户端约每 10 秒心跳)
    title: 'DeepSeek Harness'
    body: '任务已完成'
    bodyError: '任务出错'
    maxPromptChars: 64

工作原理

  1. 身份注册(一次性、自动)。 Windows 只展示来自已注册身份的 toast。激活时插件会:
    • 向 %LOCALAPPDATA%\DeepSeek 编译一个微型 DeepSeek.exe 占位程序;
    • 创建指向它的开始菜单快捷方式 DeepSeek.lnk,图标为多尺寸 DeepSeek.ico(由官方 DeepSeek Harness favicon 生成);
    • 通过 IPropertyStore P/Invoke 把 AppUserModelID(DSH.WinNotify)写入快捷方式(BurntToast 技术)。 此后通知以 DeepSeek 名称和鲸鱼图标显示。快捷方式是身份载体 —— 请勿删除;缺失时插件会自动重建。
  2. 事件钩子。 插件在宿主层监听 agent/status 事件。当某会话的代理由 running → idle 时,检查该会话日志最近一次 turn/end 的原因:completed → 通知,error → 错误通知(若启用),aborted(手动停止)→ 跳过。
  3. 通知。 以 UTF-16LE -EncodedCommand 脚本启动 powershell.exe(Windows PowerShell 5.1,带 WinRT 投影),脚本展示带 ms-winsoundevent 音频元素的 ToastNotification,中文文本不会乱码。若注册失败,回退到 NotifyIcon 气泡。
  4. 点击打开、不产生临时标签。 对本机回环 GUI 地址,注册的 dsh-win-notify:// 协议会启动本地微型 DeepSeek.exe 助手而不是浏览器。它请求本机 DSH 服务向最近聚焦的存活 GUI 标签投递 open-session 命令;该标签原地调用 sessions.open(id)(无整页刷新、不新开浏览器标签)。成功确认后,助手会尽力用 Windows UI Automation 选中标题匹配的 Chrome/Edge 标签,让你在其他标签浏览时点击通知也能把 DSH 标签带到前台。助手按切换后的标题匹配标签,并以应用名标记兜底防竞态;最大化或普通大小的浏览器窗口保持原状,仅最小化的窗口会被恢复。浏览器辅助功能、权限级别、虚拟桌面与焦点抢占策略仍可能阻止前台切换;此时会话也已在后台选中。若没有存活 GUI 及时确认,或协议注册不可用,助手安全回退到常规 <gui>/?session=<id> 深链;其 BroadcastChannel 交接作为第二重回退。首次自定义协议点击可能需要一次性浏览器/Windows 确认。非回环的自定义 baseUrl 出于安全考虑保持常规 HTTP 深链。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-plugin 下一个 Next dsh-subagent-max →