brunhildzhou/dsh-context-zip 预览 preview

brunhildzhou/dsh-context-zip

DSH 插件:接管 DeepSeek Harness 的会话压缩,产出结构化交接摘要、可回查分段与检索工具|A DSH plugin that takes over session compaction.

Project Overview项目介绍

dsh-context-zip is a context-compression plugin built specifically for DeepSeek Harness (DSH). At version 0.1.8 under the MIT license, it is published on both npm and GitHub as an installable DSH extension. When the host triggers automatic compression near the context window limit, the plugin intercepts the built-in summariser and produces a five-section handoff summary covering Goal and intent, Decisions, Current state, Next steps, and Anchors. Replaced original text is filed into a segmented directory that can be queried later by segment ID or event ID through history_segments, history_read, history_search, and history_find.

Installation follows two paths. Path A installs from npm via dsh plugin --profile web add dsh-context-zip; after first launch the user opens the ContextZip section of the settings panel, taps the "接管" button on the compression backend row, then restarts the harness once. Path B checks out source and runs node install.mjs --profile-dir <profile directory> to install the package and redirect together. The plugin does not modify DSH source code; it mounts by overriding the @deepseek-ai/dsh-compaction-basic package name with a private redirect that the installer refuses to overwrite on real packages. Upgrades with pnpm preserve the redirect, so wire-up is performed once.

Dependencies require Node.js ^22.19.0 || >=24.0.0, peer ranges covering >=0.1.5-rc.2 <0.2.0-0, >=0.1.6-0 <0.2.0-0, and >=0.1.7-alpha.1 <0.2.0-0, with empirically validated DSH versions 0.1.5-rc.2, 0.1.6-alpha.2, 0.1.7-alpha.1, and 0.1.7-rc.1. @deepseek-ai/schemastery has a peer floor of ^3.18.1; Schema.volatile() is needed for auto-form generation and arrives only at 3.18.3, otherwise the settings page falls back to the plugin's own configuration editor while compression still works. Retrieval throttling effects are not established, the per-session override table is read-only on the panel, the session title refreshes at most every 60 seconds, and after a DSH upgrade users must run --check to refresh the redirect. The plugin supports DSH only and cannot run standalone.

dsh-context-zip 是一款专为 DeepSeek Harness(DSH)打造的上下文压缩插件,当前版本 0.1.8,遵循 MIT 协议发布在 npm 与 GitHub。它在 DSH 会话临近窗口上限触发自动压缩时接管内置摘要器,按 Goal and intent、Decisions、Current state、Next steps、Anchors 五段产出交接摘要,被替换的原文进入分段目录并支持按段号或事件号回查。

安装提供两条路径:路 A 通过 dsh plugin --profile web add dsh-context-zip 从 npm 拉取,首次启动后需在设置面板 ContextZip 一节点击「接管」并重启 harness;路 B 从源码检出运行 node install.mjs --profile-dir <profile 目录>,一步完成本体与重定向安装。插件不修改 DSH 自身代码,重定向以 @deepseek-ai/dsh-compaction-basic 同名私有包形式挂载,pnpm 升级不会清掉重定向。

依赖方面要求 Node.js ^22.19.0 || >=24.0.0,peer 范围 >=0.1.5-rc.2 <0.2.0-0 等 DSH 版本;检索节流效果未确立,按会话覆盖表在面板上只读,升级 DSH 后须用 --check 确认重定向是否过时。该插件只支持 DSH,无法独立运行。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
  • No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
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 dsh-context-zip

把 brunhildzhou/dsh-context-zip 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-context-zip

npm version npm downloads license stars

给 DeepSeek Harness(DSH)用的上下文压缩插件:接管宿主自带的压缩摘要器,改成固定五段式交接摘要,被压掉的原文进分段目录、可回查。 版本 0.1.9,MIT 许可。见 npm 上的 dsh-context-zip。English

能力一览

  • 五段式交接摘要:压缩那一步改走本插件,摘要按 Goal and intent、Decisions、Current state、Next steps、Anchors 五段产出。
  • 原文可回查:每次压缩记一段,段号、被替换的事件号、摘要事件号都能列出来,原文按段号或事件号读回。
  • 检索工具与导出:history_segments、history_read、history_search、history_find 只读本会话历史,另有只读服务与 /zip-export 导出。
  • 可选能力:模型工作笔记、机械摘要兜底、散文摘要排版重排,默认都是关的;一个设置面板控制以上全部。

安装与升级

两条路,任选一条。

路 A:从 npm 装。 装完能启动、面板能打开,但压缩不生效(缺行重定向)。补法:设置面板 ContextZip 一节里,点「压缩后端」那一行右端的「接管」,然后重启 harness 一次。

dsh plugin --profile web add dsh-context-zip

升级把版本换掉再跑一次:

dsh plugin --profile web add dsh-context-zip@<版本>

实测事实:pnpm 不会清掉重定向,所以接管只需做一次,之后升级不用重新接管。

路 B:从源码检出装。 一步装好本体与重定向。profile 至少启动过一次,再跑:

node install.mjs --profile-dir <profile 目录>

例如 node install.mjs --profile-dir <harness home>/profiles/web。完整参数、卸载与回滚见 docs/安装与卸载.md。

它接管的是哪一步

DSH 在上下文接近窗口上限时自动压缩会话。默认实现让模型自由写一段摘要,原文之后难找。本插件把这一行替换掉:

自动压缩触发
  │
  ├─ 未接管:内置后端写自由摘要,原文难回查
  │
  └─ 已接管:本插件写五段交接摘要
        ├─ 摘要落盘(压缩后唯一的权威)
        └─ 原文进分段目录(按段号 / 事件号回查)

接管是逐行替换,不是并行挂载。插件不修改 DSH 自身代码,不往会话日志写任何事件。

能力表格

能力 说明 默认状态
压缩接管 五段式交接摘要,软目标 3072 token,硬上限 6144 关(新建会话走内置后端,面板里可开)
分段目录 每次压缩记一段,可列出段号、被替换事件号、摘要事件号 常开
检索工具 history_segments、history_read、history_search、history_find,只读本会话 常开
工作笔记 notes_write / notes_read / notes_search,草稿上限 6000 字符,下一次压缩时并入摘要 关
机械摘要兜底 连续失败到设定次数(默认 5)后用台账摘要使压缩落地 关
排版重排 无小标题结构的摘要追加一次只改排版的调用,不重发原文 关
检索节流 检索回执、增量过滤、收窄与读取上限;效果从未确立 关
设置面板 ContextZip 一节:压缩方式、摘要兜底、摘要重排、实验与排障、压缩分段;输入框旁有压缩方式芯片 常开
导出与手动压缩 只读服务 contextZip 与 /zip-export 命令;/zip-compact 命令不受总开关管辖 常开

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-web-launcher 下一个 Next dsh-bill →