Introduction

The core design principle of DeepSeek Harness (DSH) is “everything is a plugin.” During development, tool plugins often need to be optimized through repeated experimentation. The official Harness already provides hot mounting and runtime inspection capabilities, but it lacks a closed loop for tool evolution: how to extract improvement proposals from experimental signals, validate their effectiveness, mount them for trial in the current process, and finally decide whether to solidify them on disk or roll them back.

plugin-evolve is a host-agnostic controller used to orchestrate the entire lifecycle of tool plugins, from signal to solidification. Used with DSH Bundle, it can directly mount a passing trial to the current process, allowing the model to immediately use the new tool.

Core Features

  • Tool plugin evolution: Supports end-to-end management of kind: 'tool' plugins, from signal recording to final solidification.
  • In-process hot mounting: Uses evolve_mount or the CLI mount command to directly inject a validated plugin into the current DSH process without restarting.
  • Zero runtime dependencies: Based on Node.js >= 18 and has no additional dependencies.
  • Standardized state machine: The workflow follows the order signals → analysis → abstract → stage → validate → mount → score → solidify/rollback.

Installation and Enablement

Install the plugin package via the DSH CLI:

dsh plugin --profile web add github:shinjiyu/deepseek-harness-evolver

After installation, the model will gain access to the evolve_* family of tools. You can also install it using a local path:

dsh plugin --profile web add D:\tempWorkspace\plugin-evolve

Typical Usage

The plugin uses the .evolve/ directory under the workspace root to store state, events, and candidate plugins.

Command-Line Workflow

  1. Record signals: When encountering an error (such as HTTP 429), record the signal.
    dsh --profile headless "web_fetch 连续 429。用 evolve_signal 记两次"
  1. Analyze and abstract: Review the analysis results, determine whether a proposal is needed, and generate a plugin draft.
    npx plugin-evolve analysis
    npx plugin-evolve abstract --point tool_error:web_fetch --stage
  1. Validate and mount: Validate the plugin code and mount it to the current process for testing.
    npx plugin-evolve validate
    npx plugin-evolve mount
  1. Score and solidify: Run multiple tests using the new tool, then solidify the plugin if the score passes.
    # 模型侧或手动执行
    npx plugin-evolve score --samples 10 --success-delta 2 --retry-delta -1
    npx plugin-evolve solidify --confirm

Codebase Workflow

import { createController } from "plugin-evolve";

const evolve = createController({ root: process.cwd() });
await evolve.init();

// 1. 记录信号并分析
const advice = await evolve.recordSignals([
  { kind: "tool_error", payload: { tool: "bash" } },
]);
const report = await evolve.analysis();

// 2. 如果有准备好的提案点,进行抽象和阶段化
if (report.ready.length > 0) {
  const draft = await evolve.abstract();
  await evolve.stage({
    manifest: draft.manifest,
    files: { "plugin.js": draft.source },
    signalKind: draft.signalKind,
  });
}

// 3. 验证、挂载并加载
await evolve.validate();
await evolve.mount();

// 4. 下一个进程使用新工具
const { evolved, trial } = await evolve.loadout();
for (const plugin of [...evolved, trial].filter(Boolean)) {
  await import(plugin.entryPath);
}

// 5. 打分与固化
await evolve.score({ samples: 10, successDelta: 2, retryDelta: -1 });
await evolve.solidify({ confirm: true });

Use Cases and Limitations

Use Cases

  • You need to create dedicated tool plugins for specific error signals, such as 429 retries.
  • Developers want to manually control the pace of evolution and activate plugins only after validating their logic.

Limitations and Security Policies

The plugin imposes strict sandbox restrictions on authoring candidate plugins:

  • Type restriction: Only kind: 'tool' is allowed, and the allowed inject value is ['tools'].
  • Runtime permissions: network and shell must be false.
  • File size: Generated plugin files must not exceed 32 KiB.
  • Forbidden modules and IDs: Do not use fs, net, http, child_process, eval, or new Function; IDs must not contain session, loader, agent-loop, evolve, controller, or plugin-evolve.

Scoring and Stall Mechanism

  • Score pass conditions: sample count >= 10, successDelta > 0, and retryDelta <= 0.
  • Manual confirmation: The first 3 solidify operations must set confirm: true.
  • Stall handling: After 3 consecutive failures for the same signalKind, stop stage operations for that signal.

Essential Design Notes

It is not an “automatic evolution” tool and will not automatically modify agent-loop, session, or loader. It only assists developers in generating and validating tool plugin drafts; it does not replace changes to business or engineering logic.

Conclusion

plugin-evolve completes the “trial-validation-solidification” closed loop in DSH plugin development. By standardizing and securing the trial process, developers can more confidently experiment with new tool implementations in the Harness.