@deepseek-ai/dsh-compaction
@deepseek-ai/dsh-compaction is a DeepSeek Harness capability seam: The compaction seam (ctx.compaction): the swap-in point for how a session gets shortened when the context window fills.
Published on npm at 0.0.1-rc.5. It installs into $DSH_HOME/profiles/<name> as a dependency of that profile.
Install
Plugin management forwards to pnpm inside the profile directory, so this behaves like pnpm add.
dsh plugin --profile web add @deepseek-ai/dsh-compactionWhat it does in a profile
The compaction seam (ctx.compaction): the swap-in point for how a session gets shortened when the context window fills. Currently 0.0.1-rc.5. To check whether it is already installed, read the dependencies in $DSH_HOME/profiles/<name>/package.json, or read the composed tree with --dump-config.
When you need to look at this package
Symptom: a long session suddenly loses detail, or compactNow appears to do nothing. The engine (ctx.compaction) decides when history is too large and summarizes an older range into a single surface node; the surface contract is what gets rewritten, which is why compaction costs latency.
What breaks if you remove or replace it
Without it nothing shortens. The window fills and the session cannot go past the model limit. It is also the only supported path to force a range: compactRegion(start, end, agent, signal?). compactIfNeeded and compactNow require a signal; the range call does not.
The package it gets confused with
It defines what compaction does, not how. A backend is a subclass implementing compactIfNeeded, compactNow and compactRegion; the summarisation call lives there. The ./checkpoint export is what lets a program outside the host turn a compaction record back into a user message.
Common questions
How do I remove it again?
Use dsh plugin --profile <name> remove @deepseek-ai/dsh-compaction, the mirror of the install command.
What if the version does not match my dsh?
Plugins declare a compatible range through engines.dsh or DSH peer dependencies. Outside that range the CLI skips the plugin and prints the requirement instead of booting a combination that may crash.