dsh-plugin-hello: A Minimal Tool Plugin Example for DeepSeek Harness

Introduction

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” Developers can extend the toolchain by writing plugins, thereby enhancing model capabilities. dsh-plugin-hello is a community-maintained minimal plugin example that demonstrates how to register a model-callable tool. This plugin is suitable as an introductory reference or as a starting point for building complex toolchains.

Plugin Overview

The plugin is maintained by user xu1132, categorized under “Model Inference,” and licensed under MIT. Its core feature is to register a tool named hello into the context when Harness is loaded. The tool accepts a required string parameter name and returns a formatted greeting.

Core Features

  • Tool registration: Registers a model-callable tool named hello.
  • Input parameter: Accepts a name parameter, which is a required string specifying the greeting target.
  • Output: Returns a formatted greeting, with the default format Hello, <name>!.
  • Configuration: Supports customizing the greeting prefix via configuration; the default prefix is Hello.

Installation and Activation

Use the official command to install the plugin into the specified profile:

dsh plugin --profile demo add github:you/dsh-plugin-hello

The dsh plugin command performs pnpm operations inside the profile directory. During installation, the plugin is automatically linked to dsh.profile.bundles, and the code in the lib/ directory is built. If you use pnpm 10+, make sure the prepare build script has been added to the allowlist; otherwise, loading will fail.

Typical Usage

After installing and starting Harness, invoke the tool in the model prompt. For example, ask the model to use the hello tool to greet a user named Ada:

Use the hello tool to greet Ada.

The model will call the tool and return Hello, Ada!.

To modify the default greeting prefix, edit the cordis.patch.yml file under the profile:

- id: hello
  name: dsh-plugin-hello
  config:
    greeting: Howdy

Notes

This plugin is suitable for developers who need to quickly verify tool registration logic. When using it, note the following:
1. Invalid configuration will cause the plugin to fail to load.
2. The plugin runs with the permissions of the current DSH process; check the source code and license before installation.

Conclusion

This is a minimal plugin implementation that covers the basic workflow of registering a tool, defining parameters, returning a formatted string, and integrating the configuration layer. Understanding its source code helps master the plugin development conventions of DeepSeek Harness. For more details, see the GitHub repository.

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

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

Xiaoye