yangyu666/dsh-jev-prune
Jev-judged context compaction for DeepSeek Harness: structured TypeSafe Jev judgments (noul / choice, returning calibrated probabilities) drive DSH's two-layer compaction. Result trimming only ever decides keep-or-discard — kept results are never trimmed however large — and region compaction injects a deterministic, code-generated receipt with no model inference.
dsh-jev-prune adds Jev-judged context compaction to DeepSeek Harness. DSH's built-in context reclamation is purely volumetric: a tool result over a size threshold has its middle chopped out, and region compaction asks the model to write a summary. This plugin replaces the decision in both places with TypeSafe Jev's structured output (noul / choice, returning calibrated probabilities) under one rule — 'what should not be generated by a model is not generated by a model'. In layer 1 (result trimming, at ctx.toolResultPruner.pruneSession) Jev decides per tool result whether it will still be needed: needed results are never trimmed however large, stale ones are trimmed however small (unless shorter than minCharsToPrune). In layer 2 (receipt compaction, at ctx.compaction.summarize + compactRegion) fully eligible read-only steps are moved out of the surface and replaced with a deterministic receipt computed by code — tool name, command, path, character count and seq — containing no model inference at all; parallel tool batches are evaluated per call/result pair and ineligible results keep their envelopes. The original events remain in the session log and can be re-fetched by re-running the same command or reading the same file.
Install
dsh plugin --profile web add dsh-jev-prune@0.1.1Copied verbatim from the README's install block, which follows it with a GitHub alternative dsh plugin --profile web add github:yangyu666/dsh-jev-prune#v0.1.1; a local-development form using link:/absolute/path/to/dsh-jev-prune is also documented.
Compatibility
Targets the DSH 0.1.x-rc line (the README badge reads DSH 0.1.x-rc). The compaction algorithms it drives are DSH's own and are left untouched — the plugin only replaces the decision backend, which is pluggable (Jev, local rules, or a self-hosted model); with no judgment available it falls back to DSH's original behaviour.
Details
- Repo: yangyu666/dsh-jev-prune
- Category: Memory
- Stars: 4
- Version: GitHub repo yangyu666/dsh-jev-prune; npm package dsh-jev-prune at 0.1.1 (registry check 2026-10-10; registry repository field resolves back to this repo). MIT license; Node >= 22.19.
Alternatives
863683348/dsh-plugin-focus · akslcw/dsh-negative-ledger · askdkc/kiokuko-dsh