dsh-lcm

Lossless context compaction: an LLM summarizes a leaf of compacted events and replaces it with one checkpoint node, nothing is deleted, so lcm_search still matches text a checkpoint summarized and lcm_expand restores any event by seq. Summaries condense at fanin 4, a threshold crossing sweeps several leaves under two clocks, and an idle pass resumes a sweep that ran out of budget. Optional semantic recall ranks events against any OpenAI-compatible embedding endpoint, with a /lcm-embed backfill command and status. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Overview

Lossless context compaction: an LLM summarizes a leaf of compacted events and replaces it with one checkpoint node, nothing is deleted, so lcm_search still matches text a checkpoint summarized and lcm_expand restores any event by seq. Summaries condense at fanin 4, a threshold crossing sweeps several leaves under two clocks, and an idle pass resumes a sweep that ran out of budget. Optional semantic recall ranks events against any OpenAI-compatible embedding endpoint, with a /lcm-embed backfill command and status. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Installation

Install from GitHub

dsh plugin --profile web add github:zy-xyz/dsh-lcm

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.