dsh-memento 0.5.8 → 0.5.9

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +28 -21
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.9] - 2026-09-08
9
+
10
+ ### Docs
11
+
12
+ - Repair GBK mojibake in historical CHANGELOG entries: em dashes, arrows, comparison signs, the multiplication sign, a mangled emoji (U+9983 U+E765), and the mangled Chinese appendix label (U+6D93 U+E15F U+6783) are restored to the clean pre-corruption text; no behavior change.
13
+
14
+
8
15
  ## [0.5.8] - 2026-09-07
9
16
 
10
17
  ### Docs
@@ -39,8 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
39
46
 
40
47
  ### Added
41
48
 
42
- - **Host settings panel integration** 鈥?when the DSH settings service is mounted, the plugin registers the `dsh-memento` settings namespace (every `Config` field except `enabled`, plus a new `panel.enabled`), and its browser half contributes a **top-level `dsh-memento` entry to the DSH settings sidebar** (via the public `settings.section` slot, like the built-in sections). Edits persist to the settings user layer (`settings.yaml`) with staged-draft save/discard/per-field reset semantics. Nearly everything applies live: write policies, language, budgets, limits, proposals, panel; `dbPath` / `auditRetentionDays` apply by reopening the store (old one closed safely); `retrieval.vector` swaps the retriever in place; only `snapshotOrder` needs a DSH reload (changes are recorded as a `settings-startup-fields` audit row). Without the settings service the plugin behaves exactly as composed.
43
- - **Hideable floating panel button** 鈥?new `panel.enabled` config (default `true`); `false` stops the web panel from rendering its 馃 entry button (addresses upstream issue #7). The panel probes its own `/api/memento/entries` response at startup and falls back to showing the button when the probe fails.
49
+ - **Host settings panel integration** — when the DSH settings service is mounted, the plugin registers the `dsh-memento` settings namespace (every `Config` field except `enabled`, plus a new `panel.enabled`), and its browser half contributes a **top-level `dsh-memento` entry to the DSH settings sidebar** (via the public `settings.section` slot, like the built-in sections). Edits persist to the settings user layer (`settings.yaml`) with staged-draft save/discard/per-field reset semantics. Nearly everything applies live: write policies, language, budgets, limits, proposals, panel; `dbPath` / `auditRetentionDays` apply by reopening the store (old one closed safely); `retrieval.vector` swaps the retriever in place; only `snapshotOrder` needs a DSH reload (changes are recorded as a `settings-startup-fields` audit row). Without the settings service the plugin behaves exactly as composed.
50
+ - **Hideable floating panel button** — new `panel.enabled` config (default `true`); `false` stops the web panel from rendering its 🧠 entry button (addresses upstream issue #7). The panel probes its own `/api/memento/entries` response at startup and falls back to showing the button when the probe fails.
44
51
 
45
52
  ### Changed
46
53
 
@@ -68,9 +75,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
68
75
 
69
76
  ### Added
70
77
 
71
- - **Embedding Provider seam (`ctx.memoryEmbedding`)** 鈥?new `lib/embedding.mjs` registry ships a deterministic fake-hash provider by default, so third-party plugins can register real embedding backends behind the same Service Definition.
72
- - **Retrieval Provider seam (`ctx.memoryRetrieval`)** 鈥?new `lib/retrieval.mjs` registry keeps the built-in substring retriever as the zero-dependency main path and adds an optional `VectorRetriever` for semantic recall, enabled when `config.retrieval.vector` is `true` and an embedding provider is detected (graceful fallback to substring otherwise).
73
- - **stdio MCP server export** 鈥?new `bin/mcp-server.mjs` and `lib/mcp.mjs` expose the memory seam as an MCP server through the `dsh-memento-mcp` bin.
78
+ - **Embedding Provider seam (`ctx.memoryEmbedding`)** — new `lib/embedding.mjs` registry ships a deterministic fake-hash provider by default, so third-party plugins can register real embedding backends behind the same Service Definition.
79
+ - **Retrieval Provider seam (`ctx.memoryRetrieval`)** — new `lib/retrieval.mjs` registry keeps the built-in substring retriever as the zero-dependency main path and adds an optional `VectorRetriever` for semantic recall, enabled when `config.retrieval.vector` is `true` and an embedding provider is detected (graceful fallback to substring otherwise).
80
+ - **stdio MCP server export** — new `bin/mcp-server.mjs` and `lib/mcp.mjs` expose the memory seam as an MCP server through the `dsh-memento-mcp` bin.
74
81
 
75
82
  ## [0.4.5] - 2026-08-23
76
83
 
@@ -96,7 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
96
103
 
97
104
  ### Changed
98
105
 
99
- - `package.json#dshWorkshop.lifecycle.activation` upgraded from `restart-profile` to `hot-reload`: with the panel routes riding the plugin fiber since 0.4.1, dispose-and-reactivate is fully clean. Proven by a Loader-level hot-reload composition test that drives `Include.refresh()` 鈥?the same transaction the HMR watcher triggers 鈥?through a `language` en 鈫?zh 鈫?en cycle against a duplicate-strict mock `webServer`, asserting the memory seam, the re-applied config, and the routes re-registering without a duplicate route.
106
+ - `package.json#dshWorkshop.lifecycle.activation` upgraded from `restart-profile` to `hot-reload`: with the panel routes riding the plugin fiber since 0.4.1, dispose-and-reactivate is fully clean. Proven by a Loader-level hot-reload composition test that drives `Include.refresh()` — the same transaction the HMR watcher triggers — through a `language` en → zh → en cycle against a duplicate-strict mock `webServer`, asserting the memory seam, the re-applied config, and the routes re-registering without a duplicate route.
100
107
 
101
108
  ## [0.4.1] - 2026-08-19
102
109
 
@@ -108,33 +115,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
108
115
 
109
116
  ### Added
110
117
 
111
- - **dsh-memory-protocol v1** 鈥?the community rehearsal of the DSH memory protocol: normative spec in `docs/protocol-v1.md` (+ 涓枃), machine-readable JSON Schema in `docs/schemas/dsh-memory-protocol-v1.schema.json`, entry spec extended with `tags` (鈮?6 脳 鈮?2 chars) and a per-entry `version` that increments on every `replace` (store schema v4, forward-migrated).
112
- - **Protocol/implementation separation** 鈥?write semantics moved into `lib/protocol.mjs` (`MemoryProtocolCore`, zero DSH dependencies); `MemoryService` is now a thin subclass that only injects the approval transport and the session-event emission gate. Behavior is unchanged.
113
- - **Adapter registry `ctx.memoryAdapters`** 鈥?reversible `register()`/`list()`/`adapt()`/`export()` plus three built-in reference adapters: `mem0`, `hermes-memory-md`, `claude-code-memory-md` (pure data converters 鈥?never model extraction). New command verbs: `/memory adapters`, `export --adapter=<id>` (read-only), `import --adapter=<id> <path|inline>` (rides the approval-gated `seed`, per-entry audit). Onboarding guide in `docs/adapters-guide.md` (+ 涓枃).
114
- - **Protocol conformance suite** 鈥?`test/protocol-conformance/`: 22 distributable cases (entry model, write semantics, budget model, audit reconstruction, export envelope) with a `--provider` CLI for third parties; CI runs them against dsh-memento's own provider as the golden reference (`npm run test:conformance`).
115
- - **Upstream proposal material** 鈥?`docs/upstream-proposal.md` (+ 涓枃): why the official `ctx.memory` seam should adopt the protocol, differences from the current seam, and the migration path.
118
+ - **dsh-memory-protocol v1** — the community rehearsal of the DSH memory protocol: normative spec in `docs/protocol-v1.md` (+ 中文), machine-readable JSON Schema in `docs/schemas/dsh-memory-protocol-v1.schema.json`, entry spec extended with `tags` (≤16 × ≤32 chars) and a per-entry `version` that increments on every `replace` (store schema v4, forward-migrated).
119
+ - **Protocol/implementation separation** — write semantics moved into `lib/protocol.mjs` (`MemoryProtocolCore`, zero DSH dependencies); `MemoryService` is now a thin subclass that only injects the approval transport and the session-event emission gate. Behavior is unchanged.
120
+ - **Adapter registry `ctx.memoryAdapters`** — reversible `register()`/`list()`/`adapt()`/`export()` plus three built-in reference adapters: `mem0`, `hermes-memory-md`, `claude-code-memory-md` (pure data converters — never model extraction). New command verbs: `/memory adapters`, `export --adapter=<id>` (read-only), `import --adapter=<id> <path|inline>` (rides the approval-gated `seed`, per-entry audit). Onboarding guide in `docs/adapters-guide.md` (+ 中文).
121
+ - **Protocol conformance suite** — `test/protocol-conformance/`: 22 distributable cases (entry model, write semantics, budget model, audit reconstruction, export envelope) with a `--provider` CLI for third parties; CI runs them against dsh-memento's own provider as the golden reference (`npm run test:conformance`).
122
+ - **Upstream proposal material** — `docs/upstream-proposal.md` (+ 中文): why the official `ctx.memory` seam should adopt the protocol, differences from the current seam, and the migration path.
116
123
  - `memory` tool accepts optional `tags` on add/replace/consolidate; tool results and `/memory export` documents carry `tags`/`version`.
117
124
 
118
125
  ### Changed
119
126
 
120
127
  - Five-language READMEs: protocol section, adapter matrix, conformance suite, new command verbs, and the development gate list (now 133 tests).
121
- - ARCHITECTURE: decisions 13鈥?5 (protocol separation, schema v4, adapter registry + conformance suite).
128
+ - ARCHITECTURE: decisions 13–15 (protocol separation, schema v4, adapter registry + conformance suite).
122
129
  - npm package now ships the protocol docs and the conformance suite (`files` whitelist).
123
130
 
124
131
  ## [0.3.1] - 2026-08-15
125
132
 
126
133
  ### Fixed
127
134
 
128
- - Boot crash on default Windows setups (reported in [issue #1](https://github.com/PerryLink/dsh-memento/issues/1)): `dsh web` does not write the harness's resolved home back to `process.env.DSH_HOME`, so `resolveDbPath` threw `MISSING_DSH_HOME` and failed the whole profile load. It now falls back to `~/.dsh` 鈥?the same documented fallback as the official harness (`resolveDshHome()`), replicated with `os.homedir()` to keep `lib/` zero-DSH-dependency. Relative `dbPath` values resolve against the same fallback home.
135
+ - Boot crash on default Windows setups (reported in [issue #1](https://github.com/PerryLink/dsh-memento/issues/1)): `dsh web` does not write the harness's resolved home back to `process.env.DSH_HOME`, so `resolveDbPath` threw `MISSING_DSH_HOME` and failed the whole profile load. It now falls back to `~/.dsh` — the same documented fallback as the official harness (`resolveDshHome()`), replicated with `os.homedir()` to keep `lib/` zero-DSH-dependency. Relative `dbPath` values resolve against the same fallback home.
129
136
  - Removed the now-unreachable `MISSING_DSH_HOME` error code.
130
137
 
131
138
  ## [0.3.0] - 2026-08-15
132
139
 
133
140
  ### Added
134
141
 
135
- - `/memory import` subcommand: restores entries from a `/memory export` document (file path or inline JSON starting with `{`). Validates the `dsh-memento` / `memory-export-v1` markers and entry shapes (unknown schema versions fail loudly), caps one import at 1000 entries, then rides `seed` 鈥?single approval, full budget pre-check, one atomic transaction. `source`/`workspaceKey`/`agentKey` survive the round-trip; entries get fresh ids/timestamps and reset recall counts. This completes the backup/migration story.
136
- - Approve-what-you-see approval payloads: `replace` carries `from:` (full previous entry) + `to:` (new text), `remove` carries the full text of the entry being deleted (no more bare substrings), and `consolidate` carries each target's resolved text (300-char excerpt cap per target) 鈥?the approval reason now holds the complete change being authorized.
137
- - `*-denied` audit rows: every rejected/cancelled/unavailable write (including the turn-outside `/memory` gate path, which has no approval audit pair) lands a denied row with the real decision source 鈥?denials now have their own evidence chain.
142
+ - `/memory import` subcommand: restores entries from a `/memory export` document (file path or inline JSON starting with `{`). Validates the `dsh-memento` / `memory-export-v1` markers and entry shapes (unknown schema versions fail loudly), caps one import at 1000 entries, then rides `seed` — single approval, full budget pre-check, one atomic transaction. `source`/`workspaceKey`/`agentKey` survive the round-trip; entries get fresh ids/timestamps and reset recall counts. This completes the backup/migration story.
143
+ - Approve-what-you-see approval payloads: `replace` carries `from:` (full previous entry) + `to:` (new text), `remove` carries the full text of the entry being deleted (no more bare substrings), and `consolidate` carries each target's resolved text (300-char excerpt cap per target) — the approval reason now holds the complete change being authorized.
144
+ - `*-denied` audit rows: every rejected/cancelled/unavailable write (including the turn-outside `/memory` gate path, which has no approval audit pair) lands a denied row with the real decision source — denials now have their own evidence chain.
138
145
  - Session-visibility isolation for reads and write targeting: `memory` / `memory_recall` queries filter by the session's `agentPreset` (shared + own agent), and `replace`/`remove`/`consolidate` can only target entries visible to the session (shared + own agent, workspace entries only for the session cwd). Management surfaces (`/memory`, the panel) keep the full cross-agent view and now render non-shared entries' agent keys.
139
146
  - `query` accepts an explicit `agentKey` option (`service.query(filter, { agentKey })`); without it, behavior is unchanged (full view, backward compatible).
140
147
 
@@ -143,7 +150,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
143
150
  - `proposalDecide` now resolves and updates inside one transaction: concurrent approve/dismiss races settle first-writer-wins instead of double-deciding.
144
151
  - `/memory proposals approve` no longer masks a successful write when the proposal was concurrently decided elsewhere.
145
152
  - Release workflow is now idempotent: it skips `npm publish` when the tag's version is already on npm, so re-pushing an old tag cannot fail a run.
146
- - Cross-platform test fix: the `resolveDbPath` absolute-path sample now matches the platform's `path.isAbsolute` semantics (a Windows drive path is relative on POSIX) 鈥?CI is green on all three platforms instead of red on Linux/macOS.
153
+ - Cross-platform test fix: the `resolveDbPath` absolute-path sample now matches the platform's `path.isAbsolute` semantics (a Windows drive path is relative on POSIX) — CI is green on all three platforms instead of red on Linux/macOS.
147
154
 
148
155
  ### Changed
149
156
 
@@ -160,7 +167,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
160
167
  - Bilingual `memory_recall` tool description, parameter descriptions, and result renderer.
161
168
  - New README section "What we learned from the terminal memories" (Claude Code / Codex / Hermes), mirrored across all five languages.
162
169
  - `commandListLimit` (default 50) and `commandAuditLimit` (default 10) config fields for the `/memory` command surface.
163
- - Coverage gate (`npm run check:coverage`: lib 鈮?0%, index.mjs 鈮?5%, all files 鈮?0%) and a weekly `next`-rc compatibility probe workflow.
170
+ - Coverage gate (`npm run check:coverage`: lib ≥90%, index.mjs ≥85%, all files ≥90%) and a weekly `next`-rc compatibility probe workflow.
164
171
  - Peer dependency ranges widened to `>=0.1.0-rc.6` so later harness rc releases resolve without a coordinated release.
165
172
  - Package metadata (`repository`/`homepage`/`bugs`), `types` conditions on the `exports` map, and this changelog.
166
173
 
@@ -170,7 +177,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
170
177
  - `/memory list` / `query` render at most `commandListLimit` entries and label truncation instead of silently dropping rows.
171
178
  - `seed` inserts run in one SQLite transaction: any mid-batch failure rolls back the whole batch (the documented all-or-nothing promise now holds).
172
179
  - `replace` re-resolves the target and recomputes the net budget delta after approval, closing the stale-previous race during the approval wait.
173
- - Audit rows record the real decision source (`via approval, writePolicy 鈥 vs `via write gate`) instead of always labeling the configured policy.
180
+ - Audit rows record the real decision source (`via approval, writePolicy …` vs `via write gate`) instead of always labeling the configured policy.
174
181
  - `memory_recall` description now states the true case semantics (case-sensitive for memory entries, case-insensitive for session history).
175
182
  - `maxEntriesPerQuery` is documented and enforced as the default result cap; explicit `limit` values are hard-capped at 1000 by the provider.
176
183
 
@@ -187,5 +194,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
187
194
  - `/memory` command (`list` / `query` / `add` / `remove` / `budgets` / `audit`) with an out-of-turn write gate sharing the same waterfall and policy.
188
195
  - Read-only web panel (`dsh.client` drawer): browse entries, search, budget bars, audit tail.
189
196
  - Session-event vocabulary (`memory/added|updated|removed|recalled|snapshot`) merge-declared in `types.d.ts` with rc.6-adaptive dispatch.
190
- - Hard per-track/per-layer character budgets with structured `BUDGET_EXCEEDED` errors 鈥?never truncate, never auto-compact.
191
- - CI matrix (three platforms 脳 Node 22.19/24), typecheck gate, and five-language README consistency gate.
197
+ - Hard per-track/per-layer character budgets with structured `BUDGET_EXCEEDED` errors — never truncate, never auto-compact.
198
+ - CI matrix (three platforms × Node 22.19/24), typecheck gate, and five-language README consistency gate.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-memento",
3
3
  "description": "Bounded, layered, approval-gated, auditable cross-session memory for DeepSeek Harness — a capability seam (ctx.memory service + local SQLite provider + memory tool + frozen snapshot injection), not another memory warehouse",
4
- "version": "0.5.8",
4
+ "version": "0.5.9",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",
7
7
  "types": "./types.d.ts",