dsh-trivium 0.7.0 → 0.8.0

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.md CHANGED
@@ -16,7 +16,7 @@ The kernel stays close to DSH: no extra process, no extra nav by default. Pin me
16
16
 
17
17
  ## Installation
18
18
 
19
- > Prerequisite: install [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) and start `dsh web` at least once. Tested host: `@deepseek-ai/dsh@0.1.5-rc.1` (`dsh-llm` / `dsh-tools` peers also accept `0.1.1-rc.2` and `0.1.0-rc.8`).
19
+ > Prerequisite: install [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) and start `dsh web` at least once. Current Web verification uses `0.2.1-rc.4`; see the [baseline and evidence index](docs/README.md) for desktop `0.2.1-rc.3` coverage and limitations. Node must satisfy `^22.19.0 || >=24`; `triviumdb` is pinned to `0.9.0-beta.3`.
20
20
 
21
21
  ```sh
22
22
  dsh plugin --profile web add dsh-trivium
@@ -26,7 +26,7 @@ Restart **dsh web**. Memory lives in the current workspace:
26
26
 
27
27
  ```
28
28
  <workspace>/.dsh/trivium.tdb # local index (binary; gitignore this)
29
- <workspace>/.dsh/trivium.jsonl # git source of truth (business facts)
29
+ <workspace>/.dsh/trivium.jsonl # optional Git exchange snapshot (business facts)
30
30
  ```
31
31
 
32
32
  Commit `trivium.jsonl`. Ignore the binary store:
@@ -94,8 +94,10 @@ The plugin loads inside the `dsh web` process. It does not open its own port or
94
94
  | Workspace `.dsh/trivium.jsonl` | read/write | Git sidecar (off by default). Business nodes/edges only; no embeddings |
95
95
  | `~/.dsh/trivium.json` | read/write | Settings and chip pins; may contain an embedding API key you typed |
96
96
  | `.dsh/trivium-pending.json` | read/write | Local queue when extract fails |
97
- | Network | off | Chat text is not sent out. Embedding outbound happens only if you turn it on and fill a URL. Settings **Check for updates** fetches the npm registry (version only, no transcript) |
98
- | Transcript | stays local | Extract and search run on this machine; with embedding on, retrieved text is sent to the URL you filled |
97
+ | Model extraction | on | When the host exposes a model service, extraction sends a bounded conversation excerpt to the current session's provider/model through DSH. A remote provider means network traffic and possible model charges. Without that service, extraction uses local rules |
98
+ | Remote embeddings | off | When enabled, node text and search queries are sent to the configured embedding URL. Keyword and graph retrieval work without it |
99
+ | Update check | manual | **Check for updates** fetches npm package metadata, without the conversation |
100
+ | Conversation excerpts | may be sent to the host model | Durable memory is stored locally. This does not make extraction or the DSH model conversation offline. Disable extraction and remote embeddings to stop those plugin-initiated model/embedding calls |
99
101
 
100
102
  The official DeepSeek chat API has no embeddings endpoint. Keyword + graph walk still work without it. Restart `dsh web` after changing settings or embedding.
101
103
 
@@ -179,7 +181,7 @@ Settings → **Trivium memory** manages the store. Check for updates sits at the
179
181
  | **Extract** | on | Write from compaction / idle. |
180
182
  | **Embedding** | off | Needs **Save** plus a URL; restart after changing the URL. |
181
183
 
182
- Injection detail: autoRecall injects at most 3 L0 hits when the step has user text; entity-name path injects 1-hop business neighbors only when the utterance names an existing entity. Checked chips share the budget and win first. Extract runs after `compaction/end` and a short idle; failures go to pending and replay on the next session-start (body ≤3000 chars, at most 24 items).
184
+ Injection detail: autoRecall injects at most 3 L0 hits when the step has user text; entity-name path injects 1-hop business neighbors only when the utterance names an existing entity. Corrections for delivered facts take priority, followed by checked chips and recall, all within the same allowance. Disabled injection or insufficient budget keeps notices pending with a reason; delivery on the next message is not guaranteed. Later pre-steps detect expiry of delivered decisions; there is no background timer and the ledger clears on restart. Extract runs after `compaction/end` and a short idle; failures go to pending and replay on the next session-start (body ≤3000 chars, at most 24 items).
183
185
 
184
186
  - **Entries** — search, filter by type, expand business-edge neighbors, “only nodes hanging on this one”, hide expired decisions by default. Rename / edit body / aliases / until, merge same type, archive or delete.
185
187
  - **Export / import** — JSON is a real round-trip. Markdown is a read-only projection (for people). Git sync uses `.dsh/trivium.jsonl` (business facts, auto). One-shot strict import from WorkBuddy `MEMORY.md`, Claude Code `CLAUDE.md`, and Codex `AGENTS.md`. No watch of those files, no session jsonl dumps.
@@ -224,7 +226,7 @@ The kernel is still these four. Chips / session layer do not add a fifth tool.
224
226
 
225
227
  ## Screenshots
226
228
 
227
- Captured inside DSH Web (`0.1.1-rc.2`). Screenshots below are from the Chinese UI. The plugin follows the DSH host language unless you pick Chinese / English under **Settings**.
229
+ Captured on 2026-10-28 inside DSH Web `0.2.1-rc.4` with `dsh-trivium@0.7.1`, Chinese host UI. They are a UI tour, not acceptance evidence — versioned proof and current limits stay in the [documentation index](docs/README.md). The plugin follows the host language unless you pick Chinese / English under **Settings → Trivium memory → Configuration**.
228
230
 
229
231
  ### Conversation — `ctx_find("鉴权")`
230
232
 
@@ -240,7 +242,7 @@ Session-start injects the short map; the model calls `ctx_find` and hits “auth
240
242
 
241
243
  <img width="560" alt="Settings config" src="docs/screenshots/04-settings.png">
242
244
 
243
- Check for updates sits above a collapsed **Configuration** fold (plugin language, injection strategy).
245
+ Check for updates sits above a collapsed **Configuration** fold (plugin language, injection strategy). Below it are the **Memory entries** and **Recall check** tabs.
244
246
 
245
247
  ### Settings — extract, chips, Git sidecar
246
248
 
@@ -252,6 +254,14 @@ Nested under chips: **Session layer (plot canvas)**. Git sidecar, Markdown expor
252
254
 
253
255
  <img width="560" alt="Entry list" src="docs/screenshots/06-settings-list.png">
254
256
 
257
+ Type filter, text search, and the **show stale** / **show superseded** toggles sit above the list; each card shows its own archive / delete actions.
258
+
259
+ ### Settings — recall check
260
+
261
+ <img width="560" alt="Recall check" src="docs/screenshots/08-recall-check.png">
262
+
263
+ The **Recall check** tab shows this turn's estimated budget, a read-only dry run of one query, the revision-chain check, pending / sent corrections, and the latest recall diagnostics. Opening it or running the dry run does not call the model and does not request embeddings.
264
+
255
265
  ### Chips — optional, next to Conversation / Trajectory
256
266
 
257
267
  <img width="560" alt="Chips tab" src="docs/screenshots/07-chips.png">
@@ -279,6 +289,10 @@ Off by default. After you turn **Chips (memory whitelist)** on in Settings, the
279
289
 
280
290
  ## Changelog
281
291
 
292
+ **0.8.0** — Workspace switching, operation receipts, read-only import preview and per-turn delivery records. Fix exact-name recall, revision-confirmation bypass and damaged-chain projection. Extraction is single-flight, retryable after failure and wakes after cooldown; pure acknowledgements skip the model. Trim context/tool overhead without changing defaults or data formats. See [release notes](docs/release-0.8.0.md) for evaluation and cost limits.
293
+
294
+ **0.7.1** — Reliability fixes. JSON/JSONL share URI mapping, final-graph validation and a fact transaction; rejected input is preserved and recoverable, including archived revision history. Fix repeated corrections, clock-only expiry, stale projections and the 32-hop boundary. Corrections take priority within the existing shared budget; disabling injection still retains pending notices. Sidecar health and runtime diagnostics are scoped to the workspace. Settings requests stay bound to the displayed store; search races, keyboard expansion and nested dialogs are fixed. The deadline cleaner's dry run is now truly read-only. Data formats, four tools and defaults are unchanged. See the [release notes](docs/release-0.7.1.md).
295
+
282
296
  **0.7.0** — Observability release. Settings → Recall check now lists pending and recently delivered corrections per session, scoped to the workspace, and adds a **Check version chains** button that runs the same read-only check as `dsh-trivium-check`. New read-only endpoints: `GET /api/dsh-trivium/corrections` and `GET /api/dsh-trivium/integrity`. A fault-injection regression now proves a sidecar write failure is reported by health and repaired by `bootstrap-write` on reopen, and the README documents the host-side desktop `EPIPE`. Memory format, defaults and the four-tool surface are unchanged.
283
297
 
284
298
  **0.6.0** — Maintenance release. The read-only revision checker and the stale-deadline cleaner now ship with the package as `dsh-trivium-check` and `dsh-trivium-clear-until` (dry run by default; `--apply` clears only deadlines also present in the body, `--all` clears every stale one). The checker previously existed only in the Git checkout even though the 0.5.1 notes told users to run it. This release also pins two verifications: turn identity comes from the host's own user-message id (checked in a real session log), and a genuine second-window attempt with a stale ETag returns 409 and succeeds after refresh. No defaults or data formats changed.
@@ -368,7 +382,7 @@ Local source checkout: `npm install`, then `node scripts/link-dsh.mjs`, then res
368
382
  ## Release info
369
383
 
370
384
  - GitHub: https://github.com/QWQcool/dsh-trivium
371
- - Package version: `0.7.0` · [npm](https://www.npmjs.com/package/dsh-trivium)
385
+ - Package version: `0.8.0` · [npm](https://www.npmjs.com/package/dsh-trivium)
372
386
  - Tested host: `@deepseek-ai/dsh@0.2.1-rc.4` (the peer range also admits the 0.1.x lines)
373
387
  - License: MIT (depends on [TriviumDB](https://github.com/YoKONCy/TriviumDB), Apache-2.0)
374
388
 
package/README.zh-CN.md CHANGED
@@ -14,7 +14,7 @@ DeepSeek Harness 的进程内图记忆插件:按节点和边记,默认少注
14
14
 
15
15
  ## 安装
16
16
 
17
- > 前提:已安装 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 并至少启动过一次 `dsh web`。当前测试宿主:`@deepseek-ai/dsh@0.1.5-rc.1`(`dsh-llm` / `dsh-tools` peer 兼容 `0.1.1-rc.2` 与 `0.1.0-rc.8`)。
17
+ > 前提:已安装 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 并至少启动过一次 `dsh web`。当前使用 Web `0.2.1-rc.4` 验证;桌面 `0.2.1-rc.3` 的验证层级和局限见[文档入口](docs/README.md)。Node 要求 `^22.19.0 || >=24`,内核精确锁定 `triviumdb@0.9.0-beta.3`。
18
18
 
19
19
  ```sh
