dsh-mnemon 0.4.4 → 0.4.5
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
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.5.md">Read the v0.4.5 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
|
|
|
@@ -44,6 +44,8 @@ v0.4.3 aligns the collapsed Memory System icon with neighboring sidebar controls
|
|
|
44
44
|
|
|
45
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
46
|
|
|
47
|
+
v0.4.5 registers Memory System with an installed Better Sidebar while keeping the normal DSH Sidebar entry and both client activation orders working. See the [patch release notes](./docs/en/releases/v0.4.5.md).
|
|
48
|
+
|
|
47
49
|
## Understand the scope in 30 seconds
|
|
48
50
|
|
|
49
51
|
| Tier | Keep here | How it reaches the Agent | Managed by |
|
|
@@ -218,7 +220,7 @@ See [Operations, security, and troubleshooting](./docs/en/operations.md) for bac
|
|
|
218
220
|
| Back up, update, or troubleshoot | [Operations](./docs/en/operations.md) |
|
|
219
221
|
| Integrate tools, commands, or RPC | [Interface reference](./docs/en/interfaces.md) |
|
|
220
222
|
| Build a Layer, Adapter, Strategy, Guard, or MemorySource extension | [Extension guide](./docs/en/extensions.md) |
|
|
221
|
-
| Review the release | [v0.4.
|
|
223
|
+
| Review the release | [v0.4.5 release notes](./docs/en/releases/v0.4.5.md) |
|
|
222
224
|
|
|
223
225
|
See the [documentation hub](./docs/en/README.md) for the full map.
|
|
224
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.4.
|
|
27
|
+
<a href="./docs/zh-CN/releases/v0.4.5.md">v0.4.5 升级说明</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
|
|
|
@@ -44,6 +44,8 @@ v0.4.3 让折叠后的记忆系统图标与侧栏相邻控件对齐,并保留
|
|
|
44
44
|
|
|
45
45
|
v0.4.4 同时支持新旧 DSH 会话投影接口,修复旧版宿主读取会话历史失败的问题,并保持新版宿主和已有投影检查点兼容。详见[补丁发布说明](./docs/zh-CN/releases/v0.4.4.md)。
|
|
46
46
|
|
|
47
|
+
v0.4.5 在已安装 Better Sidebar 时向其注册记忆系统,同时保留 DSH 普通 Sidebar 入口,并兼容两种客户端加载顺序。详见[补丁发布说明](./docs/zh-CN/releases/v0.4.5.md)。
|
|
48
|
+
|
|
47
49
|
## 30 秒理解能力边界
|
|
48
50
|
|
|
49
51
|
| 层级 | 适合保存 | 如何进入 Agent 上下文 | 由谁管理 |
|
|
@@ -218,7 +220,7 @@ dsh plugin --profile headless add "link:/absolute/path/to/dsh-mnemon"
|
|
|
218
220
|
| 备份、更新或排障 | [运维指南](./docs/zh-CN/operations.md) |
|
|
219
221
|
| 接入工具、命令或 RPC | [接口参考](./docs/zh-CN/interfaces.md) |
|
|
220
222
|
| 开发 Layer、Adapter、Strategy、Guard 或 MemorySource 扩展 | [扩展开发指南](./docs/zh-CN/extensions.md) |
|
|
221
|
-
| 查看本次升级 | [v0.4.
|
|
223
|
+
| 查看本次升级 | [v0.4.5 发布说明](./docs/zh-CN/releases/v0.4.5.md) |
|
|
222
224
|
|
|
223
225
|
完整目录见[文档中心](./docs/zh-CN/README.md)。
|
|
224
226
|
|
package/lib/client.js
CHANGED
|
@@ -11931,14 +11931,16 @@ window.__ModuleLoader__.load({
|
|
|
11931
11931
|
const SSH_ACTIVE_ATTR = "data-dsh-ssh-active";
|
|
11932
11932
|
const ACTIVATE_EVENT = "dsh-panel-activate";
|
|
11933
11933
|
const SIDEBAR_CONTEXT_SELECTOR = "[data-dsh-taskboard-entry], [data-dsh-ssh-entry], [class*=\"sessionRow\"], [class*=\"projectRow\"], [class*=\"searchResultRow\"], [class*=\"searchResultWorkspace\"], [class*=\"newSession\"]";
|
|
11934
|
-
|
|
11934
|
+
/** Shared sidebar-sized view used by both the legacy workspace and Better Sidebar. */
|
|
11935
|
+
function MnemonPanel({ ctx, settings, t, onClose, scope }) {
|
|
11935
11936
|
const subscribeLocale = (0, react.useCallback)((listener) => ctx.locale.subscribe(listener), [ctx.locale]);
|
|
11936
11937
|
const getLocaleSnapshot = (0, react.useCallback)(() => ctx.locale.getSnapshot(), [ctx.locale]);
|
|
11937
11938
|
const locale = (0, react.useSyncExternalStore)(subscribeLocale, getLocaleSnapshot, getLocaleSnapshot);
|
|
11938
11939
|
const sessions = (0, react.useSyncExternalStore)((listener) => ctx.sessions.list.subscribe(listener), () => ctx.sessions.list.getSnapshot(), () => ctx.sessions.list.getSnapshot());
|
|
11939
11940
|
const workspaces = (0, react.useSyncExternalStore)((listener) => ctx.workspaces.list.subscribe(listener), () => ctx.workspaces.list.getSnapshot(), () => ctx.workspaces.list.getSnapshot());
|
|
11940
11941
|
const [selectedWorkspaceId, setSelectedWorkspaceId] = (0, react.useState)();
|
|
11941
|
-
const
|
|
11942
|
+
const sessionId = scope?.sessionId ?? sessions.current;
|
|
11943
|
+
const currentCwd = scope === void 0 ? sessions.current === void 0 ? void 0 : sessions.byId[sessions.current]?.cwd : scope.cwd;
|
|
11942
11944
|
const normalizePath = (value) => value.replace(/[\\/]+$/u, "");
|
|
11943
11945
|
const effectiveWorkspace = currentCwd === void 0 ? void 0 : workspaces.items.find((workspace) => normalizePath(workspace.path) === normalizePath(currentCwd));
|
|
11944
11946
|
const fallbackWorkspace = effectiveWorkspace ?? workspaces.items[0];
|
|
@@ -11966,12 +11968,12 @@ window.__ModuleLoader__.load({
|
|
|
11966
11968
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonView, {
|
|
11967
11969
|
connection: ctx.connection,
|
|
11968
11970
|
settingsScope: settings,
|
|
11969
|
-
...
|
|
11971
|
+
...sessionId === void 0 ? {} : { sessionId },
|
|
11970
11972
|
...resolvedSelectedId === void 0 ? {} : { workspaceId: resolvedSelectedId },
|
|
11971
11973
|
workspaceSelection: selection,
|
|
11972
11974
|
t,
|
|
11973
11975
|
locale: locale.active,
|
|
11974
|
-
onClose
|
|
11976
|
+
...onClose === void 0 ? {} : { onClose }
|
|
11975
11977
|
});
|
|
11976
11978
|
}
|
|
11977
11979
|
function conversationColumn() {
|
|
@@ -12084,6 +12086,71 @@ window.__ModuleLoader__.load({
|
|
|
12084
12086
|
};
|
|
12085
12087
|
}
|
|
12086
12088
|
//#endregion
|
|
12089
|
+
//#region src/client/better-sidebar.tsx
|
|
12090
|
+
/** Stable type id exposed to Better Sidebar and its persisted tab state. */
|
|
12091
|
+
const MNEMON_BETTER_SIDEBAR_TAB_ID = "dsh-mnemon:memory";
|
|
12092
|
+
function MnemonTabIcon({ size }) {
|
|
12093
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
12094
|
+
"aria-hidden": "true",
|
|
12095
|
+
viewBox: "0 0 16 16",
|
|
12096
|
+
width: size,
|
|
12097
|
+
height: size,
|
|
12098
|
+
fill: "none",
|
|
12099
|
+
stroke: "currentColor",
|
|
12100
|
+
strokeWidth: "1.5",
|
|
12101
|
+
strokeLinecap: "round",
|
|
12102
|
+
strokeLinejoin: "round",
|
|
12103
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("ellipse", {
|
|
12104
|
+
cx: "8",
|
|
12105
|
+
cy: "3.5",
|
|
12106
|
+
rx: "5",
|
|
12107
|
+
ry: "2"
|
|
12108
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3 3.5v4c0 1.1 2.2 2 5 2s5-.9 5-2v-4M3 7.5v4c0 1.1 2.2 2 5 2s5-.9 5-2v-4" })]
|
|
12109
|
+
});
|
|
12110
|
+
}
|
|
12111
|
+
/**
|
|
12112
|
+
* Register Mnemon through Better Sidebar's documented optional service.
|
|
12113
|
+
*
|
|
12114
|
+
* The service is deliberately a soft dependency. Watching Cordis service
|
|
12115
|
+
* changes makes installation order and HMR irrelevant while preserving the
|
|
12116
|
+
* standalone Mnemon sidebar on profiles that do not install Better Sidebar.
|
|
12117
|
+
*/
|
|
12118
|
+
function mountBetterSidebarTab(ctx, settings, t) {
|
|
12119
|
+
let current;
|
|
12120
|
+
const reconcile = () => {
|
|
12121
|
+
const service = ctx.get("betterSidebar");
|
|
12122
|
+
if (current?.service === service) return;
|
|
12123
|
+
current?.dispose();
|
|
12124
|
+
current = void 0;
|
|
12125
|
+
if (service === void 0) return;
|
|
12126
|
+
current = {
|
|
12127
|
+
service,
|
|
12128
|
+
dispose: service.registerTab({
|
|
12129
|
+
id: MNEMON_BETTER_SIDEBAR_TAB_ID,
|
|
12130
|
+
title: () => t("tab.label"),
|
|
12131
|
+
icon: (size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonTabIcon, { size }),
|
|
12132
|
+
order: 55,
|
|
12133
|
+
single: true,
|
|
12134
|
+
component: ({ scope }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonPanel, {
|
|
12135
|
+
ctx,
|
|
12136
|
+
settings,
|
|
12137
|
+
t,
|
|
12138
|
+
scope
|
|
12139
|
+
})
|
|
12140
|
+
})
|
|
12141
|
+
};
|
|
12142
|
+
};
|
|
12143
|
+
reconcile();
|
|
12144
|
+
const unsubscribe = ctx.on("internal/service", (name) => {
|
|
12145
|
+
if (name === "betterSidebar") reconcile();
|
|
12146
|
+
});
|
|
12147
|
+
return () => {
|
|
12148
|
+
unsubscribe();
|
|
12149
|
+
current?.dispose();
|
|
12150
|
+
current = void 0;
|
|
12151
|
+
};
|
|
12152
|
+
}
|
|
12153
|
+
//#endregion
|
|
12087
12154
|
//#region src/client/subagent-token-usage.tsx
|
|
12088
12155
|
/** Mnemon compatibility shim for DSH's fork-backed subagent token metric. */
|
|
12089
12156
|
const MNEMON_SUBAGENT_TOKEN_USAGE_KEY = "mnemonSubagentTokenUsage";
|
|
@@ -12281,9 +12348,18 @@ window.__ModuleLoader__.load({
|
|
|
12281
12348
|
const mode = snapshot.status === "loading" || snapshot.value?.tabEnabled === false ? void 0 : normalizeDisplayMode(snapshot.value?.displayMode);
|
|
12282
12349
|
if (activeMemoryWorkspace?.mode === mode) return;
|
|
12283
12350
|
activeMemoryWorkspace?.dispose();
|
|
12284
|
-
|
|
12351
|
+
if (mode === void 0) {
|
|
12352
|
+
activeMemoryWorkspace = void 0;
|
|
12353
|
+
return;
|
|
12354
|
+
}
|
|
12355
|
+
const disposeView = mode === "builtin" ? mountBuiltinMemoryView(ctx, settings, namespace, translate) : mountMnemonWorkspace(ctx, settings, translate);
|
|
12356
|
+
const disposeBetterSidebar = mode === "sidebar" ? mountBetterSidebarTab(ctx, settings, translate) : () => {};
|
|
12357
|
+
activeMemoryWorkspace = {
|
|
12285
12358
|
mode,
|
|
12286
|
-
dispose:
|
|
12359
|
+
dispose: () => {
|
|
12360
|
+
disposeBetterSidebar();
|
|
12361
|
+
disposeView();
|
|
12362
|
+
}
|
|
12287
12363
|
};
|
|
12288
12364
|
};
|
|
12289
12365
|
ctx.effect(() => {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ClientSettingsScope, Config } from '../shared/contracts.ts';
|
|
2
|
+
import type { MnemonClientContext } from './dsh-compat.ts';
|
|
3
|
+
import type { MnemonTranslate } from './locales.ts';
|
|
4
|
+
/** Stable type id exposed to Better Sidebar and its persisted tab state. */
|
|
5
|
+
export declare const MNEMON_BETTER_SIDEBAR_TAB_ID = "dsh-mnemon:memory";
|
|
6
|
+
/**
|
|
7
|
+
* Register Mnemon through Better Sidebar's documented optional service.
|
|
8
|
+
*
|
|
9
|
+
* The service is deliberately a soft dependency. Watching Cordis service
|
|
10
|
+
* changes makes installation order and HMR irrelevant while preserving the
|
|
11
|
+
* standalone Mnemon sidebar on profiles that do not install Better Sidebar.
|
|
12
|
+
*/
|
|
13
|
+
export declare function mountBetterSidebarTab(ctx: MnemonClientContext, settings: ClientSettingsScope<Config>, t: MnemonTranslate): () => void;
|
|
@@ -2,5 +2,19 @@ import type { ClientSettingsScope, Config } from '../shared/contracts.ts';
|
|
|
2
2
|
import type { MnemonClientContext } from './dsh-compat.ts';
|
|
3
3
|
import type { MnemonTranslate } from './locales.ts';
|
|
4
4
|
export declare const MNEMON_VIEW_SELECTOR = "[data-dsh-mnemon-view]";
|
|
5
|
+
interface MnemonPanelProps {
|
|
6
|
+
ctx: MnemonClientContext;
|
|
7
|
+
settings: ClientSettingsScope<Config>;
|
|
8
|
+
t: MnemonTranslate;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
scope?: MnemonWorkspaceScope;
|
|
11
|
+
}
|
|
12
|
+
export interface MnemonWorkspaceScope {
|
|
13
|
+
sessionId: string;
|
|
14
|
+
cwd?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Shared sidebar-sized view used by both the legacy workspace and Better Sidebar. */
|
|
17
|
+
export declare function MnemonPanel({ ctx, settings, t, onClose, scope }: MnemonPanelProps): JSX.Element;
|
|
5
18
|
/** Mount the sidebar row and its stateful center-column workspace as one unit. */
|
|
6
19
|
export declare function mountMnemonWorkspace(ctx: MnemonClientContext, settings: ClientSettingsScope<Config>, t: MnemonTranslate): () => void;
|
|
20
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
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",
|