dsh-doctor
asdf17128
Find what your DeepSeek Harness (dsh) patches silently broke — dead patches, config fields dropped by whole-config repla…
PROJECT TOPICS
PROJECT README
English | 中文
Enhanced auto-compaction defaults for DeepSeek Harness.
DeepSeek Harness ships automatic context compaction (dsh-compaction-basic), but the default trigger threshold is 80% of the model's context window — too late for large-context models. This tool lowers the threshold to 75% and adds per-route policies, so history is tidied up earlier and long sessions stay responsive.
DeepSeek Harness runs one compaction-basic instance per agent preset (per session). Profile-level patches cannot reach that subtree, so this tool directly injects configuration into the compaction-basic entry of every user-installed preset under ~/.dsh/.agent-presets/.
dsh-compaction-basic (a failed summary preserves the original history and never silently drops context)./compact and tool-result pruning remain available.cd dsh-auto-compact
./install.sh
Restart DeepSeek Harness afterward. Roll back with:
./uninstall.sh
This tool only injects into user-installed presets under ~/.dsh/.agent-presets/. The factory presets (standard, code, cordis, minimal) ship with their own default compaction settings (80% trigger, 16% retain) and are read-only — this tool will not modify them.
If you want enhanced compaction for a factory preset:
cp -r /opt/homebrew/lib/node_modules/@deepseek-ai/dsh/presets/<preset-name> ~/.dsh/.agent-presets/
./install.sh again to inject the enhanced configuration.agent.cordis.yml under ~/.dsh/.agent-presets/.compaction-basic entry of each preset.agent.cordis.yml.bak-auto-compact.compaction-basic themselves (merge manually in that case).All values live in scripts/inject.mjs (the CONFIG_BLOCK). Edit them before running ./install.sh if you want different thresholds. Preview with:
node scripts/inject.mjs --dry-run
| Key | Default | Meaning |
|---|---|---|
thresholdRatio |
0.75 | Trigger compaction when estimated usage reaches this fraction of the model context window |
retainRatio |
0.20 | Keep the most recent fraction of the window verbatim |
modelPolicies |
– | Per provider/model overrides |
./uninstall.sh.MIT © songoao25
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。