dsh-mnemon 0.1.0 → 0.1.1

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.
Files changed (111) hide show
  1. package/README.en.md +31 -2
  2. package/README.md +31 -2
  3. package/SECURITY.md +89 -0
  4. package/docs/en/README.md +1 -0
  5. package/docs/en/configuration.md +6 -1
  6. package/docs/en/getting-started.md +19 -3
  7. package/docs/en/interfaces.md +12 -0
  8. package/docs/en/operations.md +6 -2
  9. package/docs/zh-CN/README.md +1 -0
  10. package/docs/zh-CN/configuration.md +6 -1
  11. package/docs/zh-CN/getting-started.md +19 -3
  12. package/docs/zh-CN/interfaces.md +12 -0
  13. package/docs/zh-CN/operations.md +6 -2
  14. package/lib/client.js +2164 -624
  15. package/lib/client.js.map +1 -1
  16. package/lib/index.js +3608 -2457
  17. package/lib/types/activity.d.ts +32 -0
  18. package/lib/types/activity.d.ts.map +1 -0
  19. package/lib/types/activity.js +93 -0
  20. package/lib/types/activity.js.map +1 -0
  21. package/lib/types/client/MnemonPackSection.d.ts +11 -0
  22. package/lib/types/client/MnemonPackSection.d.ts.map +1 -0
  23. package/lib/types/client/MnemonPackSection.js +136 -0
  24. package/lib/types/client/MnemonPackSection.js.map +1 -0
  25. package/lib/types/client/MnemonSaveAction.d.ts +13 -0
  26. package/lib/types/client/MnemonSaveAction.d.ts.map +1 -0
  27. package/lib/types/client/MnemonSaveAction.js +141 -0
  28. package/lib/types/client/MnemonSaveAction.js.map +1 -0
  29. package/lib/types/client/MnemonSettingsCard.d.ts +11 -3
  30. package/lib/types/client/MnemonSettingsCard.d.ts.map +1 -1
  31. package/lib/types/client/MnemonSettingsCard.js +112 -48
  32. package/lib/types/client/MnemonSettingsCard.js.map +1 -1
  33. package/lib/types/client/MnemonToolviews.d.ts +19 -0
  34. package/lib/types/client/MnemonToolviews.d.ts.map +1 -0
  35. package/lib/types/client/MnemonToolviews.js +172 -0
  36. package/lib/types/client/MnemonToolviews.js.map +1 -0
  37. package/lib/types/client/MnemonTurnTail.d.ts +18 -0
  38. package/lib/types/client/MnemonTurnTail.d.ts.map +1 -0
  39. package/lib/types/client/MnemonTurnTail.js +44 -0
  40. package/lib/types/client/MnemonTurnTail.js.map +1 -0
  41. package/lib/types/client/MnemonView.d.ts.map +1 -1
  42. package/lib/types/client/MnemonView.js +19 -8
  43. package/lib/types/client/MnemonView.js.map +1 -1
  44. package/lib/types/client/anchor.d.ts +28 -0
  45. package/lib/types/client/anchor.d.ts.map +1 -0
  46. package/lib/types/client/anchor.js +46 -0
  47. package/lib/types/client/anchor.js.map +1 -0
  48. package/lib/types/client/api.d.ts +14 -1
  49. package/lib/types/client/api.d.ts.map +1 -1
  50. package/lib/types/client/api.js +56 -3
  51. package/lib/types/client/api.js.map +1 -1
  52. package/lib/types/client/dsh-compat.d.ts +21 -0
  53. package/lib/types/client/dsh-compat.d.ts.map +1 -0
  54. package/lib/types/client/dsh-compat.js +2 -0
  55. package/lib/types/client/dsh-compat.js.map +1 -0
  56. package/lib/types/client/index.d.ts.map +1 -1
  57. package/lib/types/client/index.js +131 -16
  58. package/lib/types/client/index.js.map +1 -1
  59. package/lib/types/client/locales.d.ts +252 -4
  60. package/lib/types/client/locales.d.ts.map +1 -1
  61. package/lib/types/client/locales.js +268 -20
  62. package/lib/types/client/locales.js.map +1 -1
  63. package/lib/types/client/settings.d.ts +10 -5
  64. package/lib/types/client/settings.d.ts.map +1 -1
  65. package/lib/types/client/settings.js +32 -11
  66. package/lib/types/client/settings.js.map +1 -1
  67. package/lib/types/config.d.ts +37 -1
  68. package/lib/types/config.d.ts.map +1 -1
  69. package/lib/types/config.js +78 -6
  70. package/lib/types/config.js.map +1 -1
  71. package/lib/types/contracts.d.ts +17 -38
  72. package/lib/types/contracts.d.ts.map +1 -1
  73. package/lib/types/guidance.d.ts +2 -1
  74. package/lib/types/guidance.d.ts.map +1 -1
  75. package/lib/types/guidance.js +6 -2
  76. package/lib/types/guidance.js.map +1 -1
  77. package/lib/types/index.d.ts +4 -2
  78. package/lib/types/index.d.ts.map +1 -1
  79. package/lib/types/index.js +27 -18
  80. package/lib/types/index.js.map +1 -1
  81. package/lib/types/lifecycle.d.ts +14 -1
  82. package/lib/types/lifecycle.d.ts.map +1 -1
  83. package/lib/types/lifecycle.js +81 -12
  84. package/lib/types/lifecycle.js.map +1 -1
  85. package/lib/types/live-runtime.d.ts +42 -0
  86. package/lib/types/live-runtime.d.ts.map +1 -0
  87. package/lib/types/live-runtime.js +76 -0
  88. package/lib/types/live-runtime.js.map +1 -0
  89. package/lib/types/memory-bodies.d.ts +2 -0
  90. package/lib/types/memory-bodies.d.ts.map +1 -1
  91. package/lib/types/memory-bodies.js +29 -10
  92. package/lib/types/memory-bodies.js.map +1 -1
  93. package/lib/types/pack.d.ts +74 -0
  94. package/lib/types/pack.d.ts.map +1 -0
  95. package/lib/types/pack.js +709 -0
  96. package/lib/types/pack.js.map +1 -0
  97. package/lib/types/rpc.d.ts +5 -1
  98. package/lib/types/rpc.d.ts.map +1 -1
  99. package/lib/types/rpc.js +47 -5
  100. package/lib/types/rpc.js.map +1 -1
  101. package/lib/types/runner.d.ts +2 -0
  102. package/lib/types/runner.d.ts.map +1 -1
  103. package/lib/types/runner.js +5 -0
  104. package/lib/types/runner.js.map +1 -1
  105. package/lib/types/settings.d.ts +1 -0
  106. package/lib/types/settings.d.ts.map +1 -1
  107. package/lib/types/settings.js +45 -16
  108. package/lib/types/settings.js.map +1 -1
  109. package/lib/types/tools.js +4 -2
  110. package/lib/types/tools.js.map +1 -1
  111. package/package.json +23 -12
