dsh-memvault 0.10.0 → 0.10.1

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
@@ -12,10 +12,10 @@
12
12
  </p>
13
13
 
14
14
  <p align="center">
15
- <img alt="version" src="https://img.shields.io/badge/version-0.10.0-4a6cf7">
15
+ <img alt="version" src="https://img.shields.io/badge/version-0.10.1-4a6cf7">
16
16
  <img alt="license" src="https://img.shields.io/badge/license-MIT-30a46c">
17
17
  <img alt="runtime deps" src="https://img.shields.io/badge/runtime%20deps-zero-888">
18
- <img alt="node" src="https://img.shields.io/badge/node-%E2%89%A522.13-339933">
18
+ <img alt="node" src="https://img.shields.io/badge/node-%E2%89%A524.9-339933">
19
19
  <img alt="stars" src="https://img.shields.io/github/stars/zhang66633/dsh-memvault?style=flat&color=e3b341">
20
20
  </p>
21
21
 
@@ -51,7 +51,7 @@ dsh plugin --profile desktop add dsh-memvault
51
51
 
52
52
  Self-owned install links a checkout in the profile's `package.json` (`dsh-memvault: link:…`) plus a junction under `node_modules` — see `docs/DEVLOG.md`. A new bundle needs a **DSH restart**; after editing the client run `npm run build`.
53
53
 
54
- Requires DSH **0.2.1+**, verified against **0.2.2-rc.3** (`engines.dsh` names the 0.2.2 line explicitly, because a bare `>=0.2.1-0 <0.3.0-0` does not admit `0.2.2-rc.3` for strict semver readers). The tool cards, the non-interpolated injection and the session-close extraction are 0.2.2 features; on 0.2.1 they degrade to the previous behaviour.
54
+ Requires DSH **0.2.1+**, verified against **0.2.2-rc.5** (`engines.dsh` names the 0.2.2 line explicitly, because a bare `>=0.2.1-0 <0.3.0-0` does not admit `0.2.2-rc.5` for strict semver readers; the `>=0.2.2-0` arm covers the whole 0.2.2 pre-release line, rc.1 through rc.5). Node **24.9+** is required: that is the runtime floor of DSH 0.2.2, and this plugin uses Node 24's `DatabaseSync` busy-timeout option. The tool cards, the non-interpolated injection and the session-close extraction are 0.2.2 features; on 0.2.1 they degrade to the previous behaviour.
55
55
 
56
56
  ## ⚙️ Configuration
57
57
 
package/README.zh.md CHANGED
@@ -12,10 +12,10 @@
12
12
  </p>
13
13
 
14
14
  <p align="center">
15
- <img alt="version" src="https://img.shields.io/badge/version-0.10.0-4a6cf7">
15
+ <img alt="version" src="https://img.shields.io/badge/version-0.10.1-4a6cf7">
16
16
  <img alt="license" src="https://img.shields.io/badge/license-MIT-30a46c">
17
17
  <img alt="runtime deps" src="https://img.shields.io/badge/runtime%20deps-zero-888">
18
- <img alt="node" src="https://img.shields.io/badge/node-%E2%89%A522.13-339933">
18
+ <img alt="node" src="https://img.shields.io/badge/node-%E2%89%A524.9-339933">
19
19
  <img alt="stars" src="https://img.shields.io/github/stars/zhang66633/dsh-memvault?style=flat&color=e3b341">
20
20
  </p>
21
21
 
@@ -51,7 +51,7 @@ dsh plugin --profile desktop add dsh-memvault
51
51
 
52
52
  自持安装是在 profile 的 `package.json` 里写 `dsh-memvault: link:…` 加一个 `node_modules` 目录联接(见 `docs/DEVLOG.md`)。新增 bundle 要**重启 DSH**;改过客户端后跑 `npm run build`。
53
53
 
