Introduction¶
DeepSeek Harness (dsh) decomposes capabilities into plugins that are loaded at runtime by Cordis. When building actual agents, requirements often look like “this time I need web search, next time Markdown writing, and the time after that an extra MCP step”—if you manually add and remove plugins in the profile every time, the list grows uncontrollably and ends up misaligned with the current task.
A more natural direction is to let the Agent select capabilities from registered plugins at runtime based on the task description, and load them as needed. The challenge is: when mixing third-party plugins with official packages, what gets loaded and whether it has been audited must not be silently decided by the model. The following introduces the community plugin dsh-plugin-dynamic-assembler (maintainer QLM1234, catalog category admin-security), which uses natural language to drive “discover → plan → confirm → load”, and performs static auditing and user confirmation for non-official plugins.
What Is This¶
dsh-plugin-dynamic-assembler is a “dynamic assembly” plugin for dsh: the Agent describes the capabilities it wants to build in plain language, and the plugin traverses ctx.registry at runtime to discover available plugins, generates an assembly plan, and loads them through Cordis after your confirmation; plugins not under @deepseek-ai/* go through a built-in static security audit before loading. The npm package name matches the repository, and the GitHub repo is QLM1234/dsh-plugin-dynamic-assembler.
Core Features¶
Runtime Discovery and Official Priority¶
Available plugins are read from ctx.registry, with no hardcoded list maintained. When matching capabilities, @deepseek-ai/* takes priority; third-party plugins are only considered when no official plugin matches (and must be explicitly listed in the plan).
User Confirmation and Unofficial Policy¶
Third-party plugins are not loaded silently by default. The config option unofficialPolicy can be ask (default), allow, or deny. When executing a load, non-official plugins typically require allow_unofficial; sensitive operations involving network, filesystem, shell, subagent, MCP, code, credentials, etc. require explicit confirmations such as confirm_sensitive.
Static Security Audit¶
The tool assemble_inspect performs a static scan on plugin packages: metadata (scope, license, repository, install/postinstall scripts, peer dependencies, etc.) and dangerous patterns in source code (such as eval, child_process, hardcoded secrets, etc.). The score starts at 100 and deductions are applied, categorized as green (≥80), yellow (≥60), and red (<60); red plugins are denied loading by default, and can only be overridden with force in high-risk scenarios. The README explicitly states: static auditing is a risk signal, not a security guarantee; plugins run with Node process privileges, and malicious code may bypass regex scans.
Tool Overview¶
Besides the audit above, the plugin also provides (8 tools listed in the README):
| Tool | Purpose |
|---|---|
assemble_discover |
Discover available plugins and capabilities in the current environment |
assemble_plan |
Generate a plan based on natural language requirements (no loading) |
assemble_execute |
Load and start according to the plan via Cordis |
assemble_unload |
Unload everything dynamically loaded by this plugin (rollback) |
assemble_freeze |
Freeze the current assembly state (see repo docs) |
assemble_auto |
Automated assembly workflow (see repo docs) |
assemble_compare |
Compare similar plugins (including audit columns, etc.; see CHANGELOG for version evolution) |
Intent-to-capability mapping lives in the source code CAPABILITY_RULES (src/dynamic-assembler.ts), supporting Chinese and English keywords; unloaded official plugins can be dynamically imported by the conventional name @deepseek-ai/dsh-<name>.
Unload and Lifecycle¶
When the plugin is unloaded, it cascades disposal of everything it dynamically loaded, aligning with Cordis’s temporal composability.
Installation and Activation¶
Installing from npm is recommended; dsh auto-discovers it, no local path needed:
npm i dsh-plugin-dynamic-assembler
If managed via dsh profile, you can use:
pnpm dsh plugin --profile web add dsh-plugin-dynamic-assembler
After installation, restart the Web service, e.g.:
pnpm dsh web
Runtime requirement: Node.js >= 22 (see package.json engines). License: MIT.
Optional Configuration¶
When adding entries to the profile’s cordis.patch.yml, they must be wrapped under - insert::
- insert:
- id: dynamic-assembler
name: dsh-plugin-dynamic-assembler
config:
denyList: [] # substrings of capability names that should never be assembled
unofficialPolicy: ask # ask | allow | deny
pluginSources: [] # not-yet-loaded third-party: npm package names or local directories
Not-yet-loaded third-party plugins can be declared via pluginSources, e.g. an npm package name or /path/to/local-plugin. Plugins already loaded in Cordis (official or third-party) are auto-discovered without extra configuration.
Typical Usage¶
Conversation example from the README: the user wants “to search the web and write the results into a Markdown document”.
-
The model calls
assemble_plan, passingrequirement(natural language requirement). The plugin discovers loaded plugins at runtime, matches capabilities with official priority, and returns a plan and recommended order; no new plugin is loaded yet. -
After user confirmation, the model calls
assemble_execute, e.g. passing the plugin names from the plan, withconfirm: true,confirm_sensitive: true,allow_unofficial: false(keep false if the plan contains no third-party plugins). Already-loaded plugins are activated; unloaded official plugins are dynamically imported by convention. -
To roll back, call
assemble_unload(), which cleans up everything dynamically loaded by this plugin.
To audit a single package separately, use assemble_inspect with the plugin parameter; for community packages published only on GitHub Releases and not on npm, you can pass the optional github_repo parameter (owner/repo) to audit release artifacts (capability since v0.3.6, see README).
Use Cases and Caveats¶
Who it’s for: developers or teams already using dsh who want the Agent to assemble toolchains on demand per task, while ensuring third-party plugins must go through auditing and confirmation. It aligns with the “spatiotemporal composable, self-evolving harness” verification scenarios in the DeepSeek paper direction, but the implementation and maintenance live in a community repository, not in the DeepSeek official app store; the plugin catalog entry is at SkillHub.
Important caveats:
- The plugin shares the current dsh process’s Node privileges with any dsh plugin it loads; review the source code, license, and release source yourself before installing.
- Static auditing cannot replace trust boundaries; only install from sources you trust, and stay alert to third-party plugins.
denyListcan be used to forbid assembling certain capability-name substrings, reducing the risk of accidental installations.
Local development and regression testing (maintainer workflow):
npm install
npm test
The audit engine lives in src/inspect.ts, decoupled from Cordis, making unit testing easy.
Conclusion¶
dsh-plugin-dynamic-assembler turns “describe desired capabilities in natural language → runtime discovery and planning → confirmed loading → anytime unload” into an actionable workflow, and grounds admin-security requirements in the unofficial policy and assemble_inspect scoring. If you want on-demand toolchains in dsh rather than a static pile of plugins, install from npm and configure unofficialPolicy and pluginSources in your profile as needed.
- Catalog page: https://www.skillhub.cn/plugins/QLM1234/dsh-plugin-dynamic-assembler
- GitHub: https://github.com/QLM1234/dsh-plugin-dynamic-assembler