Skip to content

xiaomengxinbb/dsh-qq-bridge

41Last commit Aug 13, 2026

dsh-qq-bridge DSH plugin

This plugin integrates QQ official bot API v2 with DSH, allowing you to drive agents directly from QQ. Each QQ conversation gets an isolated, persistent agent session with full toolchain, model switching, and workspace support. It includes features like access approval, multimedia processing, and file transfer.

How to install the dsh-qq-bridge DSH plugin

dsh plugin --profile dev add ~/dsh-qq-bridge

Copying does not run this command. Review the repository and version before installing the dsh-qq-bridge DSH plugin.

dsh-qq-bridge DSH plugin data source

dsh-qq-bridge DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-qq-bridge DSH plugin can do

  • Zero-dependency WebSocket gateway with token refresh, heartbeat detection, exponential backoff reconnection, and Resume.
  • Isolated agent sessions per QQ conversation, with history isolation by workspace and automatic recovery on restart.
  • Steering: send messages while agent is running to inject next steps immediately.
  • Full command system: /help, /status, /model, /thinking, /new, /sessions, /resume, /compact, /stop, /workspace, plus keyboard buttons.
  • First-time access approval: unauthorized users get an approval code, admin can authorize with one click (supports normal user/admin levels).

Where the dsh-qq-bridge DSH plugin fits

  • Chat with a DSH agent through QQ with full conversation history and tool access.
  • Use QQ to control agents running long tasks, with ability to steer and interrupt.
  • Manage multiple workspaces and switch between them over QQ.

Who the dsh-qq-bridge DSH plugin is for

  • DSH users who want to interact with agents from their phone via QQ.
  • Developers who need to integrate QQ bot with DSH for testing or production.

dsh-qq-bridge DSH plugin limitations

  • Group chat support is code-complete but cannot be tested in sandbox due to QQ platform limitations; requires bot review and deployment.
  • Requires a QQ official bot application with appId and clientSecret.

dsh-qq-bridge DSH plugin: from the repository README

Quoted from the xiaomengxinbb/dsh-qq-bridge README, the upstream source of the dsh-qq-bridge DSH plugin. Copyright remains with the original authors.

**将 QQ 接入 DeepSeek Harness 的双向桥插件**——通过 QQ 官方机器人 API v2(私聊 + 群聊), 让你直接在 QQ 里驱动 DeepSeek Harness 的 Agent:每个 QQ 对话拥有独立、持久的隔离 Agent 会话, 像在 Web 里一样使用完整的工具链、模型切换与工作区。 ## ✨ 特性 - 🔌 **零依赖网关**:QQ 官方 WebSocket 协议(token 预刷新 / 心跳假死检测 / 指数退避重连 / Resume 补发),仅用 Node 内置能力 - 🧊 **隔离会话**:每 QQ 对话 ↔ 一个持久 DSH Agent(`agents.create/resume`),历史按 (对话, 工作区) 隔离,重启自动恢复 - ⚡ **steering 插嘴**:任务运行中继续发消息,立即注入下一步骤(DSH 原生) - 📚 **完整命令体系**:`/help /status /model /thinking /new /sessions /resume /compact /stop /workspace` + 键盘按钮 - 🔐 **首访审批**:未授权用户自动生成审批码,管理员一键授权(支持普通用户/管理员两级) - 🖼️ **多媒体**:图片直入视觉模型、语音 ASR/STT、TXT/PDF 有界提取;安全下载(SSRF 防护) - 📤 **出站文件**:Agent 可调用 `qq_send_local_file` 把本地文件发回 QQ(白名单 + 硬链接/竞态防护) - 🗂️ **多工作区**:QQ 侧 `/workspace` 切换目录,会话历史按工作区隔离 - ✅ **实测可用**:116 个单测 + 真实 QQ 沙箱文本闭环验证 > **移植自** [pi-qq-bridge](https://github.com/xiaomengxinbb/pi-qq-bridge)(Apache-2.0): > 宿主无关模块(网关/路由/命令/媒体/格式化)原样复用;宿主绑定层(会话创建/工具/命令)改为 DSH 官方 API。 --- ## 架构 ``` QQ 平台 WS 事件 → src/gateway/qq-gateway.ts(状态机/心跳/重连/Resume) → src/router.ts(去重 → 白名单/审批 → 命令 | FIFO 队列 → 隔离会话) → src/session/qq-session.ts(DSH 适配:ctx.agents.create/resume + followup/whenIdle) → 最终文本 → src/reply-formatter.ts(Markdown 分块 → 降级纯文本)→ QQApi 发送 ```

Read the full READMERepository license: Apache-2.0

dsh-qq-bridge DSH plugin questions

How to install dsh-qq-bridge?

Clone the repository, run pnpm install, then add the plugin to a DSH profile with 'dsh plugin --profile dev add <path>'. For production, use the web profile and add the plugin to cordis.patch.yml. Finally, configure config.json with your QQ bot appId and clientSecret.

Does dsh-qq-bridge support group chat?

Yes, the code fully supports group chat, including GROUP_AT_MESSAGE_CREATE intent, allowGroups whitelist, and group replies. However, due to QQ platform limitations, group chat cannot be tested in the sandbox environment. To use it in production, you need to submit the bot for review, set sandbox to false, invite the bot to a group, get the group openid, and add it to the allowGroups configuration.

How to approve new users for the QQ bot?

When an unauthorized user sends a message, the bot generates an approval code. The admin can use the /qqbot-approve command in the DSH web chat to approve the request. Use /qqbot-requests to see pending requests, and /qqbot-approve <code> <user|admin> to approve. For admin-level approval, you need to add --yes for confirmation.

Can the agent send files to QQ?

Yes, the agent can call the qq_send_local_file tool to send local files back to QQ. This feature has whitelist protection and race condition safeguards. You need to configure outboundMedia settings in the config.json.

What are the prerequisites for dsh-qq-bridge?

You need a DSH environment with the plugin installed, a QQ official bot application with appId and clientSecret, and Node.js with TypeScript support. The WebSocket gateway uses only built-in Node modules, so no external dependencies are required.