DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

dsh-compaction-micro

Compaction Micro

用于 DeepSeek Harness 压缩的分层微清理层:在官方摘要层之前,将列入白名单的可重新运行工具结果清除为占位符,在无需调用模型的情况下释放上下文空间。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:Perfirstvito/dsh-compaction-micro#e0df7557e18d611d340c884c143ce2472929cdff
README兼容性版本

兼容性与来源证明

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

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/2

版本

0.1.0stable
2026/9/2

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Weknora@wxg-prc-cpg/dsh-weknora适用于 DeepSeek Harness (dsh) 的 WeKnora 知识检索工具:通过自有知识库进行语义搜索、文档阅读以及 RAG/代理回答。Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。Memory@furongjun1999/dsh-memory灵枢(Lingshu·líng shū)DeepSeek Harness 插件:完整大脑——长期记忆/知识飞轮/自我认知/递归反思接入 DSH,对话自动沉淀进 md_cg 认知图(md 文档)

README

dsh-compaction-micro

Standalone micro-clear tier for DeepSeek Harness compaction. It clears whitelisted, re-runnable tool results to placeholders at its own microThresholdRatio — below the summarize threshold — so the expensive model-backed summary runs less often. It is an observer: it never mutates the model request, makes no model call, and every rewrite is a single-node tool/result content replacement preceded by a compaction/prune shadow-price event, so the durable log stays the reconstructable source of truth.

Snip (trimming) and full (summarization) stay owned by the official dsh-compaction-tool-result-pruner and dsh-compaction-basic.

Composition

Mount this bundle before dsh-compaction-basic. Its agent/pre-step and agent/request-error listeners are registered with prepend: true, so they run first regardless of mount order:

- name: '@deepseek-ai/dsh-token-meter'
- name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
- name: '@deepseek-ai/dsh-compaction-basic'
  config:
    thresholdRatio: 0.9
- name: 'dsh-compaction-micro'
  config:
    clearableTools: [read, glob, grep, web_search, web_fetch]
    retainRecent: 3
    microThresholdRatio: 0.85
    reservedTokens: 0

How it works

  1. agent/pre-step (prepend): measure pressure; when totalTokens >= floor((contextWindow - reservedTokens) × microThresholdRatio), clear whitelisted tool results oldest-first, retaining the newest retainRecent visible. The official backend then re-measures the smaller surface and skips summarization when the clear already relieved enough pressure.
  2. agent/request-error (prepend): on a confirmed context overflow, clear whitelisted results first, then delegate to the official prune + summarize + retry.

Configuration

FieldDefaultMeaning
clearableTools[]Tool names whose results the micro tier may clear. Empty disables the tier. Only list read-only, re-runnable tools — the service does not verify that property.
retainRecent3Newest clearable results always retained visible.
microThresholdRatio0.85Clear at this fraction of the effective window. Must be in (0, 1].
reservedTokens0Tokens subtracted from the routed context window before scaling the threshold.
autotrueInstall the automatic listeners; false exposes only ctx.microCompaction.clearSession().

The whitelist is operator-owned and is the safety gate: read/glob/grep and read-only web tools are the intended members; write, edit, shell, subprocess, and workflow tools must stay out.

Development

Build against a local DeepSeek Harness checkout by junctioning its workspace packages into node_modules/@deepseek-ai (see the checkout's packages/*/* and vendor/*), then:

npm run typecheck     # tsc -p tsconfig.json --noEmit
node --import tsx --test tests/micro.test.ts

Runtime smoke (from the DSH checkout):

dsh plugin --profile headless add link:<this-dir>
DEEPSEEK_BASE_URL=http://127.0.0.1:8000/v1 DEEPSEEK_API_KEY=mock-key \
  dsh --profile headless "run the pwsh tool once and report"

License

MIT