jasen215/dsh-continual-harness

用于持续自我进化的DeepSeek Harness插件:持久记忆、定期审查与优化、跨会话共享知识以及自动回滚——一个由模型可调用的harness_refine工具驱动的计划→验证→应用→回滚循环。

Project Overview项目介绍

This is a native DSH plugin built exclusively for DeepSeek Harness, designed to enable self-improving AI agents with continual learning capabilities. It stores persistent agent memory across sessions, enables periodic review and refinement of existing knowledge, supports cross-session knowledge sharing, and automatically rolls back changes when a refinement fails. The plugin forms a closed loop workflow that covers planning, validation, application, and rollback, and its core design is inspired by the open-source prime-agent project from Prime Intellect. It is distributed as a single npm package called dsh-continual-harness that can be installed directly via DSH's plugin system.

The plugin extends DSH through multiple extension points, including a pre-step context projection that injects harness state on every agent turn, an event listener that triggers automatic refinement after a set number of turns or at compaction end, and manually callable tools and an optional slash command for on-demand refinement. It also adds capabilities like memory lifecycle management with archive/unarchive/pin functions, ranked knowledge injection that prioritizes relevant entries, session wrap-up suggestions, and A/B benchmarking for refinement changes. Development of the plugin is fully self-contained, with pinned dev dependencies for @deepseek-ai/* packages, and you can complete install, type check, test, and build steps with pnpm.

The plugin requires Node.js version 22 or higher and TypeScript 6.0 or higher to install and run, it is released under the permissive MIT license, so anyone can use or modify it freely. There are several known limitations: it does not include end-to-end tests with a real LLM (a valid DEEPSEEK_API_KEY is required to run full tests), some planned features like a content-shrink guard are not yet implemented, and concurrent writes can lead to unexpected overwrites. It also ships with a repair script that fixes compatibility issues with older versions of stored harness state logs, which can be run with a dry-run default or applied directly with the --apply flag.

这是一个专为 DeepSeek Harness (DSH) 开发的原生插件,面向自我改进型 AI 代理,通过持久化记忆、定期复盘优化、跨会话知识共享和失败自动回滚实现持续学习能力。它构建了一个从规划到验证、应用再到回滚的完整闭环工作流,整体设计灵感来源于开源项目 prime-agent。

它通过多个扩展点向 DSH 注入能力,包括每步代理执行前的上下文投影、会话间隔结束时的自动复盘优化、手动优化工具和可选的斜杠命令。它还提供记忆生命周期管理、排序注入、会话总结、不变量防护和显式 A/B 基准测试功能,以 npm 包 dsh-continual-harness 的形式分发安装。

它是用 TypeScript 开发的,要求 Node.js 22 以上版本,遵循 MIT 许可证开源,项目本身是自包含的,开发流程可通过 pnpm 完成安装、类型检查、测试和构建。目前存在一些已知限制,比如没有端到端的真实 LLM 测试,部分功能仍待开发。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 9 stars - very few users, little community feedback星标只有 9,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-continual-harness

把 jasen215/dsh-continual-harness 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-continual-harness

English | 中文

MIT License npm version Node Version TypeScript CI npm downloads

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:

Capability Mechanism
State projection (inject harness context each step) agent/pre-step waterfall listener; incremental injection when the content digest changes
Review and automatic refinement session/event listener on turn interval / compaction end; runs LLM review → plan → apply automatically
Manual refinement tool Registers the harness_refine tool (directly callable by the LLM, supports rollback)
Manual refinement command Optional /refine slash command, registered through the host commands capability (@deepseek-ai/dsh-commands) when present
Memory lifecycle Manual archive/unarchive/pin through refinement metadata; archived entries are hidden from injection and skill materialization
Ranked injection Queries 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-up Optional harness_wrapup tool gives mechanical keep/promote/archive advice; promotion is copy-only and conflicts return a deterministic error
In-session review trajectory Rebuilt from session logs (tail-biased truncation)
Invariant guard harness/refinement event validation + batched failure reporting
Explicit A/B benchmark Single harness_benchmark action tool: fixed frozen cases, pre-refinement reference snapshots, and same-round reference/candidate A/B runs with code-owned decisions

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-message-preview 下一个 Next dsh-chinese-thinking →