NattoCB/dsh-plugin-wechat-bridge

DeepSeek Harness 的微信(ilink bot)桥接插件:每个对等方每天一个 DSH 代理会话

Project Overview项目介绍

This is a DSH-native bundle plugin that enables bridging DSH agent conversations to WeChat private messages using the official WeChat ilink bot API. To install it, you can run the one-liner command dsh plugin --profile web add github:NattoCB/dsh-plugin-wechat-bridge after you have a working DeepSeek Harness instance running the dsh web command. It adds a dedicated "WeChat Bridge" tab to DSH's settings UI, registers the /wechat slash command, and exposes tools for DSH agents to interact with WeChat.

After installation, you need to bind your WeChat account via QR code login either through the DSH settings UI or the /wechat qrlogin slash command. Once bound, any private message sent to the bot WeChat account will trigger a new DSH agent conversation automatically, and the reply from DSH will be streamed back to WeChat in plain text chunks. The plugin creates a new conversation per user per day by default, and injects the same global agent context and presets used in the DSH GUI to keep behavior consistent for end users.

This plugin has two core prerequisites: a working DSH dsh web instance and a WeChat account granted ilink bot (bot_type=3) permission. It only supports private WeChat chats, with no group chat functionality, and incoming voice messages are only saved to local disk without automatic transcription. All persistent data including account credentials, service state and conversations are stored in local JSON files, so no external database is required. The project is released under the open-source MIT license, free to use and modify.

这是一个专为 DeepSeek Harness (DSH) 开发的原生 bundle 插件,作用是通过微信 ilink bot API 将 DSH 智能体会话桥接到微信私聊。用户可以直接在微信私聊发送消息触发 DSH 会话,DSH 的回复会以纯文本分片流式发回微信,支持热插拔启停,变更无需重启 DSH 进程。可通过一条 dsh 命令快速安装到 DSH 的 web 配置文件中。

安装绑定后,用户只需在已授权的微信账号发送私聊消息即可启动会话,插件每天为每个联系人自动新建一个会话,会话会自动注入全局 AGENTS.md 和可用技能信息,使用和 DSH GUI 一致的预设配置。主要面向需要随时通过微信触发 DSH 能力、接收 DSH 会话通知的 DSH 用户,支持入站白名单访问控制,避免未授权用户使用。

本插件依赖已正常运行的 DSH web 实例和一个具备 ilink bot 权限(bot_type=3)的微信账号,仅支持微信私聊,不支持群聊。语音入站只会存盘不做转写,所有数据都持久化在本地 JSON 文件中,不需要额外数据库,项目遵循 MIT 开源许可协议,免费供用户使用修改。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

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

CLI Install命令行安装

dsh plugin --profile web add github:NattoCB/dsh-plugin-wechat-bridge

把 NattoCB/dsh-plugin-wechat-bridge 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-plugin-wechat-bridge

把 DSH agent 装进你的微信:私聊消息驱动 agent 会话,回复以纯文本流式发回。

License GitHub

微信 ilink bot 桥接 热插拔 每人每天一个会话 崩溃安全 出站媒体

awesome · DSH 插件

集成面:设置命名空间 wechat-bridge · 斜杠命令 /wechat · 工具 wechat_send_file · Settings「微信桥接」页签

语言 / Language:中文 | English

把 DSH agent 装进你的微信。一个 DeepSeek Harness bundle 插件: 把微信(ilink bot)私聊消息桥接进 DSH agent 会话,回复以纯文本分片流式发回。 装进 web profile → 扫码绑定一个 bot_type=3 微信账号 → 微信里直接对话。 每人每天一个会话、JSON 文件持久化、崩溃安全的轮询;Settings UI / /wechat 命令 / settings.yaml 三种方式实时启停,无需重启 dsh web。

✨ 功能一览

  • 📱 微信私聊 → DSH agent:按配置账号轮询微信 ilink bot API(getupdates,支持多账号);私聊消息驱动 agent 会话,回复以纯文本分片发回(4096 字符 × 至多 5 段,超出截断)。
  • 🔌 运行时热插拔:Settings UI 页签、/wechat 斜杠命令、settings.yaml 三种独立控制,启停立即生效,无需重启进程。
  • 🗓️ 每人每天一个会话:本机时区本地零点轮换,当天首条入站消息惰性创建,标题 <YYYY-MM-DD>;当天无对话不产生会话文件,坏日志不会阻塞第二天。
  • 🛡️ 结构上崩溃安全:跨进程轮询锁(~/.dsh/wechat-bridge/poll.lock)、按聊天串行、入站去重(message_id 至多一次)、损坏日志隔离为 .corrupt-<ts> 并自愈重建。
  • 📣 单向会话通知(默认开启):DSH 内任何顶层会话的每个 turn 结束都会给白名单微信推送一条固定模板简讯(会话名 ≤15 字 + 会话 id 特征段前 6 位(自动剥掉 session- 前缀,避免出现无意义的 "sessio"),第二行回复前缀 ≤200 字,无需 LLM 总结);通知严格单向——只经微信 API 直发,不写入任何会话,与每日桥接会话互不污染。Settings 页签有开关 + 「发送测试」按钮。支持按工作区静音(会话通知卡的「静音工作区」,+号懒加载下拉选择,muted 工作区内所有会话不推送,改动即时生效)。token 失效期间的通知自动暂存(≤20 条、24 小时),下次给机器人发消息后合并补发——新的一天不需要先靠双向会话"激活"。
  • 🚪 入站白名单(fail-closed):allowedPeers 留空 = 拒绝所有人;匹配的是机器人内部联系人 ID(一串奇怪的字符,不是微信号/昵称),逗号分隔;Settings 页签「入站白名单」卡直接编辑,对话过的 ID 以 chip 一键填入。
  • 📤 出站媒体:agent 调用 wechat_send_file 工具,把本地生成的图片/视频/文件上传微信 CDN 发给当前对话人(按扩展名路由,可选说明文字)。
  • 📥 入站媒体:微信发来的图片/文件/视频/语音自动从 CDN 下载并 AES 解密,存入 WeChatSpace/inbox/<日期>/ 并注明路径;所选模型声明图像输入时,图片以原生 image 内容附带。
  • 🧠 上下文与 GUI 等价:每天会话注入用户全局 ~/.dsh/AGENTS.md 全文与可用 skill 目录(<available_skills>),并挂载与 GUI 相同的 agent preset。
  • 🚫 交互选项 UI 禁用(防挂起):ask_user_question 等交互式选项工具在微信会话中被 deny——其应答通道是 DSH 网页 GUI,手机端看不到也点不了;改为把问题与选项写成纯文本,用户以普通微信消息回复。
  • 💾 自包含持久化:账号、context_token、轮询偏移持久化在单个原子 JSON(~/.dsh/wechat-bridge/state.json),无需数据库;会话存 ~/.dsh/wechat-bridge/WeChatSpace。
  • 🔁 自动迁移:旧 weixin-bridge 数据目录与设置段一次性更名为 wechat-*;账号遇 errcode -14(会话过期)暂停 60 分钟。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-playwright-cli 下一个 Next dsh-light-memory →