DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Gzip — DeepSeek Harness 插件(DSH Plugin)
← Plugins
G

dsh-gzip

Gzip

DeepSeek Harness 插件:对 /api 响应进行 gzip 压缩——修复慢速连接下历史记录加载失败的问题

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

npx -y @deepseek-ai/dsh plugin --profile web add github:040822/dsh-gzip#e4ad6e61525e330f269e8621507a8bf869d2159c
README兼容性版本

兼容性与来源证明

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

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

版本

0.1.2stable
2026/8/28

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

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

Better Sidebardsh-better-sidebarDSH web 插件:类似 VSCode 的右侧边栏(资源管理器 / 编辑器 / 终端 / git / 浏览器),按对话会话隔离。提供服务,供其他插件注册侧边栏标签页和文件查看器。Find Plugindsh-find-plugin在代理中查找 DeepSeek Harness 插件——实时搜索 GitHub 上的 dsh-plugin 主题,并按星标数排序。DSCODE@toddzheng024/dscode-bundle完整的 DeepSeek 编码代理,支持持久化 shell、Ultra 协作和自动权限审查。Plugindsh-pluginDeepSeek Harness 社区插件市场,遵循官方插件规范——无需离开应用即可浏览、搜索并安装 9000+ 个由人工精选的社区插件。· DeepSeek Harness 社区插件市场(遵循官方开发规范):9000+ 人工精选社区插件,每日更新。

README

dsh-gzip

DeepSeek Harness 的 /api 响应 gzip 压缩插件:解决远程 / 低带宽访问时「历史加载失败:The user aborted a request.(internal)」的问题。

起因

dsh Web GUI 加载会话历史时,一页历史会把最近 50 条消息涉及的全部原始事件下发(含全部流式 chunk),响应体积可达 4–13.4MB,且服务端不做任何压缩;而浏览器侧的 RPC 请求有 30 秒硬超时。对于带宽较低或链路不佳的访问(easytier / ZeroTier / Tailscale 等异地组网、移动网络、上行受限的家宽),传输超过 30 秒就会被浏览器中止,界面显示「历史加载失败」。

实测数据(本项目开发环境的真实会话):

会话原始响应gzip 后压缩率
大型历史会话13.4MB1.16MB91.4%

gzip 之后,同样 ~3Mbps 的链路上,单页历史从 ~36 秒降到 ~3 秒,远低于 30 秒超时。

安装

前置要求:已安装 DeepSeek Harness(dsh 命令可用);Node.js ^22.19 或 >=24。

插件已发布到 npm,一条命令装好:

dsh plugin --profile web add dsh-gzip

重启生效:安装完成后,重启正在运行的 DeepSeek Harness Web 服务并刷新页面。

其他安装方式

  • 指定版本:dsh plugin --profile web add dsh-gzip@<version>
  • 还没装 DSH:npx -p @deepseek-ai/dsh dsh plugin --profile web add dsh-gzip
  • 从 GitHub 安装:dsh plugin --profile web add github:040822/dsh-gzip(仓库:github.com/040822/dsh-gzip)
  • 从源码 / 符号链接安装(不经过 npm,开发或内网部署用):把插件目录链接到 profile 的插件解析目录,并在 profile patch 中注册:
ln -sfn /path/to/dsh-gzip ~/.dsh/profiles/node_modules/dsh-gzip
# ~/.dsh/profiles/web/cordis.patch.yml
- insert:
    - id: dsh-gzip
      name: dsh-gzip

验证

装好并重启后,用一条 curl 确认响应带上了 content-encoding: gzip:

curl -s -D - -o /dev/null -X POST http://127.0.0.1:3080/api/session.list \
  -H "Content-Type: application/json" -H "Accept-Encoding: gzip" \
  -d '{"type":"client-request","rpcId":"test","method":"session.list","payload":{}}' \
  | grep -i content-encoding
# 应看到: content-encoding: gzip

浏览器端:DevTools → Network → 任意 session.* 请求的 Response Headers 应带 content-encoding: gzip;打开大型历史会话的加载时间应显著下降。

