dsh-mnemon 0.1.3 → 0.1.5

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 (45) hide show
  1. package/README.md +102 -81
  2. package/README.zh-CN.md +187 -0
  3. package/SECURITY.md +2 -2
  4. package/cordis.patch.yml +3 -2
  5. package/docs/README.md +4 -4
  6. package/docs/en/README.md +5 -3
  7. package/docs/en/architecture.md +3 -1
  8. package/docs/en/configuration.md +28 -7
  9. package/docs/en/development.md +1 -1
  10. package/docs/en/getting-started.md +48 -4
  11. package/docs/en/operations.md +8 -1
  12. package/docs/en/project-overview.md +14 -2
  13. package/docs/en/storage-model.md +6 -0
  14. package/docs/en/ui-guide.md +1 -1
  15. package/docs/zh-CN/README.md +5 -3
  16. package/docs/zh-CN/architecture.md +3 -1
  17. package/docs/zh-CN/configuration.md +28 -7
  18. package/docs/zh-CN/development.md +1 -1
  19. package/docs/zh-CN/getting-started.md +48 -4
  20. package/docs/zh-CN/operations.md +8 -1
  21. package/docs/zh-CN/project-overview.md +14 -2
  22. package/docs/zh-CN/storage-model.md +6 -0
  23. package/docs/zh-CN/ui-guide.md +1 -1
  24. package/lib/client.js +269 -243
  25. package/lib/client.js.map +1 -1
  26. package/lib/index.js +74 -36
  27. package/lib/types/client/MnemonView.d.ts.map +1 -1
  28. package/lib/types/client/MnemonView.js +10 -1
  29. package/lib/types/client/MnemonView.js.map +1 -1
  30. package/lib/types/client/locales.d.ts +10 -0
  31. package/lib/types/client/locales.d.ts.map +1 -1
  32. package/lib/types/client/locales.js +12 -2
  33. package/lib/types/client/locales.js.map +1 -1
  34. package/lib/types/process.js +1 -1
  35. package/lib/types/process.js.map +1 -1
  36. package/lib/types/runner.d.ts +7 -1
  37. package/lib/types/runner.d.ts.map +1 -1
  38. package/lib/types/runner.js +65 -22
  39. package/lib/types/runner.js.map +1 -1
  40. package/lib/types/version-updates.d.ts +3 -0
  41. package/lib/types/version-updates.d.ts.map +1 -1
  42. package/lib/types/version-updates.js +12 -6
  43. package/lib/types/version-updates.js.map +1 -1
  44. package/package.json +20 -8
  45. package/README.en.md +0 -166
@@ -171,7 +171,7 @@ When the Web locale changes, the Chinese key set remains the type source of trut
171
171
  ```text
172
172
  [ ] pnpm run verify
173
173
  [ ] review source and generated lib diffs
174
- [ ] validate package file list includes README.en.md, docs/assets, and bilingual docs
174
+ [ ] validate package file list includes README.md, README.zh-CN.md, docs/assets, and bilingual docs
175
175
  [ ] install the built/local bundle into an isolated Web profile
176
176
  [ ] run real Mnemon CLI and WebUI smoke tests
177
177
  [ ] verify Chinese and English workspaces
@@ -14,7 +14,7 @@ You need:
14
14
 
15
15
  Regular semantic work prefers a provider named `spawn` with `outputSchema`, `toolFilter`, `persona`, and `depthLimit`. Optional score-based background review additionally requires a provider named `fork` with `inheritsParentContext=true`. Missing `fork` does not block deterministic pages or regular manual actions.
16
16
 
17
- The project does not declare a fixed minimum DSH / Mnemon matrix. This guide and its screenshots target dsh-mnemon v0.1.3. Back up and repeat this verification against an isolated root before upgrading.
17
+ The project does not declare a fixed minimum DSH / Mnemon matrix. This guide and its screenshots target dsh-mnemon v0.1.5. Back up and repeat this verification against an isolated root before upgrading.
18
18
 
19
19
  ## 2. Install Mnemon
20
20
 
@@ -24,7 +24,7 @@ Homebrew Cask is recommended on macOS:
24
24
  brew install --cask mnemon-dev/tap/mnemon
25
25
  ```
26
26
 
27
- On macOS or Linux, Go is another option:
27
+ Go works on macOS and Linux:
28
28
 
29
29
  ```sh
30
30
  go install github.com/mnemon-dev/mnemon@latest
@@ -36,7 +36,51 @@ Verify the binary:
36
36
  mnemon --version
37
37
  ```
38
38
 
39
- If DSH cannot find it on `PATH`, set `MNEMON_CLI_PATH` or configure an absolute `mnemon.cliPath`. `mnemon status` opens the effective Store and may initialize data or run upstream migrations, so it is not a side-effect-free installation probe.
39
+ On Windows, the official release provides ZIP archives for AMD64 and ARM64. The following PowerShell installs v0.2.3 under the auto-discovered per-user Programs directory and verifies it against the published checksum:
40
+
41
+ ```powershell
42
+ $version = '0.2.3'
43
+ $arch = if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq 'Arm64') { 'arm64' } else { 'amd64' }
44
+ $archiveName = "mnemon_${version}_windows_${arch}.zip"
45
+ $releaseBase = "https://github.com/mnemon-dev/mnemon/releases/download/v${version}"
46
+ $archive = Join-Path $env:TEMP $archiveName
47
+ $checksumFile = Join-Path $env:TEMP "mnemon_${version}_checksums.txt"
48
+ Invoke-WebRequest "${releaseBase}/${archiveName}" -OutFile $archive
49
+ Invoke-WebRequest "${releaseBase}/checksums.txt" -OutFile $checksumFile
50
+ $line = Get-Content $checksumFile | Where-Object { $_.EndsWith(" $archiveName") } | Select-Object -First 1
51
+ if (-not $line) { throw "Checksum entry not found for $archiveName" }
52
+ $expected = (($line -split '\s+')[0]).ToLowerInvariant()
53
+ $actual = (Get-FileHash -Path $archive -Algorithm SHA256).Hash.ToLowerInvariant()
54
+ if ($actual -ne $expected) { throw "Checksum mismatch for $archiveName" }
55
+ $installDir = Join-Path $env:LOCALAPPDATA 'Programs\mnemon'
56
+ New-Item -ItemType Directory -Force -Path $installDir | Out-Null
57
+ Expand-Archive -Path $archive -DestinationPath $installDir -Force
58
+ $mnemon = Join-Path $installDir 'mnemon.exe'
59
+ & $mnemon --version
60
+ ```
61
+
62
+ Go remains an alternative when a Go toolchain is already available:
63
+
64
+ ```powershell
65
+ go install github.com/mnemon-dev/mnemon@latest
66
+ $mnemonBin = go env GOBIN
67
+ if (-not $mnemonBin) {
68
+ $mnemonBin = Join-Path (((go env GOPATH) -split ';')[0]) 'bin'
69
+ }
70
+ $mnemon = Join-Path $mnemonBin 'mnemon.exe'
71
+ & $mnemon --version
72
+ ```
73
+
74
+ On Windows, dsh-mnemon discovers native `mnemon.exe` from `PATH`, an exported `GOBIN` or `GOPATH`, the default `%USERPROFILE%\go\bin`, `%LOCALAPPDATA%\Programs\mnemon`, and Program Files. `.cmd` and `.bat` wrappers are not accepted because CLI calls deliberately run without a shell.
75
+
76
+ If DSH still cannot find the binary, set `MNEMON_CLI_PATH` or add an absolute path to the user settings file instead of replacing the plugin's profile patch:
77
+
78
+ ```yaml
79
+ mnemon:
80
+ cliPath: 'C:\Users\alice\AppData\Local\Programs\mnemon\mnemon.exe'
81
+ ```
82
+
83
+ `mnemon status` opens the effective Store and may initialize data or run upstream migrations, so it is not a side-effect-free installation probe.
40
84
 
41
85
  ## 3. Install dsh-mnemon
42
86
 
@@ -103,7 +147,7 @@ Confirm that:
103
147
  - the storage root matches your chosen scope;
104
148
  - Runtime, Memory Spaces, and Documents report no errors.
105
149
 
106
- If Mnemon is unavailable, run `command -v mnemon` and `mnemon --version`. See [Troubleshooting](./operations.md#troubleshooting) for other symptoms.
150
+ If Mnemon is unavailable, run `command -v mnemon` and `mnemon --version` on macOS/Linux, or `Get-Command mnemon` and `Test-Path "$env:LOCALAPPDATA\Programs\mnemon\mnemon.exe"` on Windows PowerShell. See [Troubleshooting](./operations.md#troubleshooting) for other symptoms.
107
151
 
108
152
  ## 6. Complete first verification
109
153
 
@@ -11,6 +11,13 @@ command -v mnemon
11
11
  mnemon --version
12
12
  ```
13
13
 
14
+ Windows PowerShell:
15
+
16
+ ```powershell
17
+ Get-Command mnemon -ErrorAction SilentlyContinue
18
+ Test-Path "$env:LOCALAPPDATA\Programs\mnemon\mnemon.exe"
19
+ ```
20
+
14
21
  ```text
15
22
  /mnemon status
16
23
  ```
@@ -125,7 +132,7 @@ Report vulnerabilities privately through [SECURITY.md](../../SECURITY.md), not a
125
132
 
126
133
  | Symptom | Check and resolution |
127
134
  |---|---|
128
- | Mnemon unavailable | Run `command -v mnemon`, `mnemon --version`; set `MNEMON_CLI_PATH` or `cliPath`, then restart |
135
+ | Mnemon unavailable | macOS/Linux: run `command -v mnemon`, `mnemon --version`. Windows PowerShell: run `Get-Command mnemon`, `Test-Path "$env:LOCALAPPDATA\Programs\mnemon\mnemon.exe"`. Set `MNEMON_CLI_PATH` or `mnemon.cliPath`, then restart |
129
136
  | Memory System missing from sidebar | Check `tabEnabled=true`, `displayMode=sidebar`; Buildin is in the conversation area; for a local link run `pnpm run build`, then restart |
130
137
  | Status healthy but recall empty | Check active spaces, storage scope, inspected root, effective session root, and query focus |
131
138
  | Header reports misalignment | The workbench is inspecting another workspace; align or keep deliberate read-only inspection; Agent-backed actions are rejected |
@@ -1,8 +1,8 @@
1
- # Project Overview: Local Three-Tier Memory for DSH
1
+ # Project Overview: Local Three-Tier and Cross-Agent Memory for DSH
2
2
 
3
3
  [简体中文](../zh-CN/project-overview.md) | **English** | [Documentation hub](./README.md)
4
4
 
5
- `dsh-mnemon` integrates [Mnemon](https://github.com/mnemon-dev/mnemon) Memory Spaces with DeepSeek Harness, then adds Runtime hot memory, Project Documents, lifecycle routing, bounded subagents, a deterministic control layer, and native DSH interfaces.
5
+ `dsh-mnemon` integrates [Mnemon](https://github.com/mnemon-dev/mnemon) Memory Spaces with DeepSeek Harness, then adds Runtime hot memory, Project Documents, lifecycle routing, bounded subagents, a deterministic control layer, and native DSH interfaces. Because the durable tier uses native Mnemon Stores, DSH can reuse the same local long-term memory with other Mnemon-enabled agents.
6
6
 
7
7
  Its goal is not to store more text. It balances long-term continuity, current-fact priority, context cost, and recoverable writes.
8
8
 
@@ -50,6 +50,18 @@ Each Memory Space maps to an independent Mnemon Store and `mnemon.db`, with a st
50
50
 
51
51
  See [Storage and the three-tier model](./storage-model.md) for authoritative files, capacities, and directories.
52
52
 
53
+ ## Cross-agent sharing boundary
54
+
55
+ “Sharing” does not mean that dsh-mnemon broadcasts conversations or files to arbitrary agents. It means that multiple Mnemon-enabled agents use the same local Mnemon data:
56
+
57
+ 1. every participant installs and integrates Mnemon;
58
+ 2. every participant can access the same `storageRoot`;
59
+ 3. durable memories intended for sharing live in Mnemon Stores recognized by those participants.
60
+
61
+ Under those conditions, another Mnemon-enabled agent can recall durable facts, entities, and relations written through DSH, and DSH can discover compatible memories written in the other direction. This boundary covers Mnemon Memory Spaces only. `runtime/` and `documents/` are DSH layers managed by dsh-mnemon and do not automatically become another agent's context merely because the root is shared.
62
+
63
+ The default `global` root, `~/.mnemon`, is the simplest choice for several local agents. Use `custom` for an explicitly agreed shared root, or `workspace` to constrain sharing to one project. Concurrent processes rely on Mnemon and SQLite concurrency semantics; stop every user before offline copying, migration, or direct database changes.
64
+
53
65
  ## Architecture
54
66
 
55
67
  [![dsh-mnemon runtime architecture with DSH Web, Root Agent, supervised control, and three local tiers](../assets/diagrams/en/project-architecture.svg)](../assets/diagrams/en/project-architecture.svg)
@@ -164,6 +164,12 @@ mnemon.db independent data plane
164
164
  - Merge imports source content into the target through Mnemon; the source database remains in place, and by default only the source is marked inactive.
165
165
  - `forget` is a soft delete by exact ID, not deletion of a database file.
166
166
 
167
+ ### Cross-Agent Visibility
168
+
169
+ `mnemon.db` is Mnemon's native data plane, not a private dsh-mnemon format. Another Mnemon-enabled agent can access the same durable memory when it uses the same `storageRoot` and Store. dsh-mnemon also discovers compatible Stores already present on disk; DSH-specific names, descriptions, and activation state remain managed by `.dsh-memory-bodies.json`.
170
+
171
+ This sharing does not extend to `runtime/` or `documents/`. Even when those directories sit under the same root, another agent must implement their DSH-specific protocols to understand them. “Shared Mnemon memory” must not be presented as automatic sharing of the complete DSH context.
172
+
167
173
  ## Four Relationship Types
168
174
 
169
175
  The Mnemon long-term layer preserves `temporal`, `semantic`, `causal`, and `entity` relationships. The plugin does not require relationships to be created manually for every memory; they should be created only when they genuinely improve future recall. Overview can aggregate memories, entities, relationships, and space membership across multiple active Memory Spaces.
@@ -2,7 +2,7 @@
2
2
 
3
3
  [简体中文](../zh-CN/ui-guide.md) | **English** | [Documentation hub](./README.md)
4
4
 
5
- This guide follows the default `sidebar` presentation and a real user path through Memory System. Screenshots come from the v0.1.3 interface and use the Chinese locale; names, counts, and content vary with your data.
5
+ This guide follows the default `sidebar` presentation and a real user path through Memory System. Screenshots come from the v0.1.5 interface and use the Chinese locale; names, counts, and content vary with your data.
6
6
 
7
7
  ## Start with the two display modes
8
8
 
@@ -1,6 +1,6 @@
1
1
  # dsh-mnemon 文档中心
2
2
 
3
- **简体中文** | [English](../en/README.md) | [项目首页](../../README.md)
3
+ **简体中文** | [English](../en/README.md) | [项目首页](../../README.zh-CN.md)
4
4
 
5
5
  这里按“你现在要完成什么”组织文档。第一次使用从快速开始进入;需要理解页面时看 UI 指南;只有在部署、集成或开发时才需要进入参考文档。
6
6
 
@@ -8,13 +8,14 @@
8
8
 
9
9
  1. [快速开始](./getting-started.md):安装 Mnemon 与插件,选择存储范围,完成第一次验证。
10
10
  2. [Sidebar 与对话交互指南](./ui-guide.md):认识状态、运行时、记忆体、档案和对话内入口。
11
- 3. [项目介绍](./project-overview.md):理解三层模型、读写边界与完整流转。
11
+ 3. [项目介绍](./project-overview.md):理解三层模型、跨 Agent 共享边界、读写边界与完整流转。
12
12
 
13
13
  ## 按任务查找
14
14
 
15
15
  | 我想要…… | 文档 |
16
16
  |---|---|
17
17
  | 决定一条信息应放在哪一层 | [存储与三层记忆模型](./storage-model.md) |
18
+ | 让 DSH 与其他 Mnemon-enabled Agent 共享长期记忆 | [项目介绍:跨 Agent 共享边界](./project-overview.md#跨-agent-共享边界) · [配置参考:共享范围](./configuration.md#选择跨-agent-共享范围) |
18
19
  | 了解每轮注入、召回、沉淀和归档何时发生 | [生命周期与核心流程](./workflows.md) |
19
20
  | 切换 Sidebar / Buildin、全局 / 工作区 / 自定义目录 | [配置参考](./configuration.md) |
20
21
  | 理解工作区“查看目录”与 Agent“实际生效目录” | [UI 指南:工作区模式](./ui-guide.md#工作区模式查看与执行分离) |
@@ -34,13 +35,14 @@
34
35
  | 运行时记忆 | Runtime Memory | 每轮注入的 USER / MEMORY 热记忆 |
35
36
  | 档案 | Project Documents | 受管、可检索、保留完整 Markdown 叙事的项目知识 |
36
37
  | 记忆体 | Memory Space | 独立、可激活、按需召回的长期 Mnemon Store |
38
+ | 跨 Agent 共享 | Cross-agent memory sharing | 多个 Mnemon-enabled Agent 使用同一根和 Store,共享长期记忆而非完整 DSH 上下文 |
37
39
  | 沉淀 | Remember / Distill | 把候选交给受监督子 Agent 判断、查重与写入 |
38
40
  | 召回 | Recall | 从已激活记忆体按需取回有界证据 |
39
41
  | 归档 | Archive | 先建立冷引用,再把不常用档案迁出 active 层 |
40
42
 
41
43
  ## 文档边界
42
44
 
43
- - 用户文档以 v0.1.3 的 Sidebar 默认体验为主,同时说明 Buildin 兼容形态。
45
+ - 用户文档以 v0.1.5 的 Sidebar 默认体验为主,同时说明 Buildin 兼容形态。
44
46
  - 架构图表达稳定执行边界,不是实时监控面板;实时数量与版本以“状态”页为准。
45
47
  - RPC 是 Host 与插件客户端之间的内部协议,不承诺稳定外部 API。
46
48
  - 当前没有正式固定的 DSH / Mnemon 版本矩阵;升级前应备份并在隔离目录验证。
@@ -8,7 +8,7 @@
8
8
 
9
9
  - DSH 提供主 Agent、生命周期事件、subagent provider、工具、命令、设置和 Web 扩展点;
10
10
  - 插件提供三层知识控制面、路由策略、事务屏障和 UI;
11
- - 本地 `mnemon` CLI 提供命名 Store、SQLite 持久化、四类图、召回、关系和软删除。
11
+ - 本地 `mnemon` CLI 提供命名 Store、SQLite 持久化、四类图、召回、关系和软删除,并形成与其他 Mnemon-enabled Agent 共享长期记忆的数据边界。
12
12
 
13
13
  ## 组件图
14
14
 
@@ -16,6 +16,8 @@
16
16
 
17
17
  图中实线表示确定性数据或控制路径,紫色虚线表示 LLM 监督路径。Runtime Memory 和 Documents 直接使用受管文件;只有 Memory Spaces 通过 `MnemonRunner` 调用本地 Mnemon CLI。点击图片可以查看原始 SVG。
18
18
 
19
+ 因此跨 Agent 互操作只发生在图中的 Memory Spaces:共享的是 Mnemon Store 内的长期记忆与关系,不是 DSH 的会话上下文、Runtime 投影或 Documents 控制面。插件不会把数据主动推送到其他 Agent;参与方通过对齐本地 Mnemon 根和 Store 来共享。
20
+
19
21
  ## Host 组合根
20
22
 
21
23
  `src/index.ts::apply()` 按以下顺序组装插件:
@@ -66,7 +66,7 @@ MNEMON_DATA_DIR when non-empty
66
66
  otherwise ~/.mnemon
67
67
  ```
68
68
 
69
- 适合希望多个工作区共享 Runtime、Documents 和 Memory Spaces 的用户。
69
+ 适合希望多个工作区共享 Runtime、Documents 和 Memory Spaces 的用户;其他 Mnemon-enabled Agent 使用相同根时,也可以共享其中的 Mnemon Memory Spaces。
70
70
 
71
71
  ### `workspace`
72
72
 
@@ -87,19 +87,33 @@ mnemon:
87
87
 
88
88
  也允许 `~` 和 `~/...`。相对路径会被拒绝。
89
89
 
90
+ ### 选择跨 Agent 共享范围
91
+
92
+ | 目标 | 推荐范围 | 说明 |
93
+ |---|---|---|
94
+ | 本机多个 Agent 共享长期记忆 | `global` | 各方统一使用 `~/.mnemon` 或同一个 `MNEMON_DATA_DIR` |
95
+ | 多个 Agent 共享指定数据根 | `custom` | 各方显式配置同一个绝对目录,便于隔离和备份 |
96
+ | 只在一个项目内共享 | `workspace` | 各方都需要把 Mnemon 根对齐到该项目的 `<workspace>/.mnemon` |
97
+
98
+ 只有 `data/<store>/mnemon.db` 中的 Mnemon 长期层具备原生跨 Agent 互操作性。Runtime、Documents、DSH 的激活状态和 UI 元数据仍属于 dsh-mnemon 管理范围。
99
+
90
100
  ## CLI 发现优先级
91
101
 
92
102
  ```text
93
103
  config.cliPath
94
104
  -> executable MNEMON_CLI_PATH
95
105
  -> each PATH directory
96
- -> ~/.local/bin/mnemon
97
- -> /opt/homebrew/bin/mnemon
98
- -> /usr/local/bin/mnemon
99
- -> /usr/bin/mnemon
106
+ -> Windows: GOBIN/mnemon.exe
107
+ first GOPATH/bin/mnemon.exe, or ~/go/bin/mnemon.exe
108
+ %LOCALAPPDATA%/Programs/mnemon/mnemon.exe
109
+ %ProgramFiles%/mnemon/mnemon.exe
110
+ -> Unix: ~/.local/bin/mnemon
111
+ /opt/homebrew/bin/mnemon
112
+ /usr/local/bin/mnemon
113
+ /usr/bin/mnemon
100
114
  ```
101
115
 
102
- 显式 `cliPath` 会被采用;若它不可执行,实际调用会返回启动错误。
116
+ 显式 `cliPath` 会被采用;若它不可执行,实际调用会返回启动错误。Windows 自动发现只接受普通 `.exe` 文件;进程执行不使用 shell,因此有意排除 `.cmd` 与 `.bat` wrapper。
103
117
 
104
118
  ## 兼容 Store 提示优先级
105
119
 
@@ -178,7 +192,7 @@ routingGuidance=false
178
192
 
179
193
  ## Profile patch 覆盖
180
194
 
181
- 包内 `cordis.patch.yml` 提供默认 config 行。DSH profile 的同 ID 配置可能整体覆盖这行;自定义 patch 时应保留仍需启用的键,而不是假设深合并。
195
+ 包内 `cordis.patch.yml` 提供默认 config 行。DSH profile 的同 ID 配置可能整体覆盖这行。不要在 profile 的最终 patch 中只增加 `cliPath`;请改用 `MNEMON_CLI_PATH` 或用户设置 `mnemon.cliPath`。确因其他原因需要自定义 profile patch 时,应保留仍需启用的全部键,而不是假设深合并。
182
196
 
183
197
  ## 常见配置
184
198
 
@@ -189,6 +203,13 @@ mnemon:
189
203
  storageScope: workspace
190
204
  ```
191
205
 
206
+ 显式指定 Windows CLI 路径:
207
+
208
+ ```yaml
209
+ mnemon:
210
+ cliPath: 'C:\Users\alice\AppData\Local\Programs\mnemon\mnemon.exe'
211
+ ```
212
+
192
213
  自定义数据盘和较长 CLI 超时:
193
214
 
194
215
  ```yaml
@@ -171,7 +171,7 @@ Web locale 变更时,中文键集合仍是类型事实源;英文词典必须
171
171
  ```text
172
172
  [ ] pnpm run verify
173
173
  [ ] review source and generated lib diffs
174
- [ ] validate package file list includes README.en.md, docs/assets and bilingual docs
174
+ [ ] validate package file list includes README.md, README.zh-CN.md, docs/assets and bilingual docs
175
175
  [ ] install the built/local bundle into an isolated Web profile
176
176
  [ ] run real Mnemon CLI and WebUI smoke tests
177
177
  [ ] verify Chinese and English workspaces
@@ -14,7 +14,7 @@
14
14
 
15
15
  普通语义任务优先使用名为 `spawn` 的 Provider,并要求 `outputSchema`、`toolFilter`、`persona` 与 `depthLimit`。可选的评分后台审查还要求名为 `fork`、且 `inheritsParentContext=true` 的 Provider。缺少 `fork` 不影响确定性页面读取和普通手动操作。
16
16
 
17
- 项目当前不声明固定的 DSH / Mnemon 最低版本矩阵。本文与截图以 dsh-mnemon v0.1.3 为基线;升级前先备份,并在隔离目录重复本页验证。
17
+ 项目当前不声明固定的 DSH / Mnemon 最低版本矩阵。本文与截图以 dsh-mnemon v0.1.5 为基线;升级前先备份,并在隔离目录重复本页验证。
18
18
 
19
19
  ## 2. 安装 Mnemon
20
20
 
@@ -24,7 +24,7 @@ macOS 推荐 Homebrew Cask:
24
24
  brew install --cask mnemon-dev/tap/mnemon
25
25
  ```
26
26
 
27
- macOS 或 Linux 也可通过 Go 安装:
27
+ macOS 和 Linux 可通过 Go 安装:
28
28
 
29
29
  ```sh
30
30
  go install github.com/mnemon-dev/mnemon@latest
@@ -36,7 +36,51 @@ go install github.com/mnemon-dev/mnemon@latest
36
36
  mnemon --version
37
37
  ```
38
38
 
39
- 如果 DSH 无法从 `PATH` 找到它,可设置 `MNEMON_CLI_PATH`,或把绝对路径写入 `mnemon.cliPath`。`mnemon status` 会打开有效 Store,可能初始化数据或执行上游迁移,不要把它当作完全无副作用的安装探测。
39
+ Windows 官方发行包同时提供 AMD64 与 ARM64 ZIP。下面的 PowerShell 会把 v0.2.3 安装到可自动发现的用户 Programs 目录,并使用官方 checksum 校验下载内容:
40
+
41
+ ```powershell
42
+ $version = '0.2.3'
43
+ $arch = if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq 'Arm64') { 'arm64' } else { 'amd64' }
44
+ $archiveName = "mnemon_${version}_windows_${arch}.zip"
45
+ $releaseBase = "https://github.com/mnemon-dev/mnemon/releases/download/v${version}"
46
+ $archive = Join-Path $env:TEMP $archiveName
47
+ $checksumFile = Join-Path $env:TEMP "mnemon_${version}_checksums.txt"
48
+ Invoke-WebRequest "${releaseBase}/${archiveName}" -OutFile $archive
49
+ Invoke-WebRequest "${releaseBase}/checksums.txt" -OutFile $checksumFile
50
+ $line = Get-Content $checksumFile | Where-Object { $_.EndsWith(" $archiveName") } | Select-Object -First 1
51
+ if (-not $line) { throw "Checksum entry not found for $archiveName" }
52
+ $expected = (($line -split '\s+')[0]).ToLowerInvariant()
53
+ $actual = (Get-FileHash -Path $archive -Algorithm SHA256).Hash.ToLowerInvariant()
54
+ if ($actual -ne $expected) { throw "Checksum mismatch for $archiveName" }
55
+ $installDir = Join-Path $env:LOCALAPPDATA 'Programs\mnemon'
56
+ New-Item -ItemType Directory -Force -Path $installDir | Out-Null
57
+ Expand-Archive -Path $archive -DestinationPath $installDir -Force
58
+ $mnemon = Join-Path $installDir 'mnemon.exe'
59
+ & $mnemon --version
60
+ ```
61
+
62
+ 如果已经安装 Go 工具链,也可以继续使用 Go:
63
+
64
+ ```powershell
65
+ go install github.com/mnemon-dev/mnemon@latest
66
+ $mnemonBin = go env GOBIN
67
+ if (-not $mnemonBin) {
68
+ $mnemonBin = Join-Path (((go env GOPATH) -split ';')[0]) 'bin'
69
+ }
70
+ $mnemon = Join-Path $mnemonBin 'mnemon.exe'
71
+ & $mnemon --version
72
+ ```
73
+
74
+ Windows 上,dsh-mnemon 会从 `PATH`、导出的 `GOBIN` 或 `GOPATH`、默认 `%USERPROFILE%\go\bin`、`%LOCALAPPDATA%\Programs\mnemon` 和 Program Files 中发现原生 `mnemon.exe`。CLI 调用刻意禁用 shell,因此不接受 `.cmd` 与 `.bat` wrapper。
75
+
76
+ 如果 DSH 仍无法找到二进制,请设置 `MNEMON_CLI_PATH`,或在用户 settings 中写入绝对路径;不要为此整体替换插件的 profile patch:
77
+
78
+ ```yaml
79
+ mnemon:
80
+ cliPath: 'C:\Users\alice\AppData\Local\Programs\mnemon\mnemon.exe'
81
+ ```
82
+
83
+ `mnemon status` 会打开有效 Store,可能初始化数据或执行上游迁移,不要把它当作完全无副作用的安装探测。
40
84
 
41
85
  ## 3. 安装 dsh-mnemon
42
86
 
@@ -103,7 +147,7 @@ dsh plugin --profile web remove dsh-mnemon
103
147
  - 存储根与刚才选择的范围一致;
104
148
  - Runtime、Memory Spaces 和 Documents 没有错误提示。
105
149
 
106
- 如果 Mnemon 不可用,先运行 `command -v mnemon` 与 `mnemon --version`。更多症状见[故障排查](./operations.md#故障排查)。
150
+ 如果 Mnemon 不可用,macOS/Linux 先运行 `command -v mnemon` 与 `mnemon --version`;Windows PowerShell 运行 `Get-Command mnemon` 与 `Test-Path "$env:LOCALAPPDATA\Programs\mnemon\mnemon.exe"`。更多症状见[故障排查](./operations.md#故障排查)。
107
151
 
108
152
  ## 6. 完成第一次验证
109
153
 
@@ -11,6 +11,13 @@ command -v mnemon
11
11
  mnemon --version
12
12
  ```
13
13
 
14
+ Windows PowerShell:
15
+
16
+ ```powershell
17
+ Get-Command mnemon -ErrorAction SilentlyContinue
18
+ Test-Path "$env:LOCALAPPDATA\Programs\mnemon\mnemon.exe"
19
+ ```
20
+
14
21
  ```text
15
22
  /mnemon status
16
23
  ```
@@ -125,7 +132,7 @@ mnemon --version
125
132
 
126
133
  | 现象 | 检查与处理 |
127
134
  |---|---|
128
- | Mnemon 不可用 | 运行 `command -v mnemon`、`mnemon --version`;设置 `MNEMON_CLI_PATH` 或 `cliPath` 后重启 |
135
+ | Mnemon 不可用 | macOS/Linux 运行 `command -v mnemon`、`mnemon --version`;Windows PowerShell 运行 `Get-Command mnemon`、`Test-Path "$env:LOCALAPPDATA\Programs\mnemon\mnemon.exe"`。设置 `MNEMON_CLI_PATH` 或 `mnemon.cliPath` 后重启 |
129
136
  | 左侧栏没有“记忆系统” | 检查 `tabEnabled=true`、`displayMode=sidebar`;Buildin 位于对话区;本地 link 先 `pnpm run build` 再重启 profile |
130
137
  | 状态正常但召回为空 | 检查 active 记忆体、存储范围、查看目录、会话实际目录和查询是否足够聚焦 |
131
138
  | 顶部提示目录未对齐 | 工作台正在查看另一个工作区;点击一键对齐,或有意保留只读查看;Agent-backed 操作在未对齐时拒绝 |
@@ -1,8 +1,8 @@
1
- # 项目介绍:面向 DSH 的本地三层记忆系统
1
+ # 项目介绍:面向 DSH 的本地三层与跨 Agent 共享记忆系统
2
2
 
3
3
  **简体中文** | [English](../en/project-overview.md) | [文档中心](./README.md)
4
4
 
5
- `dsh-mnemon` 将 [Mnemon](https://github.com/mnemon-dev/mnemon) 的长期记忆体接入 DeepSeek Harness,并补充运行时热记忆、项目档案、生命周期路由、受限子 Agent、确定性控制层与 DSH 原生界面。
5
+ `dsh-mnemon` 将 [Mnemon](https://github.com/mnemon-dev/mnemon) 的长期记忆体接入 DeepSeek Harness,并补充运行时热记忆、项目档案、生命周期路由、受限子 Agent、确定性控制层与 DSH 原生界面。因为长期层使用 Mnemon 原生 Store,DSH 也获得了与其他 Mnemon-enabled Agent 复用同一套本地长期记忆的能力。
6
6
 
7
7
  它要解决的不是“保存更多文字”,而是让 Agent 在长期连续性、当前事实优先、上下文成本和可恢复写入之间取得平衡。
8
8
 
@@ -50,6 +50,18 @@
50
50
 
51
51
  三层的权威文件、容量与目录结构见[存储与三层记忆模型](./storage-model.md)。
52
52
 
53
+ ## 跨 Agent 共享边界
54
+
55
+ 这里的“共享”不是 dsh-mnemon 把对话或文件主动广播给任意 Agent,而是多个已接入 Mnemon 的 Agent 使用同一套本地 Mnemon 数据:
56
+
57
+ 1. 每个参与方都安装并接入 Mnemon;
58
+ 2. 每个参与方都能访问同一个 `storageRoot`;
59
+ 3. 需要共享的长期记忆位于各方共同识别的 Mnemon Store 中。
60
+
61
+ 满足这些条件后,在 DSH 中写入的长期事实、实体与关系可以由其他 Mnemon-enabled Agent 召回,反向写入也能被 DSH 发现。共享范围只覆盖 Mnemon Memory Spaces;`runtime/` 和 `documents/` 是 dsh-mnemon 管理的 DSH 层,不会仅因共用目录就自动成为其他 Agent 的上下文。
62
+
63
+ `global` 默认根 `~/.mnemon` 最适合本机多个 Agent 共享;`custom` 适合显式约定的公共根;`workspace` 则把共享限制在对应项目目录。多个进程同时访问时依赖 Mnemon / SQLite 的并发语义,离线复制、迁移或直接修改数据库前应先停止所有使用者。
64
+
53
65
  ## 总体架构
54
66
 
55
67
  [![dsh-mnemon 运行时架构:DSH Web、Root Agent、监督控制层与三层本地存储](../assets/diagrams/zh-CN/project-architecture.svg)](../assets/diagrams/zh-CN/project-architecture.svg)
@@ -164,6 +164,12 @@ mnemon.db 独立数据面
164
164
  - 合并通过 Mnemon import 把来源内容导入目标;来源数据库保留,默认只将来源设为未激活。
165
165
  - `forget` 是按精确 ID 的软删除,不等于删除数据库文件。
166
166
 
167
+ ### 跨 Agent 可见性
168
+
169
+ `mnemon.db` 是 Mnemon 原生数据面,不是 dsh-mnemon 私有格式。其他 Mnemon-enabled Agent 在使用同一个 `storageRoot` 和 Store 时,可以访问同一份长期记忆。dsh-mnemon 也会发现磁盘上兼容的 Store;其 DSH 专有名称、说明和激活状态仍由 `.dsh-memory-bodies.json` 管理。
170
+
171
+ 共享不延伸到 `runtime/` 或 `documents/`。即使它们位于同一个根,其他 Agent 也必须自行实现相应协议才能理解这些 DSH 管理层;不能把“共享 Mnemon 长期记忆”表述为自动共享完整 DSH 上下文。
172
+
167
173
  ## 四类关系
168
174
 
169
175
  Mnemon 长期层保留 `temporal`、`semantic`、`causal` 和 `entity` 关系。插件不会要求每条记忆都手工创建关系;关系应在确实能改善未来召回时建立。记忆体页可以聚合多个已激活记忆体的记忆、实体、关系和空间归属。
@@ -2,7 +2,7 @@
2
2
 
3
3
  **简体中文** | [English](../en/ui-guide.md) | [文档中心](./README.md)
4
4
 
5
- 本指南以默认的 `sidebar` 形态为主,按真实使用路径介绍记忆系统。截图来自 v0.1.3 实机界面;数量、名称和内容会随你的数据变化。
5
+ 本指南以默认的 `sidebar` 形态为主,按真实使用路径介绍记忆系统。截图来自 v0.1.5 实机界面;数量、名称和内容会随你的数据变化。
6
6
 
7
7
  ## 先认识两种展示形态
8
8