MIT-licensed dsh plugin: LLM-in-the-loop but guarded per-atom compression plus 0-LLM graph pruning, an append-only log as the single source of truth, two-level recall, a three-level trigger ladder and a read-only `/argp` status command.
DSH integration
Native runtime
Author-claimed
Safety audit
Unaudited
Last verified
2026-11-10
License
MIT
01What can it help you accomplish?
Keep a long DeepSeek Harness session alive without losing exact tokens to summarisation
Two-stage compression: a per-turn per-atom pass where the model only proposes and a deterministic guard decides, plus a 0-LLM reference-graph prune that converges to a character budget
People running long multi-turn coding tasks in DeepSeek Harness who keep hitting the context window
Get compressed or pruned content back verbatim when the model needs it again
Two-level recall — `recall_summary(seq)` for the compressed form, `recall_detail(seq, from?, limit?)` for the append-only log original, with paging for large nodes
Anyone whose compressed history must still be quotable, e.g. exact paths, error codes or config values
02How to install into DeepSeek Harness
Prerequisites
- A dsh profile name — the README installs with `dsh plugin --profile <name> add dsh-argp`
- A model with decent instruction-following: the README says the guard means nothing breaks on weaker models, but the savings scale with compliance
Installation steps
- 01
Install from npm: `dsh plugin --profile <name> add dsh-argp` — the bundle patch mounts both stages, no manual config needed
$ dsh plugin --profile <name> add dsh-argp
- 02
If you install within 24 hours of a release, pin the version explicitly (`dsh-argp@<最新版本>`), because pnpm 11’s default `minimumReleaseAge` of 1440 minutes silently falls back to an older version
- 03
To fall back to pure 0-LLM graph pruning, set `config: { peratom: false }` in the profile layer
Verify the integration
- Type `/argp` in a session to print the live status (engine, preset, budget, prunes, recall, cites) — read-only, it triggers no compression
- Manual compaction still goes through the host’s native `/compact`, which lands on this engine’s `compactNow`
03DSH integration and capability boundaries
Native host-side dsh plugin: `dsh plugin --profile <name> add dsh-argp` mounts it through the package’s own bundle patch (`cordis.patch.yml` inserts the entry), and the patch also disables the stock summariser with `- id: compaction-basic / disabled: true`. The profile layer only overrides config — inserting again causes `duplicate loader entry id`.
Stage-1 per-atom compression (eager)
a single LLM call returning `{seq, level, text}` decisions per atom→`extract` (verbatim excerpt, hard-rejected by the guard when a high-signal token is missing), `summary` (dropped tokens booked into `summaryDropped` for audit) or `false` (keep the original)
only tail events of the current turn may be replaceda copy that saves ≤5% is treated as `false` — no replace is emittedStage-2 reference-graph pruning (0-LLM)
an atom graph of deterministic A→R edges plus model-declared semantic `cites` edges→whole atoms removed in reverse topological order until the character budget is met
closure lifecycle ACTIVE→COMPLETED→PRUNABLE→PRUNED retires finished task closurestrigger line defaults to `contextWindow×0.8`, retain target to 20% of compressible contentThree-level trigger ladder
turn-start pressure check (L1), mid-turn pressure (L1′), or an externally clamped output (L3)→L1 runs the per-atom LLM pass plus graph prune; L1′ does 0-LLM graph pruning only; L3 force-prunes and `steer`s a continuation message so the same turn keeps going
`midTurnPrune` defaults to true with `midTurnTurnGuard` 0`reactiveRetries` defaults to 2 per clamped episode`/argp` status command
typing `/argp` in a session→engine (`graph` vs `graph+peratom`), preset, budget line with the estimate source, prune counts, recall hit rate and cite declaration counts
read-only — it triggers no compression
04Who is it for? When not to use it?
Good for
- People running long multi-turn coding tasks in DeepSeek Harness who keep hitting the context window
- Anyone whose compressed history must still be quotable, e.g. exact paths, error codes or config values
Not for
- Installing within 24 hours of a release can silently install the previous version: pnpm 11 defaults `minimumReleaseAge` to 1440 minutes and falls back without an error, which then fails the host’s peer check. Pin the version explicitly or add `dsh-argp` to `minimumReleaseAgeExclude`.
- Since 1.9.0 ARGP steps aside in the presets listed in `skipPresets` (default `['minimal']`): sessions on the minimal preset are not pruned or compressed. To enable it there, set `config: { skipPresets: [] }` in the profile layer.
- dsh patches replace the `config` block wholesale rather than deep-merging, so writing a `config` for `dsh-argp` at the profile / home / CLI layer replaces the whole block. Leaving `peratom` out is fine (the default is on); only write `peratom: false` when you actually want to disable Stage-1.
- Budgets are expressed in characters (estimated as characters × charsPerToken) and are not a per-token promise; real token counts are anchored to the provider’s reported usage.
05Compatibility, maintenance and safety notes
- Installing within 24 hours of a release can silently install the previous version: pnpm 11 defaults `minimumReleaseAge` to 1440 minutes and falls back without an error, which then fails the host’s peer check. Pin the version explicitly or add `dsh-argp` to `minimumReleaseAgeExclude`.
- Since 1.9.0 ARGP steps aside in the presets listed in `skipPresets` (default `['minimal']`): sessions on the minimal preset are not pruned or compressed. To enable it there, set `config: { skipPresets: [] }` in the profile layer.
- dsh patches replace the `config` block wholesale rather than deep-merging, so writing a `config` for `dsh-argp` at the profile / home / CLI layer replaces the whole block. Leaving `peratom` out is fine (the default is on); only write `peratom: false` when you actually want to disable Stage-1.
- Budgets are expressed in characters (estimated as characters × charsPerToken) and are not a per-token promise; real token counts are anchored to the provider’s reported usage.
- Live nodes that ARGP did not replace can still be cut by the request assembler when approaching the context window, without a trace, and `recall_pruned` cannot bring them back. Mitigation is to move the trigger earlier with a proportional budget; the root fix is on the dsh side (issue B-6).
MIT · actively maintained (latest release v1.11.2, 2026-11-09) · README notes L4 passes but the L5.2 web-start check on dsh.so fails, not reproducible locally
06Frequently asked questions
How is this different from normal summarisation compaction?
Summarisation lets the model rewrite history, which loses exact tokens (paths, error codes, config values) and breaks the prefix cache. dsh-argp keeps the LLM in the loop only as an untrusted proposer, lets a deterministic guard decide, and makes forgetting deterministic through 0-LLM graph rules so the budget actually converges.
Can I get the original text back after compression?
Yes. Everything compressed or pruned stays in an append-only log: `recall_summary(seq)` returns the compressed form and `recall_detail(seq, from?, limit?)` returns the original — text blocks verbatim, tool-call arguments rebuilt as JSON-equivalent with an explicit note, large nodes paged.
Do I have to configure anything after installing?
No. `peratom` defaults to on inside the engine, so installing gives you both stages; the package’s bundle patch also disables `compaction-basic`. To go back to pure 0-LLM graph pruning, set `config: { peratom: false }` in the profile layer.
Why did installing a new release give me an old version?
pnpm 11 defaults `minimumReleaseAge` to 1440 minutes, so a version released in the last 24 hours is skipped and pnpm silently falls back — which then trips the host’s peer check. Pin the version explicitly (`dsh-argp@<version>`) or add `dsh-argp` to `minimumReleaseAgeExclude`.
How do I see what it is doing?
Type `/argp` in a session: it prints the engine mode (`graph` or `graph+peratom`), preset, budget line with the estimate source, prune counts, recall hit rate and cite declarations — read-only, no compression is triggered.
07Related DSH workflows
dsh-our-free-model
by ebony-vinyl
Adds model choices, availability checks, usage panels, and a local OpenAI-compatible forwarder.
dsh-routing-suite
by yjh051108
dsh-routing-suite — injector + router-standard kit: install the runtime injector first, then the task-aware reasoning-mode router preset (measured P1-P23).
dsh-ops
by t-auto
Run Bash and PowerShell commands, search and edit local files, and manage long-running background jobs from DSH.
brooks-lint
by hyhmrright
Portable AI code quality reviews for Codex, Cursor, Copilot and other coding agents: six Agent Skills for architecture, technical debt, tests and remediation.
08Data and sources
**dsh-argp 是 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(dsh)的第三方上下文压缩引擎**
挂载同样由包的 bundle patch(`cordis.patch.yml`)负责(`insert` 创建 entry)
This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-11-10. Found an error? Submit a correction.
Best DeepSeek Harness Plugins
Twelve plugins worth installing first — picked from the whole catalog, across every category.
