JiewiW/dsh-step-governor ↗★ 0

dsh-step-governor

提供步数熔断与工具执行拦截的步级治理 适合需要对智能体进行确定性步数限制、防止无限循环的用户。

包名
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

安装与配置

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 开启强制档。