dsh-trivium 0.4.9 → 0.4.13

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
@@ -25,9 +25,20 @@ dsh plugin --profile web add dsh-trivium
25
25
  Restart **dsh web**. Memory lives in the current workspace:
26
26
 
27
27
  ```
28
- <workspace>/.dsh/trivium.tdb
28
+ <workspace>/.dsh/trivium.tdb # local index (binary; gitignore this)
29
+ <workspace>/.dsh/trivium.jsonl # git source of truth (business facts)
29
30
  ```
30
31
 
32
+ Commit `trivium.jsonl`. Ignore the binary store:
33
+
34
+ ```gitignore
35
+ .dsh/trivium.tdb
36
+ .dsh/trivium.tdb*
37
+ .dsh/trivium-pending.json
38
+ ```
39
+
40
+ Clone / `git pull` re-imports when the jsonl changed. Settings → **Git sidecar** is **off** by default (same as chips). Turn it on under **Settings** (the fold below Check for updates). The switch only starts or stops auto-write. **Generate** (while on) overwrites `.dsh/trivium.jsonl` from the current `.tdb` at the same path. **Delete jsonl** (while off) removes known workspace jsonl files (`.tdb` stays). Episodes, embeddings, and chip pins stay local.
41
+
31
42
  If you launch DSH with [Dsh_BatStart](https://github.com/QWQcool/Dsh_BatStart), the plugin is installed for you — skip the command above.
32
43
 
33
44
  Local source checkout:
@@ -49,23 +60,17 @@ Restart **dsh web**. For a source checkout, `git pull` then run `node scripts/li
49
60
 
50
61
  ## Uninstall
51
62
 
63
+ Stop **dsh web** first so the `.tdb` is not locked, then:
64
+
52
65
  ```sh
53
66
  dsh plugin --profile web remove dsh-trivium
54
67
  ```
55
68
 
56
- After restarting **dsh web**, Settings no longer shows **Trivium memory**, and the title bar no longer shows **Chips**. The four tools are unregistered.
69
+ `remove` deletes this plugin’s files: `~/.dsh/trivium.json`, and in every workspace the plugin has opened, `.dsh/trivium.tdb`, `trivium.jsonl`, and `trivium-pending.json`. Other files under `.dsh/` stay. Updating with `dsh plugin add dsh-trivium` does **not** wipe memory. If `trivium.jsonl` was committed, `git checkout` brings it back.
57
70
 
58
- Uninstall does **not** delete memory files. To wipe them, delete:
71
+ Restart **dsh web** afterward: Settings no longer shows **Trivium memory**, the title bar no longer shows **Chips**, and the four tools are unregistered.
59
72
 
60
- | Path | Contents |
61
- |---|---|
62
- | `<workspace>/.dsh/trivium.tdb` | Graph memory for that workspace (nodes, edges, session-graph boxes) |
63
- | `<workspace>/.dsh/trivium-pending.json` | Failed-extract replay queue; skip if missing |
64
- | `~/.dsh/trivium.json` | Injection policy, extract switch, embedding, per-session chip pins |
65
-
66
- Keep `.tdb` after uninstall: reinstall later and that workspace’s memory is still there. Each workspace has its own `.tdb`; deleting one does not affect others.
67
-
68
- Disable without uninstall: in that profile’s `cordis.patch.yml` add:
73
+ Workspaces never opened after this version may still have an old `.tdb`; delete that file by hand if you find one. Disable without uninstall (data stays): in that profile’s `cordis.patch.yml` add:
69
74
 
70
75
  ```yaml
71
76
  - id: dsh-trivium
@@ -81,6 +86,7 @@ The plugin loads inside the `dsh web` process. It does not open its own port or
81
86
  | Access | Default | Notes |
82
87
  |---|---|---|
83
88
  | Workspace `.dsh/trivium.tdb` | read/write | Memory store. Do not open the same file from two Node processes at once |
89
+ | Workspace `.dsh/trivium.jsonl` | read/write | Git sidecar (off by default). Business nodes/edges only; no embeddings |
84
90
  | `~/.dsh/trivium.json` | read/write | Settings and chip pins; may contain an embedding API key you typed |
85
91
  | `.dsh/trivium-pending.json` | read/write | Local queue when extract fails |
86
92
  | 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) |
@@ -94,7 +100,9 @@ Copy this to your assistant:
94
100
 
95
101
  ```text
96
102
  On DeepSeek Harness, run: dsh plugin --profile web add dsh-trivium
97
- Then restart dsh web. Settings will show "Trivium memory". The Chips tab is off by default; turn it on under Settings → Trivium memory if you want to pin fragments into the next turn.
103
+ Then restart dsh web. Settings will show "Trivium memory". The title-bar tab is
104
+ "Chips" and is off by default; turn it on under Settings → Trivium memory
105
+ (Chips / memory whitelist). The toggle saves immediately; no second restart.
98
106
  ```
99
107
 
100
108
  ---
@@ -105,7 +113,7 @@ Trivium is a memory kernel, not a journal, calendar, or chat companion. It store
105
113
 
106
114
  - **Cross-session graph** — session A stores “auth goes in header X”; session B calls `ctx_find("auth")` and gets the hit plus who it links to (`about` / `decided` / `broke` / `fixed`).
107
115
  - **Default quiet** — a new session injects one short map (≤400 tokens). The model calls tools when it needs more. Nothing is dumped every step. No extra title-bar tab until you turn **Chips** on.
108
- - **Chips (off by default)** — Settings → Trivium memory. When on, the title bar shows **Chips**; checked items pin into the next turn (L0, ≤300 tokens). Under it, **Session layer** (also off) draws compaction / forks as boxes.
116
+ - **Chips / memory whitelist (off by default)** — Settings → Trivium memory. Toggle saves to `~/.dsh/trivium.json` immediately and survives restart. The title bar then shows **Chips** next to Conversation / Trajectory. Checked items pin into the next turn (L0, ≤300 tokens). Under it, **Session layer** (also off) draws compaction / forks as boxes.
109
117
  - **Human-editable** — chips can add, archive, or delete; Settings search, rename, merge, import/export, and global switches.
110
118
  - **Strict extraction** — chitchat, one-off file edits, and secrets are **not** auto-written from the transcript. Chip “Add” stores exactly what you typed (one paste = one node), still through the write hygiene gate.
