dsh-notify
baka-world
DeepSeek Harness desktop notification plugin (notify-send / D-Bus)
PROJECT TOPICS
PROJECT README
System notification plugin for DeepSeek Harness (dsh): sends a native OS notification when a task finishes, or when manual input / confirmation is needed in the page, so you never miss a critical moment while working in another window.
DeepSeek Harness(dsh)系统通知插件:当任务完成,或需要你在页面中手动输入 / 确认信息时,发送一条操作系统原生通知,让你切到别的窗口时也不会错过关键节点。
中文 · ← Back to DeepSeekHarnessPlugins
running back to idle (a turn ends), sends "Task completed"approval/request, e.g. a tool needs your confirmation), sends "Action required" with the tool name and reasonnext() transparently — never answers on your behalf or changes the approval resultosascript) / Linux (notify-send)| Event | Mode | Notification content |
|---|---|---|
agent/status → idle (top-level session, previously running) |
emit | Task completed |
approval/request |
waterfall | Tool X needs your confirmation in the page (+ reason) |
| File | Description |
|---|---|
index.js |
Installable Host half (dsh.bundle entry, ES module) |
cordis.patch.yml |
Bundle patch: inserts the notifier plugin row |
host.js |
Dynamic usage (cordis_define code.host) |
package.json |
Installable package metadata declaring dsh.bundle |
README.md |
This document |
LICENSE |
MIT license |
This repo is also an installable dsh plugin package (package.json declares dsh.bundle):
dsh plugin --profile web add github:YZz-S/dsh-notifier
After installation, system notifications are sent automatically when a task finishes or manual confirmation/input is needed (pure Host plugin — no page refresh required). The dynamic usage (cordis_define loading host.js) is kept; pick either one.
Define and run in a dsh Web GUI session with the Cordis tools:
cordis_define: paste the content of host.js as code.host (plugin.kind: 'new', idPrefix of 3–6 lowercase letters)cordis_run to activate (pure Host plugin — no page refresh required)Note: a dynamic plugin lives as long as the current dsh process. After restarting dsh you must define and run it again.
See "Installation (dsh.bundle)" above: dsh plugin --profile web add github:YZz-S/dsh-notifier.
Notification command (probe-degraded in order, first available wins):
powershell (Windows) → WinRT Toast with a custom AppUserModelID (DeepSeekHarness.Notify, source name + avatars.githubusercontent.com/u/148330874?v=4&s=200 icon); if Toast throws, it degrades to a balloon notificationosascript (macOS) → display notification … with title …notify-send (Linux)Title / body are embedded into the -Command script after PowerShell single-quote escaping; the process is spawned by subprocess.spawn with an argv array, and Node handles the correct command-line quoting.
Top-level session filtering: agent/status covers all agents (including subagents). The plugin uses agents.roots() to detect top-level sessions and only sends "Task completed" for them, avoiding notification spam from subagent finishes; if the agents service is unavailable it degrades to no filtering.
avatars.githubusercontent.com/u/148330874?v=4&s=200) by Windows only when a notification is displayedsubprocess service is unavailableagent/status → idle fires at the end of every top-level turn — that is the "turn/task completed" semanticapi[_-]?key, secret, token, password, private-key headers scanned)avatars.githubusercontent.com/u/148330874?v=4&s=200, fetched by Windows solely for the notification icon), disclosed in this READMEEnglish · ← 返回 DeepSeekHarnessPlugins
DeepSeek Harness(dsh)系统通知插件:当任务完成,或需要你在页面中手动输入 / 确认信息时,发送一条操作系统原生通知,让你切到别的窗口时也不会错过关键节点。
running 回到 idle(一个回合结束)时,发送「任务已完成」approval/request,例如需要你确认执行某个工具)时,发送「需要确认」,并带上工具名与原因next() 透传,绝不抢答、不改变审批结果osascript)/ Linux(notify-send)| 事件 | 模式 | 通知内容 |
|---|---|---|
agent/status → idle(顶层会话,且此前为 running) |
emit | 任务已完成 |
approval/request |
waterfall | 工具 X 需要你在页面中确认(+ 原因) |
| 文件 | 说明 |
|---|---|
index.js |
可安装的 Host 半边(dsh.bundle 入口,ES module) |
cordis.patch.yml |
bundle 补丁:插入 notifier 插件行 |
host.js |
动态用法(cordis_define 的 code.host) |
package.json |
声明 dsh.bundle 的可安装包元信息 |
README.md |
本说明 |
LICENSE |
MIT 许可证 |
本仓库同时是可安装的 dsh 插件包(package.json 声明 dsh.bundle):
dsh plugin --profile web add github:YZz-S/dsh-notifier
安装后任务完成或需要人工确认/输入时自动发送系统通知(纯 Host 插件,无需刷新页面)。
动态用法(cordis_define 加载 host.js)仍保留,两种方式二选一。
在 dsh Web GUI 的会话中,用 Cordis 工具定义并运行:
cordis_define:code.host 粘贴 host.js 的内容(plugin.kind: 'new',idPrefix 取 3–6 个小写字母)cordis_run 激活(纯 Host 插件,无需刷新页面)注意:动态插件的生命周期与当前 dsh 进程相同。重启 dsh 后需重新定义运行。
见上文「安装(dsh.bundle)」:dsh plugin --profile web add github:YZz-S/dsh-notifier。
通知命令(按顺序降级探测,取第一个可用):
powershell(Windows)→ WinRT Toast,注册自定义 AppUserModelID(DeepSeekHarness.Notify,来源名 + avatars.githubusercontent.com/u/148330874?v=4&s=200 图标);Toast 抛出异常时自动降级为气泡通知osascript(macOS)→ display notification … with title …notify-send(Linux)标题 / 正文通过 PowerShell 单引号转义后内嵌进 -Command 脚本;由 subprocess.spawn 以 argv 数组派生,Node 侧负责正确的命令行引号处理。
顶层会话过滤:agent/status 会覆盖所有 agent(含子代理)。插件用 agents.roots() 判断是否为顶层会话,只对顶层会话发「任务已完成」通知,避免子代理结束刷屏;agents 服务不可用时降级为不过滤。
avatars.githubusercontent.com/u/148330874?v=4&s=200),仅在显示通知时由 Windows 拉取subprocess 服务不可用时插件静默停用agent/status → idle 在每次顶层回合结束时触发,属于「回合/任务完成」语义api[_-]?key、secret、token、password、私钥头等模式)avatars.githubusercontent.com/u/148330874?v=4&s=200,仅供 Windows 拉取通知图标),已在 README 披露CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。