WeChat bridge for DeepSeek Harness over Tencent's iLink bot channel: one session per contact, inbound text/images/files, and WeChat's native typing indicator while a turn runs.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:dAI-aigc/dsh-wechat
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
English | 中文
Bridge WeChat contacts to DeepSeek Harness sessions.
Each WeChat contact gets its own DSH session (wechat-<contactId>), so a
conversation with one person keeps its own context. Only senders on the
allowlist are served; unless you configure allowFrom, that is exactly the
WeChat account that completed the QR login.
Install
# into the web profile; the `dsh plugin` command comes from the dshmarket plugin
dsh plugin --profile web add github:dAI-aigc/dsh-wechat
Then log in once (see Login) and restart dsh web.
Without dshmarket, mount it by hand: add this row to
~/.dsh/profiles/<profile>/cordis.patch.yml, and make the package resolvable from that
profile (junction/link this directory to node_modules/dsh-wechat, or declare it in the
profile's package.json):
- insert:
- id: dsh-wechat
name: 'dsh-wechat'
Transport
The transport is Tencent's official iLink bot channel
(https://ilinkai.weixin.qq.com) through the @tencent-weixin/openclaw-weixin
protocol (MIT, see LICENSE-tencent). The protocol layer is vendored under
src/api, src/cdn, and src/messaging; the OpenClaw runtime glue was
replaced with harness-native equivalents (src/util/logger.ts,
src/storage/state-dir.ts, src/auth/accounts.ts).
Typing indicator
While a bridged turn runs, the contact sees WeChat's native typing indicator:
the bridge fetches a typing ticket (getConfig), sends sendTyping status 1,
refreshes it every 15 seconds for the length of the turn, and cancels it right
before the reply lands. A ticket that cannot be fetched, or any sendTyping
failure, is logged and ignored — the indicator never costs a reply.
Configuration (settings namespace dsh-wechat)
| field | default | meaning |
|---|---|---|
enabled |
true |
master switch for the message loop |
allowFrom |
[] |
WeChat ids allowed to drive the agent; empty means "the linked account only" |
provider / model |
"" |
model route for bridged sessions; empty inherits the harness default |
cwd |
"" |
working directory for bridged sessions; empty uses this package's own directory, so sessions land in the Workspace registered for it |
replyAsSelf |
false |
send replies as the linked account (message_type: USER) so WeChat would draw them on the right; the channel accepted those sends and delivered nothing, so it stays off |
Login: connecting a WeChat account
Login runs on the computer, from this package's directory — WeChat itself only has to scan the code; there is no entry point to open inside WeChat.
1. Install once
cd <package dir>
pnpm install # tsx and the other dev dependencies the login script needs
2. Start the scanning page
pnpm login
It serves a page on this machine at http://127.0.0.1:8899 (refreshed every three
seconds; an expired code is replaced automatically), mirrors the code and its state into
$DSH_HOME/data/dsh-wechat/ (qr-content.txt, login-state.json, qr-login.png), and
waits up to eight minutes for the scan.
3. Scan with the phone
WeChat → Discover → Scan (or “+” → Scan) → scan the code on screen → confirm the binding
on the phone. The command reports scaned, then confirmed, then prints
LOGIN_OK account=<botId> and stores credentials in
$DSH_HOME/data/dsh-wechat/weixin/accounts/<botId>.json.
4. Restart dsh web so the plugin reads the credentials.
5. Start chatting from the account you scanned with. With an empty allowFrom, that
account is the whole allowlist; add other WeChat ids there to let them drive the agent.
| command | purpose |
|---|---|
pnpm login |
scan to log in, or log in again after errcode -14 |
pnpm accounts |
list the accounts stored on this machine |
pnpm listen |
probe-only receive loop; never while the plugin is mounted — one process may long-poll getupdates per bot token |
Credentials stay on the machine that logged in, under $DSH_HOME/data/dsh-wechat/weixin/
(owner-only). This repository contains no account id, contact id, or local path.
Known limitations
- Inbound text, images, and files are bridged — images are fetched from the CDN and attached to the session, files are read into it too. Voice, video, and forwarded cards are skipped with one warning line. Replies are plain text, chunked at 1800 characters.
- Only one process may long-poll
getupdatesper bot token; running the standalone probe while the plugin is mounted splits the message stream. - A WeChat-driven turn cannot answer an approval prompt. Configure the permission and approval policy so bridged sessions do not block on one.
errcode -14means the bot session expired; the plugin stops the loop and a new QR login is required.
License
MIT — see LICENSE. The vendored protocol layer (src/api,
src/cdn, src/messaging) comes from Tencent's openclaw-weixin under its own
MIT license, preserved as LICENSE-tencent together with
UPSTREAM-README.md.
Links
More in this category
xmanrui/dsh-im★ 3118
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★ 2685
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.
OpenPetsHQ/openpets#dsh★ 1373
Bridges DeepSeek Harness lifecycle status, errors, and approval requests to a locally running OpenPets desktop companion.
c1overzz/dsh-bili-scroll★ 1150
Let your DSH agent browse Bilibili on its own, read subtitles, write a daily digest, and @ you when it finds something worth your attention.
inclusionAI/Avernet#deepseek-harness-channel-bcn★ 599
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.
zaofan-make/dsh-qqbot★ 213
QQ official bot channel for DeepSeek Harness (feature-rich fork of tencent-connect/dsh-qqbot): group and private chat with the full agent, sticker library with auto-tagging and AI meme replies, group management (join approval and mute), botplay interactive card events with paginated catalogs, user extension registry (custom slash commands and QQ tools), scheduled wakeups, remote approvals over QQ, and a floating dock web UI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.