package/README.en.md CHANGED
@@ -75,6 +75,8 @@ Reusable knowledge produced by current work
75
75
  - A local `mnemon` CLI.
76
76
  - A subagent provider supporting `outputSchema`, `toolFilter`, `persona`, and `depthLimit`. Regular semantic work prefers `spawn`; the default background review also requires a provider named `fork` that inherits parent context.
77
77
 
78
+ **Compatibility baseline**: `dsh-mnemon` 0.1.0 has been verified end-to-end on a live web profile running `@deepseek-ai/dsh` 0.1.0-rc.6 (2026-08-13 snapshot); last verified 2026-08-14. The plugin declares no fixed minimum-version matrix. DSH moves fast: before upgrading, re-run the [Getting Started](./docs/en/getting-started.md) verification steps in an isolated profile or a backed-up data directory.
79
+
78
80
  ## Quick start
79
81
 
80
82
  Install Mnemon:
@@ -108,7 +110,19 @@ For a local checkout, use an absolute path:
108
110
  dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
109
111
  ```
110
112
 
111
- Open “Settings -> Plugin Configuration -> Mnemon” to select a storage scope, then create or activate a Memory Space in the conversation's “Memory System” tab. Configuration applies after restart. Changing the scope never migrates, merges, or deletes old data automatically.
113
+ Open the dedicated “Settings -> Memory System” page to select a storage scope, then create or activate a Memory Space in the conversation's “Memory System” tab. All settings apply live after Save; the storage root switches atomically after the new directory initializes successfully. Changing the scope never migrates, merges, or deletes old data automatically.
114
+
115
+ Upgrade and uninstall (`dsh plugin` forwards to pnpm inside the profile directory):
116
+
117
+ ```sh
118
+ # Upgrade
119
+ dsh plugin --profile web update dsh-mnemon
120
+
121
+ # Uninstall (also removes its bundle registration from the profile)
122
+ dsh plugin --profile web remove dsh-mnemon
123
+ ```
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` in the plugin configuration (see the [configuration reference](./docs/en/configuration.md) for toggle interactions and the current `tabEnabled` limitation).
112
126
 
113
127
  ## Minimal configuration
114
128
 
@@ -129,6 +143,12 @@ See the [configuration reference](./docs/en/configuration.md) for every option,
129
143
 
130
144
  The Web workspace contains Status, Runtime, Memory Spaces, Documents, Distill, Recall, Entities, and Content 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. Its main interface follows DSH's global Chinese/English locale.
131
145
 
146
+ Memory also surfaces inside the conversation flow (conversation interface, **off by default**; enable each surface under Settings → Memory System → Conversation interface — changes apply live on save):
147
+
148
+ - **Memory tool cards**: every `mnemon_*` tool call renders as a memory-flavoured card — recalls show the query and hit count, writes show the subject summary — expandable to the raw arguments and structured result, with a one-click jump to the matching Memory view page;
149
+ - **Turn memory bar**: completed calls are separated into successful recalls, writes, document searches, and inspections, with failures reported independently; expand it for the exact tool names;
150
+ - **Save to memory**: every finalized assistant reply carries a “Save to memory” action; the candidate is editable, and submission routes through the isolated memory subagent (judgment, dedupe, distillation) without filling the main conversation context.
151
+
132
152
  Common commands:
