Preface¶
If you are already using DeepSeek Harness (DSH) for agent workflows, this plugin is suitable for connecting to WeCom Enterprise: it connects the WeCom AI Bot as a channel to DSH, allowing single-chat or group-chat messages to enter a persistent Harness agent.
The path of “First do X, then Y” is quite straightforward: first install dsh-wecom, then prepare WECOM_BOT_ID and WECOM_BOT_SECRET, and finally start dsh web. After the above steps, chat messages can enter the agent pipeline with presets, tools, and session state.
What is this¶
dsh-wecom is a DSH plugin maintained by TtTRz under the MIT license.
Its positioning in one sentence: WeCom AI Bot channel for DeepSeek Harness — each chat runs a persistent, preset-backed agent over the official long connection.
This means it does not simply forward messages between WeCom and the model, but rather maps each single-chat or group-chat to a persistent Harness agent, mounting a preset (default standard) to provide tools and persona.
Core Features¶
The following introduces verified capabilities.
Session Proxy¶
Each single-chat or group-chat corresponds to a persistent Harness agent. The agent mounts a preset, defaulting to standard, to provide tools and persona.
Message Processing¶
The plugin supports the following message pipeline controls:
msgiddeduplication- Single-session queue
- Global concurrency limit
- Single-turn timeout cancellation
After the long connection is broken, the channel will automatically restart based on restartIntervalMs (default 10s).
Media and Output¶
Regarding media, images can be downloaded, decrypted, and attached when the model can view images; files and videos will enter the agent workspace.
Regarding output, the plugin supports:
token-level streaming replies- Native
thinkreasoning cards - Compact tool call lists
Access Policies¶
Access policies for single chat and group chat support:
openallowlistdisabled
Group chats are restricted by chatid.
Status and Commands¶
The plugin provides the wecomChannelStatus service, the GET /api/wecom/status status endpoint, sidebar status indicators, and a floating status panel.
The chat side supports the following commands:
/ping
/help
/status
/stop
/compact
/new
Installation and Activation¶
The installation command provided by the documentation is:
dsh plugin --profile web add dsh-wecom
After installation, prepare credentials first, then start web:
export WECOM_BOT_ID='your-bot-id'
export WECOM_BOT_SECRET='your-bot-secret' # dev only — production environment uses credential service
dsh web
If you want to retain configuration across restarts, the documentation suggests:
- Write
WECOM_BOT_IDto~/.dsh/.env - Write
WECOM_BOT_SECRETto~/.dsh/.credentials.yaml
If you wish to override the agent working directory, you can set:
DSH_WECOM_CWD
Source code installation example below, requires a fixed commit:
dsh plugin --profile web add github:TtTRz/dsh-wecom#<sha>
Note: Git installation runs the build script; pnpm >=10 will refuse git dependency build scripts, it is recommended to prioritize pre-built packages.
Typical Usage¶
After enabling the plugin, you can configure the wecom-channel line in:
~/.dsh/profiles/web/cordis.patch.yml
Below are only the configuration points explicitly mentioned in verified resources:
- Preset default value is
standard - Access policies for single chat and group chat can be
open,allowlist, ordisabled - Group chats are restricted by
chatid DSH_WECOM_CWDcan override the agent working directory
After installation and startup, you can send /ping to check connectivity, /status to view session status, or /stop to cancel the current generation.
Suitable Scenarios and Notes¶
Suitable for these scenarios:
- Already using DSH and want to use WeCom single chat or group chat as the agent entry point
- Want each session to have a persistent agent, preset tools, and
persona - Need access policies, concurrency control, timeout cancellation, streaming replies, and status observation
Notes before use:
- The
WECOM_BOT_SECRETenvironment variable is marked asdev onlyin the documentation; use credential service in production environments - The plugin runs with the permissions of the current
dshprocess; check the source code and license before installing engines.noderequires>=22.19- In verified resources,
package.jsonversion is0.3.0, and0.1.17and0.1.5also appeared in README examples; if you need a fixed version, verify the target version before installing
Links¶
GitHub repository:
https://github.com/TtTRz/dsh-wecom
The verified resources did not provide a verifiable community directory page URL, so it is not listed here.