54
- 要求 DSH **0.2.1+**,实测目标是 **0.2.2-rc.3**。`engines.dsh` 里显式写了 0.2.2 那一段:裸的 `>=0.2.1-0 <0.3.0-0` 在**不带 `includePrerelease`** 的严格判定下不匹配 `0.2.2-rc.3`,而 npm/pnpm 的 peer 解析与插件市场的预检都是严格模式。工具卡片、不插值的注入、会话结束抽取是 0.2.2 的能力;在 0.2.1 上会退回旧行为。
54
+ 要求 DSH **0.2.1+**,实测目标是 **0.2.2-rc.5**。`engines.dsh` 里显式写了 0.2.2 那一段:裸的 `>=0.2.1-0 <0.3.0-0` 在**不带 `includePrerelease`** 的严格判定下不匹配 `0.2.2-rc.5`,而 npm/pnpm 的 peer 解析与插件市场的预检都是严格模式;`>=0.2.2-0` 这一段覆盖整条 0.2.2 预发布线(rc.1 → rc.5)。Node 要求 **24.9+**:这是 DSH 0.2.2 的运行时下限,插件也用到 Node 24 的 `DatabaseSync` busy-timeout 选项。工具卡片、不插值的注入、会话结束抽取是 0.2.2 的能力;在 0.2.1 上会退回旧行为。
55
55
 
56
56
  ## ⚙️ 配置
57
57
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 目标:Python 引擎退役后,插件自带**存储、抽取、检索**三件事,装一个插件即完整功能。
4
4
  > 旧库 `data/memvault.db` 导出成 JSON 后归档,新库按本文结构重建。
5
- > 状态:**M0–M3 检索 + 工具定义已实现**(`lib/core/`,测试 `test/core*.test.mjs`);M4 对齐 DSH 0.2.2(见 DEVLOG §46)。
5
+ > 状态:**M0–M3 检索 + 工具定义已实现**(`lib/core/`,测试 `test/core*.test.mjs`);M4 对齐 DSH 0.2.2,实测目标 **0.2.2-rc.5**(见 DEVLOG §46 / §48)。
6
6
  > 注入层的两条硬约束记在这里:注入文本是记忆内容,注册时必须 `interpolate: false`(否则记忆里的 `{{…}}`
7
7
  > 会让 `assemble()` 抛错、整次请求失败)且 `required: true`(长时记忆不被 `suppressRuntimeContext()` 静默丢弃)。
8
8
 
package/docs/DEVLOG.md CHANGED
@@ -1555,3 +1555,54 @@ README 两语种也补了一句「要求 0.2.1+,实测目标 0.2.2-rc.3」,
1555
1555
  教训:**版本范围不是文案**。`>=0.2.1-0` 看起来「覆盖 0.2.x」,在严格读者眼里只覆盖到 0.2.1 的预发布;
1556
1556
  每次跟随宿主升级(0.2.1 → 0.2.2)都必须补一段同元组的 comparator,并跑一次三种判定器。
1557
1557
 
