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
P

dsh-perf-patch

Perf Patch

仅运行时性能补丁,用于 DeepSeek Harness:合并 agent-mount 工具/变更风暴,按修订版本缓存工具架构,并提前终止 dsh-ops presentation 探测。不修改任何第三方源代码。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:ChenXu233/dsh-perf-patch#96d7dcb1d18b25262cb0294175f154e7232eb886
README兼容性版本

兼容性与来源证明

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

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

版本

0.1.0stable
2026/10/24

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 1
周下载
0
最近提交
2026/10/24
查看源码 ↗
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 Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话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 hub

README

dsh-perf-patch

Runtime-only performance patches for DeepSeek Harness (DSH) when third-party plugins make the host O(N) slow. Nothing in node_modules is edited: the patches wrap host services at load time, and each one fails safe — on any doubt it falls back to the original code path instead of changing behaviour.

Built and measured on DSH Desktop 0.2.1-rc.2 (Electron 44 / Node 24 / Windows 11) with dsh-ops and dsh-mcp-connector installed.

What it fixes

1. The agent-mount tools/change storm

Mounting an agent registers ~161 tools. Every registration fires tools/change, and every listener that reacts (discovery reconcile, PTC reconcile, MCP governance) replays its full O(tools) work. One agents.create therefore emits hundreds of notifications, each listener re-running hundreds of times.

Fix: while agents.create / agents.resume runs, tools.layers.onChange is suppressed and the notification is emitted once, synchronously, when the outermost call returns.

Suppress + synchronous flush is deliberate. Flushing via queueMicrotask starves the event loop (listeners queue more microtasks than the loop drains) and was observed to freeze the UI; that variant was removed and is not shipped.

2. tools.schemas() deep-clones on every read

schemas(scope) clones every tool's JSON Schema; schemaOf(def, true) clones one. Both are pure functions of the tool revision / definition, yet listeners call them in loops.

Fix: memoize schemas(scope) per tool revision (WeakMap keyed by scope, invalidated on tools/change) and schemaOf(definition, true) by definition + parameter identity. Returned objects are shared between callers, so treat them as read-only.

3. dsh-ops asks a one-boolean question with a full prompt assembly

dsh-ops/lib/presentation.js decides "is this agent on PTC presentation?" by calling systemPrompt.assemble({scope, signal}) and then reading exactly one thing:

assembly.sections.some(s => s.name === 'tools:ptc-only' && s.text.trim() !== '')

assemble() renders ~36 sections and structuredClones every tool schema (~250–310 ms measured). dsh-ops does this 6× per live agent, per reconcile.

Fix: wrap systemPrompt.assemble. When — and only when — the call is one of those probes, return a minimal assembly built from the same layers:

{ sections: [{ name: 'tools:ptc-only', text }], contexts: [], tools: [] }

Probe detection uses dsh-ops' own marker (isPresentationProbe, a WeakSet reached through the module cache); if that import is unavailable it falls back to "the stack contains dsh-ops/lib/presentation.js". Every other caller — including the real prompt assemblies in ptc/index.js and discovery/index.js — passes straight through.

The section text is recomputed on every call. Caching it was tried and reverted: a stale control input turns reconcile into a fixed point that never settles, and freezes the host.

Measured on a 3-agent instance: per probe 254–312 ms → 0 ms (~4.9 s per reconcile sweep), with the PTC decision byte-identical for all 3 agents.

Install

cd ~/.dsh/profiles/desktop
npm install ChenXu233/dsh-perf-patch

Then list "dsh-perf-patch" in the dsh.profile.bundles array of the profile's package.json. The package ships dsh.bundle.patch → cordis.patch.yml, which inserts the loader entry. Adding the name to bundles alone is not enough — without the patch layer the plugin is never loaded.

From a checkout: clone this repo into <profile>/node_modules/dsh-perf-patch and add the name to bundles the same way.

Kill switches

VariableEffect
DSH_PERF_PATCH=0Disables all three patches at load time.
DSH_PERF_PATCH_VERIFY=1Probe short-circuit also computes the full assembly and compares. On divergence it logs an error and permanently disables the short-circuit for the session.

Runtime counters:

globalThis.__dshPerfPatchProbe   // { hits, bypass, mismatches, enabled }

hits = probes answered short, bypass = calls that went to the real assemble. If hits stays 0, detection is not matching and the plugin is a no-op.

Expectations

  • Intended to become inert once upstream fixes land: the schema cache is keyed by revision (correct regardless), and the probe short-circuit stands down when dsh-ops stops matching.
  • The batch gate is the only behavioural change: listeners fire once per mount instead of once per tool. That is the point, but a plugin relying on every intermediate tools/change during mount would now see one.
  • Do not mutate objects returned by schemas() / schemaOf().

Related upstream issues

  • dsh-ops #333 — discovery reconcile recomputes presentation for every agent
  • dsh-ops #369 — tools.schemas() deep copy with 258 tools, linear slowdown
  • dsh-mcp-connector #178 — governance reconcile cost

If this plugin causes a problem: set DSH_PERF_PATCH=0, confirm it disappears, and open an issue with the numbers.

License

MIT