QIANLING-0831/dsh-memory-plus--packages-dsh-compaction-locator2

dsh-compaction-locator

Near-lossless compaction for the DeepSeek Harness — extends BasicCompactionEngine so each <compacted-summary> ends with an Exact Sources locator block (spill files, touched file paths, seq range), making compacted details recoverable via memory_search / read.

包名
dsh-compaction-locator
版本
0.1.0
许可证
MIT
最近更新
2026年8月20日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

cordis.patch.yml — 用本插件替代 @deepseek-ai/dsh-compaction-basic(配置完全兼容)

plugins:

  • name: dsh-compaction-locator config: thresholdRatio: 0.8 retainRatio: 0.16

## 行为细节

- 定位符按 shadowed 区间的**全跨度事件**提取:spill 路径(从 tool/result 文本 `stored at: 
` 解析)+ 触碰文件(从区间内 tool/call 的 `path`/`file_path` 参数);
- 纯对话区间(无文件/spill)不产出定位符块,摘要保持原样;
- 除 `summarize()` 外不改任何行为:压力判定、retain 策略、shrink 校验、KV 复用的重放前缀全部继承基类。

## 测试

```sh
node --test test/compaction-locator.test.js