QIANLING-0831/dsh-memory-pro--packages-dsh-compaction-locator ↗★ 19

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.

Package
dsh-compaction-locator
Compatibility
Unverified
Harness peer range
>=0.1.5-rc.3 <0.3.0
Cordis peer range
^4.0.1
Version
0.1.0
License
MIT
Last updated
Nov 14, 2026

Other repositories with this package name

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full 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