dsh-mnemon 0.1.5 → 0.1.6
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 +5 -5
- package/README.zh-CN.md +5 -5
- package/lib/client.js +353 -347
- package/lib/index.js +129 -46
- package/lib/types/activity.d.ts +2 -18
- package/lib/types/channels.d.ts +1 -4
- package/lib/types/client/MnemonLogo.d.ts +0 -1
- package/lib/types/client/MnemonPackSection.d.ts +1 -2
- package/lib/types/client/MnemonSaveAction.d.ts +1 -2
- package/lib/types/client/MnemonSettingsCard.d.ts +1 -3
- package/lib/types/client/MnemonTurnTail.d.ts +1 -2
- package/lib/types/client/MnemonView.d.ts +1 -3
- package/lib/types/client/MnemonViewAppearance.d.ts +0 -1
- package/lib/types/client/anchor.d.ts +0 -1
- package/lib/types/client/api.d.ts +1 -9
- package/lib/types/client/dsh-compat.d.ts +0 -1
- package/lib/types/client/index.d.ts +0 -1
- package/lib/types/client/locales.d.ts +4 -1
- package/lib/types/client/settings.d.ts +1 -2
- package/lib/types/client/sidebar-entry.d.ts +0 -1
- package/lib/types/client/workspace-controller.d.ts +0 -1
- package/lib/types/client/workspace-mount.d.ts +1 -3
- package/lib/types/commands.d.ts +0 -1
- package/lib/types/config-values.d.ts +0 -1
- package/lib/types/config.d.ts +6 -80
- package/lib/types/contracts.d.ts +2 -60
- package/lib/types/documents.d.ts +2 -79
- package/lib/types/guidance.d.ts +0 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/lifecycle.d.ts +3 -45
- package/lib/types/live-runtime.d.ts +0 -1
- package/lib/types/memory-bodies.d.ts +3 -20
- package/lib/types/pack.d.ts +2 -48
- package/lib/types/process.d.ts +0 -1
- package/lib/types/review-activity.d.ts +2 -16
- package/lib/types/rpc.d.ts +0 -1
- package/lib/types/runner.d.ts +15 -11
- package/lib/types/runtime-memory.d.ts +2 -59
- package/lib/types/service.d.ts +3 -149
- package/lib/types/settings.d.ts +1 -4
- package/lib/types/shared/contracts.d.ts +609 -0
- package/lib/types/storage-scope.d.ts +2 -29
- package/lib/types/subagent.d.ts +2 -15
- package/lib/types/tools.d.ts +0 -1
- package/lib/types/version-updates.d.ts +2 -29
- package/package.json +8 -7
- package/docs/README.md +0 -8
- package/docs/assets/diagrams/en/memory-system-flow.png +0 -0
- package/docs/assets/diagrams/en/project-architecture.svg +0 -182
- package/docs/assets/diagrams/zh-CN/memory-system-flow.png +0 -0
- package/docs/assets/diagrams/zh-CN/project-architecture.svg +0 -182
- 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 +0 -48
- package/docs/en/architecture.md +0 -133
- package/docs/en/configuration.md +0 -234
- package/docs/en/development.md +0 -198
- package/docs/en/getting-started.md +0 -199
- package/docs/en/interfaces.md +0 -181
- package/docs/en/operations.md +0 -173
- package/docs/en/project-overview.md +0 -145
- package/docs/en/roadmap.md +0 -41
- package/docs/en/storage-model.md +0 -185
- package/docs/en/ui-guide.md +0 -156
- package/docs/en/workflows.md +0 -290
- package/docs/zh-CN/README.md +0 -48
- package/docs/zh-CN/architecture.md +0 -133
- package/docs/zh-CN/configuration.md +0 -234
- package/docs/zh-CN/development.md +0 -198
- package/docs/zh-CN/getting-started.md +0 -199
- package/docs/zh-CN/interfaces.md +0 -181
- package/docs/zh-CN/operations.md +0 -173
- package/docs/zh-CN/project-overview.md +0 -145
- package/docs/zh-CN/roadmap.md +0 -41
- package/docs/zh-CN/storage-model.md +0 -185
- package/docs/zh-CN/ui-guide.md +0 -160
- package/docs/zh-CN/workflows.md +0 -290
- package/lib/client.js.map +0 -1
- package/lib/types/activity.d.ts.map +0 -1
- package/lib/types/activity.js +0 -93
- package/lib/types/activity.js.map +0 -1
- package/lib/types/channels.d.ts.map +0 -1
- package/lib/types/channels.js +0 -4
- package/lib/types/channels.js.map +0 -1
- package/lib/types/client/MnemonLogo.d.ts.map +0 -1
- package/lib/types/client/MnemonLogo.js +0 -6
- package/lib/types/client/MnemonLogo.js.map +0 -1
- package/lib/types/client/MnemonPackSection.d.ts.map +0 -1
- package/lib/types/client/MnemonPackSection.js +0 -136
- package/lib/types/client/MnemonPackSection.js.map +0 -1
- package/lib/types/client/MnemonSaveAction.d.ts.map +0 -1
- package/lib/types/client/MnemonSaveAction.js +0 -90
- package/lib/types/client/MnemonSaveAction.js.map +0 -1
- package/lib/types/client/MnemonSettingsCard.d.ts.map +0 -1
- package/lib/types/client/MnemonSettingsCard.js +0 -155
- package/lib/types/client/MnemonSettingsCard.js.map +0 -1
- package/lib/types/client/MnemonTurnTail.d.ts.map +0 -1
- package/lib/types/client/MnemonTurnTail.js +0 -56
- package/lib/types/client/MnemonTurnTail.js.map +0 -1
- package/lib/types/client/MnemonView.d.ts.map +0 -1
- package/lib/types/client/MnemonView.js +0 -1594
- package/lib/types/client/MnemonView.js.map +0 -1
- package/lib/types/client/MnemonViewAppearance.d.ts.map +0 -1
- package/lib/types/client/MnemonViewAppearance.js +0 -67
- package/lib/types/client/MnemonViewAppearance.js.map +0 -1
- package/lib/types/client/anchor.d.ts.map +0 -1
- package/lib/types/client/anchor.js +0 -46
- package/lib/types/client/anchor.js.map +0 -1
- package/lib/types/client/api.d.ts.map +0 -1
- package/lib/types/client/api.js +0 -150
- package/lib/types/client/api.js.map +0 -1
- package/lib/types/client/dsh-compat.d.ts.map +0 -1
- package/lib/types/client/dsh-compat.js +0 -2
- package/lib/types/client/dsh-compat.js.map +0 -1
- package/lib/types/client/index.d.ts.map +0 -1
- package/lib/types/client/index.js +0 -161
- package/lib/types/client/index.js.map +0 -1
- package/lib/types/client/locales.d.ts.map +0 -1
- package/lib/types/client/locales.js +0 -1172
- package/lib/types/client/locales.js.map +0 -1
- package/lib/types/client/settings.d.ts.map +0 -1
- package/lib/types/client/settings.js +0 -70
- package/lib/types/client/settings.js.map +0 -1
- package/lib/types/client/sidebar-entry.d.ts.map +0 -1
- package/lib/types/client/sidebar-entry.js +0 -134
- package/lib/types/client/sidebar-entry.js.map +0 -1
- package/lib/types/client/workspace-controller.d.ts.map +0 -1
- package/lib/types/client/workspace-controller.js +0 -21
- package/lib/types/client/workspace-controller.js.map +0 -1
- package/lib/types/client/workspace-mount.d.ts.map +0 -1
- package/lib/types/client/workspace-mount.js +0 -138
- package/lib/types/client/workspace-mount.js.map +0 -1
- package/lib/types/commands.d.ts.map +0 -1
- package/lib/types/commands.js +0 -104
- package/lib/types/commands.js.map +0 -1
- package/lib/types/config-values.d.ts.map +0 -1
- package/lib/types/config-values.js +0 -4
- package/lib/types/config-values.js.map +0 -1
- package/lib/types/config.d.ts.map +0 -1
- package/lib/types/config.js +0 -127
- package/lib/types/config.js.map +0 -1
- package/lib/types/contracts.d.ts.map +0 -1
- package/lib/types/contracts.js +0 -2
- package/lib/types/contracts.js.map +0 -1
- package/lib/types/documents.d.ts.map +0 -1
- package/lib/types/documents.js +0 -495
- package/lib/types/documents.js.map +0 -1
- package/lib/types/guidance.d.ts.map +0 -1
- package/lib/types/guidance.js +0 -34
- package/lib/types/guidance.js.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.js +0 -55
- package/lib/types/index.js.map +0 -1
- package/lib/types/lifecycle.d.ts.map +0 -1
- package/lib/types/lifecycle.js +0 -456
- package/lib/types/lifecycle.js.map +0 -1
- package/lib/types/live-runtime.d.ts.map +0 -1
- package/lib/types/live-runtime.js +0 -146
- package/lib/types/live-runtime.js.map +0 -1
- package/lib/types/memory-bodies.d.ts.map +0 -1
- package/lib/types/memory-bodies.js +0 -186
- package/lib/types/memory-bodies.js.map +0 -1
- package/lib/types/pack.d.ts.map +0 -1
- package/lib/types/pack.js +0 -709
- package/lib/types/pack.js.map +0 -1
- package/lib/types/process.d.ts.map +0 -1
- package/lib/types/process.js +0 -65
- package/lib/types/process.js.map +0 -1
- package/lib/types/review-activity.d.ts.map +0 -1
- package/lib/types/review-activity.js +0 -37
- package/lib/types/review-activity.js.map +0 -1
- package/lib/types/rpc.d.ts.map +0 -1
- package/lib/types/rpc.js +0 -384
- package/lib/types/rpc.js.map +0 -1
- package/lib/types/runner.d.ts.map +0 -1
- package/lib/types/runner.js +0 -198
- package/lib/types/runner.js.map +0 -1
- package/lib/types/runtime-memory.d.ts.map +0 -1
- package/lib/types/runtime-memory.js +0 -415
- package/lib/types/runtime-memory.js.map +0 -1
- package/lib/types/service.d.ts.map +0 -1
- package/lib/types/service.js +0 -512
- package/lib/types/service.js.map +0 -1
- package/lib/types/settings.d.ts.map +0 -1
- package/lib/types/settings.js +0 -103
- package/lib/types/settings.js.map +0 -1
- package/lib/types/storage-scope.d.ts.map +0 -1
- package/lib/types/storage-scope.js +0 -179
- package/lib/types/storage-scope.js.map +0 -1
- package/lib/types/subagent.d.ts.map +0 -1
- package/lib/types/subagent.js +0 -624
- package/lib/types/subagent.js.map +0 -1
- package/lib/types/tools.d.ts.map +0 -1
- package/lib/types/tools.js +0 -341
- package/lib/types/tools.js.map +0 -1
- package/lib/types/version-updates.d.ts.map +0 -1
- package/lib/types/version-updates.js +0 -383
- package/lib/types/version-updates.js.map +0 -1
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
# Getting Started
|
|
2
|
-
|
|
3
|
-
[简体中文](../zh-CN/getting-started.md) | **English** | [Documentation hub](./README.md)
|
|
4
|
-
|
|
5
|
-
This guide goes from a blank environment to the first verified recall. It uses Sidebar and global storage by default. If installation is complete, jump to [First verification](#6-complete-first-verification).
|
|
6
|
-
|
|
7
|
-
## 1. Prerequisites
|
|
8
|
-
|
|
9
|
-
You need:
|
|
10
|
-
|
|
11
|
-
- a DSH Web profile that starts successfully;
|
|
12
|
-
- a locally executable `mnemon` CLI;
|
|
13
|
-
- a DSH subagent provider for isolated memory tasks.
|
|
14
|
-
|
|
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
|
-
|
|
17
|
-
The project does not declare a fixed minimum DSH / Mnemon matrix. This guide and its screenshots target dsh-mnemon v0.1.5. Back up and repeat this verification against an isolated root before upgrading.
|
|
18
|
-
|
|
19
|
-
## 2. Install Mnemon
|
|
20
|
-
|
|
21
|
-
Homebrew Cask is recommended on macOS:
|
|
22
|
-
|
|
23
|
-
```sh
|
|
24
|
-
brew install --cask mnemon-dev/tap/mnemon
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Go works on macOS and Linux:
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
go install github.com/mnemon-dev/mnemon@latest
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Verify the binary:
|
|
34
|
-
|
|
35
|
-
```sh
|
|
36
|
-
mnemon --version
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
On Windows, the official release provides ZIP archives for AMD64 and ARM64. The following PowerShell installs v0.2.3 under the auto-discovered per-user Programs directory and verifies it against the published checksum:
|
|
40
|
-
|
|
41
|
-
```powershell
|
|
42
|
-
$version = '0.2.3'
|
|
43
|
-
$arch = if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq 'Arm64') { 'arm64' } else { 'amd64' }
|
|
44
|
-
$archiveName = "mnemon_${version}_windows_${arch}.zip"
|
|
45
|
-
$releaseBase = "https://github.com/mnemon-dev/mnemon/releases/download/v${version}"
|
|
46
|
-
$archive = Join-Path $env:TEMP $archiveName
|
|
47
|
-
$checksumFile = Join-Path $env:TEMP "mnemon_${version}_checksums.txt"
|
|
48
|
-
Invoke-WebRequest "${releaseBase}/${archiveName}" -OutFile $archive
|
|
49
|
-
Invoke-WebRequest "${releaseBase}/checksums.txt" -OutFile $checksumFile
|
|
50
|
-
$line = Get-Content $checksumFile | Where-Object { $_.EndsWith(" $archiveName") } | Select-Object -First 1
|
|
51
|
-
if (-not $line) { throw "Checksum entry not found for $archiveName" }
|
|
52
|
-
$expected = (($line -split '\s+')[0]).ToLowerInvariant()
|
|
53
|
-
$actual = (Get-FileHash -Path $archive -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
54
|
-
if ($actual -ne $expected) { throw "Checksum mismatch for $archiveName" }
|
|
55
|
-
$installDir = Join-Path $env:LOCALAPPDATA 'Programs\mnemon'
|
|
56
|
-
New-Item -ItemType Directory -Force -Path $installDir | Out-Null
|
|
57
|
-
Expand-Archive -Path $archive -DestinationPath $installDir -Force
|
|
58
|
-
$mnemon = Join-Path $installDir 'mnemon.exe'
|
|
59
|
-
& $mnemon --version
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Go remains an alternative when a Go toolchain is already available:
|
|
63
|
-
|
|
64
|
-
```powershell
|
|
65
|
-
go install github.com/mnemon-dev/mnemon@latest
|
|
66
|
-
$mnemonBin = go env GOBIN
|
|
67
|
-
if (-not $mnemonBin) {
|
|
68
|
-
$mnemonBin = Join-Path (((go env GOPATH) -split ';')[0]) 'bin'
|
|
69
|
-
}
|
|
70
|
-
$mnemon = Join-Path $mnemonBin 'mnemon.exe'
|
|
71
|
-
& $mnemon --version
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
On Windows, dsh-mnemon discovers native `mnemon.exe` from `PATH`, an exported `GOBIN` or `GOPATH`, the default `%USERPROFILE%\go\bin`, `%LOCALAPPDATA%\Programs\mnemon`, and Program Files. `.cmd` and `.bat` wrappers are not accepted because CLI calls deliberately run without a shell.
|
|
75
|
-
|
|
76
|
-
If DSH still cannot find the binary, set `MNEMON_CLI_PATH` or add an absolute path to the user settings file instead of replacing the plugin's profile patch:
|
|
77
|
-
|
|
78
|
-
```yaml
|
|
79
|
-
mnemon:
|
|
80
|
-
cliPath: 'C:\Users\alice\AppData\Local\Programs\mnemon\mnemon.exe'
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
`mnemon status` opens the effective Store and may initialize data or run upstream migrations, so it is not a side-effect-free installation probe.
|
|
84
|
-
|
|
85
|
-
## 3. Install dsh-mnemon
|
|
86
|
-
|
|
87
|
-
Install into the Web profile:
|
|
88
|
-
|
|
89
|
-
```sh
|
|
90
|
-
dsh plugin --profile web add dsh-mnemon
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Use an absolute path for a development checkout:
|
|
94
|
-
|
|
95
|
-
```sh
|
|
96
|
-
dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Then start or restart the profile:
|
|
100
|
-
|
|
101
|
-
```sh
|
|
102
|
-
dsh --profile web
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Upgrade and uninstall:
|
|
106
|
-
|
|
107
|
-
```sh
|
|
108
|
-
dsh plugin --profile web update dsh-mnemon
|
|
109
|
-
dsh plugin --profile web remove dsh-mnemon
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Uninstall removes the plugin registration, not memory data in global, workspace, or custom roots.
|
|
113
|
-
|
|
114
|
-
## 4. Choose entry point and storage
|
|
115
|
-
|
|
116
|
-
Open **Settings → Memory System**:
|
|
117
|
-
|
|
118
|
-
[](../assets/screenshots/settings-memory-system.png)
|
|
119
|
-
|
|
120
|
-
### Display mode
|
|
121
|
-
|
|
122
|
-
- **Sidebar** (default): a dedicated workbench opened from the DSH sidebar; recommended for most users.
|
|
123
|
-
- **Buildin**: the original conversation-area tab with its established visuals.
|
|
124
|
-
|
|
125
|
-
### Storage location
|
|
126
|
-
|
|
127
|
-
| Scope | Root | Best suited for |
|
|
128
|
-
|---|---|---|
|
|
129
|
-
| **Global** (default) | `MNEMON_DATA_DIR` or `~/.mnemon` | Sharing one memory set across workspaces |
|
|
130
|
-
| **Workspace** | `<workspace>/.mnemon` | Project isolation with cross-workspace inspection in the workbench |
|
|
131
|
-
| **Custom** | `dataDir` | A dedicated disk, mounted volume, or explicit directory |
|
|
132
|
-
|
|
133
|
-
Save initializes a candidate runtime graph before atomically switching the Host. The page clears stale state and reloads automatically—no browser refresh is needed. Changing scope never migrates, merges, or deletes old data.
|
|
134
|
-
|
|
135
|
-
In Workspace mode, the workbench selector changes only what data is being inspected. Agents, tools, and lifecycle hooks always use the current conversation's effective root. The header reports a mismatch and offers one-click alignment.
|
|
136
|
-
|
|
137
|
-
## 5. Open the Sidebar workbench
|
|
138
|
-
|
|
139
|
-
Click **Memory System** in the sidebar, then start on **Status**:
|
|
140
|
-
|
|
141
|
-
[](../assets/screenshots/status-overview.png)
|
|
142
|
-
|
|
143
|
-
Confirm that:
|
|
144
|
-
|
|
145
|
-
- the top right says Connected;
|
|
146
|
-
- Mnemon and dsh-mnemon show installed versions;
|
|
147
|
-
- the storage root matches your chosen scope;
|
|
148
|
-
- Runtime, Memory Spaces, and Documents report no errors.
|
|
149
|
-
|
|
150
|
-
If Mnemon is unavailable, run `command -v mnemon` and `mnemon --version` on macOS/Linux, or `Get-Command mnemon` and `Test-Path "$env:LOCALAPPDATA\Programs\mnemon\mnemon.exe"` on Windows PowerShell. See [Troubleshooting](./operations.md#troubleshooting) for other symptoms.
|
|
151
|
-
|
|
152
|
-
## 6. Complete first verification
|
|
153
|
-
|
|
154
|
-
### Create a Memory Space
|
|
155
|
-
|
|
156
|
-
1. Open **Memory Spaces → Overview**.
|
|
157
|
-
2. Select **Create Memory Space**.
|
|
158
|
-
3. Use a narrow name such as “Project Decisions.”
|
|
159
|
-
4. Describe what belongs there and which tasks should recall it.
|
|
160
|
-
5. Enable read activation.
|
|
161
|
-
|
|
162
|
-
### Remember one test item
|
|
163
|
-
|
|
164
|
-
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.
|
|
165
|
-
|
|
166
|
-
Writing starts only after confirmation. Canceling the dialog changes no state.
|
|
167
|
-
|
|
168
|
-
### Verify recall
|
|
169
|
-
|
|
170
|
-
1. Open **Memory Spaces → Recall**.
|
|
171
|
-
2. Ask a concrete question that should match the item.
|
|
172
|
-
3. Use **Direct recall** first to inspect raw evidence.
|
|
173
|
-
4. Confirm the result retains its Memory Space, category, importance, score, and ID.
|
|
174
|
-
|
|
175
|
-
You can also use conversation commands:
|
|
176
|
-
|
|
177
|
-
```text
|
|
178
|
-
/mnemon status
|
|
179
|
-
/mnemon recall <focused query>
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
## 7. Verify memory inside a conversation
|
|
183
|
-
|
|
184
|
-
Ask a question that genuinely depends on history and allow the Agent to decide whether recall helps. After completion:
|
|
185
|
-
|
|
186
|
-
- Turn memory appears below the reply if the turn used memory tools.
|
|
187
|
-
- Expanding shows exact tools and links to their pages.
|
|
188
|
-
- Save to memory opens an editable confirmation; canceling performs no write.
|
|
189
|
-
|
|
190
|
-
[](../assets/screenshots/conversation-turn-memory.png)
|
|
191
|
-
|
|
192
|
-
Ordinary conversation should not force recall. Current requests, repository files, and live tool results outrank historical content.
|
|
193
|
-
|
|
194
|
-
## 8. Next steps
|
|
195
|
-
|
|
196
|
-
- Use the [Sidebar and conversation UI guide](./ui-guide.md) to learn every page.
|
|
197
|
-
- Use the [storage model](./storage-model.md) to choose Runtime, Documents, or Memory Spaces.
|
|
198
|
-
- Use the [configuration reference](./configuration.md) for Workspace scope, read-only behavior, and lifecycle switches.
|
|
199
|
-
- Use the [operations guide](./operations.md) to export your first ZIP backup and establish a pre-upgrade checklist.
|
package/docs/en/interfaces.md
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
# WebUI, Tools, Commands, and RPC
|
|
2
|
-
|
|
3
|
-
[简体中文](../zh-CN/interfaces.md) | **English** | [Documentation hub](./README.md)
|
|
4
|
-
|
|
5
|
-
This page is an integration reference. For daily use, start with the [Sidebar and conversation UI guide](./ui-guide.md).
|
|
6
|
-
|
|
7
|
-
## User-facing entry points
|
|
8
|
-
|
|
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 |
|
|
17
|
-
|
|
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.
|
|
19
|
-
|
|
20
|
-
## Model tools
|
|
21
|
-
|
|
22
|
-
### Read-only tools
|
|
23
|
-
|
|
24
|
-
| Tool | Purpose | Root Agent path |
|
|
25
|
-
|---|---|---|
|
|
26
|
-
| `mnemon_status` | Aggregated CLI, configuration, storage, and directory status | Direct service |
|
|
27
|
-
| `mnemon_memory_bodies` | Read Memory Space directory and statistics | Direct service |
|
|
28
|
-
| `mnemon_recall` | Recall from one or more active spaces | `spawn` recall worker |
|
|
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 |
|
|
31
|
-
|
|
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.
|
|
33
|
-
|
|
34
|
-
### Tools available with `writeEnabled=true`
|
|
35
|
-
|
|
36
|
-
| Tool | Purpose | Root Agent path |
|
|
37
|
-
|---|---|---|
|
|
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 |
|
|
41
|
-
| `mnemon_link` | Create a typed relationship | `spawn` write worker |
|
|
42
|
-
| `mnemon_forget` | Soft-delete an exact ID | `spawn` write worker |
|
|
43
|
-
| `mnemon_memory_body_create` | Create an independent Memory Space | `spawn` write worker |
|
|
44
|
-
| `mnemon_memory_body_update` | Update name, description, or active state | `spawn` write worker |
|
|
45
|
-
| `mnemon_memory_body_merge` | Non-destructive import merge | `spawn` write worker |
|
|
46
|
-
|
|
47
|
-
When a worker invokes the same tool name, it reaches the service directly and is not delegated recursively.
|
|
48
|
-
|
|
49
|
-
## Tool admission
|
|
50
|
-
|
|
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.
|
|
55
|
-
|
|
56
|
-
`mnemon_forget` is a destructive semantic action. Use it only on explicit request or after confirming that content is wrong or obsolete.
|
|
57
|
-
|
|
58
|
-
## `/mnemon` commands
|
|
59
|
-
|
|
60
|
-
```text
|
|
61
|
-
/mnemon
|
|
62
|
-
/mnemon status
|
|
63
|
-
/mnemon recall <query>
|
|
64
|
-
/mnemon related <full memory ID>
|
|
65
|
-
/mnemon remember <content>
|
|
66
|
-
/mnemon forget <exact ID>
|
|
67
|
-
```
|
|
68
|
-
|
|
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.
|
|
72
|
-
- Command recall returns at most 10 results.
|
|
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`:
|
|
87
|
-
|
|
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.
|
|
92
|
-
|
|
93
|
-
## RPC channels
|
|
94
|
-
|
|
95
|
-
RPC is an internal Host-to-client bridge, not a stable external HTTP API.
|
|
96
|
-
|
|
97
|
-
### Read channel
|
|
98
|
-
|
|
99
|
-
```text
|
|
100
|
-
channel: /dsh-mnemon-read
|
|
101
|
-
authority: trusted-host
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
| Endpoint | Behavior |
|
|
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 |
|
|
108
|
-
| `runtime-memory` | Runtime snapshot |
|
|
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
|
|
117
|
-
|
|
118
|
-
```text
|
|
119
|
-
channel: /dsh-mnemon-write
|
|
120
|
-
authority: loopback
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
| Endpoint | Behavior |
|
|
124
|
-
|---|---|
|
|
125
|
-
| `runtime-memory` | Hot-memory mutation |
|
|
126
|
-
| `supervise` | Submit a candidate to the memory worker |
|
|
127
|
-
| `document` | create / update / archive |
|
|
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 |
|
|
131
|
-
|
|
132
|
-
With `writeEnabled=false`, the channel remains registered but mutations are rejected at the Host boundary.
|
|
133
|
-
|
|
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
|
|
151
|
-
|
|
152
|
-
```text
|
|
153
|
-
channel: /dsh-mnemon-settings
|
|
154
|
-
authority: loopback
|
|
155
|
-
namespaces: mnemon, mnemon-ui
|
|
156
|
-
endpoints: get, mutate
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Mutations use settings revisions to prevent overwriting concurrent edits. `mnemon` owns Host/storage settings; `mnemon-ui` owns `turnBar` and `saveAction`.
|
|
160
|
-
|
|
161
|
-
## npm exports
|
|
162
|
-
|
|
163
|
-
The root package exposes Host composition and core classes:
|
|
164
|
-
|
|
165
|
-
```text
|
|
166
|
-
apply
|
|
167
|
-
Config / resolveConfig
|
|
168
|
-
createRunner
|
|
169
|
-
MnemonService
|
|
170
|
-
RuntimeMemoryController
|
|
171
|
-
DocumentManager
|
|
172
|
-
StorageScopeInspector
|
|
173
|
-
MnemonSubagentCoordinator
|
|
174
|
-
MnemonLifecycle
|
|
175
|
-
```
|
|
176
|
-
|
|
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.
|
|
178
|
-
|
|
179
|
-
## Internationalization
|
|
180
|
-
|
|
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
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
# Operations, Security, and Troubleshooting
|
|
2
|
-
|
|
3
|
-
[简体中文](../zh-CN/operations.md) | **English** | [Documentation hub](./README.md)
|
|
4
|
-
|
|
5
|
-
## Health checks
|
|
6
|
-
|
|
7
|
-
Check the binary, then open **Status** in the workbench:
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
command -v mnemon
|
|
11
|
-
mnemon --version
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Windows PowerShell:
|
|
15
|
-
|
|
16
|
-
```powershell
|
|
17
|
-
Get-Command mnemon -ErrorAction SilentlyContinue
|
|
18
|
-
Test-Path "$env:LOCALAPPDATA\Programs\mnemon\mnemon.exe"
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
```text
|
|
22
|
-
/mnemon status
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
[](../assets/screenshots/status-overview.png)
|
|
26
|
-
|
|
27
|
-
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.
|
|
28
|
-
|
|
29
|
-
## Version checks and updates
|
|
30
|
-
|
|
31
|
-
**Check versions** on Status opens the version panel:
|
|
32
|
-
|
|
33
|
-
[](../assets/screenshots/version-check.png)
|
|
34
|
-
|
|
35
|
-
- **Mnemon CLI**: installed from `mnemon --version`; latest from Mnemon GitHub Releases.
|
|
36
|
-
- **dsh-mnemon**: installed from the running package; latest from the npm registry.
|
|
37
|
-
|
|
38
|
-
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.
|
|
39
|
-
|
|
40
|
-
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.
|
|
41
|
-
|
|
42
|
-
## Backup and recovery
|
|
43
|
-
|
|
44
|
-
### Recommended: Settings ZIP
|
|
45
|
-
|
|
46
|
-
**Settings → Memory System → Backup and migration** operates on the **currently effective root**:
|
|
47
|
-
|
|
48
|
-
- **Export ZIP** includes Runtime, Documents, and every Memory Space.
|
|
49
|
-
- **Import ZIP** previews, validates, then merges into the effective root.
|
|
50
|
-
- Packs include `manifest.json`, SHA-256 inventory, and component summaries.
|
|
51
|
-
- Export/import hold component locks; a Memory Space with an uncheckpointed WAL is rejected.
|
|
52
|
-
- Import checks paths, counts, compressed/expanded limits, JSON schemas, Document hashes, registry consistency, and SQLite headers.
|
|
53
|
-
- Merge is staged before replacing component directories; commit failure restores pre-import directories.
|
|
54
|
-
|
|
55
|
-
The UI offers safe merge, not “overwrite everything”:
|
|
56
|
-
|
|
57
|
-
- Runtime deduplicates by target and content.
|
|
58
|
-
- Identical Document ID + hash is skipped; conflicting content receives a new ID.
|
|
59
|
-
- Identical Memory Space ID + database is skipped; conflicting content receives a new ID.
|
|
60
|
-
|
|
61
|
-
Import is governed by `writeEnabled` and is rejected in read-only deployments. A ZIP contains private memory—encrypt it, restrict access, and rehearse recovery.
|
|
62
|
-
|
|
63
|
-
### Recovery rehearsal
|
|
64
|
-
|
|
65
|
-
1. Select an isolated `custom` directory and save.
|
|
66
|
-
2. Confirm **Current directory ZIP** points to that root.
|
|
67
|
-
3. Select the backup, review its preview, then import.
|
|
68
|
-
4. Check Runtime, Documents, Memory Spaces, and directories on Status.
|
|
69
|
-
5. Run one focused direct recall and read one Document.
|
|
70
|
-
6. Only after verification decide whether to switch a production scope.
|
|
71
|
-
|
|
72
|
-
Never restore directly into the only production root without another backup.
|
|
73
|
-
|
|
74
|
-
### Filesystem snapshot
|
|
75
|
-
|
|
76
|
-
To preserve reserved `state` or take an offline complete snapshot, stop every DSH / Mnemon process using the root and copy:
|
|
77
|
-
|
|
78
|
-
```text
|
|
79
|
-
<storageRoot>/runtime
|
|
80
|
-
<storageRoot>/documents
|
|
81
|
-
<storageRoot>/data
|
|
82
|
-
<storageRoot>/state # when present; outside the built-in Pack's three data components
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Generate an inventory or checksums and rehearse recovery in isolation. A normal directory copy while writers are running is not a consistent snapshot.
|
|
86
|
-
|
|
87
|
-
## Changing storage scope
|
|
88
|
-
|
|
89
|
-
Saving `global` / `workspace` / `custom` initializes a new runtime graph before switching atomically. The page reloads automatically, but **data is not migrated**:
|
|
90
|
-
|
|
91
|
-
```text
|
|
92
|
-
old scope -- save --> new empty or existing root
|
|
93
|
-
|
|
94
|
-
no automatic copy
|
|
95
|
-
no automatic merge
|
|
96
|
-
no automatic delete
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Recommended migration: export from the old scope → switch and confirm the new root → import → verify. In Workspace mode, confirm both inspection and execution targets.
|
|
100
|
-
|
|
101
|
-
## Security boundaries
|
|
102
|
-
|
|
103
|
-
### Process
|
|
104
|
-
|
|
105
|
-
- CLI uses `spawn(command, args, { shell: false })`.
|
|
106
|
-
- stdout + stderr are capped at 2 MiB by default.
|
|
107
|
-
- Calls use `timeoutMs` and AbortSignal; cancellation sends `SIGTERM`, then `SIGKILL` after 1.5 seconds.
|
|
108
|
-
- One Runner serializes calls; separate DSH processes still rely on Mnemon / SQLite concurrency.
|
|
109
|
-
|
|
110
|
-
### Files
|
|
111
|
-
|
|
112
|
-
- Runtime, Documents, and Pack operations use in-process queues or component locks.
|
|
113
|
-
- Lock wait defaults to 5 seconds; stale threshold is 30 seconds.
|
|
114
|
-
- Writes use temporary files, staging, and rename.
|
|
115
|
-
- Runtime revisions block stale compaction; Document revisions block movement of updated originals.
|
|
116
|
-
- `sourcePaths` cannot escape the initiating workspace or point into managed Documents.
|
|
117
|
-
|
|
118
|
-
### Web and model
|
|
119
|
-
|
|
120
|
-
- Read RPC is `trusted-host`; write, settings, and backup RPC are `loopback`.
|
|
121
|
-
- The WebUI neither reads SQLite directly, starts processes, nor supplies arbitrary update commands.
|
|
122
|
-
- Workers use persona, tool allowlists, structured output, and `maxDepth: 1`.
|
|
123
|
-
- Queries, candidates, Document bodies, and historical memory are treated as untrusted data.
|
|
124
|
-
|
|
125
|
-
These boundaries are not a secret scanner. There is no deterministic credential detection; never submit keys, tokens, private keys, or raw sensitive logs.
|
|
126
|
-
|
|
127
|
-
### Security reporting
|
|
128
|
-
|
|
129
|
-
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.
|
|
130
|
-
|
|
131
|
-
## Troubleshooting
|
|
132
|
-
|
|
133
|
-
| Symptom | Check and resolution |
|
|
134
|
-
|---|---|
|
|
135
|
-
| Mnemon unavailable | macOS/Linux: run `command -v mnemon`, `mnemon --version`. Windows PowerShell: run `Get-Command mnemon`, `Test-Path "$env:LOCALAPPDATA\Programs\mnemon\mnemon.exe"`. Set `MNEMON_CLI_PATH` or `mnemon.cliPath`, then restart |
|
|
136
|
-
| 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 |
|
|
137
|
-
| Status healthy but recall empty | Check active spaces, storage scope, inspected root, effective session root, and query focus |
|
|
138
|
-
| Header reports misalignment | The workbench is inspecting another workspace; align or keep deliberate read-only inspection; Agent-backed actions are rejected |
|
|
139
|
-
| Saved settings appear unchanged | Inspect the save error; success applies live and reloads automatically without refresh |
|
|
140
|
-
| Custom directory rejected | Use an absolute path, `~`, or `~/...` |
|
|
141
|
-
| `memoryBodyId is required...` | Active count is not exactly one; select a target explicitly |
|
|
142
|
-
| `memory body is not active for reading` | Activate it in Overview; inactive writes are allowed, reads are not |
|
|
143
|
-
| Provider error | Semantic work needs full isolation capabilities; background review additionally needs `fork + inheritsParentContext` |
|
|
144
|
-
| Runtime replace exceeds capacity | Shorten it or organize first; automatic maintenance handles add overflow only |
|
|
145
|
-
| Document source path rejected | Keep it inside the session workspace and outside managed Documents |
|
|
146
|
-
| CLI timeout | Increase `timeoutMs`; large Stores may need more than 10 seconds for status or graph |
|
|
147
|
-
| Lock timeout | Check other writers; never delete a lock owned by a live process |
|
|
148
|
-
| ZIP export reports WAL busy | Wait for Memory Space writes to settle; do not bypass the uncheckpointed-WAL guard |
|
|
149
|
-
| ZIP import checksum/schema failure | The backup is damaged or incompatible; preserve the current root and never unzip over it manually |
|
|
150
|
-
| No Update button | Already current, remote check failed, or the source is link/manual; follow panel guidance |
|
|
151
|
-
| Remote page reads but cannot write | Write, settings, and backup RPC enforce loopback by design |
|
|
152
|
-
|
|
153
|
-
## Known limitations
|
|
154
|
-
|
|
155
|
-
### Feature read-only is not disk read-only
|
|
156
|
-
|
|
157
|
-
`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.
|
|
158
|
-
|
|
159
|
-
### Shared Documents scope
|
|
160
|
-
|
|
161
|
-
`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.
|
|
162
|
-
|
|
163
|
-
### Cross-system transactions
|
|
164
|
-
|
|
165
|
-
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.
|
|
166
|
-
|
|
167
|
-
### Background watermark
|
|
168
|
-
|
|
169
|
-
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.
|
|
170
|
-
|
|
171
|
-
### Versions and internationalization
|
|
172
|
-
|
|
173
|
-
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.
|