20
20
  dsh plugin --profile web add dsh-trivium
@@ -24,7 +24,7 @@ dsh plugin --profile web add dsh-trivium
24
24
 
25
25
  ```
26
26
  <workspace>/.dsh/trivium.tdb # 本地索引(二进制,建议 gitignore)
27
- <workspace>/.dsh/trivium.jsonl # git 源(业务事实)
27
+ <workspace>/.dsh/trivium.jsonl # 可选 Git 交换快照(业务事实)
28
28
  ```
29
29
 
30
30
  把 `trivium.jsonl` 交给 git。二进制库不要进版本库:
@@ -92,8 +92,10 @@ dsh plugin --profile web remove dsh-trivium
92
92
  | 工作区 `.dsh/trivium.jsonl` | 读写 | Git 旁路(默认关)。只含业务节点和边,不含向量 |
93
93
  | `~/.dsh/trivium.json` | 读写 | 设置和芯片钉选;可含你手填的 embedding API key |
94
94
  | `.dsh/trivium-pending.json` | 读写 | 抽取失败时的本地队列 |
95
- | 网络 | 关 | 对话不外发。打开 embedding 并填了 URL 才会把被检索文本发到你填的地址。设置页点「检查更新」会请求 npm registry(只拿版本号,不含对话) |
96
- | 对话原文 | 不外发 | 抽取和检索都在本机;embedding 开启后,被检索的文本会发到你填的地址 |
95
+ | 模型抽取 | 开 | 宿主模型服务可用时,通过 DSH 把限长的对话片段交给当前会话选用的 provider/model;远程模型意味着联网和可能的模型费用。没有模型服务时使用本地规则 |
96
+ | 远程 embedding | 关 | 开启后,节点正文和查询文本会发送到配置的 embedding URL。不开也可使用关键词和图检索 |
97
+ | 检查更新 | 手动触发 | 请求 npm 包元数据,不发送对话 |
98
+ | 对话片段 | 可能交给宿主模型 | 长期记忆存储在本地,不等于抽取或 DSH 对话全程离线。关闭抽取和远程 embedding,可停止插件主动发起的这两类模型/向量调用 |
97
99
 
98
100
  官方 DeepSeek 对话接口没有 embeddings。不开 embedding 也能用:关键词 + 图遍历。改完设置或 embedding 后需重启 `dsh web`。
99
101
 
@@ -175,7 +177,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
175
177
  | **抽取** | 开 | compaction / 空闲后写入。 |
176
178
  | **embedding** | 关 | 要填 URL 并点「保存设置」,改 URL 后重启。 |
177
179
 
178
- 注入细节:autoRecall 在本步含用户文本时最多灌 3 条 L0;实体名折中只在话里点到已有实体时灌 1 跳业务边邻居。芯片钉选优先占预算。抽取失败进 pending,下次 session-start 重放(每批正文 ≤3000 字、最多 24 条)。
180
+ 注入细节:autoRecall 在本步含用户文本时最多灌 3 条 L0;实体名折中只在话里点到已有实体时灌 1 跳业务边邻居。已送达事实的更正先占共享预算,其次是芯片和召回。注入关闭或同轮预算不足时,更正保留并显示原因,不承诺下一条必定送达。后续 pre-step 会检查已送达决策是否自然到期;没有后台计时器,重启会清空投递账本。抽取失败进 pending,下次 session-start 重放(每批正文 ≤3000 字、最多 24 条)。
179
181
 
180
182
  - **条目** — 可搜、按类型筛、展开业务边邻居、「只看挂在这上面的」、默认隐藏过期决策。可改名 / 改正文 / 别名 / until,同类型合并,归档或删除。
181
183
  - **导出导入** — JSON 是真回写。Markdown 只读投影(给人看)。给 git 用的是 `.dsh/trivium.jsonl`(业务事实,自动写)。WorkBuddy `MEMORY.md`、Claude Code `CLAUDE.md`、Codex `AGENTS.md` 可一次性严导入。不监视那些文件,不导入会话 jsonl。
@@ -220,7 +222,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
220
222
 
221
223
  ## 界面截图
222
224
 
223
- 以下入口在本机 DSH Web(`0.1.1-rc.2`)上仍在。截图为中文界面。插件默认跟随 DSH 宿主语言;也可在 **配置设置** 里锁定中文或英文。
225
+ 以下截图于 2026-10-28 在 DSH Web `0.2.1-rc.4` 与 `dsh-trivium@0.7.1` 上实拍,宿主为中文界面。它们只是界面导览,不是验收证据;分版本证据及当前边界见[文档入口](docs/README.md)。插件默认跟随 DSH 宿主语言;也可在 **设置 → Trivium 记忆 → 配置设置** 里锁定中文或英文。
224
226
 
225
227
  ### 会话 — `ctx_find("鉴权")`
226
228
 
@@ -236,7 +238,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
236
238
 
237
239
  <img width="560" alt="设置配置" src="docs/screenshots/04-settings.png">
238
240
 
239
- 「检查更新」下面是可折叠的 **配置设置**(本插件语言、注入策略)。
241
+ 「检查更新」下面是可折叠的 **配置设置**(本插件语言、注入策略);再下面分 **记忆条目 / 召回检查** 两个标签。
240
242
 
