Introduction¶
Running agents in DSH typically involves the Web UI or a desktop client. If you want colleagues or group members to interact directly in QQ without writing a separate bot gateway, you need to connect QQ’s messaging protocol to DSH’s session and toolchain. The community already has OneBot 11 implementations like NapCat and Lagrange handling QQ login and risk control; what is missing is a profile plugin layer for “OneBot Event → DSH Agent → Reply to QQ”.
Below is an introduction to the dsh-qq-bot maintained by arrow1031: Once installed into a DSH profile, each QQ private chat or group session corresponds to a DSH Agent session. It reuses NapCat (or other OneBot 11 implementations) and does not rebuild the QQ protocol from scratch. The plugin requires DSH ≥ 0.1.7 (since version 0.6.1); the repository README states that it is frozen/deprecated and maintenance is not guaranteed. It is MIT licensed, so you will need to fork and modify it yourself if you encounter issues.
What is this?¶
dsh-qq-bot is a client-type plugin for DeepSeek Harness (DSH): QQ messages enter the plugin’s built-in adapter via OneBot 11, then are passed to the Cordis-side logic. It drives the DSH Agent via sessionController → agent.followup, and replies are sent back to QQ via HTTP or WS actions.
The data flow can be summarized as:
QQ Client → NapCat etc. (OneBot 11) → lib/onebot-adapter.mjs → lib/index.js (Cordis)
→ DSH Agent; the settings panel provides the "Settings → QQ Bot" tab via lib/client.js.
Maintainer: arrow1031. Source and documentation: GitHub - arrow1031/dsh-qq-bot; Community directory page: SkillHub Plugin Page. Current package version 0.6.1, Node ≥ 22.6, License MIT.
Core Features¶
The following capabilities are derived from the repository README and package declarations. The README lists multiple sets of local regression tests (adapter, plugin end-to-end, client settings page, permissions and group management, etc.) that have passed.
- OneBot 11 Dual Modes: Default is forward WebSocket (plugin connects to
ws://127.0.0.1:3001); optional reverse WS (plugin listens on0.0.0.0:6199, NapCat connects in). HTTP defaults to3000for sending messages, consistent with NapCat’s default port. - One Session per Agent: When
perChatSession: true, each group/private chat gets an independent DSH session (IDs likeqqbot-group-33333), which can be persisted and continued in the Web UI session list. - Group and Private Chat Strategies: Group chats require @mentioning the bot by default to trigger (the @ is removed from the body before passing to the Agent); private chats reply directly by default. Long replies are split by newlines, with a default maximum of 1200 characters per message.
- Web Settings Page: Under DSH ≥ 0.1.7, configuration is written to the profile’s cordis.patch.yml; connection mode, addresses, tokens, whitelists, presets, permissions, and group management items are centralized in one tab. access_token is a write-only field; if already set, saving while leaving it blank will not clear it.
- Permissions and Group Management: Multiple parallel paths including static owners/super admins, local group admin identities, and dynamic authorization. Visitors (guests) do not have access to DSH internal tools by default, but
qqbot,qqgroup, etc., can be retained via whitelists. Management command prefixes, dry-run, etc., are detailed in the README’s “Permissions and Group Management” section (if truncated here, please refer to the repository for the full text). - Tools and Status: You can ask the Agent to call the
qqbottool (action=status) during the conversation to view connection status, rather than displaying it in the settings page.
The adapter lib/onebot-adapter.mjs has zero npm dependencies; runtime dependencies include @deepseek-ai/schemastery, and peer dependencies optionally include @deepseek-ai/dsh-tools.
Installation and Activation¶
Before installing, confirm your DSH version: 0.6.1 and later require DSH ≥ 0.1.7; for DSH 0.1.6 and earlier, use plugin version 0.6.0. The plugin is not on npm and is installed via dsh plugin from GitHub or a Release tarball.
1. Prepare OneBot 11 (NapCat Recommended)¶
On the same machine, you can start the official NapCat Docker image (supports amd64 / arm64):
docker run -d --name napcat --restart=always \
-e NAPCAT_GID=$(id -g) -e NAPCAT_UID=$(id -u) \
-p 3000:3000 -p 3001:3001 -p 6099:6099 \
mlikiowa/napcat-docker:latest
The WebUI is at http://<host IP>:6099/webui; log in by scanning the QR code with your mobile QQ. In “Network Configuration”, confirm OneBot 11 HTTP 3000 and Forward WS 3001. If access_token is configured, it must be entered into the plugin settings.
2. Install the Plugin¶
Replace --profile according to your actual environment (Desktop version commonly uses --profile desktop, dsh web commonly uses --profile web):
# Method 1: Install directly from GitHub repository (follows main branch by default)
dsh plugin --profile web add github:arrow1031/dsh-qq-bot
# To lock a version, use a tag (recommended for production)
dsh plugin --profile web add github:arrow1031/dsh-qq-bot#v0.6.1
# Method 2: Use a pre-built tarball from Release (fixed version)
dsh plugin --profile web add \
https://github.com/arrow1031/dsh-qq-bot/releases/download/v0.6.1/dsh-qq-bot-0.6.1.tgz
# Method 3: Local tarball (after modifying the code yourself)
npm pack
dsh plugin --profile web add ./dsh-qq-bot-0.6.1.tgz
After installation, restart DSH (restart the app for desktop, restart dsh web for CLI). If lib/client.js is modified, you must also refresh the browser to load the new client bundle. When modifying the code yourself before installing, you must bump the version number and repackage the tarball; otherwise, pnpm may skip the update due to hash caching.
3. Configure Connection¶
Recommended to save in Settings → QQ Bot; connection-related items will automatically restart the adapter after saving.
If NapCat and DSH are on the same machine, use the default forward. If NapCat is on another host or only supports outward connections, switch to reverse, fill in ws://<DSH_HOST_IP>:6199/ in NapCat, and configure the token according to the README (Bearer header or URL access_token).
You can also override config by ID dsh-qq-bot in $DSH_HOME/profiles/web/cordis.patch.yml (do not modify the cordis.patch.yml inside the package, as it will be overwritten on upgrade). The README provides a complete YAML example with fields: mode, onebot.wsUrl / listen / httpUrl, group / private, reply, auth, admin, etc.
Typical Usage¶
- Complete NapCat login and OneBot port configuration, as well as plugin installation and restart.
- Private chat the bot’s QQ number; you should receive an Agent reply directly by default.
- @mention the bot in group chat to ask questions (default
group.requireAt: true). - Open the corresponding
qqbot-*session in the Web UI to continue chatting like a normal DSH session; to change persona, setagentPresetto a specific preset ID in the configuration. - To troubleshoot connections, ask the Agent to execute the
qqbottool’sstatusin the conversation; enablelogAdapterFramesif you need frame-by-frame protocol logs.
Reverse WS scenario: Set plugin mode: reverse, onebot.listen: '0.0.0.0:6199', and fill in the DSH-reachable WS address and token on the NapCat side.
Use Cases and Notes¶
Suitable for: Users already using DSH Agents, presets, and toolchains who want QQ as another chat entry point; those who already have or are willing to deploy OneBot 11 implementations like NapCat, and accept the model of “one Agent session per QQ session”.
Not suitable or things to know:
- The author declares the plugin is frozen: no bug fixes, no adaptation to upstream changes, no feature requests accepted. Please evaluate the cost of self-maintenance for production environments; refer to ARCHITECTURE.md in the repository for architectural details.
- The plugin runs under the current DSH process permissions. Agent working directories and tool capabilities depend on configuration and presets; before installing, you should read the source code and the MIT license, and understand auth / admin configurations to avoid visitors mistakenly enabling
guestDshTools. - The DSH community directory (SkillHub) is an independent site and has no official affiliation with DeepSeek / High-Flyer. Facts in this introduction are based on the GitHub README.
Conclusion¶
dsh-qq-bot aligns OneBot 11 with DSH Agent sessions: NapCat handles the QQ side, the plugin handles protocol translation and session routing, and the settings page and cordis.patch.yml handle policies. If you want to reuse the same set of DSH capabilities in QQ, you can follow the README to start NapCat, use the dsh plugin add command above to install it into your profile, and restart to verify.
- Directory Page: https://www.skillhub.cn/plugins/arrow1031/dsh-qq-bot
- Source Code: https://github.com/arrow1031/dsh-qq-bot