DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Auto Compact — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
A

dsh-auto-compact

Auto Compact

Auto context compaction for DeepSeek Harness: token-pressure-driven summarization checkpoints with a configurable (LATE-by-default) trigger threshold and a settings card.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:lileikeji/dsh-auto-compact#2c15ea577b133060ac676e56acad3c5d40ae6f5a
READMECompatibilityVersions

Compatibility and provenance

Auto Compact is published as dsh-auto-compact and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
8/20/2026

Versions

0.1.0stable
8/20/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 2
Weekly downloads
0
Last push
8/25/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in memory-context.

Contextdsh-contextA DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.Weknora@wxg-prc-cpg/dsh-weknoraWeKnora knowledge retrieval tools for DeepSeek Harness (dsh): semantic search, document reading and RAG/agent answers over your own knowledge bases.Memsearch Dsh@zilliz/memsearch-dshMemSearch plugin for DeepSeek Harness: shared markdown memory across agents, with capture, pre-step context injection, memory-recall skill, and a skill-candidate review panel.Memory@furongjun1999/dsh-memoryLingshu (Lingshu·líng shū) DeepSeek Harness plugin: a complete brain—long-term memory/knowledge flywheel/self-awareness/recursive reflection integrated with DSH, with conversations automatically distilled into the md_cg cognitive graph (md documents)

README

dsh-auto-compact

Automatic context compaction for DeepSeek Harness: at every agent step it prices the routed request against the model's context window, and once pressure crosses the configured threshold it condenses the older span of the conversation into a durable <compacted-summary> checkpoint (via the conversation's own model, reusing the warm prefix cache) — so long sessions keep working without losing essential context.

It wraps the harness's own token-meter-driven engine (@deepseek-ai/dsh-compaction-basic); this plugin adds a LATE-by-default trigger, a settings card, and install docs.

Why "compact later"?

The harness's pi-ai provider falls back to DEFAULT_CONTEXT_WINDOW = 262144 (256K) for models that do not declare a window. With the default thresholdRatio of 0.8 that means compression can fire at ~205K tokens — only ~20% of a real 1M-window model. This plugin defaults to thresholdRatio: 0.92 and documents the window fix, so big windows are actually used.

Install

# profile dir (C:\Users\<you>\.dsh\profiles\<name>)
pnpm add -w dsh-auto-compact
# or from GitHub:
pnpm add -w dsh-auto-compact@github:lileikeji/dsh-auto-compact

Add dsh-auto-compact to the profile package.json dsh.profile.bundles list, then disable the harness's own engine so only one engine owns compaction:

# profile cordis.patch.yml
- id: compaction-basic
  name: '@deepseek-ai/dsh-compaction-basic'
  disabled: true

Window configuration (important)

The engine reads the model's context window from the LLM adapter. If your model's window is not declared (pi-ai defaults to 256K), set it per provider in ~/.dsh/settings.yaml:

llm-pi-ai:
  providers:
    my-provider:
      apiKeyEnv: MY_API_KEY
      defaultContextWindow: 1000000   # the model's real window

Configuration (settings card)

Settings → 插件 → 自动压缩上下文(auto-compact):

  • thresholdRatio — trigger threshold as a fraction of the context window (default 0.92).
  • retainRatio — fraction of the recent conversation kept verbatim (default 0.12).
  • maxTokens — summary output cap (default 8192).
  • auto — enable/disable automatic compaction.

Changes apply after a profile restart.

How it works

  1. agent/pre-step: price the latest durable routed request with the token meter.
  2. If totalTokens ≥ thresholdRatio × contextWindow (output-budget aware when known), pick a head-anchored span that never splits a tool call/result pair, retaining the recent tail.
  3. Summarize that span with the conversation's own model (system prompt + tools + leading messages replayed verbatim so the provider's KV cache is reused), appending the compaction instruction.
  4. Land the checkpoint as a compaction/start → summary → compaction/end transaction on the session surface; subsequent steps continue from the checkpoint.

License

MIT