Jaylor-Wang/dsh-tool-headroom ↗★ 1

dsh-tool-headroom

提供智能输出压缩、日志去噪及缓存功能 适合需要压缩大体积JSON/日志输出以节省上下文Token的用户。

套件
dsh-tool-headroom
相容性
待驗證
Cordis 依賴範圍
^4.0.2
版本
0.1.0
授權
MIT
最近更新
2026年10月2日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Jaylor-Wang/dsh-tool-headroom

🚀 Installation & Configuration

1. Install Plugin

In your DSH profile directory:

pnpm add dsh-tool-headroom

2. Enable Plugin (cordis.patch.yml)

Add the plugin to your cordis.patch.yml or custom agent preset:

- insert:
    - id: headroom
      name: 'dsh-tool-headroom'

3. Configuration Options

Customizable via DSH Settings UI or profile YAML:

OptionTypeDefaultDescription
enabledbooleantrueEnable or disable output compression globally
thresholdBytesnumber3072 (3KB)Minimum output size to trigger compression
maxTargetBytesnumber12288 (12KB)Target maximum size for compressed output
jsonCompressionbooleantrueEnable JSON SmartCrusher
logDenoisingbooleantrueEnable log deduplication and progress bar folding
stripAnsibooleantrueStrip terminal ANSI escape codes
collapseRepetitionsbooleantrueCollapse sequential duplicate lines
preserveErrorContextnumber8Number of context lines to preserve around errors
cacheRawOutputbooleantrueCache full uncompressed output to disk (CCR)
cacheDirstring""Custom cache path (defaults to OS temp directory)
excludedToolsstring[]["read", "read_image"]Tool names excluded from compression

3. Configuration Options

Customizable via DSH Settings UI or profile YAML:

OptionTypeDefaultDescription
enabledbooleantrueEnable or disable output compression globally
thresholdBytesnumber3072 (3KB)Minimum output size to trigger compression
maxTargetBytesnumber12288 (12KB)Target maximum size for compressed output
jsonCompressionbooleantrueEnable JSON SmartCrusher
logDenoisingbooleantrueEnable log deduplication and progress bar folding
stripAnsibooleantrueStrip terminal ANSI escape codes
collapseRepetitionsbooleantrueCollapse sequential duplicate lines
preserveErrorContextnumber8Number of context lines to preserve around errors
cacheRawOutputbooleantrueCache full uncompressed output to disk (CCR)
cacheDirstring""Custom cache path (defaults to OS temp directory)
excludedToolsstring[]["read", "read_image"]Tool names excluded from compression