dsh-chacha-qq: Letting DeepSeek Harness Speak in QQ with the Same Agent Suite

Preface

Connecting to QQ within DSH typically involves launching a separate bridging service to forward messages to other bot frameworks, or manually assembling prompts within the shell to call the model. This often decouples conversation, tools, and context compression from the DSH main process, making it difficult to troubleshoot “what tools she actually used.”

dsh-chacha-qq was developed by maintainer lcalc-lcalc. It is classified as a client plugin. It runs inside the DSH main process, reusing the host’s agent, sessions, tools, and context compression. On the QQ side, it connects via NapCat (OneBot 11); the protocol layer only does translation. Judgment and “when to speak” are handled in the Controller. The actual output comes from a trimmed Mind layer. The goal is not just a message forwarding shell, but to allow DSH itself to reply on QQ, mimicking a human’s rhythm as closely as possible.

Community directory page: https://www.skillhub.cn/plugins/lcalc-lcalc/dsh-chacha-qq. Source code and documentation: https://github.com/lcalc-lcalc/dsh-chacha-qq. SkillHub is a community site and has no official affiliation with DeepSeek / HF.

What is it

In short, dsh-chacha-qq is a plugin to connect a real QQ account to DeepSeek Harness. It features a three-layer division of labor—NapCat adaptation, Controller judgment, and the trimmed DSH Mind—all mounted within the same DSH process.

The data flow is roughly as follows (excerpted from the architecture section in README):

