Introduction¶
The philosophy of DSH is “Everything is a plugin.” If a developer wants to connect IM text messages to a harness agent session instead of just operating locally in the interface, they can attach the IM gateway as a plugin to the profile. dsh-im-gateway does exactly that: it bridges the messenger to DeepSeek Harness’s agent sessions and supports slash commands to control sessions.
What is this¶
dsh-im-gateway is maintained by jelech with the MIT license.
Its positioning is: An IM gateway for the DeepSeek Harness: bridge messengers into harness agent sessions and control them with slash commands.
This means it connects IM messages (such as WeChat) to the harness agent while providing a set of slash commands to manage sessions and models.
Core Features¶
WeChat Integration¶
- Uses Tencent’s official iLink Bot transport.
- Login method is QR login.
- Connection method uses long-poll.
Slash Commands¶
Currently supports the following commands:
/help/new/sessions/status/model
Session Isolation¶
The plugin maintains one agent session for each peer, ensuring session isolation.
Browser IM Gateway Settings Area¶
The optional browser settings area provides:
- QR login
- status
- test
HTTP Bridge¶
When the profile provides webServer, the plugin exposes /im-gateway/* routes.
Installation and Enablement¶
First, add the plugin to the web profile via the GitHub address:
dsh plugin --profile web add github:jelech/dsh-im-gateway
If installing from a local directory, you can use:
dsh plugin --profile web add file:/absolute/path/to/dsh-im-gateway
After installation, you need to restart the harness; the composition is read at startup.
Typical Usage¶
When logging in to WeChat, you can open the browser’s:
Settings → IM Gateway → Scan to login to WeChat
You can also call:
gateway.login()
Then scan and confirm the QR code on the host console. The login token is saved in memory and persists for the entire process lifecycle.
After connection, ordinary text messages will be answered by the harness agent; messages starting with / are processed as commands.
Common commands are as follows:
/help: Lists commands./newor/reset: Archives the current session and starts a new one./sessions: Lists the current peer’s current and archived sessions./status: Displays connection, model, and current session./model [provider:model]: View the current model, or switch to a specificprovider:modeland start a new session.
Applicable Scenarios and Notes¶
Suitable for developers who want to connect IM text messages to a harness agent session and manage sessions using slash commands.
Please note:
- Currently only text is supported; media (image/voice/file) needs to go through the iLink CDN AES-128-ECB path.
- iOS requires WeChat ≈ 8.0.70; Android may prompt to update WeChat first.
- The browser panel renders the login QR locally on the host: via the
qrcodenpm package, provided as SVG from/im-gateway/qrcode. - The
/im-gateway/*HTTP bridge registers raw routes on the harness web server; if the deployment environment enforces HTTP auth at the routing layer, it needs to be added inlib/http.js. - The plugin runs within the DSH process and will have access to the models, files, and network permissions available to that process. You should check the source code and license (MIT) before installing.
Links¶
- GitHub: jelech/dsh-im-gateway
- Directory: jelech/dsh-im-gateway