DeepSeek Harness plugin

dsh-qqbot

QQ Bot IM channel plugin for DeepSeek Harness.

Jump to install

Source facts

Repository
tencent-connect/dsh-qqbot
Latest update
Aug 18, 2026
Category
Remote & Mobile
GitHub stars
70
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/tencent-connect/dsh-qqbot
Plugin: dsh-qqbot
Author: tencent-connect

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README_EN.mdSource · read only
README language

@tencent-connect/dsh-qqbot

A QQ Bot IM plugin for deepseek-harness (dsh), driving the dsh agent loop with the QQ messaging platform as the frontend protocol.

中文文档 | English

Architecture

QQ User → QQ WebSocket → dsh-im-qqbot → ctx.agents → dsh agent loop → LLM
                                 ↑                           │
                                 └── session/event ──────────┘
                                       (assistant reply → QQ sendMarkdown)

Installation

Method 1: Manual

# Add to a profile
npx @deepseek-ai/dsh plugin --profile qqbot add @tencent-connect/dsh-qqbot

# Start
npx @deepseek-ai/dsh --profile qqbot

On first launch, the plugin detects missing credentials and automatically starts the QR flow: a QR code is printed in the terminal → scan it with the QQ mobile app → credentials are saved to the profile, so subsequent launches require no re-scan.

<img src="./docs/assets/qrcode.png" alt="QR code scan example" width="280" />

> Note: Upgrade to 0.4.0 or later for browser-link scanning, which avoids QR code misalignment in some terminals.

Method 2: Local path

# Build
cd /path/to/dsh-qqbot
pnpm install && pnpm build

# Add to a profile (local path)
npx @deepseek-ai/dsh plugin --profile qqbot add /path/to/dsh-qqbot

# Start
export QQBOT_APPID="yourAppID" QQBOT_SECRET="yourAppSecret"
npx @deepseek-ai/dsh --profile qqbot

Method 3: --patch dev mode

export QQBOT_APPID="yourAppID" QQBOT_SECRET="yourAppSecret"
npx @deepseek-ai/dsh web --patch /path/to/dsh-qqbot/cordis.dev.yml

Configuration

ConfigTypeDefaultDescription
appIdstringrequiredQQ Bot AppID (or via QQBOT_APPID env var)
appSecretstringrequiredQQ Bot AppSecret (or via QQBOT_SECRET env var)
providerstringdeepseek-officialLLM provider name
modelstringdeepseek-chatModel name
presetstring-Agent preset id
cwdstringprocess.cwd()Agent working directory
requireMentionbooleantrueWhether group messages require @bot to trigger
groupPromptstring-Extra system prompt for group chats
directPromptstring-Extra system prompt for direct chats
textChunkLimitnumber4500Max chars per message
sessionIdleTimeoutnumber1800000Session idle timeout (ms), default 30 min
debugbooleanfalseDebug mode

Built-in Commands

CommandDescription
/new (aliases /reset /clear)Start a new session (clear context)
/compactCompact session history (replace old records with a summary)
/modelView or switch model
/stopAbort the current generation
/bot-pingConnectivity test
/bot-versionView version info
/bot-statusView current session status
/bot-helpView all commands

Core Modules

src/
├── index.ts                    # Cordis plugin entry (async apply)
├── config.ts                   # Config schema
├── types.ts                    # Global types
├── setup.ts                    # Credential binding (QR)
├── transport/                  # Transport layer
│   ├── inbound.ts              # QQ inbound message → agent.followup()
│   ├── outbound.ts             # session/event → QQ sendMarkdown
│   ├── outbound-buffer.ts      # Streaming buffer
│   └── chunker.ts              # Markdown chunking
├── session/                    # Session management
│   ├── session-manager.ts      # QQ peer → Agent mapping
│   └── idle-evictor.ts         # Idle eviction
├── model/                      # Model routing
│   ├── model-resolver.ts       # Route resolution
│   ├── prefs-store.ts          # Per-peer preference persistence
│   └── settings-reader.ts      # settings.yaml read-only
├── shared/                     # Shared utilities
│   ├── utils.ts                # Common helpers
│   ├── scope.ts                # scope/peer extraction
│   └── send-helper.ts          # Chunked send
├── commands/                   # Slash commands
└── typings/                    # External module declarations

Session Routing

sessionKey: qqbot:${appId}:${scope}:${peerId}, with the SessionId derived deterministically via SHA-256 so sessions survive restarts.

Resolution strategy: in-process reuse → persisted resume → fresh create.

Design Principles

  • Pure Cordis plugin — follows the dsh "Plugins, not loop changes" principle
  • Declarative dependenciesinject = ['agents'], no direct coupling to other plugins
  • Session isolation — one independent Agent per QQ direct user / group
  • Preset support — mount presets (toolkits, prompts, etc.) via the agent-presets service
  • Idle eviction — auto-dispose Agents on timeout to prevent memory leaks
  • Markdown output — replies sent as Markdown with code-block/table-aware chunking

Local Development

# Install dependencies
pnpm install

# Build
pnpm build

# Dev mode (watch)
pnpm dev

# Debug via --patch
export QQBOT_APPID="xxx" QQBOT_SECRET="xxx"
npx @deepseek-ai/dsh web --patch /path/to/dsh-qqbot/cordis.dev.yml

License

[MIT](./LICENSE)