133
153
 
134
154
  ```text
@@ -141,6 +161,15 @@ Common commands:
141
161
 
142
162
  The recommended lookup order is: hot memory -> active Documents -> active Memory Spaces -> the archived original referenced by a hit. Do not persist temporary progress, raw logs, secrets, or ordinary facts that can be recovered directly from the repository.
143
163
 
164
+ ## Permissions & data
165
+
166
+ - **Files**: reads/writes data directories through the local `mnemon` CLI — `~/.mnemon` for the `global` scope, a user-chosen directory for `workspace` / `custom`. The plugin never writes those directories directly, and the WebUI never reads SQLite directly. `sourcePaths` cannot escape the originating session workspace or point into the managed Documents directory.
167
+ - **Processes**: `mnemon` is started as an argument array with shell disabled, bounded output, and `SIGTERM` then `SIGKILL` on timeout.
168
+ - **Network**: the plugin and Mnemon both run locally and make no remote calls; subagent model inference uses DSH's existing provider connection.
169
+ - **Credentials**: the plugin stores and reads no credentials or API keys; model credentials are fully managed by DSH and your provider.
170
+ - **User data**: all memory content (user profile, project Documents, long-term memory) stays in local SQLite / JSON and is never uploaded.
171
+ - **Honest disclosure**: there is no deterministic credential/secret scanner yet — do not write keys, tokens, or private keys into hot memory, Documents, or Memory Spaces. For the full boundaries (process/file/Web/model) and backup/restore, see [Operations, security, and troubleshooting](./docs/en/operations.md).
172
+
144
173
  ## Documentation
145
174
 
146
175
  - [Documentation hub](./docs/en/README.md)
@@ -166,4 +195,4 @@ pnpm run verify
166
195
 
167
196
  ## License
168
197
 
169
- MIT.
198
+ MIT. For security issues, please report privately through the channels in [SECURITY.md](./SECURITY.md) instead of opening a public issue.
package/README.md CHANGED
@@ -75,6 +75,8 @@
75
75
  - 本地 `mnemon` CLI。
76
76
  - 支持 `outputSchema`、`toolFilter`、`persona` 和 `depthLimit` 的子 Agent provider。常规语义操作优先使用 `spawn`;默认后台审查还需要名为 `fork`、可继承父上下文的 provider。
77
77
 
78
+ **兼容基线**:`dsh-mnemon` 0.1.0 已在 `@deepseek-ai/dsh` 0.1.0-rc.6(2026-08-13 快照)的 live web profile 上实测通过,最后验证日期 2026-08-14。插件不声明固定的最低版本矩阵;DSH 迭代快,升级前先在隔离 profile 或已备份的数据目录中复跑[快速开始](./docs/zh-CN/getting-started.md)的验证步骤。
79
+
78
80
  ## 快速开始
79
81
 
80
82
  安装 Mnemon:
@@ -108,7 +110,19 @@ dsh plugin --profile web add "github:omdsh-dev/dsh-mnemon"
108
110
  dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
109
111
  ```
110
112
 
111
- 打开 DSH 的“设置 -> 插件配置 -> Mnemon”选择存储范围,再进入会话的“记忆系统”Tab 创建或激活记忆体。配置重启后生效;切换范围不会自动迁移、合并或删除旧数据。
113
+ 打开 DSH 的“设置 -> 记忆系统”独立配置页选择存储范围,再进入会话的“记忆系统”Tab 创建或激活记忆体。所有设置点击保存后实时生效;存储根会在新目录初始化成功后原子切换,切换范围不会自动迁移、合并或删除旧数据。
114
+
115
+ 升级与卸载(`dsh plugin` 转发给 profile 目录下的 pnpm):
116
+
117
+ ```sh
118
+ # 升级
119
+ dsh plugin --profile web update dsh-mnemon
120
+
121
+ # 卸载(同时从 profile 移除其 bundle 注册)
122
+ dsh plugin --profile web remove dsh-mnemon
123
+ ```
124
+
125
+ 卸载不会删除记忆数据:`global` 范围数据留在 `~/.mnemon`,`workspace` / `custom` 范围数据留在对应目录,重新安装后即可继续使用。若只想临时停用自动读写而不卸载,可在插件配置里关闭 `writebackMode` / `recallMode` / `lifecycleEnabled`(详见[配置参考](./docs/zh-CN/configuration.md)的“开关交互”与 `tabEnabled` 的当前限制)。
112
126
 
113
127
  ## 最小配置
114
128
 
@@ -129,6 +143,12 @@ mnemon:
129
143
 
130
144
  Web 工作台提供状态、运行时、记忆体、档案、沉淀、检索、实体、内容八个页面,分为三组:「状态」独立成第一组;「运行时、记忆体、档案」对应三层存储;「沉淀、检索、实体、内容」为读写工具。主要界面随 DSH 全局语言在中文与英文间切换。
131
145
 
