Introduction¶
When developing plugins in DeepSeek Harness (DSH), you often have to handle runtime contracts, parameter descriptions, code generation, and static validation. dsh-foundry provides a bootstrapping “everything is a plugin” compiler for this process: it is itself a DSH plugin used to develop plugins and can be extended by other plugins.
What is it¶
dsh-foundry is a DSH plugin. It solidifies DSH plugin runtime contracts into blueprints, supports one-click compilation of host/browser code that can be directly cordis_defined, and performs static validation before definition.
GitHub Repository: https://github.com/hellosky983/dsh-foundry. License: MIT.
Core Capabilities¶
- Provides a
foundryservice: Any plugin can callctx.get('foundry')and continue the recipe by callingregisterBlueprint(...). - Provides three model tools:
foundry_blueprints,foundry_scaffold, andfoundry_validate. - Includes nine built-in blueprints: covering Host/Client/RPC/Events/Services/Timers/System Prompts/Skills/File Tools.
- Provides a read-only blueprint gallery page in Settings.
- Registers a read-only
GET /foundry/stateroute that returns blueprint directory metadata.
Installation and Activation¶
Use the manual link method during installation; do not use dsh plugin --profile web add ./dsh-foundry.
- Edit
$DSH_HOME/profiles/web/package.json, adding"dsh-foundry": "link:/绝对路径/dsh-foundry"todependenciesand adding"dsh-foundry"to thedsh.profile.bundlesarray:
"dsh-foundry": "link:/绝对路径/dsh-foundry"
"dsh-foundry"
- Install dependencies in the profile directory:
cd $DSH_HOME/profiles/web && pnpm install
- After installation, run the configuration check to confirm the
# == dsh-foundrylayer appears:
dsh --profile web --dump-config
Typical Usage¶
The minimal workflow is as follows:
-
Call
foundry_blueprints, which returns 9 blueprints with fields includingid,name,category,description, andparams. -
Call
foundry_scaffoldto generate code:
foundry_scaffold {
blueprint: 'host-tool',
params: { toolName: 'hello', toolDescription: 'say hi' }
}
This step returns code.host that can be pasted.
- Hand the returned
code.hosttocordis_defineandcordis_runto bring the model tool namedhelloonline.
When extending a recipe, get ctx.get('foundry') inside any plugin and call foundry.registerBlueprint(...) to register a new recipe, for example using id: 'my-recipe'.
Data, Permissions, and Compatibility¶
This plugin has no configuration items, no environment variables, and no sensitive information. Blueprint parameters have built-in default values, such as host-tool.toolName defaulting to my_tool.
The dsh-foundry core does not read or write any files. The fs-file-tool blueprint generates host file read/write tools, but that is a plugin deployed later on its own, not behavior of the dsh-foundry core.
Regarding networking, it only registers the GET /foundry/state route in the DSH local web service (loopback address), returning blueprint directory metadata. It does not access, read, or upload any credentials or user data.
Compatible with DSH 0.1.0-rc.6 and @deepseek-ai/dsh-tools ^0.1.0-rc.6. The last verification date is 2026-08-15. A smoke test is required if there are significant version differences.
Suitable Scenarios and Notes¶
Suitable for developers who write plugins using DSH and need to extend recipes or generate runtime tools.
You should check the source code and license before installing. This plugin runs with the permissions of the current dsh process and should only be enabled in profiles you trust.
The defineTool parameter of the official bundle must be a property-by-property DSL and cannot use the { type: 'object', properties } wrapper style.
If you discover a security issue, please report it via a private channel; do not disclose it publicly.
Conclusion¶
The value of dsh-foundry lies in centralizing contracts, scaffolding, and validation within a single service, making plugin extension more direct.
GitHub Repository: https://github.com/hellosky983/dsh-foundry.