Overview
dsh-compaction-fit
Make DSH compaction summaries fit real gateway limits: CJK-aware prompt trimming, shrink-and-retry on prompt-too-long, and repair of pi-ai silent-overflow false positives.
README / EN
Package documentation
Registry summary
Make DSH compaction summaries fit real gateway limits: CJK-aware prompt trimming, shrink-and-retry on prompt-too-long, and repair of pi-ai silent-overflow false positives.
dsh.pub verifies the pinned bundle contract, runtime facts, and distribution semantics. The complete README remains in the source repository.
Read the full README on GitHubLIMITATIONS
Known limitations
- 预算用启发式估算,不是上游 tokenizer 的精确值;`safetyTokens` 和 `contextRatio` 就是为此留的余量。 - 中间历史被省略后,本次摘要不会包含那部分细节;原始事件仍在 session log,但不会回到模型上下文。对已经有 checkpoint 覆盖早期内容的会话,这是代价最小的恢复方式。 - 不处理图片 offload(交给 `dsh-compaction-image-offload`),也不拆分单个不可分单元(超大工具结果的剩余部分)。 - 只对 `purpose: 'compaction'` 做裁剪与重试;伪造溢出纠正默认覆盖所有请求,因为同一条误判同样会毁掉普通回答。
