dsh-trivium 0.4.20 → 0.5.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 +51 -6
- package/README.zh-CN.md +51 -6
- package/lib/client.js +948 -9
- package/lib/context-budget.js +348 -0
- package/lib/extract.js +25 -11
- package/lib/host-format.js +35 -0
- package/lib/index.js +279 -77
- package/lib/markdown.js +0 -2
- package/lib/pins.js +66 -21
- package/lib/provenance.js +147 -0
- package/lib/recall-preview.js +128 -0
- package/lib/recall-trace.js +285 -0
- package/lib/revision-graph.js +103 -0
- package/lib/revisions.js +451 -0
- package/lib/schema.js +13 -1
- package/lib/server.js +204 -4
- package/lib/sidecar.js +122 -15
- package/lib/store.js +480 -62
- package/lib/tool-defs.js +93 -0
- package/lib/tool-output.js +88 -0
- package/lib/tools.js +69 -43
- package/lib/turn-ledger.js +184 -0
- package/lib/until.js +1 -13
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -55,6 +55,8 @@ Then restart `dsh web`.
|
|
|
55
55
|
|
|
56
56
|
## Updating
|
|
57
57
|
|
|
58
|
+
Before upgrading, stop DSH and back up the entire workspace `.dsh/trivium.tdb*` file group. Default mmap storage also uses `.vec`, `.wal`, `.text`, and other sidecars. Git JSONL omits local-only data and is not a complete backup.
|
|
59
|
+
|
|
58
60
|
```sh
|
|
59
61
|
dsh plugin --profile web add dsh-trivium
|
|
60
62
|
```
|
|
@@ -138,7 +140,11 @@ Trivium is a memory kernel, not a journal, calendar, or chat companion. It store
|
|
|
138
140
|
|
|
139
141
|
Nodes are `entity` / `preference` / `decision` / `experience`. Business edges are `about`, `decided`, `broke`, `fixed`.
|
|
140
142
|
|
|
141
|
-
`ctx_find` returns L0 summaries plus edge paths (incoming as `<-label-id`).
|
|
143
|
+
`ctx_find` returns L0 summaries plus edge paths (incoming as `<-label-id`). Entity-name queries also return `about` / `decided` / `broke` / `fixed` neighbors even when their text omits the query. Relevant expired decisions remain searchable as history, labeled `stale` and ranked lower. Set `include_stale: false` to exclude them. Automatic recall and the opening map still exclude expired decisions.
|
|
144
|
+
|
|
145
|
+
Dates in prose stay in prose. Set expiry in Settings or the separate `ctx_remember.until` field. Supported labels are `YYYY-MM-DD`, weekdays such as `Friday` / `周五`, `周末`, and `下周` (one week), resolved at the end of the UTC day. An unresolvable replacement label cannot retain the old `untilAt`. Clearing the label clears the timestamp; changing a relative deadline anchors it to the edit, while saving an unchanged label does not extend it.
|
|
146
|
+
|
|
147
|
+
0.4.22 does not bulk-delete existing expiry fields. Find affected entries with `ctx_find` or Settings → **Show expired decisions**, clear `until`, and save. Later edits to dated prose will not recreate the expiry.
|
|
142
148
|
|
|
143
149
|
### Chips (memory whitelist)
|
|
144
150
|
|
|
@@ -148,7 +154,7 @@ Lists unarchived preference / decision / entity (experience stays out). Check to
|
|
|
148
154
|
|
|
149
155
|
| Action | When it takes effect |
|
|
150
156
|
|---|---|
|
|
151
|
-
| Check a chip | The **next** message you send in this segment carries it (L0
|
|
157
|
+
| Check a chip | The **next** message you send in this segment carries it (L0; chips and recall share 300 tokens) |
|
|
152
158
|
| Uncheck | The turn after that no longer carries it |
|
|
153
159
|
| Add | One click writes one node; a whole paste is still one node |
|
|
154
160
|
| Select → Archive | Soft delete: gone from find / short map / chips; the node remains in `.tdb` |
|
|
@@ -167,7 +173,7 @@ Settings → **Trivium memory** manages the store. Check for updates sits at the
|
|
|
167
173
|
|---|---|---|
|
|
168
174
|
| **Chips (memory whitelist)** | off | Title-bar **Chips** tab next to Conversation / Trajectory. Checked chips are a whitelist for the next turn (L0, ≤300 tokens). |
|
|
169
175
|
| **Session layer** | off (needs Chips on) | Plot canvas on the same tab: Create checkpoint, Update checkpoints, fork from a box. |
|
|
170
|
-
| **Git sidecar** | off | Debounced write of `.dsh/trivium.jsonl
|
|
176
|
+
| **Git sidecar** | off | Debounced write of `.dsh/trivium.jsonl` (format v2; relations included, local sources never written). **Generate** (on) overwrites from the current `.tdb`. **Delete jsonl** (off) removes known files. Clone / pull re-imports. |
|
|
171
177
|
| **Plugin language** | follow host | Chinese / English for this plugin's Settings card and Chips tab only. Does not change DSH. |
|
|
172
178
|
| **Injection** | off | Short map only, unless you pick autoRecall or entity-name path. |
|
|
173
179
|
| **Extract** | on | Write from compaction / idle. |
|
|
@@ -179,13 +185,37 @@ Injection detail: autoRecall injects at most 3 L0 hits when the step has user te
|
|
|
179
185
|
- **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.
|
|
180
186
|
- **Check for updates** — Settings compares the installed version with npm latest and shows `dsh plugin --profile web add dsh-trivium` when a newer version exists. It does not auto-upgrade.
|
|
181
187
|
|
|
188
|
+
### Sources, history, and recall check
|
|
189
|
+
|
|
190
|
+
The card has two tabs, and a node detail has three.
|
|
191
|
+
|
|
192
|
+
| Surface | What it answers |
|
|
193
|
+
|---|---|
|
|
194
|
+
| **Memory entries** | What is stored. Replaced versions are hidden by default; **Show replaced** is a separate switch from **Show expired**. |
|
|
195
|
+
| **Recall check** | What the last turn actually injected, in estimated tokens, plus a read-only probe: candidates, real filter reasons, and the exact text that would be sent. |
|
|
196
|
+
| **Content / Source / Decision history** | The body, where it came from, and the chain of decisions that replaced it. |
|
|
197
|
+
|
|
198
|
+
A memory knows where it came from only if the write recorded it (`kind`, session, message, a short quote). A record with no source says so; it never guesses a session or an author. A session this process cannot confirm is reported as unavailable while the stored excerpt is kept. The host exposes no session locator, so there is no deep link — rather than inventing one.
|
|
199
|
+
|
|
200
|
+
The recall check is read-only: it does not write, does not run a tool, and never requests an embedding. With no query vector it says the semantic channel did not run. Nothing on these tabs injects context or calls a model.
|
|
201
|
+
|
|
202
|
+
### Replacing a decision
|
|
203
|
+
|
|
204
|
+
A newer decision does not expire the old one — it supersedes it. **Replace…** on a decision picks another existing decision, shows both side by side, and asks for confirmation. The old body and deadline are kept and nothing is archived; the panel then shows **Current version** / **Replaced** as its own axis, next to **Expired**.
|
|
205
|
+
|
|
206
|
+
The chain is linear: at most one direct predecessor and one successor, no cycles, at most 32 hops. Writes are validated server-side inside a per-workspace queue with both nodes' ETags, so a second window that confirmed off a stale view gets a 409 instead of overwriting. **Undo replacement** removes only that one relation, and it refuses when a newer version sits above it.
|
|
207
|
+
|
|
208
|
+
A body inside a chain is confirmed history: automatic extraction, merging, editing the text, deleting or merging the node are all refused (`REVISION_PROTECTED` / `REVISION_LINKED`). Name, aliases, deadline and source notes stay editable. New text becomes a new decision that then supersedes the old one.
|
|
209
|
+
|
|
210
|
+
Automatic recall still only speaks about the current version: a hit on an old body is mapped forward, de-duplicated, and carries one short `matched_history` pointer. A pin you set on the old version is never rewritten — it is marked historical with an offer to pin the current version. If the current version is archived or expired, the chain is simply not injected; the old version is not revived.
|
|
211
|
+
|
|
182
212
|
### Agent tools
|
|
183
213
|
|
|
184
214
|
| Tool | What it does |
|
|
185
215
|
|---|---|
|
|
186
|
-
| `ctx_find` |
|
|
216
|
+
| `ctx_find` | Text / optional vector / graph search; L0 summaries and paths. Expired history is labeled `stale` and ranked lower; `include_stale: false` excludes it |
|
|
187
217
|
| `ctx_read` | Full text and incoming edges by id |
|
|
188
|
-
| `ctx_remember` | Manual write |
|
|
218
|
+
| `ctx_remember` | Manual write; optional explicit `until` field for real expiry, never inferred from dates in prose |
|
|
189
219
|
| `ctx_link` | Directed edge between two nodes |
|
|
190
220
|
|
|
191
221
|
The kernel is still these four. Chips / session layer do not add a fifth tool.
|
|
@@ -239,12 +269,27 @@ Off by default. After you turn **Chips (memory whitelist)** on in Settings, the
|
|
|
239
269
|
- Do not merge `.tdb` in git (binary). Track `trivium.jsonl`; ignore `.tdb`. jsonl merge conflicts are ordinary text — resolve, then reopen the workspace.
|
|
240
270
|
- The session layer (when on) projects compaction and fork; it does not split boxes by message count. If the window has not reached DSH’s compact line, **Update checkpoints** will not invent history boxes — use **Create checkpoint**.
|
|
241
271
|
- Plugin setting toggles (chips / session layer / git sidecar / recall / extract) save immediately. Embedding URL still uses Save; restart only if the Settings card itself is missing.
|
|
272
|
+
- **0.5.0 writes JSONL `v: 2` and graph JSON `version: 2`.** Both are additive and a v1 file still reads, but downgrading is not supported in place: an older build ignores the revision relations and will drop them on its next write. To go back, restore the pre-upgrade file group (`.dsh/trivium.tdb` plus `.dsh/trivium.jsonl`) rather than letting the old build rewrite it.
|
|
273
|
+
- A decision chain is linear in this release: one predecessor, one successor. Splitting one version into several, or a fan-in, is refused instead of half-applied.
|
|
274
|
+
- Deleting a replacement relation from the JSONL file is reported as a conflict, not applied. Revoke it in the panel.
|
|
242
275
|
- After the host moved to rc.8, DSH’s own older session store may not open (official SQLite format change). The workspace `.tdb` graph is still there; leftover boxes on unmatched old sessions are plot residue and do not affect `ctx_find`.
|
|
243
276
|
|
|
244
277
|
---
|
|
245
278
|
|
|
246
279
|
## Changelog
|
|
247
280
|
|
|
281
|
+
**0.5.0** — Memory you can audit. Chips and recall now share **one** 300-token allowance per user turn instead of clipping to 300 each, the same node can no longer appear twice, and a tool loop no longer re-injects inside one turn. The delivery ledger is keyed by host message ids, so a failed send is retried and compaction rebuilds, while a fork inherits neither the ledger nor the pins. `ctx_find` is capped at ~1200 estimated tokens with whole-record truncation, and `ctx_read` projects a field allowlist so new metadata cannot grow its output.
|
|
282
|
+
|
|
283
|
+
Settings gains a **Recall check** tab (read-only: it never writes, runs a tool, or requests an embedding) and per-node **Source** / **Decision history** tabs. Provenance is reported only when a write recorded it — no invented sessions, quotes, or deep links. Recall traces name the pipeline branches that actually ran, capped at 20 per workspace+session / 10 minutes / 64 KiB each.
|
|
284
|
+
|
|
285
|
+
New `supersedes` relation between decisions, confirmed by the user: linear chain, 32-hop limit, per-workspace write queue, both endpoints' ETags, idempotent `operationId`, and a revoke that touches only that edge. Chain bodies are protected from extraction, merges, edits and deletes. JSON export is `version: 2` and the Git JSONL is `v: 2`; both are additive and v1 still reads, but v2 cannot be downgraded in place.
|
|
286
|
+
|
|
287
|
+
**0.4.22** — Fix [issue #3](https://github.com/QWQcool/dsh-trivium/issues/3): expiry is explicit, clearing it persists, and relevant expired history is searchable with a `stale` label. Preserve native text/vector candidates; add multiword fallback, aliases, and two-character Chinese entity anchors. Upgrade TriviumDB to `0.8.11`. Add focused expiry/recall regressions and keep automatic recall restricted to unexpired memories.
|
|
288
|
+
|
|
289
|
+
The peer ranges now explicitly admit the supported DSH `0.1.5`, `0.2.0`, and `0.2.1` RC lines; a broad stable-version range alone does not include those prereleases under npm rules.
|
|
290
|
+
|
|
291
|
+
**0.4.21** — Host adaptation for `@deepseek-ai/dsh@0.2.x`. Session format v4 replaced the shared `kind: "plugin"` message source with producer-owned kinds: a third-party producer must write `kind: "plugin:dsh-trivium"` and drop the `plugin` field, or the whole turn fails with "format v4 message requires a producer-owned source kind". The plugin now picks the shape from the installed `dsh-llm` version, so 0.1.x keeps working. `agent/created` (0.1.6+) is handled next to `agent/session-start`, with a one-shot guard in case a host emits both. Peer range widened to `<0.3.0`. New `smoke-p14` pins both source shapes and the version switch. Four tools / short map / find paths unchanged.
|
|
292
|
+
|
|
248
293
|
**0.4.20** — Storage bump to `triviumdb@0.8.9`. The napi surface is unchanged (`triviumdb.d.ts` and `index.js` hash identically to 0.8.8), so this is a kernel-only update: SM-L2 is now the default QuIVer query path, FIND planning no longer materializes discarded candidates, and the server edition ships an attributed Web Console. All 14 offline smoke scripts pass unchanged. Four tools / short map / find paths unchanged.
|
|
249
294
|
|
|
250
295
|
**0.4.19** — Fixed the plugin's own UI rendering Simplified Chinese on an English host ([issue #2](https://github.com/QWQcool/dsh-trivium/issues/2)). The `locale` service is now reached through `ctx.inject(["locale"], …)`, so **follow host** no longer depends on composition order, and the plugin fallback is `en` — the host's own `FALLBACK_LOCALE`, and the bucket every other resolved host language lands in. The Settings card and the Chips tab only ever choose between zh and en, so a browser naming no registered language no longer gets a Chinese card. Four tools / short map / find paths unchanged.
|
|
@@ -310,7 +355,7 @@ Local source checkout: `npm install`, then `node scripts/link-dsh.mjs`, then res
|
|
|
310
355
|
## Release info
|
|
311
356
|
|
|
312
357
|
- GitHub: https://github.com/QWQcool/dsh-trivium
|
|
313
|
-
-
|
|
358
|
+
- Package version: `0.4.22` · [npm](https://www.npmjs.com/package/dsh-trivium)
|
|
314
359
|
- Tested host: `@deepseek-ai/dsh@0.1.5-rc.1` (also `0.1.1-rc.2` / `0.1.0-rc.8`)
|
|
315
360
|
- License: MIT (depends on [TriviumDB](https://github.com/YoKONCy/TriviumDB), Apache-2.0)
|
|
316
361
|
|
package/README.zh-CN.md
CHANGED
|
@@ -53,6 +53,8 @@ npm test # 可选:跑全部离线 smoke
|
|
|
53
53
|
|
|
54
54
|
## 更新
|
|
55
55
|
|
|
56
|
+
升级前先停止 DSH,备份工作区 `.dsh/trivium.tdb*` 整个文件组。默认 mmap 模式还会使用 `.vec`、`.wal`、`.text` 等附属文件;Git JSONL 不含全部本机数据,不能代替完整备份。
|
|
57
|
+
|
|
56
58
|
```sh
|
|
57
59
|
dsh plugin --profile web add dsh-trivium
|
|
58
60
|
```
|
|
@@ -134,7 +136,11 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
134
136
|
|
|
135
137
|
节点类型是 `entity` / `preference` / `decision` / `experience`。业务边是 `about`、`decided`、`broke`、`fixed`。
|
|
136
138
|
|
|
137
|
-
`ctx_find` 返回 L0 摘要和图路径(入边写成 `<-label-id
|
|
139
|
+
`ctx_find` 返回 L0 摘要和图路径(入边写成 `<-label-id`)。查询点到已有实体名时,还会带上 about/decided/broke/fixed 邻居,即使邻居正文不含查询词。相关的过期决策仍可作为历史返回,标记 `stale` 并降权;设置 `include_stale: false` 可排除过期条目。自动召回和开场短地图仍排除过期决策。
|
|
140
|
+
|
|
141
|
+
正文中的日期只属于正文。有效期通过设置页或 `ctx_remember` 的独立 `until` 字段指定,支持 `YYYY-MM-DD`、`Friday` / `周五`、`周末`、`下周`,按 UTC 日末解释。无法解析的新标签不会沿用旧 `untilAt`。清空 `until` 会同时移除时间戳,修改为新的相对期限则从本次编辑时计算;仅保存同一期限不会延长它。
|
|
142
|
+
|
|
143
|
+
0.4.22 不批量删除旧数据的期限。被误标的记忆可重新通过 `ctx_find` 查到,也可在设置里勾选「显示过期决策」找到,清空 `until` 并保存;之后编辑含日期的正文不会再自动生成期限。
|
|
138
144
|
|
|
139
145
|
### 芯片(记忆白名单)
|
|
140
146
|
|
|
@@ -161,9 +167,9 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
161
167
|
|
|
162
168
|
| 开关 | 默认 | 作用 |
|
|
163
169
|
|---|---|---|
|
|
164
|
-
| **芯片(记忆白名单)** | 关 | 标题栏「对话 / 轨迹」旁的标签。勾选的芯片是下一轮注入白名单(L0
|
|
170
|
+
| **芯片(记忆白名单)** | 关 | 标题栏「对话 / 轨迹」旁的标签。勾选的芯片是下一轮注入白名单(L0;与召回共用 300 token)。 |
|
|
165
171
|
| **会话层** | 关(要先开芯片) | 同一标签里的情节画布:生成检查点、更新检查点、从方框分叉。 |
|
|
166
|
-
| **Git 旁路** | 关 | 图有改动后延迟写入 `.dsh/trivium.jsonl
|
|
172
|
+
| **Git 旁路** | 关 | 图有改动后延迟写入 `.dsh/trivium.jsonl`(格式 v2:含版本关系,不含本机来源)。开着可 **生成**(从当前 `.tdb` 覆盖写出);关掉可 **删除 jsonl**。clone / pull 会导回。 |
|
|
167
173
|
| **界面语言** | 跟随宿主 | 只改本插件设置页和芯片标签的中英文,不改 DSH。 |
|
|
168
174
|
| **注入策略** | 关 | 只有开场短地图;可改 autoRecall 或实体名折中。 |
|
|
169
175
|
| **抽取** | 开 | compaction / 空闲后写入。 |
|
|
@@ -175,13 +181,37 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
175
181
|
- **导出导入** — JSON 是真回写。Markdown 只读投影(给人看)。给 git 用的是 `.dsh/trivium.jsonl`(业务事实,自动写)。WorkBuddy `MEMORY.md`、Claude Code `CLAUDE.md`、Codex `AGENTS.md` 可一次性严导入。不监视那些文件,不导入会话 jsonl。
|
|
176
182
|
- **检查更新** — 设置页对比已装版本和 npm latest,有新版时给出 `dsh plugin --profile web add dsh-trivium`。不会在后台自动升级。
|
|
177
183
|
|
|
184
|
+
### 来源、历史与召回检查
|
|
185
|
+
|
|
186
|
+
面板分两个页签,条目详情分三个。
|
|
187
|
+
|
|
188
|
+
| 位置 | 回答什么 |
|
|
189
|
+
|---|---|
|
|
190
|
+
| **记忆条目** | 存了什么。已替代的版本默认收起;**显示已替代**与**显示过期**是两个独立开关。 |
|
|
191
|
+
| **召回检查** | 上一轮实际注入了什么(按估算 token),外加一次只读检查:候选、真实过滤原因、以及将要发送的原文。 |
|
|
192
|
+
| **内容 / 来源 / 决策历史** | 正文、它从哪来、以及替代它的决策链。 |
|
|
193
|
+
|
|
194
|
+
只有写入时确实记录了来源(`kind`、会话、消息、短引文),条目才知道自己从哪来。没有来源就直说没有,不猜会话也不猜作者;本进程无法确认的会话报「已不可用」,但保留已存的摘录。宿主没有会话定位接口,所以不提供跳转,也不拼一个假的 deep link。
|
|
195
|
+
|
|
196
|
+
召回检查是只读的:不写库、不跑工具、不请求 embedding。没有查询向量时明确显示语义通道未运行。这些页签不会注入上下文,也不会调用模型。
|
|
197
|
+
|
|
198
|
+
### 替代一条决策
|
|
199
|
+
|
|
200
|
+
新决策不会让旧决策「过期」,而是替代它。决策上的**替代…**让你选另一条已有决策,并排展示两条、要求确认。旧正文与期限保留,不归档;之后面板把 **当前版本 / 已被替代** 作为独立一维显示,与 **已过期** 并列。
|
|
201
|
+
|
|
202
|
+
首版是线性链:每个节点最多一个直接前驱与一个后继,不允许循环,最多 32 跳。写入在服务端按工作区排队校验,并带上两端 ETag,所以另一个窗口用旧视图确认时拿到 409 而不是覆盖。**撤销替代**只删这一条关系,且当下方还有更新版本时拒绝。
|
|
203
|
+
|
|
204
|
+
链上的正文是已确认的历史:自动抽取、合并、改正文、删除、合并节点都会被拒绝(`REVISION_PROTECTED` / `REVISION_LINKED`)。名称、别名、期限、来源补充仍可改。新说法请新建一条决策,再让它替代旧的。
|
|
205
|
+
|
|
206
|
+
自动召回只讲当前版本:命中旧正文会前向映射、去重,并带一条短 `matched_history` 指针。你手工钉的旧节点不会被改写,只标为历史并提示可以改钉当前版本。当前版本被归档或过期时,这条链直接不注入,也不会把旧版本复活。
|
|
207
|
+
|
|
178
208
|
### 四个工具
|
|
179
209
|
|
|
180
210
|
| 工具 | 说明 |
|
|
181
211
|
|---|---|
|
|
182
|
-
| `ctx_find` |
|
|
212
|
+
| `ctx_find` | 文本 / 可选向量 / 图关系检索;返回 L0 和路径。过期历史标记 `stale` 并降权;`include_stale: false` 排除过期条目 |
|
|
183
213
|
| `ctx_read` | 按 id 读全文和入边 |
|
|
184
|
-
| `ctx_remember` |
|
|
214
|
+
| `ctx_remember` | 手动写入;可用独立 `until` 字段指定真实有效期,不从正文日期推断 |
|
|
185
215
|
| `ctx_link` | 两点之间建有向边 |
|
|
186
216
|
|
|
187
217
|
内核仍是这四个。芯片 / 会话层不加第五个工具。
|
|
@@ -235,12 +265,27 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
235
265
|
- `.tdb` 不要在 git 里合并(二进制)。跟踪 `trivium.jsonl`,忽略 `.tdb`。jsonl 冲突按普通文本解决,再打开工作区即可。
|
|
236
266
|
- 会话层打开时只投影 compaction 与 fork,不会按消息条数自己切方框。窗口没到 DSH 压缩线时,「更新检查点」也补不出历史方框;要分段请点「生成检查点」。
|
|
237
267
|
- 芯片 / 会话层 / Git 旁路 / 注入 / 抽取开关拨一下即保存。Embedding URL 仍要点「保存设置」。只有设置页本身没出现时才需要重启 `dsh web`。
|
|
268
|
+
- **0.5.0 写出的 JSONL 是 `v: 2`,图 JSON 是 `version: 2`。** 都是增量格式,v1 文件仍可读,但不支持原地降级:旧版本会忽略版本关系,并在下次写出时把它们丢掉。要退回请恢复升级前的文件组(`.dsh/trivium.tdb` 与 `.dsh/trivium.jsonl`),不要让旧版重写一遍。
|
|
269
|
+
- 这一版的决策链是线性的:一个前驱、一个后继。把一个版本拆成多条,或者多对一汇入,都会被拒绝,而不是半应用。
|
|
270
|
+
- 从 JSONL 文件里删掉一条替代关系会被报告为冲突,不会直接生效;请在面板里撤销。
|
|
238
271
|
- 宿主升到 rc.8 后,DSH 自己的旧会话库可能打不开(官方 SQLite 格式不兼容)。工作区里的 `.tdb` 图记忆还在;对不上号的旧情节方框可以当残留,不影响 `ctx_find`。
|
|
239
272
|
|
|
240
273
|
---
|
|
241
274
|
|
|
242
275
|
## 更新说明
|
|
243
276
|
|
|
277
|
+
**0.5.0** — 记忆可审计。芯片与召回改为**共用**每轮 300 估算 token(原先各 300),同一节点不会出现两次,一轮内的工具循环也不再重复注入。投递账本按宿主消息 id 记账:失败可重试、压缩后可重建,fork 既不继承账本也不继承 pins。`ctx_find` 默认上限约 1200 估算 token,超预算丢弃整条记录;`ctx_read` 改为字段白名单,新元数据不会撑大默认输出。
|
|
278
|
+
|
|
279
|
+
设置页新增**召回检查**页签(只读:不写库、不跑工具、不请求 embedding),条目详情新增**来源**与**决策历史**页签。只有写入时记录过来源才显示来源,不编造会话、引文或跳转。召回诊断只记录实际跑过的管线分支,每工作区+会话最多 20 条 / 10 分钟 / 每条 64KiB。
|
|
280
|
+
|
|
281
|
+
决策之间新增由用户确认的 `supersedes` 关系:线性链、32 跳上限、按工作区写队列、两端 ETag、幂等 `operationId`,撤销只动这一条边。链上正文受保护,抽取、合并、改正文、删除都会被拒。JSON 导出为 `version: 2`,Git JSONL 为 `v: 2`;都是增量格式,v1 仍可读,但 v2 不能原地降级。
|
|
282
|
+
|
|
283
|
+
**0.4.22** — 修复 [issue #3](https://github.com/QWQcool/dsh-trivium/issues/3):期限只由显式字段设置,清空后不再重新生成,相关过期记忆可带 `stale` 标记检索。保留数据库原生文本 / 向量候选,增加中英文多词兜底、别名与两字中文实体锚点。TriviumDB 升至 `0.8.11`。新增期限与召回专项回归,自动召回仍排除过期记忆。
|
|
284
|
+
|
|
285
|
+
peer 范围显式接受已支持的 DSH `0.1.5`、`0.2.0`、`0.2.1` RC 版本线,修复 npm 普通稳定版范围不会自动接受这些预发布版本的问题。
|
|
286
|
+
|
|
287
|
+
**0.4.21** — 适配 `@deepseek-ai/dsh@0.2.x`。会话格式 v4 把共享的 `kind: "plugin"` 消息来源改成生产者自有的 kind:第三方生产者必须写 `kind: "plugin:dsh-trivium"` 且去掉 `plugin` 字段,否则整轮会以 "format v4 message requires a producer-owned source kind" 失败。插件按已安装的 `dsh-llm` 版本自动选择形状,0.1.x 仍走旧格式。新增对 `agent/created`(0.1.6+)的监听,与 `agent/session-start` 并存并做一次性去重。peer 范围放宽到 `<0.3.0`。新增 `smoke-p14` 钉住两种 source 形状与版本判定。四工具 / 短地图 / find 路径不变。
|
|
288
|
+
|
|
244
289
|
**0.4.20** — 存储升到 `triviumdb@0.8.9`。napi 接口零变更(`triviumdb.d.ts` 与 `index.js` 与 0.8.8 哈希完全一致),属纯内核升级:QuIVer 默认走 SM-L2 查询路径,FIND 规划不再物化被丢弃的候选,服务端版本带上带署名的 Web Console。14 个离线冒烟脚本原样通过。四工具 / 短地图 / find 路径不变。
|
|
245
290
|
|
|
246
291
|
**0.4.19** — 修复插件自身界面在英文宿主上渲染成简体中文([issue #2](https://github.com/QWQcool/dsh-trivium/issues/2))。`locale` 服务改经 `ctx.inject(["locale"], …)` 获取,「跟随宿主」不再依赖插件组合顺序;兜底语言改为 `en`——与宿主自己的 `FALLBACK_LOCALE` 一致,也是其它已解析宿主语言的归宿。设置卡与芯片标签只在 zh / en 之间选择,浏览器未命名任何注册语言时不再给出中文卡。四工具 / 短地图 / find 路径不变。
|
|
@@ -306,7 +351,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
306
351
|
## 发布信息
|
|
307
352
|
|
|
308
353
|
- GitHub: https://github.com/QWQcool/dsh-trivium
|
|
309
|
-
-
|
|
354
|
+
- 包版本:`0.4.22` · [npm](https://www.npmjs.com/package/dsh-trivium)
|
|
310
355
|
- 测试宿主:`@deepseek-ai/dsh@0.1.5-rc.1`(兼 `0.1.1-rc.2` / `0.1.0-rc.8`)
|
|
311
356
|
- License: MIT(依赖 [TriviumDB](https://github.com/YoKONCy/TriviumDB) 为 Apache-2.0)
|
|
312
357
|
|