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 foundry service: Any plugin can call ctx.get('foundry') and continue the recipe by calling registerBlueprint(...).
  • Provides three model tools: foundry_blueprints, foundry_scaffold, and foundry_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/state route 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.

  1. Edit $DSH_HOME/profiles/web/package.json, adding "dsh-foundry": "link:/绝对路径/dsh-foundry" to dependencies and adding "dsh-foundry" to the dsh.profile.bundles array:
"dsh-foundry": "link:/绝对路径/dsh-foundry"
"dsh-foundry"
  1. Install dependencies in the profile directory:
cd $DSH_HOME/profiles/web && pnpm install
  1. After installation, run the configuration check to confirm the # == dsh-foundry layer appears:
dsh --profile web --dump-config

Typical Usage

The minimal workflow is as follows:

  1. Call foundry_blueprints, which returns 9 blueprints with fields including id, name, category, description, and params.

  2. Call foundry_scaffold to generate code:

foundry_scaffold {
  blueprint: 'host-tool',
  params: { toolName: 'hello', toolDescription: 'say hi' }
}

This step returns code.host that can be pasted.

  1. Hand the returned code.host to cordis_define and cordis_run to bring the model tool named hello online.

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.