dsh-turn-done-notify

by roject-cn

0 通知与集成github收录于 08-23

DeepSeek Harness 插件:对话轮完成时的 Windows 托盘气泡 + 提示音

DeepSeek Harness plugin: Windows tray-balloon + sound notification when a conver

安装

dsh plugin --profile web add github:roject-cn/dsh-turn-done-notify

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

A third-party DeepSeek Harness host-side plugin that pops a Windows notification (+ sound) when a conversation turn finishes.

English · 中文 · 中文说明文档 (README.zh.md)

Platform License Status


English

What it does

DeepSeek Harness runs in the browser, but there is no built-in "turn done" alert — the only brand-new-completion signal (the sidebar green dot) fires for other sessions, not the one you are watching. This plugin listens to the host-side session/event firehose and, when a top-level conversation turn/end event arrives with reason completed, shows a native Windows tray-balloon notification and plays a system sound. It fires from the host, so it works even when the browser tab is backgrounded, minimised, or closed.

Install

Prerequisite: DeepSeek Harness installed (dsh on PATH) and a web profile already initialized (run dsh web once).

powershell -ExecutionPolicy Bypass -File .\dsh-turn-done-notify\install.ps1

The installer is idempotent (safe to re-run) and:

  1. copies the plugin into $DSH_HOME/profiles/node_modules/dsh-turn-done-notify/
  2. registers it in $DSH_HOME/profiles/web/cordis.patch.yml

You must fully restart dsh web for the new plugin to load (hot-reload does not import a brand-new plugin):

  1. Stop the running dsh web (Ctrl+C in its console, or kill it).
  2. Start it again: dsh web
  3. Refresh http://127.0.0.1:3080 in the browser.

Configuration

Edit the turn-done-notify block in $DSH_HOME/profiles/web/cordis.patch.yml:

config:
  notifyOn: ['completed']   # turn/end reasons that trigger; add 'error' / 'blocked' / 'max-tokens'
  sound: true               # play the system sound
  onlyTopLevel: true        # only notify top-level sessions (skip subagents)

The balloon title/body default to DeepSeek Harness / 任务已完成; change them in lib/index.js (DEFAULTS). Enable debug: true to write a per-event log to ~/.dsh/turn-done-notify.log.

If you put non-ASCII text in the YAML config, save the file as UTF-8 or you may get mojibake (a GBK-locale gotcha). The safest place for localized text is lib/index.js DEFAULTS (unicode escapes recommended) — which is why the default there uses \u4EFB\u52A1\u5DF2\u5B8C\u6210 for 任务已完成.

Repository layout

dsh-turn-done-notify/
├── package.json      # plugin metadata (type=module)
├── install.ps1       # one-click installer
├── LICENSE           # MIT
└── lib/
    ├── index.js      # plugin body: subscribes to session/event, fires on turn/end
    └── notify.ps1    # PowerShell: tray-balloon + system sound

How it works / gotchas

  • session/event is the host-side authoritative "turn finished" signal; turn/end carries a reason.kind.
  • The notification shells out with powershell.exe -File notify.ps1 (NOT -Command), using { stdio: 'ignore', windowsHide: true } and never detached: true — detached makes the child "exit successfully" without actually running on some Windows systems (the trickiest bug this plugin hit).
  • Reason kinds: completed / aborted / blocked / error / max-tokens / interrupted.

中文

功能

DeepSeek Harness 在浏览器里运行,但没有内置的「任务完成」提醒(唯一的完成提示——侧边栏绿点——是针对其他会话的,不是当前正看的这个)。本插件监听宿主侧 session/event 事件流,当顶层会话的 turn/end 事件以 completed 结束时,弹出 Windows 右下角托盘气泡通知并播放系统提示音。通知在宿主机触发,因此即使浏览器标签页在后台、最小化或已关闭,也能收到提醒。

安装

前提:已安装 DeepSeek Harness(dsh 在 PATH)且运行过一次 dsh web(已初始化 web profile)。

powershell -ExecutionPolicy Bypass -File .\dsh-turn-done-notify\install.ps1

