DoctorxPriestess/dsh-cache-safe-tool-result ↗★ 0
dsh-cache-safe-tool-result
阻止工具结果重复改写并在入会话前截断超长输出以保稳定 适合出现超长工具输出污染上下文的环境,需配置阈值后方可生效。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:DoctorxPriestess/dsh-cache-safe-tool-result說明文件
閱讀完整 README ↗Configuration
| key | default | meaning |
|---|---|---|
thresholdChars | 8192 | truncate when the text exceeds this many code points |
headChars | 4096 | leading code points retained |
tailChars | 1024 | trailing code points retained |
firstPass | true | mount the pre-admission truncation listener |
guardedPruner | true | provide the delivery-guarded toolResultPruner |
includeNested | true | first-pass: also truncate sub-dispatch results |
verbose | false | log per-truncation and per-pass detail |
thresholdChars, headChars and tailChars match the built-in pruner's
defaults exactly, so the swap does not change how much context a session keeps.
Configuration is validated: headChars + marker + tailChars must fit inside
thresholdChars, and a non-integer or negative budget throws at mount time
rather than silently misbehaving.