ztllll/dsh-push-notify ↗★ 0

dsh-push-notify

DSH 推送通知插件:会话完成、卡住、需要人工、模型出错时,推送到 ntfy(手机)或你自己的 webhook。Push notifications for DeepSeek Harness sessions to ntfy or your own webhook. 支持将会话完成、卡住或报错等事件推送到ntfy或自定义webhook,适合需要离线接收通知的用户。

パッケージ
dsh-push-notify
互換性
未検証
バージョン
0.3.0
ライセンス
MIT
最終更新
2026/10/19

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ztllll/dsh-push-notify

ドキュメント

README 全文を読む ↗

配置接口(三种方式,任选)

方式一:插件页面板(最简单)

侧栏 插件 → 已安装 → 推送通知,在「通知地址」里填一个 http:// 或 https:// 地址,点保存。下一条通知起生效,不用重启。 填 https://ntfy.sh/主题 就按 ntfy 发到手机;填其他地址就按 webhook 把 JSON POST 过去(格式见「Webhook 收到什么」)。留空则不发。 面板只管这一个地址;多个接口、事件开关、阈值请用方式二或方式三。

方式二:在对话里用 /notify(推荐,立刻生效)

/notify                                   查看状态
/notify add  [name=手机] [preset=ntfy|webhook] [token=…] [events=done,human]
/notify test [名字|#序号]                  发一条测试通知
/notify rm                     删除
/notify on | off                          总开关
  • 接口保存在 ~/.dsh/dsh-push-notify/endpoints.json,权限 0600(里面有 webhook 密钥)。
  • /notify 命令本身不会被记入会话日志(命令行里可能带密钥),回显、状态和日志里只显示地址的域名(如 ntfy.sh/…),路径和参数一律不显示;多个接口请用 name= 区分。
  • ntfy.sh 的地址自动按 ntfy 发送;自建 ntfy 服务器请加 preset=ntfy。其他地址都按 webhook 发送。
  • token=:ntfy 开了访问控制时填,插件会带上 Authorization: Bearer 。

方式三:写在插件配置里(可以多个、可以每个接口选不同事件)

dsh 的 profile 里(cordis.patch.yml):

- id: push-notify
  config:
    detail: normal            # normal(默认,带 agent 回复)| minimal(不带任何对话内容)| full,见「隐私」
    lang: auto                # auto | zh | en
    endpoints:
      - name: 手机
        url: https://ntfy.sh/一个只有你知道的长随机主题
      - name: 我的服务
        url: https://example.com/dsh-hook
        headers: { Authorization: "Bearer 你的密钥" }
        events: [human, error]   # 这个接口只收 需要人 和 出错

方式三:写在插件配置里(可以多个、可以每个接口选不同事件)

dsh 的 profile 里(cordis.patch.yml):

- id: push-notify
  config:
    detail: normal            # normal(默认,带 agent 回复)| minimal(不带任何对话内容)| full,见「隐私」
    lang: auto                # auto | zh | en
    endpoints:
      - name: 手机
        url: https://ntfy.sh/一个只有你知道的长随机主题
      - name: 我的服务
        url: https://example.com/dsh-hook
        headers: { Authorization: "Bearer 你的密钥" }
        events: [human, error]   # 这个接口只收 需要人 和 出错