yu381792/dsh-superlcm
SuperLcm — Lossless Context for DeepSeek Harness: fully asynchronous, cache-friendly compaction with exact recall.
Project Overview项目介绍
SuperLcm is an asynchronous context-compaction and lossless recall plugin built specifically for DeepSeek Harness (DSH), inspired by Clint Ehrlich and Theodore Blackman's LCM paper and explicitly scoped to DSH's append-only event log as the canonical source of truth. It runs an out-of-band Worker that uses an independent summarizationProvider and summarizationModel to build a layered summary DAG in the background, while the foreground Agent reply never awaits that compression model and is decoupled via its own AbortController. The plugin exposes six recall tools — lcm_grep, lcm_describe, lcm_expand, lcm_expand_query, lcm_reindex, lcm_doctor — that read exact DSH event seq ranges rather than re-summarizing summaries. Installation uses dsh plugin --profile web|acp add pointing at the GitHub Release tarball SuperLcm-0.3.0-alpha.9.tgz, and operators are instructed to replace the existing compaction provider instead of stacking a second one alongside it.
Typical workflow keeps the active surface small by keeping only the frozen SYSTEM + CHECKPOINT prefix and a recent fresh tail, while older raw history is folded into summary nodes that still carry child_ids and source event seqs. The default policy accepts only mode: rolling with foldTiming: background, retains the last 24 surface nodes and at least 32k fresh tokens, prepares 64k batches off the critical path, and only commits ready summaries under softActiveTokens 160k or hardActiveTokens 220k pressure. Atomic transactions enforce the full compaction/start → compaction/summary → checkpoint user/message → compaction/end lifecycle, and snapshots are pinned before summarization so tail growth or rewrites cause discard-and-rebuild rather than corrupted ranges. It targets DSH power users who want stable Prompt Cache prefixes and bounded attention dilution in long-running sessions.
Hard requirements are Node.js 22.16 or newer and continued DSH exposure of its official compaction, LLM, tools, and session/event interfaces; CI additionally covers Linux on Node.js 24 and Windows/macOS on 22. SQLite lives at ~/.dsh/SuperLcm/lcm.sqlite, overridable via DSH_SUPERLCM_DB and DSH_HOME, holds only derivable indexes (lcm_nodes, lcm_edges, lcm_nodes_fts, lcm_scan_state, lcm_index_state) with WAL, and never stores original transcripts so it can be rebuilt by lcm_reindex. The 160k/220k thresholds are starting points for large-context models and must not be copied verbatim to small-context models; a fallback provider/model pair, if configured, must differ from the primary and is invoked at most once. First-run advice is to validate in an isolated profile, pin both DSH and plugin versions, run npm run validate plus npm pack --dry-run, and avoid automated upgrading into the main workspace. The project is MIT-licensed and explicitly unaffiliated with Voltropy, Martian Engineering, DeepSeek, the official interactive LCM site, or DSH upstream.
SuperLcm 是面向 DeepSeek Harness(DSH)设计的异步上下文压缩与无损召回插件,基于 Clint Ehrlich 与 Theodore Blackman 的 LCM 论文思路,将 DSH 原始 append-only 事件日志作为唯一真源,通过后台 Worker 独立构建分层摘要 DAG,让 Agent 在 lcm_grep、lcm_describe、lcm_expand、lcm_expand_query、lcm_reindex、lcm_doctor 六个工具按需回溯精确 event.seq。安装方式是通过 dsh plugin --profile web|acp add 加载 GitHub Release 中的 SuperLcm-0.3.0-alpha.9.tgz 压缩包,挂载 cordis.patch.yml 提供的工具集,并在 compaction 配置中替换原有 provider,而非并排追加。
典型工作流是后台 Worker 在用户当前对话之外独立调度 summarizationProvider 与 summarizationModel,持续把超过 softActiveTokens、hardActiveTokens 阈值的历史折叠为冻结 prefix 与 fresh tail,同时维护 SQLite 中的 lcm_nodes、lcm_edges、lcm_nodes_fts、lcm_scan_state 派生索引。压缩模式固定 mode: rolling、foldTiming: background,默认保留 24 个 surface node 与至少 32k fresh token,64k 历史批次可在后台预先准备。它适合在长会话中既要稳定 Prompt Cache 命中,又需要按原始证据无损召回细节的开发者与 Agent 重度用户。
运行依赖 Node.js 22.16 以上版本,要求 DSH 仍开放官方 compaction、LLM、tools、session/event 接口;数据库默认位于 ~/.dsh/SuperLcm/lcm.sqlite,可通过 DSH_SUPERLCM_DB、DSH_HOME 重定向。SQLite 仅保存可重建摘要与 DAG,FTS5 全文检索与 WAL 事务由 Node 原生模块承担,不修改 DSH canonical 事务。160k/220k 阈值面向大上下文模型起算,不应照搬到小上下文模型;启用前应在独立 profile 完成真实压缩、召回、fork 隔离与重启验收,固定 DSH 与插件版本后再切换到主工作区。许可 MIT,仓库明确声明与 Voltropy、Martian Engineering、DeepSeek 及官方交互站点无隶属关系。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-superlcm(yu381792/dsh-superlcm)
仓库:https://github.com/yu381792/dsh-superlcm
本站详情页:https://www.yhbd.top/plugins/yu381792-dsh-superlcm/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-09-26 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add "https://github.com/ygc3817922006-sketch/dsh-superlcm/releases/download/v0.3.0-alpha.9/SuperLcm-0.3.0-alpha.9.tgz"
把 yu381792/dsh-superlcm 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
SuperLcm — Lossless Context
**SuperLcm 是 DeepSeek Harness(DSH)的异步上下文压缩与无损召回插件。**它不把一段长对话永久替换成一个不可追溯的扁平摘要,而是保留 DSH 原始事件日志,建立分层摘要 DAG,并让 Agent 在需要时搜索、定位、展开之前的精确上下文。
main当前版本:0.3.0-alpha.10;最新公开 Release 仍为0.3.0-alpha.9。建议固定 DSH 与插件版本,在独立 profile 验证后再启用到主工作区。
点击上图打开论文团队的 LCM 官方交互式动态讲解
官方页面并不是一个独立的 MP4/WebM 视频,而是由网页脚本驱动的滚动交互动画;GitHub README 不能运行外部网页脚本。因此这里直接加载官方预览并链接到原始动态页面,同时在仓库内提供一份原生 GIF,把 SuperLcm 实际采用的流程完整展示出来:

