dsh
OpenPetsHQ/openpets将 DeepSeek Harness 的生命周期状态、错误与审批请求,桥接到本地运行的 OpenPets 桌面伙伴。
DeepSeek Harness 多渠道通知插件:注册 send_notification 工具与设置页,向 NotifyX、企业微信应用通知、企业微信机器人、邮件(Resend/SMTP)、钉钉机器人、飞书机器人发送通知;支持浏览器通知、运行结束/阻塞/目标完成事件自动推送。
DSH 多渠道通知插件:为 DeepSeek Harness 增加 send_notification 模型工具、运行状态/阻塞事件自动通知,以及「通知 / Notifications」设置页。
支持的渠道:
dsh plugin --profile web add @czf1995/dsh-notifier
或手动:
/opt/dsh/profiles/web/node_modules/@czf1995/dsh-notifier;package.json 增加依赖 @czf1995/dsh-notifier,并把它加入 dsh.profile.bundles。cordis.patch.yml 提供 bundle patch 行(id: notifier → 包名 @czf1995/dsh-notifier)。
页面在后台(失焦或隐藏标签页)时,通过浏览器系统通知提醒你:
由 Host 进程直接投递,不依赖浏览器页面:
goal/change → complete)自动推送(默认关闭,见下方开关)。send_notification:参数 title(标题)、content(正文),向所有已启用渠道发送。
DSH Web 设置 → 「通知」页。
| 开关 | 默认 | 说明 |
|---|---|---|
| 启用通知 | 开 | 总开关 |
| 浏览器本地通知 | 关 | 页面在后台时弹系统通知 |
| 运行结束时通知 | 开 | 运行结束提醒(仅浏览器通知有效) |
| 提问时通知 | 开 | 需要回答时提醒 |
| 审批请求时通知 | 开 | 需要批准时提醒 |
| 声音 | 开 | 通知是否发声 |
settings 容器),设置页经宿主的 SettingsForms 代理路由读写(revision CAS 防并发覆盖),持久化到 profile cordis.patch.yml 的 notifier 条目 config.settings 下,改后热生效、无需重启;直接手改 patch 同样会被 HMR 热应用。/dsh-notifier/test、/api/dsh-notifier/deliver 与 /dsh-notifier/config 路由仅接受本机回环同源请求(与 DSH /api 相同的信任判定)。describe 脱敏 + mutate 按路径编辑,UI 拿不到的 secret 也覆盖不掉),只在 Host 进程与 profile patch 内持有。除了模型工具,外部脚本、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 | feishuto:可选,仅 SMTP 生效(临时收件人覆盖默认收件人)。200:{ "ok": true, "value": { "channel", "sent": true } }502(或 400/403/405 参数错误):{ "ok": false, "error": { "code", "message", "details": { "channel", "message" } } }错误码固定一套:loopback-only / method-not-allowed / bad-request / unknown-channel / not-configured / invalid-config / http-error / api-error / request-failed / delivery-failed。每个渠道的网络请求都有 10s 超时上限,单个渠道失败不会阻塞其它渠道。
settings 容器)并从 loader 条目读活配置,修复 dsh 0.2.0 上因 settings.register 被移除而回退空默认配置、导致所有外发通知静默失败的问题;设置页回归(settings.section 无条件 slot 注册 + plugins.bundle.config 座位,数据面走宿主 SettingsForms 代理路由 GET/PUT /dsh-notifier/config,secret 脱敏、revision CAS、免重启热生效);浏览器通知 watcher 改吃活配置。/api/dsh-notifier/deliver(设置页/工具/HTTP 共用同一投递核心)、渠道请求统一 10s 超时(AbortSignal.timeout)、固定投递错误码与 {ok,value|error} 响应形状。MIT