READMESource: main@3c20bf0a
dsh-notify 🔔
dsh 任务完成时推送手机通知。监听 turn/end 事件(一轮任务结束),通过 Bark(iPhone)/ Server酱(微信)/ 任意 webhook 提醒你。
1. 准备推送通道(二选一)
方案 A:Bark(iPhone,推荐)
- App Store 装 Bark
- 打开 App,复制你的推送地址,形如:
https://api.day.app/xxxxxxxxxxxx
方案 B:Server酱(微信)
- 打开 sct.ftqq.com,微信扫码登录
- 复制 SendKey,拼接成:
https://sctapi.ftqq.com/<SendKey>.send
2. 配置 webhook
export DSH_NOTIFY_WEBHOOK="https://api.day.app/xxxxxxxxxxxx"
或在 cordis.patch.yml 的插件条目里加 config(效果相同):
- insert:
- id: dsh-notify
name: '@dsh-external/dsh-notify'
config:
webhook: 'https://api.day.app/xxxxxxxxxxxx'
3. 挂载插件
dsh plugin --profile web add link:/Users/nkhszk/.openclaw/workspace/dsh-notify
4. 重启生效
dsh web
5. 验证
在 dsh 里随便跑一个任务,完成后手机应该收到"✅ dsh 任务完成"推送。
没有收到?看终端日志:[dsh-notify] 发送失败: ... 会告诉你原因。
可选配置
| 字段 | 默认值 | 说明 |
|---|---|---|
webhook |
环境变量 DSH_NOTIFY_WEBHOOK |
推送地址 |
title |
✅ dsh 任务完成 |
通知标题 |
debounceMs |
10000 |
防抖毫秒数,10 秒内只发一条 |
备注
- 插件是纯 ESM 的
.js,无需 TypeScript 编译,link:挂载后直接用 - dsh 目前是 v0.1 预览版,事件名/API 可能变动;若
turn/end失效,检查官方事件目录packages/core/session/src/known-event-types.ts
No comments yet. Be the first to write one.