DeepSeek Harness Plugin: dsh-greet-plugin

The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When developing agents or workflows, if a model requires specific tool capabilities, developers need to write plugins themselves. The dsh-greet-plugin is a minimal example plugin that registers a greet tool with the Harness, demonstrating how to write a pure JavaScript plugin.

Plugin Overview

This is a plugin maintained by imiss1314520 and licensed under MIT. It is implemented in pure JavaScript without relying on build steps, making it suitable as a starting point for developing custom tools.

Core Features

  • Registers a greet tool
  • Pure JavaScript, no build steps required
  • Configuration layer declared via package.json
  • Inserts the plugin into the composition via cordis.patch.yml

Installation and Activation

Install from GitHub using the official command:

dsh plugin --profile myprofile add github:<username>/<repo-name>

After installation, first verify that the configuration layer is active before starting the Harness:

dsh --profile myprofile --dump-config   # The output should contain the "# == dsh-greet-plugin" layer
dsh --profile myprofile

Typical Usage

Enter the following in the session:

Use the greet tool to greet Ada.

The model will call the greet tool and receive the tool result Hello, Ada!.

Composition and Implementation

The plugin consists of three core files:

  • package.json: Declares dsh.bundle.patch and runtime dependencies.
  • cordis.patch.yml: Contributes a configuration layer, inserting a plugin line into the composition, referencing this package by its package name.
  • index.js: The plugin entry point, exporting name, inject, and apply. It registers the tool via defineTool within apply.

inject = ['tools'] ensures that apply is called only after the tool registry is ready. defineTool validates arguments based on parameters, execute returns canonical values declared by output.schema, and output.render then transforms them into model-facing content.

How to Modify

To transform this into your own plugin:

  1. Change the name in package.json, for example to dsh-my-plugin. This package name is what others will use to install and reference it; it is independent of the repository name.
  2. Change the name of the plugin line in cordis.patch.yml; it must exactly match the package name above.
  3. Change the name export, tool name, parameters, and return values in index.js.
  4. If user-configurable options are needed, export a Schemastery schema as Config and write the default values within the schema.

Notes

  • Do not introduce build steps. dsh plugin add github:... pulls source code, not build artifacts: if a package requires a build, user installation will fail, and they would need to authorize it via allowBuilds in the profile’s pnpm-workspace.yaml. Keeping it pure JavaScript avoids this issue.
  • Write runtime dependencies into dependencies; when others install via git or npm, pnpm will automatically install them.
  • The plugin runs with the permissions of the current dsh process. Check the source code and license before installation.

Publishing and Discovery

  • Publish to npm: pnpm publish.
  • To help others find this plugin: add the dsh-plugin topic to the GitHub repository.
  • Plugin Directory: https://www.skillhub.cn/plugins/imiss1314520/dsh-greet-plugin
  • GitHub Repository: https://github.com/imiss1314520/dsh-greet-plugin
羽毛球分组比赛记分
小程序二维码

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

Xiaoye