Liangebra/dsh-smart-compact0

dsh-smart-compact

自定义 DSH 压缩引擎后端:支持可配置的阈值提示、极限强制回退、基于 DCP 的去重/清理、自定义摘要提示词及 /compact 命令。无外部状态。

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.