dsh-mnemon 0.2.2 → 0.2.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 CHANGED
@@ -3,7 +3,7 @@
3
3
  <p align="center"><strong>English</strong> · <a href="./README.zh-CN.md">简体中文</a></p>
4
4
 
5
5
  <p align="center">
6
- <img src="https://img.shields.io/badge/release-v0.2.2-5b5bd6" alt="release v0.2.2">
6
+ <img src="https://img.shields.io/badge/release-v0.2.4-5b5bd6" alt="release v0.2.4">
7
7
  <img src="https://img.shields.io/badge/memory-3%20tiers-087c5b" alt="three memory tiers">
8
8
  <img src="https://img.shields.io/badge/providers-9-c66a09" alt="nine providers">
9
9
  <img src="https://img.shields.io/badge/Node.js-%E2%89%A520-43853d" alt="Node.js 20 or newer">
@@ -22,7 +22,7 @@
22
22
  <p align="center">
23
23
  <a href="./docs/en/capabilities.md"><strong>Explore the capability map</strong></a> ·
24
24
  <a href="./docs/en/getting-started.md">Start in five minutes</a> ·
25
- <a href="./docs/en/releases/v0.2.2.md">Read the v0.2.2 notes</a> ·
25
+ <a href="./docs/en/releases/v0.2.4.md">Read the v0.2.4 notes</a> ·
26
26
  <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>
27
27
  </p>
28
28
 
@@ -190,7 +190,7 @@ See [Operations, security, and troubleshooting](./docs/en/operations.md) for bac
190
190
  | Configure scope, routing, and model selection | [Configuration](./docs/en/configuration.md) |
191
191
  | Back up, update, or troubleshoot | [Operations](./docs/en/operations.md) |
192
192
  | Integrate tools, commands, or RPC | [Interface reference](./docs/en/interfaces.md) |
193
- | Review the release | [v0.2.2 release notes](./docs/en/releases/v0.2.2.md) |
193
+ | Review the release | [v0.2.4 release notes](./docs/en/releases/v0.2.4.md) |
194
194
 
195
195
  See the [documentation hub](./docs/en/README.md) for the full map.
196
196
 
package/README.zh-CN.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <p align="center"><a href="./README.md">English</a> · <strong>简体中文</strong></p>
4
4
 
5
5
  <p align="center">
6
- <img src="https://img.shields.io/badge/release-v0.2.2-5b5bd6" alt="发布版本 v0.2.2">
6
+ <img src="https://img.shields.io/badge/release-v0.2.4-5b5bd6" alt="发布版本 v0.2.4">
7
7
  <img src="https://img.shields.io/badge/%E8%AE%B0%E5%BF%86-3%20%E5%B1%82-087c5b" alt="三层记忆">
8
8
  <img src="https://img.shields.io/badge/Provider-9-c66a09" alt="九种 Provider">
9
9
  <img src="https://img.shields.io/badge/Node.js-%E2%89%A520-43853d" alt="Node.js 20 或更新版本">
@@ -22,7 +22,7 @@
22
22
  <p align="center">
23
23
  <a href="./docs/zh-CN/capabilities.md"><strong>先看能力地图</strong></a> ·
24
24
  <a href="./docs/zh-CN/getting-started.md">5 分钟开始</a> ·
25
- <a href="./docs/zh-CN/releases/v0.2.2.md">v0.2.2 升级说明</a> ·
25
+ <a href="./docs/zh-CN/releases/v0.2.4.md">v0.2.4 升级说明</a> ·
26
26
  <a href="https://github.com/omdsh-dev/dsh-mnemon/blob/e6ca446e45bdd17991f3c7c98560456de465282b/docs/assets/media/dsh-mnemon-memory-system-demo.mp4">观看宽屏实机演示</a>
27
27
  </p>
28
28
 
@@ -190,7 +190,7 @@ dsh plugin --profile headless add "link:/absolute/path/to/dsh-mnemon"
190
190
  | 配置范围、路由与模型 | [配置参考](./docs/zh-CN/configuration.md) |
191
191
  | 备份、更新或排障 | [运维指南](./docs/zh-CN/operations.md) |
192
192
  | 接入工具、命令或 RPC | [接口参考](./docs/zh-CN/interfaces.md) |
193
- | 查看本次升级 | [v0.2.2 发布说明](./docs/zh-CN/releases/v0.2.2.md) |
193
+ | 查看本次升级 | [v0.2.4 发布说明](./docs/zh-CN/releases/v0.2.4.md) |
194
194
 
