dsh-wecom
dsh-wecom: a WeCom AI Bot channel for DeepSeek Harness — each chat runs a persistent, preset-backed agent over the official long connection. 适合需要在企业微信中部署和运行DSH托管智能体的团队或个人。
同名パッケージの別リポジトリ
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TtTRz/dsh-wecomドキュメント
README 全文を読む ↗⚙️ Configuration
Tune the mounted row in ~/.dsh/profiles/web/cordis.patch.yml:
- id: wecom-channel
name: dsh-wecom
config:
botId: !!js process.env.WECOM_BOT_ID
credentialName: WECOM_BOT_SECRET
namespace: default
# cwd is optional: defaults to ~/.wecom-sessions (DSH_WECOM_CWD overrides)
cwd: /data/wecom
preset: standard
dmPolicy: open
dmAllowlist: []
groupPolicy: allowlist
groupAllowlist: [wr_your_group_chatid]
greeting: Hello, I am an assistant.
Multiple bots (one row per bot)
One composition row = one WeCom bot. Mount the same plugin again with a distinct
namespace to run a second bot — its own botId/credential, access policy, preset,
and model route — in the same process:
- insert:
- id: wecom-channel-lab
name: dsh-wecom
config:
botId: !!js process.env.WECOM_BOT_ID_2
credentialName: WECOM_BOT_SECRET_2
namespace: lab
preset: standard
Each non-default bot publishes wecomChannelStatus. and stores
its routing state in .dsh-wecom-state..json. The default bot uses
wecomChannelStatus and .dsh-wecom-state.json. A dashboard can consume these
services without designating one bot as the primary UI host.
Configuration reference
| Field | Default | Meaning |
|---|---|---|
cwd | ~/.wecom-sessions | Agent working directory: WeCom sessions, uploads (.wecom-uploads/), and .dsh-wecom-state.json live here; the sidebar workspace "WeCom" is claimed on it. DSH_WECOM_CWD overrides it. Must be absolute |
preset | standard | Preset mounted into each conversation agent |
provider / model | unset | Fixed model route for every WeCom conversation; both must be set together. When unset, new conversations use the harness default selection and resumed conversations inherit their last logged model |
dmPolicy / groupPolicy | open | open / allowlist / disabled |
dmAllowlist | [] | Single-chat userid allowlist |
groupAllowlist | [] | Group-chat chatid allowlist |
instructions | enterprise-chat guidance | Instruction section layered on the persona every turn |
imageMode | auto | auto attaches images when the model can view them; always / never force it |
streaming | true | Stream model text token-by-token; false sends only the ack + final answer |
streamFlushMs | 250 | Cadence (ms) for flushing accumulated streamed text |
showReasoning | true | Wrap model reasoning in WeCom's native `` card |
showToolCalls | true | Render a compact tool-call activity list inside the `` card |
maxConcurrent | 4 | Global cap on concurrent turns |
turnTimeoutMs | 300000 | No-progress timeout; session events and stream frames reset the deadline |
approvalMode | chat | In-chat sandbox-escalation approvals: chat answers from the chat (reply 批准/拒绝), notify only pushes the ask, off is fully silent (web UI decides) |
approvalTimeoutMs | 300000 | How long an in-chat approval waits before failing closed (cancelled) |
approvalAllowlist | [] | Userids allowed to answer in-chat approvals; empty admits every admitted sender |
approvalHint | 回复「批准」继续,回复「拒绝」取消。 | Reply-word hint appended to the pushed approval request |
Configuration reference
| Field | Default | Meaning |
|---|---|---|
cwd | ~/.wecom-sessions | Agent working directory: WeCom sessions, uploads (.wecom-uploads/), and .dsh-wecom-state.json live here; the sidebar workspace "WeCom" is claimed on it. DSH_WECOM_CWD overrides it. Must be absolute |
preset | standard | Preset mounted into each conversation agent |
provider / model | unset | Fixed model route for every WeCom conversation; both must be set together. When unset, new conversations use the harness default selection and resumed conversations inherit their last logged model |
dmPolicy / groupPolicy | open | open / allowlist / disabled |
dmAllowlist | [] | Single-chat userid allowlist |
groupAllowlist | [] | Group-chat chatid allowlist |
instructions | enterprise-chat guidance | Instruction section layered on the persona every turn |
imageMode | auto | auto attaches images when the model can view them; always / never force it |
streaming | true | Stream model text token-by-token; false sends only the ack + final answer |
streamFlushMs | 250 | Cadence (ms) for flushing accumulated streamed text |
showReasoning | true | Wrap model reasoning in WeCom's native `` card |
showToolCalls | true | Render a compact tool-call activity list inside the `` card |
maxConcurrent | 4 | Global cap on concurrent turns |
turnTimeoutMs | 300000 | No-progress timeout; session events and stream frames reset the deadline |
approvalMode | chat | In-chat sandbox-escalation approvals: chat answers from the chat (reply 批准/拒绝), notify only pushes the ask, off is fully silent (web UI decides) |
approvalTimeoutMs | 300000 | How long an in-chat approval waits before failing closed (cancelled) |
approvalAllowlist | [] | Userids allowed to answer in-chat approvals; empty admits every admitted sender |
approvalHint | 回复「批准」继续,回复「拒绝」取消。 | Reply-word hint appended to the pushed approval request |