Back to directory

dsh-compaction-weave

In a curated listMaintenance: Active

nightfrost42/dsh-compaction-weave

Cache-friendly context compaction for DeepSeek Harness, with requirement retention, task continuity, history retrieval, and retries.

View on GitHubHomepage
$ dsh plugin --profile web add dsh-compaction-weave

63

stars

2

forks

JavaScript

Language

MIT

License

2026-11-10

Created

2026-11-23

Last push

MIT-licensed DSH context compaction plugin: two-stage folding, requirement retention, local archive retrieval. Supports DSH 0.2.2-rc.1–0.x, latest release v0.5.1.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-11-24

License

MIT

01What can it help you accomplish?

  • Keep a long DSH task from drifting after its transcript is compacted

    A checkpoint carrying the current task, still-valid user requirements, finished progress and next actions, while the replaced messages and attachments are written to a local archive that can be searched and read back in pages

    Developers running long, tool-heavy DSH sessions where the original requirements get buried

  • Avoid paying a summarizer call for every oversized tool result

    Non-error tool results over `4000` characters outside the recent tail are archived and folded into a head plus tail preview with a `history_read` pointer; when folding alone frees enough room the plugin stops without calling the summary model, and the stable prefix is kept so the same model route can reuse its cache

    Users watching token spend and prompt-cache hit rate

  • Check an early error, path or code detail after compaction

    `history_list`, multi-word `history_search` and paged `history_read` over the local archive, plus a `History archive` pointer and file list carried in every standard checkpoint

    Anyone who needs verbatim evidence from messages the checkpoint replaced

  • Interrupt a compaction without corrupting the session

    A live progress card with a pause button, then resume or discard of the remaining chunks after a pause or crash; original events are archived with a single-pass hash backup before the visible history is replaced in one transaction

    Users on very large sessions who cannot afford a half-written history

02How to install into DeepSeek Harness

Prerequisites

  • DeepSeek Harness `>=0.2.2-rc.1 <1.0.0-0`; atomic transactions were measured on `0.2.2-rc.1`, `0.2.2-rc.2` and `0.2.2-rc.3`
  • Node.js 24.9 or newer
  • No `billion-context` (including `billion-context-dsh`) already enabled, and no provider `baseUrl` still pointing at a `bili` proxy on `127.0.0.1` / `localhost` — the two compaction plugins must never run together
  • If `dsh-world`'s compaction swap is installed, restore the DSH session preset or set `replaceCompaction: false` first, otherwise Weave stays unmounted
  • For the CLI path, stop the target profile before installing

Installation steps

  1. 01

    Check for an existing `billion-context` install or a `bili` proxy `baseUrl` first; if either is present, ask which compaction plugin to keep instead of enabling both

  2. 02

    Install from npm: `dsh plugin --profile web add dsh-compaction-weave` — replace `web` with your profile name, then restart that profile

    $ dsh plugin --profile web add dsh-compaction-weave

  3. 03

    Desktop alternative: search for `dsh-compaction-weave` in `dsh-market`, or open Plugins → Add plugin with the npm package name; versions are then tracked from the npm `latest` tag

  4. 04

    Offline alternative: download `dsh-compaction-weave.tgz` from Releases, then Plugins → Add plugin and enter the absolute path, for example `C:/Downloads/dsh-compaction-weave-0.5.1.tgz`

  5. 05

    Restart DSH fully (the README warns that disabling a plugin is not enough) and confirm the version on the plugin detail page

Verify the integration

  • After the restart, the plugin detail page shows the updated version number
  • Once enabled a normal conversation works; typing `/compact` in the input box immediately attempts a compaction, which confirms the command is registered

Rollback

  • Uninstall Weave from the Plugins page and restart DSH; the history archive and settings stay in the plugin's separate storage directory
  • To go back to an older version, uninstall first and then install the older `.tgz` — the README's upgrade path is uninstall-then-install, and the archive is kept

03DSH integration and capability boundaries

DSH integrationNative runtime

