任务完成通知:ServerChan / 钉钉 / 飞书 / 通用 Webhook。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:yangyongzhen/dsh-notify
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
DeepSeek Harness 任务完成通知插件:turn 结束后把结果摘要推送到 Server酱 / 钉钉 / 飞书 / 通用 Webhook。
长任务(几十分钟到几小时)跑完不用一直盯着终端,手机收通知即可。
- 监听
session/event事件流,turn/end后防抖debounceMs推送 - 通知内容:模型、耗时、工具调用数、token 消耗(含缓存读写)、最后一条助手消息摘要、回合结果(完成/出错/被中断…)
- 支持 4 种渠道:Server酱(form 表单)、钉钉(含加签模式)、飞书、通用 Webhook(JSON)
- 进程退出时 flush 待发送通知(headless 一次性任务也能送达)
安装
# 本地 checkout 安装
dsh plugin --profile <web|tui|headless> add file:/path/to/dsh-notify
# 或从 Git 仓库安装
dsh plugin --profile <web|tui|headless> add https://gitcode.com/qq8864/dsh-notify.git
配置
通过 profile 的 cordis.patch.yml 或 --patch overlay 配置渠道:
- id: notify
config:
enabled: true
debounceMs: 10000 # turn/end 后的静默等待
summaryMaxChars: 500 # 助手消息摘要截断
titlePrefix: '' # 通知标题前缀
notifyOnCompleted: true # 正常完成时通知
notifyOnError: true # 出错/达到上限时通知
channels:
- type: serverchan # Server酱(方糖)
url: https://sctapi.ftqq.com/<SENDKEY>.send
- type: dingtalk # 钉钉机器人
url: https://oapi.dingtalk.com/robot/send?access_token=<TOKEN>
secret: <加签模式的 secret,可选>
- type: feishu # 飞书机器人
url: https://open.feishu.cn/open-apis/bot/v2/hook/<TOKEN>
- type: generic # 通用 Webhook(JSON: title/content/timestamp)
url: https://example.com/hook
channels 为空数组时不发送任何通知(插件只订阅不动作)。
通知样例(generic 渠道)
{
"title": "[dsh] 任务完成",
"content": "模型:deepseek-official/deepseek-v4-flash\n耗时:4s\ntokens:8247 in / 122 out(缓存读 0 / 写 0)\n---\ndef fibonacci(n): ...",
"timestamp": "2026-08-14T09:22:36.409Z"
}
开发
pnpm install
pnpm run build # tsc -> lib/
端到端验证(本地 webhook):
node test/hook-server.mjs & # 监听 127.0.0.1:9999,落盘 test/hook-received.jsonl
dsh --profile headless --patch ./test/notify-patch.yml "一句话介绍你自己"
cat test/hook-received.jsonl
链接
同类插件
omdsh-dev/dsh-notification★ 42
回合完成桌面通知,按结果分控 + 关键词过滤。
omdsh-dev/dsh-open-in-vscode★ 40
从 Web GUI 一键在 VS Code 中打开工作区目录。
whyihaveyou/dsh-suite#plugin-notify★ 19
回合完成、错误或待审批时推送 IM webhook(飞书/企微/钉钉/Slack/Discord/自定义)与本地通知。
bill9109/dsh-web-ui-notify★ 12
桌面通知提醒。
bobleer/dsh-acp-for-bitfun★ 9
BitFun 与 DSH 的 ACP 交互对接。
openma-ai/deepseek-harness-acp★ 7
ACP profile 插件与独立 stdio server,可从 Zed 等 ACP 客户端使用完整 DSH agent,并共享 DSH 凭据与会话。