195
195
  完整目录见[文档中心](./docs/zh-CN/README.md)。
196
196
 
package/cordis.patch.yml CHANGED
@@ -13,5 +13,6 @@
13
13
  idleReviewMs: 30000
14
14
  tabEnabled: true
15
15
  writeEnabled: true
16
+ remoteAccess: read-only
16
17
  timeoutMs: 10000
17
18
  defaultRecallLimit: 10
package/lib/client.js CHANGED
@@ -1194,6 +1194,7 @@ window.__ModuleLoader__.load({
1194
1194
  "config.customAbsolute": "自定义目录必须是绝对路径或以 ~/ 开头;Windows 可填写盘符或 UNC 路径。",
1195
1195
  "config.saveFailed": "保存失败:{error}",
1196
1196
  "config.readOnly": "当前部署的插件设置为只读。",
1197
+ "config.unavailable": "无法加载记忆系统设置。请检查 Host 是否已为当前 Web 部署授权设置 RPC。",
1197
1198
  "config.discard": "放弃修改",
1198
1199
  "config.saving": "保存中…",
1199
1200
  "config.save": "保存",
@@ -2050,6 +2051,7 @@ window.__ModuleLoader__.load({
2050
2051
  "config.customAbsolute": "The custom directory must be absolute or start with ~/. Windows drive and UNC paths are supported.",
2051
2052
  "config.saveFailed": "Save failed: {error}",
2052
2053
  "config.readOnly": "Plugin settings are read-only in this deployment.",
2054
+ "config.unavailable": "Memory System settings could not be loaded. Check whether the Host grants the settings RPC to this Web deployment.",
2053
2055
  "config.discard": "Discard changes",
2054
2056
  "config.saving": "Saving…",
2055
2057
  "config.save": "Save",
@@ -2162,7 +2164,7 @@ window.__ModuleLoader__.load({
2162
2164
  return `${(bytes / 1048576).toFixed(1)} MB`;
2163
2165
  }
2164
2166
  function MnemonPackSection({ connection, sessionId, workspaceId, refreshKey, t, embedded = false }) {
2165
- const client = (0, react.useMemo)(() => connection === void 0 || connection.isLoopback === false ? null : new MnemonClient(connection, sessionId, workspaceId), [
2167
+ const client = (0, react.useMemo)(() => connection === void 0 ? null : new MnemonClient(connection, sessionId, workspaceId), [
2166
2168
  connection,
2167
2169
  sessionId,
2168
2170
  workspaceId
@@ -2992,7 +2994,7 @@ window.__ModuleLoader__.load({
2992
2994
  });
2993
2995
  }
2994
2996
  function ProviderSettingsSection(props) {
2995
- const client = (0, react.useMemo)(() => props.connection === void 0 || props.connection.isLoopback === false ? null : new MnemonClient(props.connection, props.sessionId, props.workspaceId), [
2997
+ const client = (0, react.useMemo)(() => props.connection === void 0 ? null : new MnemonClient(props.connection, props.sessionId, props.workspaceId), [
2996
2998
  props.connection,
2997
2999
  props.sessionId,
2998
3000
  props.workspaceId
@@ -3274,9 +3276,16 @@ window.__ModuleLoader__.load({
3274
3276
  const activeScope = coreDraft(coreSnapshot.value).storageScope === "workspace" ? "workspace" : "global";
3275
3277
  const error = validation(t, draft);
3276
3278
  const loading = coreSnapshot.status === "loading" || interactionSnapshot.status === "loading";
3277
- const localWrites = connection?.isLoopback !== false;
3278
- const writable = localWrites && coreSnapshot.writable && interactionSnapshot.writable;
3279
- if (coreSnapshot.status === "unavailable" && interactionSnapshot.status === "unavailable") return null;
3279
+ const writable = coreSnapshot.writable && interactionSnapshot.writable;
3280
+ if (coreSnapshot.status === "unavailable" && interactionSnapshot.status === "unavailable") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
3281
+ className: MnemonSettingsCard_module_css_default.page,
3282
+ "aria-label": t("config.aria"),
3283
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3284
+ className: MnemonSettingsCard_module_css_default.error,
3285
+ role: "alert",
3286
+ children: t("config.unavailable")
3287
+ })
3288
+ });
3280
3289
  const edit = (field, value) => {
3281
3290
  setDraft((current) => ({
3282
3291
  ...current,
@@ -3339,8 +3348,8 @@ window.__ModuleLoader__.load({
3339
3348
  setSaving(false);
3340
3349
  }
3341
3350
  };
3342
- const coreDisabled = loading || saving || !localWrites || !coreSnapshot.writable;
3343
- const interactionDisabled = loading || saving || !localWrites || !interactionSnapshot.writable;
3351
+ const coreDisabled = loading || saving || !coreSnapshot.writable;
3352
+ const interactionDisabled = loading || saving || !interactionSnapshot.writable;
3344
3353
  const scopeChanging = dirty.has("storageScope") || dirty.has("dataDir");
3345
3354
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
3346
3355
  className: MnemonSettingsCard_module_css_default.page,
package/lib/index.js CHANGED
@@ -81,6 +81,7 @@ const Config = z.object({
81
81
  displayMode: z.union(["sidebar", "buildin"]).default("sidebar"),
82
82
  tabEnabled: z.boolean().default(true),
83
83
  writeEnabled: z.boolean().default(true),
84
+ remoteAccess: z.union(["read-only", "trusted-host"]).default("read-only"),
84
85
  lifecycleEnabled: z.boolean().default(true),
85
86
  recallMode: z.union(["guided", "off"]).default("guided"),
86
87
  writebackMode: z.union(["guided", "off"]).default("guided"),
@@ -226,6 +227,7 @@ function resolveConfig(config = {}) {
226
227
  displayMode: config.displayMode ?? "sidebar",
227
228
  tabEnabled: config.tabEnabled ?? true,
228
229
  writeEnabled: config.writeEnabled ?? true,
230
+ remoteAccess: config.remoteAccess ?? "read-only",
229
231
  lifecycleEnabled: config.lifecycleEnabled ?? true,
230
232
  recallMode: config.recallMode ?? "guided",
231
233
  writebackMode: config.writebackMode ?? "guided",
@@ -9433,7 +9435,7 @@ function createWriteHandler(input, lifecycle, runtimeMemory, versions) {
9433
9435
  }
9434
9436
  };
9435
9437
  }
9436
- /** Backup payloads contain private memory and therefore remain loopback-only. */
9438
+ /** Backup payloads contain private memory and use the deployment's management authority. */
9437
9439
  function createPackHandler(input, writeEnabled = true) {
9438
9440
  return async (endpoint, rawPayload) => {
9439
9441
  try {
@@ -9452,15 +9454,15 @@ function createPackHandler(input, writeEnabled = true) {
9452
9454
  }
9453
9455
  };
9454
9456
  }
9455
- /** Read and activation control are available to trusted Web hosts; all other mutations stay loopback-only. */
9456
- function registerRpc(connection, input, lifecycle, runtimeMemory, storage, packs, versions) {
9457
+ /** Reads and activation use trusted hosts; other privileged channels require explicit promotion. */
9458
+ function registerRpc(connection, input, lifecycle, runtimeMemory, storage, packs, versions, managementAuthority = "loopback") {
9457
9459
  const versionManager = versions ?? new VersionUpdateManager({ mnemonCliPath: () => findVersionCli(input) });
9458
9460
  connection.rpc.handle(MNEMON_READ_CHANNEL, createReadHandler(input, lifecycle, runtimeMemory, storage, versionManager), { authority: "trusted-host" });
9459
9461
  connection.rpc.handle(MNEMON_ACTIVATION_CHANNEL, createActivationHandler(input), { authority: "trusted-host" });
9460
- connection.rpc.handle(MNEMON_WRITE_CHANNEL, createWriteHandler(input, lifecycle, runtimeMemory, versionManager), { authority: "loopback" });
9462
+ connection.rpc.handle(MNEMON_WRITE_CHANNEL, createWriteHandler(input, lifecycle, runtimeMemory, versionManager), { authority: managementAuthority });
9461
9463
  const packManager = isRoutedRuntime(input) ? input : packs;
9462
9464
  const config = input.config;
9463
- if (packManager !== void 0) connection.rpc.handle(MNEMON_PACK_CHANNEL, createPackHandler(packManager, () => config.writeEnabled), { authority: "loopback" });
9465
+ if (packManager !== void 0) connection.rpc.handle(MNEMON_PACK_CHANNEL, createPackHandler(packManager, () => config.writeEnabled), { authority: managementAuthority });
9464
9466
  }
9465
9467
  function findVersionCli(input) {
9466
9468
  return input.config.cliPath;
@@ -9577,8 +9579,8 @@ function createSettingsHandler(settings) {
9577
9579
  }
9578
9580
  };
9579
9581
  }
9580
- function registerSettingsRpc(connection, settings) {
9581
- connection.rpc.handle(MNEMON_SETTINGS_CHANNEL, createSettingsHandler(settings), { authority: "loopback" });
9582
+ function registerSettingsRpc(connection, settings, authority = "loopback") {
9583
+ connection.rpc.handle(MNEMON_SETTINGS_CHANNEL, createSettingsHandler(settings), { authority });
9582
9584
  }
9583
9585
  //#endregion
9584
9586
  //#region src/tools.ts
@@ -10284,8 +10286,9 @@ function apply(rawContext, config = {}) {
10284
10286
  registerRuntimeMemoryContext(ctx, runtime.runtimeMemory);
10285
10287
  ctx.inject(["connection"], (webContext) => {
10286
10288
  if (webContext.connection === void 0) return;
10287
- registerRpc(webContext.connection, runtime, lifecycle);
10288
- registerSettingsRpc(webContext.connection, ctx.settings);
10289
+ const managementAuthority = resolved.remoteAccess === "trusted-host" ? "trusted-host" : "loopback";
10290
+ registerRpc(webContext.connection, runtime, lifecycle, void 0, void 0, void 0, void 0, managementAuthority);
10291
+ registerSettingsRpc(webContext.connection, ctx.settings, managementAuthority);
10289
10292
  });
10290
10293
  }
10291
10294
  //#endregion
@@ -793,6 +793,7 @@ export declare const zh: {
793
793
  'config.customAbsolute': string;
794
794
  'config.saveFailed': string;
795
795
  'config.readOnly': string;
796
+ 'config.unavailable': string;
796
797
  'config.discard': string;
797
798
  'config.saving': string;
798
799
  'config.save': string;
@@ -1650,6 +1651,7 @@ export declare const en: {
1650
1651
  'config.customAbsolute': string;
1651
1652
  'config.saveFailed': string;
1652
1653
  'config.readOnly': string;
1654
+ 'config.unavailable': string;
1653
1655
  'config.discard': string;
1654
1656
  'config.saving': string;
1655
1657
  'config.save': string;
@@ -1,10 +1,11 @@
1
1
  import type { RpcResult, SettingsOperation } from './shared/contracts.ts';
2
2
  export type { ClientConnectionHandle, ClientSettingsScope, ClientSettingsSnapshot, JsonPrimitive, JsonValue, RpcError, RpcResult, SettingsOperation, } from './shared/contracts.ts';
3
3
  export type HostRpcHandler = (endpoint: string, payload: unknown) => Promise<RpcResult<unknown>>;
4
+ export type HostRpcAuthority = 'trusted-host' | 'loopback';
4
5
  export interface HostConnectionHandle {
5
6
  rpc: {
6
7
  handle(channel: string, handler: HostRpcHandler, options: {
7
- authority: 'trusted-host' | 'loopback';
8
+ authority: HostRpcAuthority;
8
9
  }): unknown;
9
10
  };
10
11
  }
@@ -1,4 +1,4 @@
1
- import type { HostConnectionHandle, HostRpcHandler } from './contracts.ts';
1
+ import type { HostConnectionHandle, HostRpcAuthority, HostRpcHandler } from './contracts.ts';
2
2
  import type { MnemonLifecycle } from './lifecycle.ts';
3
3
  import type { RuntimeMemoryController } from './runtime-memory.ts';
4
4
  import type { MnemonService } from './service.ts';
@@ -16,7 +16,7 @@ export declare function createReadHandler(input: RuntimeInput, lifecycle?: Mnemo
16
16
  */
17
17
  export declare function createActivationHandler(input: RuntimeInput): HostRpcHandler;
18
18
  export declare function createWriteHandler(input: RuntimeInput, lifecycle?: MnemonLifecycle, runtimeMemory?: RuntimeMemoryController, versions?: VersionUpdateManager): HostRpcHandler;
19
- /** Backup payloads contain private memory and therefore remain loopback-only. */
19
+ /** Backup payloads contain private memory and use the deployment's management authority. */
20
20
  export declare function createPackHandler(input: MnemonPackManager | LiveMnemonRuntime, writeEnabled?: boolean | (() => boolean)): HostRpcHandler;
21
- /** Read and activation control are available to trusted Web hosts; all other mutations stay loopback-only. */
22
- export declare function registerRpc(connection: HostConnectionHandle, input: RuntimeInput, lifecycle?: MnemonLifecycle, runtimeMemory?: RuntimeMemoryController, storage?: StorageScopeInspector, packs?: MnemonPackManager, versions?: VersionUpdateManager): void;
21
+ /** Reads and activation use trusted hosts; other privileged channels require explicit promotion. */
22
+ export declare function registerRpc(connection: HostConnectionHandle, input: RuntimeInput, lifecycle?: MnemonLifecycle, runtimeMemory?: RuntimeMemoryController, storage?: StorageScopeInspector, packs?: MnemonPackManager, versions?: VersionUpdateManager, managementAuthority?: HostRpcAuthority): void;
@@ -1,4 +1,4 @@
1
- import type { HostConnectionHandle, HostRpcHandler, HostSettingsService } from './contracts.ts';
1
+ import type { HostConnectionHandle, HostRpcAuthority, HostRpcHandler, HostSettingsService } from './contracts.ts';
2
2
  export { MNEMON_SETTINGS_CHANNEL, MNEMON_SETTINGS_NAMESPACE, MNEMON_UI_SETTINGS_NAMESPACE } from './shared/contracts.ts';
3
3
  export declare function createSettingsHandler(settings: HostSettingsService): HostRpcHandler;
4
- export declare function registerSettingsRpc(connection: HostConnectionHandle, settings: HostSettingsService): void;
4
+ export declare function registerSettingsRpc(connection: HostConnectionHandle, settings: HostSettingsService, authority?: HostRpcAuthority): void;
@@ -81,6 +81,8 @@ export interface Config {
81
81
  displayMode?: 'sidebar' | 'buildin';
82
82
  tabEnabled?: boolean;
83
83
  writeEnabled?: boolean;
84
+ /** Remote Web policy for privileged Mnemon RPC. This boundary is sampled at Host startup. */
85
+ remoteAccess?: 'read-only' | 'trusted-host';
84
86
  lifecycleEnabled?: boolean;
85
87
  recallMode?: 'guided' | 'off';
86
88
  writebackMode?: 'guided' | 'off';
@@ -148,6 +150,7 @@ export interface ResolvedConfig {
148
150
  displayMode: 'sidebar' | 'buildin';
149
151
  tabEnabled: boolean;
150
152
  writeEnabled: boolean;
153
+ remoteAccess: 'read-only' | 'trusted-host';
151
154
  lifecycleEnabled: boolean;
152
155
  recallMode: 'guided' | 'off';
153
156
  writebackMode: 'guided' | 'off';
package/package.json CHANGED
@@ -1,51 +1,38 @@
1
1
  {
2
2
  "name": "dsh-mnemon",
3
- "version": "0.2.2",
4
- "description": "Three-tier memory system for DeepSeek Harness with nine pluggable providers, smart routing, independent task Agents, WebUI, and headless tools.",
3
+ "version": "0.2.4",
4
+ "description": "Three-tier memory control plane for DeepSeek Harness: persistent runtime context, searchable project documents, pluggable long-term memory, smart routing, supervised agent workflows, WebUI, and headless tools.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
7
7
  "deepseek-harness-plugin",
8
- "dsh",
9
8
  "dsh-plugin",
10
- "mnemon",
11
- "openviking",
12
- "honcho",
13
- "mem0",
14
- "hindsight",
15
- "holographic-memory",
16
- "retaindb",
17
- "byterover",
18
- "supermemory",
19
- "memory-provider",
20
- "memory-system",
21
- "memory-plugin",
22
9
  "agent-memory",
23
- "cross-agent-memory",
24
- "shared-agent-memory",
25
- "multi-agent-memory",
26
10
  "llm-memory",
27
11
  "persistent-memory",
28
12
  "long-term-memory",
29
13
  "runtime-memory",
30
14
  "working-memory",
15
+ "cross-session-memory",
16
+ "multi-agent-memory",
17
+ "shared-agent-memory",
18
+ "memory-orchestration",
19
+ "memory-provider",
20
+ "pluggable-memory",
21
+ "context-management",
31
22
  "project-memory",
32
23
  "project-documents",
33
24
  "document-search",
34
25
  "semantic-recall",
35
- "memory-space",
36
- "workspace-memory",
37
- "task-agent",
38
- "knowledge-graph",
39
- "ai-agent",
40
- "llm-agent",
41
- "external-memory",
42
26
  "local-first",
43
- "sqlite",
44
- "typescript",
45
- "cordis",
46
- "web-ui",
47
- "headless",
48
- "sidebar"
27
+ "mnemon",
28
+ "openviking",
29
+ "honcho",
30
+ "mem0",
31
+ "hindsight",
32
+ "holographic-memory",
33
+ "retaindb",
34
+ "byterover",
35
+ "supermemory"
49
36
  ],
50
37
  "repository": {
51
38
  "type": "git",