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

dsh-token-optimizer

Token Optimizer

面向 DeepSeek Harness 的确定性、可恢复工具结果压缩与缓存感知压缩整理

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

npx -y @deepseek-ai/dsh plugin --profile web add github:Snow-ea/dsh-token-optimizer#e4c4c825b7152b16610807107c272005a1ccebbb
README兼容性版本

兼容性与来源证明

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

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

版本

0.2.5stable
2026/10/30
0.2.4stable
2026/10/17
0.2.3stable
2026/9/29
查看其余 5 个版本收起版本
0.2.2stable
2026/9/25
0.2.1stable
2026/9/10
0.2.0stable
2026/9/3
0.1.9stable
2026/9/1
0.1.8stable
2026/8/30

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

README

dsh-token-optimizer

Deterministic, recoverable tool-result compression and cache-aware compaction for DeepSeek Harness 0.2.1-rc.5.

中文文档

What it does

  • Compresses large successful text tool results before they repeatedly enter the model context.
  • Compresses PTC sub-dispatch log copies without changing the complete structured values received by run_code programs.
  • Archives every lossy replacement and exposes retrieve_spill for exact, session-authorized recovery.
  • Provides a root-level BasicCompactionEngine adapter with a 62.5% default threshold while preserving DSH's cache-aware replay, branded Session API, and routed image accounting.
  • Adds a Web conversation dashboard through the split Conversation, Renderer, and Session client contracts.
  • Declares a localized title, description, and icon so Plugin Manager shows it as a first-class bundle.

Install

Install the 0.2.5 bundle into a DSH 0.2.1-rc.5 Web profile:

dsh plugin --profile web add dsh-token-optimizer@0.2.5

Restart the existing dsh web process after installation. The bundle enables recoverable tool-result compression, spill retrieval, projection, the Web dashboard, and the 62.5% automatic compaction engine across all four shipped agent modes. No user preset copy is required.

The root engine observes each agent's pressure and overflow lifecycle. In Standard, PTC, and Creator modes it runs before the isolated stock engine, so the surface is reduced at 62.5% and the stock 80% fallback has no second reduction to perform. Minimal mode has no preset compaction group and uses the root engine directly. The optional preset-cordis.yml fragment remains for deployments that deliberately want to replace a preset's isolated provider itself; do not edit shipped presets. DSH 0.2.1-rc.5 ships the four presets as extra patch layers inside its Web bundle, so a user-copied preset from an older DSH should be revalidated against the current composition before reuse.

DSH 0.2.1-rc.5 ships its own spill subsystem (dsh-spill-local plus dsh-spill-policy at maxInlineTokens: 12500). The optimizer keeps its durable archive as the retrieval authority and mirrors each replacement into that backend when it is present, so the two coexist without compressing the same result twice.

Since DSH 0.1.7-rc.1 the host checks a plugin's @deepseek-ai/dsh* peer ranges at startup. 0.2.0-rc.2 turned that check from fail-soft into fail-closed: a bundle whose ranges do not match the runtime is refused outright rather than disabled in place. This plugin declares >=0.1.5-rc.1 <0.3.0, so one release covers 0.1.5-rc.3 through 0.2.x while explicitly refusing the unaudited 0.3.0. The previous ^0.1.5-rc.1 range could not reach 0.2.0 — a caret on a 0.x version only authorises patch movement, which is why 0.2.2 is skipped on every 0.2.x runtime. 0.2.1-rc.2 adds an optional engines.dsh range that would take precedence over the peers when present; this plugin deliberately keeps the peer form, so exactly one requirement surface stays authoritative. See the 0.2.0-rc.2 peer-gate section and the 0.2.1-rc.2 gate section for the measured matrices.

Configuration

This plugin's early compaction is controlled by one boolean, compaction, which defaults to on:

# Turn the plugin's 62.5% early compaction off
- id: dsh-token-optimizer
  config:
    compaction: false

With it off, no root ctx.compaction provider and no pressure/overflow listener is registered, while tool-result compression, retrieve_spill, the session projection, and the dashboard all stay active. Three things to know:

  1. It disables this plugin's early compaction, not all compaction: the isolated stock engines shipped with Standard, PTC, and Creator still fall back at 80%, so you return to the DSH default you had before installing the plugin. Minimal has no compaction group and therefore no compaction at all once it is off.
  2. A profile patch replaces a plugin's whole config instead of deep-merging it. Every field left unwritten falls back to the value the shipped bundle sets, so a switch-only override is safe and a regression test locks that equivalence; write the other fields out when you also want to change them.
  3. With the switch off, non-Web profiles no longer need the compaction overlay described in the compatibility notes, because the root provider is never claimed. While the switch is on, that overlay is still required, and its absence fails loudly with service "compaction" has been registered at <BasicCompactionEngine> rather than degrading silently.

The threshold itself defaults to 0.625 and can be changed:

- id: dsh-token-optimizer
  config:
    thresholdRatio: 0.5
    retainRatio: 0.16

retainRatio must stay below thresholdRatio, or the upstream engine refuses to load.

Verify

pnpm install
pnpm run check
npm pack --dry-run

