JiewiW/dsh-step-governor ↗★ 0

dsh-step-governor

确定性步数治理——agent/pre-step reject 步级熔断与 tools/pre-execute deny 支线熔断(shadow 先行,fail-open) 适合需要对智能体进行确定性步数限制、防止无限循环的用户。

パッケージ
dsh-step-governor
互換性
未検証
バージョン
0.1.3
ライセンス
MIT
最終更新
2026/10/22

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JiewiW/dsh-step-governor

ドキュメント

README 全文を読む ↗

安装与配置

dsh plugin --profile  add github:JiewiW/dsh-step-governor#v0.1.3

host + client 双半边插件:加载后在 DSH 设置页出现「步数治理」卡片,14 项配置可直接改并持久化;也可用 GET/POST /plugins/step-governor/settings 读写(GET 返回完整 schema)。

环境变量只作为启动初始值,且优先级最高(env 显式设置的键,设置页保存不会覆盖):

环境变量对应配置默认
DSH_GOVERNOR_MODEmodeshadow
DSH_GOVERNOR_G1A_Ng1aZeroSteps4
DSH_GOVERNOR_G1B_Kg1bFingerprintSteps6
DSH_GOVERNOR_G1C_MAXg1cMaxStepsPerTurn60
DSH_GOVERNOR_G2A_Mg2aSameTargetCalls3
DSH_GOVERNOR_G2B_Fg2bConsecutiveFailures2

加载成功时 stderr 打印一行:

[dsh-step-governor] {"mode":"shadow","at":"loaded","thresholds":{...}}

实验期间建议用独立 profile + 独立端口运行,不要直接在日常 profile 开启强制档。