Preface¶
The DeepSeek Harness plugin is built on the Cordis extension model. For developers, directly reading the source code or understanding API details often requires a certain level of learning. dsh-learning-plugin provides a minimal example demonstrating how to register tools, declare dependencies, and configure a plugin within the Harness ecosystem.
Project Positioning¶
This is an open-source plugin maintained by fengyufengzi. It registers a tool named learning_greet with the model to demonstrate four core usages of Harness extension points: declaring service dependencies, validating deployment configuration, registering capabilities that are automatically revoked in sync with the plugin lifecycle, and deriving both parameter and output types from the same schema.
Core Features¶
- Register the
learning_greettool. - Declare service dependencies using
inject = ['tools']. - Validate deployment configuration using
Config(based on Schemastery). - Register tools using
ctx.tools.register(). - Derive types using
defineTool(). - Include a complete type-checking, testing, and release build workflow.
Environment Requirements¶
- Node.js
^22.19.0 || >=24.0.0 - Corepack
- pnpm
11.7.0 - DeepSeek Harness
0.1.0-rc.6series
Installation and Enabling¶
First, build the plugin, then install it into the web profile from the current project directory:
corepack pnpm run build
npx @deepseek-ai/dsh plugin --profile web add .
npx @deepseek-ai/dsh --profile web --dump-config
npx @deepseek-ai/dsh --profile web
After configuring dsh.bundle in package.json, DSH will automatically apply cordis.patch.yml. After startup, you can enter the following instruction in a conversation:
Use learning_greet to greet Ada.
To remove the plugin:
npx @deepseek-ai/dsh plugin --profile web remove dsh-learning-plugin
Applicable Scenarios and Notes¶
This is a learning project intended to demonstrate the Harness plugin development mechanism, not a diagnostic or production operations plugin.
Harness is currently in developer preview, and the plugin API may undergo breaking changes. Before installing and using it, confirm the current environment version and source code contents.
Summary¶
The plugin uses concrete code examples to demonstrate four key extension points in Harness plugin development. For the full source code and directory information, see the GitHub repository.