Liangebra/dsh-smart-compact0

dsh-smart-compact

Custom DSH CompactionEngine backend: configurable threshold prompting, mandatory fallback at the limit, DCP-inspired dedup/purge, custom summary prompt, and /compact like the original. Zero external state — everything is rebuilt from the append-only session log.

AI 분석

核心用途是自动或手动压缩长会话上下文,防止超出模型限制。适合需要进行超长对话、频繁触发上下文超限的重度用户。

패키지
dsh-smart-compact
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 8. 15.

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗

Configuration

OptionDefaultMeaning
thresholdRatio0.5Context-usage fraction where the advisory nudge appears (agent/pre-step); the model decides whether to use the compress tool.
mandatoryRatio0.9At/above this the engine auto-compacts the largest compressible span once per turn.
summarizationMaxTokens8192Generation cap for the direct ctx.llm.stream summary call (purpose: 'compaction').
preserveRecent5Number of newest surface nodes never auto-compressed.
dedupEnabledtrueOffer DCP-style dedup suggestions in dcp_status.
purgeErroredTurns4Offer purge suggestions for the N most recent errored turns.
protectedTools[]Tool names whose call/result pairs are never compressed.
protectUserMessagesfalseKeep every user message verbatim (never compress them).
summaryPromptbuilt-inFull prompt template; {content} is replaced with the span text.
modelContextLimitauto-probedExplicit context window (tokens) that wins over model probing.
autoNudgetrueEnable the threshold advisory nudge.
autoToolstrueRegister compress and dcp_status model tools.