返回目录
其他 插件

dsh-evolution

lmzhen/dsh-evolution

Hermes-inspired agent self-evolution plugin family, purpose-built for DeepSeek Harness

Stars
1
Forks
0
Issues
0
更新
1 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:lmzhen/dsh-evolution

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-evolution

English | 中文

Hermes-inspired agent self-evolution for DeepSeek Harness, rebuilt around DSH's plugin seams instead of being a straight port.

本项目吸收 Hermes Agent 的 自进化经验(持久记忆、技能沉淀、后台 review、curator、usage telemetry、 写入门控),并按照 DeepSeek Harness 的 Cordis 插件架构、session events、 storage-domain 和 agent presets 重新实现。

License: MIT

[!IMPORTANT] Community-published packages under @lmzhen are maintained by the dsh-evolution community. They are not official DeepSeek releases and are not endorsed by DeepSeek.

Contents


What this plugin does

dsh-evolution gives a DeepSeek Harness agent the ability to improve itself across sessions, with a strict control boundary:

The model may write only:

  memory   durable facts, preferences, and corrections
  skills   reusable procedures and their support files

Everything else is control plane:

  policy, prompts, routing, approval, state, audit, snapshots
Capability What it does
Durable memory Bounded MEMORY.md / USER.md memory with dedup, ambiguity protection, budgets, and threat filtering
Skill sedimentation Create/edit/patch/archive skills, support files, protection markers, and snapshot restore
Background review Signal-gated, evidence-required plan generated by a one-shot subagent
Skill curator Deterministic active → stale → archived lifecycle plus optional LLM nomination
Staged approval Background writes can be staged, reviewed, approved, or rejected with audit history
Threat guard Prompt-injection, exfiltration, secret, and obfuscation patterns checked before writes
Usage telemetry Per-skill use/view/patch sidecar compatible with Hermes-style lifecycle decisions
Observability Session projections, replay/A-B scoring, feedback quality scores, and a learning graph
Capability governance Validates Creator-mode capability packages and stages them for manual activation — code is never auto-executed

Quick start

Community npm packages are published under @lmzhen only. For a published install use pnpm dsh plugin --profile web add @lmzhen/dsh-evolution-host or @lmzhen/dsh-evolution-preset.

# inside a DeepSeek Harness checkout
node packages/evolution/scripts/install-layered.mjs \
  --profile web \
  --mode oneclick

After install, restart the DSH profile. The agent now has durable memory, skill_manage, background review, curator, approval, and threat checks.

[!WARNING] Plugins run third-party code with your local permissions. Review this repository before installing, and prefer a profile without production credentials for a first test.


Why it is not just a port

Hermes keeps its evolution logic in Python modules that read and write the filesystem directly. This project uses DSH-native extension points instead:

Hermes concept dsh-evolution implementation
Memory files ctx.memory registry + memory-files provider
Skill files ctx.evolutionIo seam + SkillLibrary + native ctx.skills catalog
Usage sidecar ctx.skillUsage serialized read-modify-write queue
Background review thread turn/end signal gate + ctx.subagents one-shot child
Approval files ctx.evolutionApproval over pluggable ctx.evolutionState
Policy checks tools/pre-execute + monotonic tools.guard
Python daemon curator evolution-curator service with run reports and min-idle gating
Prompt strings Versioned PROMPT_BUNDLE with sha256 verification

Media decisions are provider seams, so memory/skills/state can move from local files to storage-domain KV or another backend without changing policy code.


Installation

1. One-click compatibility install

Install into a DSH profile as a single bundle:

node packages/evolution/scripts/install-layered.mjs \
  --profile web \
  --mode oneclick

This installs @deepseek-ai/dsh-evolution-preset: host services and model tools in one layer. Good for trying the plugin quickly.

2. Layered install (recommended)

node packages/evolution/scripts/install-layered.mjs \
  --profile web \
  --mode layered

What this installs:

profile bundle
  @deepseek-ai/dsh-evolution-host   shared infrastructure, no model tools

agent preset
  ~/.dsh/.agent-presets/evolution   standard tools + memory + skill_manage

Then select the Evolution preset for sessions that should expose self-evolution tools. Other presets still get review, curator, approval, and observability without exposing model-facing evolution tools.

3. Host-only install

node packages/evolution/scripts/install-layered.mjs \
  --profile web \
  --mode host

Use this when a deployment wants background automation and audit but wants no agent session to see memory or skill_manage.

4. Production-style install

When the bundle package is published:

dsh plugin --profile web add @deepseek-ai/dsh-evolution-host

Then copy packages/evolution/evolution-agent/ to $DSH_HOME/.agent-presets/evolution/.

5. Uninstall

node packages/evolution/scripts/install-layered.mjs \
  --profile web \
  --mode layered \
  --uninstall

