a23842/dsh-notifier

Project Overview项目介绍

@czf1995/dsh-notifier is a DeepSeek Harness-native notification plugin shipped as a DSH cordis bundle. It registers a send_notification model tool, auto-pushes messages when a session transitions from running to idle or gets blocked on a question or approval request, and mounts a dedicated "通知 / Notifications" settings page inside DSH Web where channel toggles, secrets, and per-channel cards are persisted through the standard DSH settings wire.

A typical workflow begins by enabling the desired channels in the settings page — NotifyX, WeCom app webhook, WeCom bot, Resend email, personal SMTP, DingTalk bot, or Feishu bot — then filling in their Webhook URLs or API keys and clicking Save. Users can verify each channel with the built-in "测试 XX 通知" button, trigger desktop browser notifications only while the tab is hidden or unfocused, or fire deliveries on demand from the agent via the send_notification tool with title and content parameters. Cron jobs and other plugins on the same host can also POST directly to the loopback delivery endpoint, which is shared by the settings page, the tool, and external callers.

The plugin is exclusively built for DSH and integrates as a profile bundle installed either through dsh plugin --profile web add @czf1995/dsh-notifier or by dropping the package into /opt/dsh/profiles/web/node_modules and registering it under dsh.profile.bundles with a cordis.patch.yml entry mapping id: notifier. External channel secrets are held only inside the Host process and never echoed back through the settings API, browser notifications are suppressed while the page is visible, and child-agent sessions are excluded by design. Every channel call carries an AbortSignal.timeout(10s) so a single failure cannot stall the others, errors are normalised into the fixed {ok, value | error} shape, and the HTTP delivery route enforces loopback-only same-origin requests on http://127.0.0.1:3080/api/dsh-notifier/deliver. Licensed under MIT.

@czf1995/dsh-notifier 是 DeepSeek Harness 的多渠道通知插件,作为 DSH 原生插件存在。它为 Agent 增加 send_notification 模型工具,并在会话由 running 进入 idle、需要用户回答或审批时自动推送通知,同时在 DSH Web 设置中新增「通知 / Notifications」设置页,承载开关、渠道启用与各渠道密钥配置。

典型使用流程:先在 DSH Web 设置中勾选需要的渠道(NotifyX、企业微信应用/机器人、SMTP/Resend、钉钉、飞书)填入 Webhook 或 API Key 并点保存,再用设置页自带的「测试 XX 通知」按钮验证通道,最后用模型工具或在浏览器后台时接收系统通知;也支持 cron 或同机脚本直接 POST 本机端点。该插件适合需要被远程提醒运行结果、审批与目标达成事件的 DSH 用户及运维场景。

它只针对 DSH,依赖 Host 进程投递外部渠道并复用 DSH 的 loopback 信任判定,单渠道网络请求 10 秒超时且互不阻塞,密钥标记为 secret 不回写;浏览器本地通知默认关闭,需用户手势授权后才能弹,首次启用需先点「发送测试通知」。外部投递端点 http://127.0.0.1:3080/api/dsh-notifier/deliver 仅接受回环同源 POST。协议为 MIT。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 @czf1995/dsh-notifier

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

READMEREADME

@czf1995/dsh-notifier

DSH 多渠道通知插件:为 DeepSeek Harness 增加 send_notification 模型工具、运行状态/阻塞事件自动通知,以及「通知 / Notifications」设置页。

支持的渠道:

  • NotifyX(默认启用)
  • 企业微信应用通知(通用 Webhook)
  • 企业微信机器人
  • 邮件通知(Resend)
  • SMTP 私人邮件(用自己的邮箱服务器发信,可发给自己或他人)
  • 钉钉机器人(Webhook + 可选加签 + @所有人)
  • 飞书机器人(自定义机器人 Webhook,可选加签 + @所有人)

安装

dsh plugin --profile web add @czf1995/dsh-notifier

或手动:

  1. 将本包安装到 /opt/dsh/profiles/web/node_modules/@czf1995/dsh-notifier;
  2. 在 profile 的 package.json 增加依赖 @czf1995/dsh-notifier,并把它加入 dsh.profile.bundles。

cordis.patch.yml 提供 bundle patch 行(id: notifier → 包名 @czf1995/dsh-notifier)。

功能

1. 浏览器本地通知(v0.2.0+,默认关闭)

页面在后台(失焦或隐藏标签页)时,通过浏览器系统通知提醒你:

  • 运行结束:会话从 running → idle 时,附带结果文案(已完成 / 失败 / 中止 / token 上限 / 被阻塞 / 被中断);
  • 提问 / 审批:会话需要你回答或批准时即时提醒(正文带上问题或工具名);
  • 前台抑制:页面可见且聚焦时不打扰,切走才弹;
  • 子代理会话不产生通知;
  • 首次启用时点击「发送测试通知」即可触发浏览器授权(需要用户手势)。

2. 外部渠道通知(Host 半区)

由 Host 进程直接投递,不依赖浏览器页面:

  • 会话运行结束自动推送(running → idle);
  • 阻塞事件(提问 / 审批)自动推送;
  • 目标完成(goal/change → complete)自动推送(默认关闭,见下方开关)。

3. 模型工具

send_notification:参数 title(标题)、content(正文),向所有已启用渠道发送。

设置页

DSH Web 设置 → 「通知」页。

通知设置

开关 默认 说明
启用通知 开 总开关
浏览器本地通知 关 页面在后台时弹系统通知
运行结束时通知 开 运行结束提醒(仅浏览器通知有效)
提问时通知 开 需要回答时提醒
审批请求时通知 开 需要批准时提醒
声音 开 通知是否发声

启用渠道

  • 勾选要使用的渠道;未勾选的渠道不发送通知。
  • 「目标完成时自动通知」默认关闭,勾选后目标达成会推送。

各渠道配置

  • 密钥类字段(API Key / Webhook URL / 飞书加签密钥)标记为 secret:不会写回设置接口返回值,输入留空即保持原值,另有「清除密钥」按钮。
  • 其他字段通过 DSH 标准 settings wire 持久化。
  • 每个渠道卡片右上角有「测试 XX 通知」按钮;测试使用已保存的配置,改完请先点「保存」再测试。

安全

  • Host 侧 /dsh-notifier/test 与 /api/dsh-notifier/deliver 路由仅接受本机回环同源请求(与 DSH /api 相同的信任判定)。
  • 各渠道密钥不写回设置接口,只在 Host 进程内持有。
  • 浏览器通知仅在页面后台时发送,内容不含密钥。

HTTP 主动投递

除了模型工具,外部脚本、cron 或同 Host 的其它插件可以直接向本机投递端点 POST 一条 JSON(loopback-only,无需鉴权头;与 DSH /api 同一信任边界):

curl --request POST http://127.0.0.1:3080/api/dsh-notifier/deliver \
  --header 'Content-Type: application/json' \
  --data '{
    "channel": "smtp",
    "title": "构建完成",
    "content": "pipeline 已结束。",
    "to": "ops@example.com"
  }'
  • channel:notifyx | webhook | wechatbot | email | smtp | dingtalk | feishu
  • to:可选,仅 SMTP 生效(临时收件人覆盖默认收件人)。
  • 成功 200:{ "ok": true, "value": { "channel", "sent": true } }
  • 失败 502(或 400/403/405 参数错误):{ "ok": false, "error": { "code", "message", "details": { "channel", "message" } } }

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-wigolo 下一个 Next dsh-tts →