merenguesL/dsh-tool-normalizer0

dsh-tool-normalizer

DeepSeek Harness 的参数规范化、代码模式桥接与执行诊断插件

AI 分析

核心用途是自动修复和规范化工具调用参数。适合需要自动转换命令为代码、补充缺失描述、安全重新分发未知工具以及提供执行错误提示的自动化任务。

包名
dsh-tool-normalizer
版本
0.4.1
许可证
MIT
最近更新
2026年9月4日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:merenguesL/dsh-tool-normalizer

⚙️ 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
OptionTypeDefaultDescription
autoWrapRunCodebooleantrueAuto-convert command -> code, supply missing descriptions, strip Markdown fences.
autoBridgeDirectToolsbooleantrueSafely re-dispatch an UNKNOWN_TOOL result that reached tools/execute; host-level pre-dispatch denials cannot be intercepted by a plugin.
autoObserveFilesbooleantrueAfter FS_NOT_OBSERVED, read the target and retry one edit/write through the host dispatcher.
autoClampRangesbooleantrueCorrect editor ranges and resolve relative paths against the session directory.
injectPromptbooleantrueDynamically register prompt guidelines with ctx.systemPrompt. Static text only — never breaks prefix caching.
errorHintsbooleantrueAppend one actionable hint to unrecoverable PTC/syntax errors while preserving the original error text.
persistPassthroughbooleanfalsePersist 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.