lijian-ui/dsh-im-gateway

为 DeepSeek Harness 提供多 IM 通道接入的网关插件:钉钉 / QQ / 个人微信,支持扫码绑定与流式回复。

Project Overview项目介绍

This is a native IM gateway plugin built exclusively for DeepSeek Harness (DSH), with a valid DSH bundle manifest. It enables DSH to connect to three major instant messaging channels: DingTalk, QQ, and personal WeChat, all unified under a single core ctx.imGateway that handles session management, slash commands, streaming replies, and status broadcasting. It ships with a full integrated settings page inside DSH's official web UI, so users can add and configure channels directly there, and credentials can be auto-filled via QR code scan, no manual config file editing required.

After connecting a channel, users can interact with DSH Agent directly from their IM client by sending messages to the bound bot. Common operations like tool approval, interactive questions, session resume, and workspace switching can all be completed entirely within IM. It also automatically splits long replies to fit IM channel message limits, and merges consecutive short user inputs into a single prompt for the agent. Third-party developers can extend the plugin by registering custom IM channels via the provided public extension interface to support additional messaging platforms, making it easy to adapt for niche use cases.

This plugin is released under the open-source MIT license, and it is installed as a standard DSH bundle plugin. The recommended installation method is via npm, using the command dsh plugin --profile web add @lijian-ui/dsh-im-gateway, which includes pre-built files and does not require additional build authorization. It also supports installation from a tarball or GitHub source. After installation, users can open the DSH web UI settings, add their desired IM channel, complete the one-time configuration, and start interacting with DSH via IM immediately. Configuration is stored locally in the user's ~/.dsh/settings.yaml file and supports hot reload after changes.

这是专为 DeepSeek Harness (DSH) 开发的原生 IM 网关插件,支持钉钉、QQ、个人微信三大即时通讯通道接入 DSH,提供统一网关核心服务,包含会话管理、斜杠命令、流式回复、状态广播等基础能力。插件自带完整的 DSH Web 端设置界面,所有通道配置都可在设置页内可视化完成,支持扫码绑定机器人凭据,配置保存后自动热重载,无需重启 DSH 服务。

普通用户可以通过对应 IM 客户端给绑定的机器人发送指令,直接和 DSH Agent 交互,还能在 IM 内完成工具审批、交互提问、会话恢复、工作区切换等操作。用户输入还支持自动合并分段,长回复自动拆分,适配不同 IM 的消息长度限制。适合需要将 DSH Agent 能力暴露到常用 IM 渠道,随时随地调用 DSH 的用户使用。

本插件遵循 MIT 开源协议,作为标准 DSH bundle 插件,支持通过官方插件通道安装,推荐使用 npm 安装,也支持从压缩包或 GitHub 源码安装。npm 安装方式自带预构建产物,无需额外构建授权,操作更简便。首次使用需要打开 DSH Web 设置页,添加对应 IM 通道并完成配置,配置可存储在本地 DSH 设置文件中。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
  • Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add @lijian-ui/dsh-im-gateway

把 lijian-ui/dsh-im-gateway 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

@lijian-ui/dsh-im-gateway

English | 简体中文

为 DeepSeek Harness (dsh) 提供多 IM 通道接入的网关插件:钉钉 / QQ / 个人微信 / 飞书 / 企业微信,支持扫码绑定、流式回复、工具审批、交互提问、长文本分片、多段合并、双语界面。

npm version License: MIT


功能特性

通道与核心

  • 统一网关服务 — 一个插件、五个通道。所有通道都汇聚到单一的 ctx.imGateway 核心:会话管理、斜杠命令、流式回复、状态广播。
  • 钉钉 — 出站 WebSocket 长连接,群聊 + 单聊,@ 提及过滤,AI 卡片流式输出(实时增量回复),斜杠命令。
  • QQ — WebSocket 网关(官方 qqbot-nodejs SDK),私聊(c2c)+ 群聊,扫码绑定机器人(免去开放平台手动创建),流式消息(c2c)。
  • 个人微信(iLink) — 官方 iLink 长轮询协议,扫码登录 + 配对码,仅单聊,媒体(AES-128-ECB CDN)收发。
  • 飞书 / Lark — 官方 @larksuiteoapi/node-sdk 长连接(无需公网回调),扫码一键创建应用(权限与会话事件自动预填),私聊 + 群聊,CardKit 卡片流式输出,图片/文件收发。
  • 企业微信 — 官方智能机器人 WebSocket 长连接(无需公网回调、无需消息加解密),扫码一键创建机器人,私聊 + 群聊,原生流式气泡(replyStream 原位替换,官方原生能力),图片/文件/语音收发。
  • 多机器人实例 — 同一通道类型可配置多个实例(例如两个钉钉机器人),各自独立凭据。
  • 设置页 UI — 在官方 dsh web UI 内渲染完整的设置页(「IM 通道」),扫码绑定就在这里完成。
  • 流式回复 — 钉钉 AI 卡片、QQ stream_messages、飞书 CardKit 卡片、企业微信流式气泡;渠道不支持流式时自动回退纯文本。
  • 单例锁 — 通过 DSH_HOME 文件锁防止多个实例并发写坏 session log。

交互增强

  • 工具审批桥 — agent 调用需要审批的工具时,在 IM 里直接回复「批准」或「拒绝」即可放行/拦截,超时自动委托回 dsh 原生审批体系。
  • 交互提问桥 — agent 调用 ask_user_question 时,问题同步推送到 IM,用户回复选项编号/文字即可作答,与 Web 端竞速第一答生效。
  • 长回复分片 — 超过渠道单条上限的回复自动按句号/换行切分,带 (1/3) 分段前缀,逐条发送。
  • 多段输入合并 — 用户连续发多条消息时自动合并为一条(可配超时窗口);.. 续传合并、!! 立即提交。
  • 文件发送工具 — agent 可调用 im_send_file 工具把工作区文件(图片/视频/文档)直接发送到当前 IM 会话。
  • 双语界面 — 配置 language: 'zh' | 'en' 切换所有用户可见回复的语言。

会话管理

  • 内置斜杠命令 — /help、/model、/status、/new、/reset、/stop、/sessions、/continue、/workspaces、/workspace(见下文)。
  • 会话列表与继续 — /sessions 列出最近会话(含标题),/continue <id> 恢复指定会话。
  • 会话标题带通道标识 — 来自 IM 的会话在 dsh 会话列表中自动显示为 [机器人名] 智能标题,一眼分辨会话来自哪个通道(机器人名取通道实例的 name,未填则回落到通道类型名)。标题沿用 dsh 官方生成的智能标题,只在前面加前缀;在 Web 端手动重命名后不再自动覆盖。
  • 工作区管理 — /workspaces 列出所有工作区及会话数,/workspace <路径> 切换工作区(自动重置当前会话,下次消息在新工作区创建新会话)。
  • 用户白名单 — 配置 allowAllUsers 或 allowedUserIds 精确控制谁可以使用机器人。

安装

需要 DeepSeek Harness (dsh)——本插件是标准 dsh bundle,通过官方插件通道安装。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev DSH-Chrome-devtools 下一个 Next dsh-smart-compact →