DSH Plugins Marketplace

DSH Plugins

Plugins

/

UI & Experience

/

dsh-qqbot

t

dsh-qqbot

Manifest valid★ 411

Official plugin for connecting QQ Bot to DeepSeek Harness (dsh)

hasBundlePatch
QQ Bot

A QQ Bot plugin based on deepseek-harness (dsh), integrating the DeepSeek AI assistant into QQ direct chats and group chats.

npm version License GitHub stars QQ Bot


English | 简体中文

Scan to join QQ group/channel

QQ 群二维码
QQ 开发者交流群
群号: 1032635674
QQ 频道二维码
QQ 开发者社区频道
频道号: 20dnumts4z

Architecture

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

Installation

Option 1: Manual execution

# 安装到 profile
npx @deepseek-ai/dsh plugin --profile qqbot add @tencent-connect/dsh-qqbot

# 启动
npx @deepseek-ai/dsh --profile qqbot

On first launch, the plugin detects missing credentials and auto-enters the QR-code onboarding flow: terminal prints QR → scan with mobile QQ to bind → credentials are auto-saved to profile; no re-scan needed on later starts.

二维码扫码示意图

Tip: Upgrade to 0.4.0+ before scanning. Supports opening the link in a browser, avoiding QR code misalignment in some terminals.

Option 2: Local path installation

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

# 安装到 profile(本地路径)
npx @deepseek-ai/dsh plugin --profile qqbot add /path/to/dsh-qqbot

# 启动
export QQBOT_APPID="你的AppID" QQBOT_SECRET="你的AppSecret"
npx @deepseek-ai/dsh --profile qqbot

Option 3: --patch development mode

export QQBOT_APPID="你的AppID" QQBOT_SECRET="你的AppSecret"
npx @deepseek-ai/dsh web --patch /path/to/dsh-qqbot/cordis.dev.yml

Configuration

ConfigTypeDefaultDescription
appIdstringRequiredQQ Bot AppID (or via the QQBOT_APPID environment variable)
appSecretstringRequiredQQ Bot AppSecret (or via the QQBOT_SECRET environment variable)
providerstringdeepseek-officialLLM provider name
modelstringdeepseek-chatModel name
presetstring-Agent preset id
cwdstringprocess.cwd()Agent working directory
requireMentionbooleantrueWhether group chats require @bot to trigger
groupPromptstring-Additional system prompt for group chats
directPromptstring-Additional system prompt for direct chats
textChunkLimitnumber4500Maximum character count per message
streamingbooleantrueWhether to enable streaming output (never enabled in group chats)
sessionIdleTimeoutnumber1800000Session idle timeout (ms), default 30 minutes
processingTimeoutMsnumber1800000Processing timeout (ms); aborts the current LLM call when exceeded
maxQueuenumber20Maximum concurrency queue length
historyLimitnumber10Number of group history buffer entries
askTimeoutMsnumber300000Pending question timeout (ms), default 5 minutes (ask_user_question)
showToolResultsbooleanfalseWhether to show successful tool call results (errors are always shown)
debugbooleanfalseDebug mode

Access Control (access)

ConfigTypeDefaultDescription
access.c2cModeopen/allowlist/disabledopenDirect chat access mode
access.c2cAllowstring[][]Direct chat allowlist (user openid)
access.groupModeopen/allowlist/disabledopenGroup chat access mode
access.groupAllowstring[][]Group chat allowlist (group openid)

Rich Media Understanding (media)

ConfigTypeDefaultDescription
media.enabledbooleantrueWhether to enable rich media understanding (image/video download + tool analysis)
media.maxMBnumber200Maximum download size for rich media (MB)
media.ttlHoursnumber24Lifetime of rich media (hours); 0 = never expires

Vision Understanding (vision)

ConfigTypeDefaultDescription
vision.enabledbooleanfalseWhether to enable vision understanding (qqbot_describe_image tool)
vision.providerstring-Vision model provider (e.g. pi-ai)
vision.modelstring-Vision model id (e.g. qwen-vl-max)
vision.maxBytesnumber10MBMaximum image size in bytes
vision.maxTokensnumber1024Maximum output tokens
vision.timeoutMsnumber120000Vision call timeout (ms)

Sending Attachments (sendFile)

ConfigTypeDefaultDescription
sendFile.restrictPathsbooleantrueWhether to enforce the path allowlist (media + cwd + extraRoots only)
sendFile.extraRootsstring[][]Additional root directories allowed for access

Built-in Commands

CommandDescription
/new (aliases /reset /clear)Start a new session (clears context)
/compactCompact session history (summary replaces older records, context is preserved)
/modelView or switch model
/presetView or switch agent preset (takes effect in new sessions)
/stopAbort the current generation
/bot-pingNetwork latency check (returns transfer and processing time)
/bot-versionView version information
/bot-statusView the current session status
/bot-helpView all commands

Core Modules