111
119
  - **Write hygiene** — `ctx_remember`, chip add, extract, and external import refuse mojibake, stutter loops, JSON envelopes, base64 residue, and secrets. Dirty nodes already in `.tdb` stay visible in Settings so you can archive them; they are hidden from find / short map / chips.
@@ -118,7 +126,7 @@ Trivium is a memory kernel, not a journal, calendar, or chat companion. It store
118
126
  - **Injection via `agent.inject()`** — not the system prompt, so `persona.complete: true` cannot silently drop the map.
119
127
  - **Recall carries paths** — every hit says which node it came from and along which edge.
120
128
  - **Failures never block the agent** — store / embedding / extract errors are logged; the main loop continues.
121
- - **UI follows the host language** — Settings and the Chips tab switch with DSH `locale/change` (`zh` / `en`).
129
+ - **UI follows the host language** — Settings and the Chips (memory whitelist) tab switch with DSH `locale/change` (`zh` / `en`).
122
130
  - **First-turn map** — the short map is injected once per session. If `session-start` loses a race with the first model step, `pre-step` fills it in; it is not rewritten every step (prefix-cache friendly).
123
131
 
124
132
  ## Features
@@ -129,9 +137,9 @@ Nodes are `entity` / `preference` / `decision` / `experience`. Business edges ar
129
137
 
130
138
  `ctx_find` returns L0 summaries plus edge paths (incoming as `<-label-id`). If the query names an existing entity, unexpired `about` / `decided` / `broke` / `fixed` neighbors come along even when the neighbor text does not contain the query. Decisions with `until` stay hidden after they expire, unless the query itself is asking about that deadline (e.g. “Friday”).
131
139
 
132
- ### Chips (optional)
140
+ ### Chips (memory whitelist)
133
141
 
134
- Off by default. Turn on **Chips tab** in Settings, then restart `dsh web`. The title bar shows **Conversation / Trajectory / Chips**. This is a pin strip, not the memory editor. Rename, merge, and global switches stay on the Settings page.
142
+ Off by default. In Settings, turn on **Chips (memory whitelist)** — no extra Save click, no restart. The title bar shows **Conversation / Trajectory / Chips** at once, and the choice is stored in `~/.dsh/trivium.json` so it survives restart. This is a pin whitelist, not the memory editor. Rename, merge, and global switches stay on the Settings page.
135
143
 
136
144
  Lists unarchived preference / decision / entity (experience stays out). Check to pin into the next turn (L0, ≤300 tokens). Add / archive / delete on the strip.
137
145
 
@@ -150,16 +158,23 @@ Chips are per session. New sessions and forked children start unchecked. Inherit
150
158
 
151
159
  ### Settings (Trivium memory)
152
160
 
153
- Settings → **Trivium memory** manages the store and the two optional surfaces.
161
+ Settings → **Trivium memory** manages the store. Check for updates sits at the top; **memory entries** stay visible. Everything else is inside a **Settings** fold (collapsed by default): injection, extract, chips, Git sidecar, plugin language, import, embedding. Toggles write `~/.dsh/trivium.json` as soon as you flip them.
162
+
163
+ | Switch | Default | What it does |
164
+ |---|---|---|
165
+ | **Chips (memory whitelist)** | off | Title-bar **Chips** tab next to Conversation / Trajectory. Checked chips are a whitelist for the next turn (L0, ≤300 tokens). |
166
+ | **Session layer** | off (needs Chips on) | Plot canvas on the same tab: Create checkpoint, Update checkpoints, fork from a box. |
167
+ | **Git sidecar** | off | Debounced write of `.dsh/trivium.jsonl`. **Generate** (on) overwrites from the current `.tdb`. **Delete jsonl** (off) removes known files. Clone / pull re-imports. |
168
+ | **Plugin language** | follow host | Chinese / English for this plugin's Settings card and Chips tab only. Does not change DSH. |
169
+ | **Injection** | off | Short map only, unless you pick autoRecall or entity-name path. |
170
+ | **Extract** | on | Write from compaction / idle. |
171
+ | **Embedding** | off | Needs **Save** plus a URL; restart after changing the URL. |
172
+
173
+ 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).
154
174
 
155
- - **Chips tab (default off)** — title-bar **Chips** + pin inject. Restart `dsh web` after save.
156
- - **Session layer (default off, under Chips)** — plot canvas. Requires the Chips tab.
157
- - **Injection (pick one, default off)** — Off: short map at start only. autoRecall: at most 3 L0 hits when the step has user text. Entity-name middle path: 1-hop business neighbors only when the utterance names an existing entity. Checked chips share the budget and win first.
158
- - **Extraction** — default after `compaction/end` and a short idle; failures go to pending and replay on the next session-start. Per batch: body ≤3000 chars, at most 24 items.
159
175
  - **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.
160
- - **Export / import** — JSON is a real round-trip. Markdown is a read-only projection (for people and git), not parseable back. One-shot strict import from WorkBuddy `MEMORY.md`, Claude Code `CLAUDE.md`, and Codex `AGENTS.md`. No watch, no session jsonl, no two-way sync.
176
+ - **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.
161
177
  - **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.
162
- - **Embedding** — off by default. Turn on and fill an OpenAI-compatible URL; failures fall back to keyword + graph. Restart `dsh web` after changing settings.
163
178
 
164
179
  ### Agent tools
165
180
 
@@ -176,7 +191,7 @@ The kernel is still these four. Chips / session layer do not add a fifth tool.
176
191
 
177
192
  ## Screenshots
178
193
 
179
- Captured inside DSH Web (`0.1.1-rc.2`). Screenshots below are from the Chinese UI; the plugin follows the DSH host language (`zh` / `en`).
194
+ 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**.
180
195
 
181
196
  ### Conversation — `ctx_find("鉴权")`
182
197
 
@@ -188,19 +203,27 @@ Session-start injects the short map; the model calls `ctx_find` and hits “auth
188
203
 
189
204
  <img width="560" alt="Trajectory" src="docs/screenshots/03-trajectory.png">
190
205
 
191
- ### Settings — injection strategy
206
+ ### Settings — updates, language, injection
207
+
208
+ <img width="560" alt="Settings config" src="docs/screenshots/04-settings.png">
209
+
210
+ Check for updates sits above a collapsed **Configuration** fold (plugin language, injection strategy).
211
+
212
+ ### Settings — extract, chips, Git sidecar
213
+
214
+ <img width="560" alt="Settings options" src="docs/screenshots/05-settings-options.png">
192
215
 
