DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
R

dsh-readprune

Readprune

在 DeepSeek Harness 会话中节省 token:可按行范围或符号引用读取任意文件,而不是读取整个文件;同时限制过大的工具结果,并保留恢复路径。修剪操作在源头进行,而不是等内容进入上下文后再处理。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:songrui111/dsh-readprune#1f13cf988ba407f766a1f06a3388b17af018ead5
README兼容性版本

兼容性与来源证明

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

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

版本

0.6.0stable
2026/10/30

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Experimental Inspector@deepseek-ai/dsh-experimental-inspector用于 Host 调试和 Client Runtime 检查的实验性跨 realm CDP hubExperimental Inspector Profile@deepseek-ai/dsh-experimental-inspector-profile用于原始 Session 日志和 Chat 节点检查的可选 Web 捆绑包

README

dsh-readprune

Save tokens in a DeepSeek Harness session by keeping content out of the context in the first place.

A Host plugin that prunes input at the source rather than compressing it afterwards: read any file by line range or symbol mention instead of whole, and bound oversized tool results at the boundary while keeping a recovery path.

What makes this different

Most token-saving plugins work on content that has already entered the context: they summarize it, fold it, or trim it after the fact. This one tries to keep the expensive content out in the first place:

  • A question about one function no longer costs a whole file.
  • A 177,000-character docs page no longer costs a whole page.

Nothing is rewritten by a model, and nothing is lost: every pruned body is archived and readable again by offset.

Three deferred-loaded tools

ToolWhat it does
read_rangeReads only the lines asked for: a line window, every mention of a symbol with context, or a structural outline. Hard-capped output.
tool_catalogOne-line inventory of the tools this session can call, so a deferred toolset stays discoverable.
fetch_recallReads any slice of a pruned result by absolute character offset.

Two result-shaping passes

Scoped by tool name through tools/post-execute:

  • Web pages — a bounded prose head (starting at the page's content landmark when it marks one) plus a digest of the page's headings.
  • Shell output — head and tail. Diagnostics live at the end, and the host's own byte cap otherwise drops them.

Measured

Session level (the number that matters)

A tool result is re-sent on every step after it enters, so its real cost is size x (steps remaining). Modeling a 30-step session with four file reads:

Prompt tokens
Whole-file reads667,776
Pruned reads374,512
Saving293,264 (43.9%)

The saving grows with session length: 33.6% at 10 steps, 43.9% at 30, 47.8% at 100. It is capped below 50% because a fixed prompt baseline (opening message, system prompt, tool schemas) is paid on every step and is not touched here.

Reproduce it yourself:

npm run measure:session

Per operation

Same question, only the read strategy changed:

FileLinesWhole readread_rangeSaved
index.js4644,661 tok188 tok96.0%
client.js7109,389 tok274 tok97.1%
bench/index.js8758,999 tok513 tok94.3%

Oversized results:

BodyRawPrunedSaved
docs page (live fetch)46,582 tok583 tok98.7%
shell output (2.8M chars, host-capped)16,842 tok1,515 tok91.0%

The per-operation figures are large because one operation can replace a whole file. They are not whole-session savings — use the session table for that.

Token counts use a deterministic approximation of the harness token rule (CJK about 1.7 chars/token, code about 3.8 chars/token). They compare strategies; they do not predict a bill.

Install

dsh plugin install dsh-readprune

The row id stays token-diet across renames, so a config override in your own cordis.patch.yml keeps applying.

Config

KeyDefaultMeaning
guidetrueInject the "prefer read_range" prompt section. Without it the tools exist but a model keeps dumping whole files. Costs ~162 tokens per turn.
exposeCatalogtrueRegister tool_catalog.
slimtruePrune oversized results via tools/post-execute.
slimWebTools["web_fetch"]Web-shaped results: prose head + heading digest.
slimShellTools["pwsh","bash","wsl","tty_run"]Shell-shaped results: head + tail. post-execute is a global waterfall, so only listed tools are touched.
maxInlineChars8000Above this size a result is pruned.
headChars1500Web mode: characters kept inline.
shellHeadLines / shellTailLines60 / 60Shell mode: lines kept from each end.
durableArchivetrueArchive pruned bodies under ~/.dsh/token-diet/archive so locators survive a restart. Falls back to memory if the disk refuses.
maxArchiveFiles200Oldest archived bodies are pruned past this count.

Tests

npm test               # five suites, no network
npm run measure:reads  # the per-operation table
npm run measure:page   # the web page figure (fetches docs.python.org)
npm run measure:session # the session table

npm test covers tool invocation end to end, the pruning passes on an offline fixture, the post-execute wiring (including proof that read/grep/edit are untouched), and the durable archive.

Honest limits

  • It cannot shrink other plugins' tool schemas. There is no service or event to mark another plugin's ToolSchema as deferLoading; only this plugin's own tools are deferred. On a heavily loaded profile the fixed per-turn schema cost remains.
  • symbol mode is textual, not semantic. It matches substrings, so save also hits savesSelection. Use mode: outline when the identifier is unknown.
  • read is untouched. The upstream file tools keep working, so a model can always fall back — which means savings appear only when it actually chooses read_range.
  • Archived bodies are plain files under ~/.dsh/token-diet/archive, readable by anything running as you. Do not enable this on shared machines if fetched content may be sensitive.
  • spillStore is not used. Its runtime availability could not be confirmed, and a hard dependency on it would disable pruning entirely if absent.

Licence

MIT. Icon is original artwork drawn for this plugin.