Jaylor-Wang/dsh-tool-headroom ↗★ 1
dsh-tool-headroom
提供智能输出压缩、日志去噪及缓存功能 适合需要压缩大体积JSON/日志输出以节省上下文Token的用户。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Jaylor-Wang/dsh-tool-headroom說明文件
閱讀完整 README ↗🚀 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:
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Enable or disable output compression globally |
thresholdBytes | number | 3072 (3KB) | Minimum output size to trigger compression |
maxTargetBytes | number | 12288 (12KB) | Target maximum size for compressed output |
jsonCompression | boolean | true | Enable JSON SmartCrusher |
logDenoising | boolean | true | Enable log deduplication and progress bar folding |
stripAnsi | boolean | true | Strip terminal ANSI escape codes |
collapseRepetitions | boolean | true | Collapse sequential duplicate lines |
preserveErrorContext | number | 8 | Number of context lines to preserve around errors |
cacheRawOutput | boolean | true | Cache full uncompressed output to disk (CCR) |
cacheDir | string | "" | Custom cache path (defaults to OS temp directory) |
excludedTools | string[] | ["read", "read_image"] | Tool names excluded from compression |
3. Configuration Options
Customizable via DSH Settings UI or profile YAML:
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Enable or disable output compression globally |
thresholdBytes | number | 3072 (3KB) | Minimum output size to trigger compression |
maxTargetBytes | number | 12288 (12KB) | Target maximum size for compressed output |
jsonCompression | boolean | true | Enable JSON SmartCrusher |
logDenoising | boolean | true | Enable log deduplication and progress bar folding |
stripAnsi | boolean | true | Strip terminal ANSI escape codes |
collapseRepetitions | boolean | true | Collapse sequential duplicate lines |
preserveErrorContext | number | 8 | Number of context lines to preserve around errors |
cacheRawOutput | boolean | true | Cache full uncompressed output to disk (CCR) |
cacheDir | string | "" | Custom cache path (defaults to OS temp directory) |
excludedTools | string[] | ["read", "read_image"] | Tool names excluded from compression |