
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-message-gateway
Advanced tools
Universal message-platform gateway for the DSH web GUI: configure QQ / WeChat / WeCom / WeCom AI bot / Discord / Telegram / WhatsApp / Email / Webhooks connectors, save credentials, test connections, and run a persistent WeCom AI bot bridge with per-chat

DSH Web GUI 的消息平台网关插件:在侧边栏「工作区」行、紧贴搜索图标左侧提供「消息平台」入口,全屏管理多平台消息连接器——凭据保存、连接测试、状态监控,并内置企业微信智能机器人的常驻桥接:外部消息经专用 agent 会话驱动 DSH 助手,回复按 token 流式回发;同时提供全平台通用主动图文推送通道(支持发送 Markdown 文本与多模态原生图片)。
botId + secret 保存即建立官方 SDK WebSocket 常驻连接;支持文本流式对话、素材上传与主动图片/文件推送sendPhoto 主动图片推送files 附件主动图片推送/gateway/wecom/callback)后发消息即自动对话/gateway/wechat-mp/callback)后发消息即自动对话/gateway/whatsapp/webhook)后发消息即自动对话POST /gateway/push(供定时任务、自动化脚本、外部流水线等调用):
platform:目标平台(wecom-aibot / telegram / discord / dingtalk / feishu / bark / serverchan / email)target:目标会话(wecom-aibot 为单聊 userid 或群 ID;telegram 为 chatId 数字;discord 为 channelId;bark 为 deviceKey 等)content:可选文本内容(支持 Markdown)title:可选标题(Email 作为主题,其他平台作为前缀)image:可选图片数据(支持 Base64 编码数据,或公网可访问的 http(s):// 图片 URL)filename:可选图片文件名(默认 image.png)wecom-aibot、telegram、discord 支持本地二进制图片直接上传与原生下发bark、dingtalk、serverchan 自动适配公网图片 URL 模式~/.dsh/gateway.json(权限 600,原子写入),/gateway/list 永不回传凭据明文,只返回 configured 标记sk- 前缀、GitHub token、Bearer、password= 赋值、私钥 PEM 等通用模式),机器人对话里的机密不会泄露到日志文件⏳ 正在处理中,请稍候…),定稿收官时自动无痕剥离/help / /time / /status(含中文别名:帮助/菜单/时间/状态)welcomeReply,默认 false 保持免打扰,开启后用户当天首次进入单聊自动回复欢迎词)POST /gateway/send({"chatid": "...", "content": "..."},单聊=userid,群聊=群 ID)以机器人身份主动发送 markdown 消息routes):按「平台 + 关键词前缀」把消息路由到指定 agent 预设(独立会话)与可选专用模型 / skill。例如配置 { id: "code", matchPlatform: "telegram", matchPrefix: "code ", agentPreset: "code" } 后,Telegram 里发 code 帮我写个函数 会进入 code 预设的独立会话。按顺序匹配第一条命中;未命中走默认 agent/help / /time / /status / /stats(含中文别名:帮助/菜单/时间/状态/统计);/stats 展示各平台桥连接状态与活跃会话数send_chat_message):自动向 DSH 注册通用推送工具,AI 助手在对话中可自主调用该工具将总结、任务结果或告警(含文字与图片截图)推送至企业微信、Telegram、Discord、钉钉等平台POST /gateway/webhook/in 接收外部系统消息(text / content / message 任一字段),注入专用 agent 会话并同步返回完整回复;可配置 HMAC-SHA256 签名密钥校验(契约见 docs/webhooks.md)image / file / video / mixed 图文混排)、飞书(image / file / audio / media / 富文本 post)、钉钉(picture / richText / audio / video / file)、Telegram(photo / document / animation / video / voice / audio / video_note / sticker,含 caption 说明文字)、Discord(attachments[])、QQ 机器人(attachments[],含引用消息递归与语音 asr_refer_text)、微信 ilink(item_list 图片 / 语音 / 文件 / 视频,含 CDN AES 解密)、Email(标准 MIME 附件,支持 RFC 2231 中文文件名与 base64 / quoted-printable 解码)dsh web),点击侧边栏「消息平台」按钮botId + secret 后立即建立常驻连接;删除配置即断开# 从 npm 安装(通用插件,任何 DSH 用户可直接使用)
dsh plugin --profile web add dsh-message-gateway
重启 dsh web,侧边栏「工作区」那一行、搜索图标左侧即出现「📮 消息平台」图标按钮。打开页面,选择平台、
填入凭据并「保存」——企业微信智能机器人填 botId + secret 后立即建立常驻连接,即可
直接在企微里和机器人对话(与 Web 对话一致:每聊天独立会话 + 上下文自动压缩)。
插件可通过 dsh plugin config 或 profile 配置文件调整(所有项均有默认值,开箱即用):
| 配置 | 类型 | 默认 | 说明 |
|---|---|---|---|
botLocale | zh | en | zh | 机器人回复文案语言 |
maxChatAgents | number | 40 | 每机器人最多保留的聊天会话数,超出自动淘汰最旧 |
botModel | {provider, model} | 无 | 可选:机器人专用模型(优先于部署默认模型;不填则与 Web 对话一致) |
autoStartWecom | boolean | true | 启动时自动用已保存的企业微信智能机器人凭据连接 |
groupReply | boolean | true | 是否回复群聊消息(false 时只处理单聊) |
下列限制全部来自各平台官方接口的能力边界(每条都可在官方文档中查证),不是本插件的 bug。 遇到这些行为时,请对照本表判断——它们无法通过改插件绕过:
| 平台 | 官方限制 | 说明 |
|---|---|---|
| 企业微信智能机器人 | 图片消息仅单聊可用 | 官方文档明确:image 类型仅支持单聊;群聊里 @机器人 配图走 mixed(图文混排),本插件已同时接入两者 |
| 企业微信智能机器人 | 媒体 URL 5 分钟内有效、aeskey 每个链接唯一 | 官方要求收到事件后立即下载,URL 过期只能请用户重发 |
| 企业微信智能机器人 | 文件 / 视频回调上限 100MB | 官方限制 |
| 钉钉 | 群聊 @机器人 收不到 audio / video / file | 官方文档明确:群聊仅支持 text / picture / richText;语音、视频、文件只在单聊(人与机器人会话)可用 |
| 钉钉 | downloadCode 有时效 | 官方要求收到后尽快换取下载链接,过期报 invalidParameter.robotCode.downloadCode |
| 飞书 | 表情包(sticker)不支持下载 | 官方文档明确不支持获取表情包资源;本插件会给出可见提示 |
| 飞书 | 富文本 / 卡片内资源、合并转发子消息不支持下载 | 官方限制(传对应 ID 返回 234043) |
| Telegram | 下载上限 20MB | 官方文档明确:Bot 下载文件上限 20MB,超出需自建 Local Bot API Server;本插件会提示未下载 |
| Discord | 必须开启 MESSAGE_CONTENT 特权意图 | 官方文档明确:未开启时 content / embeds / attachments 等字段恒为空数组,插件拿不到附件。需在 Discord 开发者后台申请并通过审核 |
| Discord | 外链嵌入(embeds)不下载 | 用户粘贴的外链由本插件刻意不抓取(避免 SSRF 风险),只把标题与链接作为文本交给 Agent |
| QQ 机器人 | 接收侧附件 url 的请求头要求与有效期官方未说明 | 本插件按普通 HTTPS GET 实现(官方文档未要求特殊请求头,也未给出有效期) |
| 微信 ilink | 无公开官方文档 | 该协议为腾讯内部/半开放接口;本插件字段名与解密流程取自腾讯官方 npm 包源码,可信但无文档承诺,平台可能无通知变更 |
| 全平台 | 视频 / 语音不是"看画面 / 听声音" | 模型无法直接理解音视频内容。本插件将其作为文件交给 Agent(提供文件名 + 只读路径),Agent 可用工具读取文件本体或转写后再处理 |
8bit / binary 编码的附件按文本 literal 读取 | 本插件 IMAP 实现以文本字面量获取 part,对 base64 / quoted-printable(实际绝大多数附件)解码精确;8bit/binary 属罕见情形 |
如果你遇到的现象不在上表中,那可能是本插件的问题——欢迎提 Issue。
lib/index.js):/gateway/* 路由(list / save / delete / test / wechat-status)+ BridgeManager(agent 会话注入与事件流轮询)+ WecomBridge(SDK 长连接生命周期)+ gateway-store(凭据存储)lib/client.js):侧边栏按钮挂载 + 全屏平台管理页(React,经 __ModuleLoader__ 闭包加载)使用中遇到问题或有功能建议?欢迎到 GitHub Issues 反馈,帮助我们把插件做得更好。
MIT
FAQs
Universal message-platform gateway for the DSH web GUI: configure QQ / WeChat / WeCom / WeCom AI bot / Discord / Telegram / WhatsApp / Email / Webhooks connectors, save credentials, test connections, and run a persistent WeCom AI bot bridge with per-chat
The npm package dsh-message-gateway receives a total of 0 weekly downloads. As such, dsh-message-gateway popularity was classified as not popular.
We found that dsh-message-gateway demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.