DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

dsh-context-offload

Context Offload

DeepSeek Harness 的上下文卸载:已使用的工具调用及其结果会在模型可见历史中替换为简短占位,而原始内容仍保留在会话日志中以便重放。步骤间策略会分批释放累积的待处理内容,而 offload_context 工具则允许模型卸载已

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

npx -y @deepseek-ai/dsh plugin --profile web add github:Hanochhu/dsh-context-offload#4d775724a73da7f7fed2cc56bf84661b5832d413
README兼容性版本

说明

DeepSeek Harness 的上下文卸载:已使用的工具调用及其结果会在模型可见历史中替换为简短占位,而原始内容仍保留在会话日志中以便重放。步骤间策略会分批释放累积的待处理内容,而 offload_context 工具则允许模型卸载已完成处理的内容。

兼容性与来源证明

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

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

版本

0.1.0stable
2026/9/24

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Memory Plugin@openviking/dsh-memory-plugin适用于 DeepSeek Harness 的 OpenViking 记忆与上下文套件Weknora@wxg-prc-cpg/dsh-weknora适用于 DeepSeek Harness (dsh) 的 WeKnora 知识检索工具:通过自有知识库进行语义搜索、文档阅读以及 RAG/代理回答。Archive Manager@michengai/dsh-archive-manager可通过 NPM 安装的 DSH Web 插件,用于管理已归档的会话。Mnemondsh-mnemon面向 DeepSeek Harness 的可组合三层记忆控制平面:持久化运行时上下文、可搜索的项目文档、可插拔的长期记忆、受保护的策略、WebUI 和无头工具。

README

dsh-context-offload

Context offloading for DeepSeek Harness (dsh).

A coding agent re-sends its whole history on every step, and most of that history is tool output it already used: the file it read, the command it ran, the diff it applied. This plugin releases that content from the model-visible history once it is no longer needed, replacing each consumed tool call and its results with a one-line stub. Every original stays in the session log, so nothing is lost — only the model's view shrinks.

Install

dsh plugin --profile web add dsh-context-offload

Restart dsh web. The plugin mounts into the profile composition and covers every agent in that profile.

To switch it off without uninstalling, add to the profile's own cordis.patch.yml:

- id: context-offload
  disabled: true

What the model sees

A tool unit — the assistant message that issued the calls plus every result answering them — is shadowed by a single user/message stub:

[tool context offloaded — 2 tool call(s) removed from model context; 39,045 characters released]
- bash(command=cd /Users/me/proj && ls -la && for d in */; do echo …)
- read(path=src/harness/loop.ts)
The original arguments and results remain in the session log. Re-read a file or re-run a command if you need the content again.

Two paths produce that stub:

  • Between steps — a policy on agent/pre-step releases complete tool units once more than retainUnits newer ones exist, and the accumulated backlog reaches flushChars. It flushes at most once per flushEverySteps, because every replacement moves the first divergence point of the request prefix and flushing on every step would defeat the provider's KV cache on every step.
  • On request — the offload_context tool lets the model unload calls it has finished with. The request is recorded during the tool call and applied at the next step boundary, which is the sanctioned surface-mutation point; a tool body runs mid-step and must not rewrite the surface.

Units whose calls are not all answered — an in-flight or interrupted step — are never touched, and the system prompt at surface node 0 is never inside a range.

Configuration

All fields are optional.

FieldDefaultMeaning
enabledtrueSet false to keep only the model-facing tool.
retainUnits8Most recent complete tool units kept verbatim. Counted in units, not steps — step restarts at 1 for every turn, so a step delta across a turn boundary is meaningless.
minUnitChars4000A unit smaller than this many text characters is not worth a replacement.
flushChars20000Do not break the request prefix for less than this much releasable backlog.
flushEverySteps10At most one automatic flush per this many steps.
maxUnitsPerFlush40Upper bound on replacements appended in a single flush.

Where it sits in the composition

This package ships a host-plane bundle: dsh.bundle.patch mounts one row into the profile composition, which is the only channel a published package has. A preset-plane mount is possible but must be made by hand — an installed package cannot contribute an agent-preset root (package.json.dsh carries no preset field, and a patch cannot compute a path relative to its own package). To scope this to one preset instead of the whole profile, do not enable the bundle row: install the package so node_modules can resolve it, and add the row to your own preset copy:

- id: context-offload
  name: dsh-context-offload

Enable exactly one of the two, never both.

compaction-basic remains authoritative for context pressure; this plugin is a complement. Both append logged surface replacements and both listen on agent/pre-step, and ordering between them does not matter because each only ever shadows complete tool units or its own balanced range.

Why you cannot see it in the transcript

Surface replacements are model-only. The human transcript is rendered from append-origin events on purpose, so a landed replacement never erases conversation you already read. To observe the effect, watch the context-occupancy ring beside the composer: it stops climbing and enters a sawtooth, and its click-open panel shows the conversation segment flattening.

License

MIT