146
+ 记忆也会在对话流中直接体现(对话内交互,**默认关闭**,可在「设置 → 记忆系统 → 对话界面」中逐项开启,保存即实时生效):
147
+
148
+ - **记忆工具卡**:每个 `mnemon_*` 工具调用都以记忆风格的卡片呈现——召回显示查询与命中数、写入显示对象摘要,可展开查看参数与结构化结果,并可一键跳到记忆视图对应页面;
149
+ - **回合记忆条**:完成的回合若触及记忆,回合尾会按成功结果区分召回、沉淀、档案检索和检查,并单独标出失败数;展开可见具体工具名;
150
+ - **存入记忆**:每条已定稿的助手回复旁有「存入记忆」按钮,候选内容可编辑,提交后由隔离的记忆子 Agent 判断、查重并沉淀,不占用主对话上下文。
151
+
132
152
  常用命令:
133
153
 
134
154
  ```text
@@ -141,6 +161,15 @@ Web 工作台提供状态、运行时、记忆体、档案、沉淀、检索、
141
161
 
142
162
  推荐的查询顺序是:热记忆 -> active Documents -> 已激活记忆体 -> 命中记录指向的归档原文。不要把临时进度、原始日志、秘密或可直接从仓库重新获得的普通事实写入长期记忆。
143
163
 
164
+ ## 权限与数据
165
+
166
+ - **文件**:通过本地 `mnemon` CLI 读写数据目录——`global` 范围是 `~/.mnemon`,`workspace` / `custom` 范围是用户指定的目录;插件不直接写这些目录,WebUI 也不直接读 SQLite。`sourcePaths` 不能逃出发起会话的工作区,也不能指向受管 Documents 目录。
167
+ - **进程**:`mnemon` 以参数数组启动且禁用 shell,输出有上限,超时先 `SIGTERM` 再 `SIGKILL`。
168
+ - **网络**:插件与 Mnemon 均本地运行,不发起远程调用;子 Agent 的模型推理走 DSH 已有的 provider 连接。
169
+ - **凭据**:插件不存储、不读取任何凭据或 API key,模型凭据完全由 DSH 与 provider 管理。
170
+ - **用户数据**:记忆内容(用户画像、项目档案、长期记忆)全部落在本地 SQLite / JSON,不会上传。
171
+ - **诚实披露**:当前没有确定性的凭据/秘密检测器,请勿向热记忆、Documents 或 Memory Spaces 写入密钥、token 或私钥。完整边界(进程/文件/Web/模型)与备份恢复见[运维、安全与故障排查](./docs/zh-CN/operations.md)。
172
+
144
173
  ## 文档
145
174
 
146
175
  - [文档中心](./docs/zh-CN/README.md)
@@ -166,4 +195,4 @@ pnpm run verify
166
195
 
167
196
  ## License
168
197
 
169
- MIT。
198
+ MIT。发现安全问题请通过 [SECURITY.md](./SECURITY.md) 中的渠道私下报告,不要直接开公开 issue。
package/SECURITY.md ADDED
@@ -0,0 +1,89 @@
1
+ # Security Policy
2
+
3
+ **English** | [简体中文](#简体中文)
4
+
5
+ ## Supported versions
6
+
7
+ | Version | Supported |
8
+ |---|---|
9
+ | 0.1.x (npm `dsh-mnemon`) | ✅ |
10
+
11
+ Only the latest published version receives security fixes. The plugin targets the DSH mainline snapshot it was verified against; see the compatibility baseline in [README.en.md](./README.en.md).
12
+
13
+ ## Reporting a vulnerability
14
+
15
+ Please **do not open a public issue** for security vulnerabilities.
16
+
17
+ Report privately through one of these channels, in order of preference:
18
+
19
+ 1. **GitHub Security Advisories** — use the “Report a vulnerability” flow on the [Security tab](../../security) of this repository (private vulnerability reporting).
20
+ 2. **Email** — `grivn.wang@gmail.com` (maintainer). Use a subject prefix like `[dsh-mnemon security]`.
21
+
22
+ Please include, when possible:
23
+
24
+ - affected version(s);
25
+ - a minimal reproduction or proof of concept;
26
+ - whether the issue is already exploited publicly;
27
+ - your disclosure preference (e.g., coordinated disclosure, credit, embargo).
28
+
29
+ ## What to expect
30
+
31
+ - Acknowledge receipt within **7 days**.
32
+ - A fix or a reasoned “not a vulnerability” response within **30 days** where feasible.
33
+ - Credit in the release notes unless you prefer to stay anonymous.
34
+
35
+ ## Scope
36
+
37
+ In scope:
38
+
39
+ - The plugin bundle (`lib/`, `cordis.patch.yml`): data-loss, privilege-escalation, path-traversal, secret-leak, and memory-corruption style issues in plugin code.
40
+ - The control plane: lock handling, revision conflict checks, atomic writes, and subagent isolation boundaries.
41
+ - The WebUI: XSS or injection via rendered memory content.
42
+
43
+ Out of scope:
44
+
45
+ - Issues in upstream dependencies (`mnemon`, `cordis`, DSH core, React) — report those upstream; we will still help triage and pin workarounds.
46
+ - Missing features, documentation gaps, and non-security bugs — use regular issues.
47
+ - Credentials or secrets you intentionally stored in memory data yourself; the plugin has no secret scanner (see the disclosure in the README).
48
+
49
+ ## Known limitations
50
+
51
+ - There is no deterministic credential/secret detection today. Do not write keys, tokens, or private keys into Runtime Memory, Documents, or Memory Spaces.
52
+ - Memory data is local; the plugin makes no remote calls, so remote-code-execution exposure is limited to what DSH and your providers already expose.
53
+
54
+ ---
55
+
56
+ ## 简体中文
57
+
58
+ ### 支持的版本
59
+
60
+ | 版本 | 支持 |
61
+ |---|---|
62
+ | 0.1.x(npm `dsh-mnemon`) | ✅ |
63
+
64
+ 仅最新发布版本获得安全修复。插件以验证时的 DSH mainline 快照为兼容基线,见 [README.md](./README.md)。
65
+
66
+ ### 报告漏洞
67
+
68
+ 请**不要**为安全漏洞开公开 issue,按优先级使用以下渠道私下报告:
69
+
70
+ 1. **GitHub Security Advisories**:在本仓库 [Security 页](../../security) 使用“Report a vulnerability”(私密漏洞报告)。
71
+ 2. **邮件**:`grivn.wang@gmail.com`(维护者),主题加 `[dsh-mnemon security]` 前缀。
72
+
73
+ 请尽量附上:受影响版本、最小复现或 PoC、是否已被公开利用、披露偏好(协调披露 / 署名 / 保密期)。
74
+
75
+ ### 预期
76
+
77
+ - **7 天**内确认收到;可行情况下 **30 天**内给出修复或“非漏洞”的结论。
78
+ - 除非你要求匿名,否则在发布说明中致谢。
79
+
80
+ ### 范围
81
+
82
+ **范围内**:插件 bundle 与 `cordis.patch.yml` 中的数据丢失、提权、路径穿越、秘密泄露类问题;控制面(锁、revision 冲突检查、原子写、子 Agent 隔离);WebUI 对记忆内容渲染的 XSS/注入。
83
+
84
+ **范围外**:上游依赖(`mnemon`、`cordis`、DSH 核心、React)自身的问题(报告给上游,我们可协助定位与临时规避);功能缺失、文档问题(走普通 issue);你自行写入记忆数据中的凭据或秘密(插件当前没有秘密检测器,见 README 披露)。
85
+
86
+ ### 已知限制
87
+
88
+ - 当前没有确定性的凭据/秘密检测,请勿向热记忆、Documents 或 Memory Spaces 写入密钥、token、私钥。
89
+ - 记忆数据全部本地存储,插件不发起远程调用;远程代码执行面受限于 DSH 与你的 provider 既有暴露面。
package/docs/en/README.md CHANGED
@@ -16,6 +16,7 @@ These documents use the current implementation as the source of truth. The root
16
16
  8. [Operations, Security, and Troubleshooting](./operations.md): locks, permissions, backup, recovery, and known limitations.
17
17
  9. [Development and Verification](./development.md): module structure, tests, builds, and release checks.
18
18
  10. [Roadmap](./roadmap.md): unfinished reliability, operations, and internationalization work.
19
+ 11. [Security Policy](../../SECURITY.md): supported versions, private vulnerability-reporting channels, and scope.
19
20
 
20
21
  ## Terminology
21
22
 
@@ -10,7 +10,7 @@ The plugin registers the `mnemon` namespace with the DSH settings service. User
10
10
  $DSH_HOME/settings.yaml
11
11
  ```