193
- <img width="560" alt="Settings" src="docs/screenshots/04-settings.png">
216
+ Nested under chips: **Session layer (plot canvas)**. Git sidecar, Markdown export, one-shot external import, and remote embedding are on the same page.
194
217
 
195
218
  ### Settings — memory entries
196
219
 
197
- <img width="560" alt="Entry list" src="docs/screenshots/05-settings-list.png">
220
+ <img width="560" alt="Entry list" src="docs/screenshots/06-settings-list.png">
198
221
 
199
- ### Chips tab — optional, next to Conversation / Trajectory
222
+ ### Chips — optional, next to Conversation / Trajectory
200
223
 
201
- <img width="560" alt="Chips / session layer" src="docs/screenshots/06-session-map.png">
224
+ <img width="560" alt="Chips tab" src="docs/screenshots/07-chips.png">
202
225
 
203
- Off by default. After you turn **Chips** on in Settings and restart, the title bar shows **Chips**. With **Session layer** also on, a never-compacted session has one “Next” box; chips sit on top (unchecked by default). **Create checkpoint** folds “Next” into a left box. After compaction or `/compact`, historical boxes appear on the left; forks leave a box toward a child session.
226
+ Off by default. After you turn **Chips (memory whitelist)** on in Settings, the title bar shows **Chips** immediately. With **Session layer** also on, a never-compacted session has one “Next” box; chips sit on top (unchecked by default). **Create checkpoint** folds “Next” into a left box. After compaction or `/compact`, historical boxes appear on the left; forks leave a box toward a child session.
204
227
 
205
228
  ---
206
229
 
@@ -209,47 +232,56 @@ Off by default. After you turn **Chips** on in Settings and restart, the title b
209
232
  - If the model never calls `ctx_find` and no chips are checked, the window is mostly the opening short map.
210
233
  - Extraction misses things; dirty data can be archived / deleted on the chip strip or edited / merged in Settings.
211
234
  - Do not open the same `.tdb` from two Node processes at once (one `dsh web` is enough).
212
- - Markdown export is for humans; it cannot be parsed back. External import (WorkBuddy / Claude Code / Codex) is one-shot, not two-way sync, and does not ingest session jsonl dumps.
235
+ - Markdown export is for humans; it cannot be parsed back. Git-friendly write-back is `trivium.jsonl`, not Markdown. External import (WorkBuddy / Claude Code / Codex) is one-shot, not two-way sync, and does not ingest session jsonl dumps.
236
+ - Do not merge `.tdb` in git (binary). Track `trivium.jsonl`; ignore `.tdb`. jsonl merge conflicts are ordinary text — resolve, then reopen the workspace.
213
237
  - 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**.