1558
+ ---
1559
+
1560
+ ## 48. 0.10.1:把适配声明跟到 0.2.2-rc.5(Node 下限也一起收紧)
1561
+
1562
+ 12 天后回来核宿主:DSH 已从 **0.2.2-rc.3 升到 0.2.2-rc.5**(桌面运行时仍是 Electron 44.7.0 /
1563
+ Node 24.21.0 / SQLite 3.53.4)。要求是「更新适配 DSH 最新版本号」,所以先核**到底要改什么**,
1564
+ 再决定改多少。
1565
+
1566
+ ### 48.1 三层核验:范围够不够、API 变没变、真机跑没跑
1567
+
1568
+ | 层 | 做法 | 结论 |
1569
+ |---|---|---|
1570
+ | 版本声明 | 用运行时同版 `semver@7.8.5` 对 `0.2.2-rc.4` / `rc.5` 跑严格 + `includePrerelease` | **两段范围都满足**,`>=0.2.2-0` 这一段本来就覆盖整条 0.2.2 预发布线(rc.1 → rc.5),无需再加段 |
1571
+ | 破坏性变更 | 读 `docs/upgrade-guide` 新增的 `v0.2.2-rc.3`、`v0.2.2-rc.4` | 各 1 条:`deepseek-refusal-code`(LLM 流拒绝码改名)与 `web-search-deepseek-model-default`(搜索默认),都**不在**本插件的调用面上 |
1572
+ | API 面 | 在 asar 里逐项 grep 我们用的接口 | `systemPrompt.context`(`interpolate`/`required` 都在)、`tools.register`、`webServer.register`、`slots.inject/register`、`tool.call.toolview`、`session/event`、`session/disposed` **全部仍在** |
1573
+ | 真机 | `cordis_inspect` + `/memvault/api/status` | 面板 `conversation.view` occupant `dsh-memvault#memvault` **active**;status 返回 `writeScope` 且 `extract` 里**没有** `pythonPath/user/agent/run` —— 说明 **0.10.0 已经在 rc.5 上跑**(应用重启过),不是纸面推演 |
1574
+
1575
+ 所以 0.10.0 的代码在 rc.5 上**不需要任何改动**:注入、工具、面板、面板路由都正常。
1576
+
1577
+ ### 48.2 真正要改的两处声明
1578
+
1579
+ 1. **`engines.node`:`>=22.13` → `>=24.9.0`**。两个理由,前者决定性、后者是佐证:
1580
+ - DSH 自己在 `v0.2.1-rc.2` 的 `node-24` 变更里把下限提到 **Node 24.9**,`@deepseek-ai/dsh`
1581
+ 的 `engines.node` 现在就是 `>=24.9.0`。插件声明 22.13 等于声称支持一个宿主根本不接受的运行时。
1582
+ - 本插件用了 `new DatabaseSync(path, { timeout })`(Node 24 才有的 busy-timeout 选项),
1583
+ 在 Node 22 上这个选项是否被接受从未验证过;既然宿主不会跑 22,就别赌。
1584
+ 这是一次**收紧**,不是适配新 API——0.2.1 宿主只要 Node ≥24.9 仍然可用。
1585
+ 2. **版本号 0.10.0 → 0.10.1**(patch)。这一版没有任何行为变化,只是把「已验证目标」从 rc.3
1586
+ 改成 rc.5、把 Node 下限对齐宿主;沿用 0.9.9 → 0.9.10 的先例(纯声明进 patch)。
1587
+
1588
+ `engines.dsh` 的**字面量没动**:`>=0.2.1-0 <0.3.0-0 || >=0.2.2-0 <0.3.0-0`。因为 `>=0.2.2-0`
1589
+ 是一个以 0.2.2 为元组、带预发布的 comparator,semver 据此放行**所有** 0.2.2 预发布(rc.1…rc.5)
1590
+ 与 0.2.2 正式版。加 `>=0.2.2-rc.5-0` 这种写法是错的(多余且容易过期),把具体 rc 写进范围也是错的
1591
+ ——范围描述的是「一类宿主」,不是「一台宿主」。
1592
+
1593
+ ### 48.3 把新事实写进测试,而不是只写进 README
1594
+
1595
+ `smoke-package` 的严格矩阵补上 `0.2.2-rc.4`、`0.2.2-rc.5`;新增一条 `engines.node` 断言:
1596
+ `24.9.0` 与**当前进程版本**都必须满足声明,而 `22.13.0` 必须被拒绝。这样「Node 下限」不会在下次
1597
+ 改 README 时悄悄漂回去。README 两语种的兼容段同步改成 rc.5,并写明 Node 24.9 的两个理由。
1598
+
1599
+ ### 48.4 验证
1600
+
1601
+ `npm test` 全绿:**358 条 [PASS] 断言 + 56 条单测**。真机:`http://127.0.0.1:61714/memvault/api/status`
1602
+ → `enabled=true / blocks=3 / error=null / writeScope={user:lenovo,agent:claude-code-memory}`,
1603
+ 面板 occupant 仍 active。
1604
+
1605
+ 发布:0.10.1 推到 GitHub;npm 侧本机登录态已失效(`E401`,12 天前那个 token 使用者已自行吊销),
1606
+ 发布需要新的凭证——这条记在这里,避免下次误以为「代码没推上去」。
1607
+
1608
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-memvault",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "DeepSeek Harness plugin: inject MemVault core memory blocks into the system prompt, extract finished turns as one windowed pass, and show, edit, trace, review and replay all of it in a memory panel",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -58,7 +58,7 @@
58
58
  "panel"
59
59
  ],
60
60
  "engines": {
61
- "node": ">=22.13",
61
+ "node": ">=24.9.0",
62
62
  "dsh": ">=0.2.1-0 <0.3.0-0 || >=0.2.2-0 <0.3.0-0"
63
63
  },