12
12
 
13
- The default is commonly `~/.dsh/settings.yaml`. All current settings are marked as taking effect on `restart`; restart the DSH Host after saving them.
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
15
  The Web settings card edits only `storageScope` and `dataDir`. Other advanced settings must be changed directly in YAML.
16
16
 
@@ -50,6 +50,11 @@ mnemon:
50
50
  | `idleReviewMs` | `30000` | 5000–600000 ms | Required continuous idle time after the threshold is reached |
51
51
  | `tabEnabled` | `true` | boolean | Currently gates only Host Mnemon data RPC; the client Tab is still registered—see the limitation below |
52
52
  | `writeEnabled` | `true` | boolean | Whether to expose semantic write tools, write RPC, and write commands |
53
+ | `mnemon-ui.toolviews` | `false` | boolean | In-conversation memory tool cards for `mnemon_*` calls; off by default (opt-in), **applies live after saving** |
54
+ | `mnemon-ui.turnBar` | `false` | boolean | Turn-tail memory activity bar; off by default (opt-in), **applies live after saving** |
55
+ | `mnemon-ui.saveAction` | `false` | boolean | “Save to memory” action on finalized assistant replies; off by default (opt-in), **applies live after saving** |
56
+
57
+ Both the `mnemon` Host/storage namespace and the `mnemon-ui` browser-presentation namespace apply live. The storage root switches atomically only after the new runtime graph initializes successfully. Legacy `mnemon.conversationInteraction` values remain a migration default, but new saves write only to `mnemon-ui`.
53
58
 
54
59
  ## Storage Scopes
55
60
 
@@ -28,7 +28,7 @@ both paths require
28
28
  -> depthLimit