214
- - Plugin setting changes need a `dsh web` restart.
238
+ - 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.
215
239
  - 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`.
216
240
 
217
241
  ---
218
242
 
219
243
  ## Changelog
220
244
 
245
+ **0.4.13** — Title-bar tab is **Chips** (short); the Settings switch stays **Chips (memory whitelist)**. Toggling the session layer refreshes the Chips tab immediately. Settings / Chips screenshots updated.
246
+
247
+ **0.4.12** — Git sidecar: workspace `.dsh/trivium.jsonl` is the text source of truth (business nodes and edges). `.tdb` stays the local index. Writes are debounced (~1.5s), no extra model calls. Clone / `git pull` re-imports when the file changed. Switch is **off** by default. **Generate** overwrites jsonl from the current `.tdb`; **Delete jsonl** (switch off) removes known files. Settings folds optional config below Check for updates. Plugin language can follow the host or lock zh/en.
248
+
249
+ **0.4.11** — Title-bar tab is **Chips (memory whitelist)** (was Session graph). The switch persists to `~/.dsh/trivium.json` as soon as it is toggled; the tab appears or disappears immediately, no restart.
250
+
251
+ **0.4.10** — `dsh plugin remove` deletes known workspace `.tdb` files and `~/.dsh/trivium.json`. Plugin update does not wipe. Disable-in-place still keeps data.
252
+
221
253
  **0.4.9** — Chips tab and session-layer canvas are both off by default. Title bar shows **Chips** only after the Settings switch; session boxes sit under that switch. Kernel (four tools, short map, in-process `.tdb`) unchanged.
222
254
 
223
- **0.4.8** — Write + inject hygiene gate (secrets, mojibake, stutter, JSON envelopes, base64 residue). Settings / session graph follow DSH language. Settings can check npm for updates. One-shot strict import also discovers Claude Code `CLAUDE.md` and Codex `AGENTS.md`. First-turn short map is guaranteed if `session-start` races the first step.
255
+ **0.4.8** — Write + inject hygiene gate (secrets, mojibake, stutter, JSON envelopes, base64 residue). Settings / Chips tab follow DSH language. Settings can check npm for updates. One-shot strict import also discovers Claude Code `CLAUDE.md` and Codex `AGENTS.md`. First-turn short map is guaranteed if `session-start` races the first step.
224
256
 
225
- **0.4.7** — Storage bump to `triviumdb@0.7.6` (`searchExact` / `searchBatch` on the engine). find / session graph behavior unchanged.
257
+ **0.4.7** — Storage bump to `triviumdb@0.7.6` (`searchExact` / `searchBatch` on the engine). find / Chips tab behavior unchanged.
226
258
 
227
- **0.4.6** — Session graph **Create checkpoint**: fold the current “Next” into a left box. Does not trigger DSH compaction.
259
+ **0.4.6** — Chips tab **Create checkpoint**: fold the current “Next” into a left box. Does not trigger DSH compaction.
228
260
 
229
261
  **0.4.5** — Host peers widened to `0.1.0-rc.8` and `0.1.1-rc.2`; no nested old `dsh-llm` / `dsh-tools`.
230
262
 
231
- **0.4.4** — `triviumdb@0.7.5`: incoming edges, expand-by-label, delete-by-label go through engine APIs instead of scanning all edges. find / session graph behavior unchanged.
263
+ **0.4.4** — `triviumdb@0.7.5`: incoming edges, expand-by-label, delete-by-label go through engine APIs instead of scanning all edges. find / Chips tab behavior unchanged.
232
264
 
233
- **0.4.3** — Session graph **Update checkpoints**: backfill DSH compression markers and sidebar forks for sessions that existed before the plugin. Never-compacted sessions still have only “Next”.
265
+ **0.4.3** — Chips tab **Update checkpoints**: backfill DSH compression markers and sidebar forks for sessions that existed before the plugin. Never-compacted sessions still have only “Next”.
234
266
 
235
267
  **0.4.2** — Chip strip can add (one paste = one node) and batch archive / delete. Auto-extract stays strict; chip add writes what you typed.
236
268
 
237
- **0.4.1** — Host pinned to `@deepseek-ai/dsh@0.1.0-rc.8`. Same features as 0.4.0. Confirmed on rc.8: Settings “Trivium memory”, new-session short map, cross-session `ctx_find`, session graph tab.
269
+ **0.4.1** — Host pinned to `@deepseek-ai/dsh@0.1.0-rc.8`. Same features as 0.4.0. Confirmed on rc.8: Settings “Trivium memory”, new-session short map, cross-session `ctx_find`, title-bar tab (now Chips).
238
270
 
239
- **0.4.0** — Session graph, memory chips, fork from a checkpoint.
271
+ **0.4.0** — Title-bar tab, memory chips, fork from a checkpoint.
240
272
 
241
273
  ## Troubleshooting
242
274
 
243
275
  | Symptom | What to do |
244
276
  |---|---|
245
277
  | Settings has no **Trivium memory** | Confirm the **web** profile, then **restart** `dsh web` and open a workspace. Reloading the browser is not enough. |
246
- | Title bar has no **Chips** | Expected. Turn on **Chips tab** in Settings, save, then restart `dsh web`. |
247
- | Injection / extract / embedding / chip tab changes have no effect | Restart `dsh web` as well. |
278
+ | Title bar has no **Chips** | Turn on **Chips (memory whitelist)** in Settings (it saves as soon as you toggle). Switch back to the conversation; the tab should appear without restarting. |
279
+ | Injection / extract / embedding / chip tab changes have no effect | Chip / extract / recall toggles save immediately. Embedding URL still uses **Save**. Restart `dsh web` only if the settings page itself is missing. |
248
280
  | Session layer shows only a **Next** box | Expected when the nested session layer is on. Boxes follow DSH compaction; a long session is not the same as already compacted (auto-compact is around 80% of the window). To split: `/compact` in the conversation, or **Create checkpoint** (plot only, does not compact the window). Older sessions can use **Update checkpoints** to backfill past compaction / forks. |
249
281
  | `ctx_find` returns nothing | A new session injects the short map only; the model must call the tool. You can also **Add** on the chip strip or tell the model “remember: …”. Chitchat and one-off file edits are not auto-written. |
250
282
  | `.tdb` is locked / will not open | Run one `dsh web`. Do not run two Node processes that both linked this plugin. |
251
283
  | Embedding is filled but search is no more accurate | Failures fall back to keyword + graph. Check that `~/.dsh/trivium.json` has an OpenAI-compatible URL (the `/v1` kind). Restart after changing it. |
252
- | Memory still there after uninstall / pins still there after reinstall | Memory is the workspace `.tdb`; pins are `~/.dsh/trivium.json`. Delete those files if you want a clean wipe (see Uninstall). |
284
+ | Memory still there after uninstall | Stop `dsh web` before `dsh plugin remove`. Leftover `.tdb` is a workspace never opened on 0.4.10+; delete `.dsh/trivium.tdb` in that folder. Committed `trivium.jsonl` comes back with `git checkout`. Disable-in-place does not wipe. |
253
285
  | Check for updates fails | That request only hits the npm registry for the latest version. Memory is unaffected; try again later. |
254
286
  | Old conversations will not open after rc.8 | That is DSH’s own session-store format change, not a broken `.tdb`. Graph memory still works via `ctx_find`; leftover boxes on unmatched old sessions are plot residue. |
255
287
 
@@ -260,7 +292,7 @@ Local source checkout: `npm install`, then `node scripts/link-dsh.mjs`, then res
260
292
  ## Release info
261
293
 
262
294
  - GitHub: https://github.com/QWQcool/dsh-trivium
263
- - npm: [`dsh-trivium@0.4.9`](https://www.npmjs.com/package/dsh-trivium)
295
+ - npm: [`dsh-trivium@0.4.13`](https://www.npmjs.com/package/dsh-trivium)
264
296
  - Tested host: `@deepseek-ai/dsh@0.1.1-rc.2` (also `0.1.0-rc.8`)
265
297
  - License: MIT (depends on [TriviumDB](https://github.com/YoKONCy/TriviumDB), Apache-2.0)
266
298
 
package/README.zh-CN.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  DeepSeek Harness 的进程内图记忆插件:按节点和边记,默认少注入,设置页可改可归档。内核贴近 DSH:不另起进程、默认不加导航。要钉住某些记忆片段,再在设置里打开 **芯片** 注入;情节画布是可选的自嗨层,嵌在芯片开关下。每个工作区一个 `.dsh/trivium.tdb`,不另起服务。
8
8
 
9
- > **快速安装**:`dsh plugin --profile web add dsh-trivium` → 重启 **dsh web** → 打开工作区(设置里出现「Trivium 记忆」;**芯片**标签默认关)。完整步骤见 [安装](#安装)。
9
+ > **快速安装**:`dsh plugin --profile web add dsh-trivium` → 重启 **dsh web** → 打开工作区(设置里出现「Trivium 记忆」;标题栏 **芯片** 默认关)。完整步骤见 [安装](#安装)。
10
10
 
11
11
  [**English**](README.md) | [中文版](README.zh-CN.md)
12
12
 
@@ -23,9 +23,20 @@ dsh plugin --profile web add dsh-trivium
23
23
  重启 **dsh web** 后生效。记忆文件在当前工作区:
24
24
 
25
25
  ```
26
- <workspace>/.dsh/trivium.tdb
26
+ <workspace>/.dsh/trivium.tdb # 本地索引(二进制,建议 gitignore)
27
+ <workspace>/.dsh/trivium.jsonl # git 源(业务事实)
27
28
  ```
28
29
 
30
+ 把 `trivium.jsonl` 交给 git。二进制库不要进版本库:
31
+
32
+ ```gitignore
33
+ .dsh/trivium.tdb
34
+ .dsh/trivium.tdb*
35
+ .dsh/trivium-pending.json
36
+ ```
37
+
38
+ clone / `git pull` 后若 jsonl 变了会自动导回。设置里 **Git 旁路** 默认关(和芯片一样)。在「检查更新」下面的 **配置设置** 里打开。开关只控制是否自动写出。开着时 **生成** 用当前 `.tdb` 覆盖写出同一路径的 jsonl;关掉后 **删除 jsonl** 会清掉已知工作区的 jsonl(`.tdb` 不动)。情节、向量、芯片钉选仍只留在本机。
39
+
29
40
  用 [Dsh_BatStart](https://github.com/QWQcool/Dsh_BatStart) 的,双击启动就会装上,不必再执行上面这条。
30
41
 
31
42
  本地跟源码联调:
@@ -47,23 +58,17 @@ dsh plugin --profile web add dsh-trivium
47
58
 
48
59
  ## 卸载
49
60
 
61
+ 先停掉 **dsh web**,避免 `.tdb` 被占用,然后:
62
+
50
63
  ```sh