src/
├── index.ts                    # Cordis 插件入口(async apply)
├── config.ts                   # 配置 Schema
├── types.ts                    # 全局类型定义
├── setup.ts                    # 凭据绑定(扫码)
├── gateway/                    # 网关装配
│   ├── bootstrap.ts            # 启动装配(监听 session/event 等)
│   └── middleware-setup.ts     # 中间件链配置
├── transport/                  # 传输层
│   ├── inbound.ts              # QQ 入站消息 → agent.followup()
│   ├── outbound.ts             # session/event → QQ sendMarkdown
│   ├── outbound-buffer.ts      # 流式缓冲
│   ├── streaming-writer.ts     # 流式写入
│   ├── reply-target.ts         # 回复目标解析
│   ├── msgid-cache.ts          # 被动回复 msgid 缓存
│   ├── reply-limiter.ts        # 被动回复限流
│   ├── tool-presenter.ts       # 工具调用展示
│   └── chunker.ts              # Markdown 文本切分
├── session/                    # 会话管理层
│   ├── session-manager.ts      # QQ peer → Agent 映射
│   └── idle-evictor.ts         # 闲置回收
├── model/                      # 模型路由层
│   ├── model-resolver.ts       # 路由解析
│   ├── prefs-store.ts          # per-peer 偏好持久化
│   └── settings-reader.ts      # settings.yaml 只读
├── features/                   # 交互特性
│   ├── question-channel.ts     # ask_user_question 问答通道
│   ├── approval-channel.ts     # approval 审批确认通道
│   └── answer-parser.ts        # 答案解析
├── media/                      # 多媒体
│   ├── vision-tool.ts          # 图片视觉理解
│   ├── send-file-tool.ts       # 发送本地文件
│   └── media-cleaner.ts        # 媒体 TTL 清理
├── middleware/                 # 中间件
│   ├── question-answer.ts      # 问答答案处理
│   └── attachment.ts           # 附件处理
├── shared/                     # 共享工具
│   ├── utils.ts                # 通用函数
│   ├── scope.ts                # scope/peer 提取
│   └── send-helper.ts          # 分块发送
└── commands/                   # 斜杠命令

Session Routing

sessionKey: qqbot:${appId}:${scope}:${peerId}, with the SessionId deterministically derived via SHA-256, so it can be restored after a restart.

Resolution: in-process reuse → persistent restore → create new.

Design Principles

  • Pure Cordis plugin — follows the dsh "Plugins, not loop changes" principle
  • Declarative dependencies — inject = ['agents'], no direct coupling with other plugins
  • Session isolation — each QQ direct-chat user/group chat gets its own independent Agent
  • Preset support — presets (toolsets, prompts, etc.) can be attached via the agent-presets service
  • Idle reclamation — Agents are automatically disposed on timeout to prevent memory leaks
  • Markdown output — replies are sent in Markdown format, with chunking aware of code blocks/tables
  • Image understanding — supports qqbot_describe_image vision understanding to analyze images sent by users
  • Attachment sending — supports qqbot_send_file to send local files to the user (path allowlist enabled by default)
  • Q&A interaction — supports ask_user_question; single choice generates inline buttons (clicking one grays out the rest), multi-choice replies with numbers, advancing question by question with per-question timeouts
  • Operation confirmation — supports approval/request; critical operations ask the user for confirmation via "allow/deny" buttons

Local Development

# 安装依赖
pnpm install

# 构建
pnpm build

# 开发模式(watch)
pnpm dev

# 用 --patch 方式调试
export QQBOT_APPID="xxx" QQBOT_SECRET="xxx"
npx @deepseek-ai/dsh web --patch /path/to/dsh-qqbot/cordis.dev.yml

License

MIT

Compatibility

DSH 0.1.7-rc.2: failedDSH 0.1.7-rc.1: failedDSH 0.1.6-alpha.2: failed

Versions

Latest versionPublishedSize
0.1.0——
0.2.0——
0.3.0——
0.4.0——
0.5.0——
0.5.1——
0.5.2——
0.5.3——

Comments

Loading…

Similar plugins

dsh-QQbot

DSH QQ bot bridge plugin, connect DeepSeek Harness with QQ bot.

Tools & CapabilitiesManifest valid

★ 0

dsh plugin --profile web add @sunjuntao/dsh-qqbot

by belowthetree

qqbot 连接QQ机器人插件,方便易用,安装快捷

Manifest valid

★ 0

MIT

TypeScript

Aug 30, 2026

dsh plugin --profile web add dsh-qqbot

by arrow1031

Deepseek harness plugin for QQ-Bot adataper

Terminal & ClientsManifest valid

★ 0

MIT

JavaScript

Sep 20, 2026

dsh plugin --profile web add dsh-qq-bot

by wang-22-code

让 DeepSeek Harness(DSH)住进 QQ:基于腾讯官方 Bot API,支持私聊白名单、持久会话、模型切换与远程权限审批。

Manifest valid

★ 9

↓ 1.1k/wk

MIT

TypeScript

Sep 6, 2026

dsh plugin --profile web add dsh-qqbot-bridge

by sliverp

QQ Bot text and image channel plugin for DeepSeek Harness

Tools & CapabilitiesManifest valid

★ 8

MIT

TypeScript

Aug 19, 2026

dsh plugin --profile web add deepseek-harness-qqbot

by TomoyoNatsume

deepseek harness插件,连接QQ / DSH plugin for connecting QQ

Sessions & MessagesManifest valid

★ 11

↓ 1.3k/wk

MIT

TypeScript

Aug 25, 2026

dsh plugin --profile web add @yachangchang/dsh-qq-bridge