DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Continual Harness — DeepSeek Harness 插件(DSH Plugin)
← Plugins

dsh-continual-harness

Continual Harness

独立的 DeepSeek Harness 插件:持续进行 harness 自我演化。该代理通过基于证据的小幅编辑,持久化并完善可复用的提示词笔记、记忆、技能契约和子代理规范,并提供自动优化门控、回滚和 p

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-continual-harness@0.3.1
README兼容性版本

兼容性与来源证明

Continual Harness 以 dsh-continual-harness 发布,当前版本为 0.3.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/9/20

版本

0.3.1stable
2026/9/10
0.3.0stable
2026/8/30
0.2.2
stable
2026/8/27
查看其余 9 个版本收起版本
0.2.1stable
2026/8/24
0.2.0stable
2026/8/24
0.1.6stable
2026/8/20
0.1.5stable
2026/8/19
0.1.4stable
2026/8/19
0.1.3stable
2026/8/18
0.1.2stable
2026/8/18
0.1.1stable
2026/8/18
0.1.0stable
2026/8/18

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Memory Plugin@openviking/dsh-memory-plugin适用于 DeepSeek Harness 的 OpenViking 记忆与上下文套件Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Weknora@wxg-prc-cpg/dsh-weknora适用于 DeepSeek Harness (dsh) 的 WeKnora 知识检索工具:通过自有知识库进行语义搜索、文档阅读以及 RAG/代理回答。Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。
最新版
0.3.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
644.2 kB
文件数
129
Surface
any
许可证
MIT
发布源
npm
GitHub
★ 9
周下载
199
安全扫描
✓ v0.3.1 扫描通过
最近提交
2026/9/10
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

README

dsh-continual-harness

English | 中文

A DeepSeek Harness (DSH) plugin for self-improving AI agents, providing continual learning through persistent memory, periodic review and refinement, cross-session knowledge sharing, and automatic rollback on failure. It forms a closed loop of plan → validate → apply → rollback.

The design is inspired by the open-source prime-agent from Prime Intellect, a self-improving coding harness.

Capabilities

A single npm package (dsh-continual-harness) takes effect through the following extension points once mounted:

CapabilityMechanism
State projection (inject harness context each step)agent/pre-step waterfall listener; incremental injection when the content digest changes
Review and automatic refinementsession/event listener on turn interval / compaction end; runs LLM review → plan → apply automatically
Manual refinement toolRegisters the harness_refine tool (directly callable by the LLM, supports rollback)
Manual refinement commandOptional /refine slash command, registered through the host commands capability (@deepseek-ai/dsh-commands) when present
Memory lifecycleManual archive/unarchive/pin through refinement metadata; archived entries are hidden from injection and skill materialization
Ranked injectionQueries the latest effective direct-user message (up to 400 chars), ranks title matches above content matches, then applies freshness/id tie-breaks and a per-kind cap
Session wrap-upOptional harness_wrapup tool gives mechanical keep/promote/archive advice; promotion is copy-only and conflicts return a deterministic error
In-session review trajectoryRebuilt from session logs (tail-biased truncation)
Invariant guardharness/refinement event validation + batched failure reporting
Explicit A/B benchmarkSingle harness_benchmark action tool: fixed frozen cases, pre-refinement reference snapshots, and same-round reference/candidate A/B runs with code-owned decisions

Architecture

