dsh-mnemon 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/README.zh-CN.md +10 -6
- package/cordis.patch.yml +78 -65
- package/lib/client.js +47 -19
- package/lib/index.js +17 -2
- package/package.json +25 -18
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<p align="center">
|
|
25
25
|
<a href="./docs/en/capabilities.md"><strong>Explore the capability map</strong></a> ·
|
|
26
26
|
<a href="./docs/en/getting-started.md">Start in five minutes</a> ·
|
|
27
|
-
<a href="./docs/en/releases/v0.5.
|
|
27
|
+
<a href="./docs/en/releases/v0.5.2.md">Read the v0.5.2 notes</a> ·
|
|
28
28
|
<a href="https://github.com/omdsh-dev/dsh-mnemon/blob/e6ca446e45bdd17991f3c7c98560456de465282b/docs/assets/media/dsh-mnemon-memory-system-demo.mp4">Watch the widescreen demo</a>
|
|
29
29
|
</p>
|
|
30
30
|
|
|
@@ -34,11 +34,15 @@
|
|
|
34
34
|
|
|
35
35
|
Runtime, Documents and Memory Spaces are independent Source plugins. A Strategy selects their instance-specific projections, retrieval routes and actions into an immutable per-turn View. Core provides only `ctx.mnemonMemory`; Sources own their data and optional pages, while Memory Spaces owns its private Provider children. The `dsh-mnemon` Starter preserves the default three-tier experience. See [Architecture](./docs/en/architecture.md) and [Plugin development](./docs/en/extensions.md).
|
|
36
36
|
|
|
37
|
-
**v0.5
|
|
37
|
+
**The v0.5 line introduces View-based Memory and independently published Source/Strategy/Provider plugins.** The documented extension exports form the supported v0.5 surface; internal paths and Host RPC remain private. Default user configuration and workflows stay compatible. Compared with v0.4, the ordinary UI adds only three disabled-by-default enhancement switches under **Settings → Memory System**—no View page or plugin-management entry. See the [v0.5.0 architecture scope](./docs/en/releases/v0.5.0.md).
|
|
38
38
|
|
|
39
39
|
v0.5.0 retains the v0.4 Sidebar behavior: Sidebar is the default; optional `displayMode: builtin` places the same Source pages in the owning conversation. Legacy `buildin` is accepted and automatically saved as `builtin`, without changing memory data. The collapsed icon aligns with neighboring Sidebar controls, and the settings-store and ZIP fixes remain included. See the [stable release notes](./docs/en/releases/v0.5.0.md) and [entry placement and scope mapping](./docs/en/configuration.md#entry-placement-displaymode-and-tabenabled).
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
v0.5.1 fixes writable settings under the released nested Desktop Sidebar and removes an Idle Review race that could reject the next conversation turn with an `already pinned` error. See the [v0.5.1 patch notes](./docs/en/releases/v0.5.1.md).
|
|
42
|
+
|
|
43
|
+
v0.5.2 makes the existing `mnemon` profile Entry an atomic switch for the complete Starter, so a retained disabled state no longer leaves v0.5 Source and Strategy Entries waiting on `mnemonMemory`. It also completes the one-time transition to independent package versions and selective publication. See the [v0.5.2 patch notes](./docs/en/releases/v0.5.2.md).
|
|
44
|
+
|
|
45
|
+
The tested DSH baseline remains 0.1.2-rc.1, with Node 20 public-entry compatibility and retained regression evidence for the previous 0.1.1-rc.2 line.
|
|
42
46
|
|
|
43
47
|
## Understand the scope in 30 seconds
|
|
44
48
|
|
|
@@ -114,7 +118,7 @@ Windows users can install the official v0.2.3-or-newer release ZIP. The expected
|
|
|
114
118
|
|
|
115
119
|
### 2. Install DSH and the plugin
|
|
116
120
|
|
|
117
|
-
The registry installation is verified against stable DSH 0.1.2-rc.1, whose complete profiles require Node.js `^22.19.0 || >=24.0.0`. The
|
|
121
|
+
The registry installation is verified against stable DSH 0.1.2-rc.1, whose complete profiles require Node.js `^22.19.0 || >=24.0.0`. The dsh-mnemon package itself retains Node.js 20 public-entry compatibility for older compatible DSH hosts. Use the exact published version below for a reproducible installation; maintainers can run the optional [alpha source compatibility workflow](./docs/en/development.md#manual-dsh-012-alpha5-source-compatibility).
|
|
118
122
|
|
|
119
123
|
```sh
|
|
120
124
|
npm install -g @deepseek-ai/dsh@0.1.2-rc.1
|
|
@@ -122,7 +126,7 @@ dsh --version
|
|
|
122
126
|
```
|
|
123
127
|
|
|
124
128
|
```sh
|
|
125
|
-
dsh plugin --profile web add dsh-mnemon
|
|
129
|
+
dsh plugin --profile web add dsh-mnemon@0.5.2
|
|
126
130
|
dsh --profile web
|
|
127
131
|
```
|
|
128
132
|
|
|
@@ -216,7 +220,7 @@ See [Operations, security, and troubleshooting](./docs/en/operations.md) for bac
|
|
|
216
220
|
| Back up, update, or troubleshoot | [Operations](./docs/en/operations.md) |
|
|
217
221
|
| Integrate tools, commands, or RPC | [Interface reference](./docs/en/interfaces.md) |
|
|
218
222
|
| Build a Source, Strategy or Memory Spaces Provider plugin | [Extension guide](./docs/en/extensions.md) |
|
|
219
|
-
| Review the stable release | [v0.5.
|
|
223
|
+
| Review the stable release | [v0.5.2 release notes](./docs/en/releases/v0.5.2.md) |
|
|
220
224
|
|
|
221
225
|
See the [documentation hub](./docs/en/README.md) for the full map.
|
|
222
226
|
|
package/README.zh-CN.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<p align="center">
|
|
25
25
|
<a href="./docs/zh-CN/capabilities.md"><strong>先看能力地图</strong></a> ·
|
|
26
26
|
<a href="./docs/zh-CN/getting-started.md">5 分钟开始</a> ·
|
|
27
|
-
<a href="./docs/zh-CN/releases/v0.5.
|
|
27
|
+
<a href="./docs/zh-CN/releases/v0.5.2.md">v0.5.2 升级说明</a> ·
|
|
28
28
|
<a href="https://github.com/omdsh-dev/dsh-mnemon/blob/e6ca446e45bdd17991f3c7c98560456de465282b/docs/assets/media/dsh-mnemon-memory-system-demo.mp4">观看宽屏实机演示</a>
|
|
29
29
|
</p>
|
|
30
30
|
|
|
@@ -34,11 +34,15 @@
|
|
|
34
34
|
|
|
35
35
|
Runtime、Documents、Memory Spaces 是独立 Source 插件;Strategy 将各实例的投影、检索 route 与 action 组合成逐回合不可变 View。Core 只提供 `ctx.mnemonMemory`,Source 拥有数据与可选页面,Memory Spaces 自己拥有内部 Provider 子节点。`dsh-mnemon` Starter 保持默认三层使用体验。详见[架构](./docs/zh-CN/architecture.md)与[插件开发](./docs/zh-CN/extensions.md)。
|
|
36
36
|
|
|
37
|
-
**v0.5
|
|
37
|
+
**v0.5 版本线引入 View-based Memory,以及独立发布的 Source/Strategy/Provider 插件。** 文档化的扩展导出构成 v0.5 支持表面,内部路径与 Host RPC 仍是私有实现。默认用户配置与使用流程保持兼容。相对 v0.4,普通界面只在“设置 → 记忆系统”增加三个默认关闭的增强开关,不增加 View 页或插件管理入口。参阅 [v0.5.0 架构范围](./docs/zh-CN/releases/v0.5.0.md)。
|
|
38
38
|
|
|
39
39
|
v0.5.0 保留 v0.4 的 Sidebar 行为:默认使用 Sidebar,可选 `displayMode: builtin` 将同一组 Source 页面放入所属会话。旧 `buildin` 可识别并自动保存为 `builtin`,不改变记忆数据;折叠图标与侧栏相邻控件对齐,settings store 与 ZIP 修复也继续保留。详见[稳定版说明](./docs/zh-CN/releases/v0.5.0.md)与[入口位置及范围映射](./docs/zh-CN/configuration.md#入口位置displaymode-与-tabenabled)。
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
v0.5.1 修复正式 Desktop 嵌套 Sidebar 下设置不可写,以及 Idle Review 竞态导致下一轮对话出现 `already pinned` 错误的问题。详见 [v0.5.1 补丁说明](./docs/zh-CN/releases/v0.5.1.md)。
|
|
42
|
+
|
|
43
|
+
v0.5.2 让既有 `mnemon` profile Entry 成为完整 Starter 的原子总开关,使保留的停用状态不再让 v0.5 Source 与 Strategy Entry 等待 `mnemonMemory`;同时完成独立包版本与选择性发布的一次性迁移。详见 [v0.5.2 补丁说明](./docs/zh-CN/releases/v0.5.2.md)。
|
|
44
|
+
|
|
45
|
+
已验证的 DSH 基线仍是 0.1.2-rc.1,同时保留 Node 20 公开入口兼容与上一条 0.1.1-rc.2 版本线的回归证据。
|
|
42
46
|
|
|
43
47
|
## 30 秒理解能力边界
|
|
44
48
|
|
|
@@ -114,7 +118,7 @@ Windows 推荐安装 v0.2.3 或更高版本的官方 ZIP;标准安装目录与
|
|
|
114
118
|
|
|
115
119
|
### 2. 安装 DSH 与插件
|
|
116
120
|
|
|
117
|
-
Registry 安装以稳定的 DSH 0.1.2-rc.1 验证;其完整 profile 需要 Node.js `^22.19.0 || >=24.0.0
|
|
121
|
+
Registry 安装以稳定的 DSH 0.1.2-rc.1 验证;其完整 profile 需要 Node.js `^22.19.0 || >=24.0.0`。dsh-mnemon 包本身仍为较旧且兼容的 DSH Host 保留 Node.js 20 公开入口兼容。下面显式指定已发布版本以保证可复现安装;维护者可按需运行 [alpha 源码兼容流程](./docs/zh-CN/development.md#手动-dsh-012-alpha5-源码兼容)。
|
|
118
122
|
|
|
119
123
|
```sh
|
|
120
124
|
npm install -g @deepseek-ai/dsh@0.1.2-rc.1
|
|
@@ -122,7 +126,7 @@ dsh --version
|
|
|
122
126
|
```
|
|
123
127
|
|
|
124
128
|
```sh
|
|
125
|
-
dsh plugin --profile web add dsh-mnemon
|
|
129
|
+
dsh plugin --profile web add dsh-mnemon@0.5.2
|
|
126
130
|
dsh --profile web
|
|
127
131
|
```
|
|
128
132
|
|
|
@@ -216,7 +220,7 @@ dsh plugin --profile headless add "link:/absolute/path/to/dsh-mnemon"
|
|
|
216
220
|
| 备份、更新或排障 | [运维指南](./docs/zh-CN/operations.md) |
|
|
217
221
|
| 接入工具、命令或 RPC | [接口参考](./docs/zh-CN/interfaces.md) |
|
|
218
222
|
| 开发 Source、Strategy 或 Memory Spaces Provider 插件 | [扩展开发指南](./docs/zh-CN/extensions.md) |
|
|
219
|
-
| 查看稳定版升级 | [v0.5.
|
|
223
|
+
| 查看稳定版升级 | [v0.5.2 发布说明](./docs/zh-CN/releases/v0.5.2.md) |
|
|
220
224
|
|
|
221
225
|
完整目录见[文档中心](./docs/zh-CN/README.md)。
|
|
222
226
|
|
package/cordis.patch.yml
CHANGED
|
@@ -2,69 +2,82 @@
|
|
|
2
2
|
# replace this config row as a whole; use user settings or environment
|
|
3
3
|
# variables for one-field overrides such as cliPath.
|
|
4
4
|
- insert:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
# Keep the v0.4 `mnemon` Entry as the public configuration target while
|
|
6
|
+
# making every v0.5 component inherit its enabled state. The expression
|
|
7
|
+
# reads the core row's own flag (rather than its effective state) to avoid
|
|
8
|
+
# recursing through this ancestor gate.
|
|
9
|
+
- id: mnemon-bundle
|
|
10
|
+
name: cordis:group
|
|
11
|
+
group: true
|
|
12
|
+
disabled: !!js >-
|
|
13
|
+
((entry) => entry.options.disabled?.__jsExpr
|
|
14
|
+
? Boolean(entry.evaluate(entry.options.disabled.__jsExpr))
|
|
15
|
+
: Boolean(entry.options.disabled))
|
|
16
|
+
([...loader.entries()].find(entry => entry.options.id === 'mnemon'))
|
|
8
17
|
config:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
18
|
+
- id: mnemon
|
|
19
|
+
# Core/Host and default settings. Sources own their independent Entries.
|
|
20
|
+
name: dsh-mnemon
|
|
21
|
+
config:
|
|
22
|
+
routingGuidance: true
|
|
23
|
+
lifecycleEnabled: true
|
|
24
|
+
recallMode: guided
|
|
25
|
+
writebackMode: guided
|
|
26
|
+
idleReviewMs: 30000
|
|
27
|
+
tabEnabled: true
|
|
28
|
+
writeEnabled: true
|
|
29
|
+
remoteAccess: read-only
|
|
30
|
+
timeoutMs: 10000
|
|
31
|
+
defaultRecallLimit: 10
|
|
32
|
+
embedding:
|
|
33
|
+
enabled: false
|
|
34
|
+
endpoint: http://localhost:11434
|
|
35
|
+
model: nomic-embed-text
|
|
36
|
+
recallQuality:
|
|
37
|
+
policy: strict-v1
|
|
38
|
+
lowScoreThreshold: 0.25
|
|
39
|
+
highScoreThreshold: 0.6
|
|
40
|
+
candidateMultiplier: 3
|
|
41
|
+
maxMediumResults: 4
|
|
42
|
+
maxUnknownResults: 2
|
|
43
|
+
- id: mnemon-source-runtime
|
|
44
|
+
name: dsh-mnemon-source-runtime
|
|
45
|
+
- id: mnemon-source-documents
|
|
46
|
+
name: dsh-mnemon-source-documents
|
|
47
|
+
- id: mnemon-source-memory-spaces
|
|
48
|
+
name: dsh-mnemon-source-memory-spaces
|
|
49
|
+
config:
|
|
50
|
+
# Every default Provider is an
|
|
51
|
+
# explicit child. A custom parent composition may choose a subset.
|
|
52
|
+
providers:
|
|
53
|
+
- use: dsh-mnemon-provider-mnemon-native
|
|
54
|
+
instanceId: mnemon-native
|
|
55
|
+
- use: dsh-mnemon-provider-openviking
|
|
56
|
+
instanceId: openviking
|
|
57
|
+
- use: dsh-mnemon-provider-honcho
|
|
58
|
+
instanceId: honcho
|
|
59
|
+
- use: dsh-mnemon-provider-mem0
|
|
60
|
+
instanceId: mem0
|
|
61
|
+
- use: dsh-mnemon-provider-hindsight
|
|
62
|
+
instanceId: hindsight
|
|
63
|
+
- use: dsh-mnemon-provider-holographic
|
|
64
|
+
instanceId: holographic
|
|
65
|
+
- use: dsh-mnemon-provider-retaindb
|
|
66
|
+
instanceId: retaindb
|
|
67
|
+
- use: dsh-mnemon-provider-byterover
|
|
68
|
+
instanceId: byterover
|
|
69
|
+
- use: dsh-mnemon-provider-supermemory
|
|
70
|
+
instanceId: supermemory
|
|
71
|
+
- id: mnemon-strategy-default-three-tier
|
|
72
|
+
name: dsh-mnemon-strategy-default-three-tier
|
|
73
|
+
# v0.5 ships these narrowly scoped enhancements with the Starter so the
|
|
74
|
+
# Settings switches are always available. They remain opt-in.
|
|
75
|
+
- id: mnemon-strategy-auto-capture
|
|
76
|
+
name: dsh-mnemon-strategy-auto-capture
|
|
77
|
+
disabled: true
|
|
78
|
+
- id: mnemon-strategy-light-context
|
|
79
|
+
name: dsh-mnemon-strategy-light-context
|
|
80
|
+
disabled: true
|
|
81
|
+
- id: mnemon-strategy-scoped
|
|
82
|
+
name: dsh-mnemon-strategy-scoped
|
|
83
|
+
disabled: true
|
package/lib/client.js
CHANGED
|
@@ -4945,7 +4945,11 @@ window.__ModuleLoader__.load({
|
|
|
4945
4945
|
}
|
|
4946
4946
|
publish(snapshot) {
|
|
4947
4947
|
this.snapshot = snapshot;
|
|
4948
|
-
for (const listener of this.listeners)
|
|
4948
|
+
for (const listener of this.listeners) try {
|
|
4949
|
+
listener();
|
|
4950
|
+
} catch (error) {
|
|
4951
|
+
console.warn("dsh-mnemon: settings listener failed; keeping the published Host snapshot", error);
|
|
4952
|
+
}
|
|
4949
4953
|
}
|
|
4950
4954
|
};
|
|
4951
4955
|
//#endregion
|
|
@@ -7091,11 +7095,12 @@ window.__ModuleLoader__.load({
|
|
|
7091
7095
|
function placeEntry(root, entry) {
|
|
7092
7096
|
const button = newSessionButton(root);
|
|
7093
7097
|
if (button === void 0) return false;
|
|
7094
|
-
if (entry.parentElement === root) return true;
|
|
7095
7098
|
const row = button.closest("[class*=\"logoRow\"]");
|
|
7096
7099
|
const base = row !== null && row.parentElement === root ? row : button;
|
|
7097
|
-
const
|
|
7098
|
-
|
|
7100
|
+
const parent = base.parentElement ?? root;
|
|
7101
|
+
if (entry.parentElement === parent) return true;
|
|
7102
|
+
const anchor = Array.from(parent.children).filter((element) => element instanceof HTMLElement && element.matches(FAMILY_SELECTOR)).at(-1)?.nextElementSibling ?? base.nextElementSibling;
|
|
7103
|
+
parent.insertBefore(entry, anchor !== null && anchor.parentElement === parent ? anchor : null);
|
|
7099
7104
|
return true;
|
|
7100
7105
|
}
|
|
7101
7106
|
/** Mount a self-healing official-style entry under the New Session row. */
|
|
@@ -7149,15 +7154,21 @@ window.__ModuleLoader__.load({
|
|
|
7149
7154
|
};
|
|
7150
7155
|
const unsubscribe = controller.subscribe(syncActive);
|
|
7151
7156
|
const unsubscribeLocale = subscribeLocale?.(syncLabel) ?? (() => {});
|
|
7152
|
-
|
|
7153
|
-
tryPlace();
|
|
7154
|
-
return () => {
|
|
7157
|
+
const dispose = () => {
|
|
7155
7158
|
waitObserver.disconnect();
|
|
7156
7159
|
rootObserver.disconnect();
|
|
7157
7160
|
unsubscribe();
|
|
7158
7161
|
unsubscribeLocale();
|
|
7159
7162
|
entry.remove();
|
|
7160
7163
|
};
|
|
7164
|
+
try {
|
|
7165
|
+
syncActive();
|
|
7166
|
+
tryPlace();
|
|
7167
|
+
return dispose;
|
|
7168
|
+
} catch (error) {
|
|
7169
|
+
dispose();
|
|
7170
|
+
throw error;
|
|
7171
|
+
}
|
|
7161
7172
|
}
|
|
7162
7173
|
//#endregion
|
|
7163
7174
|
//#region src/client/workspace-controller.ts
|
|
@@ -7769,22 +7780,39 @@ window.__ModuleLoader__.load({
|
|
|
7769
7780
|
t: translate
|
|
7770
7781
|
})
|
|
7771
7782
|
}, MnemonSidebarWorkspaceHost));
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
};
|
|
7783
|
+
let disposeBetterSidebar;
|
|
7784
|
+
let disposeLauncher;
|
|
7785
|
+
let listening = false;
|
|
7786
|
+
let disposed = false;
|
|
7777
7787
|
const openMemoryView = () => {
|
|
7778
7788
|
navigation.open();
|
|
7779
7789
|
};
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7790
|
+
const dispose = () => {
|
|
7791
|
+
if (disposed) return;
|
|
7792
|
+
disposed = true;
|
|
7793
|
+
try {
|
|
7794
|
+
disposeLauncher?.();
|
|
7795
|
+
} finally {
|
|
7796
|
+
if (listening) window.removeEventListener(MNEMON_ANCHOR_EVENT, openMemoryView);
|
|
7797
|
+
try {
|
|
7798
|
+
disposeBetterSidebar?.();
|
|
7799
|
+
} finally {
|
|
7800
|
+
disposeView();
|
|
7801
|
+
}
|
|
7802
|
+
}
|
|
7787
7803
|
};
|
|
7804
|
+
try {
|
|
7805
|
+
disposeBetterSidebar = mountBetterSidebarTab(ctx, translate, betterSidebarSeat);
|
|
7806
|
+
if (typeof window !== "undefined" && typeof document !== "undefined") {
|
|
7807
|
+
window.addEventListener(MNEMON_ANCHOR_EVENT, openMemoryView);
|
|
7808
|
+
listening = true;
|
|
7809
|
+
disposeLauncher = mountMnemonSidebarLauncher(ctx, translate, controller);
|
|
7810
|
+
}
|
|
7811
|
+
return dispose;
|
|
7812
|
+
} catch (error) {
|
|
7813
|
+
dispose();
|
|
7814
|
+
throw error;
|
|
7815
|
+
}
|
|
7788
7816
|
}
|
|
7789
7817
|
/** DSH supplies the owning session; Source pages retain the same render contract. */
|
|
7790
7818
|
function mountBuiltinMemoryView(ctx, settings, namespace, translate) {
|
package/lib/index.js
CHANGED
|
@@ -4619,6 +4619,7 @@ var MnemonAgentLifecycle = class {
|
|
|
4619
4619
|
injectedMemoryText;
|
|
4620
4620
|
idleReviewTimer;
|
|
4621
4621
|
reviewController;
|
|
4622
|
+
idleReviewRun;
|
|
4622
4623
|
reviewRunning = false;
|
|
4623
4624
|
lastReviewAt;
|
|
4624
4625
|
lastReviewAction;
|
|
@@ -4777,7 +4778,9 @@ var MnemonAgentLifecycle = class {
|
|
|
4777
4778
|
async assemblePrompt(assembly, context, next) {
|
|
4778
4779
|
if (context.agent !== void 0 && context.agent.id !== this.agent.id) return next();
|
|
4779
4780
|
const turn = openAgentTurn(this.agent);
|
|
4780
|
-
if (turn === void 0
|
|
4781
|
+
if (turn === void 0) return next();
|
|
4782
|
+
await this.settleIdleReview();
|
|
4783
|
+
if (context.signal?.aborted === true || openAgentTurn(this.agent) !== turn) return next();
|
|
4781
4784
|
await this.memoryTurn?.begin(turn, context.signal);
|
|
4782
4785
|
return applyMemoryViewGuidance(await next(), this.memoryTurn?.current?.context.view, this.config.routingGuidance);
|
|
4783
4786
|
}
|
|
@@ -4808,9 +4811,17 @@ var MnemonAgentLifecycle = class {
|
|
|
4808
4811
|
if (this.config.memoryTopology.strategyId !== "default-three-tier") return;
|
|
4809
4812
|
if (this.agent.status !== "idle") return;
|
|
4810
4813
|
if (!hostSessionEvents(this.agent.session).some((event) => event.type === "turn/end" && eventTurn(event) === turn) || !this.reviewActivity().eligible || !this.reviewAdmitted(turn)) return;
|
|
4811
|
-
this.
|
|
4814
|
+
this.startIdleReview();
|
|
4812
4815
|
}, this.config.idleReviewMs);
|
|
4813
4816
|
}
|
|
4817
|
+
startIdleReview() {
|
|
4818
|
+
const run = this.runIdleReview();
|
|
4819
|
+
this.idleReviewRun = run;
|
|
4820
|
+
const clear = () => {
|
|
4821
|
+
if (this.idleReviewRun === run) this.idleReviewRun = void 0;
|
|
4822
|
+
};
|
|
4823
|
+
run.then(clear, clear);
|
|
4824
|
+
}
|
|
4814
4825
|
async runIdleReview() {
|
|
4815
4826
|
const controller = new AbortController();
|
|
4816
4827
|
const triggeredScore = this.reviewActivity().score;
|
|
@@ -4840,6 +4851,10 @@ var MnemonAgentLifecycle = class {
|
|
|
4840
4851
|
this.idleReviewTimer = void 0;
|
|
4841
4852
|
if (abortRunning) this.reviewController?.abort();
|
|
4842
4853
|
}
|
|
4854
|
+
async settleIdleReview() {
|
|
4855
|
+
this.cancelIdleReview(true);
|
|
4856
|
+
await this.idleReviewRun;
|
|
4857
|
+
}
|
|
4843
4858
|
ensureTurnActivity(turn) {
|
|
4844
4859
|
let activity = this.turnActivity.get(turn);
|
|
4845
4860
|
if (activity === void 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Composable three-tier memory control plane for DeepSeek Harness: persistent runtime context, searchable project documents, pluggable long-term memory, guarded strategies, WebUI, and headless tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -121,33 +121,38 @@
|
|
|
121
121
|
"lint:package": "publint --strict && attw --pack . --profile esm-only --quiet",
|
|
122
122
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
123
123
|
"test": "vitest run",
|
|
124
|
+
"test:root": "vitest run --dir tests",
|
|
124
125
|
"verify:build": "node scripts/verify-deterministic-build.mjs",
|
|
125
126
|
"verify:headless": "node scripts/verify-headless-profile.mjs",
|
|
126
127
|
"verify:package": "node scripts/verify-package-contents.mjs && node scripts/verify-public-entries.mjs && pnpm run lint:package",
|
|
127
128
|
"verify:plugins": "node scripts/verify-plugin-artifacts.mjs",
|
|
128
129
|
"e2e:serve": "node scripts/serve-e2e.mjs",
|
|
129
|
-
"verify": "pnpm run typecheck && pnpm run verify:build && pnpm --workspace-concurrency=
|
|
130
|
+
"verify": "pnpm run typecheck && pnpm run verify:build && pnpm --workspace-concurrency=4 -r build && pnpm -r typecheck && pnpm -r test && pnpm run test:root && pnpm run verify:headless && pnpm run verify:package",
|
|
131
|
+
"changeset": "changeset",
|
|
132
|
+
"release:intent": "node scripts/check-release-intent.mjs",
|
|
133
|
+
"release:status": "changeset status",
|
|
134
|
+
"release:version": "changeset version && node scripts/sync-release-metadata.mjs && pnpm install --lockfile-only",
|
|
130
135
|
"dsh:link-source": "node scripts/link-dsh-source.mjs",
|
|
131
136
|
"dsh:restore-registry": "node scripts/link-dsh-source.mjs --restore",
|
|
132
137
|
"release:check": "node scripts/release.mjs --check"
|
|
133
138
|
},
|
|
134
139
|
"dependencies": {
|
|
135
|
-
"dsh-mnemon-provider-byterover": "0.5.
|
|
136
|
-
"dsh-mnemon-provider-hindsight": "0.5.
|
|
137
|
-
"dsh-mnemon-provider-holographic": "0.5.
|
|
138
|
-
"dsh-mnemon-provider-honcho": "0.5.
|
|
139
|
-
"dsh-mnemon-provider-mem0": "0.5.
|
|
140
|
-
"dsh-mnemon-provider-mnemon-native": "0.5.
|
|
141
|
-
"dsh-mnemon-provider-openviking": "0.5.
|
|
142
|
-
"dsh-mnemon-provider-retaindb": "0.5.
|
|
143
|
-
"dsh-mnemon-provider-supermemory": "0.5.
|
|
144
|
-
"dsh-mnemon-source-documents": "0.5.
|
|
145
|
-
"dsh-mnemon-source-memory-spaces": "0.5.
|
|
146
|
-
"dsh-mnemon-source-runtime": "0.5.
|
|
147
|
-
"dsh-mnemon-strategy-auto-capture": "0.5.
|
|
148
|
-
"dsh-mnemon-strategy-default-three-tier": "0.5.
|
|
149
|
-
"dsh-mnemon-strategy-light-context": "0.5.
|
|
150
|
-
"dsh-mnemon-strategy-scoped": "0.5.
|
|
140
|
+
"dsh-mnemon-provider-byterover": "0.5.2",
|
|
141
|
+
"dsh-mnemon-provider-hindsight": "0.5.2",
|
|
142
|
+
"dsh-mnemon-provider-holographic": "0.5.2",
|
|
143
|
+
"dsh-mnemon-provider-honcho": "0.5.2",
|
|
144
|
+
"dsh-mnemon-provider-mem0": "0.5.2",
|
|
145
|
+
"dsh-mnemon-provider-mnemon-native": "0.5.2",
|
|
146
|
+
"dsh-mnemon-provider-openviking": "0.5.2",
|
|
147
|
+
"dsh-mnemon-provider-retaindb": "0.5.2",
|
|
148
|
+
"dsh-mnemon-provider-supermemory": "0.5.2",
|
|
149
|
+
"dsh-mnemon-source-documents": "0.5.2",
|
|
150
|
+
"dsh-mnemon-source-memory-spaces": "0.5.2",
|
|
151
|
+
"dsh-mnemon-source-runtime": "0.5.2",
|
|
152
|
+
"dsh-mnemon-strategy-auto-capture": "0.5.2",
|
|
153
|
+
"dsh-mnemon-strategy-default-three-tier": "0.5.2",
|
|
154
|
+
"dsh-mnemon-strategy-light-context": "0.5.2",
|
|
155
|
+
"dsh-mnemon-strategy-scoped": "0.5.2",
|
|
151
156
|
"fflate": "^0.8.3",
|
|
152
157
|
"schemastery": "^3.18.0",
|
|
153
158
|
"zod": "^4.4.3"
|
|
@@ -160,6 +165,7 @@
|
|
|
160
165
|
},
|
|
161
166
|
"devDependencies": {
|
|
162
167
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
168
|
+
"@changesets/cli": "^2.31.1",
|
|
163
169
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
164
170
|
"@deepseek-ai/dsh": "0.1.2-rc.1",
|
|
165
171
|
"@deepseek-ai/dsh-agent": "0.1.2-rc.1",
|
|
@@ -194,6 +200,7 @@
|
|
|
194
200
|
"publint": "^0.3.23",
|
|
195
201
|
"react": "^18.2.0",
|
|
196
202
|
"react-dom": "^18.2.0",
|
|
203
|
+
"semver": "^7.8.5",
|
|
197
204
|
"tsdown": "^0.22.0",
|
|
198
205
|
"typescript": "^5.9.0",
|
|
199
206
|
"vitest": "^3.2.0"
|