51
64
  dsh plugin --profile web remove dsh-trivium
52
65
  ```
53
66
 
54
- 重启 **dsh web** 后,设置里的「Trivium 记忆」和标题栏「芯片」都会消失。四个工具不再注册。
67
+ `remove` 会删掉本插件的文件:`~/.dsh/trivium.json`,以及它打开过的每个工作区里的 `.dsh/trivium.tdb`、`trivium.jsonl` 和 `trivium-pending.json`。`.dsh/` 下其它文件不动。用 `dsh plugin add dsh-trivium` 升级**不会**清记忆。若 `trivium.jsonl` 已提交,`git checkout` 可以找回。
55
68
 
56
- 卸载**不会**自动删记忆文件。要彻底清掉再手动删:
69
+ 然后再重启 **dsh web**:设置里不再有「Trivium 记忆」,标题栏不再有「芯片」,四个工具不再注册。
57
70
 
58
- | 路径 | 内容 |
59
- |---|---|
60
- | `<workspace>/.dsh/trivium.tdb` | 该工作区的图记忆(节点、边、会话图方框) |
61
- | `<workspace>/.dsh/trivium-pending.json` | 抽取失败待重放的队列;没有则跳过 |
62
- | `~/.dsh/trivium.json` | 注入策略、抽取开关、embedding、各会话芯片钉选 |
63
-
64
- 只卸插件、留 `.tdb`:以后再装回来,工作区记忆还在。多个工作区各有自己的 `.tdb`,删一个不影响别的。
65
-
66
- 临时关掉、先不卸载:在该 profile 的 `cordis.patch.yml` 里加:
71
+ 从未用本版打开过的工作区,可能还留着旧 `.tdb`;看到就手动删那个文件。只想停用、不卸载(数据还在):在该 profile 的 `cordis.patch.yml` 里加:
67
72
 
68
73
  ```yaml
69
74
  - id: dsh-trivium
@@ -79,6 +84,7 @@ dsh plugin --profile web remove dsh-trivium
79
84
  | 访问 | 默认 | 说明 |
80
85
  |---|---|---|
81
86
  | 工作区 `.dsh/trivium.tdb` | 读写 | 记忆库。同一文件不要两个 Node 进程同时打开 |
87
+ | 工作区 `.dsh/trivium.jsonl` | 读写 | Git 旁路(默认关)。只含业务节点和边,不含向量 |
82
88
  | `~/.dsh/trivium.json` | 读写 | 设置和芯片钉选;可含你手填的 embedding API key |
83
89
  | `.dsh/trivium-pending.json` | 读写 | 抽取失败时的本地队列 |
84
90
  | 网络 | 关 | 对话不外发。打开 embedding 并填了 URL 才会把被检索文本发到你填的地址。设置页点「检查更新」会请求 npm registry(只拿版本号,不含对话) |
@@ -92,7 +98,7 @@ dsh plugin --profile web remove dsh-trivium
92
98
 
93
99
  ```text
94
100
  请在 DeepSeek Harness 上执行:dsh plugin --profile web add dsh-trivium
95
- 然后重启 dsh web。设置里会出现「Trivium 记忆」。芯片标签默认关;若要钉住某些记忆片段,在设置「Trivium 记忆」里打开「芯片标签」后再重启。
101
+ 然后重启 dsh web。设置里会出现「Trivium 记忆」。标题栏标签叫「芯片」,默认关;在设置「Trivium 记忆」里打开「芯片(记忆白名单)」即可,拨一下就保存,不必再重启。
96
102
  ```
97
103
 
98
104
  ---
@@ -103,7 +109,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
103
109
 
104
110
  - **跨会话** — 会话 A 记下「鉴权走 header X」,会话 B 调用 `ctx_find("鉴权")` 命中,并带上它连着谁(`about` / `decided` / `broke` / `fixed`)。
105
111
  - **默认安静** — 新会话只注入一张短地图(≤400 token)。模型要用再调工具,不会每一步灌满。标题栏默认也不加第三标签。
106
- - **芯片(默认关)** — 设置里打开后,标题栏出现 **芯片**;勾选的条目从下一轮注入(L0,≤300 token)。其下还有 **会话层**(也默认关):把 compaction / 分叉画成方框。
112
+ - **芯片 / 记忆白名单(默认关)** — 设置里打开后,标题栏「对话 / 轨迹」旁出现 **芯片**。拨一下即写入 `~/.dsh/trivium.json`,重启后仍保持。勾选的条目从下一轮注入(L0,≤300 token)。其下还有 **会话层**(也默认关):把 compaction / 分叉画成方框。
107
113
  - **人能改错** — 芯片条可新增、归档、删除;设置页管搜、改名 / 正文、合并、导入导出、全局开关。
108
114
  - **抽取偏严** — 闲聊、一次性改文件、密钥**不会从对话自动入库**。芯片「新增」按你写的存(点一次整段一条),同样过写入卫生闸门。
109
115
  - **写入卫生** — `ctx_remember`、芯片新增、抽取、外部导入会拒绝乱码、复读、JSON envelope、base64 残骸和密钥。已经进 `.tdb` 的脏节点仍可在设置里看见以便归档;find / 短地图 / 芯片不再带它们。
@@ -116,7 +122,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
116
122
  - **注入走 `agent.inject()`** — 不写 system prompt,避免 `persona.complete: true` 把地图静默丢掉。
117
123
  - **召回带路径** — 每条命中都说明从哪个节点、沿哪条边过来。
118
124
  - **失败不挡主循环** — 存储 / embedding / 抽取出错只记日志,Agent 继续。
