dsh-live-compact 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +48 -17
- package/adapter.js +54 -4
- package/bin/dsh-live-compact.js +44 -11
- package/bin/shadow-diagnostics.js +181 -0
- package/client.js +21 -3
- package/cordis.patch.yml +1 -5
- package/gate.js +41 -32
- package/index.js +413 -194
- package/package.json +9 -7
- package/plan.js +5 -3
- package/settings.js +40 -1
- package/shadow-save-worker.mjs +2 -0
- package/shadow-search.js +26 -7
- package/shadow.js +355 -209
- package/shell.js +191 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# 版本变更
|
|
2
2
|
|
|
3
|
+
## 1.1.15
|
|
4
|
+
|
|
5
|
+
- 单独设置 `SPINE_STAND_DOWN=1` 时继续返回宿主官方摘要。与 Billion Context 同时启用时,Billion 负责新压缩,Live Compact 可以只读恢复既有卡片。
|
|
6
|
+
|
|
7
|
+
- 两个引擎热重载时共享工具结果裁剪保护,最后一个退出时还原宿主原方法。Billion 在官方摘要期间接管时,丢弃已失去所有权的结果。
|
|
8
|
+
- Desktop 从内置 DSH 目录读取 ESM provider catalog,支持通配导出。脱敏报告保留已知的标准加载错误码,便于区分缺包和不支持的导出。
|
|
9
|
+
- #77 Desktop 的磁盘 profile 缺少宿主包时,从内置 DSH 解析。加载失败在后端启动日志以 `spine: 引擎模块加载失败。` 告警。修复旧 Cordis 清理已退场引擎时误删新引擎服务的问题。
|
|
10
|
+
- 输出触顶且已经安排续跑时,保留原始上下文,等续跑结束再执行轮末小切。
|
|
11
|
+
- 决策日志独立保留最近 1 MiB 的完整记录,追加时使用统计锁。收尾状态记录小切结果、引擎来源和 catalog 状态。
|
|
12
|
+
- 更新 DSH 预发布兼容范围,补 Cordis 4.2 alpha 与 rc.12 兼容门禁;用安全读取处理 loader 的字符串和符号属性。
|
|
13
|
+
- 新增只读 `status`、`report --redact`、`search`。记录 catalog 加载错误码并退避,成功重试同轮生效;限制压力配置诊断的写入尝试。
|
|
14
|
+
- 增加小切模式、shadow 容量和默认关闭的首刀收益门设置。无合法切段的决策记录子原因。补八类宿主通知的去向测试,并识别宿主标记为不完整的 skill catalog 快照。
|
|
15
|
+
|
|
16
|
+
## 1.1.14
|
|
17
|
+
|
|
18
|
+
- #51 在已有 shadow 根记录轮末维护何时开始、延期、结束或取消,以及本次提交的小切数。状态日志保留最近 256 KiB 的完整记录。
|
|
19
|
+
- #56 宿主拒绝无效的模型压缩预算时,即使尚未备份工具结果,也会尝试将拒绝原因写进私有决策日志。每个会话只去重已经写入的拒绝。
|
|
20
|
+
- #73 在 POSIX 上读回备份权限。目录须为 0700,文件须为 0600。正文和捕获游标写入前核对打开的文件身份及权限,不符时拒绝备份并保留原文。
|
|
21
|
+
- #71 用统计锁串行更新逐刀明细。每个 shadow 根最多保留 1 MiB 最新完整记录,累计统计继续保存在 `spine-stats.json`。
|
|
22
|
+
- #72 同一备份根可分别恢复多个已确认进程退出的锁。记录按完整锁身份保存,原锁及已有恢复记录保留。进程仍存活或无法确认时继续拒绝备份并记录原因。
|
|
23
|
+
- #74 兼容使用根上下文符号的 DSH/Cordis。Live Compact 完成初始化后才移交宿主原版压缩,激活失败会保留原版并记录原因,停用后按原配置恢复。
|
|
24
|
+
|
|
3
25
|
## 1.1.13
|
|
4
26
|
|
|
5
27
|
- 已执行工具的任务触及单步输出上限后,宿主队列可继续原任务。若首次续接只有思考输出并再次触顶,插件会最后续接一次,提示模型从小工具调用开始。归档保留每次截断和续接的结束状态。
|
package/README.md
CHANGED
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
一段对话做久了,读过的日志、跑过的命令和工具输出会越积越多。Live Compact 会在每轮结束时检查,能安全收短的长输出就整理一下。这一步在本机做,无需再请求模型。只替换选中的一段,切点前面的内容保持原样。整理前会备份原文,备份失败就保留原来的内容。
|
|
4
4
|
|
|
5
|
-
当前稳定版 [v1.1.
|
|
5
|
+
当前稳定版 [v1.1.15](https://github.com/Tranquillitatis-Lab/dsh-live-compact/releases/tag/v1.1.15)。版本变更见 [CHANGELOG.md](CHANGELOG.md)。
|
|
6
6
|
|
|
7
7
|
## 测评实证
|
|
8
8
|
|
|
9
|
+
GLM-5.3 Flash 固定 20 题共 391 个评分项。Live 单用时,1.1.14 两轮分别取得 387、382 项,1.1.15 两轮分别取得 385、384 项。两版平均都通过 15.5 道整题,取得 384.5 项。1.1.15 的两轮有效任务时间均较长。逐轮缓存和耗时见[1.1.15 测评报告](docs/benchmark-dsh-1.1.15.md),上下文与 token 原始计数见[结构化数据](docs/benchmark-dsh-1.1.15.json)。
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
此图使用同一轮三方案实测。Billion 单用组未触发压缩,共用组由 Billion 成功压缩两次,Live 切片为零。两种加载顺序另经宿主压缩、解压和旧卡恢复测试。
|
|
14
|
+
|
|
15
|
+
|
|
9
16
|
完整数据、原始口径和限制见 [docs/benchmarks.md](docs/benchmarks.md),结构化数字见 [docs/benchmark-results.json](docs/benchmark-results.json)。
|
|
10
17
|
|
|
11
18
|
- **1.0.5 失忆对比**:同一真实 DeepSeek 会话,15 道回忆题两边都是 15/15;Live Compact 的日志中段细节两次都是 3/3,原版一次 1/3、一次 3/3。
|
|
@@ -33,13 +40,13 @@
|
|
|
33
40
|
headless:
|
|
34
41
|
|
|
35
42
|
```sh
|
|
36
|
-
dsh plugin --profile headless add dsh-live-compact@1.1.
|
|
43
|
+
dsh plugin --profile headless add dsh-live-compact@1.1.15
|
|
37
44
|
```
|
|
38
45
|
|
|
39
46
|
网页端:
|
|
40
47
|
|
|
41
48
|
```sh
|
|
42
|
-
dsh plugin --profile web add dsh-live-compact@1.1.
|
|
49
|
+
dsh plugin --profile web add dsh-live-compact@1.1.15
|
|
43
50
|
```
|
|
44
51
|
|
|
45
52
|
想先装到本机看版本:
|
|
@@ -120,7 +127,7 @@ Issue #19 里下一轮输入回到 21 万到 24 万、前缀被打掉的那一
|
|
|
120
127
|
- 预设不再硬等 gate。gate 加载失败时,网页预设不会卡在等待。换包前先试加载,失败就保留原版名字。
|
|
121
128
|
- 换上之后带上 0.8、65536、8192。预设里已有的配置优先。
|
|
122
129
|
- 预设 id 写在外层或内层都能换。standard、ptc、cordis、minimal 在 0.2.1-rc.5 上都会换。TUI 仍不碰。
|
|
123
|
-
-
|
|
130
|
+
- 原版压缩已启用时,Live Compact 初始化完成后才接管。激活失败会保留原版,并记下「本会话未接管」。如果旧的 profile 用户补丁另外关闭了 `compaction-basic`,可在宿主的插件管理中重新启用它。两种引擎都装不上时,外壳会报告失败原因。
|
|
124
131
|
- headless 的宿主包自己关掉了原版压缩。插件不能把那一行重新打开。网页预设不注入 gate,漏换这一轮就继续用原版。
|
|
125
132
|
|
|
126
133
|
## Windows 备份权限
|
|
@@ -155,9 +162,10 @@ Windows 会重新设置备份访问权限,失败时停止写备份并保留原
|
|
|
155
162
|
| `SPINE_COOLDOWN_MS` | 0 | 官方压缩后的额外时间窗口;仅正数开启,未设置、空串、非数字、0 或负数均关闭。 |
|
|
156
163
|
| `SPINE_SHADOW_DIR` | `~/.dsh/compaction-spine/shadow` | 备份目录;设了 `DSH_HOME` 时以它替代 `~/.dsh`。 |
|
|
157
164
|
| `SPINE_SHADOW_SINGLE_PROCESS` | 关闭 | 仅 `1` 开启专用目录契约;必须另设专用 `SPINE_SHADOW_DIR`,详见下文。 |
|
|
158
|
-
| `SPINE_SHADOW_MAX_BYTES` | 268435456 |
|
|
159
|
-
| `SPINE_SHADOW_MAX_MB` | 256 |
|
|
160
|
-
| `SPINE_ENGINE` | 自动识别 |
|
|
165
|
+
| `SPINE_SHADOW_MAX_BYTES` | 268435456 | 未配置 `shadowMaxMb` 时,正数优先于 `SPINE_SHADOW_MAX_MB`。 |
|
|
166
|
+
| `SPINE_SHADOW_MAX_MB` | 256 | 配置和正数字节上限均缺省时,按 MiB 设置备份上限。 |
|
|
167
|
+
| `SPINE_ENGINE` | 自动识别 | 未配置 `engine` 时可用 `cloud` 或 `local` 强制切法。 |
|
|
168
|
+
| `SPINE_MIN_GAIN_RATIO` | 0 | 可启用首刀预计节省量除以预计重写量的门槛;48000 token 起沿用紧急线。 |
|
|
161
169
|
| `SPINE_THUNDER` | 关闭 | 设为 `1` 才走雷霆。端侧不要开。 |
|
|
162
170
|
| `SPINE_THUNDER_MODEL` | `flash` | 设为 `27b` 且前缀超过 8 万时,每次官方压缩都少发。端侧不要设。 |
|
|
163
171
|
| `SPINE_ENGINE_FAIL` | 无 | **仅供测试**:用 `import`、`construct`、`after-super` 注入引擎故障。 |
|
|
@@ -167,6 +175,8 @@ Windows 会重新设置备份访问权限,失败时停止写备份并保留原
|
|
|
167
175
|
|
|
168
176
|
插件小切参数在每次轮后维护开始时取得本引擎的一致快照,保存后下一次维护生效,多个引擎互不覆盖。官方大压缩参数沿用宿主的构造时快照,保存后需要重建引擎或会话。宿主支持的 `retainRatio`、`maxTokens`、摘要模型路由、`modelPolicies`、溢出重试等配置继续由宿主校验并保留;`retainRatio` 与 `retainTokens` 互斥。
|
|
169
177
|
|
|
178
|
+
`engine` 可选 `auto`、`local`、`cloud`,显式 `auto` 按 provider 和地址判定。`shadowMaxMb` 以 MiB 配置备份容量。`minGainRatio` 为 0 时关闭,启用后只判断一次收尾的第一刀。到达 48000 token 时照常切。
|
|
179
|
+
|
|
170
180
|
接管开关只影响未来加载的预设及 `compaction` 隔离组;直接注册预设和 Include 加载的组也按原位换包。新预设按 **预设引擎显式配置 > 根插件显式配置 > 有效环境变量 > 默认值** 取值;已有预设保留加载时的数值,根设置后续修改需要重新加载预设。原生客户端 slot、资源声明和安装方式沿用现有接口。
|
|
171
181
|
|
|
172
182
|
每个新的 `compact-checkpoint` 只让轮后小切跳过一次,`spine-checkpoint` 不触发这个跳过。
|
|
@@ -191,8 +201,8 @@ Windows 会重新设置备份访问权限,失败时停止写备份并保留原
|
|
|
191
201
|
从 npm 装。headless 和网页是两个 profile,要各装一次。桌面端是另一个 profile,普通 `dsh plugin --profile desktop` 会被拒绝。
|
|
192
202
|
|
|
193
203
|
```sh
|
|
194
|
-
dsh plugin --profile headless add dsh-live-compact@1.1.
|
|
195
|
-
dsh plugin --profile web add dsh-live-compact@1.1.
|
|
204
|
+
dsh plugin --profile headless add dsh-live-compact@1.1.15
|
|
205
|
+
dsh plugin --profile web add dsh-live-compact@1.1.15
|
|
196
206
|
```
|
|
197
207
|
|
|
198
208
|
想先装到本机看版本:
|
|
@@ -202,22 +212,43 @@ npm install -g dsh-live-compact
|
|
|
202
212
|
dsh-live-compact --version
|
|
203
213
|
```
|
|
204
214
|
|
|
205
|
-
|
|
215
|
+
国内镜像保留了[上一稳定版 1.1.14 安装包](https://download.merkyorlynn.com/downloads/plugins/dsh-live-compact-1.1.14.tgz)。以下命令直接安装 npm 发布的 1.1.15 压缩包。
|
|
206
216
|
|
|
207
217
|
```sh
|
|
208
|
-
dsh plugin --profile headless add https://
|
|
209
|
-
dsh plugin --profile web add https://
|
|
210
|
-
npm install -g --force "https://
|
|
218
|
+
dsh plugin --profile headless add https://registry.npmjs.org/dsh-live-compact/-/dsh-live-compact-1.1.15.tgz
|
|
219
|
+
dsh plugin --profile web add https://registry.npmjs.org/dsh-live-compact/-/dsh-live-compact-1.1.15.tgz
|
|
220
|
+
npm install -g --force "https://registry.npmjs.org/dsh-live-compact/-/dsh-live-compact-1.1.15.tgz"
|
|
211
221
|
dsh-live-compact --version
|
|
212
222
|
```
|
|
213
223
|
|
|
214
|
-
|
|
224
|
+
支持 DSH 0.2.x 正式版和 npm 严格匹配的预发布版,包括已实测的 Desktop 0.2.1-rc.3,以及从 0.2.0-rc.2、0.2.2-rc.1、0.2.3-alpha.2 起的对应预发布系列,范围以 `package.json` 为准。装上后跑长任务,日志里的 `spine cut …ms` 表示已提交小切。 [插件页面](https://download.merkyorlynn.com/live-compact.html)
|
|
225
|
+
|
|
226
|
+
开发者可在源码根目录使用受支持的 Node 和 npm,分别运行 `npm run test:compat41`、`npm run test:compat-rc12` 和 `npm run test:compat42`。每条命令都在独立临时目录按 `test/compat` 下的锁文件安装宿主测试依赖,版本不符会退出失败。4.1 和社区 rc.12 共用 DSH 0.2.2-rc.1 的依赖集合,4.2 使用 DSH 0.2.3-alpha.2。
|
|
215
227
|
|
|
216
|
-
DSH-TUI
|
|
228
|
+
DSH-TUI 先不要装。TUI 已在 v0.20.0 支持显示 `spine-checkpoint` 局部卡片,但本包目前只接管网页和 Desktop 预设里的压缩,TUI 预设仍走原版压缩;接管和联合验收完成后再开放支持。
|
|
217
229
|
|
|
218
230
|
被切掉的原文会写到 `~/.dsh/compaction-spine/shadow`。Unix 权限为目录 0700 / 文件 0600;Windows 新建/修正后的备份允许当前用户、SYSTEM、Administrators,历史文件及缓存限制见上面的 ACL 说明。上限 256MB。快满时删最老的备份。卡片里的序号是会话日志的事件号。要在当前会话的备份里找一行,用 `import { searchShadow } from "dsh-live-compact/shadow-search"`。插件自己不会去搜。
|
|
219
231
|
|
|
220
|
-
`
|
|
232
|
+
`spine-maintenance.jsonl` 在已有 shadow 目录记录轮末维护状态。同一个 `operation` 对应一次尝试,`deferred` 表示补抓未结束,`completed` 的 `cuts` 是该次提交的小切数。宿主拒绝模型压力预算时,配置原因会写入 `spine-decisions.jsonl`。
|
|
233
|
+
|
|
234
|
+
### 命令行诊断
|
|
235
|
+
|
|
236
|
+
`stats`、`status`、`report` 和 `search` 都从 `SPINE_SHADOW_DIR` 或 `$DSH_HOME/compaction-spine/shadow` 读取。
|
|
237
|
+
|
|
238
|
+
```sh
|
|
239
|
+
dsh-live-compact status
|
|
240
|
+
dsh-live-compact report --redact
|
|
241
|
+
dsh-live-compact search 'build failed' --ignore-case --limit 10 --session session-key
|
|
242
|
+
dsh-live-compact search '^ERROR' --regex
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
`status` 显示最近一轮维护、已提交刀数、延期/取消/跳过原因、引擎与 catalog 状态,以及在诊断日志窗口内记录到的 `ESHADOWACCESS` 数。决策写入失败数来自最近一次成功写入决策或维护日志的进程快照。`report --redact` 输出脱敏的近期日志与统计,散列会话标识、provider、model 和诊断详情。复测请附 `dsh-live-compact report --redact` 输出。
|
|
246
|
+
|
|
247
|
+
`search` 输出含文件、会话键、行号和截断原文的 JSON 行。省略 `--session` 时检查根及其直接子目录。搜索输出可能含私有原文,公开反馈请使用 `report --redact`。
|
|
248
|
+
|
|
249
|
+
`dsh-live-compact stats` 的 `saved` 是切完当下少掉的 token,`rewrite` 是同一次收尾实际要重写的尾巴,只记一次。同一步连切不会按刀数把尾巴乘上去。这两个数口径不同,比值不是盈亏。桌面端没有终端,`rg "spine cut"` 只在终端输出里找得到。每个 shadow 根的 `spine-cuts.jsonl` 最多保留 1 MiB 最近的完整逐刀明细,累计计数记录在 `spine-stats.json`。
|
|
250
|
+
|
|
251
|
+
POSIX 备份目录所在的文件系统须支持 0700/0600 权限位并能读回。如果挂载始终返回 0777,插件会以 `ESHADOWACCESS` 拒绝备份,依赖这次备份的小切保留原文。用 `status` 可查看已记录的拒绝和当前目录权限。
|
|
221
252
|
|
|
222
253
|
改上限:
|
|
223
254
|
|
|
@@ -233,7 +264,7 @@ rm -f ~/.dsh/compaction-spine/shadow/*/*.txt ~/.dsh/compaction-spine/shadow/*.tx
|
|
|
233
264
|
|
|
234
265
|
设了 `DSH_HOME` 或 `SPINE_SHADOW_DIR` 时,目录在那边。删不掉旧文件时,这一刀不切,同一次会话只警告一次。
|
|
235
266
|
|
|
236
|
-
默认目录(包括 `DSH_HOME`
|
|
267
|
+
默认目录(包括 `DSH_HOME` 下的目录)和未声明独占的目录,备份轮换继续执行完整扫描。决策日志与正文配额独立,在统计锁下保留最近 1 MiB 的完整记录。仅设置 `SPINE_SHADOW_DIR` 不开启正文估算。需要减少正文扫描时,可将它指向一个**专用本地目录**,并另设 `SPINE_SHADOW_SINGLE_PROCESS=1`;即使显式指定默认目录,也不会开启。这个声明要求整个目录只由本进程的这一份插件使用,不能与旧版、不遵守协调协议的 writer、外部修改目录树或正文的程序共用。自定义代码调用底层备份函数时,必须传入同一 `root`,不能把会话子目录当根。无法满足契约时保持默认设置。
|
|
237
268
|
|
|
238
269
|
专用根首次完整扫描后,只有目录身份、容量和所有权不变、预计用量严格低于 80%,且完整校准还不到 60 秒时,才省去正文遍历。60 秒到期后,在下一次轮转时重新扫描;没有后台定时清理。快返回和写入都不会延长有效期。时钟异常或回退也改走全扫。扫描不完整或计量不合法时拒绝本次需要容量准入的备份,保留原内容,不用漏算后的数字放行。
|
|
239
270
|
|
package/adapter.js
CHANGED
|
@@ -4,13 +4,63 @@
|
|
|
4
4
|
* Every upstream DSH dependency belongs in this file, including future ones.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { realpathSync } from "node:fs";
|
|
8
|
+
import { createRequire } from "node:module";
|
|
9
|
+
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
10
|
+
import { pathToFileURL } from "node:url";
|
|
11
|
+
|
|
7
12
|
export const STOCK_ENGINE = "@deepseek-ai/dsh-compaction-basic";
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
const ROOT = Symbol.for("cordis.root");
|
|
15
|
+
const ENTRY = Symbol.for("cordis.entry");
|
|
16
|
+
|
|
17
|
+
export function contextProperty(ctx, key) {
|
|
18
|
+
try { return ctx?.[key]; } catch { return undefined; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function rootContext(ctx) {
|
|
22
|
+
const root = contextProperty(ctx, ROOT) ?? contextProperty(ctx, "root") ?? ctx;
|
|
23
|
+
return root && (typeof root === "object" || typeof root === "function") ? root : undefined;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function entryOf(fiber, ctx = contextProperty(fiber, "ctx")) {
|
|
27
|
+
return contextProperty(fiber, "entry") ?? contextProperty(ctx, ENTRY) ??
|
|
28
|
+
contextProperty(contextProperty(fiber, "parent"), ENTRY);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function desktopRuntimeManifest() {
|
|
32
|
+
const resources = process.versions.electron && process.resourcesPath;
|
|
33
|
+
return typeof resources === "string" && isAbsolute(resources)
|
|
34
|
+
? join(resources, "app.asar", "dsh", "package.json") : undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function loadFromDesktop(name, error) {
|
|
38
|
+
const manifest = desktopRuntimeManifest();
|
|
39
|
+
if (!manifest || error?.code !== "ERR_MODULE_NOT_FOUND" ||
|
|
40
|
+
!String(error.message).startsWith(`Cannot find package '${name}' imported from `)) throw error;
|
|
41
|
+
// Keep plugins on the same DSH service identities as the Desktop runtime.
|
|
42
|
+
let entry;
|
|
43
|
+
let modules;
|
|
44
|
+
try {
|
|
45
|
+
modules = realpathSync(join(dirname(manifest), "node_modules"));
|
|
46
|
+
entry = createRequire(manifest).resolve(name);
|
|
47
|
+
} catch {
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
const path = relative(modules, entry);
|
|
51
|
+
if (!path || path === ".." || path.startsWith(`..${sep}`) || isAbsolute(path)) throw error;
|
|
52
|
+
return import(pathToFileURL(entry).href);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const loadBase = () => import("@deepseek-ai/dsh-compaction-basic")
|
|
56
|
+
.catch((error) => loadFromDesktop(STOCK_ENGINE, error));
|
|
10
57
|
|
|
11
|
-
export const loadCompaction = () => import("@deepseek-ai/dsh-compaction")
|
|
58
|
+
export const loadCompaction = () => import("@deepseek-ai/dsh-compaction")
|
|
59
|
+
.catch((error) => loadFromDesktop("@deepseek-ai/dsh-compaction", error));
|
|
12
60
|
|
|
13
|
-
export const loadLlm = () => import("@deepseek-ai/dsh-llm")
|
|
61
|
+
export const loadLlm = () => import("@deepseek-ai/dsh-llm")
|
|
62
|
+
.catch((error) => loadFromDesktop("@deepseek-ai/dsh-llm", error));
|
|
14
63
|
|
|
15
64
|
// 官方设置界面读的是 schemastery schema,构造器同样从这里取。
|
|
16
|
-
export const loadSchema = () => import("@deepseek-ai/schemastery")
|
|
65
|
+
export const loadSchema = () => import("@deepseek-ai/schemastery")
|
|
66
|
+
.catch((error) => loadFromDesktop("@deepseek-ai/schemastery", error));
|
package/bin/dsh-live-compact.js
CHANGED
|
@@ -1,26 +1,59 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
|
-
import { homedir } from "node:os";
|
|
4
3
|
import { dirname, join } from "node:path";
|
|
5
4
|
import { fileURLToPath } from "node:url";
|
|
6
|
-
import {
|
|
5
|
+
import { parseArgs } from "node:util";
|
|
6
|
+
import { readCutStats, shadowDirectory } from "../shadow.js";
|
|
7
|
+
import { readDiagnostics, searchDirectories } from "./shadow-diagnostics.js";
|
|
7
8
|
|
|
8
9
|
const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), "../package.json"), "utf8"));
|
|
9
10
|
const arg = process.argv[2];
|
|
10
11
|
if (arg === "stats") {
|
|
11
|
-
const
|
|
12
|
-
const stats = readCutStats(dir);
|
|
12
|
+
const stats = readCutStats(shadowDirectory());
|
|
13
13
|
const usd = (stats.savedTokens * 0.15) / 1e6;
|
|
14
14
|
console.log(`cuts ${stats.cuts}`);
|
|
15
15
|
console.log(`saved ${stats.savedTokens}`);
|
|
16
16
|
console.log(`rewrite ${stats.rewriteTokens}`);
|
|
17
17
|
console.log(`估算 $${usd.toFixed(2)},saved × $0.15/M,未扣除重写未命中成本`);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
} else if (["status", "report", "search"].includes(arg)) {
|
|
19
|
+
try {
|
|
20
|
+
const args = process.argv.slice(3);
|
|
21
|
+
const dir = shadowDirectory();
|
|
22
|
+
if (arg === "status") {
|
|
23
|
+
parseArgs({ args });
|
|
24
|
+
const status = readDiagnostics(dir);
|
|
25
|
+
for (const [key, value] of Object.entries(status)) {
|
|
26
|
+
if (value != null && key !== "shadowMode") console.log(`${key} ${value}`);
|
|
27
|
+
}
|
|
28
|
+
if (status.catalogReady === null) console.log("catalogReady unknown");
|
|
29
|
+
if (status.shadowMode) console.log(`shadow directory ESHADOWACCESS dir-mode ${status.shadowMode}, expected 0700`);
|
|
30
|
+
} else if (arg === "report") {
|
|
31
|
+
parseArgs({ args, options: { redact: { type: "boolean" } } });
|
|
32
|
+
console.log(JSON.stringify(readDiagnostics(dir, true), null, 2));
|
|
33
|
+
} else {
|
|
34
|
+
const { positionals, values } = parseArgs({
|
|
35
|
+
args, allowPositionals: true,
|
|
36
|
+
options: { regex: { type: "boolean" }, "ignore-case": { type: "boolean" },
|
|
37
|
+
limit: { type: "string" }, session: { type: "string" } },
|
|
38
|
+
});
|
|
39
|
+
const [pattern] = positionals;
|
|
40
|
+
const limit = values.limit === undefined ? 50 : Number(values.limit);
|
|
41
|
+
if (positionals.length !== 1 || !pattern) throw new TypeError("search: exactly one pattern is required");
|
|
42
|
+
if (!Number.isSafeInteger(limit) || limit <= 0) throw new TypeError("search: limit must be a positive integer");
|
|
43
|
+
if (values.regex) new RegExp(pattern, values["ignore-case"] ? "i" : "");
|
|
44
|
+
for (const match of searchDirectories(dir, {
|
|
45
|
+
pattern, regex: values.regex, ignoreCase: values["ignore-case"], session: values.session, limit,
|
|
46
|
+
})) console.log(JSON.stringify(match));
|
|
47
|
+
}
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error.message);
|
|
50
|
+
process.exitCode = 1;
|
|
51
|
+
}
|
|
52
|
+
} else if (arg === "--version" || arg === "-v") {
|
|
21
53
|
console.log(pkg.version);
|
|
22
|
-
|
|
54
|
+
} else {
|
|
55
|
+
console.log(`${pkg.name} ${pkg.version}`);
|
|
56
|
+
console.log(`dsh plugin --profile headless add https://download.merkyorlynn.com/downloads/plugins/dsh-live-compact-${pkg.version}.tgz`);
|
|
57
|
+
console.log(`dsh plugin --profile web add https://download.merkyorlynn.com/downloads/plugins/dsh-live-compact-${pkg.version}.tgz`);
|
|
58
|
+
console.log("dsh-live-compact stats | status | report --redact | search <pattern> [--regex] [--ignore-case] [--limit N] [--session key]");
|
|
23
59
|
}
|
|
24
|
-
console.log(`${pkg.name} ${pkg.version}`);
|
|
25
|
-
console.log(`dsh plugin --profile headless add https://download.merkyorlynn.com/downloads/plugins/dsh-live-compact-${pkg.version}.tgz`);
|
|
26
|
-
console.log(`dsh plugin --profile web add https://download.merkyorlynn.com/downloads/plugins/dsh-live-compact-${pkg.version}.tgz`);
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { constants, closeSync, fstatSync, lstatSync, openSync, readdirSync, readSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { CUTS_NAME, DECISIONS_NAME, MAINTENANCE_NAME, STATS_NAME, sanitizeSessionKey } from "../shadow.js";
|
|
5
|
+
import { searchShadow } from "../shadow-search.js";
|
|
6
|
+
|
|
7
|
+
const LOG_BYTES = 1024 * 1024;
|
|
8
|
+
const OUTCOMES = new Set(["started", "completed", "deferred", "cancelled", "failed", "committed", "rejected", "empty", "usable", "timeout"]);
|
|
9
|
+
const PHASES = new Set(["engine", "maintenance-skip", "cut-skip", "cut", "prestep", "official-compaction",
|
|
10
|
+
"official-summary", "catalog-load-failed", "takeover", "shadow-access"]);
|
|
11
|
+
const REASONS = new Set(["below-min-tokens", "above-big-gate", "official-checkpoint", "cooldown", "no-legal-span",
|
|
12
|
+
"tail-too-long", "low-gain", "capture-catchup", "output-recovery", "maintenance-aborted", "maintenance-failed", "cut-not-committed",
|
|
13
|
+
"cut-failed", "no-reduction", "invalid-pressure-config", "activation-failed", "ESHADOWACCESS"]);
|
|
14
|
+
const ENGINES = new Set(["cloud", "local"]);
|
|
15
|
+
const SOURCES = new Set(["config", "env", "address", "provider", "invalid-address", "unknown"]);
|
|
16
|
+
const CUT_REJECTIONS = new Set(["empty-or-mismatch", "reaches-floor-card", "no-reserved-end",
|
|
17
|
+
"below-chunk-min", "no-eligible-span", "candidate-rejected"]);
|
|
18
|
+
const NUMBERS = ["cut", "cuts", "before", "after", "saved", "rewrite", "tokens", "totalTokens",
|
|
19
|
+
"prefix", "total", "rewriteTokens", "savedTokens", "drains", "elapsedMs", "timeoutMs", "turn", "turnEndSeq",
|
|
20
|
+
"decisionWriteFailures"];
|
|
21
|
+
|
|
22
|
+
function directoryInfo(dir) {
|
|
23
|
+
try {
|
|
24
|
+
const info = lstatSync(dir);
|
|
25
|
+
if (info.isDirectory()) return info;
|
|
26
|
+
} catch (error) {
|
|
27
|
+
if (error.code !== "ENOENT") throw error;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function readTail(dir, name, maxBytes) {
|
|
32
|
+
const path = join(dir, name);
|
|
33
|
+
let fd;
|
|
34
|
+
try {
|
|
35
|
+
const named = lstatSync(path);
|
|
36
|
+
if (!named.isFile() || named.nlink !== 1) return "";
|
|
37
|
+
fd = openSync(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0));
|
|
38
|
+
const opened = fstatSync(fd);
|
|
39
|
+
if (!opened.isFile() || opened.nlink !== 1 || opened.dev !== named.dev || opened.ino !== named.ino) return "";
|
|
40
|
+
const start = Math.max(0, opened.size - maxBytes);
|
|
41
|
+
const data = Buffer.alloc(opened.size - start);
|
|
42
|
+
let end = 0;
|
|
43
|
+
while (end < data.length) {
|
|
44
|
+
const bytes = readSync(fd, data, end, data.length - end, start + end);
|
|
45
|
+
if (!bytes) break;
|
|
46
|
+
end += bytes;
|
|
47
|
+
}
|
|
48
|
+
const firstLine = start ? data.subarray(0, end).indexOf(0x0a) + 1 : 0;
|
|
49
|
+
if (start && !firstLine) return "";
|
|
50
|
+
return data.toString("utf8", firstLine, end);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
if (["ENOENT", "ENOTDIR", "ELOOP", "EACCES", "EPERM"].includes(error.code)) return "";
|
|
53
|
+
throw error;
|
|
54
|
+
} finally {
|
|
55
|
+
if (fd !== undefined) closeSync(fd);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function parseRecord(text) {
|
|
60
|
+
try {
|
|
61
|
+
const record = JSON.parse(text);
|
|
62
|
+
if (record && typeof record === "object" && !Array.isArray(record)) return record;
|
|
63
|
+
} catch {}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function readLog(dir, name, size = LOG_BYTES) {
|
|
67
|
+
const text = readTail(dir, name, size);
|
|
68
|
+
return text.slice(0, text.lastIndexOf("\n") + 1).split("\n").map(parseRecord).filter(Boolean);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function hash(value) {
|
|
72
|
+
if (typeof value === "string" && value) return `sha256:${createHash("sha256").update(value).digest("hex").slice(0, 16)}`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function safeValue(value, allowed) {
|
|
76
|
+
return allowed.has(value) ? value : hash(value);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const CATALOG_SOURCES = new Set(["esm", "esm-resolve", "anchor", "package-manifest", "package-entry", "require"]);
|
|
80
|
+
const CATALOG_CODES = new Set(["ERR_MODULE_NOT_FOUND", "ERR_PACKAGE_PATH_NOT_EXPORTED", "MODULE_NOT_FOUND",
|
|
81
|
+
"ERR_REQUIRE_ESM", "ERR_INVALID_PACKAGE_CONFIG", "ENOENT", "EACCES", "EPERM", "EMPTY_CATALOG", "LOAD_FAILED"]);
|
|
82
|
+
|
|
83
|
+
function redactCatalogCode(value) {
|
|
84
|
+
if (typeof value === "string") {
|
|
85
|
+
const [source, code] = value.split(":");
|
|
86
|
+
if (CATALOG_SOURCES.has(source) && CATALOG_CODES.has(code) && value === source + ":" + code) return value;
|
|
87
|
+
}
|
|
88
|
+
return hash(value);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function redact(record) {
|
|
92
|
+
const row = {};
|
|
93
|
+
for (const key of NUMBERS) {
|
|
94
|
+
if (Number.isSafeInteger(record[key]) && record[key] >= 0) row[key] = record[key];
|
|
95
|
+
}
|
|
96
|
+
for (const key of ["drain", "catalogReady"]) {
|
|
97
|
+
if (typeof record[key] === "boolean") row[key] = record[key];
|
|
98
|
+
}
|
|
99
|
+
if (typeof record.ts === "string" && /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$/.test(record.ts)) row.ts = record.ts;
|
|
100
|
+
for (const [key, values] of [
|
|
101
|
+
["phase", PHASES], ["result", OUTCOMES], ["reason", REASONS], ["engine", ENGINES],
|
|
102
|
+
["source", SOURCES], ["engineSource", SOURCES],
|
|
103
|
+
]) row[key] = safeValue(record[key], values);
|
|
104
|
+
row.session = hash(record.sid ?? record.sessionId);
|
|
105
|
+
row.operation = hash(record.operation);
|
|
106
|
+
for (const key of ["provider", "model"]) row[key] = hash(record[key]);
|
|
107
|
+
row.detail = record.phase === "cut-skip" && record.reason === "no-legal-span"
|
|
108
|
+
? safeValue(record.detail, CUT_REJECTIONS) : hash(record.detail);
|
|
109
|
+
if (record.code === "ESHADOWACCESS") row.code = "ESHADOWACCESS";
|
|
110
|
+
if (Array.isArray(record.codes)) row.codes = record.codes.map(redactCatalogCode).filter(Boolean);
|
|
111
|
+
return row;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function summarize(maintenance, decisions, mode) {
|
|
115
|
+
const operations = maintenance.filter((event) => typeof event.operation === "string");
|
|
116
|
+
const start = operations.findLast((event) => event.result === "started");
|
|
117
|
+
const last = start ? operations.findLast((event) => event.operation === start.operation && event.sid === start.sid) : operations.at(-1);
|
|
118
|
+
const sameSession = (event) => !last || event.sid === last.sid;
|
|
119
|
+
const current = (event) => sameSession(event) && (event.operation
|
|
120
|
+
? event.operation === last?.operation
|
|
121
|
+
: last && (!start?.ts || (event.ts >= start.ts && (last.result === "started" || event.ts <= last.ts))));
|
|
122
|
+
const engine = decisions.findLast((event) => sameSession(event) && event.phase === "engine");
|
|
123
|
+
const reason = last?.reason ?? decisions.findLast((event) =>
|
|
124
|
+
current(event) && (event.phase === "cut-skip" || event.phase === "maintenance-skip" || event.result === "failed"))?.reason;
|
|
125
|
+
const decisionCuts = decisions.filter((event) => current(event) && event.phase === "cut" && event.result === "committed").length;
|
|
126
|
+
const access = [...maintenance, ...decisions].filter((event) => event.code === "ESHADOWACCESS" || event.reason === "ESHADOWACCESS");
|
|
127
|
+
const decisionCounter = [...maintenance, ...decisions].reduce((latest, event) => {
|
|
128
|
+
if (!Number.isSafeInteger(event.decisionWriteFailures) || event.decisionWriteFailures < 0 || typeof event.ts !== "string") return latest;
|
|
129
|
+
return !latest || event.ts >= latest.ts ? event : latest;
|
|
130
|
+
}, undefined);
|
|
131
|
+
return {
|
|
132
|
+
maintenance: last?.result === "started" ? "running" : safeValue(last?.result, OUTCOMES) ?? "unknown",
|
|
133
|
+
session: hash(last?.sid),
|
|
134
|
+
cuts: Math.max(Number.isSafeInteger(last?.cuts) ? last.cuts : 0, decisionCuts),
|
|
135
|
+
reason: safeValue(reason, REASONS),
|
|
136
|
+
engine: safeValue(last?.engine ?? engine?.engine, ENGINES) ?? "unknown",
|
|
137
|
+
engineSource: safeValue(last?.engineSource ?? engine?.source, SOURCES) ?? "unknown",
|
|
138
|
+
catalogReady: typeof last?.catalogReady === "boolean" ? last.catalogReady
|
|
139
|
+
: typeof engine?.catalogReady === "boolean" ? engine.catalogReady : null,
|
|
140
|
+
ESHADOWACCESS: new Set(access.map((event) => event.operation || event)).size,
|
|
141
|
+
decisionWriteFailures: decisionCounter?.decisionWriteFailures ?? "unknown",
|
|
142
|
+
...(mode != null && mode !== 0o700 && { shadowMode: mode.toString(8).padStart(4, "0") }),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function readDiagnostics(dir, report = false) {
|
|
147
|
+
const info = directoryInfo(dir);
|
|
148
|
+
const maintenance = info ? readLog(dir, MAINTENANCE_NAME, 256 * 1024) : [];
|
|
149
|
+
const decisions = info ? readLog(dir, DECISIONS_NAME) : [];
|
|
150
|
+
const mode = info && process.platform !== "win32" ? info.mode & 0o777 : null;
|
|
151
|
+
const status = summarize(maintenance, decisions, mode);
|
|
152
|
+
if (!report) return status;
|
|
153
|
+
const cuts = info ? readLog(dir, CUTS_NAME) : [];
|
|
154
|
+
const stats = info ? parseRecord(readTail(dir, STATS_NAME, 4096)) : undefined;
|
|
155
|
+
return {
|
|
156
|
+
version: 1, status, stats: stats ? redact(stats) : {},
|
|
157
|
+
maintenance: maintenance.slice(-200).map(redact),
|
|
158
|
+
decisions: decisions.slice(-200).map(redact),
|
|
159
|
+
cuts: cuts.slice(-200).map(redact),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function searchDirectories(root, options) {
|
|
164
|
+
const { session, limit = 50, ...search } = options;
|
|
165
|
+
if (session !== undefined && (!session || sanitizeSessionKey(session) !== session)) {
|
|
166
|
+
throw new TypeError("search: invalid session key");
|
|
167
|
+
}
|
|
168
|
+
if (!directoryInfo(root)) return [];
|
|
169
|
+
const dirs = session === undefined ? [
|
|
170
|
+
root,
|
|
171
|
+
...readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory())
|
|
172
|
+
.map((entry) => join(root, entry.name)).sort(),
|
|
173
|
+
] : [join(root, session)];
|
|
174
|
+
const matches = [];
|
|
175
|
+
for (const dir of dirs) {
|
|
176
|
+
if (!directoryInfo(dir)) continue;
|
|
177
|
+
matches.push(...searchShadow({ dir, limit: limit - matches.length, ...search }).matches);
|
|
178
|
+
if (matches.length >= limit) break;
|
|
179
|
+
}
|
|
180
|
+
return matches;
|
|
181
|
+
}
|
package/client.js
CHANGED
|
@@ -13,6 +13,7 @@ window.__ModuleLoader__.load({
|
|
|
13
13
|
id: "advanced",
|
|
14
14
|
keys: [
|
|
15
15
|
"chunkMin", "chunkMax", "keepRoundTokens", "bigGate", "cooldownMs",
|
|
16
|
+
"minGainRatio", "engine", "shadowMaxMb",
|
|
16
17
|
"thresholdRatio", "headroomTokens", "retainTokens", "compactionRetries",
|
|
17
18
|
],
|
|
18
19
|
},
|
|
@@ -35,6 +36,16 @@ window.__ModuleLoader__.load({
|
|
|
35
36
|
return { kind: "set", value: raw };
|
|
36
37
|
},
|
|
37
38
|
};
|
|
39
|
+
const ENGINE_FIELD = {
|
|
40
|
+
field: "engine",
|
|
41
|
+
format: (value) => value ?? "",
|
|
42
|
+
parse: (text) => {
|
|
43
|
+
const value = String(text ?? "").trim();
|
|
44
|
+
if (!value) return { kind: "clear" };
|
|
45
|
+
if (["auto", "local", "cloud"].includes(value)) return { kind: "set", value };
|
|
46
|
+
return undefined;
|
|
47
|
+
},
|
|
48
|
+
};
|
|
38
49
|
const LABELS = {
|
|
39
50
|
minTokens: ["起切 token 数", "默认 20000"],
|
|
40
51
|
pointerTokens: ["大结果只留指针", "0 = 跟随一刀上限"],
|
|
@@ -44,6 +55,9 @@ window.__ModuleLoader__.load({
|
|
|
44
55
|
keepRoundTokens: ["收尾停止线", "默认 32000"],
|
|
45
56
|
bigGate: ["绝对停切线", "默认 650000"],
|
|
46
57
|
cooldownMs: ["官方压缩后冷却 ms", "0 = 只跳过一次"],
|
|
58
|
+
minGainRatio: ["首刀最小节省/重写", "默认 0,紧急线以上照常切"],
|
|
59
|
+
engine: ["小切模式", "auto / local / cloud"],
|
|
60
|
+
shadowMaxMb: ["Shadow 容量上限(MiB)", "默认 256,留空使用环境变量"],
|
|
47
61
|
thresholdRatio: ["官方大压缩触发比例", "默认 0.8"],
|
|
48
62
|
headroomTokens: ["官方大压缩预留", "默认 65536"],
|
|
49
63
|
retainTokens: ["官方大压缩保留", "默认 8192"],
|
|
@@ -60,6 +74,7 @@ window.__ModuleLoader__.load({
|
|
|
60
74
|
save: "保存",
|
|
61
75
|
saving: "保存中…",
|
|
62
76
|
invalid: "请填有效数字;留空清除覆盖,使用环境变量或默认值。",
|
|
77
|
+
invalidEngine: "请输入 auto、local 或 cloud。",
|
|
63
78
|
unavailable: "当前配置不可写",
|
|
64
79
|
saveFailed: "保存失败,修改已保留,请检查后重试。",
|
|
65
80
|
overridden: "已覆盖",
|
|
@@ -76,6 +91,7 @@ window.__ModuleLoader__.load({
|
|
|
76
91
|
save: "Save",
|
|
77
92
|
saving: "Saving…",
|
|
78
93
|
invalid: "Enter a valid number; leave blank to use the environment or default.",
|
|
94
|
+
invalidEngine: "Enter auto, local, or cloud.",
|
|
79
95
|
unavailable: "Configuration is not writable",
|
|
80
96
|
saveFailed: "Save failed; your edits have been kept.",
|
|
81
97
|
overridden: "Overridden",
|
|
@@ -94,11 +110,11 @@ window.__ModuleLoader__.load({
|
|
|
94
110
|
id: `live-compact-${name}`,
|
|
95
111
|
label,
|
|
96
112
|
hint,
|
|
97
|
-
numeric:
|
|
113
|
+
numeric: name !== "engine",
|
|
98
114
|
disabled: !state.writable || state.saving,
|
|
99
115
|
overriddenLabel: t("overridden"),
|
|
100
116
|
resetLabel: t("reset"),
|
|
101
|
-
invalidLabel: t("invalid"),
|
|
117
|
+
invalidLabel: t(name === "engine" ? "invalidEngine" : "invalid"),
|
|
102
118
|
...state[name],
|
|
103
119
|
onEdit: (text) => props.edit(name, text),
|
|
104
120
|
onReset: () => props.resetField(name),
|
|
@@ -142,7 +158,9 @@ window.__ModuleLoader__.load({
|
|
|
142
158
|
apply(ctx) {
|
|
143
159
|
const t = ctx.locale.bind("liveCompact");
|
|
144
160
|
ctx.effect(() => ctx.locale.register("liveCompact", { zh, en }), "live-compact: settings dictionary");
|
|
145
|
-
const model = new SettingsFormModel(ctx.configForms.get(NS), [
|
|
161
|
+
const model = new SettingsFormModel(ctx.configForms.get(NS), [
|
|
162
|
+
PRESET_FIELD, ...KEYS.map((name) => name === "engine" ? ENGINE_FIELD : settingsNumberField(name)),
|
|
163
|
+
]);
|
|
146
164
|
const store = model.bind(() => ({
|
|
147
165
|
...model.shell(),
|
|
148
166
|
takeoverPresets: model.field("takeoverPresets"),
|
package/cordis.patch.yml
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
#
|
|
2
|
-
# The entry installs its preset listener before constructing the engine.
|
|
1
|
+
# Keep the host stock entry available until Live Compact has activated.
|
|
3
2
|
# takeoverPresets controls future preset loads, not existing session engines.
|
|
4
|
-
- id: compaction-basic
|
|
5
|
-
name: '@deepseek-ai/dsh-compaction-basic'
|
|
6
|
-
disabled: true
|
|
7
3
|
- insert:
|
|
8
4
|
- id: compaction-spine
|
|
9
5
|
name: dsh-live-compact
|