chunsi-w/dsh-trajectory-governor ↗★ 13
@chunsi-m/dsh-trajectory-governor
闭环任务轨迹控制与自适应推理决策面 适合需要对任务执行、基准测试和自动重试进行策略管控的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chunsi-w/dsh-trajectory-governor说明文档
阅读完整 README ↗配置
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
| 字段 | 默认 | 说明 |
|---|---|---|
mode | active | off / shadow / active;shadow 只决策和记账,不改请求 |
adaptiveReasoning | false | inspect/design/recover 阶段选择模型声明的最深 effort;阶段结束后恢复 provider default |
restrictBeforeEvidence | true | fix/continuation 等任务在观察前临时隐藏已知专用写工具 |
autoVerify | true | 有完成 blocker 时允许 agent/turn-stopping 追加有限验证步骤 |
maxAutomaticContinuations | 1 | 每个 turn 的自动验证续步上限;耗尽后只追加一次 blocker-report 步 |
noInformationLimit | 3 | 重复且无新信息达到阈值后成为完成 blocker,取得新结果后解除 |
exposeStatusTool | true | 注册只读 trajectory_policy_status 工具 |
ledger | true | 写入本地 policy ledger,不进入模型历史 |
ledgerPath | $DSH_HOME/trajectory-governor/decisions.jsonl | 自定义账本路径 |
maxLedgerBytes | 10485760 | 活动 JSONL 达到大小前轮转;旧文件保留 |
maxHintChars | 1200 | 单条 model-visible policy hint 上限 |
benchmarkRequired | false | 为性能任务强制当前 revision 的完整 benchmark;普通任务保持关闭 |
benchmarkToolNames | [run_benchmark] | 视为 benchmark 的工具名,可按 harness 改写 |
verificationToolNames | [build_project, run_correctness_test] | 视为常规验证的工具名 |
finishToolNames | [finish] | 需要经过完成门的显式结束工具名 |
fullBenchmarkMinQueries | 10000 | 完整 benchmark 的最小 total_queries |
fullBenchmarkMinRecall | 0.95 | 完整 benchmark 的最小 recall |
benchmarkScoreTolerancePercent | 2 | 同规格 QPS 下降不超过此比例时视作噪声范围 |
maxActionsWithoutBenchmark | 8 | 缺当前完整 benchmark 时,多少成功动作后主动提醒补证据 |
maxStagnantFullBenchmarks | 2 | 同规格完整 benchmark 无实质提升后提示平台期 |
stopRetryOnDeterministicErrors | true | 对 HTTP 400 / invalid_request_error 不调用 DSH retry chain |
maxTrackedResults | 256 | 每 Agent 保留的 result fingerprint 与 benchmark best record 上限 |
推荐上线顺序
先使用 shadow mode:
mode: shadow
ledger: true
确认 relation/phase 判断符合真实会话后,再切换:
mode: active
adaptiveReasoning 默认关闭,因为改变 reasoning effort 会改变 request header 与缓存形状。应在具体 provider/model 上完成校准后再启用。