dsh-plugin-xujie-memory 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/ACCEPTANCE.md +37 -0
  2. package/BUILD-PROVENANCE.json +53 -0
  3. package/CHANGELOG.md +12 -0
  4. package/README.md +48 -23
  5. package/README_EN.md +32 -9
  6. package/lib/client.js +17219 -0
  7. package/lib/controller.js +307 -0
  8. package/lib/index.js +87 -22
  9. package/lib/typert.host.d.ts +3 -0
  10. package/lib/typert.host.js +15104 -0
  11. package/lib/typert.remote-client.d.ts +40 -0
  12. package/lib/typert.remote-client.d.ts.map +1 -0
  13. package/lib/typert.remote-client.js +15093 -0
  14. package/lib/types.d.ts +13 -0
  15. package/lib/types.js +1 -0
  16. package/package.json +49 -5
  17. package/python/xujie_memory/__init__.py +123 -123
  18. package/python/xujie_memory/engine.py +1333 -1312
  19. package/python/xujie_memory/management.py +203 -0
  20. package/python/xujie_memory/memory.py +27 -21
  21. package/python/xujie_memory/privacy.py +105 -0
  22. package/python/xujie_memory/schema.sql +492 -480
  23. package/python/xujie_memory/server.py +52 -0
  24. package/scripts/build.mjs +19 -0
  25. package/scripts/prepack.mjs +9 -0
  26. package/scripts/test-all.mjs +9 -0
  27. package/scripts/test-node.mjs +10 -0
  28. package/src/client/MemoryPanel.tsx +536 -0
  29. package/src/client/NeuralField.tsx +88 -0
  30. package/src/client/css.d.ts +4 -0
  31. package/src/client/icons.tsx +28 -0
  32. package/src/client/index.tsx +59 -0
  33. package/src/client/memory-adapter.ts +67 -0
  34. package/src/client/model.ts +79 -0
  35. package/src/client/neural/engine.ts +999 -0
  36. package/src/client/neural/morphology.ts +219 -0
  37. package/src/client/panel.css +337 -0
  38. package/src/client/types.ts +6 -0
  39. package/src/controller.ts +88 -0
  40. package/src/generated/typert.host.js +449 -0
  41. package/src/generated/typert.remote-client.js +438 -0
  42. package/src/index.ts +2 -0
  43. package/src/types.ts +13 -0
  44. package/test/cordis-fixture.mjs +5 -0
  45. package/test/management_regression.py +187 -0
  46. package/test/node-regression.entry.mjs +52 -0
  47. package/vendor/DSH-LICENSE.txt +21 -0
  48. package/vendor/THIRD-PARTY.md +6 -0
  49. package/vendor/dsh-protocol/index.ts +484 -0
  50. package/vendor/dsh-protocol/json-value.ts +53 -0
  51. package/vendor/dsh-protocol/owned-value.ts +39 -0
  52. package/vendor/dsh-protocol/principal.ts +17 -0
  53. package/vendor/dsh-protocol/remote-access.ts +38 -0
  54. package/vendor/dsh-protocol/remote-error.ts +49 -0
  55. package/vendor/dsh-protocol/remote-info.ts +161 -0
  56. package/vendor/dsh-protocol/types.ts +939 -0
  57. package/vendor/licenses/jridgewell-gen-mapping-MIT.txt +19 -0
  58. package/vendor/licenses/jridgewell-resolve-uri-MIT.txt +19 -0
  59. package/vendor/licenses/jridgewell-sourcemap-codec-MIT.txt +19 -0
  60. package/vendor/licenses/jridgewell-trace-mapping-MIT.txt +19 -0
  61. package/vendor/licenses/zod-MIT.txt +21 -0