Removes rows and copied packages but preserves memory, skills, state, reports, and approval history.

See packages/INSTALL.md for full details and profile override examples.


Usage scenarios

Scenario Recommended setup
One agent, full self-evolution one-click preset
Many sessions, shared evolution infrastructure host bundle + Evolution preset on selected sessions
Automation only, no model tools host-only bundle
Standard coding preset host bundle; model tools remain hidden
Anchored Standard preset host bundle; unlock memory/skill_manage with dev_tool_search
Minimal preset host bundle; services mount but the complete persona suppresses evolution prompt text
Creator mode host bundle + evolution-capability governance; code activation stays manual

How each piece works

Memory

  • The model calls the memory tool with add, replace, remove, or one atomic operations batch.
  • Entries are bounded by character budgets and are injected as a runtime snapshot while stable guidance stays in a system-prompt section.
  • Ambiguous matches and external file drift are refused instead of silently corrupting memory.

Skills

  • skill_manage supports create, edit, update, patch, delete, write_file, remove_file, and list.
  • delete is archival to .archive/, never a hard delete.
  • Every curator run snapshots the tree first and can restore it.
  • evolution-skill-catalog publishes the managed tree through the native ctx.skills registry and invalidates immediately after writes.

Background review

turn/end
  -> deterministic signal gate
  -> one-shot subagent produces a structured plan
  -> plan validator checks evidence and forbidden fields
  -> trusted executor applies accepted operations
  -> session event + projection record the outcome

The review subagent is allowed skill, skill_search, and skill_load by default so it also works under Anchored Standard presets.

Curator

usage telemetry
  -> deterministic 30/90-day transitions
  -> optional advisory LLM nominations
  -> snapshot + archive
  -> JSON run report

Governance

tools/pre-execute   threat scan
tools.guard         immutable policy denials
evolution-approval  stage -> approve/reject -> audit history
evolution-capability  validate + stage Creator packages; never execute them

Repository layout

packages/
├── evolution-host/                 host-plane infrastructure bundle
├── evolution-agent/                Evolution agent preset
├── evolution-preset/               one-click compatibility bundle
├── evolution-capability/           staged Creator-mode governance
├── evolution-io/ + io-node/        IO seam and atomic node provider
├── memory/ + memory-files/ + tool-memory/
├── skill-usage/ + tool-skill-manage/ + evolution-skill-catalog/
├── evolution-policy/               immutable policy + tools.guard
├── evolution-plan-validator/
├── evolution-state-storage/ + -domain/ + -json/ + evolution-state/
├── evolution-approval/
├── evolution-threat/
├── evolution-review/
├── evolution-curator/
├── evolution-commands/
├── evolution-activity/ + feedback/ + replay/ + learning-graph/
├── test-support/                   row contracts and anchored fixtures
└── scripts/                        layered installer

Compatibility

  • Developed against DeepSeek Harness 0.1.0-rc.5.
  • Compatible with standard, minimal, code , and Creator presets at the service level.
  • Explicitly tested against the real Anchored Standard bootstrap plugin: evolution tools stay hidden during bootstrap, remain hidden after promotion, and appear only after dev_tool_search unlocks them.
  • Review subagents default to skill, skill_search, and skill_load for Anchored Standard compatibility.

Configuration

A profile can override every stable row id. Examples:

# disable background review
- id: evolution-review
  disabled: true

# enable staged approval for foreground writes
- id: evolution-approval
  config:
    enabled: true
    stageForeground: true

# force portable JSON state
- id: evolution-state
  config:
    provider: json

# extend review tooling
- id: evolution-review
  config:
    reviewToolAllow: [skill, skill_search, skill_load, read]

Row ids are a public contract. Tests pin them and ensure the host, agent, and compatibility layers stay synchronized.


Development and tests

Inside the DeepSeek Harness monorepo:

tsc -b tsconfig.host.json --force
vitest run packages/evolution

Current gate status:

tsc     0 errors
vitest  45 files / 90 tests passing

Test families include state concurrency, memory drift and budget boundaries, skill archival fallback, approval atomicity, Anchored Standard compatibility, installer/uninstaller behavior, and profile override composition.


Safety model

  1. The model may only mutate memory and skills.
  2. Policy, prompts, routing, approval, and state are not model-writable.
  3. Capability packages are validated and staged but never executed by this plugin.
  4. Skill deletion is archival, curator runs snapshot first, and approved writes replay through their exact registered runner.
  5. Missing dependencies degrade gracefully (for example JSON state fallback when no storage-domain facility exists).

Attribution

Inspired by Hermes Agent (Nous Research, MIT). See NOTICE.

Anchored Standard compatibility fixtures are vendored from xiaobright/dsh-anchored-standard under MIT; see packages/test-support/anchored-standard/LICENSE.

License

MIT

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类其他
规则置信度

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。