merenguesL/dsh-tool-normalizer ↗★ 0
dsh-tool-normalizer
DeepSeek Harness 的参数规范化、代码模式桥接与执行诊断插件
AI 分析
核心用途是自动修复和规范化工具调用参数。适合需要自动转换命令为代码、补充缺失描述、安全重新分发未知工具以及提供执行错误提示的自动化任务。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:merenguesL/dsh-tool-normalizer说明文档
阅读完整 README ↗⚙️ Configuration
You can customize plugin behavior in your workspace's cordis.patch.yml or cordis.yml:
- insert:
- id: tool-normalizer
name: dsh-tool-normalizer
config:
autoWrapRunCode: true
autoBridgeDirectTools: true
autoObserveFiles: true
autoClampRanges: true
injectPrompt: true
errorHints: true
persistPassthrough: false
| Option | Type | Default | Description |
|---|---|---|---|
autoWrapRunCode | boolean | true | Auto-convert command -> code, supply missing descriptions, strip Markdown fences. |
autoBridgeDirectTools | boolean | true | Safely re-dispatch an UNKNOWN_TOOL result that reached tools/execute; host-level pre-dispatch denials cannot be intercepted by a plugin. |
autoObserveFiles | boolean | true | After FS_NOT_OBSERVED, read the target and retry one edit/write through the host dispatcher. |
autoClampRanges | boolean | true | Correct editor ranges and resolve relative paths against the session directory. |
injectPrompt | boolean | true | Dynamically register prompt guidelines with ctx.systemPrompt. Static text only — never breaks prefix caching. |
errorHints | boolean | true | Append one actionable hint to unrecoverable PTC/syntax errors while preserving the original error text. |
persistPassthrough | boolean | false | Persist successful untouched pass-through calls as detailed JSONL events; failures and healing attempts are always retained. |
Healing success rate is healedSuccess / (healedSuccess + healedFailed) and excludes untouched pass-through failures. A pre-dispatch normalization whose final error belongs to a different failure class is attributed as an unrelated pass-through failure rather than a failed heal, so the rate measures real efficacy. Successful untouched calls are kept in aggregate counters and the compact tool-normalizer-summary.json, not one detail line per call.
The token-savings KPI sums measured per-heal input tokens: each successful heal credits skipped model round-trips × token-meter request pressure, i.e. the prompt a further request would have re-submitted. It requires @deepseek-ai/dsh-token-meter in the composition; without it the figure stays 0 instead of using a hardcoded per-retry constant.