dsh-memory-core 0.1.0 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2
4
+
5
+ - 修复:`lib/schema.js` 用 `z.enum(...)`(zod 的写法,`@deepseek-ai/schemastery` 没有这个方法),包一 import 就抛 `TypeError: z.enum is not a function`。内核 Loader 的 `_init()` 捕获 import 错误后不建 fiber,于是 preset 里这一行只显示「never started」,日志里不落错。改为 `z.union([z.const("lite"), z.const("full")])`。
6
+ - `_dryrun.mjs` 的依赖 stub 从「万能 Proxy」改为严格白名单:只认 schemastery 真实存在的构造器与实例方法,出现 `z.enum` 这类不存在的名字立即抛错。原先的万能 Proxy 把这类错误吞掉了,dryrun 63 项全过、真机却起不来。
7
+
8
+ ## 0.1.1
9
+
10
+ - 文案修正:旧名「companion」统一改为 `dsh-memory-core`(README、package.json 的 description 与 keywords、源码注释、日志前缀)。
11
+ - README 补齐与 dsh-memory-shield 的配套关系、安装方式、数据目录与 `DSH_MEMORY_CORE_DIR` 说明。
12
+ - 未改任何运行时行为。
13
+
3
14
  ## 0.1.0
4
15
 
5
16
  - 首版:按 preset 隔离的记忆包(与 dsh-memory-shield 配套)。
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # dsh-memory-core
2
2
 
3
- 遮蔽会话的 companion 记忆包。与 [dsh-memory-shield (shield)](../dsh-memory-shield/) 配对使用:
3
+ 遮蔽会话的隔离记忆包。与 [dsh-memory-shield (shield)](../dsh-memory-shield/) 配对使用:
4
4
 
5
5
  - **shield 包**:挡住其他记忆插件(dsh-memory-evolve 等)的注入和工具,让指定 preset 的会话拥有干净的上下文。
6
- - **companion 包**:给被遮蔽的会话加一套隔离的记忆存储——独立数据目录、独立工具、独立面板,与普通会话的 dsh-memory-evolve 完全隔离。
6
+ - **`dsh-memory-core` 包**:给被遮蔽的会话加一套隔离的记忆存储——独立数据目录、独立工具、独立面板,与普通会话的 dsh-memory-evolve 完全隔离。
7
7
 
8
8
  ## 安装
9
9
 
@@ -17,7 +17,7 @@ dsh plugin --profile web add dsh-memory-core
17
17
  2. 找到 `id: memory-core` 那一段,把 `disabled: true` 改成 `disabled: false`,或直接删掉这一行。
18
18
  3. 完全退出并重启 DSH,再新建会话。
19
19
 
20
- 前提:已安装 `dsh-memory-shield`(shield 包)。两包配对时建议只把 companion 挂进需要独立记忆的那个 preset,不要放进全局 `dsh.profile.bundles`。
20
+ 前提:已安装 `dsh-memory-shield`(shield 包)。两包配对时建议只把 `dsh-memory-core` 挂进需要独立记忆的那个 preset,不要放进全局 `dsh.profile.bundles`。
21
21
 
22
22
  ## 配置
23
23
 
package/client.js CHANGED
@@ -70,7 +70,7 @@ window.__ModuleLoader__.load({
70
70
  return h("div", { "data-pmc-page": "" },
71
71
  h("div", { "data-pmc-head": "" },
72
72
  h("span", { "data-pmc-title": "" }, "遮蔽会话记忆"),
73
- h("span", { "data-pmc-sub": "" }, "companion 模式 · 数据与普通会话完全隔离")),
73
+ h("span", { "data-pmc-sub": "" }, "记忆核心 · 数据与普通会话完全隔离")),
74
74
  h("div", { "data-pmc-sec": "" },
75
75
  h("div", { "data-pmc-row": "" },
76
76
  h("span", { "data-pmc-name": "" }, "当前模式"),
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dsh-memory-core —— 遮蔽会话的 companion 记忆包。
2
+ * dsh-memory-core —— 遮蔽会话的隔离记忆包。
3
3
  *
4
4
  * 与 shield 包配对使用:shield 挡住其他记忆插件的注入,本包给遮蔽会话加一套
5
5
  * 隔离的记忆存储(独立数据目录,与普通会话的 dsh-memory-evolve 完全隔离)。
@@ -283,7 +283,7 @@ function apply(ctx, config) {
283
283
  );
284
284
 
285
285
  ctx.logger.info(
286
- `${name}: companion active — mode=${s.memoryTracks}, dir=${memoryDir}, tracks=${tracksOf(s.memoryTracks).join("/")}`,
286
+ `${name}: memory-core active — mode=${s.memoryTracks}, dir=${memoryDir}, tracks=${tracksOf(s.memoryTracks).join("/")}`,
287
287
  );
288
288
  }
289
289
 
package/lib/defaults.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 默认配置(companion 版)。
2
+ * 默认配置(dsh-memory-core 版)。
3
3
  */
4
4
  import path from "node:path";
5
5
  import os from "node:os";
package/lib/schema.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * schemastery schema(companion 记忆版)。
2
+ * schemastery schema(dsh-memory-core 记忆版)。
3
3
  */
4
4
  import z from "@deepseek-ai/schemastery";
5
5
  import { DEFAULTS } from "./defaults.js";
6
6
 
7
7
  export const Config = z.object({
8
- memoryTracks: z.enum(["lite", "full"]).default(DEFAULTS.memoryTracks),
8
+ memoryTracks: z.union([z.const("lite"), z.const("full")]).default(DEFAULTS.memoryTracks),
9
9
  presetName: z.string().default(DEFAULTS.presetName),
10
10
  memoryDir: z.string().default(DEFAULTS.memoryDir),
11
11
  writeGuard: z.boolean().default(DEFAULTS.writeGuard),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
- {
1
+ {
2
2
  "name": "dsh-memory-core",
3
- "version": "0.1.0",
4
- "description": "遮蔽会话的 companion 记忆包:给 dsh-memory-shield (shield) 遮蔽过的会话加一套隔离的记忆存储(独立数据目录,与 dsh-memory-evolve 完全隔离)。",
3
+ "version": "0.1.2",
4
+ "description": "遮蔽会话的隔离记忆包:给 dsh-memory-shield (shield) 遮蔽过的会话加一套独立记忆存储(独立数据目录,与 dsh-memory-evolve 完全隔离)。",
5
5
  "type": "module",
6
6
  "main": "./index.js",
7
7
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  "deepseek-harness",
13
13
  "preset",
14
14
  "memory",
15
- "companion",
15
+ "memory-core",
16
16
  "isolated"
17
17
  ],
18
18
  "repository": {