QuanhuZeYu/dsh-idle-compactor0

dsh-idle-compactor

Idle-triggered context compaction for DeepSeek Harness: compact a session once it has gone quiet past a token floor

包名
dsh-idle-compactor
版本
0.2.0
许可证
MIT
最近更新
2026年9月4日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:QuanhuZeYu/dsh-idle-compactor

Configuration

Set it in the profile's cordis.patch.yml (later layers win, and a patch replaces the whole config, so restate every key you keep):

- id: idle-compactor
  config:
    thresholdTokens: 131072   # 128K
    idleMs: 600000            # 10 minutes
KeyDefaultMeaning
enabledtrueRegister no sweep at all when false.
thresholdTokens131072Context floor. Use 128000 for a decimal 128K.
idleMs600000Quiet window before a session is eligible.
scanMs30000Sweep interval; bounds how long after idleMs the compaction lands.
includeSubagentsfalseAlso compact sessions whose header carries origin: subagent.
excludeArchivedtrueSkip sessions the workspace registry reports as archived.
skipAwaitingWorktrueNever compact a session with background work outstanding — its own or a live descendant's.
waitWarnMs10800000Log one warning per wait episode once it has held a session this long.
cooldownMs60000Minimum spacing between compactions of one session.
retryBackoffMs300000Wait after a failed attempt or a "no compactable range" result.
maxPerScan1Sessions per sweep, bounding concurrent summarization calls.
dryRunfalseLog what would be compacted; write nothing.

Unknown keys and out-of-range values throw at load.