DSH Hub

chunsi-w/dsh-trajectory-governor

dsh-trajectory-governor

BundleWorkflow9 GitHub stars· updated 2026-08-18

Closed-loop trajectory policy plane for DeepSeek Harness

Install

npx @deepseek-ai/dsh plugin --profile web add .

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-trajectory-governor DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-trajectory-governor.svg)](https://dshhub.dev/plugins/dsh-trajectory-governor)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from chunsi-w/dsh-trajectory-governor, cleaned of badges and images.

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/[email protected]

安装 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

Related plugins