@restregular/dsh-memory 0.9.0 → 0.9.1
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 +9 -3
- package/icon.svg +21 -17
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-memory
|
|
2
2
|
|
|
3
|
-
DeepSeek Harness 的本地长期记忆插件 —— **一个包、一条 Loader entry、四个半边**:JSONL 存储 + 本地向量检索(llama-server,OpenAI 兼容)+
|
|
3
|
+
DeepSeek Harness 的本地长期记忆插件 —— **一个包、一条 Loader entry、四个半边**:JSONL 存储 + 本地向量检索(llama-server,OpenAI 兼容)+ 五个模型工具 + 自动召回注入 + 设置页管理面板。
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@restregular/dsh-memory)
|
|
6
6
|
[](./LICENSE)
|
|
@@ -257,7 +257,9 @@ npm run verify # 构建到 .verify/,不落 packages/(CI 或改动后自检)
|
|
|
257
257
|
1. patch **恰好一行** insert,且 `name` 就是包名;
|
|
258
258
|
2. `package.json` 同时声明 `dsh.bundle.patch` 与 `dsh.client.platform: web`,并导出 `./client`;
|
|
259
259
|
3. `lib/client.js` 的 `__ModuleLoader__.load({ id })` 等于包名;
|
|
260
|
-
4. 入口里四条半边的相对 import 都在(改写没生效时,只有装到用户机器上才会 `Cannot find module`)
|
|
260
|
+
4. 入口里四条半边的相对 import 都在(改写没生效时,只有装到用户机器上才会 `Cannot find module`);
|
|
261
|
+
5. `locale/en.json` / `locale/zh.json` 带 `meta.title` 与 `meta.description`,并且 `exports` 放行了这两个子路径(少一步,插件列表就静默回退成包名);
|
|
262
|
+
6. `icon.svg` 是包内 SVG 且不超过宿主 256 KiB 的读取上限。
|
|
261
263
|
|
|
262
264
|
可选的真实加载验证(证明产物在没有 TS 支持的普通 node 里能跑):
|
|
263
265
|
|
|
@@ -293,7 +295,7 @@ source/memory-plugin/ 单入口:组合四个半边(唯一一条 entry 的实
|
|
|
293
295
|
source/memory-local/ provider:存储 / 检索 / 向量后端 / 一键安装 / 模型清单与硬件推荐
|
|
294
296
|
source/tool-memory/ 四个模型工具
|
|
295
297
|
source/memory-inject/ 召回注入
|
|
296
|
-
source/memory-panel/ 面板:lib/index.js(服务端)+ lib/client.js(客户端 bundle)
|
|
298
|
+
source/memory-panel/ 面板:lib/index.js(服务端)+ lib/client.js(客户端 bundle)+ locale/icon.svg(插件列表显示名与图标)
|
|
297
299
|
packages/dsh-memory/ 构建产物 → 发布为 @restregular/dsh-memory(与 npm 上的包逐字节一致)
|
|
298
300
|
tools/build-single-package.mjs 构建(产物契约检查 + 可选加载验证)
|
|
299
301
|
```
|
|
@@ -321,6 +323,10 @@ tools/build-single-package.mjs 构建(产物契约检查 + 可选加载验证)
|
|
|
321
323
|
|
|
322
324
|
## 版本
|
|
323
325
|
|
|
326
|
+
- **0.9.1** —— 插件列表只显示包名的问题:**加了显示名与图标**。
|
|
327
|
+
- 宿主 `readPluginMeta` 只读包内 `locale/<lang>.json` 的 `meta.title` / `meta.description`(且必须能通过 `exports` 解析),缺失就回退成包名 —— 所以插件列表里一直是 `@restregular/dsh-memory` + 一长串 `package.json` 描述。现在 `locale/zh.json` 显示「**长期记忆**」,`locale/en.json` 显示「Long-term Memory」,描述也压成一行。
|
|
328
|
+
- 图标从蓝色芯片换成**年轮**:深咖 `#3B2D20 → #120E0A` 圆角瓦片 + 香槟金 `#F8E2B4 → #BF8230` 螺旋(记忆是时间累积出来的年轮)。刻意避开插件列表里扎堆的蓝/白底,30px 行高下仍是一条完整的线。
|
|
329
|
+
- 构建与产物测试补了护栏:`locale` 两个文件 + `exports` 放行 + `icon.svg` 体积/格式,任何一项缺失都会构建失败(否则只会静默显示成包名)。
|
|
324
330
|
- **0.9.0** —— **规则变更会跟进旧会话**:
|
|
325
331
|
- 以前在别的会话里新加一条 `kind=rule`,旧会话继续聊时只有系统提示段的文本会刷新 —— 不产生对话消息,模型未必会重读;而且规则段有 300 token 预算,新规则可能被更重要的旧规则挤出常驻段。
|
|
326
332
|
- 现在每轮第一步比一次「该系统提示里的规则行 ∪ 历史里注入过的增量行」与当前规则,把新增/改过的补成一条 `source.kind='memory'` 消息(与召回/摘要同一条卡片来源),只提醒没出现过的;新会话第一步不补(系统提示本来就全有)。
|
package/icon.svg
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
<svg viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<!--
|
|
3
|
-
|
|
3
|
+
长期记忆图标:年轮。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
(宿主按 <img width=30|36> 渲染:插件管理器行 30、卡片 36)。
|
|
5
|
+
记忆是时间累积出来的东西 —— 一圈一圈长出来的年轮,比"内存条/芯片"更贴
|
|
6
|
+
"长期";金色年轮压在深咖底上,像一枚封蜡印章。配色刻意避开插件列表里大量
|
|
7
|
+
出现的蓝色 / 白底:深咖 #3B2D20 → #120E0A + 香槟金 #F8E2B4 → #BF8230。
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
沿用宿主插件美术的规范:36×36 画布、内缩 4 的 28×28 圆角瓦片(rx 8);
|
|
10
|
+
不写死 width/height,显示尺寸交给消费方(插件管理器行 30 / 卡片 36)。
|
|
11
|
+
记号是一条 2.55 描边的螺旋,用 7 段圆弧近似(而不是几百个点的折线):
|
|
12
|
+
30px 下就是一条完整的线,128px 下也不露折角。外圈再压一圈 0.9px 的
|
|
13
|
+
暖金内边,深色底不会整个糊成黑方块。
|
|
14
|
+
|
|
15
|
+
改名 / 换配色时的护栏:图标必须是包内文件、SVG/PNG/JPEG/WebP、≤256 KiB
|
|
16
|
+
(宿主 readPluginMeta 的读取条件),见 source/memory-plugin/test/packaged-artifact.test.ts。
|
|
15
17
|
-->
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<rect x="16.2" y="16.2" width="3.6" height="3.6" rx="1.2" fill="#0E1C58" />
|
|
20
|
-
</g>
|
|
18
|
+
<rect x="4" y="4" width="28" height="28" rx="8" fill="url(#memory_tile)" />
|
|
19
|
+
<rect x="4.45" y="4.45" width="27.1" height="27.1" rx="7.6" fill="none" stroke="rgba(240,200,140,0.20)" stroke-width="0.9" />
|
|
20
|
+
<path d="M18.99 16.75 A2.19 2.19 0 0 1 19.99 19.95 A3.38 3.38 0 0 1 14.94 20.53 A4.56 4.56 0 0 1 15.15 13.71 A5.74 5.74 0 0 1 23.61 15.07 A6.92 6.92 0 0 1 20.76 24.99 A8.11 8.11 0 0 1 9.62 20.33" stroke="url(#memory_ring)" stroke-width="2.55" stroke-linecap="round" stroke-linejoin="round" />
|
|
21
21
|
<defs>
|
|
22
22
|
<linearGradient id="memory_tile" x1="18" y1="4" x2="18" y2="32" gradientUnits="userSpaceOnUse">
|
|
23
|
-
<stop stop-color="#
|
|
24
|
-
<stop offset="1" stop-color="#
|
|
23
|
+
<stop stop-color="#3B2D20" />
|
|
24
|
+
<stop offset="1" stop-color="#120E0A" />
|
|
25
|
+
</linearGradient>
|
|
26
|
+
<linearGradient id="memory_ring" x1="18" y1="9" x2="18" y2="27" gradientUnits="userSpaceOnUse">
|
|
27
|
+
<stop stop-color="#F8E2B4" />
|
|
28
|
+
<stop offset="1" stop-color="#BF8230" />
|
|
25
29
|
</linearGradient>
|
|
26
30
|
</defs>
|
|
27
31
|
</svg>
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restregular/dsh-memory",
|
|
3
|
-
"version": "0.9.
|
|
4
|
-
"description": "DeepSeek Harness 本地长期记忆(单包单入口):JSONL 存储 + 本地向量检索(BGE-M3)+
|
|
3
|
+
"version": "0.9.1",
|
|
4
|
+
"description": "DeepSeek Harness 本地长期记忆(单包单入口):JSONL 存储 + 本地向量检索(BGE-M3)+ 五个模型工具 + 自动召回注入 + 管理面板。",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./lib/index.js",
|
|
9
9
|
"./client": "./lib/client.js",
|
|
10
|
+
"./locale/en.json": "./locale/en.json",
|
|
11
|
+
"./locale/zh.json": "./locale/zh.json",
|
|
10
12
|
"./package.json": "./package.json"
|
|
11
13
|
},
|
|
12
14
|
"files": [
|
|
13
15
|
"lib/",
|
|
16
|
+
"locale/",
|
|
14
17
|
"cordis.patch.yml",
|
|
15
18
|
"icon.svg",
|
|
16
19
|
"README.md",
|