dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
基于腾讯 iLink 机器人通道的微信桥:每个联系人一个独立会话,支持入站文本/图片/文件,并在整轮运行期间显示微信原生“正在输入”。
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.
# 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'
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).
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.
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 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.
getupdates per bot token; running the
standalone probe while the plugin is mounted splits the message stream.errcode -14 means the bot session expired; the plugin stops the loop and a
new QR login is required.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.