QQ User → NapCat (ws://127.0.0.1:3001) → Plugin L1/L2/L3 → DSH Kernel (Model / Tools / Compression / Session)

The management entry is in the DSH Web UI sidebar under “茶茶酱的 QQ” (Chacha-chan’s QQ): client.js single-file panel + src/panel/api.js totaling 11 HTTP endpoints. The repository is under the MIT license, requiring Node ≥ 22; package.json version is 3.8.18, README specifies the behavior snapshot is approximately v3.6 (2026-11-08), and npm has not been released yet.

Core Features

Three-Layer Architecture

Layer Path Responsibility
L1 src/napcat/ NapCat adaptation: frame ↔ QqMessage, no judgment, no memory
L2 src/controller/ Routing, observation, interest, emotion, security, memory, group management, proactive messages, etc., does not directly call the model
L3 src/mind/ Trimmed DSH: agent assembly, persona, tool whitelist, single-turn dialogue

L1 does not import L2/L3, L3 is unaware of the QQ protocol; each layer can be tested independently. README states host side has about 39 .js files (approx 1 MB), 22 suites / 4160 tests fully offline (no QQ connection, no DSH connection, no internet connection).

Dialogue and Permissions

  • Observation: Accumulate a batch before judging; must reply if @mentioned; interest dice decides if the group chat will intervene.
  • Permissions: Physically disables tools based on ranks (not just prompt-based prohibition); private chats can use all tools; group chats default to 21 core tool sets.
  • Group Context: When group.contextOn: 'on-demand', replied or decided to intervene brings the recent 30 lines; usually about 5 lines.
  • Anti-injection: Combination of feature detection + output-side audit; separate strategies for owner-related judgments.

Human-like Sending Rhythm

  • One message at a time, intervals of about 1.2~3 seconds and uneven; supports probabilistic behaviors like pausing mid-sentence, typos, and retracting.
  • Sentence breaking uses explicit symbol ␟ (U+241F), erased before sending, does not rely on punctuation guessing.
  • Five layers of persona (base / owner / guest / memory rules / mind.personaOverride), can stack with DSH global persona; built-in “Trashy College Girl” preset, can run without writing a persona directly.

Memory and Group Management

  • Structured facts.jsonl, core.md, daily logs and monthly summaries; automatic summarization and cross-session recall; owner’s private facts are only injected into the owner’s session.
  • Group moderation can self-judge and self-ban when moderation.autonomy = 'free'; owner, group admin, and plugin account are themselves hard-protected; spam is judged based on rules like average ≥ 3 messages/sec within 3 seconds (see README for details).

Panel

Sidebar with three columns: conversation list, dialogue stream and history, configuration drawer. You can view the thinking process, tool calls, token consumption, and “why no reply”; 11 HTTP paths like state, conversations, config, persona, memory, etc. (full list in README Step 5 of “Quick Start”).

Installation and Activation

README does not provide commands like dsh plugin add github:...; the plugin is mounted via profile dependency + cordis.patch.yml bundle. Please read the source code and MIT license yourself before installing; the plugin runs in the same process as DSH, with equivalent permissions to the current DSH process.

Prerequisites

Item Description
Node ≥ 22 ESM and custom test harness
NapCat OneBot 11, default 127.0.0.1:3001
DSH Already installed and runnable; README example dev machine is 0.2.2-rc.1, repository does not lock versions
QQ 小号 README strongly advises against using the main account (non-official client, risk of account ban)

1. Get Repository and Self-Check

node --version          # Must be ≥ 22
git clone https://github.com/lcalc-lcalc/dsh-chacha-qq.git C:\path\to\dsh-chacha-qq
cd C:\path\to\dsh-chacha-qq
node tests/run-all.mjs  # 22 suites 4160 items, fully offline

If no git, download zip and unzip to the same path. README states: Do not install into DSH using file: pointing to a directory or simple copy (see mounting method below).

2. Configure NapCat (Easy to Miss)

Modify NapCat’s onebot11_<botQQ>.json:

{
  "network": {
    "websocketServers": [{
      "enable": true,
      "host": "127.0.0.1",
      "port": 3001,
      "reportSelfMessage": true,
      "messagePostFormat": "array",
      "heartInterval": 30000
    }]
  }
}

reportSelfMessage must be true, otherwise messages sent by self are not reported; messagePostFormat must be "array", otherwise structure for @, images, etc., is lost. After modifying, restart NapCat, you can use:

node scripts/probe-qq-status.mjs

Confirm QQ is online (NapCat process running ≠ QQ logged in).

3. Mount into DSH Profile

Mode A: Local Development (link:)

In the profile’s package.json (path example ~/.dsh/profiles/desktop/package.json):

"dependencies": {
  "dsh-chacha-qq": "link:C:/path/to/dsh-chacha-qq"
}

README emphasizes using link:, do not use file: pointing to a directory (will copy old copies).

Mode B: Distribution via tgz

cd ~/.dsh/profiles/desktop
npm install C:/path/to/dsh-chacha-qq-3.8.0.tgz

Or write "dsh-chacha-qq": "file:C:/path/to/dsh-chacha-qq-3.8.0.tgz" in package.json. After npm release, the plan is to change README to npm i dsh-chacha-qq, currently not yet released.

Before activating, confirm both locks are not disabled:

  1. In ~/.dsh/profiles/desktop/cordis.patch.yml, there must be no id: chacha-qq AND disabled: true
  2. In ~/.dsh/profiles/desktop/.dsh-market/state.json, the disabled array must not contain dsh-chacha-qq

Then restart DSH. Changes to host side code require a restart; only changing client.js allows refreshing the page. When either lock exists, README says there might be no plugin traces in the logs at all.

4. First Configuration of owner.qq (Required)

Data directory defaults to ~/.dsh/plugins/dsh-chacha-qq/ (can use DSH_HOME to change parent path). First startup generates config.json, need to fill in owner QQ:

{
  "owner": { "qq": "1111111111", "name": "主人" }
}

Leaving it empty treats everyone as a stranger, with only chat-only permissions; group chats without @ are mostly in observation, appearing “particularly cold”. Can be saved in the panel “茶茶酱的 QQ” config drawer, or by editing the file after:

node scripts/push-config.mjs --base http://127.0.0.1:<DSH端口>

Manually editing the file while the panel is open may be overwritten by save operations.

Typical Usage and Acceptance

Confirm Plugin is Running

Get-ChildItem ~/.dsh/plugins/dsh-chacha-qq
Get-Content ~/.dsh/plugins/dsh-chacha-qq/logs/chacha-qq.log -Tail 40 -Encoding UTF8
node scripts/probe-qq-status.mjs
node scripts/probe-inbound.mjs 45

In the logs, you expect to see “NapCat connected”, “茶茶酱上线” (Chacha-chan online), and lines indicating gateway / controller / mind assembly completion. Owner private chat should reply quickly; friends in groups without @ default to observation for about 8~25 seconds.

Customize Persona (Optional)

Default uses built-in BASE_PERSONA. To customize, edit mind.personaOverride in the panel “Persona”. Note that persona.overrideReplacesAll defaults to true, writing just a character name will replace everything including “how to speak”; README suggests copying from the repository presets/persona-template.md, only change “## You are”, keeping sentence breaks and tone paragraphs.

Differences from Common Practices (README Comparison)

Dimension Common Practice This Project
Brain Self-assembled prompt calling API Same process DSH agent + session + tools + compression
Timing to speak Reply immediately or never Batch + dice; adaptive to hot/cold scenarios
Sending Send whole paragraph One message at a time + uneven intervals and human-like flaws
Memory Pure context or external vector facts.jsonl + core.md + retrieval-based injection

Suitable Scenarios and Notes

Suitable for: Already using DSH, wanting QQ conversation to use the same agent and tool strategy as desktop/Web; need observable panel (reason for no reply, tokens, history); willing to self-host NapCat and accept non-official client risks.

Notes:

  • Plugin and DSH are same process; should review source code and MIT license before installing, and understand the QQ account and ban risk warnings (README “License · Risks” section).
  • Most likely sticking point: NapCat’s reportSelfMessage / messagePostFormat; the two disabled locks in profile; owner.qq not filled.
  • Currently npm has not been released; installation method follows README’s profile link: or tgz; do not fabricate marketplace installation commands.

Conclusion

dsh-chacha-qq brings QQ into the DSH main process: NapCat does L1 protocol, Controller manages observation and group management, the Mind layer reuses trimmed DSH capabilities, and the panel provides unified observation in the Web UI. To get it running from scratch, follow the 5 steps in README: repository self-check, NapCat double switches, profile mounting and unlocking, filling owner QQ, and acceptance using logs and probe scripts.

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

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

Xiaoye