119
- - **界面跟随宿主语言** — 设置页和芯片标签随 DSH `locale/change` 切换(`zh` / `en`)。
125
+ - **界面跟随宿主语言** — 设置页和「芯片」标签随 DSH `locale/change` 切换(`zh` / `en`),也可在配置设置里锁定。
120
126
  - **首轮短地图** — 每个会话只注入一次。若 `session-start` 和第一步赛跑输了,`pre-step` 会补上;不会每步重写(前缀缓存友好)。
121
127
 
122
128
  ## 功能
@@ -127,9 +133,9 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
127
133
 
128
134
  `ctx_find` 返回 L0 摘要和图路径(入边写成 `<-label-id`)。查询点到已有实体名时,还会带上未过期的 about/decided/broke/fixed 邻居,即使邻居正文不含查询词。带 `until` 的过期决策默认不出现,除非查询本身在问期限(如「周五」)。
129
135
 
130
- ### 芯片(可选)
136
+ ### 芯片(记忆白名单)
131
137
 
132
- 默认关。在设置里打开 **芯片标签**,然后重启 `dsh web`。标题栏出现 **对话 / 轨迹 / 芯片**。这是钉选条,不是记忆编辑器;改名、合并、全局开关仍走设置页。
138
+ 默认关。在设置里打开 **芯片(记忆白名单)**:不必再点「保存设置」,也不必重启。标题栏立刻出现 **对话 / 轨迹 / 芯片**,选择写入 `~/.dsh/trivium.json`,重启后仍在。这是钉选白名单,不是记忆编辑器;改名、合并、全局开关仍走设置页。
133
139
 
134
140
  列出未归档的 preference / decision / entity(experience 不进芯片)。勾选后从下一轮注入(L0,≤300 token)。条上可新增、归档、删除。
135
141
 
@@ -148,16 +154,23 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
148
154
 
149
155
  ### 设置页(Trivium 记忆)
150
156
 
151
- 设置里的「Trivium 记忆」管库,也管这两层可选表面。
157
+ 设置里的「Trivium 记忆」管库。「检查更新」在最上,**记忆条目**保持可见。其余选项收在 **配置设置** 折叠里(默认收起):注入、抽取、芯片、Git 旁路、界面语言、导入、embedding。开关拨一下就写入 `~/.dsh/trivium.json`。
158
+
159
+ | 开关 | 默认 | 作用 |
160
+ |---|---|---|
161
+ | **芯片(记忆白名单)** | 关 | 标题栏「对话 / 轨迹」旁的标签。勾选的芯片是下一轮注入白名单(L0,≤300 token)。 |
162
+ | **会话层** | 关(要先开芯片) | 同一标签里的情节画布:生成检查点、更新检查点、从方框分叉。 |
163
+ | **Git 旁路** | 关 | 图有改动后延迟写入 `.dsh/trivium.jsonl`。开着可 **生成**(从当前 `.tdb` 覆盖写出);关掉可 **删除 jsonl**。clone / pull 会导回。 |
164
+ | **界面语言** | 跟随宿主 | 只改本插件设置页和芯片标签的中英文,不改 DSH。 |
165
+ | **注入策略** | 关 | 只有开场短地图;可改 autoRecall 或实体名折中。 |
166
+ | **抽取** | 开 | compaction / 空闲后写入。 |
167
+ | **embedding** | 关 | 要填 URL 并点「保存设置」,改 URL 后重启。 |
168
+
169
+ 注入细节:autoRecall 在本步含用户文本时最多灌 3 条 L0;实体名折中只在话里点到已有实体时灌 1 跳业务边邻居。芯片钉选优先占预算。抽取失败进 pending,下次 session-start 重放(每批正文 ≤3000 字、最多 24 条)。
152
170
 
153
- - **芯片标签(默认关)** — 标题栏「芯片」+ 钉选注入。保存后重启 `dsh web`。
154
- - **会话层(默认关,挂在芯片下)** — 情节画布。要先打开芯片标签。
155
- - **注入策略(三选一,默认关)** — 关:只有开场短地图。autoRecall:本步含用户文本时最多灌 3 条 L0。实体名折中:话里点到已有实体才灌 1 跳业务边邻居。芯片钉选与此并存,优先占预算。
156
- - **抽取** — 默认在 `compaction/end` 和空闲后再抽;失败进 pending,下次 session-start 重放。每批正文 ≤3000 字、最多 24 条。
157
171
  - **条目** — 可搜、按类型筛、展开业务边邻居、「只看挂在这上面的」、默认隐藏过期决策。可改名 / 改正文 / 别名 / until,同类型合并,归档或删除。
158
- - **导出导入** — JSON 是真回写。Markdown 只读投影(给人看、给 git 看),不能再解析回去。WorkBuddy `MEMORY.md`、Claude Code `CLAUDE.md`、Codex `AGENTS.md` 可一次性严导入。不持续同步,不导入会话 jsonl。
172
+ - **导出导入** — JSON 是真回写。Markdown 只读投影(给人看)。给 git 用的是 `.dsh/trivium.jsonl`(业务事实,自动写)。WorkBuddy `MEMORY.md`、Claude Code `CLAUDE.md`、Codex `AGENTS.md` 可一次性严导入。不监视那些文件,不导入会话 jsonl。
159
173
  - **检查更新** — 设置页对比已装版本和 npm latest,有新版时给出 `dsh plugin --profile web add dsh-trivium`。不会在后台自动升级。
160
- - **embedding** — 默认关。打开后填 OpenAI 兼容 URL;失败退回关键词 + 图检索。改完设置需重启 `dsh web`。
161
174
 
162
175
  ### 四个工具
163
176
 
@@ -174,7 +187,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
174
187
 
175
188
  ## 界面截图
176
189
 
177
- 以下入口在本机 DSH Web(`0.1.1-rc.2`)上仍在。截图为中文界面;插件会跟随 DSH 宿主语言(`zh` / `en`)。
190
+ 以下入口在本机 DSH Web(`0.1.1-rc.2`)上仍在。截图为中文界面。插件默认跟随 DSH 宿主语言;也可在 **配置设置** 里锁定中文或英文。
178
191
 
179
192
  ### 会话 — `ctx_find("鉴权")`
180
193
 
@@ -186,19 +199,27 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
186
199
 
187
200
  <img width="560" alt="轨迹" src="docs/screenshots/03-trajectory.png">
188
201
 
