WeCom (Enterprise WeChat) Smart Robot bridge: two-way chat over the aibot WebSocket gateway, no public endpoint needed.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:michaelcode-wang/dsh-wecom
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
企业微信(WeCom)智能机器人桥接插件:通过 aibot WebSocket 网关,让 DeepSeek Harness 的智能体变成能在企业微信里双向对话的助手。无需公网地址、无需自建应用回调,只需智能机器人的 bot_id + secret。
协议移植自 Hermes Agent 的 plugins/platforms/wecom/adapter.py(aibot_subscribe 认证 → aibot_msg_callback 收消息 → aibot_respond_msg / aibot_send_msg 回复)。
特性
- 企业微信智能机器人 WebSocket 长连接(
wss://openws.work.weixin.qq.com),断线自动退避重连 - 每个聊天一个独立 agent 会话,多轮上下文保留,空闲自动回收
- 白名单访问控制(
allowedUserIds) - markdown 回复 + 超长消息自动分片(默认 4000 字符)
- 聊天命令:
/help、/reset、/status
安装
# 从 npm(推荐)
dsh plugin --profile im add dsh-wecom
# 或从 GitHub
dsh plugin --profile im add github:michaelcode-wang/dsh-wecom
前置条件
- 企业微信智能机器人:在企业微信后台创建一个「智能机器人」,拿到
bot_id和secret。 - im profile 需要 preset roster:独立
improfile(dsh-base+ 本插件)没有 web 层,而 preset roster(agent-presets)默认由dsh-web-app提供。若要让 agent 挂载某个 preset,需在 im profile 的cordis.patch.yml里手动插入 roster(见下方完整示例)。
配置
在 $DSH_HOME/profiles/im/cordis.patch.yml 中:
# 1) 插入 preset roster(im profile 无 web 层,需手动补)
- insert:
- id: agent-presets
name: '@deepseek-ai/dsh-agent-presets'
config:
default: taibai # 默认 preset;可按需改成你自己的 preset
# 2) 启用本插件
- id: dsh-wecom
disabled: false
config:
botId: '你的机器人ID'
secret: '你的机器人密钥'
allowedUserIds: ['你的企业微信userid']
agent:
preset: taibai # 每个企业微信聊天对应的 agent preset
启动:
dsh --profile im(建议配 launchd / systemd 常驻)。
配置项
| 键 | 默认 | 说明 |
|---|---|---|
enabled |
true |
总开关 |
botId |
'' |
企业微信智能机器人 ID |
secret |
'' |
企业微信智能机器人密钥(只写) |
websocketUrl |
wss://openws.work.weixin.qq.com |
WebSocket 网关地址 |
allowedUserIds |
[] |
允许对话的 userid 白名单;留空=所有人 |
agent.preset |
taibai |
挂载的 agent preset |
agent.cwd |
'' |
agent 工作目录(默认进程 cwd) |
agent.provider / agent.model |
'' |
模型覆盖;留空=部署默认 |
agent.maxMessageLength |
4000 |
单条外发消息最大字符数 |
agent.idleTimeoutMs |
1800000 |
聊天空闲多久后释放 agent(0=永不) |
安全
- 务必配置
allowedUserIds白名单——留空意味着任何人都能驱动你的智能体执行主机工具。 secret标记为role('secret'),不会回显到浏览器。
Links
More in this category
omdsh-dev/dsh-notification★ 52
Desktop notifications for turn completions, with per-outcome controls and keyword rules.
omdsh-dev/dsh-open-in-vscode★ 46
Open DSH workspace directories in VS Code directly from the web GUI.
whyihaveyou/dsh-suite#plugin-notify★ 35
IM webhook and local notifications on turn completion, errors, or approval (Feishu/WeCom/DingTalk/Slack/Discord/custom).
omdsh-dev/dsh-lark★ 23
Lark/Feishu bot channel for DeepSeek Harness: each chat drives its own agent, and tool approvals, model questions, and plan reviews return as cards answered by a button or a reply. Switch workspace and model from the chat (`/cd`, `/model`, `/new`), and run several bots that keep separate sessions and can hand turns to each other in one group.
THEWOLFWALKER/dsh-notifier★ 22
Unified notification & remote control for DSH: one `notify()` API, 25+ channels (Telegram / DingTalk / Feishu / WeCom / QQ bot / WxPusher / PushPlus / ServerChan / Bark / Discord / Slack / ntfy / webhook...), level routing (timeSensitive / active / passive) with tiered retry, multi-channel inbound approval (Telegram buttons, Feishu cards, QQ, WxPusher, WeChat iLink), official QR login for QQ/DingTalk/Feishu, a local web admin console, multi-agent routing, desktop notifications — and a mobile command center: `!status` / `!stop` / `!retry` agent control from your phone plus actionable notifications (view result / retry / logs buttons that call back into the agent). Secrets redacted, tool rate-limited, zero runtime deps.
bill9109/dsh-web-ui-notify★ 16
Desktop notification reminders.