dsh-qqbot-buddy: Integrating DSH with the QQ Official Bot Platform

Introduction

In DSH (DeepSeek Harness), running agents is commonly done via browser or command-line sessions. If you want to connect the same set of agents to an Instant Messaging (IM) platform, you often have to write your own bridge, manage credentials, manage multi-group strategies, and consider security boundaries like “who can trigger” the agent.

Below is the community plugin dsh-qqbot-buddy (maintainer Ethereal-ljq): after loading it inside a dsh profile, it interfaces with the QQ Open Platform official bot, and comes with a built-in Web management console. The data directory defaults to local SQLite with multi-bot directory isolation; currently still in pre-release (RC / alpha), you need to backup the data directory before upgrading.

What is this

dsh-qqbot-buddy is a client-side plugin within the DSH ecosystem: connecting DeepSeek Harness to the QQ official bot platform.

The version table in the README states the npm release channel 1.0.0-rc.1 (both latest and next currently point to this RC), the runtime environment is Node.js ≥ 24, it is compatible with dsh 0.2.2 – 0.2.x, and the license is MIT. The repository default branch is v2.

The plugin starts a standalone console within the process (default http://127.0.0.1:6198), login with a token; it supports bidirectional jumping with dsh Web (control bar top “dsh Web ↗”, dsh Web session menu “QQBot Dashboard”).

Core Features

The modules listed in the documentation can be understood along two lines: Operations and Product.

Operations & Isolation

  • Multi-bot: Each bot uses a separate working directory <workspace>/bots/<botId>, with credentials, sessions, and logs being independent.
  • Config + Scope Binding: The effective order is default -> global -> profile; binding determines “which group/private chat uses which config” (precise scope takes precedence over type wildcard, bot wildcard, and default profile). Switching profiles does not lose memory.
  • Access Control Default Deny: Private and group chats default to allowlist with an empty list, meaning it ignores everyone; you need to configure access.c2cAllow / access.groupAllow yourself (fill in group openid for groups, not the group number).

Dialogue & Capabilities

  • Prompt Management: Persona cards, personality cards, etc.; the console provides a prompt merging preview (shows segments the model actually receives if there is a live session).
  • Tools & Skills: Discovers all host tools and skills, allowing them through based on profile whitelist/blacklist; supports persistent/need-based slots, and skills whitelist is filtered by profile.
  • Long-term Memory & Knowledge Base: SQLite + FTS5; the knowledge base supports text/URL indexing; the friend library records openid, nicknames, etc., injecting context on demand.
  • Message Stream: Triggers and full group messages (logged before gating, including bystander speech without @) are retained layer-wise; retention period is configurable.

Group Scenario Enhancements

  • Group Daily Report: Generates and sends automatically at a default time (23:30) per group; built-in paper/dark templates and custom template slots (<dataDir>/templates/<name>/index.html); supports /daily manual generation.
  • Relationship Increment: Adjusts group friend affinity based on interaction, with evidence verification and audit.
  • Voice: TTS multi-vendor chunk configuration; incoming QQ voice can connect to ASR, with a fallback to QQ built-in recognition if it fails.
  • Images: Visual understanding, and generation/alteration results can be automatically reposted to QQ.

Model Center: Manage LLM/Vision/TTS/ASR by tab; LLM routing takes effect per profile, while TTS/ASR vendors are global config, and the profile only selects the vendor.

The default data directory is ~/.dsh-qqbot/v2 (buddy.db, console-token.txt, custom daily report templates, tts-media/, etc.).

Installation & Usage

Environment Requirements

  1. Node.js 24 or higher (uses built-in node:sqlite).
  2. dsh installed and version 0.2.x; other versions will be rejected unless explicitly allowed by running dsh plugin --profile <name> allow-version on that profile.
  3. QQ Open Platform bot application appId / appSecret, and enable required group/private chat permissions.

The commands below come from the original README; you need to restart dsh after installation to load the bundle.

# Install to default web profile
dsh plugin --profile web add dsh-qqbot-buddy          # = @latest
dsh plugin --profile web add dsh-qqbot-buddy@next     # latest pre-release

# Install to specific profile
dsh plugin --profile qqbot add dsh-qqbot-buddy@next

You can also use the package installer (validates profile, registers bundle, self-checks):

npx -y --package=dsh-qqbot-buddy@next dsh-qqbot-buddy-install --profile qqbot --spec dsh-qqbot-buddy@next

Installation from GitHub (No npm account required)

Default branch is v2:

npx -y github:Ethereal-ljq/dsh-qqbot-buddy
npx -y github:Ethereal-ljq/dsh-qqbot-buddy --profile qqbot
npx -y github:Ethereal-ljq/dsh-qqbot-buddy --dry-run

First Launch

  1. Restart dsh, for example by running dsh web; the console starts with the plugin.
  2. Read the token and open the console:
cat ~/.dsh-qqbot/v2/console-token.txt        # → http://127.0.0.1:6198
  1. Create a bot on the console “Bot” page, fill in appId / appSecret, save and start.
  2. @ the bot in a QQ private chat or group; if it is intercepted, the logs will print the openid, which you fill into the profile’s cordis.patch.yml and restart (see next section).
  3. Adjust persona and strategy in “Config”; if distinguishing by group, bind scope in “Bot -> Details -> Config Binding”.

Upgrade example:

dsh plugin --profile web add dsh-qqbot-buddy@next
# Restart dsh; it is recommended to backup the data directory and workspace before upgrading

Uninstall:

dsh plugin --profile web remove dsh-qqbot-buddy

Uninstalling will not delete ~/.dsh-qqbot/v2 and <workspace>/bots, you need to clean them up yourself.

Typical Usage: Access Control & Whitelisting

Chat bridging defaults to deny: after installing credentials, if you do not configure the list, anyone who can private chat or @ the bot in a group could potentially drive the local agent. The README suggests first allowing yourself in the list.

You can write the following in the profile’s corresponding cordis.patch.yml:

- insert:
    - id: qqbot-buddy
      name: dsh-qqbot-buddy
      config:
        access:
          c2cMode: allowlist
          c2cAllow:
            - 'YOUR_C2C_OPENID'      # Private chat: other party's openid
          groupMode: allowlist
          groupAllow:
            - 'GROUP_OPENID'         # Group chat: group openid

Source of openid: printed in logs when intercepted (same openid only prompted once per process), or in the console “Message Stream” (group messages are logged before gating).

After allowing access, users who enter the agent can also invoke host tools. The tool side switch is in the profile’s tools.mode / tools.allow / tools.deny; documentation notes that when the whitelist is empty, no tool is blocked, so you need to narrow it down before opening it to the public.

access.* also supports open (allow everyone, warns on startup) and disabled (full deny).

Applicable Scenarios & Notes

Who is this for

  • Already running agents on dsh 0.2.x, wanting to reach groups or private chats via the QQ official bot, and wishing to manage multiple bots, profiles, daily reports, memory, and knowledge bases via a console instead of writing a bridge from scratch.

Security & Permissions

  • The plugin runs with the current dsh process permissions; users who can trigger the bot may indirectly use host tools. You should read the source code and MIT license before installing, and understand the default deny and whitelist flow.
  • During RC/alpha phases, configuration items and interfaces may still be adjusted; backup <dataDir> (default ~/.dsh-qqbot/v2) and <workspaceRoot>/bots before upgrading.

Ecosystem Explanation

DSH’s philosophy is “Everything is a plugin”. Plugin directory sites (e.g., SkillHub entry) are community maintained, with no official affiliation to DeepSeek/Huansuan; stars and popularity are based on actual display on each site.

Conclusion

dsh-qqbot-buddy connects DSH agents to the QQ official bot, and uses its own console to converge capabilities such as multi-bot, profile binding, memory/knowledge base, group daily reports, and voice; when connecting, first tighten access control and tool strategy, then expand profiles and templates as needed.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye