dsh-context-toolkit 0.3.2 → 0.3.3

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 ADDED
@@ -0,0 +1,45 @@
1
+ # Changelog (dsh-context-toolkit)
2
+
3
+ > [简体中文](./CHANGELOG.zh.md) | **English**
4
+
5
+ User-visible changes, newest first. Commit hashes in brackets.
6
+
7
+ ## 0.3.3
8
+ - **Docs**: adds this bilingual changelog, listed in the manifest and gated by release-check; the README and repository description were refreshed too. The npm package now carries the changelog with each release. [`01d7107`]
9
+
10
+ ## 0.3.2
11
+ - **Fixed**: `slimOriginalTtlMinutes` was displayed in the settings page and never read by the code, so the expiry the panel promised never happened and stored originals accumulated without limit; the sweep now runs once on every load.
12
+ - **Fixed**: the rollback call `purgeBlobs({ all: false })` passed no age and was therefore a no-op, leaving the original forever; a rollback now removes exactly the id it wrote and cannot take an unrelated original with it.
13
+ - The ledger reports the effective retention, making a consumed setting visible. [`98f6a06`]
14
+
15
+ ## 0.3.1
16
+ - **Fixed**: `ctk_retrieve` omitted `isError` on its success path; the host validates a tool's output against its schema and rejects the call when a required property is missing, so read-back was unusable — the marker was injected and the original stored, and it could not be read. [`75ea559`]
17
+ - The ledger now renders slimming counts (blocks, bytes, tokens, skipped) and stored originals, and counts slimmed bytes as kept out of context.
18
+
19
+ ## 0.3.0
20
+ - **New: output slimming at `tools/post-execute`** — the gate guards the door; this handles what is already inside: uniform JSON re-encoded losslessly, tables keeping header and both ends with the middle sampled by original line number, grep/search folded by file, logs folded with diagnostics kept verbatim, code and key-value left alone.
21
+ - **Two never-worse gates**: at most 72% of the bytes and a strictly lower token estimate, or the candidate is dropped.
22
+ - **Reversibility is the red line**: every lossy path stores the exact original first and injects a `[ctk_retrieve id=…]` marker, read back with the new `ctk_retrieve`. Originals live in the **same SQLite database as the FTS5 index** (a `blobs` table; BLOB access so nothing re-encodes the bytes). [`61f162d`]
23
+
24
+ ## 0.2.4
25
+ - **Fixed**: the `read` branch repeated `script_path`'s path-base mistake — a relative path was resolved against the plugin process's cwd while the host opens it against the session working directory; measured on live code, the same 70 KB file was refused by absolute path and read whole by relative path. [`8607fb2`]
26
+ - **New**: the host's own fetchers (`web_fetch`, `read_page`) are nudged too — previously curl in a shell was refused while the same page walked in through them.
27
+
28
+ ## 0.2.3
29
+ - **Fixed**: a relative `script_path` was resolved against a different base than the host uses, so the gate read nothing and waved the call through; resolution now uses the session working directory. [`5820210`]
30
+
31
+ ## 0.2.2
32
+ - **Fixed**: gate matching moved from a whole-line substring with delimiters to splitting at command separators and comparing each segment's command word — fixing both directions (misses on non-leading invocations and prefixed/pathed ones, false denials where the tool name is just an argument).
33
+ - **Fixed**: `ops_bash` runs a file when handed `script_path`, which the gate never saw; the script is now read (first 256 KB).
34
+ - **Fixed**: the suite leaked its own handles (the mock discarded the disposer, so the SQLite handle stayed open and Windows could not delete the temp directory). [`da1b0fd`]
35
+
36
+ ## 0.2.1
37
+ - **Fixed**: `ctk_doctor` printed a hardcoded `0.1.0` while the bundle shipped 0.2.0; it now reads its own `package.json` at load.
38
+ - **New**: `release-check.mjs`, the release-readiness gate. [`d98835a`]
39
+
40
+ ## 0.2.0
41
+ - **Fixed**: `guard` returned `null` instead of `undefined` when allowing, and the host denies whenever the reason is not undefined — every tool call was denied (run_code failed with a bare `Error: null`).
42
+ - **Fixed**: the gate recognised only the shell names it shipped with, so `curl` through `ops_bash` slipped past; every shell name is covered now.
43
+
44
+ ## 0.1.0
45
+ - First release: `ctk_execute` / `ctk_execute_file` / `ctk_batch_execute` (run code in a child process, return only the conclusion), `ctk_index` / `ctk_search` (a local FTS5 knowledge base on `node:sqlite`), the routing gate, `ctk_stats` / `ctk_doctor` and a live occupancy panel. [`87b35fe`]
@@ -0,0 +1,45 @@
1
+ # 更新说明(dsh-context-toolkit)
2
+
3
+ > **简体中文** | [English](./CHANGELOG.md)
4
+
5
+ 本文件按版本记录用户可感知的变化。方括号内为对应提交。
6
+
7
+ ## 0.3.3
8
+ - **文档**:新增中英双语更新说明(本文件),并纳入发布清单与发布门;README 与仓库首页说明同步更新。npm 包开始随版本携带 CHANGELOG。[`01d7107`]
9
+
10
+ ## 0.3.2
11
+ - **修复**:`slimOriginalTtlMinutes`(原文保留期)此前只在设置页展示、代码从未读取 ⇒ 面板承诺的过期从不发生,原文无限累积;现于**每次加载**执行一次过期清理。
12
+ - **修复**:标记投递失败时的回滚调用 `purgeBlobs({ all: false })` 不传年龄 ⇒ **是空操作**,原文永久留存;现按**精确 id** 回滚,不会牵连其他原文。
13
+ - 台账新增「原文保留期 retention」一行,让被消费的配置可见。[`98f6a06`]
14
+
15
+ ## 0.3.1
16
+ - **修复**:`ctk_retrieve` 成功路径漏 `isError` ⇒ 宿主按 schema 校验工具输出、缺必需属性直接拒调用,**可逆取回完全不可用**(标记已注入、原文已入库,却取不回来);现补上。[`75ea559`]
17
+ - 台账渲染「输出瘦身 slimmed(块/字节/token/跳过数)」与「可逆原文 blobs」,并把瘦身字节计入 *kept out of context*。
18
+
19
+ ## 0.3.0
20
+ - **新增:出口压缩(`tools/post-execute`)**——门禁守入口,这里处理**已经进来**的输出:同构 JSON **无损**表化重编码、表格保留表头+首尾并按**原始行号**采样中段、grep/search 按文件折叠、日志折叠普通行而**逐字保留诊断行**、代码与键值对**不压**。
21
+ - **双重门**:字节 ≤ 72% 且估算 token 严格下降,压不动就不压。
22
+ - **可逆红线**:有损路径先把原文**逐字节**存好并注入 `[ctk_retrieve id=…]` 标记;新增 `ctk_retrieve` 取回。原文与 FTS5 索引同在**同一个 SQLite 库**(`blobs` 表,BLOB 存取避免重编码)。[`61f162d`]
23
+
24
+ ## 0.2.4
25
+ - **修复**:`read` 分支重犯了 `script_path` 的路径基准错——相对路径按插件进程 cwd 解析,而宿主按**会话工作目录**打开;实测同一份 70000 字节文件绝对路径被拦、相对路径整段进对话。[`8607fb2`]
26
+ - **新增**:把宿主自带取网页工具(`web_fetch` / `read_page`)纳入整页软引导(此前 shell 里的 curl 被拦而同页可从它们走进来)。
27
+
28
+ ## 0.2.3
29
+ - **修复**:相对 `script_path` 解析基准与宿主不一致 ⇒ 读不到文件即当作「无脚本」放行;现统一按会话 cwd 解析。[`5820210`]
30
+
31
+ ## 0.2.2
32
+ - **修复**:门禁匹配从「整行子串 + 两侧分隔符」改为**按命令分隔符分段、只比较各段命令词**——修掉双向错误(漏检非首位调用与带前缀/路径的调用;误拦工具名只是参数的文本)。
33
+ - **修复**:`ops_bash` 用 `script_path` 时载荷在文件里、门禁完全看不见 ⇒ 补读脚本前 256 KB。
34
+ - **修复**:套件自身的句柄泄漏(mock 丢弃 disposer ⇒ SQLite 句柄常开、Windows 删不掉临时目录)。[`da1b0fd`]
35
+
36
+ ## 0.2.1
37
+ - **修复**:`ctk_doctor` 版本号硬编码 `0.1.0` 而包已 0.2.0 ⇒ 改为启动时读自身 `package.json`。
38
+ - **新增**:`release-check.mjs`(发布就绪门)。[`d98835a`]
39
+
40
+ ## 0.2.0
41
+ - **修复**:`guard` 放行时返回 `null` 而非 `undefined` ⇒ 宿主按 `reason !== undefined` 判拒,**每个工具调用都被拒**(run_code 报裸 `Error: null`)。
42
+ - **修复**:门禁只认识自带的 shell 名 ⇒ `ops_bash` 上同样的 curl 可绕过;现覆盖全部 shell 名。
43
+
44
+ ## 0.1.0
45
+ - 首个版本:`ctk_execute` / `ctk_execute_file` / `ctk_batch_execute`(子进程跑码只回结论)、`ctk_index` / `ctk_search`(基于 `node:sqlite` 的本地 FTS5 知识库)、路由门禁、`ctk_stats` / `ctk_doctor` 与实时占用面板。[`87b35fe`]
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # dsh-context-toolkit
2
2
 
3
- > [简体中文](./README.zh.md) | **English**
3
+ > [简体中文](./README.zh.md) | **English** | [Changelog](./CHANGELOG.md)
4
4
 
5
5
  A DeepSeek Harness bundle whose single job is **keeping bulk output out of the conversation**.
6
6
 
package/README.zh.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 上下文工具箱(dsh-context-toolkit)
2
2
 
3
- > **简体中文** | [English](./README.md)
3
+ > **简体中文** | [English](./README.md) | [更新说明](./CHANGELOG.zh.md)
4
4
 
5
5
  一个给 DeepSeek Harness 用的插件:**让大块输出不进对话**。
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-context-toolkit",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "DeepSeek Harness bundle: native ctk_* sandbox tools, a routing gate that keeps bulk output out of the transcript, and a local full-text knowledge base. No third-party runtime dependencies.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,6 +27,8 @@
27
27
  "cordis.patch.yml",
28
28
  "README.md",
29
29
  "README.zh.md",
30
+ "CHANGELOG.md",
31
+ "CHANGELOG.zh.md",
30
32
  "LICENSE",
31
33
  "locale/*.json",
32
34
  "icon.svg"