Introduction

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” If you need to extend Harness functionality, you typically have to build from scratch: author a package.json to declare package information, configure cordis.patch.yml to define the patch layer, write plugin logic code, and prepare test cases. Much of this involves boilerplate.

dsh-plugin-kit is a tested, minimal installation template. It is a real DSH plugin and also an installable package. It bundles the plugin body with its configuration layer, directly resolving the tedious task of building a functional plugin from scratch.

Plugin Overview

  • Positioning: Minimal usable functional plugin template for DeepSeek Harness.
  • Author: jwilson411.
  • License: MIT.
  • Core mechanism: Installed as a profile bundle layer and mounts the plugin.

Core Capabilities

The template registers a tool kit_ping for checking plugin status.

  1. Tool name: kit_ping.
  2. Functionality: Liveness check; no network requests and no API Key required.
  3. Parameters:
    • who: String type, required.
  4. Return value:
    • An object containing message, greeted, and plugin.

Installation and Activation

Before installing, ensure the environment meets the following requirements:

  • Node.js version >= 22.14.0
  • DSH version 0.1.1-rc.2 (the package was written and tested against this version)

Installation command:

dsh plugin --profile web add github:jwilson411/dsh-plugin-kit

After successful installation, the plugin is appended to the configuration as a profile bundle layer. You can verify that the configuration takes effect with:

dsh --dump-config

To remove it, replace add with remove.

Architecture and Configuration

The project structure of dsh-plugin-kit is very concise and includes the following core files:

  • package.json: Declares package information and dsh.bundle.patch, which is the key to recognizing it as a bundle layer.
  • cordis.patch.yml: Defines the patch layer used to mount the plugin.
  • src/index.js: Main plugin logic, defining tool registration.
  • test/: Offline test suite that can run without network access.

Key Configuration Notes

Manifest Declaration

In package.json, the dsh.bundle.patch field must be declared so the installer treats it as a bundle layer:

"dsh": {
  "bundle": {
    "patch": "./cordis.patch.yml"
  }
}

Patch Layer

cordis.patch.yml is a YAML array used to insert or replace entries in the configuration tree. The template registers the plugin using an id:

- insert:
    - id: plugin-kit
      name: dsh-plugin-kit

Plugin Code

The plugin defines a tool with defineTool and declares a hard dependency on the tool system using inject: ['tools']. The tool logic is registered in the apply function, and the dispose returned by the registry automatically manages the lifecycle.

import { defineTool } from '@deepseek-ai/dsh-tools'

export const name = 'plugin-kit'
export const inject = ['tools']

export function apply(ctx) {
  ctx.tools.register(createKitPingTool())
}

Customization and Development

To develop your own plugin based on this template, follow these main steps:

  1. Rename: Change the name in package.json and the name in cordis.patch.yml.
  2. Change the ID: Modify the id in cordis.patch.yml, and update the exported name in src/index.js.
  3. Replace the tool: Edit the schema, description, and execution logic of kit_ping.
  4. Keep tests valid: Ensure test cases cover the contracts you actually export.

References

  • GitHub Repository: https://github.com/jwilson411/dsh-plugin-kit
  • Community Directory: https://www.skillhub.cn/plugins/jwilson411/dsh-plugin-kit