Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/en/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ If Mnemon is unavailable, run `command -v mnemon` and `mnemon --version` on macO
4. Describe what belongs there and which tasks should recall it.
5. Enable read activation.

In an empty storage root, the first Memory Space uses Mnemon's native `default` Store ID while keeping the name and description you supplied. Its activation toggle affects DSH only.

### Remember one test item

Open **Remember** and enter something stable, self-contained, future-useful, and secret-free. Leave advanced options collapsed so the memory subagent can select a target, deduplicate, and distill.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/project-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ One body may be up to 2 MiB and active rendered content up to 10 MiB. Before man

### 3. Memory Spaces

Each Memory Space maps to an independent Mnemon Store and `mnemon.db`, with a stable ID, name, routing description, and activation state.
Each Memory Space maps to an independent Mnemon Store and `mnemon.db`, with a stable ID, name, routing description, and activation state. Activation is DSH's read-and-routing control plane and may select zero or many spaces; Mnemon's native default Store remains an independent single selection for ordinary Mnemon agents.

- Reads cover active spaces only.
- Writes may target any registered space and activate it after success.
Expand Down
10 changes: 7 additions & 3 deletions docs/en/storage-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,17 @@ Default search covers only active Documents. Search updates `lastAccessedAt` for
Each Memory Space is a native named Mnemon Store with maintainable metadata added in `.dsh-memory-bodies.json`:

```text
id Host-generated stable UUID or discovered compatible Store name
id default for the first Store; then a Host UUID or a discovered compatible Store name
name human-readable name
description routing boundary: what belongs here and when to recall it
active whether it participates in reads
active whether it participates in DSH reads and routing
mnemon.db independent data plane
```

### Read and Write Boundaries

- After initialization, Mnemon's native layer retains at least one Store and selects one default through `<storageRoot>/active`; ordinary Mnemon agents continue to use this single-Store model.
- dsh-mnemon activation is an independent control plane: any 0..N Stores may be active, and making all of them inactive neither changes Mnemon's default Store nor affects other agents.
- Recall, graph, content, and entity reads use only active Memory Spaces.
- Reads explicitly targeting an inactive Memory Space are rejected.
- Writes may target any registered Memory Space.
Expand All @@ -159,9 +161,11 @@ mnemon.db independent data plane

### Creation, Discovery, and Merge

- On creation, the model supplies a name and description; the Host generates the ID.
- An uninitialized root may remain at zero Stores. The first explicit Memory Space creation uses Mnemon's native `default` ID while retaining the user-supplied name and routing description; later creations use Host-generated UUIDs.
- The last native Store cannot be deleted after initialization, but its Memory Space may remain inactive. Before deleting Mnemon's default Store, the plugin switches to another existing Store.
- An existing `<storageRoot>/data/<store>/mnemon.db` is discovered and registered without moving the database.
- Merge imports source content into the target through Mnemon; the source database remains in place, and by default only the source is marked inactive.
- Pack replacement cannot empty an initialized Store set. If replacement removes the former default Store, the plugin repairs the native default pointer to an existing Store.
- `forget` is a soft delete by exact ID, not deletion of a database file.

### Cross-Agent Visibility
Expand Down
4 changes: 2 additions & 2 deletions docs/en/ui-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ A Runtime item should be compact, independent, and repeatedly useful. Put identi

[![Memory Space catalog, activation, and multi-space relationship graph](../assets/screenshots/overview-memory-graph.png)](../assets/screenshots/overview-memory-graph.png)

Each card leads with its name and routing description, pins read activation at the top right, and keeps statistics plus Edit / Delete in the footer. Activation controls reads only. A write may target an inactive registered space and activates it after success.
Each card leads with its name and routing description, pins read activation at the top right, and keeps statistics plus Edit / Delete in the footer. The **Mnemon default** badge identifies the native CLI's default Store. Activation controls only DSH reads and routing; it neither changes that default nor affects other agents. A write may target an inactive registered space and activates it after success.

The graph aggregates all active spaces. Layout, dragging, and reset affect browser presentation only and never mutate Mnemon data.

Expand Down Expand Up @@ -148,7 +148,7 @@ You may inspect project B while staying in project A's conversation; the Agent s
## Common interaction rules