189
- ### 设置 — 注入策略
202
+ ### 设置 — 检查更新、语言、注入策略
203
+
204
+ <img width="560" alt="设置配置" src="docs/screenshots/04-settings.png">
205
+
206
+ 「检查更新」下面是可折叠的 **配置设置**(本插件语言、注入策略)。
207
+
208
+ ### 设置 — 抽取、芯片、Git 旁路
209
+
210
+ <img width="560" alt="设置开关" src="docs/screenshots/05-settings-options.png">
190
211
 
191
- <img width="560" alt="设置" src="docs/screenshots/04-settings.png">
212
+ 芯片开关下嵌 **会话层(情节画布)**。同一页还有 Git 旁路、Markdown 导出、外部记忆一次性导入、远程 embedding。
192
213
 
193
214
  ### 设置 — 记忆条目
194
215
 
195
- <img width="560" alt="条目列表" src="docs/screenshots/05-settings-list.png">
216
+ <img width="560" alt="条目列表" src="docs/screenshots/06-settings-list.png">
196
217
 
197
- ### 芯片标签 — 可选,在对话 / 轨迹旁
218
+ ### 芯片 — 可选,在对话 / 轨迹旁
198
219
 
199
- <img width="560" alt="芯片 / 会话层" src="docs/screenshots/06-session-map.png">
220
+ <img width="560" alt="芯片标签" src="docs/screenshots/07-chips.png">
200
221
 
201
- 默认关。设置里打开 **芯片** 并重启后,标题栏出现「芯片」。若同时打开 **会话层**,没压过的会话只有一个「后续」方框;顶部是记忆芯片(默认不勾)。可点「生成检查点」把后续收成左边一格。compaction 或 `/compact` 之后左边也会出现历史方框,分叉从方框连到子会话。
222
+ 默认关。设置里打开 **芯片(记忆白名单)** 后,标题栏立刻出现 **芯片**。若同时打开 **会话层**,没压过的会话只有一个「后续」方框;顶部是记忆芯片(默认不勾)。可点「生成检查点」把后续收成左边一格。compaction 或 `/compact` 之后左边也会出现历史方框,分叉从方框连到子会话。
202
223
 
203
224
  ---
204
225
 
@@ -207,47 +228,56 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
207
228
  - 模型不调 `ctx_find`、也不勾芯片时,窗口里主要是开场短地图。
208
229
  - 抽取会漏;脏数据可在芯片条归档 / 删除,或到设置里改、合并。
209
230
  - 同一个 `.tdb` 不要两个 Node 进程同时打开(正常只开一个 `dsh web` 即可)。
210
- - Markdown 导出是给人看的,不能再解析回去。外部导入(WorkBuddy / Claude Code / Codex)是一次性,不是双向同步,也不会吃会话 jsonl。
231
+ - Markdown 导出是给人看的,不能再解析回去。能回写进 git 的是 `trivium.jsonl`,不是 Markdown。外部导入(WorkBuddy / Claude Code / Codex)是一次性,不是双向同步,也不会吃会话 jsonl。
232
+ - `.tdb` 不要在 git 里合并(二进制)。跟踪 `trivium.jsonl`,忽略 `.tdb`。jsonl 冲突按普通文本解决,再打开工作区即可。
211
233
  - 会话层打开时只投影 compaction 与 fork,不会按消息条数自己切方框。窗口没到 DSH 压缩线时,「更新检查点」也补不出历史方框;要分段请点「生成检查点」。
212
- - 改插件设置后需要重启 `dsh web`。
213
- - 宿主升到 rc.8 后,DSH 自己的旧会话库可能打不开(官方 SQLite 格式不兼容)。工作区里的 `.tdb` 图记忆还在;对不上号的旧会话图方框可以当情节残留,不影响 `ctx_find`。
234
+ - 芯片 / 会话层 / Git 旁路 / 注入 / 抽取开关拨一下即保存。Embedding URL 仍要点「保存设置」。只有设置页本身没出现时才需要重启 `dsh web`。
235
+ - 宿主升到 rc.8 后,DSH 自己的旧会话库可能打不开(官方 SQLite 格式不兼容)。工作区里的 `.tdb` 图记忆还在;对不上号的旧情节方框可以当残留,不影响 `ctx_find`。
214
236
 
215
237
  ---
216
238
 
217
239
  ## 更新说明
218
240
 
241
+ **0.4.13** — 标题栏只显示 **芯片**;设置里的开关仍叫 **芯片(记忆白名单)**。会话层开关立刻刷新芯片页。设置 / 芯片截图更新。
242
+
243
+ **0.4.12** — Git 旁路:工作区 `.dsh/trivium.jsonl` 作为文本源(业务节点和边)。`.tdb` 仍是本地索引。写入延迟约 1.5 秒,不额外调模型。clone / `git pull` 后文件变了会导回。开关**默认关**。**生成** 用当前 `.tdb` 覆盖写出 jsonl;关掉后 **删除 jsonl** 会清掉已知文件。设置页把可选项收到「检查更新」下的配置折叠里。界面语言可跟随宿主或锁定中/英。
244
+
245
+ **0.4.11** — 标题栏标签改为 **芯片(记忆白名单)**(不再叫「会话图」)。开关拨一下即写入 `~/.dsh/trivium.json`;标签立刻出现或消失,不必重启。
246
+
247
+ **0.4.10** — `dsh plugin remove` 会删掉已知工作区的 `.tdb` 和 `~/.dsh/trivium.json`。升级安装不清记忆。配置里 disabled 仍保留数据。
248
+
219
249
  **0.4.9** — 芯片标签和会话层画布都默认关。设置里打开芯片后标题栏才出现「芯片」;情节方框嵌在其下。内核(四工具、短地图、进程内 `.tdb`)不变。
220
250
 
221
- **0.4.8** — 写入 + 注入卫生闸门(密钥、乱码、复读、JSON envelope、base64 残骸)。设置页 / 会话图跟随 DSH 语言。设置页可检查 npm 更新。一次性严导入同时发现 Claude Code `CLAUDE.md` 与 Codex `AGENTS.md`。若 `session-start` 和第一步赛跑,首轮短地图仍会补上。
251
+ **0.4.8** — 写入 + 注入卫生闸门(密钥、乱码、复读、JSON envelope、base64 残骸)。设置页 / 芯片标签跟随 DSH 语言。设置页可检查 npm 更新。一次性严导入同时发现 Claude Code `CLAUDE.md` 与 Codex `AGENTS.md`。若 `session-start` 和第一步赛跑,首轮短地图仍会补上。
222
252
 
