Introduction¶
DeepSeek Harness (DSH) is a developer-facing foundation. As model capabilities evolve, models will develop “metacognition,” enabling them to introspect and analyze themselves. Within limited context, traditional harnesses (including DSH) typically passively compress context after exceeding a threshold, with no model intervention. DSH’s design direction is to align with model metacognition, making it easy for models to edit their own context and add or remove tools for themselves. dsh-tools-meta is a concrete implementation of this direction, turning “adding and removing tools for itself” into actions that a model can invoke directly.
Plugin Purpose¶
Name: dsh-tools-meta
Core value: Allows an agent to dynamically add and remove tools for itself within DSH. Newly added tools persist across DSH restarts.
Maintainer: DViridescent
Core Features¶
- Dynamic tool management: Allows an agent to dynamically add and remove tools for itself within DSH.
- Persistence: Newly added tools persist across DSH restarts.
- Writable asset: The tool directory is a writable asset owned by the model.
- More direct than Skills: Once a tool is registered, it enters the directory; invoking it does not require “reading a skill + running a script in bash” — a single tool call reaches it directly.
- Reuse of existing capabilities: Adding and removing tools fully reuses the model’s existing file tools, with zero new tools added.
- Simple implementation: Around 200 lines of code.
- Introspectable: The agent can read the source code directly and even understand or modify the plugin itself.
Installation and Activation¶
Add this plugin using DSH’s plugin installation command.
dsh plugin --profile <name> add dsh-tools-meta
Usage¶
The plugin is used together with a short skill and does not add extra model tools.
1. Tool Directory and Registration¶
- Directory location:
$DSH_HOME/tools-meta/<name>.ts. TS module; tool name = function name = file name. - Registration mechanism: The plugin scans this directory before each model step. When the directory fingerprint changes, registration is rebuilt: new entries are registered automatically, modifications are hot-updated, and deletions unload the tools.
2. Skill Guidance¶
The meta-tools skill is registered at runtime. Its content injects the absolute paths of the tool directory and the plugin source code, directing the model to write, modify, or delete scripts as instructed.
3. Script Format¶
Tool scripts generated by the model must conform to the following format:
export const description = '一句话:工具做什么、何时用。'
export const parameters = { text: { type: 'string', required: true, description: '参数说明。' } } // 可选
export const output = { type: 'object', additionalProperties: false, properties: { characters: { type: 'integer', required: true } } } // 可选
export async function <name>(input) { return { /* lossless JSON */ } }
4. Constraints¶
- Only erasable TypeScript syntax is allowed.
- No side effects at the top level.
- All paths must be absolute.
Dependencies and Requirements¶
- Host services:
tools,subprocess(available by default in the web profile). - Optional dependency:
skills(the skill is registered if present). - Node version: ≥ 22.18 (supports native
.tstype stripping).
Use Cases and Notes¶
This plugin is suitable for agents that need to implement “self-evolution” capabilities. As a writable asset of the model, the tool directory represents the minimal form of continuous learning on the harness side.
Notes:
* The plugin runs with the permissions of the current DSH process; ensure write access to the target directory.
* Before installing, it is recommended to read the source code and license (MIT).
Conclusion¶
dsh-tools-meta provides a mechanism for models to control their own capabilities. Through simple TS scripts, models can distill learned knowledge into reusable tools, bridging the leap from “using tools” to “creating tools”.
Related Links:
* Plugin catalog page
* GitHub repository