KitDoesIt/dsh-compaction-instant

LLM-free lossless* compaction engine for DeepSeek Harness

dsh-compaction-instant is an instant, near-lossless context compaction engine for DeepSeek Harness — a drop-in replacement for @deepseek-ai/dsh-compaction-basic that replaces LLM summarization with the deterministic conversation-compiler principle of lllyasviel/VCC. A compaction compresses a shadowed history span in milliseconds with zero model calls, keeping original tokens only — no paraphrase, no hallucination, no summarizer cost; everything cut stays recoverable through (seq N) pointers into the durable session log. Every tool call compresses to ONE line (key argument for whitelisted toolArgTools, name-only for others, nothing for hideTools rows); tool results never occupy entries — the -> result N pointer keeps them one recall(type:'result') away; long text is truncated to its budget with a '(truncated from seq N)' note naming the durable event. It also ships the same-session recall layer: a recall tool (type seq/result/checkpoint) and a /recall command for the agent and the human, closing the near-lossless loop against the append-only session log.

Other ★ 8 updated 2026-09-02 ✅ runtime-tested
View on GitHub ↗

Install

dsh plugin --profile web add dsh-compaction-instant

Method 1 (alias install, drop-in replacement) — dsh plugin --profile web add "@deepseek-ai/dsh-compaction-basic@npm:dsh-compaction-instant"; since v0.1.1 the package also declares dsh.bundle so the direct install registers as a profile layer automatically. Method 2 (direct install + AI-authored preset copy) — dsh plugin --profile web add dsh-compaction-instant, then in a preset-authoring session ask the AI to copy the standard preset and swap its compaction engine row to dsh-compaction-instant (agentPresets.copy('standard', '<id>'), swap the row name, mount-validate with standingKeyFor). Also installable as plain dsh-compaction-instant.

Compatibility

DeepSeek Harness with the compaction-basic seam. Drop-in replacement for @deepseek-ai/dsh-compaction-basic: same command, protocol, and error vocabulary; Config accepts every key of basic's configuration surface. LLM-free — compaction never invokes a model. The recall tool and /recall command ship in the same package (dsh-compaction-instant/tool and dsh-compaction-instant/command modules). Alias dependency removal restores the real basic.

Details

Recent updates

The current README documents the alias install and direct install methods, the example compilation format, the recall read-back layer (tool + /recall command, typed restore for seq/result/checkpoint), and the drop-in compatibility with compaction-basic.

FAQ

Does compaction cost tokens?
No — it is LLM-free: the compile is deterministic text processing, so a million-token history compresses in milliseconds with zero model calls and no summarizer cost.
Is anything lost during compaction?
No paraphrase and no hallucination — original tokens are kept, and everything cut is still recoverable through (seq N) pointers into the durable, append-only session log.
How do I install it as a drop-in replacement?
Alias install: dsh plugin --profile web add "@deepseek-ai/dsh-compaction-basic@npm:dsh-compaction-instant" — same command, protocol, and error vocabulary as basic; removing the alias dependency restores the real basic.

Alternatives

lire1131/dsh-undo-plugin · lire1131/dsh-undo-savepoint · memorax-ai/dsh-harmony

More plugins in Other

Browse more in Other

Guides for Other plugins