目录
五个核心目标
- 展示并实现 LCM 原理:原文永久留在 DSH 事件日志中;摘要形成层级 DAG;摘要节点保留精确源事件指针。
- 异步压缩,不阻塞对话:独立 Worker 和独立模型在后台准备摘要,当前 Agent 回复不等待压缩模型。
- 持续保持较少的活动上下文:旧历史进入 checkpoint,主模型只携带稳定摘要、必要原文和 fresh tail。
- 缓存更稳定、成本更低:冻结 system/checkpoint 前缀,减少前缀重写;更短的活动请求也减少输入 token 与 cache write 体积。
- 摘要可搜索,原文可精确取回:SQLite 只做可重建索引,
lcm_expand最终返回的是 DSH 原始事件,而不是摘要的二次转述。
1. LCM 的原理
SuperLcm 受 Clint Ehrlich 与 Theodore Blackman 的论文 LCM: Lossless Context Management 启发。推荐先看论文团队制作的 官方交互式动态讲解;论文也可在 arXiv:2605.04050 阅读。
传统压缩通常是:
原始消息 1 … 100 ──压缩──> 一个扁平摘要
│
└─ 摘要遗漏的细节通常无法再定位
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
vshulcz/deja-vu
adoresever/graph-memory
mnemon-dev/mnemon
Phant0Meow/dsh-meow-memory
slow-stack/mneme
Aik358/dsh-auto-memory