64
64
  "dsh": {
@@ -17,8 +17,10 @@
17
17
  * checked, and a missing declaration imposes no constraint at all — so the
18
18
  * declarations that exist are checked for the right package family.
19
19
  * - `engines.dsh` decides alone when present, so it must agree with every DSH
20
- * peer, and the range must cover both the 0.2.1 and the 0.2.2 prerelease lines
21
- * for readers that do not pass `includePrerelease`.
20
+ * peer, and the range must cover the 0.2.1 and the whole 0.2.2 pre-release
21
+ * lines (rc.1 … rc.5) for readers that do not pass `includePrerelease`.
22
+ * - `engines.node` names the floor the verified DSH release itself enforces
23
+ * (Node 24.9), which is also the first line with `DatabaseSync` timeouts.
22
24
  * - `files[]` names real paths, otherwise a published tarball silently lacks
23
25
  * the patch or the docs.
24
26
  */
@@ -129,11 +131,12 @@ check('every DSH peer declares the same host range as engines.dsh',
129
131
  dshPeers.map(([name]) => name).join(', '))
130
132
 
131
133
  // The range is a promise about which host builds may run this plugin. A bare
132
- // `>=0.2.1-0 <0.3.0-0` does NOT match `0.2.2-rc.3` when `includePrerelease` is
133
- // off — semver only admits a prerelease through a comparator on its own
134
+ // `>=0.2.1-0 <0.3.0-0` does NOT match a 0.2.2 prerelease when `includePrerelease`
135
+ // is off — semver only admits a prerelease through a comparator on its own
134
136
  // major.minor.patch tuple — and npm/pnpm peer resolution plus dsh-market's
135
137
  // discovery preflight are strict. So the 0.2.2 arm is what makes the declaration
136
- // true for a 0.2.2 host; verify it with the same semver the runtime ships.
138
+ // true for a 0.2.2 host, and it covers that whole line (rc.1 through rc.5 and the
139
+ // stable release); verify it with the same semver the runtime ships.
137
140
  {
138
141
  const probe = createRequire(join(process.env.DSH_HOME ?? join(homedir(), '.dsh'), 'profiles', 'node_modules') + '/')
139
142
  let semver = null
@@ -142,7 +145,10 @@ check('every DSH peer declares the same host range as engines.dsh',
142
145
  skip('the declared host range matches 0.2.2 prereleases under strict semver',
143
146
  'no semver under the profile node_modules')
144
147
  } else {
145
- const must = ['0.2.1', '0.2.1-rc.3', '0.2.2-rc.1', '0.2.2-rc.3', '0.2.2', '0.2.3']
148
+ const must = [
149
+ '0.2.1', '0.2.1-rc.3',
150
+ '0.2.2-rc.1', '0.2.2-rc.3', '0.2.2-rc.4', '0.2.2-rc.5', '0.2.2', '0.2.3',
151
+ ]
146
152
  const mustNot = ['0.1.9', '0.3.0-rc.1', '1.0.0']
147
153
  const strictOk = must.every((v) => semver.satisfies(v, DSH_RANGE))
148
154
  && mustNot.every((v) => !semver.satisfies(v, DSH_RANGE))
@@ -150,6 +156,17 @@ check('every DSH peer declares the same host range as engines.dsh',
150
156
  strictOk, `${must.filter((v) => !semver.satisfies(v, DSH_RANGE)).join(', ')} rejected`)
151
157
  check('the declared host range still rejects 0.3 prereleases with includePrerelease',
152
158
  !semver.satisfies('0.3.0-rc.1', DSH_RANGE, { includePrerelease: true }))
159
+
160
+ // DSH 0.2.2 runs on Node 24.9+ (upgrade guide v0.2.1-rc.2/node-24), and this
161
+ // plugin uses Node 24's `DatabaseSync(path, { timeout })`. Declaring the floor
162
+ // the host itself enforces keeps "supported" from meaning "never executed".
163
+ const NODE_RANGE = pkg.engines?.node
164
+ check('engines.node matches the Node floor of the verified DSH release',
165
+ typeof NODE_RANGE === 'string'
166
+ && semver.satisfies('24.9.0', NODE_RANGE)
167
+ && semver.satisfies(process.versions.node, NODE_RANGE)
168
+ && !semver.satisfies('22.13.0', NODE_RANGE),
169
+ `${NODE_RANGE} vs running ${process.versions.node}`)
153
170
  }
154
171
  }
155
172