chunsi-w/dsh-trajectory-governor
DeepSeek Harness的闭环轨迹策略平面
Project Overview项目介绍
This repository is a closed-loop agent trajectory control plane built natively exclusively for DeepSeek Harness. It does not add extra persona prompts or split conversations into fixed sections, instead it tracks the full real event flow of agent tasks to maintain structured context. It supports multiple core functions, from task episode continuity tracking and work phase management to verification debt recording, performance regression checking and local decision ledger storage. It is a full clean-sheet rewrite of the older dsh-mode-boost project, with no dependencies on external preset forks or third-party injectors.
To install the plugin, you need Node.js version ^22.19.0 or >=24.0.0, and it is compatible with all DeepSeek Harness versions from 0.1.0-rc.5 up to before 0.2.0. The recommended installation method is via the official DSH CLI, running dsh plugin --profile web add @chunsi-m/dsh-trajectory-governor then dumping the config to complete setup. It can also be installed from local source code after building with npm. All configuration is done via a cordis patch file, and new users are advised to test functionality in shadow mode first before enabling active mode.
The plugin ships with a read-only status tool that returns all current context of the active agent session, including episode relation, work phase, risk level, open verification debt, and current benchmark status. It stores a local append-only decision ledger that only holds hashed summaries of user input, not full original text, and rotates old files automatically when they reach the configured size limit. It is released under the permissive MIT open source license, and it currently relies on deterministic rules rather than machine learning for task classification, so it cannot support automatic workspace rollback without external evaluation tools.
dsh-trajectory-governor 是专为 DeepSeek Harness 开发的原生闭环 Agent 轨迹控制平面插件,它围绕 Agent 任务的真实事件流进行管理,核心能力涵盖维护任务片段与连续性关系、跟踪当前工作阶段、记录结构化信息增益、管理修改后的验证债务、保存工作区版本、判断带容差的性能回归、过滤重复无信息调用、管控范围化工具能力、设置任务完成门限、支持可选自适应推理,同时存储本地不可见的决策账本。它是 dsh-mode-boost 的全量重构,不依赖预设分支或超级注入工具。
安装需要 Node.js 版本不低于 22.19.0 或 24.0.0,支持 DeepSeek Harness 0.1.0-rc.5 到 0.2.0 版本,官方推荐通过 npm 直接安装,也支持从本地源码编译安装。插件会通过 DSH 的 bundle 层注入,用户可通过配置文件调整运行模式、推理策略、验证规则、基准测试参数等多项内容,推荐先以影子模式运行验证功能,再切换到激活模式。
它提供状态查询工具供用户查看当前任务的片段、关系、风险、验证债务、基准测试状态等信息,决策账本默认存储在 DSH_HOME 目录下,仅存储摘要信息不保存原始用户输入,满足轮转大小后自动归档不会删除历史。插件当前使用确定性规则而非学习分类器,不提供工作区自动回滚,需要外部评估工具提供还原机制,采用 MIT 许可开源。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-trajectory-governor(chunsi-w/dsh-trajectory-governor)
仓库:https://github.com/chunsi-w/dsh-trajectory-governor
本站详情页:https://www.yhbd.top/plugins/chunsi-w-dsh-trajectory-governor/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 12 · 最近提交 2026-08-18 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 12 stars - an early-stage project星标 12,属于早期项目
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 @chunsi-m/dsh-trajectory-governor
把 chunsi-w/dsh-trajectory-governor 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-trajectory-governor
面向 DeepSeek Harness 的闭环 Agent 轨迹控制平面。它不是继续增强一句 persona,也不是把会话永久分成 spec/react,而是围绕真实事件流维护:
- Task Episode 与连续性关系;
- 当前工作阶段;
- 结构化信息增益;
- 修改后的验证债务;
- workspace revision 与完整 benchmark 证据;
- 同规格、带容差的性能回归判断;
- 重复调用与无新信息轨迹;
- scoped 工具能力面;
- 显式
finish与自然结束的完成门; - 可选的自适应 reasoning effort;
- 本地、非模型可见的决策账本。
本项目是对 dsh-mode-boost 的 clean-sheet 重构,不依赖 preset fork,也不依赖 super-injector。
已实现的闭环
真人消息被 inbox claim
-> 在第一次 prompt assembly 前建立 Task Contract
-> 判断 new / continuation / extension / correction / review / conversation
-> 必要时通过 agent.ctx.tools.restrict() 暂时隐藏 write/edit
-> agent/pre-step 在同一个请求内追加可重建的近场 policy message
-> Native tool 或 Code Mode SDK 子调用产生 durable 事件
-> 计算 observation novelty / mutation / verification
-> 修改产生 Verification Debt
-> readback + test/build/check 清偿当前 revision 的债务
-> 可选 benchmark gate 只接受当前 revision 的完整、可解析结果
-> 同 query count / concurrency / warmup 才比较 QPS,容差内不误判噪声
-> finish guard 与 turn-stopping 阻止无证据结束
-> 有限续步耗尽后要求模型明确报告 blocker
安装
要求:
- Node.js
^22.19.0 || >=24.0.0; - DeepSeek Harness
0.1.0-rc.7(开发与集成测试基线);peer range 兼容0.1.0-rc.5至<0.2.0。
从当前目录安装:
npm run build
dsh plugin --profile web add .
dsh --profile web --dump-config
从 npm 安装(推荐):
dsh plugin --profile web add @chunsi-m/dsh-trajectory-governor
dsh --profile web --dump-config
如需固定版本:
dsh plugin --profile web add @chunsi-m/dsh-trajectory-governor@0.2.0
安装 tarball:
npm run pack:release
dsh plugin --profile web add ./chunsi-m-dsh-trajectory-governor-0.2.0.tgz
包已经声明正式的:
{
"dsh": {
"bundle": {
"patch": "./cordis.patch.yml"
}
}
}
所以 dsh plugin --profile web add ... 会把它加入 web profile 的 bundle 层,而不是只安装成无效普通依赖。
配置
cordis.patch.yml 默认配置:
- insert:
- id: trajectory-governor
name: '@chunsi-m/dsh-trajectory-governor'
config:
mode: active
adaptiveReasoning: false
restrictBeforeEvidence: true
autoVerify: true
maxAutomaticContinuations: 1
exposeStatusTool: true
ledger: true
maxLedgerBytes: 10485760
benchmarkRequired: false
benchmarkToolNames: [run_benchmark]
verificationToolNames: [build_project, run_correctness_test]
finishToolNames: [finish]
fullBenchmarkMinQueries: 10000
fullBenchmarkMinRecall: 0.95
benchmarkScoreTolerancePercent: 2
maxActionsWithoutBenchmark: 8
maxStagnantFullBenchmarks: 2
stopRetryOnDeterministicErrors: true
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
titanwings/distilly
YuJunZhiXue/dsh-purge
Clearailhc/clearai-dsh
yejiming/MuseAI