Preface¶
The core philosophy of DeepSeek Harness (DSH) is “Everything is a plugin.” When integrating DSH with the QQ platform, a component capable of handling the OneBot v11 protocol is required. dsh-onebot-hub is the plugin designed for this purpose: it acts as a central hub at the protocol layer, connecting upstream to implementations like NapCat, LLOneBot, or Lagrange, while providing services downstream to NoneBot or other OneBot implementations. Simultaneously, it provides the DSH agent with a full message stream, operation logs, and 28 specialized tools.
Plugin Overview¶
- Name:
dsh-onebot-hub - Author: Funny1Potato
- Category: Workflow
- Functional Positioning: A OneBot v11 protocol hub for DeepSeek Harness, acting as both the protocol upstream for downstream bots and an intelligent agent within group chats.
Core Features¶
This plugin provides the following core capabilities:
- Verbatim Event Forwarding: Forwards QQ events verbatim to downstream bots without synthesis or rewriting, ensuring downstream plugin compatibility.
- Full Observability & Tools: Provides the agent with a complete timeline and operation ledger, and exposes 28
onebot_*tools, enabling the agent to view history, manage sessions, control downstream services, and retrieve memories. - Multi-mode Support: Supports three operation modes: Upstream (upstream listening/dialing), Downstream (downstream service/dialing), and Observer.
- Memory Isolation: Offers three levels of memory isolation—strict, scoped, and balanced—to control data visibility across sessions.
- Management & Assistance: Built-in 13 management commands (e.g.,
help,status,memes), supporting meme libraries and image generation features.
Installation and Activation¶
The plugin has been published to npm, and the installation process is completed via DSH’s plugin manager.
1. Install the Plugin
Execute the following command to install the plugin into a specific profile (replace <your_profile> with the actual name, such as desktop):
dsh plugin --profile <your_profile> add dsh-onebot-hub
2. Restart DSH
You need to restart DSH after installation to load the plugin. The plugin package declares a dsh.bundle, which is usually automatically merged into the plugin’s plugin layer without requiring manual modification of cordis.patch.yml. If it is not automatically merged in certain versions, you can manually append the configuration before restarting.
Configuration and Usage¶
After installing the plugin, you need to configure network connections and operation modes.
1. Basic Connection Configuration
At a minimum, two items need to be configured:
upstreamListenorupstreamUrl: Specifies the connection method for the upstream OneBot implementation. It is recommended to useupstreamListento let the upstream reverse-connect to the hub, or simply fill inupstreamUrl.downstreamTargets: A list of downstream targets as a JSON array. Supports four connection methods:ws-dial,ws-listen,http-api, andhttp-post. If you only intend to use it for yourself without connecting downstream, you can leave this empty.
2. Session and Permission Control
* Whitelist: Use agent.groups and agent.privates to set the list of allowed group chats and private chats. Sessions not listed will not even respond to an @ mention.
* Quota Management: Use /quota to view and reset usage limits; supports setting quotas per group.
* Command Permissions: Permissions for management commands (e.g., help, status) are controlled by chatCommands.superUsers. If left empty, the entire command chain remains silent.
3. Common Commands
Once installed and configured, you can manage it via the following commands:
* /status: Check hub status, timeline, and uptime.
* /quota: View and reset quotas for the current group or private chat.
* /help: List all available commands.
Behavior Notes¶
Understanding the plugin’s behavior is crucial for correct usage:
- Default Silence: The default behavior is very quiet; it is only awakened when
@-ed, quoted, or in a private chat. - Draft Mechanism: The agent’s ordinary reply text serves only as an internal draft; messages are actually sent only when
onebot_replyis invoked. - Downstream Mutex: If a downstream bot has already replied to a message, the agent will not interject again to prevent duplicate replies.
- Probe Testing: When testing downstream connections, setting
probe.isolationtolink(default) ortimeensures messages are sent via a separate probe account and do not interfere with real user sessions. - Permission Validity: Permissions modified via commands (such as
perm) are valid only for the current awakened session and automatically revert to default upon the next awakening.
Tool Interface¶
The plugin provides 28 onebot_* tools for the agent. These tools are mounted within the agent session’s scope and are used to operate the pipeline, query context, manage memories, and control downstream services.
Main tool categories include:
* Messaging: onebot_reply
* Links & Messages: onebot_hub_status, onebot_timeline, onebot_turns, onebot_raw
* People & Groups: onebot_profile, onebot_group, onebot_members
* Memory: onebot_memory, onebot_person, onebot_topic
* Downstream Control: onebot_invoke, onebot_relay_probe, onebot_capabilities
Directory & Source Code¶
- Skill Directory: dsh-onebot-hub
- GitHub Repository: Funny1Potato/dsh-onebot-hub