Introduction

When developing or debugging agents with DeepSeek Harness (DSH), you often need to notify users of system status, error logs, or processing results through an instant messaging tool. Directly calling third-party IM APIs is costly to develop and may introduce security risks. This plugin provides a set of native tools that allow DSH to send private messages to a primary QQ account via a locally running NapCat bot, and also provides the ability to deploy, start/stop, and check the status of NapCat.

Plugin Overview

This plugin is maintained by wodongx123 and belongs to the “Online Tools” category. It uses locally installed NapCat (a QQ bot protocol endpoint) as a bridge to enable interoperability between DSH and the QQ ecosystem. The plugin includes 8 built-in tools covering the entire workflow from environment preparation to message sending.

Core Features

The plugin provides the following features:
* Fully automatic deployment: Downloads and guides the installation of NapCat Shell (Windows Node version).
* Background NapCat start/stop: Controls the running state of the local NapCat process.
* Check NapCat online status: Confirms service availability and the currently logged-in account.
* Send private messages to the primary account: Sends notifications via QQ.
* View and modify QQ configuration: Reads and updates the configuration file.
* Detect whether a directory is NapCat: Validates whether a specified path is a valid NapCat installation directory.
* Scan the entire machine for NapCat: Automatically discovers all local NapCat instances.

Installation and Activation

Run the following command in the DSH plugin directory to register it locally:

dsh plugin --profile web add file:<本目录>

Restart DSH after installation for the plugin to take effect.

Prerequisites:
* Operating system: Windows 10/11 x64.
* Account preparation: Prepare a logged-in bot secondary account (used for QR-code login to NapCat), and add the primary account as a friend on that secondary account.

Typical Usage

The tools provided by the plugin can be invoked with natural-language commands:

  1. Deployment and Startup

    • Help me set up QQ notifications: Invokes qq_deploy, automatically downloads NapCat Shell (Windows Node version), extracts it, applies fixes (such as --no-sandbox and pre-installing crypto.dll/ssl.dll), and guides the login process.
    • Start QQ notifications / Restart NapCat: Invokes qq_napcat, starting and stopping NapCat in the background.
  2. Status and Configuration

    • Check the QQ channel status: Invokes qq_status, returning whether NapCat is online and the currently logged-in account.
    • View the current QQ configuration: Invokes qq_config_show, displaying all configuration items.
    • Change my QQ primary account to xxx: Invokes qq_config_set, modifying configurations such as mainQq and saving them.
  3. Messaging and Detection

    • Send via QQ: xxx: Invokes qq_send, sending a private message to the primary account.
    • Check whether a directory is NapCat: Invokes qq_detect, checking the specified directory.
    • Scan all local NapCat instances: Invokes qq_find, automatically discovering all installed instances.

Configuration File

The configuration file is stored in the napcat folder under the plugin root directory, with the filename qq-notify.config.json. The main configuration items include:
* mainQq: The primary QQ account that receives notifications (empty by default; must be set).
* apiPort: The NapCat HTTP API port (default is 3002).
* napcatDir: The NapCat deployment directory (automatically detected by default).
* botQq: The bot secondary account QQ (optional).

Notes

  • QR-code login: During initial deployment or if the service is not running, you need to open NapCat’s WebUI (e.g., http://127.0.0.1:6099/webui) in a browser to scan the QR code and log in.
  • API reachability: If qq_send reports API unreachable, check whether NapCat is started and whether the apiPort port is occupied.
  • Friend relationship: Successful message sending requires that the primary account and the bot secondary account are friends with each other.