dsh-compaction-tunable

DSH PLUGIN记忆与知识

仓库 CodeMody/dsh-compaction-tunable · npm @codemody/dsh-compaction-tunable

记忆与知识 未标注验证等级 安全审查:未标注 可信度:未标注 可安装插件
安装这个插件

为 DeepSeek Harness 提供「自动压缩触发」设置页,可按 token 数或上下文窗口比例自定义上下文压缩的启动时机,替代默认策略。

一句话选型结论

按资料字段整理

dsh-compaction-tunable 是记忆与知识类的 DSH 可安装插件,未做沙盒验证,暂无安全审查结论,列出 4 项功能,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类记忆与知识 收录类型可安装插件 验证等级未标注验证等级 安全审查未标注
验证等级 UNKNOWN 未标注验证等级
GitHub 星标 0 复刻 0 · 未关闭 issue 0
最近更新 2026-11-11 创建于 2026-11-08
README 5.8 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add @codemody/dsh-compaction-tunable
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖@deepseek-ai/cordis@~4.1.0、@deepseek-ai/dsh-compaction-basic@0.2.2-rc.3 等 3 个需要同时安装的同级依赖
npm 包名@codemody/dsh-compaction-tunable可用 npm view 查看包信息

能做什么

4 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-compaction-tunable:在 DeepSeek Harness 里自定上下文压缩起点

  • 设置页调节压缩触发点
  • 支持 token 数与窗口比例两种模式
  • 可设历史预算与摘要上限
  • 按路由模型自动换算余量

上游标签

deepseek-harnessdsh-pluginplugin

验证等级与安全审查

未标注验证等级
自动化流程结论,不是人工审核
验证等级未标注验证等级上游未给出验证结论,安装前请自行确认
安全审查未标注静态分析结论,未标注不代表已通过审查
仓库健康度未标注按仓库活跃度与最近更新时间给出
可信度未标注综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。
  • 列出了 4 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 安全审查还没结论,装之前先看仓库改了什么、要什么权限。
  • 需要同时装好同级依赖,漏装会启动失败。
  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在记忆与知识场景里给 DSH 补能力的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-compaction-tunable当前 未做沙盒验证 未标注 0 未标注 有
ruflo L3 · 安装规范通过 低风险 7.4 万 未标注 无
OpenViking L3 · 安装规范通过 低风险 3.9 万 未标注 无
WeKnora L4 · 沙盒安装通过 低风险 3.3 万 未标注 有
distilly L4 · 沙盒安装通过 低风险 2.5 万 未标注 有
EverOS L4 · 沙盒安装通过 低风险 1.3 万 未标注 有

仓库档案

记忆与知识
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方CodeMody仓库 dsh-compaction-tunable · 默认分支 main
分类记忆与知识memory
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 0 / 0收录时的数值,非实时
创建 / 更新2026-11-08 · 2026-11-11最后推送 2026-11-13
本站收录2026-11-12首次进入本站目录的时间

README 全文

5.8 KB
作者原文,中文版优先;只做安全转义,不改内容

Auto-compaction trigger

A DSH profile bundle that adds a Plugins → Auto-compaction trigger settings
page, so you can choose the input-token level at which automatic context
compaction starts instead of accepting the shipped default.

Install

In DSH, install this repo as a plugin bundle — full CLI command (desktop app or web app):

dsh plugin --profile desktop add @codemody/dsh-compaction-tunable
dsh plugin --profile web add @codemody/dsh-compaction-tunable

Or paste the package name @codemody/dsh-compaction-tunable into the Plugins
manager's install field. DSH pulls
it via pnpm into the profile's node_modules — no app restart needed.
The plugin card appears under Plugins with its settings page, and each new
session picks the engine up (a session that is already open keeps the preset
revision it started with). Disabling or removing the bundle returns every preset
to its shipped compaction defaults again.

> Note: this bundle restates DSH's own agent presets, and its copies are pinned
> to DSH 0.2.2-rc.3. After a DSH app update, update this bundle too, so the
> restated preset lists stay in step with the shipped ones — see
> Scope and removal.

Why the YAML override did not work

The Web app composes agents behind agent presets. dsh-web-app disables the
host-plane rows (- id: compaction-basic, disabled: true) and each preset mounts
its own compaction backend:

- id: compaction
name: cordis:group
isolate: { compaction: true, toolResultPruner: true }
config:
- id: compaction-basic
name: '@deepseek-ai/dsh-compaction-basic'
...

A profile patch that targets id: compaction-basic edits that disabled host row,
not the preset-owned engine. The preset keeps the default policy:

trigger = floor(min(W × 0.8, W − O − 65536))

For W = 204800 with the default O = 32768: min(163840, 106496) = 106496 — the
~100k trigger. But O is the routed model's output reservation (its maxTokens),
not a constant: a profile that raises maxTokens to 65536 starts much earlier —
min(163840, 204800 − 65536 − 65536) = 73728, so compaction fires around 73k.

