dsh-notify
已验证 · 实测可装 yangyongzhen
✓ 持续维护 基于 1 个官方 DSH 包 纯 TypeScript
1Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-14最近推送
跨平台平台
功能简介
任务完成通知:ServerChan/钉钉/飞书/通用webhook
我们的评价
可用 — 实测通过,早期项目
可用 — 实测通过,早期项目
任务完成通知:ServerChan/钉钉/飞书/通用webhook 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-notify
DeepSeek Harness 任务完成通知插件:turn 结束后把结果摘要推送到 Server酱 / 钉钉 / 飞书 / 通用 Webhook。 长任务(几十分钟到几小时)跑完不用一直盯着终端,手机收通知即可。 - 监听session/event 事件流,turn/end 后防抖 debounceMs 推送
- 通知内容:模型、耗时、工具调用数、token 消耗(含缓存读写)、最后一条助手消息摘要、回合结果(完成/出错/被中断…)
- 支持 4 种渠道:Server酱(form 表单)、钉钉(含加签模式)、飞书、通用 Webhook(JSON)
- 进程退出时 flush 待发送通知(headless 一次性任务也能送达)
安装
``sh
本地 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 配置渠道:
`yaml
- 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 渠道)
`json
{
"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"
}
`
开发
`sh
pnpm install
pnpm run build # tsc -> lib/
`
端到端验证(本地 webhook):
`sh
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
``
安装
🧩 让 Agent 自动装(推荐)
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-notify」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
Web profile:
dsh plugin --profile web add dsh-notify Headless(CLI)profile:
dsh plugin --profile headless add dsh-notify 包信息
npm:dsh-notify · 版本 0.1.1 · 实测环境 dsh 0.1.0-rc.6
实测报告
端到端验证通过:dsh 0.1.0-rc.6 上 L1 安装 + L2 加载 + L3 运行问答。
使用场景
任务完成时通过 ServerChan、钉钉、飞书或通用 webhook 收到通知。
适合谁
跑批量或长任务、想在自己本来就在监控的通道收到完成提醒的人。
二次开发建议
加 webhook 通道和载荷模板——通知器的通道列表本就该扩展。