dsh-layered-memory 0.8.10 → 0.8.12

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.en.md CHANGED
@@ -10,21 +10,27 @@
10
10
  [简体中文](README.md) · [Latest release](https://github.com/JunNanLYS/dsh-layered-memory/releases/latest) · [Report issues](https://github.com/JunNanLYS/dsh-layered-memory/issues)
11
11
 
12
12
  [![npm version](https://img.shields.io/npm/v/dsh-layered-memory?color=6f83ff&style=flat-square&label=npm)](https://www.npmjs.com/package/dsh-layered-memory)
13
- [![DSH 0.1.1-rc.2](https://img.shields.io/badge/DSH-0.1.1--rc.2-8b5cf6?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
13
+ [![DSH 0.1.2-alpha.x](https://img.shields.io/badge/DSH-0.1.2--alpha.x-8b5cf6?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
14
14
  [![MIT License](https://img.shields.io/badge/license-MIT-536990?style=flat-square)](LICENSE)
15
15
 
16
16
  </div>
17
17
 
18
18
  ## Getting Started
19
19
 
20
- Requires Node ≥ 22.16. Two invocation styles the `npx` prefix can replace `dsh` in
20
+ Requires Node ≥ 22.16 and DeepSeek Harness **0.1.2-alpha.1** (as of 0.8.12 only the
21
+ 0.1.2-alpha.x host line is supported; for older hosts see the
22
+ [release history](https://github.com/JunNanLYS/dsh-layered-memory/releases)).
23
+ Two invocation styles — the `npx` prefix can replace `dsh` in
21
24
  any command below:
22
25
 
23
26
  ```bash
24
- # Option 1: run the official CLI directly via npx (no pre-installed dsh; version can be pinned, e.g. dsh-layered-memory@0.8.4)
25
- npx -y @deepseek-ai/dsh plugin --profile web add dsh-layered-memory
27
+ # Option 1: run the official CLI directly via npx (no pre-installed dsh; the host version must
28
+ # be pinned to the alpha line — the npm "latest" tag still points to 0.1.1-rc.x)
29
+ npx -y @deepseek-ai/dsh@0.1.2-alpha.2 plugin --profile web add dsh-layered-memory
26
30
 
27
- # Option 2: with the dsh CLI installed (dsh is a pnpm forwarder; npm i -g pnpm first if missing)
31
+ # Option 2: with the dsh CLI installed (upgrade to the alpha line first:
32
+ # npm i -g @deepseek-ai/dsh@0.1.2-alpha.2, then restart; dsh is a pnpm forwarder —
33
+ # npm i -g pnpm first if missing)
28
34
  dsh plugin --profile web add dsh-layered-memory
29
35
 
30
36
  # Alternative sources: GitHub repo / local path (dev & debugging, link: points at the repo; npm run build + restart dsh to apply)
package/README.md CHANGED
@@ -10,20 +10,23 @@
10
10
  [English](README.en.md) · [最新发行版](https://github.com/JunNanLYS/dsh-layered-memory/releases/latest) · [反馈问题](https://github.com/JunNanLYS/dsh-layered-memory/issues)
11
11
 
12
12
  [![npm version](https://img.shields.io/npm/v/dsh-layered-memory?color=6f83ff&style=flat-square&label=npm)](https://www.npmjs.com/package/dsh-layered-memory)
13
- [![DSH 0.1.1-rc.2](https://img.shields.io/badge/DSH-0.1.1--rc.2-8b5cf6?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
13
+ [![DSH 0.1.2-alpha.x](https://img.shields.io/badge/DSH-0.1.2--alpha.x-8b5cf6?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
14
14
  [![MIT License](https://img.shields.io/badge/license-MIT-536990?style=flat-square)](LICENSE)
15
15
 
16
16
  </div>
17
17
 
18
18
  ## 快速开始
19
19
 
20
- 需要 Node ≥ 22.16。两种调用方式任选(`npx` 前缀可替换下面任何 `dsh` 命令):
20
+ 需要 Node ≥ 22.16 DeepSeek Harness ≥ **0.1.2-alpha.1**(0.8.12 起仅支持
21
+ 0.1.2-alpha.x 宿主线;旧版插件请看 [历史版本](https://github.com/JunNanLYS/dsh-layered-memory/releases))。
22
+ 两种调用方式任选(`npx` 前缀可替换下面任何 `dsh` 命令):
21
23
 
22
24
  ```bash
23
- # 方式一:npx 直接跑官方 CLI(无需预装 dsh;可 pin 版本,如 dsh-layered-memory@0.8.4
24
- npx -y @deepseek-ai/dsh plugin --profile web add dsh-layered-memory
25
+ # 方式一:npx 直接跑官方 CLI(无需预装 dsh;宿主须带 alpha 版本号——npm latest 仍指向 0.1.1-rc.x
26
+ npx -y @deepseek-ai/dsh@0.1.2-alpha.2 plugin --profile web add dsh-layered-memory
25
27
 
26
- # 方式二:已装 dsh CLI(dsh pnpm 转发器,未装 pnpm 时先 npm i -g pnpm)
28
+ # 方式二:已装 dsh CLI(先升级到 alpha 线:npm i -g @deepseek-ai/dsh@0.1.2-alpha.2 并重启;
29
+ # dsh 是 pnpm 转发器,未装 pnpm 时先 npm i -g pnpm)
27
30
  dsh plugin --profile web add dsh-layered-memory
28
31
 
29
32
  # 包源备选:GitHub 仓库 / 本地路径(开发调试,link: 指向仓库,npm run build + 重启 dsh 即生效)
package/dist/client.js CHANGED
@@ -417,6 +417,19 @@ var __defProp = Object.defineProperty;
417
417
  ".dsh-mem-pill-off:focus-visible { outline: 2px solid var(--dsh-mem-accent); outline-offset: 1px; }",
418
418
  // 流光态焦点环(同一物理按钮的两态焦点反馈对称,配方同 .dsh-mem-btn)
419
419
  ".dsh-mem-flow:focus-visible { outline: 2px solid var(--dsh-mem-accent); outline-offset: 1px; }",
420
+ // ── 触屏隐形热区(手机端适配):触点目标补足 44px 标准(iOS HIG)。
421
+ // 伪元素不参与布局(浮层/输入栏几何零变化),指针事件落在宿主元素上。
422
+ // 全端统一不做 pointer:coarse 分端(桌面点中目标变大是纯收益)。
423
+ // pill:视觉高 24px,::after 上下各外扩 10px;只上下不左右——左右是宿主输入栏
424
+ // 邻位控件(模式选择器),外扩制造误触重叠带。
425
+ // 滑轨:视觉轨 22px,::before 上下各外扩 11px;touch-action:none 已随轨声明,
426
+ // 伪元素区的触摸同样命中轨元素。两处 px 值改须与注释口径同步 ──
427
+ ".dsh-mem-pill-hit::after {",
428
+ " content: ''; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px;",
429
+ "}",
430
+ ".dsh-mem-hitband::before {",
431
+ " content: ''; position: absolute; left: 0; right: 0; top: -11px; bottom: -11px;",
432
+ "}",
420
433
  // ── 浮层(dsh 原生菜单同配方:不透明实底 + inverted 描边(浅色不可见)+ lv3 阴影) ──
421
434
  ".dsh-mem-popover {",
422
435
  " border-radius: 12px;",
@@ -3272,6 +3285,35 @@ var __defProp = Object.defineProperty;
3272
3285
  themeObs.disconnect();
3273
3286
  };
3274
3287
  }, []);
3288
+ const popRef = (0, import_react16.useRef)(null);
3289
+ const shiftRef = (0, import_react16.useRef)(0);
3290
+ const [shiftX, setShiftX] = (0, import_react16.useState)(0);
3291
+ (0, import_react16.useLayoutEffect)(() => {
3292
+ const clamp = () => {
3293
+ const el = popRef.current;
3294
+ if (!el) return;
3295
+ const r = el.getBoundingClientRect();
3296
+ if (r.width === 0) return;
3297
+ const left = r.left - shiftRef.current;
3298
+ const edge = 8;
3299
+ let next = 0;
3300
+ if (left < edge) next = edge - left;
3301
+ else if (left + r.width > window.innerWidth - edge) {
3302
+ next = window.innerWidth - edge - (left + r.width);
3303
+ }
3304
+ if (next !== shiftRef.current) {
3305
+ shiftRef.current = next;
3306
+ setShiftX(next);
3307
+ }
3308
+ };
3309
+ clamp();
3310
+ window.addEventListener("resize", clamp);
3311
+ const iv = window.setInterval(clamp, 100);
3312
+ return () => {
3313
+ window.removeEventListener("resize", clamp);
3314
+ window.clearInterval(iv);
3315
+ };
3316
+ }, []);
3275
3317
  const stops = [];
3276
3318
  for (let i = 0; i < MODES.length; i++) {
3277
3319
  const stopLeft = i / (MODES.length - 1) * INNER_W + THUMB / 2;
@@ -3298,11 +3340,12 @@ var __defProp = Object.defineProperty;
3298
3340
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3299
3341
  "div",
3300
3342
  {
3343
+ ref: popRef,
3301
3344
  style: {
3302
3345
  position: "absolute",
3303
3346
  bottom: "calc(100% + 8px)",
3304
3347
  left: "50%",
3305
- transform: "translateX(-50%)",
3348
+ transform: "translateX(calc(-50% + " + shiftX + "px))",
3306
3349
  zIndex: 1e3
3307
3350
  },
3308
3351
  children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
@@ -3315,6 +3358,7 @@ var __defProp = Object.defineProperty;
3315
3358
  "div",
3316
3359
  {
3317
3360
  ref: trackRef,
3361
+ className: "dsh-mem-hitband",
3318
3362
  style: {
3319
3363
  position: "relative",
3320
3364
  // 容器宽 = thumb 活动范围(0..INNER_W + THUMB),点击映射与视觉两端严格对齐
@@ -3477,10 +3521,10 @@ var __defProp = Object.defineProperty;
3477
3521
  const onKey = (e) => {
3478
3522
  if (e.key === "Escape") setOpen(false);
3479
3523
  };
3480
- document.addEventListener("mousedown", onDown);
3524
+ document.addEventListener("pointerdown", onDown);
3481
3525
  document.addEventListener("keydown", onKey);
3482
3526
  return () => {
3483
- document.removeEventListener("mousedown", onDown);
3527
+ document.removeEventListener("pointerdown", onDown);
3484
3528
  document.removeEventListener("keydown", onKey);
3485
3529
  };
3486
3530
  }, [open]);
@@ -3535,6 +3579,8 @@ var __defProp = Object.defineProperty;
3535
3579
  const faceLabel = !loaded ? error ? "⚠" : "…" : isOff ? info.label : !recallResolved ? "只写" : info.label;
3536
3580
  ensureThemeStyle();
3537
3581
  const pillStyle = {
3582
+ position: "relative",
3583
+ // dsh-mem-pill-hit 的 ::after 隐形热区以此为定位基准
3538
3584
  display: "inline-flex",
3539
3585
  alignItems: "center",
3540
3586
  gap: 4,
@@ -3563,7 +3609,7 @@ var __defProp = Object.defineProperty;
3563
3609
  if (error) load();
3564
3610
  setOpen(!open);
3565
3611
  },
3566
- className: isFlow ? "dsh-mem-flow" : "dsh-mem-pill-off",
3612
+ className: (isFlow ? "dsh-mem-flow" : "dsh-mem-pill-off") + " dsh-mem-pill-hit",
3567
3613
  style: pillStyle,
3568
3614
  children: [
3569
3615
  "记忆 · ",
package/dist/settings.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import Schema from '@deepseek-ai/schemastery';
2
- import { settingsNamespace } from '@deepseek-ai/dsh-settings';
3
2
  import { EFFORT_CHOICES } from './config.js';
4
3
  /**
5
4
  * 运行时统一路由链条目:[0] = 主路由(provider/model 双空 = 跟随默认模型),
@@ -63,7 +62,9 @@ export function validateDistillChain(chain, opts) {
63
62
  }
64
63
  return null;
65
64
  }
66
- const NS = settingsNamespace('dsh-memory');
65
+ // 0.1.2-alpha dsh-settings 不再导出 settingsNamespace 品牌 helper:
66
+ // register 改为泛型字面量签名(编译期校验 kebab-case,品牌在服务内部解析)。
67
+ const NS = 'dsh-memory';
67
68
  const ALWAYS_ON = {
68
69
  enabled: true,
69
70
  capture: true,
package/dist/stats.js CHANGED
@@ -56,7 +56,7 @@ export function registerMemoryRpc(ctx, cfg, stores, logger, status, live, modes,
56
56
  error: { code: 'internal', message: err instanceof Error ? err.message : String(err), details: {} },
57
57
  };
58
58
  }
59
- }, { authority: 'loopback' });
59
+ });
60
60
  registeredImpl = connection;
61
61
  if (!active) {
62
62
  void dispose();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-layered-memory",
3
- "version": "0.8.10",
3
+ "version": "0.8.12",
4
4
  "description": "L0~L3 分层蒸馏记忆插件 for DeepSeek Harness:自动捕获对话(L0)、抽取原子记忆(L1)、整合场景块(L2)、蒸馏核心画像/团队方法论(L3),并在模型步骤前自动召回注入。移植自 MemoryCore (TencentDB Agent Memory) 的管线设计。",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,7 +19,6 @@
19
19
  },
20
20
  "client": {
21
21
  "inject": [
22
- "@deepseek-ai/dsh-client-runtime",
23
22
  "@deepseek-ai/dsh-client-connection"
24
23
  ],
25
24
  "platform": "web"
@@ -53,32 +52,32 @@
53
52
  },
54
53
  "license": "MIT",
55
54
  "dependencies": {
56
- "@deepseek-ai/schemastery": "3.18.1",
55
+ "@deepseek-ai/schemastery": "3.18.2",
57
56
  "@node-rs/jieba": "^2.0.2",
58
57
  "sqlite-vec": "^0.1.7-alpha.2",
59
58
  "undici": "^7.29.0"
60
59
  },
61
60
  "peerDependencies": {
62
61
  "@deepseek-ai/cordis": "^4.0.1",
63
- "@deepseek-ai/dsh-agent": "^0.1.1-rc.2",
64
- "@deepseek-ai/dsh-home-paths": "^0.1.1-rc.2",
65
- "@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
66
- "@deepseek-ai/dsh-session": "^0.1.1-rc.2",
67
- "@deepseek-ai/dsh-settings": "^0.1.1-rc.2",
68
- "@deepseek-ai/dsh-system-prompt": "^0.1.1-rc.2",
69
- "@deepseek-ai/dsh-tools": "^0.1.1-rc.2"
62
+ "@deepseek-ai/dsh-agent": "^0.1.2-alpha.1",
63
+ "@deepseek-ai/dsh-home-paths": "^0.1.2-alpha.1",
64
+ "@deepseek-ai/dsh-llm": "^0.1.2-alpha.1",
65
+ "@deepseek-ai/dsh-session": "^0.1.2-alpha.1",
66
+ "@deepseek-ai/dsh-settings": "^0.1.2-alpha.1",
67
+ "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.1",
68
+ "@deepseek-ai/dsh-tools": "^0.1.2-alpha.1"
70
69
  },
71
70
  "devDependencies": {
72
- "@deepseek-ai/cordis": "4.0.1",
73
- "@deepseek-ai/dsh-agent": "0.1.1-rc.2",
74
- "@deepseek-ai/dsh-agent-default-model": "0.1.1-rc.2",
75
- "@deepseek-ai/dsh-client-connection": "0.1.1-rc.2",
76
- "@deepseek-ai/dsh-home-paths": "0.1.1-rc.2",
77
- "@deepseek-ai/dsh-llm": "0.1.1-rc.2",
78
- "@deepseek-ai/dsh-session": "0.1.1-rc.2",
79
- "@deepseek-ai/dsh-settings": "0.1.1-rc.2",
80
- "@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
81
- "@deepseek-ai/dsh-tools": "0.1.1-rc.2",
71
+ "@deepseek-ai/cordis": "4.0.2",
72
+ "@deepseek-ai/dsh-agent": "0.1.2-alpha.2",
73
+ "@deepseek-ai/dsh-agent-default-model": "0.1.2-alpha.2",
74
+ "@deepseek-ai/dsh-client-connection": "0.1.2-alpha.2",
75
+ "@deepseek-ai/dsh-home-paths": "0.1.2-alpha.2",
76
+ "@deepseek-ai/dsh-llm": "0.1.2-alpha.2",
77
+ "@deepseek-ai/dsh-session": "0.1.2-alpha.2",
78
+ "@deepseek-ai/dsh-settings": "0.1.2-alpha.2",
79
+ "@deepseek-ai/dsh-system-prompt": "0.1.2-alpha.2",
80
+ "@deepseek-ai/dsh-tools": "0.1.2-alpha.2",
82
81
  "@types/node": "^22.0.0",
83
82
  "@types/react": "^19.2.18",
84
83
  "esbuild": "^0.28.2",