dsh-seal-scripts 0.5.0 → 0.5.2

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/README.en.md CHANGED
@@ -47,7 +47,7 @@
47
47
 
48
48
  **Engineering**
49
49
 
50
- - Zero runtime dependencies, Node built-ins only. Chinese and English UI.
50
+ - Zero runtime dependencies, Node built-ins only. The UI and injected text follow DSH's 8 languages (中文 / English / 日本語 / Español / Français / Deutsch / Русский / Português); model-facing errors and receipts are in English.
51
51
  - A missing host capability disables that block only — no crash, no blank settings page.
52
52
  - Plain-text data: copy `session-memory/` and you have a backup.
53
53
 
@@ -184,6 +184,17 @@ Changing that mode refreshes every remembered session to the current list — so
184
184
  - `_index.json` inside the package is not trusted; the index is rebuilt from the files on disk. `_runs`, backup directories, escaping paths and invalid ids are skipped.
185
185
  - Limits: 64 MB per entry, 128 MB total; zip64 and encrypted archives are not supported.
186
186
 
187
+ ### Clear cache (0.5.1)
188
+
189
+ The **Clear cache** button sits at the right end of the import / export row. It takes two clicks (the first only turns the button into "Confirm clear" and spells out what will go).
190
+
191
+ - **Deleted**: every `<id>.bak-<timestamp>` rollback version (the old directory kept by a reinstall or an import), and every run log in `_runs/`.
192
+ - **Kept**: `_index.json` and every `<id>/` toolScript directory — tools keep running and the index is not rebuilt. Those two live outside the index, which is exactly why the rest is safe to drop.
193
+ - Only directories named "valid id + `.bak-` + digits" count as rollback versions; anything else is left alone (better to under-delete).
194
+ - If an import is in flight, the package it staged inside `_runs/` is skipped and the receipt says how many were skipped.
195
+ - One entry that cannot be removed (in use or no permission) does not abort the run: the rest still go, and the receipt says "N could not be removed".
196
+ - The receipt reports how many rollback versions, how many run logs, and how many bytes were cleared.
197
+
187
198
  ## Reviews and context memory
188
199
 
189
200
  The problem reviews solve: after compaction the earlier detail is normally gone. Now the shadowed transcript is kept as a file and can be read back when it matters.
@@ -265,7 +276,9 @@ Settings → **Tool (script) manager**, four tabs:
265
276
 
266
277
  | Tab | Contents |
267
278
  |---|---|
268
- | Sealed tools (shown as `toolList` in the English UI) | tool path, the prompt text about to be injected, "Inject toolSequence list" toggle and refresh mode, import / export |
279
+ | Sealed tools (shown as `toolList` in the English UI) | tool path, the prompt text about to be injected, "Inject toolSequence list" toggle and refresh mode, import / export / clear cache |
280
+
281
+ The UI language follows DSH only: every settings-page string, the review injection (preamble / heading / placeholders / body line markers), the diary reminder, and the toolSequence section all switch with it. A review file is written with the header and section titles of the language active **at capture time**; switching later only changes the display, never the file (all 8 spellings are accepted when reading). Errors and receipts the tools return to the model are English — they do not follow the UI language.
269
282
  | Sessions | sessions grouped by workspace (title, archived badge), Delete / Delete + review, both confirmed |
270
283
  | Reviews | calendar range filter, review list with depth badges, injection preview, delete one review |
271
284
  | Options | four groups: Sealed tools, Recall injection, Review content, Review depth |
package/README.md CHANGED
@@ -49,7 +49,7 @@
49
49
 
50
50
  **工程面**
51
51
 
52
- - 零运行时依赖,只用 Node 内置模块;中文 / 英文双语。
52
+ - 零运行时依赖,只用 Node 内置模块;界面与注入跟随 DSH 的 8 种语言(中文 / English / 日本語 / Español / Français / Deutsch / Русский / Português),模型侧的报错与回执统一用英文。
53
53
  - 宿主能力缺哪块关哪块,不抛错、不整页崩溃。
54
54
  - 数据是纯文本:`session-memory/` 拷走即备份。
55
55
  <a name="sec-install"></a>
@@ -194,6 +194,17 @@ $DSH_HOME/session-memory/toolSequence/
194
194
  - **导入**:选 zip → 先 `dryRun` 预览「会装哪些 / 会盖哪些 / 跳过哪些」→ 确认才写;同名目录留 `.bak-<时间戳>`。
195
195
  - 包内的 `_index.json` 不采信,索引按落地文件重建;`_runs`、备份目录、越界路径、非法 id 一律跳过。
196
196
  - 大小:不设死上限。0.4.11 起导入先把请求体流式落盘、再逐条解进 staging(不吃内存),解压炸弹按「解压后总字节 + 16 MB 余量 vs 磁盘可用空间」判——装不下才拒绝。不支持 zip64 与加密包。
197
+
198
+ ### 清除缓存(0.5.1)
199
+
200
+ 导入 / 导出那一行最右边的「清除缓存」,两下才动手(第一下只把按钮换成「确认清除」并写明会删什么):
201
+
202
+ - **删**:所有 `<id>.bak-<时间戳>` 回滚版本(覆盖安装 / 导入留下的旧目录)、`_runs/` 里的全部运行日志。
203
+ - **不删**:`_index.json` 与每个 `<id>/` 工具脚本目录——清完工具照常跑,索引不重建;也正因为这两类东西不在索引里,才删得干净。
204
+ - 只有名字是「合法 id + `.bak-` + 纯数字」的目录才算回滚版本;别的目录一个都不碰(宁可少删)。
205
+ - 正有一个导入在进行时,它落在 `_runs/` 的临时包会被跳过,回执里会写明跳过了几个。
206
+ - 单个条目删不掉(被占用、没权限)不中断整轮:其余照删,回执里写「有 N 项没删掉」。
207
+ - 回执写明清掉了多少个回滚版本、多少个运行日志、共多少字节。
197
208
  <a name="sec-reviews"></a>
198
209
 
199
210
 
@@ -282,7 +293,9 @@ $DSH_HOME/session-memory/toolSequence/
282
293
 
283
294
  | 标签 | 内容 |
284
295
  |---|---|
285
- | 自创工具 | 工具路径、即将注入的系统提示词原文、清单开关与刷新时刻、导入 / 导出 |
296
+ | 自创工具 | 工具路径、即将注入的系统提示词原文、清单开关与刷新时刻、导入 / 导出 / 清除缓存 |
297
+
298
+ 界面语言只跟 DSH 的设置走:设置页每一处文案、回顾注入正文(前言 / 标题 / 占位 / 正文行首标记)、日记补写提醒、工具组清单那一段,都会跟着切换。落盘的回顾文件在**写的那一刻**按当时的语言写文件头与分区标题,之后换语言只换显示,不改文件(8 种写法读的时候都认)。工具自身返回给模型的报错与回执是英文——它们不随界面语言变。
286
299
  | 会话 | 按工作区分组的会话列表(标题、归档徽章),删除 / 删除并回顾(都二次确认) |
287
300
  | 回顾 | 日历区间筛选、回顾列表(深度徽章)、注入预览、删除单条 |
288
301
  | 选项 | 四组:工具固存、回顾注入、回顾内容、回顾深度 |