wuyuanjiang1/dsh2wechat

插件Plugin 原生Native ⭐ 3 Web 界面Web UI

DeepSeek Harness 微信 ClawBot 消息桥插件

项目介绍Project Overview

dsh2wechat 是 DeepSeek Harness 的微信桥接插件,通过微信 ClawBot(iLink)把用户消息转发给 DSH 并回发答复。核心能力包括:每用户独立持久会话(im-wechat-*)、getupdates 长轮询与 sendmessage 回复、内置官方限速排队与退避、进程级崩溃钩子写入 dshplug.log、会话自愈清理。适用场景:希望从微信端远程调用 DSH Agent、与 GUI 会话隔离的运营或客服场景;本地可通过 127.0.0.1:3901/health 检查状态。注意事项:受微信官方限速约束(约 7 条/5 分钟),高频消息会被排队或丢弃,且绑定需手机微信扫码完成。

dsh2wechat is a DeepSeek Harness plugin that bridges WeChat ClawBot (iLink) to DSH, forwarding WeChat messages to the agent and replying with the response. Core capabilities: per-user persistent sessions named im-wechat-* isolated from the GUI, long polling via getupdates with sendmessage replies carrying context_token, built-in queueing and backoff for the official WeChat rate limit, a process-level crash hook that writes to dshplug.log, and automatic cleanup/rotation of corrupted or conflicting sessions. Use it when you need to reach DSH from WeChat in a session that survives restarts. Caveat: messages are throttled to roughly 7 per 5 minutes and initial setup requires scanning a QR code in the WeChat mobile app.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:wuyuanjiang1/dsh2wechat

wuyuanjiang1/dsh2wechat 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh2wechat — DeepSeek Harness 微信 ClawBot 消息桥

DeepSeek Harness 接入微信 ClawBot(腾讯 iLink):微信里发消息,插件交给 DSH 回答后回发。

特性

  • 单开持久会话:每个微信用户对应独立 Agent 会话(im-wechat-*),与 GUI 对话隔离,持久化、跨重启自动恢复、上下文连续。
  • getupdates 长轮询 + sendmessage 回复(携带 context_token),内置微信官方限速(约 7 条/5 分钟)排队与退避。
  • 崩溃免疫:进程级错误钩子记录到 $DSH_HOME/dshplug.log,单个错误不会杀掉 DSH 进程。
  • 会话自愈:残留/损坏会话自动清理,冲突时自动轮换 sessionId 恢复(日志 heal 行)。
  • 通用插件:凭据全在配置、零硬编码、无账号白名单;可选 allowUsers 白名单。
  • 本地状态检查:http://127.0.0.1:3901/health

安装

1. 构建

git clone https://github.com/wuyuanjiang1/dsh2wechat.git
cd dshplug
pnpm install
pnpm run build

2. 挂载到 profile

dsh plugin --profile web add file:C:/绝对/路径/dshplug

3. 微信扫码绑定(一条命令)

node tools/wechat-login.mjs --write

终端会显示二维码(手机微信扫码)或可复制链接;确认后自动把凭据写入 $DSH_HOME/profiles/web/cordis.patch.yml(wechat 段:token/botId/baseUrl/enabled)。

参数:--profile <name>(默认 web)、--timeout <秒>(默认 600)、不加 --write 只输出凭据。

4. 生效

dsh web        # 或 dsh --profile <name>

重启 profile 后,给机器人发一条微信消息即可使用。

上一个 Prev dsh-legion 下一个 Next dsh-web-search-plugin