dsh-mnemon 0.1.2 → 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 +103 -129
- package/README.zh-CN.md +173 -0
- package/SECURITY.md +2 -2
- package/docs/README.md +4 -4
- package/docs/assets/diagrams/en/memory-system-flow.png +0 -0
- package/docs/assets/diagrams/zh-CN/memory-system-flow.png +0 -0
- package/docs/assets/media/dsh-mnemon-memory-system-demo-poster.jpg +0 -0
- package/docs/assets/media/dsh-mnemon-memory-system-demo.gif +0 -0
- package/docs/assets/media/dsh-mnemon-memory-system-demo.mp4 +0 -0
- package/docs/assets/screenshots/conversation-memory-jump.png +0 -0
- package/docs/assets/screenshots/conversation-save-dialog.png +0 -0
- package/docs/assets/screenshots/conversation-turn-memory.png +0 -0
- package/docs/assets/screenshots/document-create-dialog.png +0 -0
- package/docs/assets/screenshots/documents-markdown.png +0 -0
- package/docs/assets/screenshots/entities-context.png +0 -0
- package/docs/assets/screenshots/memory-content.png +0 -0
- package/docs/assets/screenshots/overview-memory-graph.png +0 -0
- package/docs/assets/screenshots/recall-agent-answer.png +0 -0
- package/docs/assets/screenshots/remember-dialog.png +0 -0
- package/docs/assets/screenshots/runtime-memory-add.png +0 -0
- package/docs/assets/screenshots/runtime-memory.png +0 -0
- package/docs/assets/screenshots/settings-memory-system.png +0 -0
- package/docs/assets/screenshots/status-overview.png +0 -0
- package/docs/assets/screenshots/version-check.png +0 -0
- package/docs/en/README.md +40 -32
- package/docs/en/architecture.md +6 -2
- package/docs/en/configuration.md +15 -6
- package/docs/en/development.md +24 -4
- package/docs/en/getting-started.md +77 -87
- package/docs/en/interfaces.md +98 -90
- package/docs/en/operations.md +103 -93
- package/docs/en/project-overview.md +90 -194
- package/docs/en/storage-model.md +6 -0
- package/docs/en/ui-guide.md +156 -0
- package/docs/zh-CN/README.md +37 -29
- package/docs/zh-CN/architecture.md +6 -2
- package/docs/zh-CN/configuration.md +15 -6
- package/docs/zh-CN/development.md +24 -4
- package/docs/zh-CN/getting-started.md +70 -80
- package/docs/zh-CN/interfaces.md +84 -76
- package/docs/zh-CN/operations.md +96 -86
- package/docs/zh-CN/project-overview.md +86 -190
- package/docs/zh-CN/storage-model.md +6 -0
- package/docs/zh-CN/ui-guide.md +160 -0
- package/lib/client.js +2354 -1944
- package/lib/client.js.map +1 -1
- package/lib/index.js +446 -39
- package/lib/types/channels.d.ts +4 -0
- package/lib/types/channels.d.ts.map +1 -0
- package/lib/types/channels.js +4 -0
- package/lib/types/channels.js.map +1 -0
- package/lib/types/client/MnemonSaveAction.d.ts.map +1 -1
- package/lib/types/client/MnemonSaveAction.js +4 -55
- package/lib/types/client/MnemonSaveAction.js.map +1 -1
- package/lib/types/client/MnemonSettingsCard.d.ts.map +1 -1
- package/lib/types/client/MnemonSettingsCard.js +4 -5
- package/lib/types/client/MnemonSettingsCard.js.map +1 -1
- package/lib/types/client/MnemonTurnTail.d.ts +3 -0
- package/lib/types/client/MnemonTurnTail.d.ts.map +1 -1
- package/lib/types/client/MnemonTurnTail.js +15 -3
- package/lib/types/client/MnemonTurnTail.js.map +1 -1
- package/lib/types/client/MnemonView.d.ts +4 -0
- package/lib/types/client/MnemonView.d.ts.map +1 -1
- package/lib/types/client/MnemonView.js +424 -97
- package/lib/types/client/MnemonView.js.map +1 -1
- package/lib/types/client/MnemonViewAppearance.d.ts +21 -0
- package/lib/types/client/MnemonViewAppearance.d.ts.map +1 -0
- package/lib/types/client/MnemonViewAppearance.js +67 -0
- package/lib/types/client/MnemonViewAppearance.js.map +1 -0
- package/lib/types/client/anchor.d.ts +1 -1
- package/lib/types/client/anchor.js +1 -1
- package/lib/types/client/api.d.ts +4 -0
- package/lib/types/client/api.d.ts.map +1 -1
- package/lib/types/client/api.js +10 -1
- package/lib/types/client/api.js.map +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/index.js +22 -25
- package/lib/types/client/index.js.map +1 -1
- package/lib/types/client/locales.d.ts +126 -294
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/locales.js +140 -308
- package/lib/types/client/locales.js.map +1 -1
- package/lib/types/client/settings.d.ts +1 -1
- package/lib/types/client/settings.d.ts.map +1 -1
- package/lib/types/client/settings.js +1 -1
- package/lib/types/client/settings.js.map +1 -1
- package/lib/types/client/sidebar-entry.d.ts +1 -1
- package/lib/types/client/sidebar-entry.d.ts.map +1 -1
- package/lib/types/client/sidebar-entry.js +3 -1
- package/lib/types/client/sidebar-entry.js.map +1 -1
- package/lib/types/client/workspace-mount.d.ts.map +1 -1
- package/lib/types/client/workspace-mount.js +8 -5
- package/lib/types/client/workspace-mount.js.map +1 -1
- package/lib/types/config.d.ts +1 -3
- package/lib/types/config.d.ts.map +1 -1
- package/lib/types/config.js +10 -12
- package/lib/types/config.js.map +1 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +2 -1
- package/lib/types/index.js.map +1 -1
- package/lib/types/lifecycle.js +3 -3
- package/lib/types/lifecycle.js.map +1 -1
- package/lib/types/memory-bodies.d.ts +1 -0
- package/lib/types/memory-bodies.d.ts.map +1 -1
- package/lib/types/memory-bodies.js +7 -0
- package/lib/types/memory-bodies.js.map +1 -1
- package/lib/types/rpc.d.ts +5 -7
- package/lib/types/rpc.d.ts.map +1 -1
- package/lib/types/rpc.js +28 -8
- package/lib/types/rpc.js.map +1 -1
- package/lib/types/service.d.ts +2 -0
- package/lib/types/service.d.ts.map +1 -1
- package/lib/types/service.js +4 -0
- package/lib/types/service.js.map +1 -1
- package/lib/types/settings.d.ts.map +1 -1
- package/lib/types/settings.js +1 -2
- package/lib/types/settings.js.map +1 -1
- package/lib/types/version-updates.d.ts +61 -0
- package/lib/types/version-updates.d.ts.map +1 -0
- package/lib/types/version-updates.js +377 -0
- package/lib/types/version-updates.js.map +1 -0
- package/package.json +23 -8
- package/README.en.md +0 -199
- package/docs/zh-CN/assets/screenshots/conversation-recall.png +0 -0
- package/docs/zh-CN/assets/screenshots/conversation-writeback.png +0 -0
- package/docs/zh-CN/assets/screenshots/documents-markdown.png +0 -0
- package/docs/zh-CN/assets/screenshots/entities-context.png +0 -0
- package/docs/zh-CN/assets/screenshots/memory-content.png +0 -0
- package/docs/zh-CN/assets/screenshots/overview-memory-graph.png +0 -0
- package/docs/zh-CN/assets/screenshots/recall-agent-answer.png +0 -0
- package/docs/zh-CN/assets/screenshots/runtime-memory.png +0 -0
- package/lib/types/client/MnemonToolviews.d.ts +0 -19
- package/lib/types/client/MnemonToolviews.d.ts.map +0 -1
- package/lib/types/client/MnemonToolviews.js +0 -172
- package/lib/types/client/MnemonToolviews.js.map +0 -1
- /package/docs/{en/assets → assets/diagrams/en}/project-architecture.svg +0 -0
- /package/docs/{zh-CN/assets → assets/diagrams/zh-CN}/project-architecture.svg +0 -0
package/docs/en/interfaces.md
CHANGED
|
@@ -1,75 +1,61 @@
|
|
|
1
1
|
# WebUI, Tools, Commands, and RPC
|
|
2
2
|
|
|
3
|
-
[简体中文](../zh-CN/interfaces.md) | **English** | [Documentation
|
|
3
|
+
[简体中文](../zh-CN/interfaces.md) | **English** | [Documentation hub](./README.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This page is an integration reference. For daily use, start with the [Sidebar and conversation UI guide](./ui-guide.md).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## User-facing entry points
|
|
8
8
|
|
|
9
|
-
|
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
| Entities | Frequent entities and entity-related context | Direct service reads |
|
|
18
|
-
| Content | Browse active Memory Spaces without recall side effects, copy or clone content, or soft-delete it | Graph reads; deletion uses a worker |
|
|
19
|
-
|
|
20
|
-
The graph synchronizes every 15 seconds and can also be refreshed manually. Natural layout, uniform reset, dragging, and keyboard adjustments affect only client-side presentation and do not modify Mnemon data.
|
|
21
|
-
|
|
22
|
-
### In-Conversation Interaction
|
|
23
|
-
|
|
24
|
-
The memory system surfaces inside the conversation flow through three native DSH slots, all purely additive registrations that replace no official rendering:
|
|
25
|
-
|
|
26
|
-
| Slot | Presentation | Data and interaction |
|
|
27
|
-
|---|---|---|
|
|
28
|
-
| `tool.call.toolview` (keyed by tool name) | Every `mnemon_*` tool call renders as a memory-flavoured card row: state dot, Mnemon mark, recall/write title, and a tool-specific summary; hovering reveals “Open in Memory view” and “Inspect” | Summaries derive from the call arguments and the settled result JSON (recall/document-search hit counts, engine health for status, catalogue stats for bodies, …); expanding shows the raw arguments and result; jumps use the `mnemon:anchor` event channel to open the matching Memory view page (with a query seed) |
|
|
29
|
-
| `conversation.chat.turnTail` (chain) | One “Turn memory · recalled N · wrote M · document search K” line above the turn-tail actions; expanding lists the exact tool names and offers a jump to the Status page | The read-only RPC `turn-activity` counts `mnemon_*` calls per turn from the Host's durable session log; the chain `select` declines open turns, and turns without memory activity render nothing |
|
|
30
|
-
| `conversation.chat.assistant-actions` (list, id `mnemon-save`) | A “Save to memory” action beside finalized assistant replies (next to feedback); clicking opens the candidate panel | The panel extracts the message text by messageId through the read-only RPC `assistant-message` into an editable candidate; submission goes through the existing `supervise` write RPC (supervised writeback: memory subagent judgment, dedupe, Memory Space choice) and shows the subagent receipt; read-only deployments are disabled up front with a note |
|
|
9
|
+
| Entry | Default | Description |
|
|
10
|
+
|---|---:|---|
|
|
11
|
+
| Sidebar | Yes | Dedicated Memory System workbench with Status, Runtime, Memory Spaces, and Documents |
|
|
12
|
+
| Buildin | No | Original `conversation.view` tab with established visuals |
|
|
13
|
+
| Turn memory | Yes | Memory-tool summary for a completed turn, with exact page links |
|
|
14
|
+
| Save to memory | Yes | Action beside finalized assistant replies; confirmation invokes supervised writing |
|
|
15
|
+
| `/mnemon` | — | Conversation command entry |
|
|
16
|
+
| Model tools | — | Structured Root Agent read/write entry |
|
|
31
17
|
|
|
32
|
-
|
|
18
|
+
Sidebar and Buildin are live, mutually exclusive mounts that share functionality, data, and Host services. The two conversation entries can be disabled independently through `mnemon-ui` settings.
|
|
33
19
|
|
|
34
|
-
## Model
|
|
20
|
+
## Model tools
|
|
35
21
|
|
|
36
|
-
### Read-
|
|
22
|
+
### Read-only tools
|
|
37
23
|
|
|
38
|
-
| Tool | Purpose | Root Agent
|
|
24
|
+
| Tool | Purpose | Root Agent path |
|
|
39
25
|
|---|---|---|
|
|
40
|
-
| `
|
|
26
|
+
| `mnemon_status` | Aggregated CLI, configuration, storage, and directory status | Direct service |
|
|
27
|
+
| `mnemon_memory_bodies` | Read Memory Space directory and statistics | Direct service |
|
|
41
28
|
| `mnemon_recall` | Recall from one or more active spaces | `spawn` recall worker |
|
|
42
|
-
| `mnemon_related` | Traverse
|
|
43
|
-
| `
|
|
44
|
-
| `mnemon_document_search` | Deterministically search managed Documents | Direct Documents control layer |
|
|
29
|
+
| `mnemon_related` | Traverse from a known ID | `spawn` related worker; Root defaults to two hops |
|
|
30
|
+
| `mnemon_document_search` | Deterministically search managed Documents | Documents control layer |
|
|
45
31
|
|
|
46
|
-
|
|
32
|
+
“Read only” means managed bodies and durable semantics do not change. `mnemon_document_search` still updates `lastAccessedAt` for LRU ordering, so feature read-only is not disk read-only.
|
|
47
33
|
|
|
48
|
-
### Tools
|
|
34
|
+
### Tools available with `writeEnabled=true`
|
|
49
35
|
|
|
50
|
-
| Tool | Purpose | Root Agent
|
|
36
|
+
| Tool | Purpose | Root Agent path |
|
|
51
37
|
|---|---|---|
|
|
52
|
-
| `mnemon_runtime_memory` | `add` / `replace` / `remove` hot memory | Deterministic control
|
|
53
|
-
| `mnemon_document_manage` | Create, update, or archive a Document | Create/update
|
|
54
|
-
| `mnemon_remember` |
|
|
38
|
+
| `mnemon_runtime_memory` | `add` / `replace` / `remove` hot memory | Deterministic control; add overflow may start a worker |
|
|
39
|
+
| `mnemon_document_manage` | Create, update, or archive a Document | Create/update deterministic; archive uses a worker |
|
|
40
|
+
| `mnemon_remember` | Retain one durable insight | `spawn` write worker |
|
|
55
41
|
| `mnemon_link` | Create a typed relationship | `spawn` write worker |
|
|
56
|
-
| `mnemon_forget` | Soft-delete
|
|
42
|
+
| `mnemon_forget` | Soft-delete an exact ID | `spawn` write worker |
|
|
57
43
|
| `mnemon_memory_body_create` | Create an independent Memory Space | `spawn` write worker |
|
|
58
44
|
| `mnemon_memory_body_update` | Update name, description, or active state | `spawn` write worker |
|
|
59
|
-
| `mnemon_memory_body_merge` |
|
|
45
|
+
| `mnemon_memory_body_merge` | Non-destructive import merge | `spawn` write worker |
|
|
60
46
|
|
|
61
|
-
When a worker
|
|
47
|
+
When a worker invokes the same tool name, it reaches the service directly and is not delegated recursively.
|
|
62
48
|
|
|
63
|
-
## Tool
|
|
49
|
+
## Tool admission
|
|
64
50
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
- Skip
|
|
51
|
+
- **Runtime**: explicit preferences, stable project conventions, environment facts, and high-frequency lessons.
|
|
52
|
+
- **Documents**: designs, investigations, procedures, postmortems, or handoffs with complete structure and rationale.
|
|
53
|
+
- **Memory Spaces**: stable facts, decisions, and insights that must survive across tasks or benefit from graph relationships.
|
|
54
|
+
- **Skip**: questions, guesses, temporary progress, completion logs, raw output, secrets, and ordinary repository facts that are easy to rediscover.
|
|
69
55
|
|
|
70
|
-
`mnemon_forget` is a destructive semantic
|
|
56
|
+
`mnemon_forget` is a destructive semantic action. Use it only on explicit request or after confirming that content is wrong or obsolete.
|
|
71
57
|
|
|
72
|
-
## `/mnemon`
|
|
58
|
+
## `/mnemon` commands
|
|
73
59
|
|
|
74
60
|
```text
|
|
75
61
|
/mnemon
|
|
@@ -80,20 +66,35 @@ When a worker calls a tool with the same name, the call goes directly to the ser
|
|
|
80
66
|
/mnemon forget <exact ID>
|
|
81
67
|
```
|
|
82
68
|
|
|
83
|
-
-
|
|
84
|
-
- `status` is
|
|
85
|
-
- `recall`, `related`, `remember`, and `forget` use the live Agent containing the command as
|
|
69
|
+
- Empty `/mnemon` equals `status`.
|
|
70
|
+
- `status` is deterministic and starts no model.
|
|
71
|
+
- `recall`, `related`, `remember`, and `forget` use the live Agent containing the command as worker parent.
|
|
86
72
|
- Command recall returns at most 10 results.
|
|
87
|
-
-
|
|
88
|
-
|
|
73
|
+
- `forget` requires one exact ID without spaces.
|
|
74
|
+
|
|
75
|
+
## In-conversation contracts
|
|
76
|
+
|
|
77
|
+
| DSH slot | Registration | Behavior |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| `conversation.chat.turnTail` | chain | `turn-activity` summarizes `mnemon_*` calls from completed turns; open turns and turns without activity render nothing |
|
|
80
|
+
| `conversation.chat.assistant-actions` | list, `id=mnemon-save` | `assistant-message` reads finalized text; `supervise` runs only after confirmation |
|
|
81
|
+
|
|
82
|
+
Both are additive and replace no official DSH rendering. The assistant-message candidate is editable and long replies are bounded by the UI preview limit. Persistence is complete only after a memory-subagent receipt.
|
|
83
|
+
|
|
84
|
+
## Workspace routing
|
|
85
|
+
|
|
86
|
+
Workbench requests carry `sessionId` and an optional `workspaceId`. The Host accepts only IDs registered in `workspaceRegistry`:
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
- deterministic reads and manual maintenance may route to the inspected root selected by `workspaceId`;
|
|
89
|
+
- Agents, tools, commands, and lifecycle hooks still route by the Agent cwd associated with `sessionId`;
|
|
90
|
+
- `status.workspaceContext` returns selected / effective roots and `aligned`;
|
|
91
|
+
- Agent-backed operations are rejected while misaligned.
|
|
91
92
|
|
|
92
|
-
RPC
|
|
93
|
+
## RPC channels
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
RPC is an internal Host-to-client bridge, not a stable external HTTP API.
|
|
95
96
|
|
|
96
|
-
### Read
|
|
97
|
+
### Read channel
|
|
97
98
|
|
|
98
99
|
```text
|
|
99
100
|
channel: /dsh-mnemon-read
|
|
@@ -102,20 +103,17 @@ authority: trusted-host
|
|
|
102
103
|
|
|
103
104
|
| Endpoint | Behavior |
|
|
104
105
|
|---|---|
|
|
106
|
+
| `status` | Aggregated service, version, lifecycle, Documents, and workspace/storage context |
|
|
107
|
+
| `versions` | Check installed/latest Mnemon and dsh-mnemon versions and installation sources |
|
|
105
108
|
| `runtime-memory` | Runtime snapshot |
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
| `search` | Direct Mnemon retrieval |
|
|
115
|
-
| `agent-search` | Evidence-bounded answer after direct retrieval |
|
|
116
|
-
| `related` | Direct relationship traversal |
|
|
117
|
-
|
|
118
|
-
### Write Channel
|
|
109
|
+
| `documents` / `document` / `document-search` | Directory, body, and deterministic search |
|
|
110
|
+
| `graph` / `bodies` | Active multi-space graph and Memory Space directory |
|
|
111
|
+
| `list` / `entities` | Durable content list and entity aggregation |
|
|
112
|
+
| `search` / `agent-search` / `related` | Direct retrieval, evidence answer, and relation traversal |
|
|
113
|
+
| `turn-activities` / `turn-activity` | Session-wide or single-turn memory-tool activity |
|
|
114
|
+
| `assistant-message` | Finalized assistant text by messageId |
|
|
115
|
+
|
|
116
|
+
### Write channel
|
|
119
117
|
|
|
120
118
|
```text
|
|
121
119
|
channel: /dsh-mnemon-write
|
|
@@ -125,29 +123,44 @@ authority: loopback
|
|
|
125
123
|
| Endpoint | Behavior |
|
|
126
124
|
|---|---|
|
|
127
125
|
| `runtime-memory` | Hot-memory mutation |
|
|
128
|
-
| `supervise` | Submit a
|
|
126
|
+
| `supervise` | Submit a candidate to the memory worker |
|
|
129
127
|
| `document` | create / update / archive |
|
|
130
|
-
| `remember` |
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `body-create` | Create a Memory Space |
|
|
134
|
-
| `body-update` | Update metadata or active state |
|
|
128
|
+
| `remember` / `link` / `forget` | Durable semantic write, relation, and soft deletion |
|
|
129
|
+
| `body-create` / `body-update` / `body-delete` | Create, edit, or physically delete a confirmed Memory Space |
|
|
130
|
+
| `version-update` | Update a named component with Host-fixed commands and arguments |
|
|
135
131
|
|
|
136
|
-
|
|
132
|
+
With `writeEnabled=false`, the channel remains registered but mutations are rejected at the Host boundary.
|
|
137
133
|
|
|
138
|
-
###
|
|
134
|
+
### Backup channel
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
channel: /dsh-mnemon-pack
|
|
138
|
+
authority: loopback
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
| Endpoint | Behavior |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `target` | Effective root and scope |
|
|
144
|
+
| `export` | Export a complete ZIP with manifest and SHA-256 checksums |
|
|
145
|
+
| `inspect` | Parse and verify an import ZIP, returning component and occupancy preview |
|
|
146
|
+
| `import` | Safely merge into the effective root; rejected in read-only mode |
|
|
147
|
+
|
|
148
|
+
Backups contain private memory, so the entire channel is loopback-only.
|
|
149
|
+
|
|
150
|
+
### Settings channel
|
|
139
151
|
|
|
140
152
|
```text
|
|
141
153
|
channel: /dsh-mnemon-settings
|
|
142
154
|
authority: loopback
|
|
155
|
+
namespaces: mnemon, mnemon-ui
|
|
143
156
|
endpoints: get, mutate
|
|
144
157
|
```
|
|
145
158
|
|
|
146
|
-
Mutations use
|
|
159
|
+
Mutations use settings revisions to prevent overwriting concurrent edits. `mnemon` owns Host/storage settings; `mnemon-ui` owns `turnBar` and `saveAction`.
|
|
147
160
|
|
|
148
|
-
## npm
|
|
161
|
+
## npm exports
|
|
149
162
|
|
|
150
|
-
The root package exposes Host
|
|
163
|
+
The root package exposes Host composition and core classes:
|
|
151
164
|
|
|
152
165
|
```text
|
|
153
166
|
apply
|
|
@@ -161,13 +174,8 @@ MnemonSubagentCoordinator
|
|
|
161
174
|
MnemonLifecycle
|
|
162
175
|
```
|
|
163
176
|
|
|
164
|
-
`dsh-mnemon/client`
|
|
165
|
-
|
|
166
|
-
## Internationalization Scope
|
|
177
|
+
`dsh-mnemon/client` exports `apply` and `inject` for the DSH client bundle. Client implementation classes and RPC endpoints are internal and should not be treated as a stable public SDK.
|
|
167
178
|
|
|
168
|
-
|
|
179
|
+
## Internationalization
|
|
169
180
|
|
|
170
|
-
|
|
171
|
-
- model-tool card titles;
|
|
172
|
-
- some Host validation and diagnostic errors;
|
|
173
|
-
- default names and descriptions written during legacy Store compatibility discovery.
|
|
181
|
+
The main Sidebar / Buildin workbench, settings, and conversation entries support Chinese and English and follow DSH locale live. Brand names, tool names, and configuration keys are not translated. `/mnemon` commands, model-tool cards, some Host errors, and compatibility metadata remain partially untranslated.
|
package/docs/en/operations.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Operations, Security, and Troubleshooting
|
|
2
2
|
|
|
3
|
-
[简体中文](../zh-CN/operations.md) | **English** | [Documentation
|
|
3
|
+
[简体中文](../zh-CN/operations.md) | **English** | [Documentation hub](./README.md)
|
|
4
4
|
|
|
5
|
-
## Health
|
|
5
|
+
## Health checks
|
|
6
6
|
|
|
7
|
-
Check the binary
|
|
7
|
+
Check the binary, then open **Status** in the workbench:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
command -v mnemon
|
|
@@ -15,142 +15,152 @@ mnemon --version
|
|
|
15
15
|
/mnemon status
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
[](../assets/screenshots/status-overview.png)
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Status shows Mnemon / dsh-mnemon versions, Runtime, Memory Spaces, Documents, and effective directories. `mnemon status` opens the effective Store and may initialize data or run upstream migrations, so it is not a completely side-effect-free probe.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
## Version checks and updates
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
- stdout + stderr have a combined default limit of 2 MiB.
|
|
26
|
-
- Every CLI call is governed by `timeoutMs` and an AbortSignal.
|
|
27
|
-
- On timeout or cancellation, the process first receives `SIGTERM`, then `SIGKILL` if it has not exited after 1.5 seconds.
|
|
28
|
-
- CLI calls within one `MnemonRunner` are serialized to avoid SQLite lock conflicts from concurrent migrations in the same process.
|
|
24
|
+
**Check versions** on Status opens the version panel:
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
[](../assets/screenshots/version-check.png)
|
|
31
27
|
|
|
32
|
-
|
|
28
|
+
- **Mnemon CLI**: installed from `mnemon --version`; latest from Mnemon GitHub Releases.
|
|
29
|
+
- **dsh-mnemon**: installed from the running package; latest from the npm registry.
|
|
33
30
|
|
|
34
|
-
-
|
|
35
|
-
- Lock acquisition waits up to 5 seconds by default; a lock is considered stale only after 30 seconds.
|
|
36
|
-
- Writes use temporary files and rename.
|
|
37
|
-
- Runtime uses a revision to prevent stale compaction from overwriting concurrent changes.
|
|
38
|
-
- Document archiving uses a numeric revision to prevent moving active source text that has since been updated.
|
|
39
|
-
- `sourcePaths` cannot escape the initiating session's workspace or point into the managed Documents directory.
|
|
31
|
+
Checking is read-only and never installs automatically. Update appears only when a newer version exists and the source is safely recognized. Mnemon supports Homebrew Cask / Formula and `go install`; dsh-mnemon supports npm installations managed by pnpm in the owning DSH Profile. `link:` / `file:` development builds and unrecognized manual installs show guidance only.
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
The Host fixes update commands and arguments. The browser cannot supply either; shell is disabled and execution/output are bounded. After an update, the UI rechecks both components and refreshes Status automatically. Mnemon applies on the next CLI call. Restart `dsh web` after updating dsh-mnemon.
|
|
42
34
|
|
|
43
|
-
|
|
44
|
-
- Memory write RPC: `loopback`.
|
|
45
|
-
- Settings RPC: `loopback`.
|
|
46
|
-
- The WebUI neither reads SQLite directly nor starts processes.
|
|
35
|
+
## Backup and recovery
|
|
47
36
|
|
|
48
|
-
###
|
|
37
|
+
### Recommended: Settings ZIP
|
|
49
38
|
|
|
50
|
-
|
|
51
|
-
- User queries, candidate content, Document bodies, and historical memories are all treated as untrusted data.
|
|
52
|
-
- The evidence-answer worker has no Mnemon tools and can use only the hits supplied by the Host.
|
|
39
|
+
**Settings → Memory System → Backup and migration** operates on the **currently effective root**:
|
|
53
40
|
|
|
54
|
-
|
|
41
|
+
- **Export ZIP** includes Runtime, Documents, and every Memory Space.
|
|
42
|
+
- **Import ZIP** previews, validates, then merges into the effective root.
|
|
43
|
+
- Packs include `manifest.json`, SHA-256 inventory, and component summaries.
|
|
44
|
+
- Export/import hold component locks; a Memory Space with an uncheckpointed WAL is rejected.
|
|
45
|
+
- Import checks paths, counts, compressed/expanded limits, JSON schemas, Document hashes, registry consistency, and SQLite headers.
|
|
46
|
+
- Merge is staged before replacing component directories; commit failure restores pre-import directories.
|
|
55
47
|
|
|
56
|
-
|
|
48
|
+
The UI offers safe merge, not “overwrite everything”:
|
|
49
|
+
|
|
50
|
+
- Runtime deduplicates by target and content.
|
|
51
|
+
- Identical Document ID + hash is skipped; conflicting content receives a new ID.
|
|
52
|
+
- Identical Memory Space ID + database is skipped; conflicting content receives a new ID.
|
|
53
|
+
|
|
54
|
+
Import is governed by `writeEnabled` and is rejected in read-only deployments. A ZIP contains private memory—encrypt it, restrict access, and rehearse recovery.
|
|
57
55
|
|
|
58
|
-
|
|
56
|
+
### Recovery rehearsal
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
1. Select an isolated `custom` directory and save.
|
|
59
|
+
2. Confirm **Current directory ZIP** points to that root.
|
|
60
|
+
3. Select the backup, review its preview, then import.
|
|
61
|
+
4. Check Runtime, Documents, Memory Spaces, and directories on Status.
|
|
62
|
+
5. Run one focused direct recall and read one Document.
|
|
63
|
+
6. Only after verification decide whether to switch a production scope.
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
Never restore directly into the only production root without another backup.
|
|
66
|
+
|
|
67
|
+
### Filesystem snapshot
|
|
68
|
+
|
|
69
|
+
To preserve reserved `state` or take an offline complete snapshot, stop every DSH / Mnemon process using the root and copy:
|
|
63
70
|
|
|
64
71
|
```text
|
|
65
72
|
<storageRoot>/runtime
|
|
66
73
|
<storageRoot>/documents
|
|
67
74
|
<storageRoot>/data
|
|
68
|
-
<storageRoot>/state # when present
|
|
75
|
+
<storageRoot>/state # when present; outside the built-in Pack's three data components
|
|
69
76
|
```
|
|
70
77
|
|
|
71
|
-
|
|
78
|
+
Generate an inventory or checksums and rehearse recovery in isolation. A normal directory copy while writers are running is not a consistent snapshot.
|
|
72
79
|
|
|
73
|
-
|
|
74
|
-
2. Record the current plugin, DSH, and `mnemon --version` versions.
|
|
75
|
-
3. Copy the entire root to a new timestamped directory.
|
|
76
|
-
4. Generate a file inventory or checksums for the backup.
|
|
77
|
-
5. Complete a recovery rehearsal in an isolated path before relying on the backup.
|
|
80
|
+
## Changing storage scope
|
|
78
81
|
|
|
79
|
-
|
|
82
|
+
Saving `global` / `workspace` / `custom` initializes a new runtime graph before switching atomically. The page reloads automatically, but **data is not migrated**:
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
```text
|
|
85
|
+
old scope -- save --> new empty or existing root
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
5. Start the system and inspect the Runtime projections, Document index, Memory Space directory, and recall.
|
|
88
|
-
6. After verification, decide whether to replace the original root.
|
|
87
|
+
no automatic copy
|
|
88
|
+
no automatic merge
|
|
89
|
+
no automatic delete
|
|
90
|
+
```
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
Recommended migration: export from the old scope → switch and confirm the new root → import → verify. In Workspace mode, confirm both inspection and execution targets.
|
|
91
93
|
|
|
92
|
-
##
|
|
94
|
+
## Security boundaries
|
|
93
95
|
|
|
94
|
-
|
|
96
|
+
### Process
|
|
95
97
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
- CLI uses `spawn(command, args, { shell: false })`.
|
|
99
|
+
- stdout + stderr are capped at 2 MiB by default.
|
|
100
|
+
- Calls use `timeoutMs` and AbortSignal; cancellation sends `SIGTERM`, then `SIGKILL` after 1.5 seconds.
|
|
101
|
+
- One Runner serializes calls; separate DSH processes still rely on Mnemon / SQLite concurrency.
|
|
98
102
|
|
|
99
|
-
|
|
100
|
-
no implicit merge
|
|
101
|
-
no implicit delete
|
|
102
|
-
```
|
|
103
|
+
### Files
|
|
103
104
|
|
|
104
|
-
|
|
105
|
+
- Runtime, Documents, and Pack operations use in-process queues or component locks.
|
|
106
|
+
- Lock wait defaults to 5 seconds; stale threshold is 30 seconds.
|
|
107
|
+
- Writes use temporary files, staging, and rename.
|
|
108
|
+
- Runtime revisions block stale compaction; Document revisions block movement of updated originals.
|
|
109
|
+
- `sourcePaths` cannot escape the initiating workspace or point into managed Documents.
|
|
105
110
|
|
|
106
|
-
|
|
111
|
+
### Web and model
|
|
107
112
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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 |
|
|
113
|
-
| `memoryBodyId is required...` | The active count is not exactly 1; have the worker or caller select a target explicitly |
|
|
114
|
-
| `memory body is not active for reading` | Activate the target in Overview; writing to an inactive space is allowed, but reading is not |
|
|
115
|
-
| Subagent provider error | Regular tasks require the full isolation capabilities; background review additionally requires `fork + inheritsParentContext` |
|
|
116
|
-
| Settings have no effect after saving | Check the UI error; all options should apply live after a successful Save |
|
|
117
|
-
| Custom directory is rejected | Use an absolute path, `~`, or `~/...` |
|
|
118
|
-
| Document has no workspace | The session must correspond to a live root Agent and include cwd in its session header |
|
|
119
|
-
| Source path is rejected | The path must stay within the session workspace and must not reference the managed Documents directory |
|
|
120
|
-
| Runtime replace exceeds capacity | Shorten the replacement or organize it explicitly first; current automatic maintenance handles only add overflow |
|
|
121
|
-
| CLI timeout | Increase `timeoutMs`; status and graph exports for large Stores may take longer than 10 seconds |
|
|
122
|
-
| Lock timeout | Check whether another instance is writing; do not delete a lock that still belongs to a live process |
|
|
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 |
|
|
124
|
-
| A remote page can read but not write | Write RPC enforces loopback by design |
|
|
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 |
|
|
126
|
-
| Local link does not reflect source | Run `pnpm run build`, then restart the DSH profile |
|
|
113
|
+
- Read RPC is `trusted-host`; write, settings, and backup RPC are `loopback`.
|
|
114
|
+
- The WebUI neither reads SQLite directly, starts processes, nor supplies arbitrary update commands.
|
|
115
|
+
- Workers use persona, tool allowlists, structured output, and `maxDepth: 1`.
|
|
116
|
+
- Queries, candidates, Document bodies, and historical memory are treated as untrusted data.
|
|
127
117
|
|
|
128
|
-
|
|
118
|
+
These boundaries are not a secret scanner. There is no deterministic credential detection; never submit keys, tokens, private keys, or raw sensitive logs.
|
|
129
119
|
|
|
130
|
-
###
|
|
120
|
+
### Security reporting
|
|
121
|
+
|
|
122
|
+
Report vulnerabilities privately through [SECURITY.md](../../SECURITY.md), not a public issue. Data loss, path traversal, lock/revision bypasses, subagent-isolation breaks, and injection through rendered memory are in scope.
|
|
131
123
|
|
|
132
|
-
|
|
124
|
+
## Troubleshooting
|
|
133
125
|
|
|
134
|
-
|
|
126
|
+
| Symptom | Check and resolution |
|
|
127
|
+
|---|---|
|
|
128
|
+
| Mnemon unavailable | Run `command -v mnemon`, `mnemon --version`; set `MNEMON_CLI_PATH` or `cliPath`, then restart |
|
|
129
|
+
| Memory System missing from sidebar | Check `tabEnabled=true`, `displayMode=sidebar`; Buildin is in the conversation area; for a local link run `pnpm run build`, then restart |
|
|
130
|
+
| Status healthy but recall empty | Check active spaces, storage scope, inspected root, effective session root, and query focus |
|
|
131
|
+
| Header reports misalignment | The workbench is inspecting another workspace; align or keep deliberate read-only inspection; Agent-backed actions are rejected |
|
|
132
|
+
| Saved settings appear unchanged | Inspect the save error; success applies live and reloads automatically without refresh |
|
|
133
|
+
| Custom directory rejected | Use an absolute path, `~`, or `~/...` |
|
|
134
|
+
| `memoryBodyId is required...` | Active count is not exactly one; select a target explicitly |
|
|
135
|
+
| `memory body is not active for reading` | Activate it in Overview; inactive writes are allowed, reads are not |
|
|
136
|
+
| Provider error | Semantic work needs full isolation capabilities; background review additionally needs `fork + inheritsParentContext` |
|
|
137
|
+
| Runtime replace exceeds capacity | Shorten it or organize first; automatic maintenance handles add overflow only |
|
|
138
|
+
| Document source path rejected | Keep it inside the session workspace and outside managed Documents |
|
|
139
|
+
| CLI timeout | Increase `timeoutMs`; large Stores may need more than 10 seconds for status or graph |
|
|
140
|
+
| Lock timeout | Check other writers; never delete a lock owned by a live process |
|
|
141
|
+
| ZIP export reports WAL busy | Wait for Memory Space writes to settle; do not bypass the uncheckpointed-WAL guard |
|
|
142
|
+
| ZIP import checksum/schema failure | The backup is damaged or incompatible; preserve the current root and never unzip over it manually |
|
|
143
|
+
| No Update button | Already current, remote check failed, or the source is link/manual; follow panel guidance |
|
|
144
|
+
| Remote page reads but cannot write | Write, settings, and backup RPC enforce loopback by design |
|
|
135
145
|
|
|
136
|
-
|
|
146
|
+
## Known limitations
|
|
137
147
|
|
|
138
|
-
###
|
|
148
|
+
### Feature read-only is not disk read-only
|
|
139
149
|
|
|
140
|
-
|
|
150
|
+
`writeEnabled=false` disables semantic mutation and Pack import, but startup may initialize/repair Runtime, Document search updates `lastAccessedAt`, and Mnemon reads may migrate a database.
|
|
141
151
|
|
|
142
|
-
###
|
|
152
|
+
### Shared Documents scope
|
|
143
153
|
|
|
144
|
-
|
|
154
|
+
`global` and `custom` can share one Document index across workspaces; records have no independent workspace-ownership field. `sourcePaths` are checked against the initiating cwd only when written.
|
|
145
155
|
|
|
146
|
-
###
|
|
156
|
+
### Cross-system transactions
|
|
147
157
|
|
|
148
|
-
|
|
158
|
+
Cold-index-first protects active content but is not a rollback-capable distributed transaction across Mnemon SQLite and the filesystem. A revision conflict after indexing may leave a duplicate reference; the system preserves data.
|
|
149
159
|
|
|
150
|
-
###
|
|
160
|
+
### Background watermark
|
|
151
161
|
|
|
152
|
-
|
|
162
|
+
Activity score, latest checkpoint, and retry state are not persisted. Host restart clears unprocessed activity. Failure backoff, circuit breaking, and manual retry are not implemented yet.
|
|
153
163
|
|
|
154
|
-
###
|
|
164
|
+
### Versions and internationalization
|
|
155
165
|
|
|
156
|
-
The main Web
|
|
166
|
+
There is no formal fixed DSH / Mnemon support matrix. The main Web interface is bilingual, while commands, tool cards, compatibility metadata, and some errors remain partially untranslated.
|