dsh-mnemon 0.1.1 → 0.1.2
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.en.md +4 -3
- package/README.md +4 -3
- package/cordis.patch.yml +1 -0
- package/docs/en/configuration.md +11 -6
- package/docs/en/getting-started.md +6 -4
- package/docs/en/interfaces.md +5 -3
- package/docs/en/operations.md +3 -2
- package/docs/en/project-overview.md +3 -1
- package/docs/en/roadmap.md +1 -1
- package/docs/en/storage-model.md +1 -1
- package/docs/zh-CN/configuration.md +11 -6
- package/docs/zh-CN/getting-started.md +6 -4
- package/docs/zh-CN/interfaces.md +5 -3
- package/docs/zh-CN/operations.md +3 -2
- package/docs/zh-CN/project-overview.md +3 -1
- package/docs/zh-CN/roadmap.md +1 -1
- package/docs/zh-CN/storage-model.md +1 -1
- package/lib/client.js +806 -421
- package/lib/client.js.map +1 -1
- package/lib/index.js +276 -92
- package/lib/types/client/MnemonSettingsCard.d.ts +1 -3
- package/lib/types/client/MnemonSettingsCard.d.ts.map +1 -1
- package/lib/types/client/MnemonSettingsCard.js +10 -27
- package/lib/types/client/MnemonSettingsCard.js.map +1 -1
- package/lib/types/client/MnemonView.d.ts +13 -0
- package/lib/types/client/MnemonView.d.ts.map +1 -1
- package/lib/types/client/MnemonView.js +14 -6
- package/lib/types/client/MnemonView.js.map +1 -1
- package/lib/types/client/api.d.ts +3 -1
- package/lib/types/client/api.d.ts.map +1 -1
- package/lib/types/client/api.js +31 -23
- package/lib/types/client/api.js.map +1 -1
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/index.js +42 -29
- package/lib/types/client/index.js.map +1 -1
- package/lib/types/client/locales.d.ts +32 -12
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/locales.js +42 -22
- package/lib/types/client/locales.js.map +1 -1
- package/lib/types/client/sidebar-entry.d.ts +6 -0
- package/lib/types/client/sidebar-entry.d.ts.map +1 -0
- package/lib/types/client/sidebar-entry.js +132 -0
- package/lib/types/client/sidebar-entry.js.map +1 -0
- package/lib/types/client/workspace-controller.d.ts +15 -0
- package/lib/types/client/workspace-controller.d.ts.map +1 -0
- package/lib/types/client/workspace-controller.js +21 -0
- package/lib/types/client/workspace-controller.js.map +1 -0
- package/lib/types/client/workspace-mount.d.ts +8 -0
- package/lib/types/client/workspace-mount.d.ts.map +1 -0
- package/lib/types/client/workspace-mount.js +135 -0
- package/lib/types/client/workspace-mount.js.map +1 -0
- package/lib/types/commands.d.ts +10 -2
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +5 -1
- package/lib/types/commands.js.map +1 -1
- package/lib/types/config.d.ts +5 -2
- package/lib/types/config.d.ts.map +1 -1
- package/lib/types/config.js +2 -0
- package/lib/types/config.js.map +1 -1
- package/lib/types/contracts.d.ts +11 -0
- package/lib/types/contracts.d.ts.map +1 -1
- package/lib/types/documents.d.ts.map +1 -1
- package/lib/types/documents.js +6 -14
- package/lib/types/documents.js.map +1 -1
- package/lib/types/guidance.d.ts +3 -1
- package/lib/types/guidance.d.ts.map +1 -1
- package/lib/types/guidance.js +12 -0
- package/lib/types/guidance.js.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +7 -7
- package/lib/types/index.js.map +1 -1
- package/lib/types/lifecycle.d.ts +9 -2
- package/lib/types/lifecycle.d.ts.map +1 -1
- package/lib/types/lifecycle.js +8 -1
- package/lib/types/lifecycle.js.map +1 -1
- package/lib/types/live-runtime.d.ts +26 -2
- package/lib/types/live-runtime.d.ts.map +1 -1
- package/lib/types/live-runtime.js +73 -3
- package/lib/types/live-runtime.js.map +1 -1
- package/lib/types/rpc.d.ts +6 -3
- package/lib/types/rpc.d.ts.map +1 -1
- package/lib/types/rpc.js +116 -19
- package/lib/types/rpc.js.map +1 -1
- package/lib/types/runner.d.ts +1 -1
- package/lib/types/runner.d.ts.map +1 -1
- package/lib/types/runner.js +2 -2
- package/lib/types/runner.js.map +1 -1
- package/lib/types/service.d.ts +16 -0
- package/lib/types/service.d.ts.map +1 -1
- package/lib/types/service.js.map +1 -1
- package/lib/types/settings.js +1 -1
- package/lib/types/settings.js.map +1 -1
- package/lib/types/subagent.d.ts +11 -2
- package/lib/types/subagent.d.ts.map +1 -1
- package/lib/types/subagent.js +34 -29
- package/lib/types/subagent.js.map +1 -1
- package/lib/types/tools.d.ts +11 -1
- package/lib/types/tools.d.ts.map +1 -1
- package/lib/types/tools.js +27 -16
- package/lib/types/tools.js.map +1 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -110,7 +110,7 @@ For a local checkout, use an absolute path:
|
|
|
110
110
|
dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
Open the dedicated “Settings -> Memory System” page to
|
|
113
|
+
Open the dedicated “Settings -> Memory System” page to choose both a display mode and storage scope. The default `sidebar` mode opens a dedicated “Memory System” workbench from the sidebar; switching to `buildin` restores the original conversation-area tab. Saving switches live without mounting duplicate entries. Under the `workspace` scope, the sidebar workbench selector independently chooses which DSH workspace to inspect and maintain; agents, tools, and lifecycle hooks always continue to use the current session workspace. A global banner shows both paths when they diverge and aligns them with one click. The storage root switches atomically after the new directory initializes successfully, and changing the scope never migrates, merges, or deletes old data automatically.
|
|
114
114
|
|
|
115
115
|
Upgrade and uninstall (`dsh plugin` forwards to pnpm inside the profile directory):
|
|
116
116
|
|
|
@@ -122,7 +122,7 @@ dsh plugin --profile web update dsh-mnemon
|
|
|
122
122
|
dsh plugin --profile web remove dsh-mnemon
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
Uninstalling never deletes memory data: `global` data stays in `~/.mnemon`, and `workspace` / `custom` data stays in their directories, so reinstalling picks up where you left off. To pause automatic reads/writes without uninstalling, turn off `writebackMode` / `recallMode` / `lifecycleEnabled`
|
|
125
|
+
Uninstalling never deletes memory data: `global` data stays in `~/.mnemon`, and `workspace` / `custom` data stays in their directories, so reinstalling picks up where you left off. To pause automatic reads/writes without uninstalling, turn off `writebackMode` / `recallMode` / `lifecycleEnabled`; set `tabEnabled=false` to hide the currently selected Web entry (see the [configuration reference](./docs/en/configuration.md)).
|
|
126
126
|
|
|
127
127
|
## Minimal configuration
|
|
128
128
|
|
|
@@ -130,11 +130,12 @@ Configuration lives in `$DSH_HOME/settings.yaml` (commonly `~/.dsh/settings.yaml
|
|
|
130
130
|
|
|
131
131
|
```yaml
|
|
132
132
|
mnemon:
|
|
133
|
+
displayMode: sidebar # sidebar | buildin; sidebar by default
|
|
133
134
|
storageScope: global # global | workspace | custom
|
|
134
135
|
```
|
|
135
136
|
|
|
136
137
|
- `global`: `MNEMON_DATA_DIR`, or `~/.mnemon` when unset.
|
|
137
|
-
- `workspace`: `.mnemon` under
|
|
138
|
+
- `workspace`: `.mnemon` under each DSH workspace root; Agent execution follows the current session workspace while the Web workbench may inspect another target.
|
|
138
139
|
- `custom`: an absolute or `~/...` path supplied through `dataDir`.
|
|
139
140
|
|
|
140
141
|
See the [configuration reference](./docs/en/configuration.md) for every option, precedence rules, and read-only mode.
|
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ dsh plugin --profile web add "github:omdsh-dev/dsh-mnemon"
|
|
|
110
110
|
dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
打开 DSH 的“设置 ->
|
|
113
|
+
打开 DSH 的“设置 -> 记忆系统”独立配置页即可选择展示形态与存储范围。默认 `sidebar` 从左侧栏进入独立“记忆系统”工作台;切换为 `buildin` 则恢复原有的对话区内嵌标签页,保存后实时切换且不会重复挂载。`workspace` 范围下可在侧边栏工作台顶部独立切换要查看和维护的 DSH 工作区;Agent、工具和生命周期仍始终使用当前会话工作区。两者不一致时全局提示会同时显示查看目录和实际生效目录,并可一键对齐。存储根会在新目录初始化成功后原子切换,切换范围不会自动迁移、合并或删除旧数据。
|
|
114
114
|
|
|
115
115
|
升级与卸载(`dsh plugin` 转发给 profile 目录下的 pnpm):
|
|
116
116
|
|
|
@@ -122,7 +122,7 @@ dsh plugin --profile web update dsh-mnemon
|
|
|
122
122
|
dsh plugin --profile web remove dsh-mnemon
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
卸载不会删除记忆数据:`global` 范围数据留在 `~/.mnemon`,`workspace` / `custom` 范围数据留在对应目录,重新安装后即可继续使用。若只想临时停用自动读写而不卸载,可在插件配置里关闭 `writebackMode` / `recallMode` / `lifecycleEnabled
|
|
125
|
+
卸载不会删除记忆数据:`global` 范围数据留在 `~/.mnemon`,`workspace` / `custom` 范围数据留在对应目录,重新安装后即可继续使用。若只想临时停用自动读写而不卸载,可在插件配置里关闭 `writebackMode` / `recallMode` / `lifecycleEnabled`;`tabEnabled=false` 可隐藏当前展示形态的 Web 入口(详见[配置参考](./docs/zh-CN/configuration.md))。
|
|
126
126
|
|
|
127
127
|
## 最小配置
|
|
128
128
|
|
|
@@ -130,11 +130,12 @@ dsh plugin --profile web remove dsh-mnemon
|
|
|
130
130
|
|
|
131
131
|
```yaml
|
|
132
132
|
mnemon:
|
|
133
|
+
displayMode: sidebar # sidebar | buildin;默认 sidebar
|
|
133
134
|
storageScope: global # global | workspace | custom
|
|
134
135
|
```
|
|
135
136
|
|
|
136
137
|
- `global`:`MNEMON_DATA_DIR`,未设置时为 `~/.mnemon`。
|
|
137
|
-
- `workspace
|
|
138
|
+
- `workspace`:每个 DSH 工作区各自根目录下的 `.mnemon`;Agent 执行跟随当前会话工作区,Web 工作台可独立选择查看目标。
|
|
138
139
|
- `custom`:`dataDir` 指定的绝对路径或 `~/...` 路径。
|
|
139
140
|
|
|
140
141
|
完整配置、覆盖优先级和只读模式见[配置参考](./docs/zh-CN/configuration.md)。
|
package/cordis.patch.yml
CHANGED
package/docs/en/configuration.md
CHANGED
|
@@ -12,12 +12,13 @@ $DSH_HOME/settings.yaml
|
|
|
12
12
|
|
|
13
13
|
The default is commonly `~/.dsh/settings.yaml`. All current settings are marked `live`; after Save, the Host initializes a candidate runtime graph and then switches to it atomically.
|
|
14
14
|
|
|
15
|
-
The Web settings card edits
|
|
15
|
+
The Web settings card edits `displayMode`, `storageScope`, and `dataDir`. Other advanced settings must be changed directly in YAML.
|
|
16
16
|
|
|
17
17
|
## Complete Example
|
|
18
18
|
|
|
19
19
|
```yaml
|
|
20
20
|
mnemon:
|
|
21
|
+
displayMode: sidebar # sidebar | buildin
|
|
21
22
|
storageScope: global # global | workspace | custom
|
|
22
23
|
# dataDir: ~/mnemon-data # required for custom
|
|
23
24
|
# cliPath: /opt/homebrew/bin/mnemon
|
|
@@ -37,6 +38,7 @@ mnemon:
|
|
|
37
38
|
|
|
38
39
|
| Setting | Default | Range | Implementation Semantics |
|
|
39
40
|
|---|---:|---|---|
|
|
41
|
+
| `displayMode` | `sidebar` | `sidebar` / `buildin` | `sidebar` mounts the dedicated sidebar workbench; `buildin` restores the native DSH conversation-area tab; saving switches live and never mounts both entries together |
|
|
40
42
|
| `storageScope` | `global` | `global` / `workspace` / `custom` | Controls the root for Runtime, Documents, Memory Spaces, and reserved state as one unit |
|
|
41
43
|
| `dataDir` | unset | absolute path, `~`, or `~/...` | Required for `custom`; legacy configurations that set only this option automatically resolve to `custom` |
|
|
42
44
|
| `cliPath` | auto-discovered | executable path | Explicitly selects the Mnemon CLI |
|
|
@@ -48,7 +50,7 @@ mnemon:
|
|
|
48
50
|
| `recallMode` | `guided` | `guided` / `off` | Whether to inject an on-demand recall cue; does not remove explicit recall |
|
|
49
51
|
| `writebackMode` | `guided` | `guided` / `off` | Whether to inject the hot-memory cue and enable score-based background review; does not remove explicit writes |
|
|
50
52
|
| `idleReviewMs` | `30000` | 5000–600000 ms | Required continuous idle time after the threshold is reached |
|
|
51
|
-
| `tabEnabled` | `true` | boolean |
|
|
53
|
+
| `tabEnabled` | `true` | boolean | Whether to mount the Web entry selected by `displayMode`; Host RPC, commands, and Agent tools remain registered when off |
|
|
52
54
|
| `writeEnabled` | `true` | boolean | Whether to expose semantic write tools, write RPC, and write commands |
|
|
53
55
|
| `mnemon-ui.toolviews` | `false` | boolean | In-conversation memory tool cards for `mnemon_*` calls; off by default (opt-in), **applies live after saving** |
|
|
54
56
|
| `mnemon-ui.turnBar` | `false` | boolean | Turn-tail memory activity bar; off by default (opt-in), **applies live after saving** |
|
|
@@ -70,10 +72,11 @@ Suitable for users who want Runtime, Documents, and Memory Spaces shared across
|
|
|
70
72
|
### `workspace`
|
|
71
73
|
|
|
72
74
|
```text
|
|
73
|
-
resolve(
|
|
75
|
+
Agent / tool / lifecycle: resolve(currentSession.header.cwd, ".mnemon")
|
|
76
|
+
Web workbench inspection: resolve(workspaceRegistry.get(selectedWorkspaceId).path, ".mnemon")
|
|
74
77
|
```
|
|
75
78
|
|
|
76
|
-
|
|
79
|
+
Each DSH workspace owns an independent three-tier memory root. Agents, model tools, commands, and lifecycle hooks route by the current session cwd and are unaffected by the Web workbench's inspection target. The workbench can select only Host-registered workspaces, never an arbitrary path. When inspection and execution differ, the header shows both paths and offers one-click alignment with the current session. Agent-backed actions are rejected while misaligned to prevent writes to the wrong project.
|
|
77
80
|
|
|
78
81
|
### `custom`
|
|
79
82
|
|
|
@@ -168,9 +171,11 @@ routingGuidance=false
|
|
|
168
171
|
-> runtime-memory prompt section remains
|
|
169
172
|
```
|
|
170
173
|
|
|
171
|
-
##
|
|
174
|
+
## Display Mode and the `tabEnabled` UI Switch
|
|
172
175
|
|
|
173
|
-
|
|
176
|
+
`displayMode=sidebar` (the default) mounts the “Memory System” sidebar entry and its dedicated center-column workbench. `displayMode=buildin` instead registers the original DSH `conversation.view` tab. Saving first disposes the active entry and then mounts the target, so the two modes never appear simultaneously.
|
|
177
|
+
|
|
178
|
+
`tabEnabled=false` removes the currently selected Web entry live. Host RPC, commands, and tools remain registered across display-mode and enablement changes so an Agent or command already in progress stays valid.
|
|
174
179
|
|
|
175
180
|
## Profile Patch Overrides
|
|
176
181
|
|
|
@@ -90,7 +90,7 @@ dsh plugin --profile web remove dsh-mnemon
|
|
|
90
90
|
|
|
91
91
|
Uninstalling never deletes memory data: `global` data stays in `~/.mnemon`, and `workspace` / `custom` data stays in their directories, so reinstalling picks up where you left off.
|
|
92
92
|
|
|
93
|
-
To pause automatic reads/writes without uninstalling, turn off `writebackMode` / `recallMode` / `lifecycleEnabled` in the plugin configuration (see the [configuration reference](./configuration.md), “Toggle interactions”).
|
|
93
|
+
To pause automatic reads/writes without uninstalling, turn off `writebackMode` / `recallMode` / `lifecycleEnabled` in the plugin configuration (see the [configuration reference](./configuration.md), “Toggle interactions”). To hide only the Web workspace, set `tabEnabled=false`; Host RPC, commands, and Agent tools remain available.
|
|
94
94
|
|
|
95
95
|
## 4. Choose a Storage Scope
|
|
96
96
|
|
|
@@ -100,19 +100,21 @@ Start the DSH Web profile:
|
|
|
100
100
|
dsh --profile web
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
On the dedicated “Settings -> Memory System” page, choose:
|
|
103
|
+
On the dedicated “Settings -> Memory System” page, first choose a display mode: the default `sidebar` uses a dedicated sidebar workbench, while `buildin` uses the original conversation-area tab. Saving switches live. Then choose a storage scope:
|
|
104
104
|
|
|
105
105
|
| Scope | Root directory | Best suited for |
|
|
106
106
|
|---|---|---|
|
|
107
107
|
| `global` | `MNEMON_DATA_DIR` or `~/.mnemon` | Sharing one memory set across multiple workspaces |
|
|
108
|
-
| `workspace` | `.mnemon` under
|
|
108
|
+
| `workspace` | `.mnemon` under each DSH workspace root | Project isolation and cross-workspace inspection |
|
|
109
109
|
| `custom` | `dataDir` | An explicit disk, mounted volume, or dedicated data directory |
|
|
110
110
|
|
|
111
111
|
Settings are written to `$DSH_HOME/settings.yaml` and apply live after Save. Switching scopes does not move existing data; to preserve it, stop writes first and migrate with a complete ZIP backup.
|
|
112
112
|
|
|
113
|
+
After selecting `workspace`, the workbench header can switch the workspace being inspected. This choice controls only which memory set the workbench displays and maintains; Agent execution always follows the current session. A global warning appears when the two differ and offers one-click alignment.
|
|
114
|
+
|
|
113
115
|
## 5. Create Your First Memory Space
|
|
114
116
|
|
|
115
|
-
|
|
117
|
+
With the default `sidebar` mode, click “Memory System” in the DSH sidebar. With `buildin`, open the “Memory System” tab in the conversation area:
|
|
116
118
|
|
|
117
119
|
1. Open the “Memory Spaces” page.
|
|
118
120
|
2. Create a narrowly scoped Memory Space, such as “Project Decisions.”
|
package/docs/en/interfaces.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Web Workspace
|
|
6
6
|
|
|
7
|
-
The main Web interface follows DSH's global language and light/dark theme. The top navigation is split into three divider-separated groups: “Status” stands alone; “Runtime, Memory Spaces, Documents” cover the three storage tiers; “Distill, Recall, Entities, Content” are the read/write tools. The “Status” page opens by default.
|
|
7
|
+
`displayMode=sidebar` (the default) opens a dedicated workbench from the sidebar, while `displayMode=buildin` opens the same functional interface through the original DSH `conversation.view` tab. The settings page switches the two modes live and never mounts both simultaneously. The main Web interface follows DSH's global language and light/dark theme. The top navigation is split into three divider-separated groups: “Status” stands alone; “Runtime, Memory Spaces, Documents” cover the three storage tiers; “Distill, Recall, Entities, Content” are the read/write tools. The “Status” page opens by default.
|
|
8
8
|
|
|
9
9
|
| Page | Purpose | Call Boundary |
|
|
10
10
|
|---|---|---|
|
|
@@ -91,6 +91,8 @@ When a worker calls a tool with the same name, the call goes directly to the ser
|
|
|
91
91
|
|
|
92
92
|
RPC is the internal bridge between the DSH Host and this plugin's Web client. It is not a promised stable external HTTP API.
|
|
93
93
|
|
|
94
|
+
Workbench data requests carry `sessionId` and an optional `workspaceId`. The Host accepts only workspace IDs registered in `workspaceRegistry`: deterministic reads and human maintenance route to the inspected root selected by `workspaceId`, while agents, tools, and lifecycle hooks continue to route by the Agent cwd for `sessionId`. `status.workspaceContext` returns both roots and their `aligned` state; Agent-backed writes are rejected while they differ.
|
|
95
|
+
|
|
94
96
|
### Read Channel
|
|
95
97
|
|
|
96
98
|
```text
|
|
@@ -123,7 +125,7 @@ authority: loopback
|
|
|
123
125
|
| Endpoint | Behavior |
|
|
124
126
|
|---|---|
|
|
125
127
|
| `runtime-memory` | Hot-memory mutation |
|
|
126
|
-
| `supervise` | Submit a
|
|
128
|
+
| `supervise` | Submit a workspace candidate to a memory worker |
|
|
127
129
|
| `document` | create / update / archive |
|
|
128
130
|
| `remember` | Semantic write with optional advanced constraints |
|
|
129
131
|
| `link` | Create a relationship |
|
|
@@ -131,7 +133,7 @@ authority: loopback
|
|
|
131
133
|
| `body-create` | Create a Memory Space |
|
|
132
134
|
| `body-update` | Update metadata or active state |
|
|
133
135
|
|
|
134
|
-
|
|
136
|
+
When `writeEnabled=false`, the write channel remains stably registered but every mutation is rejected at the Host boundary.
|
|
135
137
|
|
|
136
138
|
### Settings Channel
|
|
137
139
|
|
package/docs/en/operations.md
CHANGED
|
@@ -108,7 +108,8 @@ When migration is required, stop writes and copy the complete root. Two roots ca
|
|
|
108
108
|
| Symptom | Check and Resolution |
|
|
109
109
|
|---|---|
|
|
110
110
|
| Mnemon is unavailable | Run `command -v mnemon` and `mnemon --version`; set `MNEMON_CLI_PATH` or `cliPath`, then restart |
|
|
111
|
-
| Status is healthy but recall is empty | Check that a Memory Space is active, inspect the
|
|
111
|
+
| Status is healthy but recall is empty | Check that a Memory Space is active, inspect `storageScope`, the workbench inspection root, the current session's effective root, and make sure the query is focused enough |
|
|
112
|
+
| Workbench reports a directory mismatch | This is a safety notice: the workbench is inspecting another workspace while the Agent still follows the current session; align with the session or intentionally keep cross-workspace inspection |
|
|
112
113
|
| `memoryBodyId is required...` | The active count is not exactly 1; have the worker or caller select a target explicitly |
|
|
113
114
|
| `memory body is not active for reading` | Activate the target in Overview; writing to an inactive space is allowed, but reading is not |
|
|
114
115
|
| Subagent provider error | Regular tasks require the full isolation capabilities; background review additionally requires `fork + inheritsParentContext` |
|
|
@@ -121,7 +122,7 @@ When migration is required, stop writes and copy the complete root. Two roots ca
|
|
|
121
122
|
| Lock timeout | Check whether another instance is writing; do not delete a lock that still belongs to a live process |
|
|
122
123
|
| Invalid JSON / unexpected viz | The CLI output protocol may be incompatible; validate the version against an isolated root and do not continue writing production data |
|
|
123
124
|
| A remote page can read but not write | Write RPC enforces loopback by design |
|
|
124
|
-
| `tabEnabled=
|
|
125
|
+
| “Memory System” is missing from the sidebar | Check `tabEnabled=true` and `displayMode=sidebar`; `buildin` appears as a conversation-area tab; after changing a local link, run `pnpm run build` and restart the DSH profile |
|
|
125
126
|
| Local link does not reflect source | Run `pnpm run build`, then restart the DSH profile |
|
|
126
127
|
|
|
127
128
|
## Known Limitations
|
|
@@ -170,7 +170,9 @@ These workflows can be initiated proactively through Agent tools and can also be
|
|
|
170
170
|
|
|
171
171
|
### Web Workspace
|
|
172
172
|
|
|
173
|
-
The
|
|
173
|
+
The default `sidebar` mode opens a dedicated center-column workspace from the “Memory System” sidebar entry. Settings can switch to `buildin`, which restores the original conversation-area tab. Both modes reuse the same functional interface and are mounted mutually exclusively. It contains eight pages in three divider-separated groups: “Status” stands alone; “Runtime, Memory Spaces, Documents” cover the three storage tiers; “Distill, Recall, Entities, Content” are the read/write tools:
|
|
174
|
+
|
|
175
|
+
Under the `workspace` storage scope, the header selector is an independent inspection context: it can display and maintain another registered DSH workspace without changing the current conversation. The execution context used by agents, tools, and lifecycle hooks always follows the current session cwd. When inspection and execution differ, the whole workbench shows both paths and a one-click alignment action; operations that need to start an Agent do not run while misaligned.
|
|
174
176
|
|
|
175
177
|
| Page | Primary purpose |
|
|
176
178
|
|---|---|
|
package/docs/en/roadmap.md
CHANGED
|
@@ -11,7 +11,6 @@ The Roadmap records work beyond the current implementation; it is not a commitme
|
|
|
11
11
|
- [ ] **Backoff, circuit breaking, and manual retry**: apply bounded backoff after consecutive failures, show the reason on the Status page, and allow explicit recovery.
|
|
12
12
|
- [ ] **Deterministic sensitive-data defenses**: add secret/credential pattern detection, size limits, and audit receipts beyond LLM admission.
|
|
13
13
|
- [ ] **Automated real-WebUI E2E**: isolate DSH_HOME, storageRoot, workspace, and the port; cover light tasks, score-based review, cancellation, and failures without partial writes.
|
|
14
|
-
- [ ] **Correct `tabEnabled` semantics**: have the Host and client use the same switch so the complete Tab capability is actually registered or removed.
|
|
15
14
|
- [ ] **Correct cold-reference paths**: under every storage scope, write resolvable references that match the actual managed path.
|
|
16
15
|
|
|
17
16
|
## P1: Long-Term Maintenance and Data Operations
|
|
@@ -27,6 +26,7 @@ The Roadmap records work beyond the current implementation; it is not a commitme
|
|
|
27
26
|
## P2: Observability, Experience, and Release Engineering
|
|
28
27
|
|
|
29
28
|
- [ ] **Background-review history**: show recent scores, checkpoints, waiting/running/failed states, worker receipts, and resulting changes.
|
|
29
|
+
- [ ] **Switch to DSH's shared directory picker** (blocked on [dsh-external/issues#603](https://github.com/dsh-external/issues/issues/603)): custom storage temporarily uses a manually entered Host path because remote `browse` deployments cannot invoke the `native` picker; once DSH exposes a reusable directory-picker service for plugins, move to the provider-selected native / browse flow and retain manual entry only as a fallback if needed.
|
|
30
30
|
- [ ] **Complete internationalization**: cover commands, tool cards, Host errors, compatibility default metadata, and confirmation copy.
|
|
31
31
|
- [ ] **Multi-Memory-Space E2E**: cover automatic space creation, cross-space recall, one-pass migration routing, multiple relationship types, merge, and controlled forget.
|
|
32
32
|
- [ ] **Capacity and fault injection**: exercise real USER/MEMORY boundaries, Document LRU, revision conflicts, CLI timeouts, and mid-operation Host restarts.
|
package/docs/en/storage-model.md
CHANGED
|
@@ -50,7 +50,7 @@ follow an exact cold reference when full text is required
|
|
|
50
50
|
+-- state/ # reserved; no persistent reviewer yet
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
`storageScope` determines the entire root, not just the Mnemon databases. `state/` is currently recognized only by the status inspector; scored review watermarks remain in the running Host's memory.
|
|
53
|
+
`storageScope` determines the entire root, not just the Mnemon databases. The `workspace` scope resolves an independent `<workspace>/.mnemon` for every registered DSH workspace. The Web inspection target and current-session execution target are independent; only the latter drives agents, tools, and lifecycle hooks. `state/` is currently recognized only by the status inspector; scored review watermarks remain in the running Host's memory.
|
|
54
54
|
|
|
55
55
|
## Runtime Memory
|
|
56
56
|
|
|
@@ -12,12 +12,13 @@ $DSH_HOME/settings.yaml
|
|
|
12
12
|
|
|
13
13
|
默认通常是 `~/.dsh/settings.yaml`。当前全部配置标记为 `live` 生效;保存后会先初始化候选运行图,再原子切换 Host 服务。
|
|
14
14
|
|
|
15
|
-
Web
|
|
15
|
+
Web 设置卡编辑 `displayMode`、`storageScope` 和 `dataDir`。其他高级项需要直接修改 YAML。
|
|
16
16
|
|
|
17
17
|
## 完整示例
|
|
18
18
|
|
|
19
19
|
```yaml
|
|
20
20
|
mnemon:
|
|
21
|
+
displayMode: sidebar # sidebar | buildin
|
|
21
22
|
storageScope: global # global | workspace | custom
|
|
22
23
|
# dataDir: ~/mnemon-data # custom 时必填
|
|
23
24
|
# cliPath: /opt/homebrew/bin/mnemon
|
|
@@ -37,6 +38,7 @@ mnemon:
|
|
|
37
38
|
|
|
38
39
|
| 配置 | 默认值 | 范围 | 实现语义 |
|
|
39
40
|
|---|---:|---|---|
|
|
41
|
+
| `displayMode` | `sidebar` | `sidebar` / `buildin` | `sidebar` 挂载左侧栏独立工作台;`buildin` 恢复 DSH 原生对话区标签页;保存后实时切换且不会同时挂载两个入口 |
|
|
40
42
|
| `storageScope` | `global` | `global` / `workspace` / `custom` | 统一控制 Runtime、Documents、Memory Spaces 和预留 state 根目录 |
|
|
41
43
|
| `dataDir` | 未设置 | 绝对路径、`~` 或 `~/...` | `custom` 时必填;旧配置只设置它时自动解析为 `custom` |
|
|
42
44
|
| `cliPath` | 自动发现 | 可执行路径 | 显式指定 Mnemon CLI |
|
|
@@ -48,7 +50,7 @@ mnemon:
|
|
|
48
50
|
| `recallMode` | `guided` | `guided` / `off` | 是否注入按需 recall cue;不移除显式召回 |
|
|
49
51
|
| `writebackMode` | `guided` | `guided` / `off` | 是否注入热记忆 cue 并启用评分后台审查;不移除显式写入 |
|
|
50
52
|
| `idleReviewMs` | `30000` | 5000–600000 ms | 达标后需要连续空闲的时间 |
|
|
51
|
-
| `tabEnabled` | `true` | boolean |
|
|
53
|
+
| `tabEnabled` | `true` | boolean | 是否挂载 `displayMode` 指定的 Web 入口;关闭后 Host RPC、命令和 Agent 工具保持注册 |
|
|
52
54
|
| `writeEnabled` | `true` | boolean | 是否暴露语义写工具、写 RPC 和写命令 |
|
|
53
55
|
| `mnemon-ui.toolviews` | `false` | boolean | 对话内记忆工具卡(`mnemon_*` 调用的记忆风格卡片);默认关闭(opt-in),**保存后实时生效** |
|
|
54
56
|
| `mnemon-ui.turnBar` | `false` | boolean | 回合尾记忆活动条;默认关闭(opt-in),**保存后实时生效** |
|
|
@@ -70,10 +72,11 @@ MNEMON_DATA_DIR when non-empty
|
|
|
70
72
|
### `workspace`
|
|
71
73
|
|
|
72
74
|
```text
|
|
73
|
-
resolve(
|
|
75
|
+
Agent / 工具 / 生命周期:resolve(currentSession.header.cwd, ".mnemon")
|
|
76
|
+
Web 工作台查看:resolve(workspaceRegistry.get(selectedWorkspaceId).path, ".mnemon")
|
|
74
77
|
```
|
|
75
78
|
|
|
76
|
-
|
|
79
|
+
每个 DSH 工作区拥有独立的三层记忆根。Agent、模型工具、命令和生命周期按当前会话的 cwd 路由,不受 Web 工作台查看目标影响。工作台只能从 Host 已登记的工作区中选择,不能提交任意路径;查看目标与会话实际目录不一致时,顶部会显示两条路径并提供“一键对齐当前会话”。需要 Agent 子任务的操作在未对齐时会被 Host 拒绝,避免写入错误项目。
|
|
77
80
|
|
|
78
81
|
### `custom`
|
|
79
82
|
|
|
@@ -168,9 +171,11 @@ routingGuidance=false
|
|
|
168
171
|
-> runtime-memory prompt section remains
|
|
169
172
|
```
|
|
170
173
|
|
|
171
|
-
## `tabEnabled`
|
|
174
|
+
## 展示形态与 `tabEnabled` 界面开关
|
|
172
175
|
|
|
173
|
-
|
|
176
|
+
`displayMode=sidebar`(默认)会挂载“记忆系统”侧边栏入口和独立主内容区工作台;`displayMode=buildin` 会改为注册原有的 DSH `conversation.view` 内嵌标签页。设置页保存后会先卸载当前入口再挂载目标入口,因此两种形态不会同时出现。
|
|
177
|
+
|
|
178
|
+
`tabEnabled=false` 会实时移除当前形态的 Web 入口。为避免运行中的 Agent 或命令因界面设置变化而失效,Host RPC、命令和工具不会随展示形态或总开关卸载。
|
|
174
179
|
|
|
175
180
|
## Profile patch 覆盖
|
|
176
181
|
|
|
@@ -90,7 +90,7 @@ dsh plugin --profile web remove dsh-mnemon
|
|
|
90
90
|
|
|
91
91
|
卸载不会删除记忆数据:`global` 范围数据留在 `~/.mnemon`,`workspace` / `custom` 范围数据留在对应目录,重新安装后继续可用。
|
|
92
92
|
|
|
93
|
-
临时停用自动读写而不卸载:在插件配置里关闭 `writebackMode` / `recallMode` / `lifecycleEnabled`(见[配置参考](./configuration.md)
|
|
93
|
+
临时停用自动读写而不卸载:在插件配置里关闭 `writebackMode` / `recallMode` / `lifecycleEnabled`(见[配置参考](./configuration.md)的“开关交互”)。只想隐藏 Web 工作台时设置 `tabEnabled=false`;Host RPC、命令和 Agent 工具保持可用。
|
|
94
94
|
|
|
95
95
|
## 4. 选择存储范围
|
|
96
96
|
|
|
@@ -100,19 +100,21 @@ dsh plugin --profile web remove dsh-mnemon
|
|
|
100
100
|
dsh --profile web
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
在“设置 ->
|
|
103
|
+
在“设置 -> 记忆系统”独立配置页先选择展示形态:默认 `sidebar` 使用左侧栏独立工作台,`buildin` 使用原有对话区内嵌标签页;保存后实时切换。再选择存储范围:
|
|
104
104
|
|
|
105
105
|
| 范围 | 根目录 | 适合场景 |
|
|
106
106
|
|---|---|---|
|
|
107
107
|
| `global` | `MNEMON_DATA_DIR` 或 `~/.mnemon` | 多个工作区共享同一套记忆 |
|
|
108
|
-
| `workspace` | DSH
|
|
108
|
+
| `workspace` | 每个 DSH 工作区根目录下的 `.mnemon` | 项目隔离与跨工作区查看 |
|
|
109
109
|
| `custom` | `dataDir` | 显式磁盘、挂载卷或专用数据目录 |
|
|
110
110
|
|
|
111
111
|
设置写入 `$DSH_HOME/settings.yaml`,保存后实时应用。切换范围不会搬运旧数据;需要保留时先停止写入并通过整体 ZIP 备份迁移。
|
|
112
112
|
|
|
113
|
+
选择 `workspace` 后,工作台顶部可以切换要查看的工作区。这个选择只决定工作台正在查看和维护哪一套数据;Agent 实际使用的目录始终跟随当前会话。两者不同时会出现全局提示,可一键对齐。
|
|
114
|
+
|
|
113
115
|
## 5. 创建第一个记忆体
|
|
114
116
|
|
|
115
|
-
|
|
117
|
+
使用默认 `sidebar` 时点击 DSH 左侧栏的“记忆系统”入口;使用 `buildin` 时打开对话区的“记忆系统”标签页:
|
|
116
118
|
|
|
117
119
|
1. 打开“记忆体”页。
|
|
118
120
|
2. 创建一个主题明确的记忆体,例如“项目决策”。
|
package/docs/zh-CN/interfaces.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Web 工作台
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`displayMode=sidebar`(默认)通过左侧栏打开独立工作台,`displayMode=buildin` 通过原有 DSH `conversation.view` 内嵌标签页打开同一功能界面。两种形态由设置页实时切换且不会同时挂载。主要 Web 界面跟随 DSH 全局语言和明暗主题。顶部导航分为三组,组间以分隔线呈现:「状态」独立成第一组;「运行时、记忆体、档案」对应三层存储;「沉淀、检索、实体、内容」为读写工具。默认进入「状态」页。
|
|
8
8
|
|
|
9
9
|
| 页面 | 用途 | 调用边界 |
|
|
10
10
|
|---|---|---|
|
|
@@ -91,6 +91,8 @@ worker 内调用同名工具时直接到服务层,不再委派。
|
|
|
91
91
|
|
|
92
92
|
RPC 是 DSH Host 与本插件 Web client 的内部桥,不是承诺稳定的外部 HTTP API。
|
|
93
93
|
|
|
94
|
+
工作台数据请求会携带 `sessionId` 和可选的 `workspaceId`。Host 只接受 `workspaceRegistry` 中已登记的工作区 ID:确定性读取与人工维护路由到 `workspaceId` 指向的查看根,而 Agent、工具和生命周期继续按 `sessionId` 对应 Agent 的 cwd 路由。`status.workspaceContext` 返回两条根目录和 `aligned` 状态;需要 Agent 写入的操作在未对齐时被拒绝。
|
|
95
|
+
|
|
94
96
|
### 读通道
|
|
95
97
|
|
|
96
98
|
```text
|
|
@@ -123,7 +125,7 @@ authority: loopback
|
|
|
123
125
|
| Endpoint | 行为 |
|
|
124
126
|
|---|---|
|
|
125
127
|
| `runtime-memory` | 热记忆 mutation |
|
|
126
|
-
| `supervise` |
|
|
128
|
+
| `supervise` | 工作台候选交给记忆 worker |
|
|
127
129
|
| `document` | create / update / archive |
|
|
128
130
|
| `remember` | 带可选高级约束的语义写入 |
|
|
129
131
|
| `link` | 建立关系 |
|
|
@@ -131,7 +133,7 @@ authority: loopback
|
|
|
131
133
|
| `body-create` | 创建 Memory Space |
|
|
132
134
|
| `body-update` | 更新元数据或 active |
|
|
133
135
|
|
|
134
|
-
`writeEnabled=false`
|
|
136
|
+
`writeEnabled=false` 时写通道保持稳定注册,但所有 mutation 都会在 Host 边界拒绝。
|
|
135
137
|
|
|
136
138
|
### 设置通道
|
|
137
139
|
|
package/docs/zh-CN/operations.md
CHANGED
|
@@ -108,7 +108,8 @@ no implicit delete
|
|
|
108
108
|
| 现象 | 检查与处理 |
|
|
109
109
|
|---|---|
|
|
110
110
|
| Mnemon 不可用 | 运行 `command -v mnemon`、`mnemon --version`;设置 `MNEMON_CLI_PATH` 或 `cliPath` 后重启 |
|
|
111
|
-
| 状态正常但召回为空 | 检查是否有 active Memory Space、当前 `storageScope
|
|
111
|
+
| 状态正常但召回为空 | 检查是否有 active Memory Space、当前 `storageScope`、工作台查看目录、会话实际生效目录和查询是否足够聚焦 |
|
|
112
|
+
| 工作台提示目录未对齐 | 这是安全提示:工作台正在查看另一工作区,而 Agent 仍跟随当前会话;点击“对齐当前会话”或有意保留跨工作区查看 |
|
|
112
113
|
| `memoryBodyId is required...` | active 数量不是恰好 1;让 worker 或调用方显式选择目标 |
|
|
113
114
|
| `memory body is not active for reading` | 在记忆体页激活目标;写入 inactive 可以,但读取不行 |
|
|
114
115
|
| subagent provider 错误 | 普通任务需要完整隔离能力;后台审查另需 `fork + inheritsParentContext` |
|
|
@@ -121,7 +122,7 @@ no implicit delete
|
|
|
121
122
|
| lock timeout | 检查是否有另一个实例正在写;不要删除仍属于活跃进程的 lock |
|
|
122
123
|
| invalid JSON / unexpected viz | CLI 输出协议可能不兼容;在隔离根中验证版本,不要继续写生产数据 |
|
|
123
124
|
| 远程页面可以读但不能写 | 写 RPC 强制 loopback,这是权限设计 |
|
|
124
|
-
| `tabEnabled=
|
|
125
|
+
| 左侧栏不显示“记忆系统” | 检查 `tabEnabled=true` 且 `displayMode=sidebar`;`buildin` 会显示在对话区标签页;本地 link 修改后先运行 `pnpm run build` 并重启 DSH profile |
|
|
125
126
|
| 本地 link 不反映源码 | 先运行 `pnpm run build`,再重启 DSH profile |
|
|
126
127
|
|
|
127
128
|
## 已知限制
|
|
@@ -170,7 +170,9 @@ Web 的直接检索走确定性服务;“Agent 查询”则先完成相同检
|
|
|
170
170
|
|
|
171
171
|
### Web 工作台
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
默认 `sidebar` 形态由左侧栏“记忆系统”入口打开独立主内容区工作台;可在设置中切换为 `buildin`,恢复原有对话区内嵌标签页。两种形态复用同一功能界面并实时互斥挂载。工作台提供八个页面,分为三组:「状态」独立成第一组;「运行时、记忆体、档案」对应三层存储;「沉淀、检索、实体、内容」为读写工具:
|
|
174
|
+
|
|
175
|
+
`workspace` 存储范围下,顶部选择器是独立的“查看上下文”:可以留在当前对话不变的情况下查看和维护另一个已登记 DSH 工作区。Agent、工具和生命周期使用的是“执行上下文”,始终跟随当前会话 cwd。查看与执行目录不一致时,整个工作台都会显示路径差异和一键对齐入口;需要启动 Agent 的操作在未对齐时不会执行。
|
|
174
176
|
|
|
175
177
|
| 页面 | 主要用途 |
|
|
176
178
|
|---|---|
|
package/docs/zh-CN/roadmap.md
CHANGED
|
@@ -11,7 +11,6 @@ Roadmap 记录当前实现之外的工作,不是已交付能力承诺。优先
|
|
|
11
11
|
- [ ] **退避、熔断和人工重试**:连续失败后有上限地退避,状态页展示原因并允许显式恢复。
|
|
12
12
|
- [ ] **确定性敏感信息防线**:在 LLM 准入之外增加秘密/凭据模式检测、大小限制和审计回执。
|
|
13
13
|
- [ ] **自动化真实 WebUI E2E**:隔离 DSH_HOME、storageRoot、workspace 和端口,覆盖轻任务、评分审查、取消和失败无半写入。
|
|
14
|
-
- [ ] **修正 `tabEnabled` 语义**:Host 和 client 使用同一开关,真正注册或移除完整 Tab 能力。
|
|
15
14
|
- [ ] **修正冷引用路径**:所有 storage scope 都写入与实际托管路径一致的可解析引用。
|
|
16
15
|
|
|
17
16
|
## P1:长期维护与数据运维
|
|
@@ -27,6 +26,7 @@ Roadmap 记录当前实现之外的工作,不是已交付能力承诺。优先
|
|
|
27
26
|
## P2:可观测性、体验与发布工程
|
|
28
27
|
|
|
29
28
|
- [ ] **后台审查历史**:展示最近评分、checkpoint、等待/运行/失败、worker 回执和产生的变更。
|
|
29
|
+
- [ ] **切换到 DSH 通用目录选择器**(等待 [dsh-external/issues#603](https://github.com/dsh-external/issues/issues/603)):当前自定义存储暂用手动填写 Host 路径,以避开远端 `browse` 部署无法调用 `native` picker 的问题;DSH 暴露插件可复用的 directory-picker 服务后,改用由能力提供方统一选择 native / browse 的流程,并仅在必要时保留手动输入作为兜底。
|
|
30
30
|
- [ ] **完整国际化**:覆盖命令、工具卡、Host 错误、兼容默认元数据和确认文案。
|
|
31
31
|
- [ ] **多记忆体 E2E**:覆盖自动建空间、跨空间召回、一次迁移分流、多种边、合并和受控 forget。
|
|
32
32
|
- [ ] **容量与故障注入**:真实触发 USER/MEMORY 边界、Document LRU、revision 冲突、CLI 超时和 Host 中途重启。
|
|
@@ -50,7 +50,7 @@ follow an exact cold reference when full text is required
|
|
|
50
50
|
+-- state/ # reserved; no persistent reviewer yet
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
`storageScope` 决定整个根,而不只是 Mnemon 数据库。`state/` 当前只会被状态盘点器识别;评分水位仍保存在运行中 Host 的内存中。
|
|
53
|
+
`storageScope` 决定整个根,而不只是 Mnemon 数据库。`workspace` 范围会为每个已登记 DSH 工作区解析独立的 `<workspace>/.mnemon`;Web 查看目标与当前会话执行目标彼此独立,只有后者会驱动 Agent、工具和生命周期。`state/` 当前只会被状态盘点器识别;评分水位仍保存在运行中 Host 的内存中。
|
|
54
54
|
|
|
55
55
|
## Runtime Memory
|
|
56
56
|
|