29
29
  ```
30
30
 
31
- The plugin does not declare a fixed minimum-version matrix for DSH and Mnemon in its code. Before upgrading, run the verification steps on this page against an isolated data directory.
31
+ The plugin does not declare a fixed minimum-version matrix for DSH and Mnemon in its code. **Verified baseline**: `dsh-mnemon` 0.1.0 has been verified end-to-end on a live web profile running `@deepseek-ai/dsh` 0.1.0-rc.6 (2026-08-13 snapshot); last verified 2026-08-14. Before upgrading, run the verification steps on this page against an isolated data directory.
32
32
 
33
33
  ## 2. Install Mnemon
34
34
 
@@ -76,6 +76,22 @@ dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
76
76
 
77
77
  The plugin package's `cordis.patch.yml` mounts the Host plugin; the Web client bundle registers the session workspace and plugin settings card.
78
78
 
79
+ ### Upgrade and uninstall
80
+
81
+ `dsh plugin` is a pnpm forwarder that runs inside the profile directory:
82
+
83
+ ```sh
84
+ # Upgrade
85
+ dsh plugin --profile web update dsh-mnemon
86
+
87
+ # Uninstall (also removes its bundle registration from the profile)
88
+ dsh plugin --profile web remove dsh-mnemon
89
+ ```
90
+
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
+
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”). Note that `tabEnabled=false` currently disables the RPC but does not hide the tab entry — do not rely on it for UI removal.
94
+
79
95
  ## 4. Choose a Storage Scope
80
96
 
81
97
  Start the DSH Web profile:
@@ -84,7 +100,7 @@ Start the DSH Web profile:
84
100
  dsh --profile web
85
101
  ```
86
102
 
87
- Under “Settings -> Plugin Configuration -> Mnemon,” choose:
103
+ On the dedicated “Settings -> Memory System” page, choose:
88
104
 
89
105
  | Scope | Root directory | Best suited for |
90
106
  |---|---|---|
@@ -92,7 +108,7 @@ Under “Settings -> Plugin Configuration -> Mnemon,” choose:
92
108
  | `workspace` | `.mnemon` under the DSH Host startup directory | Project isolation |
93
109
  | `custom` | `dataDir` | An explicit disk, mounted volume, or dedicated data directory |
94
110
 
95
- Settings are written to `$DSH_HOME/settings.yaml` and take effect after restarting DSH. Switching scopes does not move existing data; to preserve it, stop all writes first and manually copy the entire old root directory.
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.
96
112
 
97
113
  ## 5. Create Your First Memory Space
98
114
 
@@ -19,6 +19,18 @@ The main Web interface follows DSH's global language and light/dark theme. The t
19
19
 
20
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
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 |
31
+
32
+ `turn-activity` and `assistant-message` are new read-only endpoints sharing the existing Host channel and error semantics. The rendering-extension contracts behind the in-conversation interaction and the follow-up inline memory-highlight plan are recorded in the Mnemon document “dsh-mnemon 对话内记忆交互侦察”.
33
+
22
34
  ## Model Tools
23
35
 
24
36
  ### Read-Only Tools
@@ -53,6 +53,10 @@ The serial queue does not replace coordination across DSH processes. When multip
53
53
 
54
54
  These boundaries are not a secret scanner. There is currently no deterministic credential/secret detection. Do not submit keys, tokens, private keys, or raw sensitive logs to hot memory, Documents, or Memory Spaces.
55
55
 
56
+ ### Security reporting
57
+
58
+ Report vulnerabilities privately through the channels in [SECURITY.md](../../SECURITY.md) (GitHub Security Advisories or maintainer email) — do not open a public issue. Typical in-scope issues include data loss, path traversal, lock/revision-check bypasses, subagent isolation breaks, and injection via memory content rendered by the WebUI.
59
+
56
60
  ## Backup
57
61
 
58
62
  All three tiers share `storageRoot`. A consistent backup should cover the entire root, not just `mnemon.db`:
@@ -90,7 +94,7 @@ If `USER.md` / `MEMORY.md` is damaged, the control layer can repair it from a va
90
94
  The plugin does not migrate data automatically:
91
95
 
92
96
  ```text
93
- old scope -- change setting + restart --> new empty or existing scope
97
+ old scope -- change setting + save --> new empty or existing scope
94
98
 
95
99
  no implicit copy
96
100
  no implicit merge
@@ -108,7 +112,7 @@ When migration is required, stop writes and copy the complete root. Two roots ca
108
112
  | `memoryBodyId is required...` | The active count is not exactly 1; have the worker or caller select a target explicitly |
109
113
  | `memory body is not active for reading` | Activate the target in Overview; writing to an inactive space is allowed, but reading is not |
110
114
  | Subagent provider error | Regular tasks require the full isolation capabilities; background review additionally requires `fork + inheritsParentContext` |
111
- | Settings have no effect after saving | All options take effect after restart |
115
+ | Settings have no effect after saving | Check the UI error; all options should apply live after a successful Save |
112
116
  | Custom directory is rejected | Use an absolute path, `~`, or `~/...` |
113
117
  | Document has no workspace | The session must correspond to a live root Agent and include cwd in its session header |
114
118
  | Source path is rejected | The path must stay within the session workspace and must not reference the managed Documents directory |
@@ -16,6 +16,7 @@
16
16
  8. [运维、安全与故障排查](./operations.md):锁、权限、备份、恢复和已知限制。
17
17
  9. [开发与验证](./development.md):模块结构、测试、构建和发布检查。
18
18
  10. [Roadmap](./roadmap.md):尚未完成的可靠性、运维和国际化工作。
19
+ 11. [安全策略](../../SECURITY.md):支持版本、漏洞私密报告渠道与范围。
19
20
 
20
21
  ## 术语
21
22
 
@@ -10,7 +10,7 @@
10
10
  $DSH_HOME/settings.yaml
11
11
  ```
