DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

@local/dsh-lean-mode

Lean Mode

以精简、可执行的形式向模型提供 DSH 工具——安装后即可使用。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:q862877400-ux/dsh-lean-mode#15076a54679951b4764389b082af544cb49eb98d
README兼容性版本

兼容性与来源证明

Lean Mode 以 @local/dsh-lean-mode 发布,当前版本为 1.0.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

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

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

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

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

认领这个 Plugin →
报告问题

README

dsh-lean-mode

English | 中文

A DeepSeek Harness plugin that presents every tool to the model in a lean, executable form — install it and it just works, remove it and the old form is back. No core changes.


The problem

Tool schemas are sent on every request. In a deployment with hundreds of MCP tools they dominate the context:

DeploymentToolsTool schemasShare of the first request
Default standard preset (measured on a real deployment)8489 KB~22,300 of 36,264 tokens — 61.6%
All MCP tools mounted731988 KB~275,000 tokens — 27.5% of a 1M window

Most of that is JSON-Schema punctuation the model rarely needs: nested descriptions, deep objects, defaults. The names and the top-level contract are what make a call possible.

What this plugin does

Two things, per assembly:

  1. Shrinks each tool's parameter schema to its top-level contract — top-level keys, required, each key's type and a short enum when declared. Nested structure, descriptions and defaults are dropped.
  2. Appends a tools:catalog prompt section listing every tool — including the ones the model is unlikely to recall — with the exact argument envelope and a one-line purpose.

Why the envelope must survive

In a real catalogue 64% of tools take a single required wrapper key (commonly params). Collapse the schema to an open {type:'object'} and the model flattens the arguments, so every call is rejected:

Channel shapeCalls that actually execute
Open skeleton additionalProperties: true
1.7%
Top-level contract kept95.0%

Measured effect

Same model, same 199-task set, same catalogue:

ToolsBaseline (full schemas)leanRatio
26~5,340 tok~2,385 tok0.45
84 (a real deployment's default preset)~22,300 tok~9,400 tok0.42
731 (every MCP tool)~275,000 tok~68,000 tok★ 0.247

End-to-end callability (tool name in the catalogue and the emitted arguments satisfy the real schema):

PresentationEnd-to-end
Full JSON Schema95.0%
lean89.9%
Open skeleton only1.7%

Install

From GitHub (verified end to end: installed this way, the mode appears in the UI preset menu and takes effect)

dsh plugin --profile web add github:q862877400-ux/dsh-lean-mode

From a local checkout

dsh plugin --profile web add <path to this directory>

Uninstall

dsh plugin --profile <profile> remove @local/dsh-lean-mode

The bundle carries both the plugin row and a Lean mode preset declaration, so once installed the mode appears in the UI's preset menu; removing the bundle removes both.

How it works

system-prompt/assemble is a waterfall whose contract states the returned value is authoritative, and scoped listeners receive only that scope's assemblies. This plugin therefore:

  • registers a profile-level listener, so it sees every assembly;
  • asks agentPresets.composedPreset(agent.ctx) which preset the assembly's agent runs under;
  • transforms only when that preset is one it was configured for.
export function apply(ctx, config) {
  const wanted = config?.presets            // e.g. ['lean']
  ctx.on('system-prompt/assemble', async (assembly, context, next) => {
    const base = await next()
    if (wanted && !wanted.includes(presetOf(ctx, context?.scope))) return base
    return { ...base, tools: base.tools.map(toShallow), sections: [...base.sections, catalog] }
  })
}

It uses only upstream APIs — no new tools.mode value, no patched package.

Configuration

KeyDefaultMeaning
presetsundefinedPreset ids this applies to. Omit to apply to every session.
shapetrueProject parameters to the top-level contract.
catalogtrueAppend the tools:catalog section.

Limitations

  • ★ All figures were measured on one local deployment (731-tool catalogue unioned from real sessions; 199 tasks; a single model). Ratios will differ elsewhere — re-measure before relying on them.
  • ★ Callability is judged as "the emitted call is valid against the real schema", not "the tool succeeded on a machine".
  • ★ End-to-end accuracy (89.9% vs 95.0%) is a single-run figure on that task set.
  • ★ The catalogue repeats each tool's one-line purpose, so the win grows with the size of the parameters, not merely the count of tools.

License

MIT. See LICENSE and THIRD-PARTY.md — cordis.patch.yml restates a preset composition from DeepSeek Harness (MIT, Copyright (c) 2026 DeepSeek); the plugin source is original.