src/
  domain.ts      event declaration merging (SessionEventMap / MessageSourceMap / cordis Events)
  types.ts       HarnessState / RefinementProposal / RefinementResult and other types
  storage.ts     disk read/write of state and history (atomic writes, corruption degradation, local/global merge, jsonl history)
  refine.ts      validation, application, rollback (baseline conflict detection, version increments, growth limit)
  skills.ts      SKILL.md rendering + file reconciliation (generated skills are real dsh skills)
  render.ts      model-facing overview / summary / history rendering (ranked injection)
  usage.ts       injection telemetry keys and in-memory usage aggregation
  wrapup.ts      deterministic session wrap-up suggestions (keep/promote/archive)
  planner.ts     LLM planning prompts and JSON parsing (plan / auto-refine review prompts)
  store.ts       HarnessStore: combined storage + event publishing (session events + agent-scoped events)
  complete.ts    completeViaAgent: completion through ctx.get('llm')
  benchmark.ts   benchmark cases/snapshots + atomic benchmark store persistence
  evaluate.ts    isolated per-cell executor/reviewer evaluation (evidence + score)
  score.ts       code-owned aggregation and ACCEPTED/REJECTED decisions
  tool.ts        harness_refine / harness_wrapup / harness_benchmark tools
  projection.ts  pre-step projection (digest dedup, <harness_state> injection)
  driver.ts      automatic refinement driver (turn-interval gate / compaction gate / cooldown / re-entry guard)
  invariant.ts   runtime invariant plugin
  index.ts       plugin entry and Config
tests/           23 test files, 287 cases (storage / store / refine / rules / planner / driver / approval / audit / logfile / skills / invariant / plugin integration / rank / projection / archive / usage / wrapup / benchmark / evaluate / score / isolation / tool / benchmark integration)

Data layout

<harnessRoot>/                      shared ESP experience root; defaults to ~/.dsh/harness/
  harness_state.json                cross-session global state (ESP)
  refinements.jsonl                 global refinement history (append-only, ESP)
  reviews.jsonl                     cross-batch gate/audit history (ESP extension)
  continual-harness.log             continual-harness implementation log (JSONL, 0600)
  continual-harness.log.1           rotated continual-harness log
  usage.events.jsonl                append-only injection telemetry (lazily loaded into memory on first access)
  benchmark/                        explicit benchmark store (validation layer)
    cases.json                      fixed benchmark cases (draft/frozen + frozen material hashes)
    snapshots/<snapshotId>.json     captured reference snapshots (read-only merged harness state)
    runs.jsonl                      append-only A/B run records (cells + evidence + code-owned decision)
  sessions/<sessionKey>/
    harness_state.json              session-local state (shadows same-id global entries)
    refinements.jsonl               session refinement history
  • Skills are real dsh skills: applied skill edits materialize as <name>/SKILL.md bundles (with provenance metadata) under Config.skillsDir, kept in sync by deletes/rollbacks without touching user-owned skills in the same directory.

Experience Solidification Protocol (ESP)

The Experience Solidification Protocol (ESP) is the protocol surface of this capability set, decoupled from this package's implementation:

Protocol elementCarrierDescription
Experience state schemaharness_state.json (schemaVersion: 1)Four kinds of entries — prompt / memory / skill / subagent — each with id / kind / version / content / updatedAt
Experience historyrefinements.jsonl (append-only)One RefinementResult record per apply/rollback; rollback by id
Refinement eventsession event harness/refinement (retired)Written on apply/rollback by builds up to 0.3.0; this build never appends it and keeps only its payload type declared for legacy compatibility
Refinement notificationagent event harness/refinedPayload {agent, result}; subscribable by invariant and other plugins
Experience injectionmessage source plugin (form: instructions, digest in the content marker)Pre-injected into the model context; deduplicated by digest change. The retired harness-state kind is still recognized so old logs replace their block instead of duplicating it

Any dsh plugin can read and write experience through this protocol (write state files, append history, publish events, inject messages); this package is the protocol's reference implementation and primary consumer (planning / refinement / projection / automatic gate).

Mounting (dsh profile)

Install into a profile in one line (published to npm):

dsh plugin --profile <name> add dsh-continual-harness

The package declares dsh.bundle, so dsh plugin installs it as a profile layer and applies its cordis.patch.yml. Update with dsh plugin --profile <name> update dsh-continual-harness@latest.

Manual overlay (before publish, or to pin a local checkout): apply cordis.patch.yml onto the profile, e.g. ~/.dsh/profiles/<name>/cordis.patch.yml; a patch layer must be a top-level YAML array (insert rows append plugin entries; id-targeted rows override an existing row):

- insert:
    - id: continual-harness
      name: dsh-continual-harness
      config:
        defaultGlobal: true

