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
package/README.md CHANGED
@@ -1,166 +1,187 @@
1
1
  <h1 align="center">dsh-mnemon</h1>
2
2
 
3
- <p align="center"><strong>简体中文</strong> · <a href="./README.en.md">English</a></p>
3
+ <p align="center"><strong>English</strong> · <a href="./README.zh-CN.md">简体中文</a></p>
4
4
 
5
5
  <p align="center">
6
- <a href="./docs/zh-CN/ui-guide.md">
7
- <img src="./docs/assets/media/dsh-mnemon-memory-system-demo-poster.jpg" alt="dsh-mnemon Sidebar 记忆系统:记忆体目录与关系图" width="760">
6
+ <a href="./docs/en/ui-guide.md">
7
+ <img src="./docs/assets/media/dsh-mnemon-memory-system-demo-poster.jpg" alt="dsh-mnemon Sidebar Memory System with Memory Space catalog and relationship graph" width="760">
8
8
  </a>
9
9
  </p>
10
10
 
11
- <p align="center"><strong>让 DeepSeek Harness 拥有本地、分层、可监督的长期记忆。</strong></p>
11
+ <p align="center"><strong>Local, layered, supervised memory for DeepSeek Harness—with cross-agent sharing through Mnemon.</strong></p>
12
12
 
13
- `dsh-mnemon` 将 [Mnemon](https://github.com/mnemon-dev/mnemon) 接入 DeepSeek Harness(DSH),并把每轮需要的热记忆、需要完整阅读的项目档案和按需召回的长期记忆体组织在同一个工作台中。
13
+ `dsh-mnemon` integrates [Mnemon](https://github.com/mnemon-dev/mnemon) with DeepSeek Harness (DSH). It brings hot memory needed every turn, full project Documents, and on-demand long-term Memory Spaces into one workbench. Other agents can share DSH's long-term memory when they also integrate Mnemon and use the same accessible local Mnemon storage.
14
14
 
15
- - **本地优先**:记忆保存在本机 SQLite、JSON 与 Markdown 中,不依赖远程记忆服务。
16
- - **三层协作**:运行时记忆、项目档案、记忆体各自保存适合自己的信息粒度。
17
- - **受监督写入**:语义判断交给隔离的记忆子 Agent,路径、权限、容量、锁与 revision 由 Host 控制。
18
- - **DSH 原生体验**:默认 Sidebar 工作台、对话内回合记忆、存入记忆弹窗、双语界面与明暗主题。
15
+ - **Local first**: memory stays in local SQLite, JSON, and Markdown; no remote memory service is required.
16
+ - **Cross-agent sharing**: Mnemon-enabled agents can read and reuse DSH's Mnemon Memory Spaces.
17
+ - **Three cooperating tiers**: Runtime Memory, Project Documents, and Memory Spaces retain information at the right granularity.
18
+ - **Supervised writes**: isolated memory subagents make semantic decisions; the Host enforces paths, permissions, capacity, locks, and revisions.
19
+ - **Native DSH experience**: a Sidebar workbench by default, turn memory, a Save-to-memory dialog, bilingual copy, and global themes.
19
20
 
20
- 当前用户指令、仓库文件与实时工具结果始终高于历史记忆。
21
+ Current user instructions, repository files, and live tool results always take precedence over historical memory.
21
22
 
22
- ## 实机演示
23
+ ## Live demo
23
24
 
24
- ![dsh-mnemon Sidebar 记忆系统与对话内交互演示](./docs/assets/media/dsh-mnemon-memory-system-demo.gif)
25
+ ![dsh-mnemon Sidebar Memory System and in-conversation interaction demo](./docs/assets/media/dsh-mnemon-memory-system-demo.gif)
25
26
 
26
- 完整逐页说明见 [Sidebar 与对话交互指南](./docs/zh-CN/ui-guide.md)。
27
+ See the [Sidebar and conversation UI guide](./docs/en/ui-guide.md) for the complete visual walkthrough.
27
28
 
28
- ## 5 分钟开始使用
29
+ ## Start in five minutes
29
30
 
30
- ### 1. 安装 Mnemon
31
+ ### 1. Install Mnemon
31
32
 
32
33
  ```sh
33
34
  # macOS
34
35
  brew install --cask mnemon-dev/tap/mnemon
35
36
 
36
- # macOS / Linux,也可以通过 Go 安装
37
+ # macOS / Linux via Go
37
38
  go install github.com/mnemon-dev/mnemon@latest
38
39
 
39
40
  mnemon --version
40
41
  ```
41
42
 
42
- ### 2. 安装插件
43
+ On Windows, install the official v0.2.3-or-newer release ZIP. This path is auto-discovered without changing `PATH`; see [Getting Started](./docs/en/getting-started.md#2-install-mnemon) for checksum verification:
44
+
45
+ ```powershell
46
+ $version = '0.2.3'
47
+ $arch = if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq 'Arm64') { 'arm64' } else { 'amd64' }
48
+ $archiveName = "mnemon_${version}_windows_${arch}.zip"
49
+ $archive = Join-Path $env:TEMP $archiveName
50
+ Invoke-WebRequest "https://github.com/mnemon-dev/mnemon/releases/download/v${version}/${archiveName}" -OutFile $archive
51
+ $installDir = Join-Path $env:LOCALAPPDATA 'Programs\mnemon'
52
+ New-Item -ItemType Directory -Force -Path $installDir | Out-Null
53
+ Expand-Archive -Path $archive -DestinationPath $installDir -Force
54
+ & (Join-Path $installDir 'mnemon.exe') --version
55
+ ```
56
+
57
+ ### 2. Install the plugin
43
58
 
44
59
  ```sh
45
60
  dsh plugin --profile web add dsh-mnemon
46
61
  dsh --profile web
47
62
  ```
48
63
 
49
- 本地开发检出使用绝对路径:
64
+ Use an absolute path for a local development checkout:
50
65
 
51
66
  ```sh
52
67
  dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
53
68
  ```
54
69
 
55
- ### 3. 打开记忆系统
70
+ ### 3. Open Memory System
56
71
 
57
- 安装后默认使用 `sidebar`:点击 DSH 左侧栏的“记忆系统”即可进入。第一次使用建议按以下顺序:
72
+ New installations use `sidebar` by default. Click **Memory System** in the DSH sidebar, then follow this first-run path:
58
73
 
59
- 1. 在“状态”确认 Mnemon CLI、运行时、记忆体与档案均正常;
60
- 2. 在“记忆体 → 概览”创建一个边界明确的记忆体;
61
- 3. 用“沉淀记忆”提交一条稳定、未来仍有用的信息;
62
- 4. 在“检索”用一个聚焦问题验证召回;
63
- 5. 回到对话,展开回复下方的“本回合记忆”查看工具轨迹。
74
+ 1. Confirm the Mnemon CLI, Runtime, Memory Spaces, and Documents are healthy under **Status**.
75
+ 2. Create a narrowly scoped Memory Space under **Memory Spaces → Overview**.
76
+ 3. Submit one stable, future-useful item through **Remember**.
77
+ 4. Verify it with a focused question under **Recall**.
78
+ 5. Return to the conversation and expand **Turn memory** below the answer.
64
79
 
65
- 更完整的安装、Provider 要求与验证步骤见[快速开始](./docs/zh-CN/getting-started.md)。
80
+ See [Getting Started](./docs/en/getting-started.md) for provider requirements and complete verification.
66
81
 
67
- ## 一个工作台,三层记忆
82
+ ## One workbench, three memory tiers
68
83
 
69
- | 层级 | 适合保存 | 如何进入上下文 |
84
+ | Tier | Best for | How it reaches context |
70
85
  |---|---|---|
71
- | **运行时** | 用户偏好、协作要求、项目约定、环境事实 | `USER.md` / `MEMORY.md` 每轮紧凑注入 |
72
- | **档案** | 设计、调查、流程、复盘、交接材料 | 先确定性检索 active Documents,再按需阅读全文 |
73
- | **记忆体** | 跨会话事实、决策、实体与关系 | 只从已激活 Memory Spaces 按需召回有界证据 |
86
+ | **Runtime** | User preferences, collaboration rules, project conventions, environment facts | Compact `USER.md` / `MEMORY.md` projections on every turn |
87
+ | **Documents** | Designs, investigations, procedures, postmortems, and handoffs | Deterministic search of active Documents, then full text on demand |
88
+ | **Memory Spaces** | Cross-session facts, decisions, entities, and relations | Bounded evidence recalled on demand from active spaces only |
89
+
90
+ The tiers are not simple copies of the same content. Knowledge is routed by frequency, narrative length, and retrieval needs. See [Storage and the three-tier model](./docs/en/storage-model.md).
91
+
92
+ ### Share long-term memory with other agents
93
+
94
+ Cross-agent sharing applies to the **Memory Spaces** backed by Mnemon. Another Mnemon-enabled agent can recall from or contribute to the same durable facts, entities, and relations when it targets the same `storageRoot` and Store. DSH-managed Runtime Memory and Project Documents are not automatically exposed to other agents.
74
95
 
75
- 三层不是同一内容的简单复制:信息会按使用频率、叙事长度和召回方式进入最合适的层级。完整规则见[存储与三层记忆模型](./docs/zh-CN/storage-model.md)。
96
+ The default `global` scope uses `~/.mnemon`, making it the simplest shared memory root for local agents. `custom` and `workspace` roots can also be shared, but every participant must align its directory explicitly. A shared root is shared data: establish a trust boundary first, and avoid incompatible offline migration or directory operations while another process is using it.
76
97
 
77
- ## Sidebar 工作台
98
+ ## Sidebar workbench
78
99
 
79
- | 页面 | 主要用途 |
100
+ | Page | Main purpose |
80
101
  |---|---|
81
- | **状态** | 检查连接、存储根、三层数据摘要,以及 Mnemon / dsh-mnemon 版本 |
82
- | **运行时** | 查看 USER / MEMORY 容量,筛选、添加、编辑或移除热记忆 |
83
- | **记忆体** | 管理激活边界;在概览、检索、内容、实体之间切换;打开“沉淀记忆” |
84
- | **档案** | 搜索、阅读、新建、编辑与归档受管 Markdown 文档 |
102
+ | **Status** | Inspect connection, storage root, tier summaries, and Mnemon / dsh-mnemon versions |
103
+ | **Runtime** | Inspect USER / MEMORY capacity; filter, add, edit, or remove hot memory |
104
+ | **Memory Spaces** | Manage activation; switch among Overview, Recall, Content, and Entities; open Remember |
105
+ | **Documents** | Search, read, create, edit, and archive managed Markdown documents |
85
106
 
86
- 添加与编辑使用统一弹窗;危险操作需要二次确认;长列表采用筛选、计数与“加载更多”,档案正文使用独立阅读区域。
107
+ Add and edit use consistent dialogs, destructive actions require confirmation, long collections expose filters and progressive loading, and Documents use a dedicated reader.
87
108
 
88
- ### 对话内记忆
109
+ ### Memory inside conversations
89
110
 
90
- | 本回合记忆 | 存入记忆 |
111
+ | Turn memory | Save to memory |
91
112
  |---|---|
92
- | [![展开本回合记忆并查看工具入口](./docs/assets/screenshots/conversation-turn-memory.png)](./docs/assets/screenshots/conversation-turn-memory.png) | [![确认存入记忆弹窗](./docs/assets/screenshots/conversation-save-dialog.png)](./docs/assets/screenshots/conversation-save-dialog.png) |
113
+ | [![Expanded Turn memory with exact tool links](./docs/assets/screenshots/conversation-turn-memory.png)](./docs/assets/screenshots/conversation-turn-memory.png) | [![Confirm save to memory dialog](./docs/assets/screenshots/conversation-save-dialog.png)](./docs/assets/screenshots/conversation-save-dialog.png) |
93
114
 
94
- - **本回合记忆**汇总本轮的召回、沉淀与档案检索;展开后可以跳到对应页面。
95
- - **存入记忆**先加载可编辑候选,只有确认后才交给记忆子 Agent 判断、查重、提炼并写入。
115
+ - **Turn memory** summarizes recalls, writes, and Document searches for the turn; expand it to jump to the matching page.
116
+ - **Save to memory** loads an editable candidate. Only confirmation sends it to the memory subagent for qualification, deduplication, distillation, and writing.
96
117
 
97
- 这两个入口默认开启,可在“设置 → 记忆系统 → 对话界面”中分别关闭,保存后实时生效。
118
+ Both are on by default. Disable them independently under **Settings → Memory System → Conversation interface**; saved changes apply live.
98
119
 
99
- ## 展示与存储
120
+ ## Display and storage
100
121
 
101
- 配置位于 `$DSH_HOME/settings.yaml`(通常为 `~/.dsh/settings.yaml`):
122
+ Configuration lives in `$DSH_HOME/settings.yaml` (commonly `~/.dsh/settings.yaml`):
102
123
 
103
124
  ```yaml
104
125
  mnemon:
105
- displayMode: sidebar # sidebar | buildin;默认 sidebar
126
+ displayMode: sidebar # sidebar | buildin; sidebar by default
106
127
  storageScope: global # global | workspace | custom
107
128
  ```
108
129
 
109
- | 选择 | 行为 |
130
+ | Choice | Behavior |
110
131
  |---|---|
111
- | `sidebar` | 默认;左侧栏独立工作台,采用与 DSH 官方面板一致的极简外观 |
112
- | `buildin` | 保留原有对话区内嵌形态及其既有视觉 |
113
- | `global` | 多个工作区共享 `~/.mnemon`(或 `MNEMON_DATA_DIR`) |
114
- | `workspace` | 每个工作区使用自己的 `<workspace>/.mnemon`;工作台可查看其他工作区,Agent 仍跟随当前会话 |
115
- | `custom` | 使用 `dataDir` 指定的绝对路径或 `~/...` |
132
+ | `sidebar` | Default dedicated workbench aligned with official DSH panel styling |
133
+ | `buildin` | Preserves the original conversation-area presentation and visuals |
134
+ | `global` | Shares `~/.mnemon` (or `MNEMON_DATA_DIR`) across workspaces |
135
+ | `workspace` | Uses `<workspace>/.mnemon`; the workbench may inspect another workspace while the Agent still follows the current session |
136
+ | `custom` | Uses an absolute or `~/...` path supplied through `dataDir` |
116
137
 
117
- 设置保存后实时生效,无需手动刷新。切换存储范围不会自动迁移、合并或删除旧数据;工作区查看目标与会话实际目录不一致时,顶部会提示并提供一键对齐。
138
+ Saved settings apply live without a manual refresh. Changing scope never migrates, merges, or deletes old data. If the inspected workspace differs from the session's effective workspace, the header explains the mismatch and offers one-click alignment.
118
139
 
119
- ## 常用命令
140
+ ## Common commands
120
141
 
121
142
  ```text
122
143
  /mnemon status
123
- /mnemon recall <查询>
124
- /mnemon related <完整记忆 ID>
125
- /mnemon remember <稳定、自包含的长期洞察>
126
- /mnemon forget <完整记忆 ID>
144
+ /mnemon recall <query>
145
+ /mnemon related <full memory ID>
146
+ /mnemon remember <stable, self-contained durable insight>
147
+ /mnemon forget <full memory ID>
127
148
  ```
128
149
 
129
- 推荐查询顺序:运行时热记忆 → active Documents → 已激活记忆体 → 命中记录指向的归档原文。
150
+ Recommended lookup order: Runtime Memory → active Documents → active Memory Spaces → archived original referenced by a hit.
130
151
 
131
- ## 数据与安全边界
152
+ ## Data and security boundaries
132
153
 
133
- - 插件通过本地 `mnemon` CLI 访问长期记忆;WebUI 不直接读取 SQLite,也不直接启动进程。
134
- - CLI 使用参数数组且禁用 shell;输出、超时和取消均有边界。
135
- - 插件不保存 API key;子 Agent 推理复用 DSH 已配置的 Provider。
136
- - 当前没有确定性的秘密扫描器。不要把密钥、token、私钥或原始敏感日志写入任何记忆层。
137
- - 卸载插件不会删除 `~/.mnemon`、工作区 `.mnemon` 或自定义目录中的数据。
154
+ - The plugin reaches durable memory through the local `mnemon` CLI. The WebUI neither reads SQLite directly nor starts processes.
155
+ - CLI calls use argument arrays with shell disabled, bounded output, timeouts, and cancellation.
156
+ - The plugin stores no API keys. Subagent inference uses the provider already configured in DSH.
157
+ - There is no deterministic secret scanner yet. Never store keys, tokens, private keys, or raw sensitive logs in any tier.
158
+ - Uninstalling the plugin does not remove data under `~/.mnemon`, workspace `.mnemon` roots, or custom directories.
138
159
 
139
- 完整边界、备份恢复与故障排查见[运维指南](./docs/zh-CN/operations.md)。
160
+ See [Operations, security, and troubleshooting](./docs/en/operations.md) for complete boundaries, backup, recovery, and diagnostics.
140
161
 
141
- ## 文档
162
+ ## Documentation
142
163
 
143
- | 我想要…… | 从这里开始 |
164
+ | I want to… | Start here |
144
165
  |---|---|
145
- | 安装并完成第一次验证 | [快速开始](./docs/zh-CN/getting-started.md) |
146
- | 认识每个页面与对话内入口 | [Sidebar 与对话交互指南](./docs/zh-CN/ui-guide.md) |
147
- | 理解三层模型和完整流转 | [项目介绍](./docs/zh-CN/project-overview.md) · [生命周期与核心流程](./docs/zh-CN/workflows.md) |
148
- | 选择存储范围或高级开关 | [配置参考](./docs/zh-CN/configuration.md) |
149
- | 备份、更新或排查问题 | [运维、安全与故障排查](./docs/zh-CN/operations.md) |
150
- | 集成工具、命令或 RPC | [接口参考](./docs/zh-CN/interfaces.md) |
151
- | 开发、测试或发布 | [开发与验证](./docs/zh-CN/development.md) |
166
+ | Install and complete first-run verification | [Getting Started](./docs/en/getting-started.md) |
167
+ | Learn every page and conversation entry | [Sidebar and conversation UI guide](./docs/en/ui-guide.md) |
168
+ | Understand the three tiers and complete flow | [Project overview](./docs/en/project-overview.md) · [Lifecycle and workflows](./docs/en/workflows.md) |
169
+ | Choose storage scope or advanced switches | [Configuration reference](./docs/en/configuration.md) |
170
+ | Back up, update, or troubleshoot | [Operations, security, and troubleshooting](./docs/en/operations.md) |
171
+ | Integrate tools, commands, or RPC | [Interface reference](./docs/en/interfaces.md) |
172
+ | Develop, test, or publish | [Development and verification](./docs/en/development.md) |
152
173
 
153
- 完整目录见[文档中心](./docs/zh-CN/README.md)。
174
+ See the [documentation hub](./docs/en/README.md) for the full map.
154
175
 
155
- ## 开发
176
+ ## Development
156
177
 
157
178
  ```sh
158
179
  pnpm install
159
180
  pnpm run verify
160
181
  ```
161
182
 
162
- `verify` 依次运行 TypeScript 检查、Vitest 和生产构建。构建产物提交在 `lib/` 中。
183
+ `verify` runs TypeScript checks, Vitest, and the production build. Generated artifacts are committed under `lib/`.
163
184
 
164
185
  ## License
165
186
 
166
- MIT。安全问题请按 [SECURITY.md](./SECURITY.md) 私下报告,不要直接创建公开 issue。
187
+ MIT. Report security issues privately through [SECURITY.md](./SECURITY.md), not a public issue.
@@ -0,0 +1,187 @@
1
+ <h1 align="center">dsh-mnemon</h1>
2
+
3
+ <p align="center"><a href="./README.md">English</a> · <strong>简体中文</strong></p>
4
+
5
+ <p align="center">
6
+ <a href="./docs/zh-CN/ui-guide.md">
7
+ <img src="./docs/assets/media/dsh-mnemon-memory-system-demo-poster.jpg" alt="dsh-mnemon Sidebar 记忆系统:记忆体目录与关系图" width="760">
8
+ </a>
9
+ </p>
10
+
11
+ <p align="center"><strong>让 DeepSeek Harness 拥有可跨 Agent 共享的本地、分层、可监督长期记忆。</strong></p>
12
+
13
+ `dsh-mnemon` 将 [Mnemon](https://github.com/mnemon-dev/mnemon) 接入 DeepSeek Harness(DSH),并把每轮需要的热记忆、需要完整阅读的项目档案和按需召回的长期记忆体组织在同一个工作台中。其他 Agent 只要同样接入 Mnemon,并使用同一套可访问的本地 Mnemon 存储,就可以与 DSH 共享长期记忆。
14
+
15
+ - **本地优先**:记忆保存在本机 SQLite、JSON 与 Markdown 中,不依赖远程记忆服务。
16
+ - **跨 Agent 共享**:DSH 的 Mnemon 记忆体可以被其他支持 Mnemon 的 Agent 读取和复用。
17
+ - **三层协作**:运行时记忆、项目档案、记忆体各自保存适合自己的信息粒度。
18
+ - **受监督写入**:语义判断交给隔离的记忆子 Agent,路径、权限、容量、锁与 revision 由 Host 控制。
19
+ - **DSH 原生体验**:默认 Sidebar 工作台、对话内回合记忆、存入记忆弹窗、双语界面与明暗主题。
20
+
21
+ 当前用户指令、仓库文件与实时工具结果始终高于历史记忆。
22
+
23
+ ## 实机演示
24
+
25
+ ![dsh-mnemon Sidebar 记忆系统与对话内交互演示](./docs/assets/media/dsh-mnemon-memory-system-demo.gif)
26
+
27
+ 完整逐页说明见 [Sidebar 与对话交互指南](./docs/zh-CN/ui-guide.md)。
28
+
29
+ ## 5 分钟开始使用
30
+
31
+ ### 1. 安装 Mnemon
32
+
33
+ ```sh
34
+ # macOS
35
+ brew install --cask mnemon-dev/tap/mnemon
36
+
37
+ # macOS / Linux,也可以通过 Go 安装
38
+ go install github.com/mnemon-dev/mnemon@latest
39
+
40
+ mnemon --version
41
+ ```
42
+
43
+ Windows 推荐安装 v0.2.3 或更高版本的官方 ZIP;解压到以下目录后无需修改 `PATH` 即可自动发现。checksum 校验步骤见[入门指南](./docs/zh-CN/getting-started.md#2-安装-mnemon):
44
+
45
+ ```powershell
46
+ $version = '0.2.3'
47
+ $arch = if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq 'Arm64') { 'arm64' } else { 'amd64' }
48
+ $archiveName = "mnemon_${version}_windows_${arch}.zip"
49
+ $archive = Join-Path $env:TEMP $archiveName
50
+ Invoke-WebRequest "https://github.com/mnemon-dev/mnemon/releases/download/v${version}/${archiveName}" -OutFile $archive
51
+ $installDir = Join-Path $env:LOCALAPPDATA 'Programs\mnemon'
52
+ New-Item -ItemType Directory -Force -Path $installDir | Out-Null
53
+ Expand-Archive -Path $archive -DestinationPath $installDir -Force
54
+ & (Join-Path $installDir 'mnemon.exe') --version
55
+ ```
56
+
57
+ ### 2. 安装插件
58
+
59
+ ```sh
60
+ dsh plugin --profile web add dsh-mnemon
61
+ dsh --profile web
62
+ ```
63
+
64
+ 本地开发检出使用绝对路径:
65
+
66
+ ```sh
67
+ dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
68
+ ```
69
+
70
+ ### 3. 打开记忆系统
71
+
72
+ 安装后默认使用 `sidebar`:点击 DSH 左侧栏的“记忆系统”即可进入。第一次使用建议按以下顺序:
73
+
74
+ 1. 在“状态”确认 Mnemon CLI、运行时、记忆体与档案均正常;
75
+ 2. 在“记忆体 → 概览”创建一个边界明确的记忆体;
76
+ 3. 用“沉淀记忆”提交一条稳定、未来仍有用的信息;
77
+ 4. 在“检索”用一个聚焦问题验证召回;
78
+ 5. 回到对话,展开回复下方的“本回合记忆”查看工具轨迹。
79
+
80
+ 更完整的安装、Provider 要求与验证步骤见[快速开始](./docs/zh-CN/getting-started.md)。
81
+
82
+ ## 一个工作台,三层记忆
83
+
84
+ | 层级 | 适合保存 | 如何进入上下文 |
85
+ |---|---|---|
86
+ | **运行时** | 用户偏好、协作要求、项目约定、环境事实 | `USER.md` / `MEMORY.md` 每轮紧凑注入 |
87
+ | **档案** | 设计、调查、流程、复盘、交接材料 | 先确定性检索 active Documents,再按需阅读全文 |
88
+ | **记忆体** | 跨会话事实、决策、实体与关系 | 只从已激活 Memory Spaces 按需召回有界证据 |
89
+
90
+ 三层不是同一内容的简单复制:信息会按使用频率、叙事长度和召回方式进入最合适的层级。完整规则见[存储与三层记忆模型](./docs/zh-CN/storage-model.md)。
91
+
92
+ ### 与其他 Agent 共享长期记忆
93
+
94
+ 跨 Agent 共享发生在 Mnemon 提供的**记忆体**层。其他支持 Mnemon 的 Agent 指向相同的 `storageRoot` 和 Store 后,可以召回或继续沉淀同一批长期事实、实体与关系。DSH 专有的运行时记忆和项目档案不会因此自动暴露给其他 Agent。
95
+
96
+ 默认 `global` 模式使用 `~/.mnemon`,最适合作为本机 Agent 之间的共享记忆根;`custom` 和 `workspace` 也可以共享,但所有参与方必须显式对齐目录。共享同一目录意味着共享同一份数据,请先确认信任边界,并避免并发执行不兼容的离线迁移或目录操作。
97
+
98
+ ## Sidebar 工作台
99
+
100
+ | 页面 | 主要用途 |
101
+ |---|---|
102
+ | **状态** | 检查连接、存储根、三层数据摘要,以及 Mnemon / dsh-mnemon 版本 |
103
+ | **运行时** | 查看 USER / MEMORY 容量,筛选、添加、编辑或移除热记忆 |
104
+ | **记忆体** | 管理激活边界;在概览、检索、内容、实体之间切换;打开“沉淀记忆” |
105
+ | **档案** | 搜索、阅读、新建、编辑与归档受管 Markdown 文档 |
106
+
107
+ 添加与编辑使用统一弹窗;危险操作需要二次确认;长列表采用筛选、计数与“加载更多”,档案正文使用独立阅读区域。
108
+
109
+ ### 对话内记忆
110
+
111
+ | 本回合记忆 | 存入记忆 |
112
+ |---|---|
113
+ | [![展开本回合记忆并查看工具入口](./docs/assets/screenshots/conversation-turn-memory.png)](./docs/assets/screenshots/conversation-turn-memory.png) | [![确认存入记忆弹窗](./docs/assets/screenshots/conversation-save-dialog.png)](./docs/assets/screenshots/conversation-save-dialog.png) |
114
+
115
+ - **本回合记忆**汇总本轮的召回、沉淀与档案检索;展开后可以跳到对应页面。
116
+ - **存入记忆**先加载可编辑候选,只有确认后才交给记忆子 Agent 判断、查重、提炼并写入。
117
+
118
+ 这两个入口默认开启,可在“设置 → 记忆系统 → 对话界面”中分别关闭,保存后实时生效。
119
+
120
+ ## 展示与存储
121
+
122
+ 配置位于 `$DSH_HOME/settings.yaml`(通常为 `~/.dsh/settings.yaml`):
123
+
124
+ ```yaml
125
+ mnemon:
126
+ displayMode: sidebar # sidebar | buildin;默认 sidebar
127
+ storageScope: global # global | workspace | custom
128
+ ```
129
+
130
+ | 选择 | 行为 |
131
+ |---|---|
132
+ | `sidebar` | 默认;左侧栏独立工作台,采用与 DSH 官方面板一致的极简外观 |
133
+ | `buildin` | 保留原有对话区内嵌形态及其既有视觉 |
134
+ | `global` | 多个工作区共享 `~/.mnemon`(或 `MNEMON_DATA_DIR`) |
135
+ | `workspace` | 每个工作区使用自己的 `<workspace>/.mnemon`;工作台可查看其他工作区,Agent 仍跟随当前会话 |
136
+ | `custom` | 使用 `dataDir` 指定的绝对路径或 `~/...` |
137
+
138
+ 设置保存后实时生效,无需手动刷新。切换存储范围不会自动迁移、合并或删除旧数据;工作区查看目标与会话实际目录不一致时,顶部会提示并提供一键对齐。
139
+
140
+ ## 常用命令
141
+
142
+ ```text
143
+ /mnemon status
144
+ /mnemon recall <查询>
145
+ /mnemon related <完整记忆 ID>
146
+ /mnemon remember <稳定、自包含的长期洞察>
147
+ /mnemon forget <完整记忆 ID>
148
+ ```
149
+
150
+ 推荐查询顺序:运行时热记忆 → active Documents → 已激活记忆体 → 命中记录指向的归档原文。
151
+
152
+ ## 数据与安全边界
153
+
154
+ - 插件通过本地 `mnemon` CLI 访问长期记忆;WebUI 不直接读取 SQLite,也不直接启动进程。
155
+ - CLI 使用参数数组且禁用 shell;输出、超时和取消均有边界。
156
+ - 插件不保存 API key;子 Agent 推理复用 DSH 已配置的 Provider。
157
+ - 当前没有确定性的秘密扫描器。不要把密钥、token、私钥或原始敏感日志写入任何记忆层。
158
+ - 卸载插件不会删除 `~/.mnemon`、工作区 `.mnemon` 或自定义目录中的数据。
159
+
160
+ 完整边界、备份恢复与故障排查见[运维指南](./docs/zh-CN/operations.md)。
161
+
162
+ ## 文档
163
+
164
+ | 我想要…… | 从这里开始 |
165
+ |---|---|
166
+ | 安装并完成第一次验证 | [快速开始](./docs/zh-CN/getting-started.md) |
167
+ | 认识每个页面与对话内入口 | [Sidebar 与对话交互指南](./docs/zh-CN/ui-guide.md) |
168
+ | 理解三层模型和完整流转 | [项目介绍](./docs/zh-CN/project-overview.md) · [生命周期与核心流程](./docs/zh-CN/workflows.md) |
169
+ | 选择存储范围或高级开关 | [配置参考](./docs/zh-CN/configuration.md) |
170
+ | 备份、更新或排查问题 | [运维、安全与故障排查](./docs/zh-CN/operations.md) |
171
+ | 集成工具、命令或 RPC | [接口参考](./docs/zh-CN/interfaces.md) |
172
+ | 开发、测试或发布 | [开发与验证](./docs/zh-CN/development.md) |
173
+
174
+ 完整目录见[文档中心](./docs/zh-CN/README.md)。
175
+
176
+ ## 开发
177
+
178
+ ```sh
179
+ pnpm install
180
+ pnpm run verify
181
+ ```
182
+
183
+ `verify` 依次运行 TypeScript 检查、Vitest 和生产构建。构建产物提交在 `lib/` 中。
184
+
185
+ ## License
186
+
187
+ MIT。安全问题请按 [SECURITY.md](./SECURITY.md) 私下报告,不要直接创建公开 issue。
package/SECURITY.md CHANGED
@@ -8,7 +8,7 @@
8
8
  |---|---|
9
9
  | 0.1.x (npm `dsh-mnemon`) | ✅ |
10
10
 
11
- Only the latest published version receives security fixes. The plugin targets the DSH mainline snapshot it was verified against; see the compatibility baseline in [README.en.md](./README.en.md).
11
+ Only the latest published version receives security fixes. The plugin targets the DSH mainline snapshot it was verified against; see the compatibility baseline in [README.md](./README.md).
12
12
 
13
13
  ## Reporting a vulnerability
14
14
 
@@ -61,7 +61,7 @@ Out of scope:
61
61
  |---|---|
62
62
  | 0.1.x(npm `dsh-mnemon`) | ✅ |
63
63
 
64
- 仅最新发布版本获得安全修复。插件以验证时的 DSH mainline 快照为兼容基线,见 [README.md](./README.md)。
64
+ 仅最新发布版本获得安全修复。插件以验证时的 DSH mainline 快照为兼容基线,见 [README.zh-CN.md](./README.zh-CN.md)。
65
65
 
66
66
  ### 报告漏洞
67
67
 
package/cordis.patch.yml CHANGED
@@ -1,5 +1,6 @@
1
- # Mount the Mnemon bridge into a DSH profile. The profile's own final patch
2
- # may replace this config row to select an explicit binary or data directory.
1
+ # Mount the Mnemon bridge into a DSH profile. A profile's final patch may
2
+ # replace this config row as a whole; use user settings or environment
3
+ # variables for one-field overrides such as cliPath.
3
4
  - insert:
4
5
  - id: mnemon
5
6
  name: dsh-mnemon
package/docs/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # dsh-mnemon 文档 / Documentation
1
+ # dsh-mnemon Documentation / 文档
2
2
 
3
- - [简体中文](./zh-CN/README.md)
4
3
  - [English](./en/README.md)
5
-
6
- 根目录 README 只保留项目概览和快速开始;架构、数据模型、生命周期、接口、运维和开发细节在此维护。
4
+ - [简体中文](./zh-CN/README.md)
7
5
 
8
6
  The root README stays focused on orientation and quick start. Architecture, data model, lifecycle, interfaces, operations, and development details live here.
7
+
8
+ 根目录 README 只保留项目概览和快速开始;架构、数据模型、生命周期、接口、运维和开发细节在此维护。
package/docs/en/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # dsh-mnemon Documentation
2
2
 
3
- [简体中文](../zh-CN/README.md) | **English** | [Project home](../../README.en.md)
3
+ [简体中文](../zh-CN/README.md) | **English** | [Project home](../../README.md)
4
4
 
5
5
  This hub is organized by what you need to accomplish. New users should follow Getting Started, then use the visual guide for the interface. Reference documents are for deployment, integration, and development work.
6
6
 
@@ -8,13 +8,14 @@ This hub is organized by what you need to accomplish. New users should follow Ge
8
8
 
9
9
  1. [Getting Started](./getting-started.md): install Mnemon and the plugin, choose storage, and complete first-run verification.
10
10
  2. [Sidebar and conversation UI guide](./ui-guide.md): learn Status, Runtime, Memory Spaces, Documents, and in-conversation entry points.
11
- 3. [Project overview](./project-overview.md): understand the three-tier model, read/write boundaries, and complete flow.
11
+ 3. [Project overview](./project-overview.md): understand the three-tier model, cross-agent sharing boundary, read/write boundaries, and complete flow.
12
12
 
13
13
  ## Find a task
14
14
 
15
15
  | I want to… | Document |
16
16
  |---|---|
17
17
  | Decide which tier should retain something | [Storage and the three-tier model](./storage-model.md) |
18
+ | Share durable memory between DSH and other Mnemon-enabled agents | [Project overview: Cross-agent sharing](./project-overview.md#cross-agent-sharing-boundary) · [Configuration: Sharing scope](./configuration.md#choose-a-cross-agent-sharing-scope) |
18
19
  | Learn when injection, recall, remembering, and archiving happen | [Lifecycle and workflows](./workflows.md) |
19
20
  | Switch Sidebar / Buildin or global / workspace / custom storage | [Configuration reference](./configuration.md) |
20
21
  | Understand workspace inspection versus the Agent's effective directory | [UI guide: Workspace mode](./ui-guide.md#workspace-mode-separating-inspection-from-execution) |
@@ -34,13 +35,14 @@ This hub is organized by what you need to accomplish. New users should follow Ge
34
35
  | Runtime Memory | USER / MEMORY | Hot memory projected into every turn |
35
36
  | Project Documents | Documents / 档案 | Managed, searchable project knowledge that keeps full Markdown structure |
36
37
  | Memory Space | 记忆体 | An independent, activatable, on-demand Mnemon Store |
38
+ | Cross-agent memory sharing | 跨 Agent 共享 | Mnemon-enabled agents use the same root and Store to share durable memory, not the complete DSH context |
37
39
  | Remember | Distill / 沉淀 | Submit a candidate to a supervised subagent for qualification, dedupe, and writing |
38
40
  | Recall | 召回 | Retrieve bounded evidence from active Memory Spaces |
39
41
  | Archive | 归档 | Create a cold reference before moving an infrequently used Document out of active storage |
40
42
 
41
43
  ## Documentation boundaries
42
44
 
43
- - User documentation targets the v0.1.3 Sidebar-default experience while covering the compatible Buildin presentation.
45
+ - User documentation targets the v0.1.5 Sidebar-default experience while covering the compatible Buildin presentation.
44
46
  - Architecture diagrams describe stable execution boundaries, not live monitoring. Use Status for current counts and versions.
45
47
  - RPC is an internal Host-to-client protocol, not a promised stable external API.
46
48
  - There is no formal fixed DSH / Mnemon version matrix yet. Back up and validate in an isolated root before upgrading.
@@ -8,7 +8,7 @@
8
8
 
9
9
  - DSH provides the root Agent, lifecycle events, subagent providers, tools, commands, settings, and Web extension points;
10
10
  - the plugin provides the control plane for three knowledge layers, routing policies, transactional barriers, and UI;
11
- - the local `mnemon` CLI provides named Stores, SQLite persistence, four graph types, recall, relationships, and soft deletion.
11
+ - the local `mnemon` CLI provides named Stores, SQLite persistence, four graph types, recall, relationships, and soft deletion, and defines the durable-data boundary shared with other Mnemon-enabled agents.
12
12
 
13
13
  ## Component Diagram
14
14
 
@@ -16,6 +16,8 @@
16
16
 
17
17
  Solid lines show deterministic data or control paths; purple dashed lines show LLM-supervised paths. Runtime Memory and Documents use managed files directly. Only Memory Spaces call the local Mnemon CLI through `MnemonRunner`. Click the image to open the original SVG.
18
18
 
19
+ Cross-agent interoperability therefore applies only to Memory Spaces in the diagram: agents share durable memories and relations inside Mnemon Stores, not DSH conversation context, Runtime projections, or the Documents control plane. The plugin never pushes data to another agent; participants share by aligning their local Mnemon root and Store.
20
+
19
21
  ## Host Composition Root
20
22
 
21
23
  `src/index.ts::apply()` assembles the plugin in this order:
@@ -66,7 +66,7 @@ MNEMON_DATA_DIR when non-empty
66
66
  otherwise ~/.mnemon
67
67
  ```
68
68
 
69
- Suitable for users who want Runtime, Documents, and Memory Spaces shared across multiple workspaces.
69
+ Suitable for users who want Runtime, Documents, and Memory Spaces shared across multiple workspaces. Other Mnemon-enabled agents can also share the Mnemon Memory Spaces when they use the same root.
70
70
 
71
71
  ### `workspace`
72
72
 
@@ -87,19 +87,33 @@ mnemon:
87
87
 
88
88
  `~` and `~/...` are also allowed. Relative paths are rejected.
89
89
 
90
+ ### Choose a Cross-Agent Sharing Scope
91
+
92
+ | Goal | Recommended scope | Notes |
93
+ |---|---|---|
94
+ | Share durable memory among local agents | `global` | Every participant uses `~/.mnemon` or the same `MNEMON_DATA_DIR` |
95
+ | Share one explicit data root | `custom` | Every participant configures the same absolute directory for isolation and backup |
96
+ | Share only inside one project | `workspace` | Every participant aligns its Mnemon root to that project's `<workspace>/.mnemon` |
97
+
98
+ Only the Mnemon durable tier under `data/<store>/mnemon.db` has native cross-agent interoperability. Runtime, Documents, DSH activation state, and UI metadata remain managed by dsh-mnemon.
99
+
90
100
  ## CLI Discovery Precedence
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
- An explicit `cliPath` is accepted as configured; if it is not executable, actual calls return a launch error.
116
+ An explicit `cliPath` is accepted as configured; if it is not executable, actual calls return a launch error. Automatically discovered Windows commands must be regular `.exe` files. `.cmd` and `.bat` wrappers are intentionally excluded because process execution does not use a shell.
103
117
 
104
118
  ## Compatibility Store Hint Precedence
105
119
 
@@ -178,7 +192,7 @@ routingGuidance=false
178
192
 
179
193
  ## Profile Patch Overrides
180
194
 
181
- The bundled `cordis.patch.yml` provides the default config row. A DSH profile configuration with the same ID may replace that row as a whole. When customizing a patch, retain every key that must remain enabled instead of assuming a deep merge.
195
+ The bundled `cordis.patch.yml` provides the default config row. A DSH profile configuration with the same ID may replace that row as a whole. Do not add only `cliPath` to a final profile patch: use `MNEMON_CLI_PATH` or the `mnemon.cliPath` user setting instead. When a profile patch must be customized for another reason, retain every key that must remain enabled instead of assuming a deep merge.
182
196
 
183
197
  ## Common Configurations
184
198
 
@@ -189,6 +203,13 @@ mnemon:
189
203
  storageScope: workspace
190
204
  ```
191
205
 
206
+ An explicit Windows CLI path:
207
+
208
+ ```yaml
209
+ mnemon:
210
+ cliPath: 'C:\Users\alice\AppData\Local\Programs\mnemon\mnemon.exe'
211
+ ```
212
+
192
213
  A custom data volume and a longer CLI timeout:
193
214
 
194
215
  ```yaml