工作原理

  • dsh 的 /api 路由由 dsh-client-connection 独占注册(重复注册会抛错),bridge() 函数也未导出——插件没有"正门"可走,因此采用:monkey-patch webServer.register,在 /api 前缀路由注册的瞬间把 handler 替换为"按请求包装 res"的版本(实例级遮蔽 writeHead / write / end,不动原型,作用域仅 /api)。
  • 压缩条件:请求 Accept-Encoding 含 gzip,且响应为可压缩类型(application/json、*+json、非 text/event-stream 的 text/*),且响应未自带 content-encoding。
  • 豁免:SSE 事件流(text/event-stream)、zip 导出、未协商压缩的请求、已编码响应——全部原样透传。
  • 时序无关:不依赖插件加载顺序;上游如何修改 bridge() 都不影响本插件(挂钩的是公开服务 API 与 node:http 稳定接口)。

兼容性与定位

  • 在 @deepseek-ai/dsh 0.1.0-rc.6 上验证通过(含端到端测试:13.8MB 响应压缩为 1.19MB,JSON 完整;无 Accept-Encoding 时行为不变;WS 下行流与错误路径不受影响)。
  • 定位是过渡方案:根治在上游——历史响应瘦身(流式 chunk 事件不必全量下发)、官方启用压缩、超时策略按响应规模调整(见 deepseek-ai/deepseek-harness)。上游合并后本插件自然退居"旧版本兼容"角色;即使失效也是安全降级(不压缩、不报错),不会破坏功能。

开发

本插件由 DeepSeek V4 Flash + DeepSeek Harness vibe coding 完成:在 dsh GUI 会话中完成问题诊断(含实测数据与完整证据链)、方案设计、实现与端到端验证。全部代码就是一个 index.js,欢迎阅读、修改与提 PR。

DSH STORE 上架契约自查(install / start / uninstall 证据)

本插件以官方 bundle 形态分发:package.json 声明 dsh.bundle.patch 指向本仓库的 cordis.patch.yml,其中仅以唯一 ID dsh-gzip 新增插件自有 entry(additive),不替换/冒用任何 @deepseek-ai/* 组件或受保护 entry。兼容性在 dsh.compatibility.dshReleases 中对 DSH 官方完整版本逐项声明。

关于「additive」的诚实说明:插件在 /api 路由注册瞬间包裹(wrap)其 handler 做 gzip,从不移除官方 dsh-client-connection 的 entry,也不改写任何官方内部实现——官方 entry 仍正常存在并运行,仅在响应写出时叠加压缩。/api 路由目前没有官方暴露在 manifest 之外的压缩钩子,这是在不破坏官方行为前提下的 wrapper 方案。

一次性 Profile:安装 → 启动 → 卸载 复现步骤

# 1) 安装到一次性 profile(不污染常驻 web profile)
dsh plugin --profile gziptest add .
# 2) 启动该 profile 的 web 服务
dsh web --profile gziptest
#    启动日志应出现:dsh-gzip: /api gzip compression enabled
# 3) 验证压缩生效(请求带 Accept-Encoding: gzip 时,响应带 content-encoding)
curl -s -D - -o /dev/null -X POST http://127.0.0.1:3080/api/session.list \
  -H "Content-Type: application/json" -H "Accept-Encoding: gzip" \
  -d '{"type":"client-request","rpcId":"test","method":"session.list","payload":{}}' \
  | grep -i content-encoding
#    应看到:content-encoding: gzip
# 4) 卸载并清理一次性 profile
dsh plugin --profile gziptest remove dsh-gzip

兼容性声明(见 package.json 的 dsh.compatibility.dshReleases)

DSH 版本声明
0.1.0-rc.6compatible
0.1.0-rc.8compatible
0.1.1-rc.1compatible
0.1.1-rc.2unknown

实测覆盖:0.1.0-rc.6 / 0.1.0-rc.8 / 0.1.1-rc.1 均实跑验证无问题,故标 compatible;0.1.1-rc.2 尚未实测,按 STORE 允许的 unknown 声明(不视为不兼容)。后续在 rc.2 上跑一遍即可改为 compatible。

License

MIT