- Solid blue is the primary action; blue outline usually means Edit; red is Remove, Delete, Archive, or Forget; neutral actions are View, Copy, and Cancel.
- A Memory Space toggle controls only whether dsh-mnemon includes it in read routing; it is not Mnemon CLI's default Store selection. Before deleting Mnemon's default Store, the plugin switches to another existing Memory Space. If it is the only Store, create another Memory Space first.
- A Memory Space toggle controls only whether dsh-mnemon includes it in read routing; it is not Mnemon CLI's default Store selection. Before deleting Mnemon's default Store, the plugin switches to another existing Memory Space. The last native Store may be inactive but cannot be deleted.
- Physical destructive operations such as deleting a Memory Space require a dedicated confirmation. Forget is semantic soft deletion and should still be deliberate.
- Saving settings clears stale page state and reloads automatically; no browser refresh is needed.
- Sidebar primary headings remain stable; secondary headings within Memory Spaces scroll naturally.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ spawn write worker
structured receipt
```

The Host generates IDs for new Memory Spaces. A successful write to an inactive target activates it. Merging a source database is non-destructive.
The first Memory Space created in an empty storage root uses Mnemon's native `default` ID; the Host generates later IDs. A successful write to an inactive target activates it. This activation affects only DSH routing, and merging a source database is non-destructive.

Runtime `add` / `replace` / `remove` and Document `create` / `update` do not need a model to perform storage I/O; they enter the deterministic control layer through the coordinator. Only capacity maintenance and archiving start dedicated workers.

Expand Down
2 changes: 2 additions & 0 deletions docs/zh-CN/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ dsh plugin --profile web remove dsh-mnemon
4. 在说明中写清“哪些内容属于这里,以及什么任务应召回它”。
5. 开启读取激活开关。

空存储根的第一个记忆体会使用 Mnemon 原生 `default` Store ID,但仍显示你填写的名称与说明;激活开关只影响 DSH。

### 沉淀一条测试信息

点击右上角“沉淀记忆”,填写一条稳定、自包含、未来仍有用且不含秘密的信息。默认不要展开高级选项,让记忆子 Agent 自己选择目标、查重与提炼。
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/project-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

### 3. 记忆体

每个记忆体对应一个独立 Mnemon Store 与 `mnemon.db`,并拥有稳定 ID、名称、路由说明和激活状态。
每个记忆体对应一个独立 Mnemon Store 与 `mnemon.db`,并拥有稳定 ID、名称、路由说明和激活状态。激活是 DSH 的读取与路由控制面,可以为零或多个;Mnemon 原生默认 Store 仍保持独立的单选语义,供普通 Mnemon Agent 使用。

- 读取只覆盖已激活记忆体;
- 写入可以选择任何已登记目标,成功后自动激活;
Expand Down
10 changes: 7 additions & 3 deletions docs/zh-CN/storage-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,17 @@ Documents 的物理共享范围由 `storageScope` 决定:
每个记忆体是一个 Mnemon 原生命名 Store,并在 `.dsh-memory-bodies.json` 中增加可维护元数据:

```text
id Host 生成的稳定 UUID 或已发现的兼容 Store 名
id 首个 Store 使用 default;后续由 Host 生成 UUID,或沿用已发现的兼容 Store 名
name 人类可读名称
description 路由边界:什么属于这里、何时召回
active 是否参与读取
active 是否参与 DSH 读取与路由
mnemon.db 独立数据面
```

### 读写边界

- Mnemon 原生层在初始化后至少保留一个 Store,并通过 `<storageRoot>/active` 选择一个默认 Store;普通 Mnemon Agent 仍按这套单 Store 语义工作。
- dsh-mnemon 的激活状态是独立控制面:任意 0..N 个 Store 可以激活,全部未激活也不会改变 Mnemon 默认 Store 或影响其他 Agent。
- 召回、图谱、内容和实体读取只使用已激活记忆体。
- 指定未激活记忆体进行读取会被拒绝。
- 写入可以选择已登记的任意记忆体。
Expand All @@ -159,9 +161,11 @@ mnemon.db 独立数据面

### 创建、发现和合并

- 创建时模型提供 name 和 description,Host 生成 ID。
- 未初始化的空根可以保持零 Store;第一次显式创建记忆体时使用 Mnemon 原生 `default` ID,名称与路由说明仍由用户决定,后续创建使用 Host 生成的 UUID。
- 初始化后不能删除最后一个原生 Store,但可以将最后一个记忆体设为未激活。删除 Mnemon 默认 Store 时,插件会先切换到另一个现存 Store。
- 既有 `<storageRoot>/data/<store>/mnemon.db` 会被发现并登记,不移动数据库。
- 合并通过 Mnemon import 把来源内容导入目标;来源数据库保留,默认只将来源设为未激活。
- Pack 替换不能把已初始化的 Store 集合清空;替换后若原默认 Store 已不存在,插件会选择一个现存 Store 修复原生默认指针。
- `forget` 是按精确 ID 的软删除,不等于删除数据库文件。

### 跨 Agent 可见性
Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/ui-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Sidebar 顶部始终回答三个问题:

[![记忆体概览:目录卡片、激活开关与多空间关系图](../assets/screenshots/overview-memory-graph.png)](../assets/screenshots/overview-memory-graph.png)

目录卡片先展示名称和路由说明,右上角是读取激活开关,底部是统计与编辑 / 删除操作。激活只控制读取范围;写入可以选择已登记但未激活的目标,成功后会自动激活。
目录卡片先展示名称和路由说明,右上角是读取激活开关,底部是统计与编辑 / 删除操作。“Mnemon 默认”标记表示原生 CLI 的默认 Store;激活只控制 DSH 的读取与路由范围,不会改变该默认选择或影响其他 Agent。写入可以选择已登记但未激活的目标,成功后会自动激活。

下方关系图聚合全部已激活记忆体。布局、拖拽和重置只影响当前浏览器展示,不会修改 Mnemon 数据。

Expand Down Expand Up @@ -152,7 +152,7 @@ Sidebar 顶部始终回答三个问题:
## 常见交互规则

- 蓝色实心按钮表示当前主要动作;蓝色描边通常用于编辑;红色用于移除、删除、归档或忘记;中性按钮用于查看、复制与取消。
- 记忆体开关只决定它是否参与 dsh-mnemon 的读取路由,不等同于 Mnemon CLI 的默认 Store。删除 Mnemon 的默认 Store 时,插件会先切换到另一个现存记忆体;若它是唯一 Store,需要先创建另一个记忆体
- 记忆体开关只决定它是否参与 dsh-mnemon 的读取路由,不等同于 Mnemon CLI 的默认 Store。删除 Mnemon 的默认 Store 时,插件会先切换到另一个现存记忆体;最后一个原生 Store 可以未激活,但不能删除
- 删除记忆体等物理危险操作需要独立确认;“忘记”是长期语义软删除,也只应在明确需要时使用。
- 保存配置后页面自动清理旧状态并重新读取,无需浏览器刷新。
- Sidebar 的一级页头保持稳定;记忆体内部二级内容标题随内容自然滚动。
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ spawn write worker
structured receipt
```

