PerryLink/dsh-translate5

dsh-translate

Vendor parameter translation 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-translate
版本
0.2.10
许可证
Apache-2.0
最近更新
2026年9月12日

安装

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

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. cordis.patch.yml documents each key inline.

KeyDefaultMeaning
enabledtrueMaster switch; false registers nothing
repair.enabledtruePost-execute repair layer switch
repair.toolNames[]Extra tool names whose JSON-text results may be repaired (on top of string-rooted / json-rooted schemas)
repair.strategies.escapeRepairtrueEscape raw control characters inside strings
repair.strategies.trailingCommatrueRemove commas directly before a closing bracket
repair.strategies.truncationClosuretrueClose an unclosed string or container cut off by truncation
repair.strategies.fieldCompletiontrueComplete missing required fields with explicit null placeholders
repair.maxSteps8Strategy application budget (repair-loop passes, 1..64)
diffMaxChars200Cap on one logged diff fragment, in characters
diffMaxEntries50Cap on logged diff entries
registerCommandtrueRegister the /translate command
registerTooltrueRegister the fix_json tool
rosettaDataPath(none)Optional external rosetta data file (same shape as the bundled lib/rosetta-data.json); overrides the built-in mapping table

Example override in your profile patch:

- insert:
    - id: dsh-translate
      name: dsh-translate
      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