dsh-mnemon 0.2.3 → 0.2.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
@@ -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.5-5b5bd6" alt="release v0.2.5">
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.5.md">Read the v0.2.5 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.5 release notes](./docs/en/releases/v0.2.5.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.5-5b5bd6" alt="发布版本 v0.2.5">
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.5.md">v0.2.5 升级说明</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.5 发布说明](./docs/zh-CN/releases/v0.2.5.md) |
194
194
 
195
195
  完整目录见[文档中心](./docs/zh-CN/README.md)。
196
196
 
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
@@ -896,7 +896,7 @@ var DocumentManager = class {
896
896
  //#endregion
897
897
  //#region src/guidance.ts
898
898
  const GUIDANCE_SECTION_NAME = "mnemon:routing";
899
- const RUNTIME_MEMORY_SECTION_NAME = "mnemon:runtime-memory";
899
+ const RUNTIME_MEMORY_CONTEXT_NAME = "mnemon:runtime-memory";
900
900
  const ROUTING_GUIDANCE = "Use memory only by need. For substantial project records, search active Mnemon Documents before deep recall. Call mnemon_recall when durable history may matter or an exact prior detail is missing; never infer a missing historical rule. New explicit reusable facts normally go to mnemon_runtime_memory. A write completes only with a tool receipt.";
901
901
  const RUNTIME_MEMORY_EMPTY_BRACES_VARIABLE = "mnemon_runtime_memory_empty_braces";
902
902
  const LITERAL_EMPTY_BRACES = "{{}}";
@@ -916,20 +916,20 @@ function registerGuidance(ctx, config) {
916
916
  text: () => config?.routingGuidance === false ? "" : ROUTING_GUIDANCE
917
917
  });
918
918
  }
919
- /** Inject the latest committed USER.md/MEMORY.md projections on every prompt assembly. */
919
+ /** Project the latest committed USER.md/MEMORY.md as DSH's durable runtime-context snapshot. */
920
920
  function registerRuntimeMemoryContext(ctx, runtimeMemory) {
921
921
  const prompt = systemPrompt(ctx);
922
922
  prompt?.variable?.(RUNTIME_MEMORY_EMPTY_BRACES_VARIABLE, () => LITERAL_EMPTY_BRACES);
923
- prompt?.section?.({
924
- name: RUNTIME_MEMORY_SECTION_NAME,
923
+ prompt?.context?.({
924
+ name: RUNTIME_MEMORY_CONTEXT_NAME,
925
925
  order: 145,
926
926
  text: () => runtimeMemoryPromptText(runtimeMemory)
927
927
  });
928
928
  }
929
929
  /** Shadow the global fallback with the current Agent workspace's hot memory. */
930
930
  function registerAgentRuntimeMemoryContext(agent, runtimeMemory) {
931
- const dispose = scopedSystemPrompt(agent)?.section?.({
932
- name: RUNTIME_MEMORY_SECTION_NAME,
931
+ const dispose = scopedSystemPrompt(agent)?.context?.({
932
+ name: RUNTIME_MEMORY_CONTEXT_NAME,
933
933
  order: 145,
934
934
  text: () => runtimeMemoryPromptText(runtimeMemory())
935
935
  });
@@ -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;
@@ -2,10 +2,10 @@ import type { HostAgent, HostContextShape } from './contracts.ts';
2
2
  import type { ResolvedConfig } from './config.ts';
3
3
  import type { RuntimeMemoryController } from './runtime-memory.ts';
4
4
  export declare const GUIDANCE_SECTION_NAME = "mnemon:routing";
5
- export declare const RUNTIME_MEMORY_SECTION_NAME = "mnemon:runtime-memory";
5
+ export declare const RUNTIME_MEMORY_CONTEXT_NAME = "mnemon:runtime-memory";
6
6
  export declare const ROUTING_GUIDANCE = "Use memory only by need. For substantial project records, search active Mnemon Documents before deep recall. Call mnemon_recall when durable history may matter or an exact prior detail is missing; never infer a missing historical rule. New explicit reusable facts normally go to mnemon_runtime_memory. A write completes only with a tool receipt.";
7
7
  export declare function registerGuidance(ctx: HostContextShape, config?: Pick<ResolvedConfig, 'routingGuidance'>): void;
8
- /** Inject the latest committed USER.md/MEMORY.md projections on every prompt assembly. */
8
+ /** Project the latest committed USER.md/MEMORY.md as DSH's durable runtime-context snapshot. */
9
9
  export declare function registerRuntimeMemoryContext(ctx: HostContextShape, runtimeMemory: RuntimeMemoryController): void;
10
10
  /** Shadow the global fallback with the current Agent workspace's hot memory. */
11
11
  export declare function registerAgentRuntimeMemoryContext(agent: HostAgent, runtimeMemory: () => RuntimeMemoryController): () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mnemon",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
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",