新建 Memory Space 的 ID 由 Host 生成。向 inactive 目标写入成功后会激活它。来源数据库的合并是非破坏性的。
空存储根首次创建 Memory Space 时使用 Mnemon 原生 `default` ID,后续 ID 由 Host 生成。向 inactive 目标写入成功后会激活它。这里的激活只影响 DSH 路由;来源数据库的合并是非破坏性的。

运行时 `add` / `replace` / `remove` 和 Document `create` / `update` 不需要模型做存储 I/O;它们通过 coordinator 进入确定性控制层。容量维护和归档才启动专用 worker。

Expand Down
1 change: 1 addition & 0 deletions src/client/MnemonView.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
.bodyCardTop code { overflow: hidden; color: var(--mn-faint); font: 9px var(--mn-code); text-overflow: ellipsis; white-space: nowrap; }
.bodyHealth { color: var(--mn-success); font: 650 8px var(--mn-code); letter-spacing: .07em; text-transform: uppercase; }
.bodyCard:not([data-healthy]) .bodyHealth { color: var(--mn-danger); }
.mnemonDefaultBadge { width: fit-content; padding: 2px 5px; border: 1px solid color-mix(in srgb, var(--mn-accent) 24%, var(--mn-line)); border-radius: 999px; color: var(--mn-accent); background: color-mix(in srgb, var(--mn-accent) 7%, transparent); font: 650 8px var(--mn-code); white-space: nowrap; }
.bodySwitch { display: flex; min-height: 32px; align-items: center; gap: 6px; border: 0; padding: 0 1px; color: var(--mn-faint); background: transparent; font-size: 9.5px; cursor: pointer; }
.bodySwitchTrack { position: relative; width: 29px; height: 17px; flex: 0 0 auto; border: 1px solid var(--mn-line-strong); border-radius: 999px; background: var(--mn-layer-2); transition: border-color .18s, background-color .18s; }
.bodySwitchTrack i { position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--mn-faint); transition: transform .2s cubic-bezier(.2, .8, .2, 1), background-color .18s; }
Expand Down
Loading