AI Agent Hub
Back to plugins
🖥️

dsh-dcp

Client Updated 2026.08.26

Run the following command in DeepSeek Harness:

dsh plugin install fan56/dsh-dcp

Paste the following prompt into your AI chat to install this plugin:

Install in DeepSeek Harness by running dsh plugin install fan56/dsh-dcp; full source is available at https://github.com/fan56/dsh-dcp

About this plugin

The default context compaction in DeepSeek Harness asks the model to re-summarize the old conversation on every pass—burning tokens, adding latency, and occasionally producing a different result for the same input. dsh-dcp replaces that model-dependent step with a pure-code, deterministic extractor: zero LLM calls, identical input always yields identical output, and in real sessions it has compressed roughly 80 k-token histories down to about 700 tokens with no extra model overhead.

It is not a simple truncation. The compressor preserves hard facts verbatim—user utterances, file paths, shell commands, error messages, todo items—while deduplicating repeated tool calls and collapsing stale errors into a single notice. Token budgets are priced at CJK density (roughly 2 characters per token) so Chinese sessions are not systematically under-allocated by the host's 4-chars-per-token heuristic. All safety machinery—trigger thresholds, tail retention, transaction locks, tool-pairing boundaries—is inherited from dsh's official implementation; the plugin swaps only the summarization link.

Built for developers who run long Chinese sessions in dsh and want compaction that costs no extra tokens and returns a reproducible result. It does not perform semantic induction—for that, the official compaction-basic remains the right tool. dsh-dcp is about the facts that actually appeared, kept light, stable, and free.

Use Cases

  • Compress long Chinese sessions without spending any extra tokens
  • Reproducible compaction results that do not depend on model randomness
  • Replace the default LLM compaction backend to cut latency and cost

Best For

  • Developers running long Chinese sessions on dsh
  • Teams sensitive to compaction latency and token cost
  • Users who prefer deterministic, auditable toolchains