241
243
  ### 设置 — 抽取、芯片、Git 旁路
242
244
 
@@ -248,6 +250,14 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
248
250
 
249
251
  <img width="560" alt="条目列表" src="docs/screenshots/06-settings-list.png">
250
252
 
253
+ 列表上方是类型筛选、文本搜索和「显示过期决策 / 显示已替代」两个开关;每张卡片自带归档、删除动作。
254
+
255
+ ### 设置 — 召回检查
256
+
257
+ <img width="560" alt="召回检查" src="docs/screenshots/08-recall-check.png">
258
+
259
+ **召回检查** 标签显示本轮估算预算、一次查询的只读试算、版本链体检、待发 / 已发更正与最近召回诊断。打开该标签或运行只读试算都不调用模型,也不请求 embedding。
260
+
251
261
  ### 芯片 — 可选,在对话 / 轨迹旁
252
262
 
253
263
  <img width="560" alt="芯片标签" src="docs/screenshots/07-chips.png">
@@ -275,6 +285,10 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
275
285
 
276
286
  ## 更新说明
277
287
 
288
+ **0.8.0** — 工作区切换、统一操作回执、只读导入预览与每轮投递记录;修复精确名称召回、版本边确认绕过及损坏链投影。抽取使用单批在途、失败恢复和冷却唤醒,纯致谢跳过模型;精简注入/工具输出,默认开关与数据格式不变。判据、公平对照和成本的实际边界见 [发布说明](docs/release-0.8.0.md)。
289
+
290
+ **0.7.1** — 可靠性修复。JSON/JSONL 共用身份映射、整图预检和事实事务,失败输入保留且可恢复;归档版本链可完整往返。修复连续更正、自然到期、过期投影和 32 跳边界,更正优先使用原有共享预算;关闭注入仍保留待发状态。旁路健康和运行诊断按工作区返回,设置页读写固定到所显示的库,修复搜索响应竞态、键盘展开和嵌套弹窗。期限清理 dry-run 真正只读。数据格式、四工具与默认开关保持不变,详情见 [0.7.1 发布说明](docs/release-0.7.1.md)。
291
+
278
292
  **0.7.0** — 可观测性版本。设置 → 召回检查现在按会话列出待发送与最近已发送的更正(按工作区过滤),并新增「检查版本链」按钮,复用 `dsh-trivium-check` 的只读检查。新增只读接口:`GET /api/dsh-trivium/corrections`、`GET /api/dsh-trivium/integrity`。新增故障注入回归:旁路写入失败会被 health 报告,重开时由 `bootstrap-write` 修复;README 补充桌面端 `EPIPE` 的宿主侧说明。记忆格式、默认值与四工具面均未变。
279
293
 
280
294
  **0.6.0** — 维护版本。只读版本链体检与过期期限清理现在随包分发:`dsh-trivium-check`、`dsh-trivium-clear-until`(默认只列不改;`--apply` 只清「期限同时出现在正文里」的那些,`--all` 清所有过期期限)。此前 0.5.1 的说明让用户运行 `scripts/check-integrity.mjs`,但该脚本并不在 npm 包里。本版同时固化两项验收:轮标识取自宿主自己的用户消息 id(已在真实会话日志中确认),以及真实第二窗口带过期 ETag 会得到 409、刷新后成功。默认值与数据格式均未变。
@@ -364,7 +378,7 @@ peer 范围显式接受已支持的 DSH `0.1.5`、`0.2.0`、`0.2.1` RC 版本线
364
378
  ## 发布信息
365
379
 
366
380
  - GitHub: https://github.com/QWQcool/dsh-trivium
367
- - 包版本:`0.7.0` · [npm](https://www.npmjs.com/package/dsh-trivium)
381
+ - 包版本:`0.8.0` · [npm](https://www.npmjs.com/package/dsh-trivium)
368
382
  - 测试宿主:`@deepseek-ai/dsh@0.2.1-rc.4`(peer 范围同时接受 0.1.x 各线)
369
383
  - License: MIT(依赖 [TriviumDB](https://github.com/YoKONCy/TriviumDB) 为 Apache-2.0)
370
384