安装脚本幂等(可重复运行),会:

  1. 把插件复制到 $DSH_HOME/profiles/node_modules/dsh-turn-done-notify/
  2. 向 $DSH_HOME/profiles/web/cordis.patch.yml 登记插件

安装后必须完全重启 dsh web(热加载不会导入全新插件):

  1. 停掉正在运行的 dsh web
  2. 重新运行 dsh web
  3. 浏览器刷新 http://127.0.0.1:3080

配置

编辑 $DSH_HOME/profiles/web/cordis.patch.yml 里的 turn-done-notify 段:

config:
  notifyOn: ['completed']   # 触发的 turn/end 原因;可加 'error' / 'blocked' / 'max-tokens'
  sound: true               # 是否播放提示音
  onlyTopLevel: true        # 只提醒顶层会话(跳过子代理)

气泡标题/正文默认 DeepSeek Harness / 任务已完成,改 lib/index.js 里的 DEFAULTS。设 debug: true 可把逐事件日志写到 ~/.dsh/turn-done-notify.log。

YAML 里写中文需以 UTF-8 保存,否则可能乱码;最稳妥是改 lib/index.js 的 DEFAULTS(推荐 unicode 转义——默认就用 \u4EFB\u52A1\u5DF2\u5B8C\u6210 表示「任务已完成」)。

目录结构

dsh-turn-done-notify/
├── package.json      # 插件元信息
├── install.ps1       # 一键安装脚本
├── LICENSE           # MIT
└── lib/
    ├── index.js      # 插件主体:监听 session/event,turn/end 时触发
    └── notify.ps1    # PowerShell:托盘气泡 + 系统提示音

原理 / 踩坑记录

  • session/event 是宿主侧权威的「回合结束」信号;turn/end 带 reason.kind。
  • 通知用 powershell.exe -File notify.ps1(不要用 -Command),spawn 选项用 { stdio: 'ignore', windowsHide: true },绝不加 detached: true(detached 会让子进程「假退出却不执行」,是本插件踩过最隐蔽的坑)。
  • 结束原因:completed / aborted / blocked / error / max-tokens / interrupted。

License

MIT — see LICENSE.

原始 README: https://github.com/Roject-CN/dsh-turn-done-notify/blob/main/README.md ↗

同类插件

查看全部 →
通知与集成alvinunreal

dsh

将 DeepSeek Harness 的生命周期状态、错误与审批请求,桥接到本地运行的 OpenPets 桌面伙伴。

查看详情
1081github+08-21
通知与集成tencent-connect

dsh-qqbot

让 QQ Bot 接入 DeepSeek Harness(dsh)的官方插件

查看详情
55github+08-17
通知与集成omdsh-dev

dsh-open-in-vscode

从 Web GUI 一键在 VS Code 中打开工作区目录。

查看详情
39github+08-13
通知与集成omdsh-dev

dsh-notification

回合完成桌面通知,按结果分控 + 关键词过滤。

查看详情
38github+08-13
通知与集成THEWOLFWALKER

dsh-notifier

DSH 统一通知推送与远程控制:一个 `notify()` API 打通 25+ 渠道(Telegram / 钉钉 / 飞书 / 企业微信 / QQ 机器人 / WxPusher / PushPlus / Server 酱 / Bark / Discord / Slack / ntfy / webhook 等),timeSensitive / active / passive 分级路由并重试;五通道反向审批(Telegram 按钮 / 飞书卡片 / QQ / WxPusher / 微信 iLink);QQ/钉钉/飞书官方扫码登录;本地 Web 管理台;多 agent 路由;系统桌面通知——以及**手机指挥中心**:在手机上发 `!status` / `!stop` / `!retry` 遥控 agent,通知带可操作按钮(查看结果 / 重试 / 日志,点击回调 agent)。密钥脱敏、工具限流、零运行时依赖。

查看详情
27github+08-16
通知与集成wzj998

chatccc

飞书(Lark)或微信(WeChat)聊天控制 DeepSeek Harness / Claude Code / Cursor / Codex / CCC Agent

查看详情
22github+08-23