223
- **0.4.7** — 存储升到 `triviumdb@0.7.6`(引擎侧 `searchExact` / `searchBatch`)。find / 会话图行为不变。
253
+ **0.4.7** — 存储升到 `triviumdb@0.7.6`(引擎侧 `searchExact` / `searchBatch`)。find / 芯片标签行为不变。
224
254
 
225
- **0.4.6** — 会话图可「生成检查点」:把当前「后续」收成左边一格。不触发 DSH 压缩。
255
+ **0.4.6** — 芯片标签可「生成检查点」:把当前「后续」收成左边一格。不触发 DSH 压缩。
226
256
 
227
257
  **0.4.5** — 宿主 peer 放宽到 `0.1.0-rc.8` 与 `0.1.1-rc.2`,不再嵌一套旧 `dsh-llm` / `dsh-tools`。
228
258
 
229
- **0.4.4** — 依赖 `triviumdb@0.7.5`:入边、按 label 扩邻、按 label 删边走引擎 API,不再全表扫边。find / 会话图行为不变。
259
+ **0.4.4** — 依赖 `triviumdb@0.7.5`:入边、按 label 扩邻、按 label 删边走引擎 API,不再全表扫边。find / 芯片标签行为不变。
230
260
 
231
- **0.4.3** — 会话图「更新检查点」:把当前对话里 DSH 已有的压缩标记和侧边栏 fork 补进图,给装插件之前的旧会话用。没压过的会话仍然只有「后续」。
261
+ **0.4.3** — 芯片标签「更新检查点」:把当前对话里 DSH 已有的压缩标记和侧边栏 fork 补进图,给装插件之前的旧会话用。没压过的会话仍然只有「后续」。
232
262
 
233
- **0.4.2** — 会话图芯片条可新增(整段粘贴一条)、批量归档 / 删除。自动抽取仍偏严;芯片新增按你写的入库。
263
+ **0.4.2** — 芯片条可新增(整段粘贴一条)、批量归档 / 删除。自动抽取仍偏严;芯片新增按你写的入库。
234
264
 
235
- **0.4.1** — 宿主钉到 `@deepseek-ai/dsh@0.1.0-rc.8`。功能与 0.4.0 相同。已在 rc.8 上确认:设置「Trivium 记忆」、新会话短地图、跨会话 `ctx_find`、会话图标签。
265
+ **0.4.1** — 宿主钉到 `@deepseek-ai/dsh@0.1.0-rc.8`。功能与 0.4.0 相同。已在 rc.8 上确认:设置「Trivium 记忆」、新会话短地图、跨会话 `ctx_find`、标题栏标签(现为芯片)。
236
266
 
237
- **0.4.0** — 会话图、记忆芯片、从检查点 fork。
267
+ **0.4.0** — 标题栏标签、记忆芯片、从检查点 fork。
238
268
 
239
269
  ## 排障
240
270
 
241
271
  | 现象 | 处理 |
242
272
  |---|---|
243
273
  | 设置里没有「Trivium 记忆」 | 确认装的是 web profile,然后**重启** `dsh web`,再打开一个工作区。只刷新浏览器不够。 |
244
- | 标题栏没有「芯片」 | 正常。默认关。在设置里打开「芯片标签」,保存后重启 `dsh web`。 |
245
- | 改了注入 / 抽取 / embedding / 芯片开关没生效 | 同样要重启 `dsh web`。 |
274
+ | 标题栏没有「芯片」 | 在设置里打开「芯片(记忆白名单)」(拨一下就会保存)。切回对话页,标签应立刻出现,不用重启。 |
275
+ | 改了注入 / 抽取 / embedding / 芯片开关没生效 | 芯片 / 抽取 / 注入拨一下即保存。Embedding URL 仍要点「保存设置」。只有设置页本身没出现时才重启 `dsh web`。 |
246
276
  | 会话层只有一个「后续」方框 | 正常(在会话层已打开时)。方框跟 DSH 压缩走,会话长不等于已经压过(默认约窗口 80% 才自动压)。要分段:对话里 `/compact`,或点「生成检查点」(只切图,不压窗口)。旧会话可点「更新检查点」补已经发生过的压缩 / 分叉。 |
247
277
  | `ctx_find` 什么都没有 | 新会话默认只注入短地图,模型要自己调工具。也可以在芯片条「新增」或对模型说「记住:…」。闲聊和一次性改文件不会自动入库。 |
248
278
  | 报 `.tdb` 被占用 / 打不开 | 只开一个 `dsh web`。不要同时跑两份链接了本插件的 Node 进程。 |
249
279
  | embedding 填了但检索没变准 | 失败会退回关键词 + 图。看 `~/.dsh/trivium.json` 里 URL 是否 OpenAI 兼容(含 `/v1` 那种)。改完重启。 |
250
- | 卸载后记忆还在 / 再装后钉选还在 | 记忆在工作区 `.tdb`,钉选在 `~/.dsh/trivium.json`。要清就按上面「卸载」删文件。 |
280
+ | 卸载后记忆还在 | 先停 `dsh web` 再 `dsh plugin remove`。剩下的 `.tdb` 是从未用 0.4.10 打开过的工作区,到该文件夹删 `.dsh/trivium.tdb`。已提交的 `trivium.jsonl` 用 `git checkout` 找回。只在配置里 disabled 不会清文件。 |
251
281
  | 检查更新失败 | 只请求 npm registry 拿最新版本号,不影响记忆;过一会儿再点即可。 |
252
282
  | rc.8 之后旧对话打不开 | 那是 DSH 自己的会话库格式变了,不是 `.tdb` 坏了。图记忆仍可 `ctx_find`;对不上号的旧方框可当情节残留。 |
253
283
 
@@ -258,7 +288,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
258
288
  ## 发布信息
259
289
 
260
290
  - GitHub: https://github.com/QWQcool/dsh-trivium
261
- - npm: [`dsh-trivium@0.4.9`](https://www.npmjs.com/package/dsh-trivium)
291
+ - npm: [`dsh-trivium@0.4.13`](https://www.npmjs.com/package/dsh-trivium)
262
292
  - 测试宿主:`@deepseek-ai/dsh@0.1.1-rc.2`(兼 `0.1.0-rc.8`)
263
293
  - License: MIT(依赖 [TriviumDB](https://github.com/YoKONCy/TriviumDB) 为 Apache-2.0)
264
294