DoctorxPriestess/dsh-cache-safe-tool-result ↗★ 0

dsh-cache-safe-tool-result

阻止工具结果重复改写并在入会话前截断超长输出以保稳定 适合出现超长工具输出污染上下文的环境,需配置阈值后方可生效。

套件
dsh-cache-safe-tool-result
相容性
待驗證
版本
1.0.0
授權
MIT
最近更新
2026年9月20日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:DoctorxPriestess/dsh-cache-safe-tool-result

Configuration

keydefaultmeaning
thresholdChars8192truncate when the text exceeds this many code points
headChars4096leading code points retained
tailChars1024trailing code points retained
firstPasstruemount the pre-admission truncation listener
guardedPrunertrueprovide the delivery-guarded toolResultPruner
includeNestedtruefirst-pass: also truncate sub-dispatch results
verbosefalselog 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.