smart-compaction
让模型自己挑安全时机触发压缩:提供 compact_now 工具(回合进行中也能用),另有 context_status 工具,按会话真实的上下文窗口报告 token 占用。
- 形态
- Plugin 插件
- 安装
- npm 包安装
- 需要密钥
- 否
- 近月下载
- 2,852
- 最近推送
- 12 天前更新
项目说明
From README
A DeepSeek Harness (dsh) plugin that lets the model decide when to compact its own context, instead of being cut off mid-task by a blind token threshold.- compact now : compacts at a point the model knows is safe, e.g.right after finishing a todo.Works mid-turn.
- context status : real token usage against the session's actual context window, so the model stops guessing.
- Automatic safe-point compaction: local models rarely call a tool like this on their own, so the plugin also compacts by itself the moment a todo item is marked done and the context is over half full.No model decision needed.- No config, no core changes: built only on dsh's public compaction APIs.
The web profile reloads live, so there's nothing to restart.Details and edge cases under Install.Why dsh's built-in compaction is purely reactive: an automatic trigger fires between agent steps whenever token pressure cr
Original description
Let the dsh model compact its own context at a safe point (compact_now) and see real token usage (context_status).
安装方式
npm 包安装 · 安装无需配置
npx @deepseek-ai/dsh plugin --profile web add smart-compactiongit clone https://github.com/JoblessJoe/smart-compaction.gitpnpm install为什么是这个分数
近 13 天内有提交;README 给出了可直接复制的安装命令;装完即可用,无需额外配置;近月 npm 下载 2852 次,star 不多但真在被使用。
- 维护活跃
- 86
- 实用度
- 72
- 生态热度
- 69
- 上手便捷
- 100
- 信号质量
- 100
- 数据置信度
- 100%
相关插件
context-guardian
LuminariSoftwares/context-guardian
为 compaction-basic 提供压缩兜底:当 LLM 摘要抛错、返回空内容或放不进上下文窗口时,改为确定性编译该区段,每行带 seq 指针(内置 dsh-compaction-instant 编译器)。提供 recall、search 工具与 /recall、/context 命令,占用超过窗口 45% 时空闲自动压缩,并将被压缩区段归档到磁盘。引擎以一行配置挂载到 agent preset(见 docs/dsh-integration.md)。
dsh-context-zip
brunhildzhou/dsh-context-zip
接管 DSH 自带的压缩摘要器,改用五段式交接摘要,被压掉的每条消息都能在分段目录里读回。
taskfold
yindf/taskfold
用命名任务包住工作过程;任务结束后,在下一个步骤边界把整段消息折叠成一段摘要,原文可随时还原。