ljnljn2005 / dsh-wecom-notify

목록에 있음

DSH 插件:任务完成 / 报错 / 需要用户选择时,自动通过企业微信群机器人 webhook 发送通知(text 默认,可切换 markdown)

main도구 소스 보기

설치

npx -y @deepseek-ai/dsh plugin --profile web add github:ljnljn2005/dsh-wecom-notify

이 설치 명령은 GitHub 저장소 주소에서 생성된 확인되지 않은 시작점입니다.

README

유지 관리자가 작성한 문서 스냅샷입니다.

GitHub에서 보기 ↗
커밋 e8f7182동기화 2026. 8. 18.

dsh-wecom-notify

DSH(DeepSeek Harness)插件:当 任务完成任务报错需要用户选择/确认 时,自动通过企业微信群机器人 webhook 发送通知到企业微信群。默认发送 text 消息,可配置为 markdown

工作原理

插件监听 Harness 的事件信号:

时机信号通知
任务完成agent/status running → idle,且最后一个 turn/end reason 为 completed✅ 任务完成(附最后一段回复摘要)
任务出错agent/error❌ 任务出错(附错误信息)
需要用户选择session/eventask_user_question 工具调用 / 回合被阻塞等待输入❓ 需要您的确认(附问题与选项)

每次通知都经 fetch POST 到企业微信 webhook,发送失败只记日志,绝不影响 Harness 主流程。

安装

从 GitHub 拉取安装(可固定到某个 commit;去掉 #<commit> 则跟随默认分支最新提交):

dsh plugin --profile web add github:ljnljn2005/dsh-wecom-notify#f729370121d333794a5a76734ea77021535a7b6e
dsh plugin --profile headless add github:ljnljn2005/dsh-wecom-notify   # 可选

然后在 profile 的 cordis.patch.yml 中启用并配置:

- insert:
    - id: wecom-notify
      name: 'dsh-wecom-notify'
      config:
        webhookUrl: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=你的key'
        msgType: 'text'

重启对应 profile 的服务后生效(如 dsh web / dsh --profile headless ...)。

配置项

字段类型默认说明
webhookUrlstring必填企业微信群机器人 webhook 地址
msgTypetext | markdowntext消息类型
notifyCompletebooleantrue任务完成时通知
notifyErrorbooleantrue任务出错时通知
notifyQuestionbooleantrue需要用户选择/确认时通知
titlestringDSH 通知通知标题前缀
mentionAllbooleanfalse@所有人(text 用 mentioned_list: ["@all"];markdown 用 <@all>
mentionedListstring[][]@指定成员(企业 userid;markdown 模式在正文追加 <@userid>
mentionedMobileListstring[][]@指定手机号成员(text 模式)
timeoutMsnumber5000HTTP 超时(毫秒)
maxContentLengthnumber500消息正文最大字符数

示例:markdown 模式

- insert:
    - id: wecom-notify
      name: 'dsh-wecom-notify'
      config:
        webhookUrl: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=你的key'
        msgType: 'markdown'
        title: 'DSH 任务通知'
        mentionAll: true

本地测试

仓库内提供 test/test.mjs:起一个本地 HTTP 服务扮演企业微信 webhook,用真实 cordis 事件总线模拟三类信号,断言收到的消息体。

node test/test.mjs

프로젝트 파일 및 신호

표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.

테스트감지됨

저장소 정보

언어
JavaScript
라이선스
MIT
마지막 업데이트
2026. 8. 16. 오전 12:18

신중하게 설치하기

소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.