package/ACCEPTANCE.md ADDED
@@ -0,0 +1,37 @@
1
+ # 0.7.0 · DSH 0.2.1-rc.5 验收
2
+
3
+ ## 已验证的范围
4
+
5
+ - 17 项 Python 回归 + 13 项 Node 桥接检查通过;另用原始 0.6 内核创建临时旧库,确认真实升级备份、旧摘要修复、活跃数据保留及升级后编辑。
6
+ - Windows 隔离 DSH Web 宿主以 2000 条模拟原话验证图形上限及图外搜索;抽查不同时间的 8 条均命中,并验证旧记录编辑、删除和重启后持久性。10 路并发执行 20 次写入、20 次图快照和 60 次搜索,全部成功。这不是原生桌面客户端验收或大规模长期运行保证。
7
+ - 临时真实 SQLite / 本地 HTTP:搜索、原子编辑与替代记录、派生画像、删除/摘要清理、跨用户/跨会话隔离、冲突、并发、故障回滚、升级备份与旧残留修复。
8
+ - Host 桥接:使用 Cordis DI 测试替身并连接真实 Python 内核;校验正式生成的 DTO codecs,测试四个工具、owner 限制、缓存隔离/失效及持久化读写。
9
+ - 前端:最终实际构建的 ModuleLoader factory + 共享 React + 测试 main/slots + 临时真实 Python 内核;覆盖旋转、拖转、缩放、搜索、编辑保存、遗忘确认、证据跳转、冲突、空/错误/无权限/加载、减少动态和 390px 窄屏。测试夹具不进入生产前端。
10
+ - 这些测试不等价于启动用户日常使用的 DSH 桌面宿主;未读取真实用户数据库。
11
+
12
+ ## 必须在用户桌面确认
13
+
14
+ 1. 保留 0.6.0 原包和记忆数据备份,以原 profile 安装升级包并重启 rc.5。
15
+ 2. 左侧出现「记忆」;点击后在 DSH 当前应用内部显示页面,不开外部窗口;折叠导航后图标仍可用。
16
+ 3. 看真实 scope 和三层记录;空库不得出现演示人物或虚假记忆。图外旧记录能由搜索打开。
17
+ 4. 旋转/拖拽/缩放、自转暂停与重置;三层结构可辨;搜索能定位;小窗口布局与减少动态效果可用。
18
+ 5. 选一条无关紧要的测试记忆,编辑后保存。刷新页面、重启 DSH 再搜索,须看到新内容;原 trace 失效,画像/召回不再使用旧事实。
19
+ 6. 两处打开同一条记录,第一处修改后第二处保存旧版本,必须提示冲突或记录已替换,而不是覆盖。
20
+ 7. 删除需确认;刷新/重启后搜索与召回不再命中,相关摘要与画像不再活跃。
21
+ 8. 正常对话仍能写入记忆;自动注入不带回已纠正/已删旧材料;记忆内核故障不得阻塞对话。
22
+ 9. 禁用/卸载插件后,侧栏、样式和 Remote 注册应回收,无遗留动画和多余进程。
23
+
24
+ ## 删除与回滚的实际含义
25
+
26
+ - 遗忘是应用层清理,不是磁盘安全擦除,也不删除 DSH 聊天历史。
27
+ - 首次迁移备份 `<dbPath>.pre-0.7.0.bak` 保留迁移前数据,必须私密保存。删除操作不会修改旧备份。
28
+ - 回滚先退出 DSH/内核,保留当前库另存一份,再按需恢复备份与 0.6.0 包。备份之后的新记忆不在旧备份中;不要直接覆盖正在使用的库。
29
+
30
+ ## 界面语义
31
+
32
+ - 光纤、胞体及脉冲是结构性视觉隐喻,不是额外的真实记录;节点计数只统计真实投影。
33
+ - 原话可编辑/忘记;状态、摘要、待澄清项只读,可跳转依据。人设卡由真实库推导,并非独立修改表单。
34
+ - 当前详情时间显示记录版本的 recorded_at;编辑保留内核原始发生时间,但界面显示新版本记录时间。
35
+ - 图默认最近 250 条原话;管理界面搜索当前记忆库的全部有效原话,对话自动召回仍保留最近 800 条候选上限。
36
+
37
+ 最终补充验证:窄屏真实滚轮滚动、触屏手势(代理保存的记录)、切换节点加载时不暴露旧记录操作、同一原话锚点别名切换、卸载回收;桌面/390px 的 24 个三维视角均无层标签重叠或出界。
@@ -0,0 +1,53 @@
1
+ {
2
+ "package": "dsh-plugin-xujie-memory",
3
+ "version": "0.7.0",
4
+ "status": "acceptance-candidate-not-desktop-certified",
5
+ "baseline_sha256": "1e5bbc74cd3208be1066c164ecd8560d60a02e8a8be7a042aa4500a0e7b7c410",
6
+ "target_dsh": "0.2.1-rc.5",
7
+ "official_source": "https://github.com/deepseek-ai/deepseek-harness",
8
+ "official_tag": "dsh-v0.2.1-rc.5",
9
+ "official_commit": "b830ec950faba0a46dda564be3e2d854afed94f1",
10
+ "remote_contract_generator": "official rc.5 WorkspaceTypertGenerator; minimal SDK declaration fixture for build; concrete DTO schemas generated and tested",
11
+ "runtime_rpc": "generated strict descriptors, copied MIT protocol helpers; host-shared Cordis peer",
12
+ "test_boundary": "real temporary SQLite and HTTP; Node DI test double; not a desktop launcher test",
13
+ "windows_runtime": "preserved from supplied 0.6.0; not executed on Linux",
14
+ "frontend": {
15
+ "implementation": "Opus 5.5 delegated frontend rewrite",
16
+ "rendering": "3D coordinate projection; soma/dendrites/axon, depth, pulsing light; decorative morphology is not memory data",
17
+ "validation": "built CJS module-loader factory; simulated DSH main/slots with shared React and actual temporary Python kernel; visual states and motion/drag/zoom/reduced-motion checked",
18
+ "desktop_certification": false,
19
+ "final_integration_fixes": [
20
+ "native scroll in stacked/narrow layout and touch gesture arbitration",
21
+ "no stale detail mutation during selection/loading; save/delete selection lock",
22
+ "same-trace alias selection reload",
23
+ "screen-space three-layer caption collision avoidance"
24
+ ],
25
+ "final_parent_qa": {
26
+ "real_factory": true,
27
+ "real_temporary_kernel_save_delete": true,
28
+ "selection_race": true,
29
+ "same_trace_alias": true,
30
+ "unload_cleanup": true,
31
+ "mobile_wheel_scroll": true,
32
+ "reduced_motion": true,
33
+ "caption_layouts": 24,
34
+ "console_errors": 0
35
+ }
36
+ },
37
+ "regression_results": {
38
+ "python_unittests": 17,
39
+ "node_bridge_checks": 13,
40
+ "actual_supplied_060_database_upgrade": "passed with temporary database; consistent backup, active data retention, residual summary repair and subsequent edit",
41
+ "real_user_data_accessed": false,
42
+ "windows_runtime_bytes": "identical to supplied baseline"
43
+ },
44
+ "stress_verification": {
45
+ "windows_isolated_dsh_web": true,
46
+ "synthetic_active_traces": 2000,
47
+ "old_and_new_search_checks": "8/8",
48
+ "concurrent_http_requests": 100,
49
+ "concurrent_workers": 10,
50
+ "desktop_client_certified": false,
51
+ "description": "Management search scans all active traces in the selected scope; automatic recall remains capped at 800 candidates."
52
+ }
53
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0(DSH 0.2.1-rc.5 验收构建)
4
+
5
+ - 修复管理界面搜索只能查到最近 800 条原话的问题;自动对话召回仍保留原候选上限。
6
+ - 增加 2000 条记忆的搜索回归和隔离环境并发压力验证。
7
+ - 正式双端插件清单、Host owner-only Remote 服务与应用内记忆面板接入。
8
+ - 原子替换式编辑、版本冲突检测、新增 memory_edit 工具。
9
+ - 遗忘清理摘要、澄清与关联投影;旧库迁移备份及残留修复。
10
+ - 按用户隔离提示词回退缓存;内核操作统一排队,避免编辑与对话写入竞争。
11
+ - 三维旋转/拖拽、三层记忆、模糊搜索、人设卡与持久化管理。
12
+ - 新建测试集;不沿用旧 CHANGELOG 中已丢失测试集的通过数。
13
+ - Windows DSH 桌面真机验收待完成,不宣称已通过。
14
+
3
15
  ## 0.6.0(内核 0.52.0)
4
16
 
5
17
  ### 发布前修复
package/README.md CHANGED
@@ -1,3 +1,36 @@
1
+ # Xujie Memory 0.7.0 · DSH 应用内记忆工作台
2
+
3
+ **目标版本:DeepSeek Harness 0.2.1-rc.5。当前为开发验收构建,尚未在用户的 Windows 桌面宿主上完成真机验收。**
4
+
5
+ ## 0.7 新增
6
+
7
+ - 通过正式 `dsh.client`、`sidebar.panellist` / `main` 插槽提供应用内部的「记忆」页,不另开网站。
8
+ - 三层神经网络界面、原话模糊搜索、人设卡和记忆正文编辑/删除;可见范围来自真实 SQLite 库。
9
+ - 所有管理 Remote 仅允许经过 DSH 验证的 owner 调用。浏览器不持有内核 token,也不直连内核端口。
10
+ - 编辑并非覆盖不可变原话:一次 SQLite 事务中失效旧依据、写入替代原话并重新编码、重算事实与画像、刷新检索。返回的新 trace_id 会替代旧节点。发生时间保留,编辑时间单独留审计。
11
+ - 新增 `memory_edit` 工具。先用 `memory_search` 获取 trace_id 与 content_hash,再带 expected_hash 纠正,冲突时拒绝覆盖。
12
+ - 图中结构性纤维仅作视觉骨架;事实连线来自 evidence、摘要来源、锚点和工作记忆投影,不声称推断出了真实神经/语义关系。
13
+
14
+ ## 数据与升级边界
15
+
16
+ 继续使用原来的 dbPath;默认 `~/.xujie-memory/memory.db`。首次迁移旧库前,会生成 SQLite 一致性备份 `<dbPath>.pre-0.7.0.bak`(不覆盖已有备份)。随后修复旧版遗忘操作可能留下的摘要等派生残留。
17
+
18
+ **备份含迁移前数据,应私密保存。**「遗忘」清理应用记忆库及依赖投影,不等于安全擦除磁盘,不会删除 DSH 聊天记录、外部导出、旧备份或磁盘/WAL 历史。
19
+
20
+ 所有编辑/删除必须等内核成功响应后才视为保存。失败或版本冲突时不显示假成功;版本冲突需要重新加载。图形默认仅展示最近 250 条原话及部分派生节点,超出范围会标明;管理界面搜索覆盖当前记忆库全部有效原话。对话中的自动召回仍使用最近 800 条候选的上限。
21
+
22
+ ## 验收与开发
23
+
24
+ 按安装 0.6.0 时同一 profile 和方式安装本包/解压目录,然后重启 DSH。不要删除记忆数据目录。侧栏应出现「记忆」。逐项验收见 `ACCEPTANCE.md`。
25
+
26
+ `npm install` 安装开发依赖后,`npm run build` 构建浏览器 factory 与 Host 控制器,`npm test` 运行真实临时 SQLite/HTTP 回归及使用 DI 测试替身的 Host 桥接检查。Windows 默认使用包内 Python;其他平台用 python3,或设置 PYTHON。测试不会读取用户实际记忆库。使用正式 rpc 生成物;变更 Remote 签名必须重新运行与 rc.5 对应的 Typert 生成流程,不能只改客户端。
27
+
28
+ 本包保留原 0.6.0 的 Windows x64 Python 运行时;本次 Linux 环境未执行该 Windows 运行时。官方接口取自 `dsh-v0.2.1-rc.5`,commit `b830ec950faba0a46dda564be3e2d854afed94f1`。详细构建来源见 `BUILD-PROVENANCE.json`。
29
+
30
+ ---
31
+
32
+ ## 原有内核使用说明(已更新到 0.7)
33
+
1
34
  # dsh-plugin-xujie-memory
2
35
 
3
36
  [English](README_EN.md) | 简体中文
@@ -41,7 +74,7 @@ flowchart LR
41
74
 
42
75
  记忆会自动注入;需要主动查找或删除时,也可以使用下方工具。
43
76
 
44
- ### 三层记忆(当前版本 0.6.0)
77
+ ### 三层记忆(0.7.0)
45
78
 
46
79
  | 层 | 内容 | 你怎么用 |
47
80
  |---|---|---|
@@ -60,54 +93,46 @@ flowchart LR
60
93
  **模糊搜索**:`POST /memory/search`,两字词、错一个字都能捞;
61
94
  精确检索落空时,自动注入也会降级到模糊匹配。
62
95
 
63
- 本仓库保留 0.6.0 发布包中的内核;上表概括了三层记忆。
96
+ 0.7 以内核 0.52.0 为基线扩展管理接口与一致性逻辑;上表概括了三层记忆。
64
97
 
65
98
  **当前这句不会被当成旧事注回去(0.6 修复)**:`/turn` 用 trace_id 挡,`/context` 只拿得到文本、按内容挡(忽略空白与标点)。换成问别的事,旧记忆照常出现。
66
99
 
67
100
  ---
68
101
 
69
- ## 主动工具(0.6 新增)
102
+ ## 主动工具(0.7)
70
103
 
71
- 注入是自动的,但**主动回忆**和**删掉记错的东西**需要有手。0.6 给模型注册了三个工具:
104
+ 注入是自动的,但**主动回忆**和**删掉记错的东西**需要有手。0.7 给模型注册了四个工具:
72
105
 
73
106
  | 工具 | 作用 | 副作用 |
74
107
  |---|---|---|
75
- | `memory_search` | 按字面/错字模糊检索原话,返回内容、`trace_id`、权重 | 只读 |
108
+ | `memory_search` | 按字面/错字模糊检索原话,返回内容、`trace_id`、`content_hash`、权重 | 只读 |
109
+ | `memory_edit` | 以 `trace_id`、正文和 `expected_hash` 原子纠正原话 | 写,返回新 trace_id |
76
110
  | `memory_forget` | 删一条记忆(软删:内容清空、FTS 移除、依赖它的事实失效并重算) | 写,`erased_at` 留审计 |
77
111
  | `memory_status` | 原话/已删/状态/锚点/未确认计数 + 内核健康 | 只读 |
78
112
 
79
113
  用户说「忘掉这条」时,模型可以自己搜到 `trace_id` 再删,不需要你手动清库。
80
114
  对应内核接口:`POST /memory/search`、`POST /memory/forget`、`POST /memory/stats`。
81
115
 
82
- 宿主若没有 `tools` 服务(老版本),这三个工具静默跳过,注入照常。目前尚无编辑记忆工具或图形化记忆管理界面。
116
+ 宿主若没有 `tools` 服务(老版本),这些工具静默跳过,注入照常。0.7 新增 memory_edit 工具和应用内图形化管理页,详见本文开头。
83
117
 
84
118
  ---
85
119
 
86
- ## 装上就能用(用户零动作)
120
+ ## 安装本地 0.7 验收包
87
121
 
88
122
  | | |
89
123
  |---|---|
90
- | DSH | 0.2 预览版(`dsh.bundle` 机制) |
124
+ | DSH | **0.2.1-rc.5**(官方 bundle + client 插件机制) |
91
125
  | Node | `^22.19 \|\| >=24` |
92
- | Python | **不用装**:Windows x64 包里自带解释器 |
93
- | 内核 | **不用装**:Python 内核(`python/xujie_memory`)在包里 |
94
-
95
- ```bash
96
- dsh plugin --profile <你的profile> add <解压后的 dsh-plugin-xujie-memory 目录>
97
- # 新开一个会话即可
98
- ```
126
+ | Python | Windows x64 包内自带;macOS/Linux 需系统 Python 3.10+ |
99
127
 
100
- 也可以在 DSH 的「添加插件」中输入包名 `dsh-plugin-xujie-memory` 安装,或通过命令安装:
128
+ 先备份原包与记忆库,退出 DSH,将本地验收包解压后,按 0.6 使用的原 profile 安装:
101
129
 
102
130
  ```bash
103
- dsh plugin --profile <你的profile> add dsh-plugin-xujie-memory
131
+ dsh plugin --profile <你的profile> add <tgz 解压后含 package.json 的 package 目录>
132
+ # 然后重启 DSH,检查左侧「记忆」入口
104
133
  ```
105
134
 
106
- 也可以从 GitHub 安装指定版本:
107
-
108
- ```bash
109
- dsh plugin --profile <你的profile> add github:Shoren-Syi/dsh-plugin-xujie-memory#v0.6.0
110
- ```
135
+ **本次交付未发布 npm/GitHub 0.7 标签。** 不要用注册表包名或旧 GitHub v0.6.0 命令替代本地验收包;它们可能装回旧版。不要删除原数据目录。安装失败时保留日志,按 `ACCEPTANCE.md` 回滚。
111
136
 
112
137
  不需要 `pip install`,不需要填 `repoPath`,不需要另外起服务:
113
138
 
@@ -243,7 +268,7 @@ dsh-plugin-xujie-memory/
243
268
 
244
269
  ## 开发验证
245
270
 
246
- `npm test` 运行冒烟、回声、工具及删除后画像对账测试。Windows x64 默认使用包内 Python;其他平台需要 Python 3.10+,也可通过 `PYTHON` 指定解释器。执行 `npm pack` 可打包当前仓库自带的内核。
271
+ `npm test` 运行新增的管理、事务、隔离、持久化回归和使用 DI 测试替身的 Host 桥接检查。Windows x64 默认使用包内 Python;其他平台需要 Python 3.10+,也可通过 `PYTHON` 指定解释器。执行 `npm pack` 可打包当前仓库自带的内核。
247
272
 
248
273
  本仓库由 0.5.0 发布包恢复。原先的回归测试集因之前的沙箱重置而丢失,发布包中也没有包含原来的 `test/kernel_regression.py` 和内核同步脚本。CHANGELOG 中的 31/31 是历史记录,当前仓库无法复现该回归集;冒烟测试不代表这 31 项回归已通过。
249
274
 
package/README_EN.md CHANGED
@@ -1,7 +1,28 @@
1
- # dsh-plugin-xujie-memory
1
+ # Xujie Memory 0.7.0 · DSH in-app memory workspace
2
2
 
3
3
  [简体中文](README.md) | English
4
4
 
5
+ **Acceptance candidate for DeepSeek Harness 0.2.1-rc.5; not yet verified in a real Windows DSH desktop.**
6
+
7
+ ## New in 0.7
8
+
9
+ - Native “记忆” page in DSH via the official `sidebar.panellist` and `main` slots; no separate website.
10
+ - A rotating 3D neuronal field with three visible memory layers, fuzzy recall, true person cards, and original-memory edit/forget actions. Decorative fibers are not stored memories or inferred semantic relationships; real evidence edges are distinguished in the legend.
11
+ - Browser management calls use generated Typert Remote contracts and require the authenticated DSH owner. No kernel token or direct kernel URL is exposed to the page.
12
+ - An edit atomically invalidates old evidence and creates a replacement trace, preserving original event time, importance and anchors. Save returns a new trace ID. Dependent facts/person cards and retrieval are recomputed. Conflicting versions are rejected.
13
+ - New `memory_edit` tool: search first to obtain `trace_id` and `content_hash`, then submit `expected_hash` with the correction.
14
+
15
+ ## Upgrade and data boundaries
16
+
17
+ Use the same profile and `dbPath` as 0.6. Before the first old-schema migration, the kernel creates a consistent private backup named `<dbPath>.pre-0.7.0.bak` without overwriting an existing backup. Previously erased residual summaries/projections are repaired once.
18
+
19
+ **The migration backup contains pre-upgrade data. Keep it private.** Forgetting is application-level removal, not secure disk erasure; it does not erase DSH chats, exports, old backups or historical disk/WAL contents.
20
+
21
+ The graph defaults to the latest 250 original traces plus selected derived nodes. Management search covers all active original traces in the selected memory scope; automatic conversational recall retains its latest-800-candidate limit. Derived facts, summaries and clarifications are read-only; follow their evidence to edit original wording. Person cards are derived from actual records, not independent editable profile fields.
22
+
23
+ Install the supplied local candidate archive/extracted folder with the same method and profile used for 0.6, then restart DSH. Registry and GitHub examples from older releases do not install this unpublished candidate. Preserve your data folder and follow `ACCEPTANCE.md` before relying on the upgrade.
24
+
25
+
5
26
  Seamless long-term memory built for DeepSeek Harness (DSH).
6
27
 
7
28
  **The value of memory is not having to think about it.** Xujie-Memory records relevant information locally, assembles memory context, and injects it into the prompt without asking the model to decide whether to call a memory tool. The Windows x64 package includes a runtime and generally requires no extra configuration after installation.
@@ -39,28 +60,29 @@ This compares common design approaches; individual tool-based systems can differ
39
60
 
40
61
  Importance scoring affects how slowly memories fade. Explicit requests such as “remember this” pin an anchor. Retrieval does not reset decay. The kernel also exposes `/memory/mark`, `/memory/curve`, and `/memory/search` endpoints.
41
62
 
42
- ## Active tools (new in 0.6)
63
+ ## Active tools (0.7)
43
64
 
44
- Injection is automatic, but **actively recalling** and **removing what was remembered wrong** need a hand. 0.6 registers three tools:
65
+ Injection is automatic, but **actively recalling** and **removing what was remembered wrong** need a hand. 0.7 registers four tools:
45
66
 
46
67
  | Tool | What it does | Side effect |
47
68
  |---|---|---|
48
- | `memory_search` | Literal/fuzzy search over stored wording; returns content, `trace_id`, weight | read-only |
69
+ | `memory_search` | Literal/fuzzy search over stored wording; returns content, `trace_id`, `content_hash`, weight | read-only |
70
+ | `memory_edit` | Atomic replacement using `trace_id`, content and `expected_hash` | write; new trace ID |
49
71
  | `memory_forget` | Deletes one memory (soft delete: content cleared, FTS row removed, dependent facts invalidated and recomputed) | write; `erased_at` kept for audit |
50
72
  | `memory_status` | Counts for stored/erased entries, states, anchors, open items, plus kernel health | read-only |
51
73
 
52
74
  When the user says “forget that”, the model can search for the `trace_id` itself and delete it — no manual database surgery. Kernel endpoints: `POST /memory/search`, `POST /memory/forget`, `POST /memory/stats`.
53
75
 
54
- Hosts without a `tools` service skip registration silently; injection keeps working. Editing memories and a graphical memory-management interface are not yet available.
76
+ Hosts without a `tools` service skip registration silently; injection keeps working. 0.7 includes the native graphical page and memory editing.
55
77
 
56
78
  The current sentence is no longer injected back as a past event (0.6 fix): `/turn` excludes it by `trace_id`, `/context` by content (whitespace and punctuation ignored). Ask about something else and older memories still appear.
57
79
 
58
80
  ## Installation
59
81
 
60
- The package targets the DSH 0.2 preview bundle mechanism and Node.js `^22.19 || >=24`. Windows x64 includes Python and the kernel; no separate Python installation or pip dependencies are needed. On macOS and Linux it falls back to system Python 3.10 or newer.
82
+ This candidate targets the DSH 0.2.1-rc.5 bundle/client mechanism and Node.js `^22.19 || >=24`. Windows x64 includes Python and the kernel; no separate Python installation or pip dependencies are needed. On macOS and Linux it falls back to system Python 3.10 or newer.
61
83
 
62
84
  ```bash
63
- dsh plugin --profile <your-profile> add <path-to-extracted-dsh-plugin-xujie-memory>
85
+ dsh plugin --profile <your-profile> add <extracted-package-folder-containing-package.json>
64
86
  ```
65
87
 
66
88
  Install by package name from npm:
@@ -72,6 +94,7 @@ dsh plugin --profile <your-profile> add dsh-plugin-xujie-memory
72
94
  Or install the tagged version directly from GitHub:
73
95
 
74
96
  ```bash
97
+ # Historical 0.6 command only; NOT this unpublished 0.7 candidate:
75
98
  dsh plugin --profile <your-profile> add github:Shoren-Syi/dsh-plugin-xujie-memory#v0.6.0
76
99
  ```
77
100
 
@@ -109,7 +132,7 @@ runtime/win32-x64/ Bundled Windows x64 Python runtime
109
132
  cordis.patch.yml DSH bundle patch
110
133
  ```
111
134
 
112
- The repository was reconstructed from the 0.5.0 package and updated for 0.6.0. Run `npm test` for the smoke, echo, tools, and deletion projection tests; run `npm pack` to package the bundled kernel. Windows x64 uses the bundled Python runtime; other platforms need Python 3.10 or newer. Set `PYTHON` to select an interpreter.
135
+ This upgrade is based on the supplied 0.6.0 archive. After installing development dependencies, run `npm run build` and `npm test`: the new suite exercises real temporary SQLite/HTTP and a Cordis DI test double. Browser QA uses a simulated main slot with the built client factory and real temporary kernel, not the real DSH desktop. Run `npm pack` to package built artifacts. Windows x64 uses the bundled Python runtime; other platforms need Python 3.10 or newer. Set `PYTHON` to select an interpreter.
113
136
 
114
- The original regression suite was lost when the previous sandbox was reset. The distribution did not include `test/kernel_regression.py` or the kernel synchronization script. The 31/31 result in the changelog is historical and cannot be reproduced from this repository; the smoke test does not replace that regression suite.
137
+ The supplied baseline did not contain its historical regression suite. The distribution did not include `test/kernel_regression.py` or the kernel synchronization script. The 31/31 result in the changelog is historical and cannot be reproduced from this repository; the smoke test does not replace that regression suite.
115
138