NightFrost42/dsh-compaction-weave
A DeepSeek Harness plugin that compacts context without losing access to original history
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
DSH Compaction Weave is a native JavaScript ESM plugin that takes over DeepSeek Harness's built-in @deepseek-ai/dsh-compaction-basic, not a standalone inference server. Its bundled index and engine entrypoints, bundle-index.mjs and bundle-engine.mjs, use shared globalThis state for in-place upgrades. On a capacity trigger, a configured idle trigger or /compact, the engine resolves the route window and measures context in two views before selecting a compaction path.
Stage 1 uses hysteresis to fold eligible old tool output, read-only command entries and unsigned reasoning traces without a model call. If that is insufficient, checkpoint-compile reuses a JIT candidate when available or compiles a span with complete tool-call pairs into a v2 checkpoint. Deterministic A1 auditing and two size-reduction checks gate acceptance. The engine writes originals and attachments to a local zstd write-ahead archive before atomically replacing active history.
Key Capabilities & Differentiators
Summarization follows the current session model unless a separate provider and model are configured. The default balanced preset allows one JIT warm-up per cycle at or above 90% effective capacity when Stage 1 is insufficient. The default summary cap is 8,192 output tokens; shard concurrency defaults to two and falls back to one on rate limits. An engine-filled checkpoint section keeps up to four recent verbatim user excerpts under a 960-token default budget, and the format retains v1 compatibility.
For exact details omitted from the checkpoint, history_list enumerates archived ranges, history_search runs pure JavaScript BM25F over archived text and attachment indexes with batched queries[], and history_read slices originals by physical line or literal substring. Pause and resume preserve committed chunks; a changed policy requires confirmation before automatic continuation. context_compact queues incremental work at a safe tool-batch boundary: queued is an acknowledgement, not evidence of a completed compaction.
Trade-offs & Limitations
Weave trades a simpler summarization path for explicit requirement checks, durable history and recoverability. A1 can catch changes to booleans, CLI flags, exact scalars and hard polarity without a second LLM audit, but it is not a proof that every semantic nuance survived. Folding may avoid a summary call; JIT, retries and retrieval can still add work. Source isolation and credential redaction for workspace rereads do not make the full-fidelity archive safe to share.
In the published v0.8.0 small-window benchmark, retention was 93.83% for GPT-6.1 Sol and 94.96% for DeepSeek-V4.1-Flash. Compared with dsh-basic, both improved pooled accuracy and reduced end-to-end time, but the DeepSeek run cost 13% more. Both models completed the 100K long-window suite at 100%, with retention of 98.43%–99.14%; these are suite results, not service guarantees. Weave yields to presets with their own engine and does not support running alongside billion-context or other compaction plugins and proxies.
Hardware & Deployment Guide
Install into a DeepSeek Harness profile on Node.js >=24.9.0 and DSH >=0.2.2-rc.1 <1.0.0-0. Stop the target profile, run dsh plugin --profile web add dsh-compaction-weave with web replaced by the actual profile name, then restart it. DSH also accepts a local .tgz, including through the desktop plugin manager. An offline package changes how the plugin is installed, not whether the configured summary model needs a network connection.
From v0.7.2, the self-contained runtime entrypoints address stale submodule caching during hot upgrades. If an in-place upgrade from v0.7.0 or v0.7.1 fails, disable and uninstall the old plugin, fully restart DSH, then install v0.8.0. Saved settings apply to subsequent compactions without a restart; in-flight work keeps its original settings. Plan local disk capacity and access controls around retained messages and attachments. No plugin-specific GPU or VRAM requirement is specified.
Long-running DeepSeek Harness coding or research sessions where exact constraints, old tool output and resumable compaction matter more than a minimal setup.
Your host is not DSH, you must keep a different compaction engine active, or you cannot retain original messages and attachments locally.
Quick Start & Installation
git clone https://github.com/NightFrost42/dsh-compaction-weave.git cd dsh-compaction-weave npm test npm run check npm run pack:release
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/NightFrost42/dsh-compaction-weave.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about dsh-compaction-weave
Where does Weave sit in the DSH request path?
What should I provision for runtime overhead and VRAM?
Can we use Weave commercially in a self-hosted environment?
When should I choose Weave over dsh-basic or billion-context?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy