dsh-mnemon 0.1.3 → 0.1.4
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 +88 -81
- package/README.zh-CN.md +173 -0
- package/SECURITY.md +2 -2
- package/docs/README.md +4 -4
- package/docs/en/README.md +5 -3
- package/docs/en/architecture.md +3 -1
- package/docs/en/configuration.md +11 -1
- package/docs/en/development.md +1 -1
- package/docs/en/getting-started.md +1 -1
- package/docs/en/project-overview.md +14 -2
- package/docs/en/storage-model.md +6 -0
- package/docs/en/ui-guide.md +1 -1
- package/docs/zh-CN/README.md +5 -3
- package/docs/zh-CN/architecture.md +3 -1
- package/docs/zh-CN/configuration.md +11 -1
- package/docs/zh-CN/development.md +1 -1
- package/docs/zh-CN/getting-started.md +1 -1
- package/docs/zh-CN/project-overview.md +14 -2
- package/docs/zh-CN/storage-model.md +6 -0
- package/docs/zh-CN/ui-guide.md +1 -1
- package/lib/client.js +245 -245
- package/package.json +20 -8
- package/README.en.md +0 -166
package/README.md
CHANGED
|
@@ -1,166 +1,173 @@
|
|
|
1
1
|
<h1 align="center">dsh-mnemon</h1>
|
|
2
2
|
|
|
3
|
-
<p align="center"><strong
|
|
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/
|
|
7
|
-
<img src="./docs/assets/media/dsh-mnemon-memory-system-demo-poster.jpg" alt="dsh-mnemon Sidebar
|
|
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
|
|
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`
|
|
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
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- **
|
|
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
|
-

|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
See the [Sidebar and conversation UI guide](./docs/en/ui-guide.md) for the complete visual walkthrough.
|
|
27
28
|
|
|
28
|
-
##
|
|
29
|
+
## Start in five minutes
|
|
29
30
|
|
|
30
|
-
### 1.
|
|
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
|
|
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
|
+
### 2. Install the plugin
|
|
43
44
|
|
|
44
45
|
```sh
|
|
45
46
|
dsh plugin --profile web add dsh-mnemon
|
|
46
47
|
dsh --profile web
|
|
47
48
|
```
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
Use an absolute path for a local development checkout:
|
|
50
51
|
|
|
51
52
|
```sh
|
|
52
53
|
dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
|
|
53
54
|
```
|
|
54
55
|
|
|
55
|
-
### 3.
|
|
56
|
+
### 3. Open Memory System
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
New installations use `sidebar` by default. Click **Memory System** in the DSH sidebar, then follow this first-run path:
|
|
58
59
|
|
|
59
|
-
1.
|
|
60
|
-
2.
|
|
61
|
-
3.
|
|
62
|
-
4.
|
|
63
|
-
5.
|
|
60
|
+
1. Confirm the Mnemon CLI, Runtime, Memory Spaces, and Documents are healthy under **Status**.
|
|
61
|
+
2. Create a narrowly scoped Memory Space under **Memory Spaces → Overview**.
|
|
62
|
+
3. Submit one stable, future-useful item through **Remember**.
|
|
63
|
+
4. Verify it with a focused question under **Recall**.
|
|
64
|
+
5. Return to the conversation and expand **Turn memory** below the answer.
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
See [Getting Started](./docs/en/getting-started.md) for provider requirements and complete verification.
|
|
66
67
|
|
|
67
|
-
##
|
|
68
|
+
## One workbench, three memory tiers
|
|
68
69
|
|
|
69
|
-
|
|
|
70
|
+
| Tier | Best for | How it reaches context |
|
|
70
71
|
|---|---|---|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
72
|
+
| **Runtime** | User preferences, collaboration rules, project conventions, environment facts | Compact `USER.md` / `MEMORY.md` projections on every turn |
|
|
73
|
+
| **Documents** | Designs, investigations, procedures, postmortems, and handoffs | Deterministic search of active Documents, then full text on demand |
|
|
74
|
+
| **Memory Spaces** | Cross-session facts, decisions, entities, and relations | Bounded evidence recalled on demand from active spaces only |
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
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).
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
### Share long-term memory with other agents
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
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.
|
|
81
|
+
|
|
82
|
+
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.
|
|
83
|
+
|
|
84
|
+
## Sidebar workbench
|
|
85
|
+
|
|
86
|
+
| Page | Main purpose |
|
|
80
87
|
|---|---|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
88
|
+
| **Status** | Inspect connection, storage root, tier summaries, and Mnemon / dsh-mnemon versions |
|
|
89
|
+
| **Runtime** | Inspect USER / MEMORY capacity; filter, add, edit, or remove hot memory |
|
|
90
|
+
| **Memory Spaces** | Manage activation; switch among Overview, Recall, Content, and Entities; open Remember |
|
|
91
|
+
| **Documents** | Search, read, create, edit, and archive managed Markdown documents |
|
|
85
92
|
|
|
86
|
-
|
|
93
|
+
Add and edit use consistent dialogs, destructive actions require confirmation, long collections expose filters and progressive loading, and Documents use a dedicated reader.
|
|
87
94
|
|
|
88
|
-
###
|
|
95
|
+
### Memory inside conversations
|
|
89
96
|
|
|
90
|
-
|
|
|
97
|
+
| Turn memory | Save to memory |
|
|
91
98
|
|---|---|
|
|
92
|
-
| [](./docs/assets/screenshots/conversation-turn-memory.png) | [](./docs/assets/screenshots/conversation-save-dialog.png) |
|
|
93
100
|
|
|
94
|
-
-
|
|
95
|
-
-
|
|
101
|
+
- **Turn memory** summarizes recalls, writes, and Document searches for the turn; expand it to jump to the matching page.
|
|
102
|
+
- **Save to memory** loads an editable candidate. Only confirmation sends it to the memory subagent for qualification, deduplication, distillation, and writing.
|
|
96
103
|
|
|
97
|
-
|
|
104
|
+
Both are on by default. Disable them independently under **Settings → Memory System → Conversation interface**; saved changes apply live.
|
|
98
105
|
|
|
99
|
-
##
|
|
106
|
+
## Display and storage
|
|
100
107
|
|
|
101
|
-
|
|
108
|
+
Configuration lives in `$DSH_HOME/settings.yaml` (commonly `~/.dsh/settings.yaml`):
|
|
102
109
|
|
|
103
110
|
```yaml
|
|
104
111
|
mnemon:
|
|
105
|
-
displayMode: sidebar # sidebar | buildin
|
|
112
|
+
displayMode: sidebar # sidebar | buildin; sidebar by default
|
|
106
113
|
storageScope: global # global | workspace | custom
|
|
107
114
|
```
|
|
108
115
|
|
|
109
|
-
|
|
|
116
|
+
| Choice | Behavior |
|
|
110
117
|
|---|---|
|
|
111
|
-
| `sidebar` |
|
|
112
|
-
| `buildin` |
|
|
113
|
-
| `global` |
|
|
114
|
-
| `workspace` |
|
|
115
|
-
| `custom` |
|
|
118
|
+
| `sidebar` | Default dedicated workbench aligned with official DSH panel styling |
|
|
119
|
+
| `buildin` | Preserves the original conversation-area presentation and visuals |
|
|
120
|
+
| `global` | Shares `~/.mnemon` (or `MNEMON_DATA_DIR`) across workspaces |
|
|
121
|
+
| `workspace` | Uses `<workspace>/.mnemon`; the workbench may inspect another workspace while the Agent still follows the current session |
|
|
122
|
+
| `custom` | Uses an absolute or `~/...` path supplied through `dataDir` |
|
|
116
123
|
|
|
117
|
-
|
|
124
|
+
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
125
|
|
|
119
|
-
##
|
|
126
|
+
## Common commands
|
|
120
127
|
|
|
121
128
|
```text
|
|
122
129
|
/mnemon status
|
|
123
|
-
/mnemon recall
|
|
124
|
-
/mnemon related
|
|
125
|
-
/mnemon remember
|
|
126
|
-
/mnemon forget
|
|
130
|
+
/mnemon recall <query>
|
|
131
|
+
/mnemon related <full memory ID>
|
|
132
|
+
/mnemon remember <stable, self-contained durable insight>
|
|
133
|
+
/mnemon forget <full memory ID>
|
|
127
134
|
```
|
|
128
135
|
|
|
129
|
-
|
|
136
|
+
Recommended lookup order: Runtime Memory → active Documents → active Memory Spaces → archived original referenced by a hit.
|
|
130
137
|
|
|
131
|
-
##
|
|
138
|
+
## Data and security boundaries
|
|
132
139
|
|
|
133
|
-
-
|
|
134
|
-
- CLI
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
140
|
+
- The plugin reaches durable memory through the local `mnemon` CLI. The WebUI neither reads SQLite directly nor starts processes.
|
|
141
|
+
- CLI calls use argument arrays with shell disabled, bounded output, timeouts, and cancellation.
|
|
142
|
+
- The plugin stores no API keys. Subagent inference uses the provider already configured in DSH.
|
|
143
|
+
- There is no deterministic secret scanner yet. Never store keys, tokens, private keys, or raw sensitive logs in any tier.
|
|
144
|
+
- Uninstalling the plugin does not remove data under `~/.mnemon`, workspace `.mnemon` roots, or custom directories.
|
|
138
145
|
|
|
139
|
-
|
|
146
|
+
See [Operations, security, and troubleshooting](./docs/en/operations.md) for complete boundaries, backup, recovery, and diagnostics.
|
|
140
147
|
|
|
141
|
-
##
|
|
148
|
+
## Documentation
|
|
142
149
|
|
|
143
|
-
|
|
|
150
|
+
| I want to… | Start here |
|
|
144
151
|
|---|---|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
+
| Install and complete first-run verification | [Getting Started](./docs/en/getting-started.md) |
|
|
153
|
+
| Learn every page and conversation entry | [Sidebar and conversation UI guide](./docs/en/ui-guide.md) |
|
|
154
|
+
| Understand the three tiers and complete flow | [Project overview](./docs/en/project-overview.md) · [Lifecycle and workflows](./docs/en/workflows.md) |
|
|
155
|
+
| Choose storage scope or advanced switches | [Configuration reference](./docs/en/configuration.md) |
|
|
156
|
+
| Back up, update, or troubleshoot | [Operations, security, and troubleshooting](./docs/en/operations.md) |
|
|
157
|
+
| Integrate tools, commands, or RPC | [Interface reference](./docs/en/interfaces.md) |
|
|
158
|
+
| Develop, test, or publish | [Development and verification](./docs/en/development.md) |
|
|
152
159
|
|
|
153
|
-
|
|
160
|
+
See the [documentation hub](./docs/en/README.md) for the full map.
|
|
154
161
|
|
|
155
|
-
##
|
|
162
|
+
## Development
|
|
156
163
|
|
|
157
164
|
```sh
|
|
158
165
|
pnpm install
|
|
159
166
|
pnpm run verify
|
|
160
167
|
```
|
|
161
168
|
|
|
162
|
-
`verify`
|
|
169
|
+
`verify` runs TypeScript checks, Vitest, and the production build. Generated artifacts are committed under `lib/`.
|
|
163
170
|
|
|
164
171
|
## License
|
|
165
172
|
|
|
166
|
-
MIT
|
|
173
|
+
MIT. Report security issues privately through [SECURITY.md](./SECURITY.md), not a public issue.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
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
|
+

|
|
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
|
+
### 2. 安装插件
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
dsh plugin --profile web add dsh-mnemon
|
|
47
|
+
dsh --profile web
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
本地开发检出使用绝对路径:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 3. 打开记忆系统
|
|
57
|
+
|
|
58
|
+
安装后默认使用 `sidebar`:点击 DSH 左侧栏的“记忆系统”即可进入。第一次使用建议按以下顺序:
|
|
59
|
+
|
|
60
|
+
1. 在“状态”确认 Mnemon CLI、运行时、记忆体与档案均正常;
|
|
61
|
+
2. 在“记忆体 → 概览”创建一个边界明确的记忆体;
|
|
62
|
+
3. 用“沉淀记忆”提交一条稳定、未来仍有用的信息;
|
|
63
|
+
4. 在“检索”用一个聚焦问题验证召回;
|
|
64
|
+
5. 回到对话,展开回复下方的“本回合记忆”查看工具轨迹。
|
|
65
|
+
|
|
66
|
+
更完整的安装、Provider 要求与验证步骤见[快速开始](./docs/zh-CN/getting-started.md)。
|
|
67
|
+
|
|
68
|
+
## 一个工作台,三层记忆
|
|
69
|
+
|
|
70
|
+
| 层级 | 适合保存 | 如何进入上下文 |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| **运行时** | 用户偏好、协作要求、项目约定、环境事实 | `USER.md` / `MEMORY.md` 每轮紧凑注入 |
|
|
73
|
+
| **档案** | 设计、调查、流程、复盘、交接材料 | 先确定性检索 active Documents,再按需阅读全文 |
|
|
74
|
+
| **记忆体** | 跨会话事实、决策、实体与关系 | 只从已激活 Memory Spaces 按需召回有界证据 |
|
|
75
|
+
|
|
76
|
+
三层不是同一内容的简单复制:信息会按使用频率、叙事长度和召回方式进入最合适的层级。完整规则见[存储与三层记忆模型](./docs/zh-CN/storage-model.md)。
|
|
77
|
+
|
|
78
|
+
### 与其他 Agent 共享长期记忆
|
|
79
|
+
|
|
80
|
+
跨 Agent 共享发生在 Mnemon 提供的**记忆体**层。其他支持 Mnemon 的 Agent 指向相同的 `storageRoot` 和 Store 后,可以召回或继续沉淀同一批长期事实、实体与关系。DSH 专有的运行时记忆和项目档案不会因此自动暴露给其他 Agent。
|
|
81
|
+
|
|
82
|
+
默认 `global` 模式使用 `~/.mnemon`,最适合作为本机 Agent 之间的共享记忆根;`custom` 和 `workspace` 也可以共享,但所有参与方必须显式对齐目录。共享同一目录意味着共享同一份数据,请先确认信任边界,并避免并发执行不兼容的离线迁移或目录操作。
|
|
83
|
+
|
|
84
|
+
## Sidebar 工作台
|
|
85
|
+
|
|
86
|
+
| 页面 | 主要用途 |
|
|
87
|
+
|---|---|
|
|
88
|
+
| **状态** | 检查连接、存储根、三层数据摘要,以及 Mnemon / dsh-mnemon 版本 |
|
|
89
|
+
| **运行时** | 查看 USER / MEMORY 容量,筛选、添加、编辑或移除热记忆 |
|
|
90
|
+
| **记忆体** | 管理激活边界;在概览、检索、内容、实体之间切换;打开“沉淀记忆” |
|
|
91
|
+
| **档案** | 搜索、阅读、新建、编辑与归档受管 Markdown 文档 |
|
|
92
|
+
|
|
93
|
+
添加与编辑使用统一弹窗;危险操作需要二次确认;长列表采用筛选、计数与“加载更多”,档案正文使用独立阅读区域。
|
|
94
|
+
|
|
95
|
+
### 对话内记忆
|
|
96
|
+
|
|
97
|
+
| 本回合记忆 | 存入记忆 |
|
|
98
|
+
|---|---|
|
|
99
|
+
| [](./docs/assets/screenshots/conversation-turn-memory.png) | [](./docs/assets/screenshots/conversation-save-dialog.png) |
|
|
100
|
+
|
|
101
|
+
- **本回合记忆**汇总本轮的召回、沉淀与档案检索;展开后可以跳到对应页面。
|
|
102
|
+
- **存入记忆**先加载可编辑候选,只有确认后才交给记忆子 Agent 判断、查重、提炼并写入。
|
|
103
|
+
|
|
104
|
+
这两个入口默认开启,可在“设置 → 记忆系统 → 对话界面”中分别关闭,保存后实时生效。
|
|
105
|
+
|
|
106
|
+
## 展示与存储
|
|
107
|
+
|
|
108
|
+
配置位于 `$DSH_HOME/settings.yaml`(通常为 `~/.dsh/settings.yaml`):
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
mnemon:
|
|
112
|
+
displayMode: sidebar # sidebar | buildin;默认 sidebar
|
|
113
|
+
storageScope: global # global | workspace | custom
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
| 选择 | 行为 |
|
|
117
|
+
|---|---|
|
|
118
|
+
| `sidebar` | 默认;左侧栏独立工作台,采用与 DSH 官方面板一致的极简外观 |
|
|
119
|
+
| `buildin` | 保留原有对话区内嵌形态及其既有视觉 |
|
|
120
|
+
| `global` | 多个工作区共享 `~/.mnemon`(或 `MNEMON_DATA_DIR`) |
|
|
121
|
+
| `workspace` | 每个工作区使用自己的 `<workspace>/.mnemon`;工作台可查看其他工作区,Agent 仍跟随当前会话 |
|
|
122
|
+
| `custom` | 使用 `dataDir` 指定的绝对路径或 `~/...` |
|
|
123
|
+
|
|
124
|
+
设置保存后实时生效,无需手动刷新。切换存储范围不会自动迁移、合并或删除旧数据;工作区查看目标与会话实际目录不一致时,顶部会提示并提供一键对齐。
|
|
125
|
+
|
|
126
|
+
## 常用命令
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
/mnemon status
|
|
130
|
+
/mnemon recall <查询>
|
|
131
|
+
/mnemon related <完整记忆 ID>
|
|
132
|
+
/mnemon remember <稳定、自包含的长期洞察>
|
|
133
|
+
/mnemon forget <完整记忆 ID>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
推荐查询顺序:运行时热记忆 → active Documents → 已激活记忆体 → 命中记录指向的归档原文。
|
|
137
|
+
|
|
138
|
+
## 数据与安全边界
|
|
139
|
+
|
|
140
|
+
- 插件通过本地 `mnemon` CLI 访问长期记忆;WebUI 不直接读取 SQLite,也不直接启动进程。
|
|
141
|
+
- CLI 使用参数数组且禁用 shell;输出、超时和取消均有边界。
|
|
142
|
+
- 插件不保存 API key;子 Agent 推理复用 DSH 已配置的 Provider。
|
|
143
|
+
- 当前没有确定性的秘密扫描器。不要把密钥、token、私钥或原始敏感日志写入任何记忆层。
|
|
144
|
+
- 卸载插件不会删除 `~/.mnemon`、工作区 `.mnemon` 或自定义目录中的数据。
|
|
145
|
+
|
|
146
|
+
完整边界、备份恢复与故障排查见[运维指南](./docs/zh-CN/operations.md)。
|
|
147
|
+
|
|
148
|
+
## 文档
|
|
149
|
+
|
|
150
|
+
| 我想要…… | 从这里开始 |
|
|
151
|
+
|---|---|
|
|
152
|
+
| 安装并完成第一次验证 | [快速开始](./docs/zh-CN/getting-started.md) |
|
|
153
|
+
| 认识每个页面与对话内入口 | [Sidebar 与对话交互指南](./docs/zh-CN/ui-guide.md) |
|
|
154
|
+
| 理解三层模型和完整流转 | [项目介绍](./docs/zh-CN/project-overview.md) · [生命周期与核心流程](./docs/zh-CN/workflows.md) |
|
|
155
|
+
| 选择存储范围或高级开关 | [配置参考](./docs/zh-CN/configuration.md) |
|
|
156
|
+
| 备份、更新或排查问题 | [运维、安全与故障排查](./docs/zh-CN/operations.md) |
|
|
157
|
+
| 集成工具、命令或 RPC | [接口参考](./docs/zh-CN/interfaces.md) |
|
|
158
|
+
| 开发、测试或发布 | [开发与验证](./docs/zh-CN/development.md) |
|
|
159
|
+
|
|
160
|
+
完整目录见[文档中心](./docs/zh-CN/README.md)。
|
|
161
|
+
|
|
162
|
+
## 开发
|
|
163
|
+
|
|
164
|
+
```sh
|
|
165
|
+
pnpm install
|
|
166
|
+
pnpm run verify
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
`verify` 依次运行 TypeScript 检查、Vitest 和生产构建。构建产物提交在 `lib/` 中。
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
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.
|
|
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/docs/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# dsh-mnemon
|
|
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.
|
|
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.
|
|
45
|
+
- User documentation targets the v0.1.4 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.
|
package/docs/en/architecture.md
CHANGED
|
@@ -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:
|
package/docs/en/configuration.md
CHANGED
|
@@ -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,6 +87,16 @@ 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
|
package/docs/en/development.md
CHANGED
|
@@ -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.
|
|
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.
|
|
17
|
+
The project does not declare a fixed minimum DSH / Mnemon matrix. This guide and its screenshots target dsh-mnemon v0.1.4. Back up and repeat this verification against an isolated root before upgrading.
|
|
18
18
|
|
|
19
19
|
## 2. Install Mnemon
|
|
20
20
|
|
|
@@ -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
|
[](../assets/diagrams/en/project-architecture.svg)
|
package/docs/en/storage-model.md
CHANGED
|
@@ -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.
|
package/docs/en/ui-guide.md
CHANGED
|
@@ -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.
|
|
5
|
+
This guide follows the default `sidebar` presentation and a real user path through Memory System. Screenshots come from the v0.1.4 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
|
|