What this bundle does

  1. Inserts a root row compaction-policy (this package) whose Config is entirely
    volatile: the Settings form writes it through the normal profile patch and
    the running service updates in place.
  2. Re-declares every shipped agent preset (standard, ptc, minimal, cordis)
    with its exact child list, replacing compaction-basic with
    @codemody/dsh-compaction-tunable/engine. The engine must live inside each
    preset's own compaction isolate group: host rows never reach the agent tree,
    and a patch override replaces the whole row config, so each list is restated.
  3. The engine subclasses the shipped BasicCompactionEngine and builds its policy
    from ctx.compactionPolicy on every pressure check. An absolute trigger is
    converted to a headroom per routed model:
budget  = contextWindow − reservedOutput
trigger = clamp(triggerTokens, 1, budget − 1)
headroom = budget − trigger            # threshold becomes exactly trigger

If triggerTokens is 0 or the token mode is off, the window-fraction fields
(thresholdRatio, headroomTokens) are used instead.

Because budget subtracts the routed model's output reservation, the start point
can never sit above contextWindow − maxTokens: with a 65536-token reservation
the default 155648 clamps to 139263. Lower the model's maxTokens (e.g. to
32768) in your LLM settings if you want the full trigger.

Use

Open Plugins in the sidebar (the bundle appears under Installed plugins),
open Auto-compaction trigger, then:

  • pick At a token count and set the start point (default 155648); or
  • pick At a window fraction and set the fraction and headroom;
  • optionally set the recent-history budget and the summary output cap;
  • Save.

The change is written to $DSH_HOME/profiles/desktop/cordis.patch.yml and
applies to agents started after saving. Existing sessions keep the preset
revision they started with, so open a new session to use the new threshold.

The host log prints the resolved start point once per routed target:

compaction-tunable: strata/Qwen3.8-flash-next starts compaction at ~155648 tokens (context 204800, output reserve 32768)

Scope and removal

  • Controls all four shipped presets: standard, ptc, minimal, and cordis.
    A preset you author yourself in the Web editor keeps the shipped basic engine
    until a bundle update restates it too.
  • To uninstall, use Plugins → Auto-compaction trigger bundle → uninstall (or
    plugin_manager remove_bundle). The profile then returns to the shipped
    preset and the default 65,536-token headroom.
  • The preset copies are pinned to DSH 0.2.2-rc.3. After a DSH upgrade that
    changes the preset lists, update the bundle to pick up new preset plugins.
    preset-cordis additionally pins its skill-filesystem skills directory to
    the installed app's app.asar path (the shipped !!js expression resolves
    relative to the web-app patch layer only).

Compatibility

  • DSH: 0.2.2-rc.3 — the restated preset copies are pinned to this
    revision (see Scope and removal). Installs into any
    profile (desktop or web): the patch resolves everything through package
    exports and contains no profile-specific paths.
  • Runtime: settings are volatile — saving applies in place, no app
    restart; sessions started afterwards pick the new threshold up.
  • License: MIT (LICENSE).

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
dsh-compaction-tunable 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add @codemody/dsh-compaction-tunable` 即可。对应的 npm 包名是 `@codemody/dsh-compaction-tunable`。

dsh-compaction-tunable 的验证等级是什么意思?

未标注验证等级。上游未给出验证结论,安装前请自行确认

dsh-compaction-tunable 安全吗?

未标注。

dsh-compaction-tunable 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-compaction-tunable 需要什么运行环境?

需要同时安装 @deepseek-ai/cordis@~4.1.0、@deepseek-ai/dsh-compaction-basic@0.2.2-rc.3、@deepseek-ai/schemastery@~3.19.0。环境不满足时安装会失败,建议先确认本机版本。

dsh-compaction-tunable 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-compaction-tunable 有哪些功能?

设置页调节压缩触发点、支持 token 数与窗口比例两种模式、可设历史预算与摘要上限、按路由模型自动换算余量。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

记忆与知识
按星标排序,可作替代方案

ruflo

ruflo

L3 · 安装规范通过 7.4 万 星

OpenViking

OpenViking

面向 DeepSeek Harness 的 OpenViking 记忆与上下文插件:pre-step 自动召回与画像注入、会话捕获、`vik

L3 · 安装规范通过 3.9 万 星

WeKnora

WeKnora

把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己

L4 · 沙盒安装通过 3.3 万 星

distilly

distilly

Distilly — Distill how they think into reusable Skills for any Agent o

L4 · 沙盒安装通过 2.5 万 星

EverOS

EverOS

L4 · 沙盒安装通过 1.3 万 星

MemOS

MemOS

L4 · 沙盒安装通过 1.2 万 星

CodeMody 的其它插件

2 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。