gameswu/dsh-pref-kit
DSH 性能插件:在数据流源头合并模型流式输出的相邻文本增量,减少会话事件量, 缓解长会话与多 agent 并发下的卡顿与资源占用。不改任何接口与协议。
catalog descriptioncatalog 简介 / catalog description:缓解部分dsh性能问题的插件
Project Overview项目介绍
dsh-pref-kit is a deprecated native performance plugin built exclusively for DeepSeek Harness (DSH). It was created to address performance issues in long conversational sessions and multi-agent concurrent workflows for DSH versions older than 0.1.5. To install the plugin manually, you first clone the repository, run npm run build to compile it, then use the DSH CLI command dsh plugin --profile <profile-name> add to add the compiled local package to your DSH profile, and restart DSH to activate it. Its core feature coalesces adjacent streaming text increments from LLM outputs, cutting the total number of session events by between 11% and 56% across different usage scenarios.
By default, the stream coalescing feature is enabled with a 30ms merge window, which can be adjusted from 0ms to 200ms via a configuration card in DSH’s Settings > Plugins menu. Any configuration changes take effect immediately without a restart and are saved across restarts. The plugin also offers three experimental opt-in features: replacing the official trajectory view with a lighter alternative, optimizing chat rendering by skipping offscreen messages, and allowing users to enable or disable official plugin rows via a whitelist. These features are all disabled by default, and target users running older DSH versions who want extra performance gains for long sessions.
This plugin has been officially deprecated since September 10, 2026, because all of its performance optimization features have been merged into the official DSH 0.1.5 release. The repository is now kept only as an historical archive, and the maintainers strongly discourage new installations. Any user that still has this plugin installed is instructed to remove it via the DSH CLI command dsh plugin --profile <name> remove dsh-pref-kit and restart DSH. The final release version is 0.5.1, it requires DSH >= 0.1.5-rc.1, Cordis >= 4.0.2, Node.js >= 20, and it is distributed under the open source MIT license.
dsh-pref-kit 是一个已停止维护的原生 DSH 性能插件,专为 0.1.5 版本之前的 DSH 开发,用于优化长会话与多代理并发场景的性能。它的核心能力是在数据流源头合并模型流式输出的相邻文本增量,减少会话事件总量,缓解卡顿并降低内存、磁盘与带宽占用,且不会修改任何原有接口与协议。
该插件默认开启流式合并功能,可将事件量降低 11% 到 56% 不等,也支持用户在 DSH 的设置插件面板通过配置卡片修改合并窗口参数,修改即时生效并会跨重启保留。它还提供多个实验性功能,包括替换轻量轨迹视图、聊天区渲染优化、官方插件运行时行管理等,适合遇到长会话卡顿问题的旧版 DSH 用户使用。
该插件自 2026 年 9 月 10 日起已弃用,因为 DSH 0.1.5 版本已经内置了该插件提供的所有优化功能,不再建议新用户安装。它要求 DSH 版本不低于 0.1.5-rc.1,对应 Cordis >= 4.0.2,Node >= 20,采用 MIT 许可证开源,当前仓库仅保留源码作历史存档。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-pref-kit(gameswu/dsh-pref-kit)
仓库:https://github.com/gameswu/dsh-pref-kit
本站详情页:https://www.yhbd.top/plugins/gameswu-dsh-pref-kit/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 5 · 最近提交 2026-09-16 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:gameswu/dsh-pref-kit
把 gameswu/dsh-pref-kit 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-pref-kit
⚠️ 已弃用(DEPRECATED,自 2026-09-10)
DSH 0.1.5 已内置长会话性能优化,并提供了官方右侧栏、轨迹视图与插件行管理能力, 本插件的存在价值已消失,不再维护、不建议新安装。 已安装的 profile 请执行
dsh plugin --profile <name> remove dsh-pref-kit后重启 DSH。 仓库源码仅作历史保留,详见 DEPRECATED.md。
DSH 性能插件:在数据流源头合并模型流式输出的相邻文本增量,减少会话事件量, 缓解长会话与多 agent 并发下的卡顿与资源占用。不改任何接口与协议。
最终版本 v0.5.1(已弃用),历史要求 DSH >= 0.1.5-rc.1(Cordis >= 4.0.2,Node >= 20)。
功能
- 流式合并(默认开启):把同一文本块内的相邻 text/reasoning 增量合并后再写入
会话日志与推送,事件量下降 11–56%(短回复 −45.6%、长回复 −53.5%、6 并发 −55.6%,
复杂长会话 −11%),内存 / 磁盘 / 带宽同步下降;
windowMs = 0即完全透传, 与未装插件逐事件等价。 - 设置卡片:Settings → Plugins 提供配置卡片(与内置卡片同款样式),修改保存后 即时生效、跨重启保留。
- 实验开关(默认全关):
- 替换轨迹视图:用轻量轨迹页接管官方轨迹入口(需先禁用官方
ui-trajectory行), 消除轨迹页在流式期间的每帧全量重算(基准模型实测 ×239–×184.9k 工作降幅); - 聊天区渲染提示:让浏览器跳过视口外消息的绘制(画面不变);
- 运行时行管理:按白名单禁用/启用官方插件行(如遥测、token 统计);Agent Teams、会话持久化与官方右侧栏行受保护、不可停用;即时生效并持久化。
- 替换轨迹视图:用轻量轨迹页接管官方轨迹入口(需先禁用官方
安装
cd dsh-pref-kit
npm run build # 构建
dsh plugin --profile web add "file:$(pwd)" # 装入目标 profile(自动挂载插件行)
# 重启 DSH 生效(启动日志出现 [dsh-pref-kit] llm/stream coalescer active)
更新:npm run build 后先 dsh plugin --profile web remove dsh-pref-kit 再 add。
卸载:dsh plugin --profile web remove dsh-pref-kit。
配置
| 配置项 | 默认 | 说明 |
|---|---|---|
windowMs |
30 ms | 合并窗口(0–200ms);0 = 关闭合并(逐 token 透传)。窗口越大事件削减越多,首个字延迟 ≈ 窗口 |
实验项(Settings → Plugins → dsh-pref-kit 卡片 → 实验组):
| 配置项 | 默认 | 说明 |
|---|---|---|
experimental.replaceTrajectoryView |
false | 替换轨迹视图;需同时把 ui-trajectory 加入下方行管理的禁用列表(或手工禁用该行) |
experimental.chatContainment |
false | 聊天区渲染提示(画面不变,浏览器少画视口外内容) |
experimental.rowManager.enabled / disabledRows |
false / [] | 运行时禁用官方行(白名单:ui-trajectory、session-telemetry-otel、token-meter、session-stats、session-projection-cache;这 5 行在 0.1.5-rc.1 仍存在);Host 即时生效并持久化,客户端需刷新页面。session-query-sqlite 仍是 base/web 中唯一的 ctx.sessionQuery provider(schema 默认 openAt: startup,base/web 组合覆盖为 never,不打开 SQLite),不可停用,旧配置残留的禁用值会被强制恢复。Agent Teams 行(agent-team、tool-agent-team、ui-agent-team)、持久化前置行(session-persistence-jsonl、session-projection)与官方右侧栏行(ui-sidebar-right、ui-sidebar-documentpreview、ui-sidebar-files)不在白名单内,行管理器不会触碰——禁用 session-persistence-jsonl 会破坏 Team 激活;旧的 session-persistence-sqlite 后端早已移除 |
基准测试
离线可复现(固定种子 + 虚拟时钟,不连接 DSH;含逐块协议等价断言与复杂长会话生成器, 任何人可逐位复现):
| 场景 | 事件数(基线 → 合并 30ms) | 首块延迟 |
|---|---|---|
| 短回复 | 810 → 441(−45.6%) | 16 → 40ms |
| 长回复 | 9674 → 4501(−53.5%) | 20 → 28ms |
| 复杂长会话(生成器) | 12210 → 10869(−11.0%) | 30 → 60ms |
| 6 并发 agent | 35592 → 15788(−55.6%) | 18 → 50ms |
运行:npm run benchmark。详细分析与实验性策略消融见性能分析报告。
aa2246740/dsh-watcher
fredalxin/dsh-solo-thinking
better-er/dsh-pause
SakalioLabs/dsh-code-ide
lilwhich/dsh-plugin-gather
asukasec/dsh-message-preview