dsh-notify

by haytham818

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

DSH(DeepSeek Harness)系统通知插件:当 agent 完成任务 、 出错 、 阻塞等待你的回答 或 等待审批 时,向操作系统发送桌面通知(通过 node-notifier 跨平台封装,Linux 走 notify-send ,macOS 走 terminal-notifier,Windows 走…

DSH system notification plugin: desktop notifications when an agent finishes a task, errors, asks a question,

安装

dsh plugin --profile web add github:haytham818/dsh-notify

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

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

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

README

目录

DSH(DeepSeek Harness)系统通知插件:当 agent 完成任务、出错、阻塞等待你的回答或等待审批时,向操作系统发送桌面通知(通过 node-notifier 跨平台封装,Linux 走 notify-send,macOS 走 terminal-notifier,Windows 走 snoretoast),这样你切走窗口也能第一时间知道。

触发场景

场景 通知标题 说明
任务完成 DSH · 任务完成 agent 结束一轮运行回到 idle(turn/end reason 为 completed / max-tokens),正文为最近一条用户消息摘要
任务出错 DSH · 任务出错 一轮运行以 error 结束,正文为错误信息
阻塞提问 DSH · 需要你回答 agent 调用 ask_user_question,工具阻塞等待你的回答,正文为问题文本
等待审批 DSH · 等待审批 agent 的工具派发被审批环节挂起,正文为审批原因

默认只通知根 agent(子 agent 完成任务不通知,避免子代理扇出刷屏),用户主动取消(aborted)不通知。

安装

# 1. 安装插件依赖(node-notifier)。dsh plugin add 只链接仓库、不会装它的依赖,
#    必须先在仓库目录执行一次安装:
cd /home/haytham/Repos/dsh-plugins/dsh-notify && pnpm install   # 或 npm install

# 2. 把本仓库加入 dsh web profile(会在 profile 的 node_modules 里建链接)
dsh plugin --profile web add "link:/home/haytham/Repos/dsh-plugins/dsh-notify"

# 3. 在 ~/.dsh/profiles/web/cordis.patch.yml 中追加插入行(profile 的 HMR 会自动热加载):
- insert:
    - id: dsh-notify
      name: dsh-notify

配置

插入行可带 config 覆盖默认配置(apply(ctx, config) 与默认值合并):

- insert:
    - id: dsh-notify
      name: dsh-notify
      config:
        appName: DSH
        notifyOnComplete: true
        notifyOnError: true
        notifyOnQuestion: true
        notifyOnApproval: true
        rootsOnly: true
        completeUrgency: normal   # low | normal | critical
        blockingUrgency: critical # 提问/审批(等待你操作)默认 critical(常驻)
        errorUrgency: critical
        bodyLimit: 100
        enabled: true

测试

  • 在会话里输入 /dsh-notify-test,会立即发送一条「测试通知」。
  • 或者随便给 agent 一个任务,运行结束后应出现「任务完成」通知。

原理

  • 任务完成/出错:监听 agent/status(running → idle)。agent 阻塞等待提问/审批时 phase 保持 running(工具调用挂起),只有真正结束运行才回到 idle,此时最近一轮 turn/end 的 reason 已落盘,据此区分 completed / max-tokens / error / aborted / blocked。
  • 阻塞提问:监听 tools/execute 瀑布,识别 ask_user_question 派发(该工具会一直阻塞到用户回答)。
  • 等待审批:监听 approval/request 瀑布(必须调用并返回 next() 以保持审批链)。
  • 根 agent 过滤:agents.roots()。
  • 通知发送:通过 node-notifier 跨平台封装——Linux 走 notify-send(-a 应用名、-u 优先级)、macOS 走内置的 terminal-notifier、Windows 走 snoretoast(应用名映射为 toast appID)。库未安装时回退为直接调用 notify-send / osascript。失败只记日志不影响 agent。

排查

  • 通知没出现:确认 notify-send 在 PATH(command -v notify-send,node-notifier 的 Linux 后端同样依赖它),且 dsh 宿主进程继承了桌面会话环境(DBUS_SESSION_BUS_ADDRESS、DISPLAY/WAYLAND_DISPLAY)。从终端启动 dsh 一般没问题;若以 systemd user service 启动,检查服务的环境。
  • 宿主日志中 [dsh-notify] 前缀会打印每次通知内容与失败原因(dsh 启动时的终端输出)。若日志出现「node-notifier 未安装」警告,说明仓库依赖没装好(见安装步骤 1)。
  • Windows:原生支持(snoretoast),无需额外配置。
  • 挂载是否成功:输入 /dsh-notify-test,能执行即已挂载。

原始 README: https://github.com/haytham818/dsh-notify/blob/master/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