Preface¶
DeepSeek Harness (dsh) runs agents in local or controlled processes with a great GUI and terminal experience, but daily collaboration often happens in IM. Building custom webhooks or forwarding scripts can bridge the gap, yet requires maintaining session mappings, media storage, and permission confirmations manually, and it tends to get disconnected from dsh’s native tool loop.
Here we introduce the community plugin dsh-wechat-media (Maintainer: wjh-ux, Category: Client). It binds a personal WeChat account via a QR code scan through the Tencent iLink channel and supports WeCom (Enterprise WeChat), including Intelligent Bot long-lived connections, within the same session mechanism. Each contact or group corresponds to an independent DSH session with two-way text and multimedia support. Agents can also proactively send messages or files via dedicated tools. The plugin is MIT licensed, and the current package version is 0.48.2 (see GitHub Repository).
What is this¶
dsh-wechat-media is an IM bridge plugin for DeepSeek Harness. On the personal side, a single QR scan allows you to chat with the agent in WeChat. On the enterprise side, you can configure group bot webhooks, self-built apps, or Intelligent Bot API long-lived connections; the latter allows two-way messaging without needing a public callback URL. State, tokens, session routing, and whitelists are persisted in $DSH_HOME/dsh-wechat-media/ (as well as inbox directories), so usually, no re-scanning is required after restarting dsh.
Core Capabilities¶
Personal WeChat¶
| Capability | Description |
|---|---|
| QR Code Pairing | Displays a QR code on the plugin card; login tokens are stored in $DSH_HOME, so restarting dsh usually doesn’t require re-scanning; one-click re-pairing available. |
| One Session per Chat | Automatically creates or restores an independent DSH session and context for each contact and group. |
| Two-way Text & Media | Inbound images, videos, documents, and archives are decrypted to the inbox directory; outbound media is uploaded and sent via agent tools. |
| Multi-Account | Can pair multiple WeChat accounts simultaneously, each with its own tokens, cursors, and session mappings. |
| Remote Approval | Tool calls requiring GUI confirmation can be pushed to the same WeChat session; reply 1/agree or 2/reject (default timeout 120 seconds, falling back to GUI on timeout). |
| Whitelist & “Friends Only” | Can set Allow/Ignore per contact or group; optionally processes only 1:1 private chats and silently ignores group messages (disabled by default to avoid disrupting workflows after updates). |
Inbound messages carry a [WeChat <name> <wxid>] prefix to facilitate specifying to in tools like wechat_send_text; group IDs look like 12345678@chatroom.
WeCom (Enterprise WeChat)¶
WeCom shares the session, whitelist, approval, and reply relay logic with personal WeChat. There are three outbound paths and inbound relies primarily on long-lived connections:
| Path | Config Source | Direction |
|---|---|---|
| Group Bot Webhook | “Group Bot -> Add” in the group | Outbound: Text, Markdown, Images |
| Self-built App | corpid, corpsecret, agentid | Outbound: Text, Markdown, Images, Files, Voice, Video |
| Intelligent Bot Long Connection | BotID + Secret (API mode -> Long connection) | Two-way: Receives messages and replies in the same session |
Configure via http://127.0.0.1:19387/dsh-wechat-media/wecom (also accessible via the plugin card and control panel) and send test messages. The long connection is established by the plugin to wss://openws.work.weixin.qq.com; the local bridge cannot rely on callback APIs that require public HTTPS. Images, files, and videos received via the bot are downloaded and decrypted to the same inbox directory as personal WeChat, providing the model with the path and a read_image hint.
Additional agent tools include wecom_send_text and wecom_send_file; WeCom also supports /delivery stream for character-by-character streaming replies (personal WeChat cannot edit sent messages, so there is no equivalent preview).
Common Agent Tools (Personal WeChat)¶
| Tool | Purpose |
|---|---|
wechat_send_text |
Extra text, or sending to other sessions via to |
wechat_send_file |
Sends local files (images/videos by type, others as file attachments) |
wechat_status |
View paired accounts and sessions |
Environment Requirements¶
- dsh 0.2.0-rc.2 or higher, requiring the standard agent loop and tools (
dsh web/ desktop profile is fine). - Node.js >= 22 (Node 24 tested as per README), Windows / macOS / Linux.
- A personal WeChat account capable of QR scanning; the README strongly recommends using a secondary account: personal WeChat automation violates the Terms of Service and carries a risk of account banning.
- Outbound access required to
ilinkai.weixin.qq.com,novac2c.cdn.weixin.qq.com.
Installation and Activation¶
Install from GitHub (Use the exact command from the README and specify the web profile):
dsh plugin --profile web add github:wjh-ux/dsh-wechat-media
If using a local checkout directory:
dsh plugin --profile web add link:/absolute/path/to/dsh-wechat-media
Restart dsh after installation, open Plugins -> dsh-wechat-media, and click Add Account (Scan QR) to start pairing.
Brief pairing steps:
- The card displays a QR code (auto-refreshes on expiry; if opened accidentally, click Cancel without waiting for the 5-minute expiry).
- Scan with mobile WeChat and confirm on the phone; if digits are required, submit them in the card.
- The account row status shows
monitoringwhen the long polling is running; scanning with a different WeChat ID adds a new account, while scanning with the same account refreshes the login.
For WeCom, configure webhooks, self-built apps, or long-connection bots at /dsh-wechat-media/wecom; sensitive items are written to $DSH_HOME/dsh-wechat-media/wecom.json (permissions 0600).
Inbox Directory and Configuration¶
Default inbound media directory:
$DSH_HOME/wechat-inbox/<date>/<chat>/
Can be modified via the plugin card, control panel /dsh-wechat-media/panel, system folder picker, or the inboxDir plugin option (absolute path). Priority is: Runtime Preference -> Config -> Default Path. Relative paths are rejected. The valid path can be viewed via inboxRoot in GET /dsh-wechat-media/state.
If you want remote approvals to stay only in the GUI, set approval: "ignore" in the plugin configuration.
Typical Usage¶
- Complete installation and personal WeChat QR scan (configure WeCom long connection if needed).
- Send messages directly to the paired account/bot in WeChat or WeCom; after the agent’s normal turn ends, the bridge will relay the final text back to the IM.
- When proactive pushing of files or cross-session talking is needed, ask the agent in the dsh session to call tools like
wechat_send_file/wecom_send_file; the model can read image paths in the inbox directory and combine them withread_image. - For production use, it is recommended to turn on “Only accept whitelist sessions” in the card and Allow contacts individually; if serving only private chats, enable “Only process friend private chats (1:1)”.
Remote approval example (message appears in the current IM session, replies do not start a new turn):
⚠️ Operation approval required (Remote Approval)
Tool: pwsh
Reason: write outside the workspace
Reply 1 = Approve once · Reply 2 = Reject
Use Cases and Notes¶
Who it is for: Developers or small teams already using DeepSeek Harness who want to trigger agents from WeChat or WeCom and accept the operational and compliance risks of IM bridging; Enterprise side suits scenarios with existing Intelligent Bot long connections or simply needing outbound webhook/self-built app notifications.
Must Know:
- The plugin runs with the permissions of the current dsh process and can access local files and dsh tools. Before installation, please read the source code and MIT License and understand the tokens and sensitive files like
wecom.jsonstored under$DSH_HOME. - Personal WeChat automation carries a risk of account banning; the WeCom side should use officially supported API modes, and do not commit webhook secrets to version control.
- The DeepSeek Harness ecosystem emphasizes “Everything is a plugin”; the SkillHub Directory Page is a community listing site and has no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
dsh-wechat-media extends dsh’s session, tool, and approval models to WeChat and WeCom: scan to enable two-way media chat on the personal side, and use long connections for two-way intelligent bots without public callbacks on the enterprise side. If you want to reuse the same agent set in IM rather than writing a separate bot framework, start with the official installation command and plugin card pairing.
- Directory Page: https://www.skillhub.cn/plugins/wjh-ux/dsh-wechat-media
- GitHub: https://github.com/wjh-ux/dsh-wechat-media