PerryLink/dsh-param-repair ↗★ 15

dsh-param-repair

Vendor parameter mapping and deterministic JSON repair for DeepSeek Harness: the /translate command maps temperature/top_p/max_tokens/stop/system across 11 vendors, and the tools/post-execute repair layer (plus the fix_json tool) fixes broken JSON tool output with escape repair, trailing-comma removal, truncation closure, and required-field completion — never fabricating data

包名
dsh-param-repair
兼容性
待验证
Harness 依赖范围
>=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0
Cordis 依赖范围
^4.0.5-alpha.1
版本
1.0.2
许可证
Apache-2.0
最近更新
2026年11月9日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-param-repair

配置

所有可调项都是 Schemastery Config 字段(可在 cordis.yml 中修改)。按 id 定向覆盖会替换整行——需要重新声明每个键。cordis.patch.yml 逐键内联注释。

最常用键:

键默认值含义
enabledtrue总开关;false 不注册任何东西
repair.enabledtruepost-execute 修复层开关
repair.toolNames[]额外按名加入修复的 JSON 文本工具(叠加于 string 根/json 根 schema)
repair.maxSteps8策略应用预算(修复循环轮数,1..64)
diffMaxChars200单条日志 diff 片段的字符上限
registerCommandtrue注册 /translate 命令
registerTooltrue注册 fix_json 工具

完整配置表(13 个键)

键默认值含义
enabledtrue总开关;false 不注册任何东西
repair.enabledtruepost-execute 修复层开关
repair.toolNames[]额外按名加入修复的 JSON 文本工具(叠加于 string 根/json 根 schema)
repair.strategies.escapeRepairtrue转义字符串内的裸控制字符
repair.strategies.trailingCommatrue删除闭合括号前的逗号
repair.strategies.truncationClosuretrue闭合因截断而未闭合的字符串或容器
repair.strategies.fieldCompletiontrue以显式 null 占位补全缺失的必填字段
repair.maxSteps8策略应用预算(修复循环轮数,1..64)
diffMaxChars200单条日志 diff 片段的字符上限
diffMaxEntries50日志 diff 条目上限
registerCommandtrue注册 /translate 命令
registerTooltrue注册 fix_json 工具
rosettaDataPath(none)可选的外部 rosetta 数据文件(与内置 lib/rosetta-data.json 同形);覆盖内置映射表,文件非法则挂载期响亮失败

profile patch 中的覆盖示例:

- insert:
    - id: dsh-param-repair
      name: dsh-param-repair
      config:
        enabled: true
        repair:
          enabled: true
          toolNames: ['emit-json']
          strategies:
            escapeRepair: true
            trailingComma: true
            truncationClosure: true
            fieldCompletion: true
          maxSteps: 8
        diffMaxChars: 200
        diffMaxEntries: 50
        registerCommand: true
        registerTool: true