Multi-channel IM bridge for DeepSeek Harness: route WeChat (ClawBot/iLink), QQ, and Feishu (Lark) chat messages to a DSH agent and relay its replies back, with per-channel sessions and reply dedup.
Install
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/baisama-cloud/dsh-omni-bridge/releases/download/v0.2.0/dsh-omni-bridge-0.2.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:baisama-cloud/dsh-omni-bridge
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
Multi-channel message bridge for DeepSeek Harness (DSH): route WeChat (ClawBot/iLink), QQ, and Feishu (Lark) chat messages to a DSH agent, and relay the agent's replies back to the sender.
多通道桥接插件:把微信 ClawBot / QQ / 飞书的消息接入 DSH agent,并把回复回传给发消息的人。 远程操控Agent。
Channels
| 通道 | 收消息 | 发消息 | 凭据 |
|---|---|---|---|
| 微信 ClawBot | iLink 拉模式 (/ilink/bot/getupdates) |
/ilink/bot/sendmessage(带 client_id + base_info + 回传 context_token) |
botToken(扫码登录) |
| 官方网关 WebSocket(长连接) | `POST /v2/users | groups/{openid}/messages(被动消息带 msg_id`) |
|
| 飞书 | 官方 SDK 长连接(@larksuiteoapi/node-sdk,订阅 im.message.receive_v1) |
tenant_access_token + im/v1/messages |
appId + appSecret |
- 微信/QQ:无默认 openid —— 谁发消息就回谁;群内 @机器人 就回群里(被动消息)。
- 飞书:群内默认需 @机器人 才回复(
requireMention),私聊始终回复。 - 每个通道一个独立 DSH 会话(
omni-bridge-<channel>),回复去重用sessionPersistence.readFrom水位(持久化 seq),解决「只有第一条回复」的问题。
形式说明
当前以 DSH 持久化 bundle 形式提供(host + client 打包进 profile,跨 DSH 重启生效):
lib/index.js—— host 半区:三个通道的收发 + 会话桥接 + 定时轮询,通过webServer路由对外提供 RPC(/omni-bridge/*)。lib/client.js—— client 半区:设置页(微信/QQ/飞书三张卡片),通过fetch调用 host 路由。lib/feishu-ws.cjs—— 飞书长连接子进程(由 host 用node拉起)。
安装(bundle)
方式一:从 npm 安装(推荐)
# 在 profile(如 ~/.dsh/profiles/web)目录执行
pnpm add dsh-omni-bridge
然后在 profile 的 package.json 的 dsh.profile.bundles 追加 "dsh-omni-bridge",重启 DSH 生效。
方式二:本地 tgz 安装
npm pack打包成 tgz(或直接用仓库目录)。- 在 profile(如
~/.dsh/profiles/web)的package.json:dsh.profile.bundles追加"dsh-omni-bridge";dependencies追加"dsh-omni-bridge": "file:<tgz 路径>"。
- 在 profile 目录执行
pnpm install(会自动安装@larksuiteoapi/node-sdk依赖)。 - 重启 DSH(bundle 层在启动时组合,需重启生效)。
方式三:从 DSH 商城 / GitHub 安装
# 在任意一次性或正式 profile 上直接加仓库路径(等价于商城 GitHub 源安装)
dsh plugin --profile <p> add https://github.com/baisama-cloud/dsh-omni-bridge
兼容性
- DSH 版本范围:
>=0.1.0-rc.8 <0.2.0(声明于package.json的dsh.compatibility.dsh)。 - Node.js:
>=22.13.0。 - 逐版本声明:
package.json的dsh.compatibility.dshReleases对每个公开发行版给出compatible记录(rc.7/rc.8为商店仍接受的历史别名,其余为完整 SemVer 键)。
每个声明版本都配有一次性 Profile 安装/启动/卸载证据(install、start、uninstall),
方法与逐版本结果见 COMPATIBILITY.md。该类证据为一次性 Profile
级(partial):证明 bundle 能随对应 DSH 发行版安装、组合并完成宿主 apply() 启动;
真实第三方消息收发需外部凭据与网络服务,不包含在该证据内。
依赖
飞书长连接依赖官方 SDK,由 bundle 的 dependencies 自动安装:
pnpm add @larksuiteoapi/node-sdk # 或随 bundle 一起 pnpm install
lib/feishu-ws.cjs 通过 require('@larksuiteoapi/node-sdk') 加载 SDK,Node 从该脚本所在目录向上解析到 profile 的 node_modules。
配置
配置文件位于 ~/.dsh/omni-bridge-config.json(写入时权限为 0600,目录 0700):
{
"runtime": { "provider": "deepseek-official", "model": "deepseek-v4-flash" },
"channels": {
"weixin": { "enabled": true, "botToken": "...", "defaultTarget": "", "allowedUsers": [], "allowAll": false },
"qq": { "enabled": true, "appId": "...", "secret": "...", "allowedUsers": [], "allowAll": false },
"feishu": { "enabled": true, "appId": "cli_...", "appSecret": "...", "requireMention": true, "allowedUsers": [], "allowAll": false }
}
}
发送者白名单(安全默认)
每个频道默认拒绝所有入站消息(allowAll: false 且 allowedUsers 为空时无人可用)。运营者二选一显式放行:
allowedUsers: 允许的发送者 ID 数组。微信用from_user_id(如xxx@im.wechat),QQ 单聊/群聊用成员openid,飞书用sender_open_id。未授权消息会收到一条「未授权」提示,并在 host 日志打印[bridge] unauthorized <channel> sender=<id>(可用它找到自己的 ID)。allowAll: true: 允许所有人(显式选择开放,不建议生产使用)。
设置页每个通道卡片也提供「允许的用户 ID(逗号分隔)」与「允许所有人」开关。
微信
- 在设置页点「获取二维码」→ 手机扫码登录,自动回填
botToken。 defaultTarget留空则回复私信者。
- QQ 开放平台 建机器人,拿
appId/secret。 - 订阅「单聊消息」「群聊@消息」事件、开启被动消息权限。
- 私信即回该用户;群里 @机器人 即回该用户。
飞书
- 飞书开放平台 建「自建应用」,拿 App ID / App Secret。
- 权限管理:添加
im:message(含im:message.group_at_msg、im:message.p2p_msg、im:message:send_as_bot)。 - 事件与回调:订阅方式选「使用长连接接收事件」,事件订阅添加
im.message.receive_v1。 - 版本管理与发布:创建版本并发布(不发布权限和订阅不生效)。
- 机器人加入会话/群。
使用
安装并重启后,设置页出现「远程桥接」卡片(微信/QQ/飞书三张配置卡)。
已知限制
- 飞书被动回复有时效(收到消息后有限时间内回复)。
weixin-qr/weixin-poll使用 iLink 扫码登录流程,botToken会写入~/.dsh/omni-bridge-config.json。
License
MIT
Links
More in this category
xmanrui/dsh-im★ 1579
Connect IM bots to DeepSeek Harness via QR codes or bot credentials (9 channels: Feishu, WeChat, DingTalk, WeCom, QQ, Slack, Telegram, Discord, and WhatsApp).
shaobeichen/dsh-pocket★ 1456
Remote phone access to the DSH Web UI: scan a QR code for LAN or public (cloudflared tunnel) access with real-time sync, a mobile-adaptive layout, and a settings tab.
inclusionAI/Avernet#deepseek-harness-channel-bcn★ 602
Connects DeepSeek Harness to Avernet's Bot Collaboration Network over WebSocket V2, with automatic onboarding, isolated agent sessions, tool-call events, and multi-bot routing tools.
omdsh-dev/dsh-notification★ 85
Desktop notifications for turn completions, with per-outcome controls and keyword rules.
whyihaveyou/dsh-suite#plugin-notify★ 56
IM webhook and local notifications on turn completion, errors, or approval (Feishu/WeCom/DingTalk/Slack/Discord/custom).
omdsh-dev/dsh-lark★ 55
Lark/Feishu bot channel for DeepSeek Harness: each chat drives its own agent, and tool approvals, model questions, and plan reviews return as cards answered by a button or a reply. Switch workspace and model from the chat (`/cd`, `/model`, `/new`), and run several bots that keep separate sessions and can hand turns to each other in one group.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.