Preface¶
DeepSeek Harness (DSH) runs the Agent on a local or desktop host, with sessions, workspaces, and toolchains all handled inside the harness. In everyday use when you’re away from the computer, a common approach is to set up a separate notification channel or remote desktop—but messages and approvals are often disconnected from the DSH UI. WeChat is essentially the most convenient IM available domestically; if you can bring “assign tasks, view results, click approvals” into a private chat, you no longer need to keep a dedicated screen for the harness.
The following introduces the community plugin dsh-wechat (maintainer zgat): a host-side cordis plugin that binds a WeChat bot via the iLink / ClawBot protocol by scanning a QR code. After binding, you send messages in WeChat to drive a DSH session, and receive turn results as well as approval/request and user-questions/request style interactions. The plugin is classified as a client, has zero runtime dependencies; the current package version is 0.3.5, licensed under MIT. See the SkillHub catalog page for the plugin index, and the GitHub repository for source code and operational instructions.
What Is This¶
The positioning of dsh-wechat can be summarized as: treat DSH as the backend, and WeChat as a bindable conversational client.
Once binding is complete, one WeChat private chat session corresponds to one DSH session (a persistent mapping; after a restart it will resume). You send natural language or slash commands in WeChat, and the message enters the harness; the Agent’s final answer is automatically split by the plugin into segments sent back to WeChat, with no need for the model to repeatedly call a send tool. Harness-side interactions such as approvals and multiple-choice questions are forwarded to WeChat, and you reply with “allow / deny / cancel” or the option number.
In terms of implementation, it is a DSH cordis plugin and includes a client half: in the DSH Settings → WeChat card you can see connection status, an inline QR code, multi-bot management, and an error log entry point. Compared with “only chatting with the Agent in the web page,” the difference is that the channel is WeChat, and it emphasizes a one-time QR scan with credentials stored locally (permissions 0600), without depending on the appid/secret-style official-account configuration.
Core Features¶
All the following capabilities come from the repository README and the package.json declarations, organized by usage path.
Binding and Connection¶
- QR-code binding: when running
node bin/dsh-wechat.mjs loginin the terminal, the QR code is printed in the terminal; in the GUI you can view an SVG QR code in the settings page card (/dsh-wechat/api/qr). - Unattended mode: environment variables such as
DSH_WECHAT_BOT_TOKENcan inject credentials (takes precedence over the credentials file and is not written to disk). IfDSH_WECHAT_USER_IDis not set, the credentials have no explicit owner, and any contact in the whitelist may possess owner-level capabilities—in production environments you should explicitly specify an owner or tighten theallowlist. - Multiple bots: a single plugin instance can bind multiple iLink bots; use “Add binding” in the settings page to scan and add one, while existing bots stay online. Session keys include the bot id so sessions don’t cross-talk; replies always go through the bot that received the message.
- Self-healing on disconnection: long polling uses backoff retries without losing the cursor; on
ret=-14it automatically clears credentials and requires re-scanning; failed logins retry after 60 seconds.
Messages and Sessions¶
- Send/receive: long polling receives private messages; outbound messages are split into segments of about 1800 characters (
chunkChars) by default, with backoff retries on failure. - Media: incoming images, files, voice, and video are decrypted and written to disk, and the path is handed to the Agent; the Agent can use tools such as
wechat_send_fileto send artifacts back. - Follow along with
/listen: turns completed in the same session by other clients (such as the GUI) can be pushed to WeChat; approvals and questions for that session can be answered on both the WeChat and GUI sides. - Channel prompts: the plugin tells the model “you are currently in WeChat” within the session: the final answer will be delivered automatically, files should be delivered with
wechat_send_file, etc., reducing cases where the model only writes to disk without pushing.
Commands and Tools (do not consume model quota)¶
Slash commands are processed before reaching the Agent. Common ones include: /help, /new to start a new session, /session to switch conversations within the workspace, /workspace / /model / /reasoning to switch workspace and model, /stop to stop a turn, /listen / /mute for follow-along, and /status-style information can be viewed via /settings, /whoami, etc. Commands marked with 🔒 such as /permission and /logout are only available to the owner. See the README for the full command table.
Agent-side tools:
| Tool | Purpose |
|---|---|
wechat_send_text |
Send staged text to the current WeChat session |
wechat_send_file |
Send a local file back as an image/file |
wechat_chat_info |
Query the current session, DSH session, workspace, model, and runtime status |
The final answer is automatically sent back by the plugin; the README explicitly states the model does not need and should not resend the final answer.
Access Control and Error Logs¶
- Default is
accessPolicy: allowlist, combined withallowedUserIds;openaccepts any sender. - A dedicated error log page:
/dsh-wechat/errors?t=<token>; in WeChat/errors(owner) shows the most recent 10 entries. By default it retains 30 days and at most 300 entries, merging same-kind errors within one minute into a count;errorLogDays/errorLogEntriesare adjustable.
Compatibility and Dependencies¶
- DSH: the README badge says 0.2.0-rc.2; in
package.jsonthedsh.compatibilityis>=0.2.0-rc.2 <0.3.0, and it also marks0.2.1-rc.2as compatible. - Node:
>=20. - Profile:
package.jsonlists desktop. - Network: must be able to access
https://ilinkai.weixin.qq.comandhttps://novac2c.cdn.weixin.qq.com; the WeChat account must have WeChat ClawBot / iLink bot capabilities.
Installation and Activation¶
The installation package is taken as a tarball from Releases; do not use git clone, and do not guess a dsh plugin add github:... command based on the repository name (the official README does not provide this method).
# 1) Get the tarball from Releases: https://github.com/zgat/dsh-wechat/releases
dsh plugin --profile desktop add ./dsh-wechat-<version>.tgz # e.g. the README example 0.1.41; follow Releases
# You can also use the GUI: Settings → Plugins → Install, and paste the tgz path
# 2) Bind via QR code (the QR code is printed in the terminal)
node bin/dsh-wechat.mjs login
# 3) Send any sentence to the bot in WeChat, and you will receive a getting-started guide (/help for all commands)
Desktop note: dsh plugin is forwarded to the Electron host and may be interrupted while the app is busy (the README mentions exit code 254). A safe approach is to fully quit the desktop app first before installing via CLI, or use the GUI plugin page to install instead.
Configuration is written to the profile’s $DSH_HOME/profiles/<profile>/cordis.patch.yml. The README reminds you: the patch replaces config as a whole, so write out all keys you want to keep. Example:
- id: dsh-wechat
name: 'dsh-wechat'
config:
enabled: true
accessPolicy: allowlist
allowedUserIds: ['oABC123example@im.wechat']
workspace: /Users/me/projects/demo
progress: brief
Configuration changes take effect hot; upgrading the already-loaded plugin code requires a restart. You can run dsh --profile <profile> --dump-config | grep -A3 dsh-wechat to self-check without starting the app.
Typical Usage¶
Getting Started the First Time¶
- Meet the prerequisites for DSH, Node, network, and the iLink bot.
- Install the tgz and run
node bin/dsh-wechat.mjs login(or scan the QR code in Settings → WeChat). - Send any sentence to the bot in WeChat and follow the guidance; send
/helpif you need the full command list.
Mobile Office-Style Task Assignment¶
Describe a task directly in WeChat; this is equivalent to sending a user message in the bound DSH session. For long tasks the plugin will show “the other party is typing” and tool progress (progress: brief). If you are running the same session in the GUI simultaneously, you can use /listen to push turns completed on the GUI side to WeChat, and approvals can be answered on either side.
Switching Workspaces and Models¶
Send /workspace to list and switch project directories (switching ends the current session); /model and /reasoning take effect for the next new session. /session switches historical conversations within the current workspace, with an option of whether to backfill the recent segments into WeChat.
Unattended Mode or CI Bypass¶
On a controlled machine, export variables such as DSH_WECHAT_BOT_TOKEN, and must set DSH_WECHAT_USER_ID or use a strict whitelist, to avoid everyone being equivalent to the owner under “ownerless credentials.”
Use Cases and Notes¶
Who it suits
- People already using the DSH desktop profile who want to extend harness sessions into WeChat private chat.
- People who need to receive Agent results, answer approvals/questions on their phone, or temporarily
/stopand/newto control turns. - Scenarios where multiple iLink bots need to be attached to the same harness, with sessions isolated per bot.
Please verify yourself before use
- The plugin runs with the current DSH process’s permissions and can access the workspace and network you configured; before installing, it is recommended to read the source code and the MIT license, and understand where credentials and media files are stored (the default
stateDiris$DSH_HOME/integrations/dsh-wechat). - The community catalog SkillHub and DeepSeek / QuantumFactory have no official affiliation; the DSH ecosystem is “everything is a plugin,” and facts in this article are subject to the zgat/dsh-wechat repository documentation.
- Implementation details, queue semantics, and side-effect lists are in docs/design.md and docs/side-effects.md respectively; for troubleshooting, see the “Troubleshooting” section of the README.
Closing¶
dsh-wechat connects DSH’s session, workspace switching, approvals, and follow-along capabilities to the WeChat iLink / ClawBot channel: QR-code binding, local credentials, and dual entry points via the settings page and CLI. It fits the usage pattern of treating the harness as a “backend engine” and WeChat as a “portable client.”
- Catalog page: https://www.skillhub.cn/plugins/zgat/dsh-wechat
- GitHub: https://github.com/zgat/dsh-wechat
- Installation package: https://github.com/zgat/dsh-wechat/releases