Prerequisites: the tools, agents, session, llm, systemPrompt capability plugins must load before this plugin (its inject declaration enforces that; mounting is deferred until they load).

dsh version compatibility

Verified against dsh 0.1.2-alpha.3; peer floors stay >=0.1.0-rc.6, so older dsh releases keep working. Since dsh 0.1.2-alpha.3 no longer provides @deepseek-ai/dsh-home-paths inside the profile bundle, the plugin declares it as a hard dependency; @deepseek-ai/dsh-invariants is used for types only (dev-time) and is not required at runtime.

Config

FieldDefaultDescription
harnessRootdsh data dir harness/State root directory (temporary dir in tests)
skillsDir$DSH_HOME/skillsDirectory where skill entries materialize as dsh SKILL.md bundles (dsh's user skill root)
defaultGlobalrequiredTarget scope when the tool call omits global
maxTrajectoryChars12000Max characters of the planning trajectory (two-layer signal + digest summary; plannerPrefixCache-route dependent)
plannerMaxTokens32000Max tokens for the planner LLM call
plannerPrefixCacheautoPlanning input route: auto (Route A warm session prefix when the session shows cacheReadTokens > 0, falling back to Route B on a truncated reply), session (always Route A), off (always Route B summary)
plannerPrefixMaxChars12000Tail-biased character cap for the Route A session prefix (deriveMessages text)
trajectorySignalRatio0.5Fraction of the Route B trajectory budget kept verbatim (signal layer) vs digested
autoRefine{turnInterval: 25, compact: true, cooldownMs: 1200000}Auto-refine: turn-interval gate, compaction-end gate, cooldown, disable switch
requireGlobalApprovalfalseRequire explicit human approval before a global write commits (conservative mode)
maxInjectedEntriesPerKind6Positive-integer cap (step 1, minimum 1) for ranked injected entries per kind
wrapupEnabledtrueRegister the optional harness_wrapup session wrap-up tool
diagnosticsEnabledtrueRun post-apply structural diagnostics after each committed refinement

Refining

Two entry points: the harness_refine tool (LLM-callable) and the /refine slash command (when the host provides a commands capability).

harness_refine — mode: 'plan' (default) plans from instructions and commits atomically; mode: 'rollback' takes a rollbackId plus an explicit --local / --global scope to revert a committed refinement. Global writes require human approval when requireGlobalApproval is true.

/refine — same semantics, human-typed:

/refine --local organize my memories
/refine --global <instructions>
/refine rollback <id> --local
/refine rollback <id> --global

Bare /refine plans with no instructions in the default scope. Output: status, scope, refinement, applied, rejected, summary, plus a diagnostics: line when enabled.

Governance

Every write path funnels through three guardrails: impact minimization (fixed contract validation; update/delete require a one-line reason; maxEntryGrowth caps per-commit growth), legality hard rejects (base_system_prompt and protected entries are immutable; global entries are read-only during a local refinement), and a necessity soft gate (a declined review never reaches the store). Every committed refinement rolls back by id.

Global writes are zero-approval by default; set requireGlobalApproval: true to ask the user first. Watch the plugin log live with:

tail -f ~/.dsh/harness/continual-harness.log

Benchmark

The validation layer is explicit and single-entry: one harness_benchmark action tool drives the whole workflow and never auto-triggers a refinement — nothing in the benchmark path starts a harness_refine or the automatic gate, and a REJECTED decision is reported and recorded only, never rolled back. The store lives under <harnessRoot>/benchmark/ (see the data layout above).

The minimal sequence is new → add-case → freeze → capture-reference → apply refinement → run → status (frozen case material is immutable and hashed; status lists cases, snapshots, and recent runs). Two steps carry real subtleties:

  • capture-reference must run BEFORE the refinement you want to validate: the candidate is later derived as the captured reference plus exactly that refinement, so capturing after the change would make the delta unprovable.
  • run evaluates the named refinement A/B against the reference (reference_snapshot_id + refinement_id). The candidate must be the single specified delta — derived from the reference plus the refinement's recorded applied edits and proved in code before any evaluation; a drifted or multi-change candidate is refused (benchmark:run:candidate-delta). Both sides run the same frozen cases in stored order with the same runs/provider/model.

A run returns the code-owned decision (src/score.ts), not a model verdict:

{
  "action": "run",
  "ok": true,
  "run_id": "run-...",
  "refinement_id": "refine-1",
  "status": "ACCEPTED",
  "reference_overall": 70,
  "candidate_overall": 90,
  "regression_cases": [],
  "failed_cells": 0,
  "feedback": ["reference ok", "candidate better"],
  "auto_rollback": false,
  "runs": 1,
  "cells": 2
}
  • Scores are 0..100 per cell; a failed cell carries score: null — failure is never counted as 0 — and is excluded from the overall means.
  • passThreshold (default 60) is report-only: it never gates acceptance. A run is ACCEPTED only when neither side lacks usable cells, candidate failed cells stay within maxFailedCells, and no overall or per-case regression exceeds regressionTolerance (default 0).
  • Every run appends its full record (cells with executor evidence + the decision) to benchmark/runs.jsonl; evaluation reads only the captured snapshots and writes only that record, never touching reviews.jsonl, the harness state, injection telemetry, or skill files.

Development

The plugin is self-contained: devDependencies pin the published @deepseek-ai/* packages (rc versions), so pnpm install, pnpm run typecheck, pnpm test, and pnpm run build (tsc emits lib/types/*.js + *.d.ts; the "." and "./invariant" exports point at the artifacts) all work in a clean checkout — CI and the OIDC release workflow run the same steps. peerDependencies declare the semver ranges consumers (host dsh installations) must satisfy.

Plugin builds up to 0.3.0 logged the injected overview under a plugin-defined harness-state message source. The released Session format migrations only classify platform source kinds, so one such message makes the whole stored artifact unreadable (cannot safely transform unclassified message source) once a host reads it with a v3-capable dsh. This build logs a classified plugin source instead; stored logs of any generation are repaired offline with node scripts/repair-harness-state-logs.mjs (dry run by default; --apply backs each artifact up and replaces it atomically, and artifacts written within --min-age-seconds are skipped — see --help).

Known Limitations and Deferred Work

  • No end-to-end tests with a real LLM: completeViaAgent depends on the loaded llm capability and provider/model configuration; tests cover the planning/review paths with a stub Complete. Real e2e requires DEEPSEEK_API_KEY.
  • compaction/end is not part of the plugin's type union; the driver triggers it via string comparison after type narrowing, and the gate is silently skipped when the compaction capability is not loaded.
  • Projection dedup is an in-process WeakMap<Agent, digest>: the first step after a session restart re-injects (stateless and idempotent, but one extra injection).
  • Concurrent writes are last-writer-wins: multiple processes refining the same directory concurrently may overwrite each other; baseline conflict detection during planning can only catch read-after-write races, not serialize them.
  • A failed automatic refinement degrades silently (only logged) and never interrupts the session.
  • A content-shrink guard (rejecting updates that shrink an entry too far in one commit) is a planned follow-up and is not yet implemented; today only maxEntryGrowth caps how much an update may grow an entry.
  • A dedicated governance tool entry is deferred.
securityEnabledfalseEnable the local security (credential-pattern) diagnostic provider
auditReviewstrueAppend every gate verdict to reviews.jsonl under the harness root
logToFiletruePersist harness logs to continual-harness.log (JSONL, 0600, rotated)
logMaxBytes5242880 (5 MB)Rotation cap for the harness log file
maxEntryGrowth0.5Per-commit entry growth fraction cap; 0 disables the check
protectedKinds['skill']Kinds the automatic path may not modify (reserved; per-entry protection is the enforced guard)
benchmark{enabled: true, defaultRuns: 1, maxRuns: 3, passThreshold: 60, regressionTolerance: 0, maxFailedCells: 0}Explicit harness_benchmark tool: iterations per case per side, run cap, report-only pass line, non-regression tolerance, max failed candidate cells