The current test suite covers deterministic compression, persistent recovery, session lineage authorization, compaction defaults, the compaction switch, DSH projection behavior, and real tool-runtime integration.

Compatibility

dsh-token-optimizerDeepSeek HarnessStatus
0.1.90.1.1-rc.2Superseded
0.2.00.1.2-rc.1Superseded
0.2.10.1.5-rc.1Superseded
0.2.20.1.5-rc.1 … 0.1.7-rc.2Superseded
0.2.30.1.5-rc.1 … 0.2.xSuperseded
0.2.40.1.5-rc.1 … 0.2.xSuperseded
0.2.50.1.5-rc.1 … 0.2.xCurrent release

0.2.0 removed the retired dsh-client-runtime dependency, uses the split Conversation/Renderer/Session client graph, folds projections through the on-demand Session log API, and handles PTC durable dispatch logs. See the 0.1.2-rc.1 compatibility research.

0.2.1 adapts to the SpillSource discriminated union that dsh-spill gained — tool producers must now declare kind: 'tool' — and raises every declared DSH range to 0.1.5-rc.1. No other plugin surface changed between the two releases. See the 0.1.5-rc.1 compatibility audit.

0.2.2 adapts to 0.1.7-rc.2: it follows the removal of the tool-result wrapper block, adopts the awaited agent/created contract, mirrors the new upstream headroomTokens field behind two compile-time drift assertions, and declares plugin metadata for Plugin Manager. The compaction switch can also now turn the plugin's early compaction off. It keeps supporting 0.1.5-rc.3, because the host's peer check accepts ^0.1.5-rc.1 for the whole 0.1.x line. See the 0.1.7-rc.2 compatibility audit.

0.2.4 adapts to 0.2.1-rc.2. No plugin-facing declaration changed in a way this plugin can observe, and no source line changed: thirteen of the sixteen audited packages differ at the .d.ts level, but every difference is additive, internal, or a doc-comment rewrite, the three core contract packages (dsh-compaction-basic, dsh-session-projection, dsh-spill) are byte-identical, and cordis 4.0.5 / schemastery 3.18.5 emit identical declarations. The release re-pins the tested closure and certifies compress → archive → retrieve on a real 0.2.1-rc.2 headless session. See the 0.2.1-rc.2 compatibility audit.

0.2.5 adapts to 0.2.1-rc.5. Fifteen of the sixteen audited packages are byte-identical at the .d.ts level; the only change is dsh-client-ui-conversation, and it is purely additive (View tabs and pins, the header More menu, draft handling, MessageSubmissionState.newSession/agentPreset), so no source line changed and all 24 tests pass on the real 0.2.1-rc.5 closure. The launcher's gate implementation is byte-identical to 0.2.1-rc.2, the existing >=0.1.5-rc.1 <0.3.0 peer window still loads through 0.2.1-rc.5 and still refuses 0.3.0, and a real headless 0.2.1-rc.5 session was certified end to end: a 34,532-character tool result compressed to a mode=large spill with a matching SHA-256 artifact, retrieve_spill recovered it in a later turn, and the tokenOptimizer projection folded the saving. See the 0.2.1-rc.5 compatibility audit.

0.2.3 adapts to 0.2.0-rc.2. No plugin-facing declaration changed in a way this plugin can observe — fourteen of the sixteen audited packages are byte-identical at the .d.ts level, and the two that moved (dsh-session's repair internals, dsh-client-ui-conversation's submission analytics) are outside its surface, so the 0.2.2 sources compile and all 24 tests pass unchanged. The release exists because the launcher's peer gate became fail-closed: the declared range moves to >=0.1.5-rc.1 <0.3.0, which is what keeps the bundle loading on 0.2.x while still covering 0.1.x. See the 0.2.0-rc.2 compatibility audit.

The DSH packages remain optional peer dependencies so the profile runtime supplies the matching services.

License

MIT

相关插件

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

Connect Workbuddydsh-connect-workbuddy把本机登录的 WorkBuddy 模型(国内版与国际版)接入 DeepSeek Harness:每次刷新按上游目录自动读取每个模型的积分倍率,支持逐模型图片输入开关、多账号切换与账号池自动换号,并提供每日签到、卡片与输入框里的胶囊积分读数等只读积分概览。Xdpooldsh-xdpool将你拥有的所有免费额度汇聚为一个 DSH 模型池:合并所有本地登录的 WorkBuddy 账户并自动故障转移,通过二维码/网页登录 13 个供应商,汇总 76 个供应商的免费层额度,此外还提供用量仪表盘、模型路由和本地 OpenAI 兼容网关Model Router@ljwei-stak/dsh-model-router适用于官方 DeepSeek Harness Desktop 的模型路由器:支持成本感知的任务路由、依赖工作包,以及官方供应商 CLI 的发现、安装和执行。GAL 可通过 @ljwei-stak/dsh-galgame 单独获取。Agy Linkdsh-agy-link适用于 DeepSeek Harness 的 Google Antigravity(agy CLI)模型——将 Gemini/Claude/GPT-OSS 订阅流式接入 DSH,并支持思考过程、工具活动、令牌使用量以及在 GUI 中通过 Google OAuth 登录。