12
12
 
13
- 默认通常是 `~/.dsh/settings.yaml`。当前全部配置标记为 `restart` 生效;保存后需要重启 DSH Host。
13
+ 默认通常是 `~/.dsh/settings.yaml`。当前全部配置标记为 `live` 生效;保存后会先初始化候选运行图,再原子切换 Host 服务。
14
14
 
15
15
  Web 设置卡只编辑 `storageScope` 和 `dataDir`。其他高级项需要直接修改 YAML。
16
16
 
@@ -50,6 +50,11 @@ mnemon:
50
50
  | `idleReviewMs` | `30000` | 5000–600000 ms | 达标后需要连续空闲的时间 |
51
51
  | `tabEnabled` | `true` | boolean | 当前只门控 Host Mnemon 数据 RPC;客户端 Tab 仍会注册,见下方限制 |
52
52
  | `writeEnabled` | `true` | boolean | 是否暴露语义写工具、写 RPC 和写命令 |
53
+ | `mnemon-ui.toolviews` | `false` | boolean | 对话内记忆工具卡(`mnemon_*` 调用的记忆风格卡片);默认关闭(opt-in),**保存后实时生效** |
54
+ | `mnemon-ui.turnBar` | `false` | boolean | 回合尾记忆活动条;默认关闭(opt-in),**保存后实时生效** |
55
+ | `mnemon-ui.saveAction` | `false` | boolean | 已定稿助手回复旁的「存入记忆」按钮;默认关闭(opt-in),**保存后实时生效** |
56
+
57
+ `mnemon` Host/存储命名空间和 `mnemon-ui` 浏览器呈现命名空间都实时生效。存储根只会在新运行图初始化成功后原子切换;旧版 `mnemon.conversationInteraction` 仍会作为迁移默认值读取,但新保存只写入 `mnemon-ui`。
53
58
 
54
59
  ## 存储范围
55
60
 
@@ -28,7 +28,7 @@ both paths require
28
28
  -> depthLimit
29
29
  ```
30
30
 
31
- 插件没有在代码中声明固定的 DSH/Mnemon 最低版本矩阵。升级前应先在隔离数据目录中运行本页的验证步骤。
31
+ 插件没有在代码中声明固定的 DSH/Mnemon 最低版本矩阵。**已验证基线**:`dsh-mnemon` 0.1.0 在 `@deepseek-ai/dsh` 0.1.0-rc.6(2026-08-13 快照)的 live web profile 上实测通过,最后验证日期 2026-08-14。升级前应先在隔离数据目录中运行本页的验证步骤。
32
32
 
33
33
  ## 2. 安装 Mnemon
34
34
 
@@ -76,6 +76,22 @@ dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
76
76
 
77
77
  插件包中的 `cordis.patch.yml` 会挂载 Host 插件;Web client bundle 会注册会话工作台和插件设置卡。
78
78
 
79
+ ### 升级与卸载
80
+
81
+ `dsh plugin` 是 pnpm 转发器,在 profile 目录下执行:
82
+
83
+ ```sh
84
+ # 升级
85
+ dsh plugin --profile web update dsh-mnemon
86
+
87
+ # 卸载(同时从 profile 移除其 bundle 注册)
88
+ dsh plugin --profile web remove dsh-mnemon
89
+ ```
90
+
91
+ 卸载不会删除记忆数据:`global` 范围数据留在 `~/.mnemon`,`workspace` / `custom` 范围数据留在对应目录,重新安装后继续可用。
92
+
93
+ 临时停用自动读写而不卸载:在插件配置里关闭 `writebackMode` / `recallMode` / `lifecycleEnabled`(见[配置参考](./configuration.md)的“开关交互”)。注意 `tabEnabled=false` 目前只停掉 RPC 而不隐藏 Tab 入口,不应依赖它做 UI 卸载。
94
+
79
95
  ## 4. 选择存储范围
80
96
 
81
97
  启动 DSH Web profile:
@@ -84,7 +100,7 @@ dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
84
100
  dsh --profile web
85
101
  ```
86
102
 
87
- 在“设置 -> 插件配置 -> Mnemon”选择:
103
+ 在“设置 -> 记忆系统”独立配置页选择:
88
104
 
89
105
  | 范围 | 根目录 | 适合场景 |
90
106
  |---|---|---|
@@ -92,7 +108,7 @@ dsh --profile web
92
108
  | `workspace` | DSH Host 启动目录下的 `.mnemon` | 项目隔离 |
