Preface¶
DeepSeek Harness (DSH) brings agentic development into a local WebUI: workspaces, sessions, models, and permissions are all managed within the same process. In actual development, however, users are often not in front of a browser—for example, when commuting, quickly replying to a message on a mobile phone, or wanting to complete an “approval for a shell operation” via instant messaging instead of the desktop. Self-hosted Webhooks or third-party IM bridges usually require handling authentication, message formatting, and synchronization with DSH session state, resulting in non-trivial maintenance costs.
Below is an introduction to the community plugin dsh-qqbot-bridge (Maintainer: Jiangsubei, Category: Client). It utilizes the QQ Open Platform’s official Bot API v2 and QQ Direct Chat (C2C) to remotely drive existing workspaces and sessions within DSH, without supporting group chats or channels. The plugin runs within the same process as the WebUI, keeping the list and creation of sessions aligned with the sidebar in real-time.
What is This¶
dsh-qqbot-bridge is a QQ official bot bridging plugin for DSH: its identity relies on openid and friend relationships, without developing a custom authentication layer. Selecting a workspace, selecting a session, or directly sending a message in QQ is equivalent to operating the corresponding session in the WebUI. The agent’s streaming body, Markdown, file transfer, as well as approval and question cards are forwarded to the QQ side for handling as described in the README.
In terms of ecosystem, DSH emphasizes that “everything is a plugin.” The plugin directory site skillhub.cn collects community contributions and has no official affiliation with DeepSeek or High-Flyer. Source code and documentation are available at GitHub: Jiangsubei/dsh-qqbot-bridge. The npm package name is dsh-qqbot-bridge (version 0.1.3 in the materials), and the license is MIT.
Core Features¶
Sessions and Workspaces¶
- Remote control of existing sessions: Use
/switchto select a workspace and/sessionto select a session, driving sessions that already exist in DSH; workspaces and sessions visible in the WebUI can be listed and taken over from the QQ side. - Full workspace coverage: Follows the same visibility rules as the WebUI sidebar (e.g., hiding archived items, hiding subagent sub-sessions, etc.; refer to the README for details).
- Guidance for first direct message: If no selection is made after installation and a message is sent directly → a session is automatically created in the default workspace
$DSH_HOME/workspace/defaultand the message is processed (it will not fall into the user’s home directory). - Same process as WebUI, real-time state synchronization: Sessions created by the plugin will appear in the corresponding workspace group in the WebUI.
- Takeover strategy: Prioritizes reusing the live agent; if an exclusive lock conflict occurs, it immediately returns a truthful receipt without stealing the lock or downgrading.
Messages and Media¶
- Streaming output of full turn body: The body of each step is sent as a separate message, without concatenation or skipping steps; streaming can be disabled via configuration to use standard Markdown messages instead.
- Markdown rendering: Titles, tables, code blocks, inline code, images, etc., are rendered according to QQ’s native Markdown.
- Files and Images: The Agent can call
send_file/send_imageto send files back; inbound attachments are automatically saved to disk and injected into the session (refer to the configuration table for default directories and size limits).
Approval, Questions, and Commands¶
- Remote answering for approval and questions:
approval/requestanduser-questions/requestare forwarded to QQ, allowing decisions via reply; times out in 300 seconds fail-closed (treated as rejected or unanswered). - Command system: 9 Chinese commands plus pagination sub-commands, with receipts in plain text; lists are 10 items per page with continuous numbering across pages.
- WebUI Settings Card: Four sections for Connection / Behavior / Files / Commands; AppID/Secret supports reading from the DSH credential store.
Explicitly Not Doing (README original): Group chats / Channels / Channel direct messages, memory and personality, proactive replies, emoji reactions, session archiving and deletion, custom authentication. The bot follows a passive reply model: the user must initiate the direct chat first.
Installation and Enablement¶
Prerequisites¶
- DeepSeek Harness is installed:
npm install -g @deepseek-ai/dsh. - Node.js ≥ 20 and pnpm.
- A QQ Open Platform Bot (AppID / AppSecret), and a QQ number capable of direct chatting with the bot.
Plugin declared dependencies: dsh ≥ 0.2.0 (see package.json).
Install Plugin¶
Recommended to install into the DSH web profile (no compilation required, installs in seconds):
dsh plugin --profile web add dsh-qqbot-bridge
Or install to the global default environment:
dsh plugin add dsh-qqbot-bridge
For local development linking from source, run pnpm install and pnpm build first, then dsh plugin --profile web add link:.; after modifying src/, you must rebuild, as DSH loads from dist/.
Configure Credentials¶
Recommended to write into the DSH credential store (same place as other DSH keys, not landing in settings.yaml):
# ~/.dsh/.credentials.yaml
refs:
QQ_BOT_APP_ID: "<Your AppID>"
QQ_BOT_SECRET: "<Your AppSecret>"
You can also fill in app_id / app_secret in the WebUI settings card. Resolution priority: Environment Variables QQ_BOT_APP_ID / QQ_BOT_SECRET → refs in .credentials.yaml → Plugin Config (the former takes precedence).
Startup¶
dsh --profile web
The WebUI defaults to 127.0.0.1:3080. After startup, simply send a message to the bot from QQ to establish the usage link.
Typical Usage¶
First Message¶
- Send a message directly: Without selecting a workspace or session, the plugin automatically creates a new session (receipt only reports the workspace name), and this message serves as the first prompt of the session.
- Select Workspace:
/switchlists workspaces →/switch <index or name>selects one (this clears the current control target). - Select Session:
/sessionlists sessions in the current workspace →/session <index>takes over; subsequent normal messages will be sent in that session.
A single openid has only one control target at a time; use /session to change sessions and /switch to change workspaces.
Common Commands (Excerpt)¶
| Command | Description |
|---|---|
/status |
Target title, workspace, model, thinking effort, permission tier, busy/idle status, context usage, etc. |
/new [path] |
Create a new session in the currently selected workspace; restricted by allow_create_session |
/model [name], /thinking [effort], /permission [tier] |
View or switch |
/compact |
Compact current session history (equivalent to DSH /compact) |
/stop |
Interrupt the currently generating reply |
/help |
Command list |
When a list exceeds one page, the footer will prompt /next and /prev (continuous numbering across pages).
Approval: Reply y (or synonyms listed in README) to allow this time; n to reject; /cancel to cancel; timeout after 300 seconds is treated as rejection.
Questions: Reply with the index for multiple choice (use comma for multiple selection); can reply with custom text; /skip, /cancel; timeout after 300 seconds is treated as unanswered.
Approval and questions only take over the current remotely controlled session; non-controlled sessions are still handled by the WebUI.
Main Configuration Items¶
Can be adjusted in the WebUI settings card; refer to the README for field details:
| Parameter | Description | Default Value |
|---|---|---|
default_workspace |
Default workspace; if empty, $DSH_HOME/workspace/default |
'' |
stream_enabled |
Whether to use QQ streaming messages | true |
stream_throttle_ms |
Streaming chunk throttle (milliseconds) | 1000 |
allow_create_session |
Whether to allow creating new sessions from QQ side (including direct message auto-creation) | true |
media_dir |
Inbound attachment directory (relative to $DSH_HOME or absolute path) |
qqbot/media |
media_max_bytes |
Single file disk write limit | 209715200 (200 MB) |
reply_max_chars |
Maximum character count for command receipts | 1500 |
list_page_size |
List pagination size | 10 |
Use Cases and Notes¶
Who it is for: Developers already using DSH WebUI to manage multiple workspaces and sessions, who wish to perform lightweight remote control via mobile QQ direct chat, view streaming replies, receive files, and answer approval/questions. Not suitable for scenarios requiring group chats, channels, or proactive plugin pushes.
Security and Permissions: The plugin runs with the same permissions as the current dsh process and can access workspaces and sessions accessible to that process; please read the source code and MIT license before installation, and assess the AppSecret and credential storage methods yourself. The QQ side can only control the session associated with the openid bound to your account, but it is still equivalent to “remote desktop-level” operation of DSH. Do not expose the bot to untrusted contacts.
Scope Boundaries: Only C2C direct chat; does not support group chats/channels; does not replicate certain WebUI capabilities such as session archiving and deletion on the QQ side.
Conclusion¶
dsh-qqbot-bridge connects existing DSH workspaces and sessions to the QQ official Bot API v2 direct chat channel: select workspaces, select sessions, streaming Markdown, files, and remote answering for approval/questions, all synchronized with the WebUI in the same process. If you need to manage DSH within QQ rather than building another IM bridge, you can install and configure credentials according to the commands above, then start with dsh --profile web to verify.