dsh-mnemon 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/README.zh-CN.md +6 -2
- package/lib/client.js +1 -1
- package/lib/index.js +13 -8
- package/lib/types/src/subagent-token-usage.d.ts +11 -4
- package/package.json +3 -1
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.4.
|
|
27
|
+
<a href="./docs/en/releases/v0.4.4.md">Read the v0.4.4 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
|
|
|
@@ -40,6 +40,10 @@ v0.4.1 fixes Memory System and Save to memory rendering with this-dependent DSH
|
|
|
40
40
|
|
|
41
41
|
v0.4.2 restores optional `displayMode: builtin` as a conversation placement for the same Sidebar-first UI. Legacy `buildin` is accepted and automatically saved as `builtin`; memory data is unchanged. See the [release notes](./docs/en/releases/v0.4.2.md) and [entry placement and scope mapping](./docs/en/configuration.md#entry-placement-displaymode-and-tabenabled).
|
|
42
42
|
|
|
43
|
+
v0.4.3 aligns the collapsed Memory System icon with neighboring sidebar controls while preserving the expanded appearance. See the [patch release notes](./docs/en/releases/v0.4.3.md).
|
|
44
|
+
|
|
45
|
+
v0.4.4 fixes session history failures on older DSH hosts by supporting both session projection contracts. Newer hosts and existing projection checkpoints remain compatible. See the [patch release notes](./docs/en/releases/v0.4.4.md).
|
|
46
|
+
|
|
43
47
|
## Understand the scope in 30 seconds
|
|
44
48
|
|
|
45
49
|
| Tier | Keep here | How it reaches the Agent | Managed by |
|
|
@@ -214,7 +218,7 @@ See [Operations, security, and troubleshooting](./docs/en/operations.md) for bac
|
|
|
214
218
|
| Back up, update, or troubleshoot | [Operations](./docs/en/operations.md) |
|
|
215
219
|
| Integrate tools, commands, or RPC | [Interface reference](./docs/en/interfaces.md) |
|
|
216
220
|
| Build a Layer, Adapter, Strategy, Guard, or MemorySource extension | [Extension guide](./docs/en/extensions.md) |
|
|
217
|
-
| Review the release | [v0.4.
|
|
221
|
+
| Review the release | [v0.4.4 release notes](./docs/en/releases/v0.4.4.md) |
|
|
218
222
|
|
|
219
223
|
See the [documentation hub](./docs/en/README.md) for the full map.
|
|
220
224
|
|
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.4.
|
|
27
|
+
<a href="./docs/zh-CN/releases/v0.4.4.md">v0.4.4 升级说明</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
|
|
|
@@ -40,6 +40,10 @@ v0.4.1 修复记忆系统和存入记忆在依赖 `this` 的 DSH settings store
|
|
|
40
40
|
|
|
41
41
|
v0.4.2 恢复可选 `displayMode: builtin`,只将 Sidebar 优先迭代的共用界面放入会话。旧 `buildin` 仍可识别,并自动保存为 `builtin`,不改变记忆数据。详见[发布说明](./docs/zh-CN/releases/v0.4.2.md)与[入口位置与范围映射](./docs/zh-CN/configuration.md#入口位置displaymode-与-tabenabled)。
|
|
42
42
|
|
|
43
|
+
v0.4.3 让折叠后的记忆系统图标与侧栏相邻控件对齐,并保留原有展开样式。详见[补丁发布说明](./docs/zh-CN/releases/v0.4.3.md)。
|
|
44
|
+
|
|
45
|
+
v0.4.4 同时支持新旧 DSH 会话投影接口,修复旧版宿主读取会话历史失败的问题,并保持新版宿主和已有投影检查点兼容。详见[补丁发布说明](./docs/zh-CN/releases/v0.4.4.md)。
|
|
46
|
+
|
|
43
47
|
## 30 秒理解能力边界
|
|
44
48
|
|
|
45
49
|
| 层级 | 适合保存 | 如何进入 Agent 上下文 | 由谁管理 |
|
|
@@ -214,7 +218,7 @@ dsh plugin --profile headless add "link:/absolute/path/to/dsh-mnemon"
|
|
|
214
218
|
| 备份、更新或排障 | [运维指南](./docs/zh-CN/operations.md) |
|
|
215
219
|
| 接入工具、命令或 RPC | [接口参考](./docs/zh-CN/interfaces.md) |
|
|
216
220
|
| 开发 Layer、Adapter、Strategy、Guard 或 MemorySource 扩展 | [扩展开发指南](./docs/zh-CN/extensions.md) |
|
|
217
|
-
| 查看本次升级 | [v0.4.
|
|
221
|
+
| 查看本次升级 | [v0.4.4 发布说明](./docs/zh-CN/releases/v0.4.4.md) |
|
|
218
222
|
|
|
219
223
|
完整目录见[文档中心](./docs/zh-CN/README.md)。
|
|
220
224
|
|
package/lib/client.js
CHANGED
|
@@ -11754,7 +11754,7 @@ window.__ModuleLoader__.load({
|
|
|
11754
11754
|
};
|
|
11755
11755
|
//#endregion
|
|
11756
11756
|
//#region \0dsh-mnemon-css:/home/runner/work/dsh-mnemon/dsh-mnemon/src/client/MnemonWorkspace.module.css.mjs
|
|
11757
|
-
const css = "[data-pane=conversation],.NS3bAW_dshDesktopConversationSurface{position:relative}[data-dsh-mnemon-view]{z-index:60;background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-base));min-width:0;min-height:0;display:none;position:absolute;inset:0;overflow:hidden}.NS3bAW_panelView{isolation:isolate}html[data-dsh-mnemon-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-dsh-mnemon-view]{display:block}html[data-dsh-mnemon-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation]>:not([data-dsh-mnemon-view]),html[data-dsh-mnemon-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]>:not([data-dsh-mnemon-view]),html[data-dsh-mnemon-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) .NS3bAW_dshDesktopConversationSurface>:not([data-dsh-mnemon-view]){display:none!important}.NS3bAW_entry{box-sizing:border-box;width:100%;min-height:36px;color:var(--dsw-alias-label-secondary);white-space:nowrap;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:10px;padding:0 10px;font-size:13px;display:flex}.NS3bAW_entry:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.NS3bAW_entry[data-active]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-active);font-weight:600}.NS3bAW_entryIcon{flex:none;justify-content:center;align-items:center;width:24px;height:24px;display:inline-flex}.NS3bAW_entryIcon svg{width:18px;height:18px;display:block}.NS3bAW_entryLabel{text-overflow:ellipsis;overflow:hidden}[data-
|
|
11757
|
+
const css = "[data-pane=conversation],.NS3bAW_dshDesktopConversationSurface{position:relative}[data-dsh-mnemon-view]{z-index:60;background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-base));min-width:0;min-height:0;display:none;position:absolute;inset:0;overflow:hidden}.NS3bAW_panelView{isolation:isolate}html[data-dsh-mnemon-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-dsh-mnemon-view]{display:block}html[data-dsh-mnemon-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation]>:not([data-dsh-mnemon-view]),html[data-dsh-mnemon-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]>:not([data-dsh-mnemon-view]),html[data-dsh-mnemon-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) .NS3bAW_dshDesktopConversationSurface>:not([data-dsh-mnemon-view]){display:none!important}.NS3bAW_entry{box-sizing:border-box;width:100%;min-height:36px;color:var(--dsw-alias-label-secondary);white-space:nowrap;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:10px;padding:0 10px;font-size:13px;display:flex}.NS3bAW_entry:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.NS3bAW_entry[data-active]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-active);font-weight:600}.NS3bAW_entryIcon{flex:none;justify-content:center;align-items:center;width:24px;height:24px;display:inline-flex}.NS3bAW_entryIcon svg{width:18px;height:18px;display:block}.NS3bAW_entryLabel{text-overflow:ellipsis;overflow:hidden}[data-sidebar-collapsed] .NS3bAW_entry{width:36px;min-height:36px;color:var(--dsw-alias-label-primary);border-radius:50%;justify-content:center;margin:0 auto 12px;padding:0}[data-sidebar-collapsed] .NS3bAW_entryIcon svg{width:20px;height:20px}[data-sidebar-collapsed] .NS3bAW_entryLabel{display:none}";
|
|
11758
11758
|
const tagId = "dsh-mnemon/src/client/MnemonWorkspace.module.css";
|
|
11759
11759
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
11760
11760
|
const tag = document.createElement("style");
|
package/lib/index.js
CHANGED
|
@@ -10819,6 +10819,10 @@ const tokenUsageStateSchema = z$1.object({
|
|
|
10819
10819
|
buckets: tokenUsageSchema
|
|
10820
10820
|
}).strict().nullable()
|
|
10821
10821
|
}).strict();
|
|
10822
|
+
const tokenUsageWire = {
|
|
10823
|
+
viewSchema: tokenUsageSchema.nullable(),
|
|
10824
|
+
view: (state) => state.descriptorSeen ? state.totals : null
|
|
10825
|
+
};
|
|
10822
10826
|
const emptyTokenUsage = () => ({
|
|
10823
10827
|
uncachedInputTokens: 0,
|
|
10824
10828
|
outputTokens: 0,
|
|
@@ -10844,17 +10848,19 @@ function usageBuckets(value) {
|
|
|
10844
10848
|
};
|
|
10845
10849
|
}
|
|
10846
10850
|
function usageSample(event) {
|
|
10847
|
-
|
|
10848
|
-
const
|
|
10851
|
+
if (typeof event.data !== "object" || event.data === null || Array.isArray(event.data)) return void 0;
|
|
10852
|
+
const data = event.data;
|
|
10853
|
+
const turn = nonnegativeInteger(data.turn);
|
|
10854
|
+
const step = nonnegativeInteger(data.step);
|
|
10849
10855
|
if (turn === void 0 || step === void 0) return void 0;
|
|
10850
10856
|
let rawUsage;
|
|
10851
10857
|
if (event.type === "assistant/chunk") {
|
|
10852
|
-
const chunk =
|
|
10858
|
+
const chunk = data.chunk;
|
|
10853
10859
|
if (typeof chunk !== "object" || chunk === null || Array.isArray(chunk)) return void 0;
|
|
10854
10860
|
const record = chunk;
|
|
10855
10861
|
if (record.type !== "usage") return void 0;
|
|
10856
10862
|
rawUsage = record.usage;
|
|
10857
|
-
} else if (event.type === "assistant/message") rawUsage =
|
|
10863
|
+
} else if (event.type === "assistant/message") rawUsage = data.usage;
|
|
10858
10864
|
else return;
|
|
10859
10865
|
const buckets = usageBuckets(rawUsage);
|
|
10860
10866
|
return buckets === void 0 ? void 0 : {
|
|
@@ -10883,6 +10889,7 @@ const mnemonSubagentTokenUsageProjectionDefinition = {
|
|
|
10883
10889
|
key: "mnemonSubagentTokenUsage",
|
|
10884
10890
|
stateVersion: 1,
|
|
10885
10891
|
stateSchema: tokenUsageStateSchema,
|
|
10892
|
+
schema: tokenUsageWire.viewSchema,
|
|
10886
10893
|
init: () => ({
|
|
10887
10894
|
descriptorSeen: false,
|
|
10888
10895
|
totals: emptyTokenUsage(),
|
|
@@ -10905,10 +10912,8 @@ const mnemonSubagentTokenUsageProjectionDefinition = {
|
|
|
10905
10912
|
last: sample
|
|
10906
10913
|
};
|
|
10907
10914
|
},
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
view: (state) => state.descriptorSeen ? state.totals : null
|
|
10911
|
-
}
|
|
10915
|
+
view: tokenUsageWire.view,
|
|
10916
|
+
wire: tokenUsageWire
|
|
10912
10917
|
};
|
|
10913
10918
|
/** Register lazily when the optional DSH projection service is present. */
|
|
10914
10919
|
function registerMnemonSubagentTokenUsageProjection(ctx) {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* and resets at every durable descriptor.
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod';
|
|
11
|
-
import type { HostContextShape
|
|
11
|
+
import type { HostContextShape } from './contracts.ts';
|
|
12
12
|
export interface MnemonTokenUsageProjection {
|
|
13
13
|
uncachedInputTokens: number;
|
|
14
14
|
outputTokens: number;
|
|
@@ -24,6 +24,10 @@ export interface MnemonSubagentTokenUsageState {
|
|
|
24
24
|
buckets: MnemonTokenUsageProjection;
|
|
25
25
|
} | null;
|
|
26
26
|
}
|
|
27
|
+
interface ProjectionEvent {
|
|
28
|
+
type: string;
|
|
29
|
+
data: unknown;
|
|
30
|
+
}
|
|
27
31
|
/** Wire key consumed only by Mnemon's subagent-catalog compatibility shim. */
|
|
28
32
|
export declare const MNEMON_SUBAGENT_TOKEN_USAGE_KEY = "mnemonSubagentTokenUsage";
|
|
29
33
|
/**
|
|
@@ -35,12 +39,15 @@ export declare const mnemonSubagentTokenUsageProjectionDefinition: {
|
|
|
35
39
|
readonly key: "mnemonSubagentTokenUsage";
|
|
36
40
|
readonly stateVersion: 1;
|
|
37
41
|
readonly stateSchema: z.ZodType<MnemonSubagentTokenUsageState, unknown, z.core.$ZodTypeInternals<MnemonSubagentTokenUsageState, unknown>>;
|
|
42
|
+
readonly schema: z.ZodNullable<z.ZodType<MnemonTokenUsageProjection, unknown, z.core.$ZodTypeInternals<MnemonTokenUsageProjection, unknown>>>;
|
|
38
43
|
readonly init: () => MnemonSubagentTokenUsageState;
|
|
39
|
-
readonly apply: (state: MnemonSubagentTokenUsageState, event:
|
|
44
|
+
readonly apply: (state: MnemonSubagentTokenUsageState, event: ProjectionEvent) => MnemonSubagentTokenUsageState;
|
|
45
|
+
readonly view: (state: MnemonSubagentTokenUsageState) => MnemonTokenUsageProjection | null;
|
|
40
46
|
readonly wire: {
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
viewSchema: z.ZodNullable<z.ZodType<MnemonTokenUsageProjection, unknown, z.core.$ZodTypeInternals<MnemonTokenUsageProjection, unknown>>>;
|
|
48
|
+
view: (state: MnemonSubagentTokenUsageState) => MnemonTokenUsageProjection | null;
|
|
43
49
|
};
|
|
44
50
|
};
|
|
45
51
|
/** Register lazily when the optional DSH projection service is present. */
|
|
46
52
|
export declare function registerMnemonSubagentTokenUsageProjection(ctx: HostContextShape): void;
|
|
53
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
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",
|
|
@@ -165,6 +165,8 @@
|
|
|
165
165
|
"@deepseek-ai/dsh-llm": "0.1.1-rc.2",
|
|
166
166
|
"@deepseek-ai/dsh-session": "0.1.1-rc.2",
|
|
167
167
|
"@deepseek-ai/dsh-session-persistence-jsonl": "0.1.1-rc.2",
|
|
168
|
+
"@deepseek-ai/dsh-session-projection": "0.1.1-rc.2",
|
|
169
|
+
"@deepseek-ai/dsh-session-projection-legacy": "npm:@deepseek-ai/dsh-session-projection@0.1.0-rc.8",
|
|
168
170
|
"@deepseek-ai/dsh-session-query": "0.1.1-rc.2",
|
|
169
171
|
"@deepseek-ai/dsh-subagent": "0.1.1-rc.2",
|
|
170
172
|
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.1-rc.2",
|