Native DSH plugin: installed with `dsh plugin --profile web add dsh-compaction-weave` or from the plugin market, it hooks the DSH compaction line, adds the `/compact` command and hands the model the `context_compact` / `history_*` tools.

  • Two-stage compaction with cache-friendly prefixes

    A session approaching the trigger ratio (80% by default), or an explicit `/compact`→Oversized non-error tool results folded first; a summary only when folding is not enough, keeping the stable prefix and existing checkpoints so the same model route can reuse its cache

    Checkpoints and visible history are rewrittenReplaced messages are copied into the local archive
  • Requirement retention and channel-isolation audit

    Host event roles plus explicit tags such as `<untrusted_reference>` and `<quoted_text>`→Real user instructions are separated from quoted web text, logs and tool output, then the candidate summary is checked for numbers, conditions, prohibitions, authorisation sources, targets and `key: value` progress

    Summaries that fail the retention check are blocked and regenerated by default (`auditBlockOnLoss`)
  • Local archive with retrieval tools

    Model tool calls from a session→`history_list` lists archived ranges, `history_search` matches keywords, and `history_read` returns original messages and attachments in pages

    Archive files are written to the plugin's storage directory
  • Live progress card, pause and resume

    An automatic run, `/compact`, or a migration→A card above the input box shows total progress, the current chunk and concurrency; pause is one click, and a pause or crash keeps a breakpoint that continues without redoing committed chunks

    A breakpoint record survives restarts`/compact discard` or the card's discard button drops the pending run
  • Model-requested compaction at a phase boundary

    The model calls `context_compact` after finishing a subtask→A `queued` receipt first, then `compacted`, `partial`, `failed` or `skipped` / `blocked` once the current tool batch ends

    Queued requests are only evaluated at a safe step after the current tool batch
  • Settings and retry controls

    Settings → Context compaction, or the plugin detail page→Summary provider and model, output cap, concurrency (1–6), reasoning effort, audit strictness, retry count and backoff, and an idle-before-compaction timer

    Saved settings apply to later operations without restarting DSH, while a run in progress keeps its original settingsHTTP 429 drops concurrency back to 1 with a cooldown

04Who is it for? When not to use it?

Good for

  • Developers running long, tool-heavy DSH sessions where the original requirements get buried
  • Users watching token spend and prompt-cache hit rate
  • Anyone who needs verbatim evidence from messages the checkpoint replaced
  • Users on very large sessions who cannot afford a half-written history

Not for

  • Only DeepSeek Harness `>=0.2.2-rc.1 <1.0.0-0` is supported (the `0.2.x`–`0.x` line starting at `0.2.2-rc.1`); the native atomic transaction path was only measured on `0.2.2-rc.1`, `0.2.2-rc.2` and `0.2.2-rc.3`.
  • Requires Node.js 24.9 or newer on the machine running DSH; the plugin is plain ES modules with no build step, so the runtime version is a hard prerequisite.
  • Must not run at the same time as `billion-context` (including `billion-context-dsh`), and a provider `baseUrl` still aimed at a `bili` proxy on `127.0.0.1` / `localhost` counts as a conflict: the two compaction plugins are forbidden to be enabled together.
  • `dsh-world`'s compaction swap (`compactionSwapped` / `dsh-world/compaction`) replaces the official `@deepseek-ai/dsh-compaction-basic` line, which leaves Weave silently unmounted; restore the DSH preset or set `replaceCompaction: false`.
  • Compaction is lossy summarisation: the visible history is replaced in a single transaction, so the model reads the checkpoint instead of the original messages, and replaced events only come back through the `history_*` tools. Token savings and billing also depend on cache hits, regeneration and provider pricing rules.
  • Before replacing history the plugin verifies the host's storage-method fingerprints; with the default `strictHostFingerprints: false` it degrades to the public `Session.append(replace)` + `sessions.flush()` path when a DSH patch release changes private persistence methods, and it still refuses to run while `.rollback` / `.tail` logs are unrecovered.

