DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Auto Compact — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
A

dsh-auto-compact

Auto Compact

DeepSeek Harness 的自动上下文压缩:基于令牌压力的摘要检查点,支持可配置的触发阈值(默认为 LATE)和设置卡片。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:lileikeji/dsh-auto-compact#2c15ea577b133060ac676e56acad3c5d40ae6f5a
README兼容性版本

兼容性与来源证明

Auto Compact 以 dsh-auto-compact 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/8/20

版本

0.1.0stable
2026/8/20

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 2
周下载
0
最近提交
2026/8/25
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Mnemondsh-mnemon面向 DeepSeek Harness 的可组合三层记忆控制平面:持久化运行时上下文、可搜索的项目文档、可插拔的长期记忆、受保护的策略、WebUI 和无头工具。Memory@furongjun1999/dsh-memory灵枢(Lingshu·líng shū)DeepSeek Harness 插件:完整大脑——长期记忆/知识飞轮/自我认知/递归反思接入 DSH,对话自动沉淀进 md_cg 认知图(md 文档)Rewind Plugindsh-rewind-plugin同窗口内对话回退并恢复工作区文件Meow Memorymeow-memoryDeepSeek Harness 的跨会话项目记忆:七层 SQLite 记忆、首轮快照注入、每条消息的关键词命中、memory_remember/search/project 工具、带 reflection-fold UI 的自动反思,以及由空闲触发的梦境整合

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