dsh-trivium 0.4.10 → 0.4.14
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 +72 -34
- package/README.zh-CN.md +73 -37
- package/lib/client.js +374 -45
- package/lib/index.js +9 -0
- package/lib/purge.js +7 -1
- package/lib/server.js +29 -1
- package/lib/settings.js +49 -0
- package/lib/sidecar.js +422 -0
- package/lib/store.js +63 -8
- package/package.json +3 -2
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:
|
|
@@ -55,7 +66,7 @@ Stop **dsh web** first so the `.tdb` is not locked, then:
|
|
|
55
66
|
dsh plugin --profile web remove dsh-trivium
|
|
56
67
|
```
|
|
57
68
|
|
|
58
|
-
`remove` deletes this plugin’s files: `~/.dsh/trivium.json`, and in every workspace the plugin has opened, `.dsh/trivium.tdb`
|
|
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.
|
|
59
70
|
|
|
60
71
|
Restart **dsh web** afterward: Settings no longer shows **Trivium memory**, the title bar no longer shows **Chips**, and the four tools are unregistered.
|
|
61
72
|
|
|
@@ -75,6 +86,7 @@ The plugin loads inside the `dsh web` process. It does not open its own port or
|
|
|
75
86
|
| Access | Default | Notes |
|
|
76
87
|
|---|---|---|
|
|
77
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 |
|
|
78
90
|
| `~/.dsh/trivium.json` | read/write | Settings and chip pins; may contain an embedding API key you typed |
|
|
79
91
|
| `.dsh/trivium-pending.json` | read/write | Local queue when extract fails |
|
|
80
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) |
|
|
@@ -88,7 +100,9 @@ Copy this to your assistant:
|
|
|
88
100
|
|
|
89
101
|
```text
|
|
90
102
|
On DeepSeek Harness, run: dsh plugin --profile web add dsh-trivium
|
|
91
|
-
Then restart dsh web. Settings will show "Trivium memory". The
|
|
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.
|
|
92
106
|
```
|
|
93
107
|
|
|
94
108
|
---
|
|
@@ -99,7 +113,7 @@ Trivium is a memory kernel, not a journal, calendar, or chat companion. It store
|
|
|
99
113
|
|
|
100
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`).
|
|
101
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.
|
|
102
|
-
- **Chips (off by default)** — Settings → Trivium memory.
|
|
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.
|
|
103
117
|
- **Human-editable** — chips can add, archive, or delete; Settings search, rename, merge, import/export, and global switches.
|
|
104
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.
|
|
105
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.
|
|
@@ -112,7 +126,7 @@ Trivium is a memory kernel, not a journal, calendar, or chat companion. It store
|
|
|
112
126
|
- **Injection via `agent.inject()`** — not the system prompt, so `persona.complete: true` cannot silently drop the map.
|
|
113
127
|
- **Recall carries paths** — every hit says which node it came from and along which edge.
|
|
114
128
|
- **Failures never block the agent** — store / embedding / extract errors are logged; the main loop continues.
|
|
115
|
-
- **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`).
|
|
116
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).
|
|
117
131
|
|
|
118
132
|
## Features
|
|
@@ -123,9 +137,9 @@ Nodes are `entity` / `preference` / `decision` / `experience`. Business edges ar
|
|
|
123
137
|
|
|
124
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”).
|
|
125
139
|
|
|
126
|
-
### Chips (
|
|
140
|
+
### Chips (memory whitelist)
|
|
127
141
|
|
|
128
|
-
Off by default.
|
|
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.
|
|
129
143
|
|
|
130
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.
|
|
131
145
|
|
|
@@ -144,16 +158,23 @@ Chips are per session. New sessions and forked children start unchecked. Inherit
|
|
|
144
158
|
|
|
145
159
|
### Settings (Trivium memory)
|
|
146
160
|
|
|
147
|
-
Settings → **Trivium memory** manages the store
|
|
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).
|
|
148
174
|
|
|
149
|
-
- **Chips tab (default off)** — title-bar **Chips** + pin inject. Restart `dsh web` after save.
|
|
150
|
-
- **Session layer (default off, under Chips)** — plot canvas. Requires the Chips tab.
|
|
151
|
-
- **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.
|
|
152
|
-
- **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.
|
|
153
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.
|
|
154
|
-
- **Export / import** — JSON is a real round-trip. Markdown is a read-only projection (for people
|
|
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.
|
|
155
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.
|
|
156
|
-
- **Embedding** — off by default. Turn on and fill an OpenAI-compatible URL; failures fall back to keyword + graph. Restart `dsh web` after changing settings.
|
|
157
178
|
|
|
158
179
|
### Agent tools
|
|
159
180
|
|
|
@@ -170,7 +191,7 @@ The kernel is still these four. Chips / session layer do not add a fifth tool.
|
|
|
170
191
|
|
|
171
192
|
## Screenshots
|
|
172
193
|
|
|
173
|
-
Captured inside DSH Web (`0.1.1-rc.2`). Screenshots below are from the Chinese UI
|
|
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**.
|
|
174
195
|
|
|
175
196
|
### Conversation — `ctx_find("鉴权")`
|
|
176
197
|
|
|
@@ -182,19 +203,27 @@ Session-start injects the short map; the model calls `ctx_find` and hits “auth
|
|
|
182
203
|
|
|
183
204
|
<img width="560" alt="Trajectory" src="docs/screenshots/03-trajectory.png">
|
|
184
205
|
|
|
185
|
-
### Settings — injection
|
|
206
|
+
### Settings — updates, language, injection
|
|
207
|
+
|
|
208
|
+
<img width="560" alt="Settings config" src="docs/screenshots/04-settings.png">
|
|
186
209
|
|
|
187
|
-
|
|
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">
|
|
215
|
+
|
|
216
|
+
Nested under chips: **Session layer (plot canvas)**. Git sidecar, Markdown export, one-shot external import, and remote embedding are on the same page.
|
|
188
217
|
|
|
189
218
|
### Settings — memory entries
|
|
190
219
|
|
|
191
|
-
<img width="560" alt="Entry list" src="docs/screenshots/
|
|
220
|
+
<img width="560" alt="Entry list" src="docs/screenshots/06-settings-list.png">
|
|
192
221
|
|
|
193
|
-
### Chips
|
|
222
|
+
### Chips — optional, next to Conversation / Trajectory
|
|
194
223
|
|
|
195
|
-
<img width="560" alt="Chips
|
|
224
|
+
<img width="560" alt="Chips tab" src="docs/screenshots/07-chips.png">
|
|
196
225
|
|
|
197
|
-
Off by default. After you turn **Chips** on in Settings
|
|
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.
|
|
198
227
|
|
|
199
228
|
---
|
|
200
229
|
|
|
@@ -203,49 +232,58 @@ Off by default. After you turn **Chips** on in Settings and restart, the title b
|
|
|
203
232
|
- If the model never calls `ctx_find` and no chips are checked, the window is mostly the opening short map.
|
|
204
233
|
- Extraction misses things; dirty data can be archived / deleted on the chip strip or edited / merged in Settings.
|
|
205
234
|
- Do not open the same `.tdb` from two Node processes at once (one `dsh web` is enough).
|
|
206
|
-
- 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.
|
|
207
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**.
|
|
208
|
-
- Plugin setting
|
|
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.
|
|
209
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`.
|
|
210
240
|
|
|
211
241
|
---
|
|
212
242
|
|
|
213
243
|
## Changelog
|
|
214
244
|
|
|
245
|
+
**0.4.14** — Storage bump to `triviumdb@0.8.1` (harder WAL/locks, optional read-only share, ARM64 fixes). Four tools / short map / find paths unchanged.
|
|
246
|
+
|
|
247
|
+
**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.
|
|
248
|
+
|
|
249
|
+
**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.
|
|
250
|
+
|
|
251
|
+
**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.
|
|
252
|
+
|
|
215
253
|
**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.
|
|
216
254
|
|
|
217
255
|
**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.
|
|
218
256
|
|
|
219
|
-
**0.4.8** — Write + inject hygiene gate (secrets, mojibake, stutter, JSON envelopes, base64 residue). Settings /
|
|
257
|
+
**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.
|
|
220
258
|
|
|
221
|
-
**0.4.7** — Storage bump to `triviumdb@0.7.6` (`searchExact` / `searchBatch` on the engine). find /
|
|
259
|
+
**0.4.7** — Storage bump to `triviumdb@0.7.6` (`searchExact` / `searchBatch` on the engine). find / Chips tab behavior unchanged.
|
|
222
260
|
|
|
223
|
-
**0.4.6** —
|
|
261
|
+
**0.4.6** — Chips tab **Create checkpoint**: fold the current “Next” into a left box. Does not trigger DSH compaction.
|
|
224
262
|
|
|
225
263
|
**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`.
|
|
226
264
|
|
|
227
|
-
**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 /
|
|
265
|
+
**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.
|
|
228
266
|
|
|
229
|
-
**0.4.3** —
|
|
267
|
+
**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”.
|
|
230
268
|
|
|
231
269
|
**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.
|
|
232
270
|
|
|
233
|
-
**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`,
|
|
271
|
+
**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).
|
|
234
272
|
|
|
235
|
-
**0.4.0** —
|
|
273
|
+
**0.4.0** — Title-bar tab, memory chips, fork from a checkpoint.
|
|
236
274
|
|
|
237
275
|
## Troubleshooting
|
|
238
276
|
|
|
239
277
|
| Symptom | What to do |
|
|
240
278
|
|---|---|
|
|
241
279
|
| Settings has no **Trivium memory** | Confirm the **web** profile, then **restart** `dsh web` and open a workspace. Reloading the browser is not enough. |
|
|
242
|
-
| Title bar has no **Chips** |
|
|
243
|
-
| Injection / extract / embedding / chip tab changes have no effect | Restart `dsh web`
|
|
280
|
+
| 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. |
|
|
281
|
+
| 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. |
|
|
244
282
|
| 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. |
|
|
245
283
|
| `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. |
|
|
246
284
|
| `.tdb` is locked / will not open | Run one `dsh web`. Do not run two Node processes that both linked this plugin. |
|
|
247
285
|
| 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. |
|
|
248
|
-
| 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. Disable-in-place does not wipe. |
|
|
286
|
+
| 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. |
|
|
249
287
|
| Check for updates fails | That request only hits the npm registry for the latest version. Memory is unaffected; try again later. |
|
|
250
288
|
| 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. |
|
|
251
289
|
|
|
@@ -256,7 +294,7 @@ Local source checkout: `npm install`, then `node scripts/link-dsh.mjs`, then res
|
|
|
256
294
|
## Release info
|
|
257
295
|
|
|
258
296
|
- GitHub: https://github.com/QWQcool/dsh-trivium
|
|
259
|
-
- npm: [`dsh-trivium@0.4.
|
|
297
|
+
- npm: [`dsh-trivium@0.4.14`](https://www.npmjs.com/package/dsh-trivium)
|
|
260
298
|
- Tested host: `@deepseek-ai/dsh@0.1.1-rc.2` (also `0.1.0-rc.8`)
|
|
261
299
|
- License: MIT (depends on [TriviumDB](https://github.com/YoKONCy/TriviumDB), Apache-2.0)
|
|
262
300
|
|
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
|
本地跟源码联调:
|
|
@@ -53,7 +64,7 @@ dsh plugin --profile web add dsh-trivium
|
|
|
53
64
|
dsh plugin --profile web remove dsh-trivium
|
|
54
65
|
```
|
|
55
66
|
|
|
56
|
-
`remove` 会删掉本插件的文件:`~/.dsh/trivium.json`,以及它打开过的每个工作区里的 `.dsh/trivium.tdb` 和 `trivium-pending.json`。`.dsh/` 下其它文件不动。用 `dsh plugin add dsh-trivium`
|
|
67
|
+
`remove` 会删掉本插件的文件:`~/.dsh/trivium.json`,以及它打开过的每个工作区里的 `.dsh/trivium.tdb`、`trivium.jsonl` 和 `trivium-pending.json`。`.dsh/` 下其它文件不动。用 `dsh plugin add dsh-trivium` 升级**不会**清记忆。若 `trivium.jsonl` 已提交,`git checkout` 可以找回。
|
|
57
68
|
|
|
58
69
|
然后再重启 **dsh web**:设置里不再有「Trivium 记忆」,标题栏不再有「芯片」,四个工具不再注册。
|
|
59
70
|
|
|
@@ -73,6 +84,7 @@ dsh plugin --profile web remove dsh-trivium
|
|
|
73
84
|
| 访问 | 默认 | 说明 |
|
|
74
85
|
|---|---|---|
|
|
75
86
|
| 工作区 `.dsh/trivium.tdb` | 读写 | 记忆库。同一文件不要两个 Node 进程同时打开 |
|
|
87
|
+
| 工作区 `.dsh/trivium.jsonl` | 读写 | Git 旁路(默认关)。只含业务节点和边,不含向量 |
|
|
76
88
|
| `~/.dsh/trivium.json` | 读写 | 设置和芯片钉选;可含你手填的 embedding API key |
|
|
77
89
|
| `.dsh/trivium-pending.json` | 读写 | 抽取失败时的本地队列 |
|
|
78
90
|
| 网络 | 关 | 对话不外发。打开 embedding 并填了 URL 才会把被检索文本发到你填的地址。设置页点「检查更新」会请求 npm registry(只拿版本号,不含对话) |
|
|
@@ -86,7 +98,7 @@ dsh plugin --profile web remove dsh-trivium
|
|
|
86
98
|
|
|
87
99
|
```text
|
|
88
100
|
请在 DeepSeek Harness 上执行:dsh plugin --profile web add dsh-trivium
|
|
89
|
-
然后重启 dsh web。设置里会出现「Trivium
|
|
101
|
+
然后重启 dsh web。设置里会出现「Trivium 记忆」。标题栏标签叫「芯片」,默认关;在设置「Trivium 记忆」里打开「芯片(记忆白名单)」即可,拨一下就保存,不必再重启。
|
|
90
102
|
```
|
|
91
103
|
|
|
92
104
|
---
|
|
@@ -97,7 +109,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
97
109
|
|
|
98
110
|
- **跨会话** — 会话 A 记下「鉴权走 header X」,会话 B 调用 `ctx_find("鉴权")` 命中,并带上它连着谁(`about` / `decided` / `broke` / `fixed`)。
|
|
99
111
|
- **默认安静** — 新会话只注入一张短地图(≤400 token)。模型要用再调工具,不会每一步灌满。标题栏默认也不加第三标签。
|
|
100
|
-
-
|
|
112
|
+
- **芯片 / 记忆白名单(默认关)** — 设置里打开后,标题栏「对话 / 轨迹」旁出现 **芯片**。拨一下即写入 `~/.dsh/trivium.json`,重启后仍保持。勾选的条目从下一轮注入(L0,≤300 token)。其下还有 **会话层**(也默认关):把 compaction / 分叉画成方框。
|
|
101
113
|
- **人能改错** — 芯片条可新增、归档、删除;设置页管搜、改名 / 正文、合并、导入导出、全局开关。
|
|
102
114
|
- **抽取偏严** — 闲聊、一次性改文件、密钥**不会从对话自动入库**。芯片「新增」按你写的存(点一次整段一条),同样过写入卫生闸门。
|
|
103
115
|
- **写入卫生** — `ctx_remember`、芯片新增、抽取、外部导入会拒绝乱码、复读、JSON envelope、base64 残骸和密钥。已经进 `.tdb` 的脏节点仍可在设置里看见以便归档;find / 短地图 / 芯片不再带它们。
|
|
@@ -110,7 +122,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
110
122
|
- **注入走 `agent.inject()`** — 不写 system prompt,避免 `persona.complete: true` 把地图静默丢掉。
|
|
111
123
|
- **召回带路径** — 每条命中都说明从哪个节点、沿哪条边过来。
|
|
112
124
|
- **失败不挡主循环** — 存储 / embedding / 抽取出错只记日志,Agent 继续。
|
|
113
|
-
- **界面跟随宿主语言** —
|
|
125
|
+
- **界面跟随宿主语言** — 设置页和「芯片」标签随 DSH `locale/change` 切换(`zh` / `en`),也可在配置设置里锁定。
|
|
114
126
|
- **首轮短地图** — 每个会话只注入一次。若 `session-start` 和第一步赛跑输了,`pre-step` 会补上;不会每步重写(前缀缓存友好)。
|
|
115
127
|
|
|
116
128
|
## 功能
|
|
@@ -121,9 +133,9 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
121
133
|
|
|
122
134
|
`ctx_find` 返回 L0 摘要和图路径(入边写成 `<-label-id`)。查询点到已有实体名时,还会带上未过期的 about/decided/broke/fixed 邻居,即使邻居正文不含查询词。带 `until` 的过期决策默认不出现,除非查询本身在问期限(如「周五」)。
|
|
123
135
|
|
|
124
|
-
###
|
|
136
|
+
### 芯片(记忆白名单)
|
|
125
137
|
|
|
126
|
-
默认关。在设置里打开
|
|
138
|
+
默认关。在设置里打开 **芯片(记忆白名单)**:不必再点「保存设置」,也不必重启。标题栏立刻出现 **对话 / 轨迹 / 芯片**,选择写入 `~/.dsh/trivium.json`,重启后仍在。这是钉选白名单,不是记忆编辑器;改名、合并、全局开关仍走设置页。
|
|
127
139
|
|
|
128
140
|
列出未归档的 preference / decision / entity(experience 不进芯片)。勾选后从下一轮注入(L0,≤300 token)。条上可新增、归档、删除。
|
|
129
141
|
|
|
@@ -142,16 +154,23 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
142
154
|
|
|
143
155
|
### 设置页(Trivium 记忆)
|
|
144
156
|
|
|
145
|
-
设置里的「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 条)。
|
|
146
170
|
|
|
147
|
-
- **芯片标签(默认关)** — 标题栏「芯片」+ 钉选注入。保存后重启 `dsh web`。
|
|
148
|
-
- **会话层(默认关,挂在芯片下)** — 情节画布。要先打开芯片标签。
|
|
149
|
-
- **注入策略(三选一,默认关)** — 关:只有开场短地图。autoRecall:本步含用户文本时最多灌 3 条 L0。实体名折中:话里点到已有实体才灌 1 跳业务边邻居。芯片钉选与此并存,优先占预算。
|
|
150
|
-
- **抽取** — 默认在 `compaction/end` 和空闲后再抽;失败进 pending,下次 session-start 重放。每批正文 ≤3000 字、最多 24 条。
|
|
151
171
|
- **条目** — 可搜、按类型筛、展开业务边邻居、「只看挂在这上面的」、默认隐藏过期决策。可改名 / 改正文 / 别名 / until,同类型合并,归档或删除。
|
|
152
|
-
- **导出导入** — JSON 是真回写。Markdown
|
|
172
|
+
- **导出导入** — JSON 是真回写。Markdown 只读投影(给人看)。给 git 用的是 `.dsh/trivium.jsonl`(业务事实,自动写)。WorkBuddy `MEMORY.md`、Claude Code `CLAUDE.md`、Codex `AGENTS.md` 可一次性严导入。不监视那些文件,不导入会话 jsonl。
|
|
153
173
|
- **检查更新** — 设置页对比已装版本和 npm latest,有新版时给出 `dsh plugin --profile web add dsh-trivium`。不会在后台自动升级。
|
|
154
|
-
- **embedding** — 默认关。打开后填 OpenAI 兼容 URL;失败退回关键词 + 图检索。改完设置需重启 `dsh web`。
|
|
155
174
|
|
|
156
175
|
### 四个工具
|
|
157
176
|
|
|
@@ -168,7 +187,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
168
187
|
|
|
169
188
|
## 界面截图
|
|
170
189
|
|
|
171
|
-
以下入口在本机 DSH Web(`0.1.1-rc.2
|
|
190
|
+
以下入口在本机 DSH Web(`0.1.1-rc.2`)上仍在。截图为中文界面。插件默认跟随 DSH 宿主语言;也可在 **配置设置** 里锁定中文或英文。
|
|
172
191
|
|
|
173
192
|
### 会话 — `ctx_find("鉴权")`
|
|
174
193
|
|
|
@@ -180,19 +199,27 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
180
199
|
|
|
181
200
|
<img width="560" alt="轨迹" src="docs/screenshots/03-trajectory.png">
|
|
182
201
|
|
|
183
|
-
### 设置 —
|
|
202
|
+
### 设置 — 检查更新、语言、注入策略
|
|
203
|
+
|
|
204
|
+
<img width="560" alt="设置配置" src="docs/screenshots/04-settings.png">
|
|
184
205
|
|
|
185
|
-
|
|
206
|
+
「检查更新」下面是可折叠的 **配置设置**(本插件语言、注入策略)。
|
|
207
|
+
|
|
208
|
+
### 设置 — 抽取、芯片、Git 旁路
|
|
209
|
+
|
|
210
|
+
<img width="560" alt="设置开关" src="docs/screenshots/05-settings-options.png">
|
|
211
|
+
|
|
212
|
+
芯片开关下嵌 **会话层(情节画布)**。同一页还有 Git 旁路、Markdown 导出、外部记忆一次性导入、远程 embedding。
|
|
186
213
|
|
|
187
214
|
### 设置 — 记忆条目
|
|
188
215
|
|
|
189
|
-
<img width="560" alt="条目列表" src="docs/screenshots/
|
|
216
|
+
<img width="560" alt="条目列表" src="docs/screenshots/06-settings-list.png">
|
|
190
217
|
|
|
191
|
-
###
|
|
218
|
+
### 芯片 — 可选,在对话 / 轨迹旁
|
|
192
219
|
|
|
193
|
-
<img width="560" alt="
|
|
220
|
+
<img width="560" alt="芯片标签" src="docs/screenshots/07-chips.png">
|
|
194
221
|
|
|
195
|
-
默认关。设置里打开
|
|
222
|
+
默认关。设置里打开 **芯片(记忆白名单)** 后,标题栏立刻出现 **芯片**。若同时打开 **会话层**,没压过的会话只有一个「后续」方框;顶部是记忆芯片(默认不勾)。可点「生成检查点」把后续收成左边一格。compaction 或 `/compact` 之后左边也会出现历史方框,分叉从方框连到子会话。
|
|
196
223
|
|
|
197
224
|
---
|
|
198
225
|
|
|
@@ -201,49 +228,58 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
201
228
|
- 模型不调 `ctx_find`、也不勾芯片时,窗口里主要是开场短地图。
|
|
202
229
|
- 抽取会漏;脏数据可在芯片条归档 / 删除,或到设置里改、合并。
|
|
203
230
|
- 同一个 `.tdb` 不要两个 Node 进程同时打开(正常只开一个 `dsh web` 即可)。
|
|
204
|
-
- Markdown
|
|
231
|
+
- Markdown 导出是给人看的,不能再解析回去。能回写进 git 的是 `trivium.jsonl`,不是 Markdown。外部导入(WorkBuddy / Claude Code / Codex)是一次性,不是双向同步,也不会吃会话 jsonl。
|
|
232
|
+
- `.tdb` 不要在 git 里合并(二进制)。跟踪 `trivium.jsonl`,忽略 `.tdb`。jsonl 冲突按普通文本解决,再打开工作区即可。
|
|
205
233
|
- 会话层打开时只投影 compaction 与 fork,不会按消息条数自己切方框。窗口没到 DSH 压缩线时,「更新检查点」也补不出历史方框;要分段请点「生成检查点」。
|
|
206
|
-
-
|
|
207
|
-
- 宿主升到 rc.8 后,DSH 自己的旧会话库可能打不开(官方 SQLite 格式不兼容)。工作区里的 `.tdb`
|
|
234
|
+
- 芯片 / 会话层 / Git 旁路 / 注入 / 抽取开关拨一下即保存。Embedding URL 仍要点「保存设置」。只有设置页本身没出现时才需要重启 `dsh web`。
|
|
235
|
+
- 宿主升到 rc.8 后,DSH 自己的旧会话库可能打不开(官方 SQLite 格式不兼容)。工作区里的 `.tdb` 图记忆还在;对不上号的旧情节方框可以当残留,不影响 `ctx_find`。
|
|
208
236
|
|
|
209
237
|
---
|
|
210
238
|
|
|
211
239
|
## 更新说明
|
|
212
240
|
|
|
241
|
+
**0.4.14** — 存储升到 `triviumdb@0.8.1`(WAL/锁更硬、可选只读共享、ARM64 修复)。四工具 / 短地图 / find 路径不变。
|
|
242
|
+
|
|
243
|
+
**0.4.13** — 标题栏只显示 **芯片**;设置里的开关仍叫 **芯片(记忆白名单)**。会话层开关立刻刷新芯片页。设置 / 芯片截图更新。
|
|
244
|
+
|
|
245
|
+
**0.4.12** — Git 旁路:工作区 `.dsh/trivium.jsonl` 作为文本源(业务节点和边)。`.tdb` 仍是本地索引。写入延迟约 1.5 秒,不额外调模型。clone / `git pull` 后文件变了会导回。开关**默认关**。**生成** 用当前 `.tdb` 覆盖写出 jsonl;关掉后 **删除 jsonl** 会清掉已知文件。设置页把可选项收到「检查更新」下的配置折叠里。界面语言可跟随宿主或锁定中/英。
|
|
246
|
+
|
|
247
|
+
**0.4.11** — 标题栏标签改为 **芯片(记忆白名单)**(不再叫「会话图」)。开关拨一下即写入 `~/.dsh/trivium.json`;标签立刻出现或消失,不必重启。
|
|
248
|
+
|
|
213
249
|
**0.4.10** — `dsh plugin remove` 会删掉已知工作区的 `.tdb` 和 `~/.dsh/trivium.json`。升级安装不清记忆。配置里 disabled 仍保留数据。
|
|
214
250
|
|
|
215
251
|
**0.4.9** — 芯片标签和会话层画布都默认关。设置里打开芯片后标题栏才出现「芯片」;情节方框嵌在其下。内核(四工具、短地图、进程内 `.tdb`)不变。
|
|
216
252
|
|
|
217
|
-
**0.4.8** — 写入 + 注入卫生闸门(密钥、乱码、复读、JSON envelope、base64 残骸)。设置页 /
|
|
253
|
+
**0.4.8** — 写入 + 注入卫生闸门(密钥、乱码、复读、JSON envelope、base64 残骸)。设置页 / 芯片标签跟随 DSH 语言。设置页可检查 npm 更新。一次性严导入同时发现 Claude Code `CLAUDE.md` 与 Codex `AGENTS.md`。若 `session-start` 和第一步赛跑,首轮短地图仍会补上。
|
|
218
254
|
|
|
219
|
-
**0.4.7** — 存储升到 `triviumdb@0.7.6`(引擎侧 `searchExact` / `searchBatch`)。find /
|
|
255
|
+
**0.4.7** — 存储升到 `triviumdb@0.7.6`(引擎侧 `searchExact` / `searchBatch`)。find / 芯片标签行为不变。
|
|
220
256
|
|
|
221
|
-
**0.4.6** —
|
|
257
|
+
**0.4.6** — 芯片标签可「生成检查点」:把当前「后续」收成左边一格。不触发 DSH 压缩。
|
|
222
258
|
|
|
223
259
|
**0.4.5** — 宿主 peer 放宽到 `0.1.0-rc.8` 与 `0.1.1-rc.2`,不再嵌一套旧 `dsh-llm` / `dsh-tools`。
|
|
224
260
|
|
|
225
|
-
**0.4.4** — 依赖 `triviumdb@0.7.5`:入边、按 label 扩邻、按 label 删边走引擎 API,不再全表扫边。find /
|
|
261
|
+
**0.4.4** — 依赖 `triviumdb@0.7.5`:入边、按 label 扩邻、按 label 删边走引擎 API,不再全表扫边。find / 芯片标签行为不变。
|
|
226
262
|
|
|
227
|
-
**0.4.3** —
|
|
263
|
+
**0.4.3** — 芯片标签「更新检查点」:把当前对话里 DSH 已有的压缩标记和侧边栏 fork 补进图,给装插件之前的旧会话用。没压过的会话仍然只有「后续」。
|
|
228
264
|
|
|
229
|
-
**0.4.2** —
|
|
265
|
+
**0.4.2** — 芯片条可新增(整段粘贴一条)、批量归档 / 删除。自动抽取仍偏严;芯片新增按你写的入库。
|
|
230
266
|
|
|
231
|
-
**0.4.1** — 宿主钉到 `@deepseek-ai/dsh@0.1.0-rc.8`。功能与 0.4.0 相同。已在 rc.8 上确认:设置「Trivium 记忆」、新会话短地图、跨会话 `ctx_find
|
|
267
|
+
**0.4.1** — 宿主钉到 `@deepseek-ai/dsh@0.1.0-rc.8`。功能与 0.4.0 相同。已在 rc.8 上确认:设置「Trivium 记忆」、新会话短地图、跨会话 `ctx_find`、标题栏标签(现为芯片)。
|
|
232
268
|
|
|
233
|
-
**0.4.0** —
|
|
269
|
+
**0.4.0** — 标题栏标签、记忆芯片、从检查点 fork。
|
|
234
270
|
|
|
235
271
|
## 排障
|
|
236
272
|
|
|
237
273
|
| 现象 | 处理 |
|
|
238
274
|
|---|---|
|
|
239
275
|
| 设置里没有「Trivium 记忆」 | 确认装的是 web profile,然后**重启** `dsh web`,再打开一个工作区。只刷新浏览器不够。 |
|
|
240
|
-
| 标题栏没有「芯片」 |
|
|
241
|
-
| 改了注入 / 抽取 / embedding / 芯片开关没生效 |
|
|
276
|
+
| 标题栏没有「芯片」 | 在设置里打开「芯片(记忆白名单)」(拨一下就会保存)。切回对话页,标签应立刻出现,不用重启。 |
|
|
277
|
+
| 改了注入 / 抽取 / embedding / 芯片开关没生效 | 芯片 / 抽取 / 注入拨一下即保存。Embedding URL 仍要点「保存设置」。只有设置页本身没出现时才重启 `dsh web`。 |
|
|
242
278
|
| 会话层只有一个「后续」方框 | 正常(在会话层已打开时)。方框跟 DSH 压缩走,会话长不等于已经压过(默认约窗口 80% 才自动压)。要分段:对话里 `/compact`,或点「生成检查点」(只切图,不压窗口)。旧会话可点「更新检查点」补已经发生过的压缩 / 分叉。 |
|
|
243
279
|
| `ctx_find` 什么都没有 | 新会话默认只注入短地图,模型要自己调工具。也可以在芯片条「新增」或对模型说「记住:…」。闲聊和一次性改文件不会自动入库。 |
|
|
244
280
|
| 报 `.tdb` 被占用 / 打不开 | 只开一个 `dsh web`。不要同时跑两份链接了本插件的 Node 进程。 |
|
|
245
281
|
| embedding 填了但检索没变准 | 失败会退回关键词 + 图。看 `~/.dsh/trivium.json` 里 URL 是否 OpenAI 兼容(含 `/v1` 那种)。改完重启。 |
|
|
246
|
-
| 卸载后记忆还在 | 先停 `dsh web` 再 `dsh plugin remove`。剩下的 `.tdb` 是从未用 0.4.10 打开过的工作区,到该文件夹删 `.dsh/trivium.tdb
|
|
282
|
+
| 卸载后记忆还在 | 先停 `dsh web` 再 `dsh plugin remove`。剩下的 `.tdb` 是从未用 0.4.10 打开过的工作区,到该文件夹删 `.dsh/trivium.tdb`。已提交的 `trivium.jsonl` 用 `git checkout` 找回。只在配置里 disabled 不会清文件。 |
|
|
247
283
|
| 检查更新失败 | 只请求 npm registry 拿最新版本号,不影响记忆;过一会儿再点即可。 |
|
|
248
284
|
| rc.8 之后旧对话打不开 | 那是 DSH 自己的会话库格式变了,不是 `.tdb` 坏了。图记忆仍可 `ctx_find`;对不上号的旧方框可当情节残留。 |
|
|
249
285
|
|
|
@@ -254,7 +290,7 @@ Trivium 是记忆内核,不是日记、日历或聊天伴侣。它按**节点
|
|
|
254
290
|
## 发布信息
|
|
255
291
|
|
|
256
292
|
- GitHub: https://github.com/QWQcool/dsh-trivium
|
|
257
|
-
- npm: [`dsh-trivium@0.4.
|
|
293
|
+
- npm: [`dsh-trivium@0.4.14`](https://www.npmjs.com/package/dsh-trivium)
|
|
258
294
|
- 测试宿主:`@deepseek-ai/dsh@0.1.1-rc.2`(兼 `0.1.0-rc.8`)
|
|
259
295
|
- License: MIT(依赖 [TriviumDB](https://github.com/YoKONCy/TriviumDB) 为 Apache-2.0)
|
|
260
296
|
|