05Compatibility, maintenance and safety notes

  • Only DeepSeek Harness `>=0.2.2-rc.1 <1.0.0-0` is supported (the `0.2.x`–`0.x` line starting at `0.2.2-rc.1`); the native atomic transaction path was only measured on `0.2.2-rc.1`, `0.2.2-rc.2` and `0.2.2-rc.3`.
  • Requires Node.js 24.9 or newer on the machine running DSH; the plugin is plain ES modules with no build step, so the runtime version is a hard prerequisite.
  • Must not run at the same time as `billion-context` (including `billion-context-dsh`), and a provider `baseUrl` still aimed at a `bili` proxy on `127.0.0.1` / `localhost` counts as a conflict: the two compaction plugins are forbidden to be enabled together.
  • `dsh-world`'s compaction swap (`compactionSwapped` / `dsh-world/compaction`) replaces the official `@deepseek-ai/dsh-compaction-basic` line, which leaves Weave silently unmounted; restore the DSH preset or set `replaceCompaction: false`.
  • Compaction is lossy summarisation: the visible history is replaced in a single transaction, so the model reads the checkpoint instead of the original messages, and replaced events only come back through the `history_*` tools. Token savings and billing also depend on cache hits, regeneration and provider pricing rules.
  • Before replacing history the plugin verifies the host's storage-method fingerprints; with the default `strictHostFingerprints: false` it degrades to the public `Session.append(replace)` + `sessions.flush()` path when a DSH patch release changes private persistence methods, and it still refuses to run while `.rollback` / `.tail` logs are unrecovered.
  • Diagnostic logs and their audit files can contain local paths, raw conversation text and business details; the README asks you to review a redacted copy before attaching them to a public issue.
2026-11-102026-11-22v0.5.1

MIT (stated in README) · actively maintained — latest release v0.5.1 (2026-11-23), last push 2026-11-22

06Frequently asked questions

How do I install Compaction Weave on DeepSeek Harness?

From npm with `dsh plugin --profile web add dsh-compaction-weave` — stop the profile first, then restart it. On desktop you can instead search for `dsh-compaction-weave` in `dsh-market` or use Plugins → Add plugin with the npm package name; offline builds install the `.tgz` from Releases by absolute path. You need DSH `>=0.2.2-rc.1 <1.0.0-0` and Node.js 24.9+.

What do I actually see after installing it?

The layout stays the same until a compaction runs: the plugin follows the session model and plans one when context nears the trigger ratio (80% by default). Type `/compact` to try it immediately; while a compaction or migration runs, a progress card sits above the input box with pause, resume and discard controls.

Will `billion-context` or `dsh-world` conflict with it?

Do not enable `billion-context` (or `billion-context-dsh`) alongside it — the README forbids two compaction plugins at once, and a `baseUrl` still pointing at a `bili` local proxy counts as the same conflict. If `dsh-world` swaps the official compaction line, restore the DSH preset or set `replaceCompaction: false`, otherwise Weave is silently not mounted.

What happens to the messages that get compacted away?

They are written to a local archive before the visible history is replaced in one transaction, and every standard checkpoint carries a `History archive` pointer plus the files involved. The model can call `history_list`, `history_search` and `history_read` to get the original text back in pages; the checkpoint itself is lossy, so anything it omits survives only in the archive.

How do I remove it or stop a running compaction?

Uninstall it from the Plugins page and restart DSH — the history archive and settings stay in the plugin's storage directory, so a later reinstall can still read them. If you only want to stop the current run, use `/compact cancel` or the pause button, then `/compact resume` or `/compact discard`.

08Data and sources

  • Author-claimedgithub.com8f2fe546c5d4…

    面向 DeepSeek Harness 的上下文压缩插件,让长对话带着明确的目标、有效约束和下一步继续推进。

  • Author-claimedgithub.com8f2fe546c5d4…

    支持 **DeepSeek Harness `>=0.2.2-rc.1 <1.0.0-0`**(`0.2.2-rc.1` 起的 `0.2.x–0.x` 系列)

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-11-24. Found an error? Submit a correction.

🏆

Best DeepSeek Harness Plugins

Twelve plugins worth installing first — picked from the whole catalog, across every category.

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.