wicm84266964/dsh-minimal-mode-compaction
为 DeepSeek Harness 极简模式增加自动上下文压缩、/compact、/context 和模型主动压缩,解决极简模式长任务无法持续工作的问题。
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH), designed to add long-session context compaction capabilities to DSH's minimal mode agent. It provides three different compaction paths to handle context window management: automatic compaction when token pressure hits a threshold plus context overflow recovery, manual compaction triggered by the /compact command, and queued compaction that runs after the current turn when the model calls compact_now. It also adds a new /context command that lets users check the current effective context window size or directly set the context capacity for DeepSeek models used in DSH.
This plugin does not modify or copy DSH's official built-in compaction engine. It only provides a user preset and a scheduling tool, and reuses the three official compaction-related tools that come pre-installed with DSH under the hood. Unlike similar existing projects in the DSH ecosystem that require manual configuration or modify existing compression engines, this plugin only adds an optional minimal-compaction user preset without changing DSH's factory default files. It also does not replace DSH's native summary engine, so users keep the original core functionality while gaining long-session compaction for extended conversations.
Installation is fully automated via a one-click command that users only need to run once. Running npx --yes github:wicm84266964/dsh-minimal-mode-compaction will automatically add the plugin to DSH's web profile, install required peer dependencies, add or update the minimal-compaction preset, and set it as the default agent preset. After installation completes, you just need to restart DSH, and all new sessions will use the minimal-compaction preset by default. If you do not want the installer to change your default preset, you can add the --no-default flag to the command and manually select the preset after installation.
这是一款为DeepSeek Harness开发的原生插件,专为极简模式agent增加长会话所需的上下文压缩能力。它提供三种压缩路径:token压力达到阈值后的自动压缩与上下文溢出恢复、人工触发的/compact命令压缩,以及模型调用compact_now后在回合结束排队执行的压缩。它还新增/context命令,可查看当前上下文窗口或直接设置DeepSeek模型的上下文容量。
本插件不修改或复制DSH官方自带的压缩引擎,仅提供预设配置和调度工具,底层复用DSH自带的dsh-compaction-basic、dsh-command-compact和dsh-compaction-tool-result-pruner。它只新增一个可选的minimal-compaction用户预设,不修改DSH出厂文件,也不替换原有的摘要引擎。安装方式支持一键脚本,自动完成所有配置步骤。
一键安装只需要运行一次npx --yes github:wicm84266964/dsh-minimal-mode-compaction,安装器会自动完成插件添加、依赖安装、预设更新,并设置为默认预设,安装后重启DSH即可生效。如果不希望修改默认预设,可以添加--no-default参数手动选择预设。插件不会擅自修改用户的模型上下文设置,所有参数均可在预设中自定义调整。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-minimal-mode-compaction(wicm84266964/dsh-minimal-mode-compaction)
仓库:https://github.com/wicm84266964/dsh-minimal-mode-compaction
本站详情页:https://www.yhbd.top/plugins/wicm84266964-dsh-minimal-mode-compaction/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 2 · 最近提交 2026-08-26 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【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 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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:wicm84266964/dsh-minimal-mode-compaction
把 wicm84266964/dsh-minimal-mode-compaction 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-minimal-mode-compaction
为 DeepSeek Harness 的极简风格 agent 增加长会话所需的三种压缩路径:
compaction-basic的 token 压力自动压缩和上下文溢出恢复;- 人工
/compact; - 模型在任务中调用
compact_now,由插件排队到当前回合结束后执行。
本项目不复制官方压缩引擎。它只提供一个用户 preset 和一个调度工具,底层复用 DSH 自带的 dsh-compaction-basic、dsh-command-compact 和 dsh-compaction-tool-result-pruner。
它还注册一个 /context 命令:直接输入 /context 显示当前有效上下文窗口,输入 /context 256k、/context 1m 或纯 token 数值时写入 DeepSeek 模型设置。命令写入的是 DSH 原生 llm-deepseek 设置,后续请求实时使用新容量;自动压缩仍按 preset 的阈值比例计算。
和现有项目的区别
公开生态里已经有相近项目:
wangxiang0605qvq/dsh-auto-compact只有模型主动调度工具,要求 preset 已经挂载compaction-basic;songoao25/dsh-auto-compact只给已有压缩引擎调整阈值,并跳过出厂minimal;KitDoesIt/dsh-compaction-instant是另一个无模型压缩引擎,也需要用户把压缩能力挂进 preset。
本项目的目标是把官方 minimal 的工具组合原样保留,只增加一个可选择的 minimal-compaction 用户 preset,因此不修改 DSH 出厂文件,也不替换摘要引擎。
安装
一键安装
用户只需要执行一次下面的命令:
npx --yes github:wicm84266964/dsh-minimal-mode-compaction
安装器会自动完成以下步骤:
- 将插件加入 DSH 的
webprofile; - 安装插件的官方 peer dependencies;
- 安装或更新
minimal-compactionpreset; - 将
agent-presets.default设置为minimal-compaction。
安装结束后重启 DeepSeek Harness。已有会话不会中途切换 preset,重启后新建的会话会默认使用 minimal-compaction。用户不需要再手动执行 dsh plugin、pnpm install 或 preset 安装命令。
安装器默认把 profile 依赖指向 GitHub 仓库,而不是 npx 的临时目录;因此 Linux/WSL 使用 npx 部署不会因为 npx 缓存清理而失效。系统有 dsh 时会复用它;没有独立 dsh 命令时会自动调用 npx @deepseek-ai/dsh。如果没有可直接调用的 pnpm,还会自动回退到 npx pnpm。
如果不希望安装器修改默认 preset,可执行:
npx --yes github:wicm84266964/dsh-minimal-mode-compaction --no-default
这时安装仍然自动完成,但需要在 Harness 中手动选择 minimal-compaction。
本地源码开发
从源码运行安装器时,默认使用当前 checkout:
node scripts/install.mjs
也可以显式指定 profile、DSH_HOME 或安装来源:
node scripts/install.mjs --profile web --dsh-home "$DSH_HOME" \
--source file:/mnt/c/saveproject/LBJ-workspace/open-source/dsh-minimal-mode-compaction
重复安装时,已有 preset 会先改名为带时间戳的 .backup-* 目录,再安装新版本。若要保留已有 preset 内容,增加 --keep-preset;先预览将使用的路径可以执行 node scripts/install.mjs --dry-run。
手动排错
只有在一键安装失败、需要逐步查看 profile 状态时,才需要手动执行:
dsh plugin --profile web add github:wicm84266964/dsh-minimal-mode-compaction
cd "$DSH_HOME/profiles/web"
pnpm install --config.auto-install-peers=true
node /path/to/dsh-minimal-mode-compaction/scripts/install-preset.mjs \
--dsh-home "$DSH_HOME" --force
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
dushaobindoudou/dsh-acp
xlennart/dsh-goal-mode-enhance
JinPLu/dsh-plugin-discussion-intent
etony668/dsh-task-board