93
109
  | `custom` | `dataDir` | 显式磁盘、挂载卷或专用数据目录 |
94
110
 
95
- 设置写入 `$DSH_HOME/settings.yaml`,重启 DSH 后应用。切换范围不会搬运旧数据;需要保留时先停止写入并手工复制整个旧根目录。
111
+ 设置写入 `$DSH_HOME/settings.yaml`,保存后实时应用。切换范围不会搬运旧数据;需要保留时先停止写入并通过整体 ZIP 备份迁移。
96
112
 
97
113
  ## 5. 创建第一个记忆体
98
114
 
@@ -19,6 +19,18 @@
19
19
 
20
20
  图谱每 15 秒同步一次,也可以手动刷新。自然布局、均匀重置、拖拽和键盘微调只影响客户端展示,不修改 Mnemon 数据。
21
21
 
22
+ ### 对话内交互
23
+
24
+ 记忆系统在对话流内以三个 DSH 原生槽位呈现,全部为纯增量注册,不替换任何官方渲染:
25
+
26
+ | 槽位 | 呈现 | 数据与交互 |
27
+ |---|---|---|
28
+ | `tool.call.toolview`(按工具名 keyed) | 每个 `mnemon_*` 工具调用渲染为记忆风格卡片行:状态点、Mnemon 标、召回/沉淀标题与工具专属摘要;悬停出现「在记忆视图中打开」与「查看轨迹」 | 摘要从调用参数与已定稿结果 JSON 提取(recall/document-search 显示命中数、status 显示引擎健康、bodies 显示目录统计等);展开显示参数与结果原文;跳转经 `mnemon:anchor` 事件通道落到记忆视图对应页(带查询 seed) |
29
+ | `conversation.chat.turnTail`(chain) | 回合尾动作行上方一行「本回合记忆 · 召回 N · 沉淀 M · 档案检索 K」;展开列出具体工具名,并可跳到状态页 | 通过只读 RPC `turn-activity` 从宿主持久会话日志按 turn 统计 `mnemon_*` 调用;chain `select` 拒绝未完成回合,无记忆活动的回合不渲染任何内容 |
30
+ | `conversation.chat.assistant-actions`(list,id `mnemon-save`) | 已定稿助手回复动作区(反馈按钮旁)的「存入记忆」按钮;点击展开候选面板 | 面板经只读 RPC `assistant-message` 按 messageId 提取消息文本为可编辑候选;提交走既有写 RPC `supervise`(受监督写回:记忆子 Agent 判断、查重、选择记忆体),显示子 Agent 回执;只读部署提前禁用并提示 |
31
+
32
+ `turn-activity`、`assistant-message` 为新增只读端点,与既有端点共用同一 Host 通道与错误语义。对话内交互的渲染扩展面契约与后续「正文内联记忆高亮」方案见 Mnemon 档案「dsh-mnemon 对话内记忆交互侦察」。
33
+
22
34
  ## 模型工具
23
35
 
24
36
  ### 只读工具
@@ -53,6 +53,10 @@ mnemon --version
53
53
 
54
54
  这些边界不等于秘密扫描器。当前还没有确定性的凭据/秘密检测;不要向热记忆、Documents 或 Memory Spaces 提交密钥、token、私钥和原始敏感日志。
55
55
 
56
+ ### 安全问题报告
57
+
58
+ 发现安全漏洞请按 [SECURITY.md](../../SECURITY.md) 的渠道私下报告(GitHub Security Advisories 或维护者邮箱),不要开公开 issue。范围内的典型问题包括:数据丢失、路径穿越、锁与 revision 检查绕过、子 Agent 隔离破坏、WebUI 对记忆内容的注入。
59
+
56
60
  ## 备份
57
61
 
58
62
  三层数据共用 `storageRoot`,一致备份应覆盖整个根,而不是只复制 `mnemon.db`:
@@ -90,7 +94,7 @@ mnemon --version
90
94
  插件不会自动迁移数据:
91
95
 
92
96
  ```text
93
- old scope -- change setting + restart --> new empty or existing scope
97
+ old scope -- change setting + save --> new empty or existing scope
94
98
 
95
99
  no implicit copy
96
100
  no implicit merge
@@ -108,7 +112,7 @@ no implicit delete
108
112
  | `memoryBodyId is required...` | active 数量不是恰好 1;让 worker 或调用方显式选择目标 |
109
113
  | `memory body is not active for reading` | 在记忆体页激活目标;写入 inactive 可以,但读取不行 |
110
114
  | subagent provider 错误 | 普通任务需要完整隔离能力;后台审查另需 `fork + inheritsParentContext` |
111
- | 设置保存后无变化 | 所有选项重启后生效 |
115
+ | 设置保存后无变化 | 检查界面错误提示;所有选项应在保存成功后实时生效 |
112
116
  | custom 目录被拒绝 | 使用绝对路径、`~` 或 `~/...` |
113
117
  | Document 无 workspace | 会话必须对应 live root Agent,并在 session header 中带 cwd |
114
118
  | source path 被拒绝 | 路径必须留在会话工作区内,且不能引用托管 Documents 目录 |