@kenz1117/dsh-engram 0.9.7 → 0.9.9
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 +252 -0
- package/README.en.md +77 -3
- package/README.md +78 -3
- package/lib/client.js +1 -1
- package/lib/client.js.map +1 -1
- package/lib/index.js +1 -1
- package/package.json +17 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
本项目遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/) 与 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
|
+
|
|
5
|
+
- npm 包:`@kenz1117/dsh-engram`
|
|
6
|
+
- 安装:`dsh plugin --profile web add @kenz1117/dsh-engram`
|
|
7
|
+
- 仓库:<https://github.com/kenz1117/dsh-engram>
|
|
8
|
+
|
|
9
|
+
> **v0.x 阶段的版本约定**:`0.MINOR.PATCH` 里的 `MINOR` 是**功能批次**而不是稳定性刻度——0.7.x 整批是「记忆宫殿信息架构」,0.8.x 整批是「面板重构」,0.9.x 整批是「稳定性与可审计」。同一批次内的 `PATCH` 位通常是修复与加固。
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
_暂无。_
|
|
14
|
+
|
|
15
|
+
## [0.9.9] - 2026-10-23
|
|
16
|
+
|
|
17
|
+
### 文档与市场曝光
|
|
18
|
+
|
|
19
|
+
- README 首屏重写(中英双语同步):新增一句话英文定位句「Local-first long-term memory for your coding agent.」、可折叠目录、「为什么是它」三条主流路线对照表、记忆流动 ASCII 流程图、**给 agent 自己装的安装 prompt**;新增 CI 徽章。
|
|
20
|
+
- 新增 `docs/store/icon-180.png`(商店卡片位图图标,含可复现的 `icon-180.html` 源)与 `docs/store/social-preview.png`(GitHub 社交预览图,含 `social-preview.html` 源)。
|
|
21
|
+
- 新增本 CHANGELOG。
|
|
22
|
+
- 修正文档中的工具数量:实际注册 **22** 个 `engram_*` 工具(原文档写作 21,英文版另一处写作 20)。
|
|
23
|
+
- `package.json` 补 `homepage` / `bugs` / 更全的 `keywords`。
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### 商店与社区
|
|
27
|
+
|
|
28
|
+
- 商店条目描述更新到 v0.9.8 现状并补 `icon` 字段(category 保持 `agi` 不变)。
|
|
29
|
+
- 仓库描述、主页与 topics 补齐;启用 GitHub Pages 落地页 `https://kenz1117.github.io/dsh-engram/`。
|
|
30
|
+
|
|
31
|
+
## [0.9.8] - 2026-10-22
|
|
32
|
+
|
|
33
|
+
- `pnpm backfill` 新增 `--force`(重建全部向量)与 `--model`(指定模型),扫描 `<dbDir>` 下全部分库(`user.db` / `shared.db` / `project-<hash>.db`);维度与库中已有向量不符时在写入前报错退出,绝不写出混合维度的库。
|
|
34
|
+
- 嵌入器远程端点的离线测试补齐;维度不匹配降级为显式报错而非静默失败。
|
|
35
|
+
- 补上 `vite`(vitest 5 把 vite 降成了 peer 依赖)。
|
|
36
|
+
|
|
37
|
+
## [0.9.7] - 2026-10-22
|
|
38
|
+
|
|
39
|
+
- 路由层错误分类收敛:超限 413、坏 JSON 400、不是对象 400,三类失败各说各的话;删除重复的 review-answer 处理器。
|
|
40
|
+
- i18n:导入失败的措辞去掉「校验失败」叠词;大 body 的报错不再套「文件校验失败」。
|
|
41
|
+
|
|
42
|
+
## [0.9.6] - 2026-10-21
|
|
43
|
+
|
|
44
|
+
- 路由级断言补齐三类失败场景;修正「内存封顶」的措辞;修正 `net.connect` 重载(补 `host` 参数)。
|
|
45
|
+
|
|
46
|
+
## [0.9.5] - 2026-10-21
|
|
47
|
+
|
|
48
|
+
- **导入不再被 64 KiB body 上限静默丢弃**(#34):导入接口单独放开到 16 MiB;上限改按**字节**计(原按字符数算,中文一字 3 字节,等于把字节防线悄悄放宽了三倍);请求体改整块 UTF-8 解码(原逐块解码,多字节字符跨块边界会被切成乱码);三类失败各给各的提示(413 / 400 非法 JSON / 400 不是对象);面板加前置体量检查。
|
|
49
|
+
- 补「请求中途断掉的导入不会带崩服务」等 10 个回归用例。
|
|
50
|
+
|
|
51
|
+
## [0.9.4] - 2026-10-21
|
|
52
|
+
|
|
53
|
+
- **嵌入向量维度成为硬约束**:库中向量与当前模型维度不一致时,写入与相似度比较都直接拒绝并报 `EMBEDDER_DIMENSION_MISMATCH`(说清两边各是多少维),而不是逐维截断后给出一个像样的相似度。
|
|
54
|
+
- 嵌入器可配置:本地模型与池化可选,支持 OpenAI 兼容远程端点(`apiKeyEnv` 从环境变量读,插件不落密钥)。
|
|
55
|
+
- Jev 裁决改为**运行时解析**:provider 与模型取自 DSH,插件不保存密钥与地址;旧格式字段一次性告警。
|
|
56
|
+
|
|
57
|
+
## [0.9.3] - 2026-10-20
|
|
58
|
+
|
|
59
|
+
- **新增 `engram_import` 记忆导入**(#33):JSON 回路 + 预览勾选 + 内容去重 + 就地补嵌入;导入独立成前置图标按钮,格式支持 JSON 与导出的 Markdown。
|
|
60
|
+
- 面板导出菜单项补 button 样式重置(此前镜像目录与导入菜单项渲染成大盒子)。
|
|
61
|
+
|
|
62
|
+
## [0.9.2] - 2026-10-19
|
|
63
|
+
|
|
64
|
+
- 镜像导出改 fetch + toast,修复点击崩溃;导入改同款下拉(显式 JSON / Markdown 两项)。
|
|
65
|
+
- 会话压缩后重新注入常驻画像(#32)。
|
|
66
|
+
- hero 图引用指向 `hero.jpg`(此前引用了已删除的 png);移除被替换的 `hero.png`,仓库瘦身 2.1 MB。
|
|
67
|
+
|
|
68
|
+
## [0.9.1] - 2026-10-18
|
|
69
|
+
|
|
70
|
+
- 翻新清单满宽铺开 + 弹窗不透明兜底(#19 问题一/二)。
|
|
71
|
+
- `stats` 分部补上 `shared`。
|
|
72
|
+
|
|
73
|
+
## [0.9.0] - 2026-10-18
|
|
74
|
+
|
|
75
|
+
**稳定性与可审计批次(据 [审计报告](../docs/audit-2026-10-18.md))**
|
|
76
|
+
|
|
77
|
+
- 视图级 ErrorBoundary(按视图降级 + 重试按钮)——把整类白屏从「不可见事故」变成「可见警告」。
|
|
78
|
+
- 失败不再伪装成空态;修搜索框 trim 过早。
|
|
79
|
+
- 版本握手 + `VERSION` 单一来源化;客户端与服务端版本偏斜时顶部出现重启提醒横幅。
|
|
80
|
+
- 摄取重放循环逐键隔离 + 陈旧放弃 + 已付费的 LLM 产物不静默丢弃。
|
|
81
|
+
- 数据安全三连:restore 后关闭并失效分库缓存、SQLite 开 WAL / busy_timeout、迁移前自动快照。
|
|
82
|
+
- i18n:翻新理由跟随面板语言、降级墓志铭走词典、俄语复数。
|
|
83
|
+
|
|
84
|
+
## [0.8.16] - 2026-10-18
|
|
85
|
+
|
|
86
|
+
- dependabot 接入(npm 每周 / actions 每月)+ `packageManager` 钉 `pnpm@10.15.0`;新增 CONTRIBUTING 与 SECURITY。
|
|
87
|
+
|
|
88
|
+
## [0.8.15] - 2026-10-18
|
|
89
|
+
|
|
90
|
+
- #19 修复:翻新清单卡片内联原文与合并候选;侧栏图标回归宿主单色。
|
|
91
|
+
- 打包修复:host peers 全部 optional,tarball 能装进干净 profile(0.8.0–0.8.14 十五个版本带病发布的事故收口)。
|
|
92
|
+
- CI 门禁:在托管 runner 上真实执行两道不依赖 harness 树的自检。
|
|
93
|
+
|
|
94
|
+
## [0.8.14] - 2026-10-17
|
|
95
|
+
|
|
96
|
+
## [0.8.13] - 2026-10-17
|
|
97
|
+
|
|
98
|
+
- 吸顶 Header/Tab 栏;修复 tab 栏 1px 滚动条;调整 scope 顺序。
|
|
99
|
+
|
|
100
|
+
## [0.8.12] - 2026-10-15
|
|
101
|
+
|
|
102
|
+
- 历史回填「卡住」修复:逐轮进度 + 轮询失败显形 + 重启哨兵。
|
|
103
|
+
|
|
104
|
+
## [0.8.0] - 2026-10-13
|
|
105
|
+
|
|
106
|
+
- **面板入口升级为顶层侧栏**(`sidebar.panellist` + `main` 双槽位),主列满宽渲染,不再受设置弹窗宽度限制。
|
|
107
|
+
- 新增第九视图「信念」与 UI 布局重构。
|
|
108
|
+
- 关系图模式补完;侧栏图标改品牌渐变 tile;活动热力日历;走廊真·建筑平面图。
|
|
109
|
+
|
|
110
|
+
## [0.7.16] - 2026-10-13
|
|
111
|
+
|
|
112
|
+
## [0.7.15] - 2026-10-03
|
|
113
|
+
|
|
114
|
+
- 面板第九视图「信念」落地;UI 砍 Header 品牌区、加暖色渐变水印与线性图标。
|
|
115
|
+
|
|
116
|
+
## [0.7.14] - 2026-10-03
|
|
117
|
+
|
|
118
|
+
- **自动信念巩固**(`reflect: suggest|auto` + observations 表,schema v12):把「尚未成为任何信念证据」的原始记忆交给辅助 LLM 巩固为带证据数的一句话信念;同主题经向量近邻自动归并并持续细化;新证据与既有信念近邻时信念先转 `stale`,下次巩固四选一(form / refine / still / refute)。原始记忆全部保留,信念是叠加的抽象层。
|
|
119
|
+
|
|
120
|
+
## [0.7.13] - 2026-09-25
|
|
121
|
+
|
|
122
|
+
- 采用 v4 producer-owned plugin message sources。
|
|
123
|
+
|
|
124
|
+
## [0.7.12] - 2026-09-22
|
|
125
|
+
|
|
126
|
+
- **Jev 系统一裁决**:DEFER 模糊带的三路判定(并入 / 放行 / 搁置)与矛盾边确认可交外部 Jev 模型判决;Jev 不可用时静默回落纯规则四态,不阻断写入。每次裁决旁路留观测(判定结果、是否参与、耗时、回落原因),面板「裁决」视图可排查。
|
|
127
|
+
|
|
128
|
+
## [0.7.11] - 2026-09-21
|
|
129
|
+
|
|
130
|
+
- **实体词典与时序事实链**(阶段三):事实级三元组携带 `valid_at` / `invalid_at` 时间窗,冲突事实软失效不删除;`engram_facts` 读写事实链;`engram_search` 加 `asOf` 时点回看;面板实体页事实链详情。
|
|
131
|
+
|
|
132
|
+
## [0.7.10] - 2026-09-21
|
|
133
|
+
|
|
134
|
+
- 实体词典:摄取与保存的辅助 LLM 输出同时抽取实体提及(人物 / 项目 / 工具 / 概念,可带别名),按归一化名与既有实体精确匹配消解;记忆与实体多对多关联。
|
|
135
|
+
|
|
136
|
+
## [0.7.9] - 2026-09-21
|
|
137
|
+
|
|
138
|
+
- **阶段二记忆分层首批**:画像可编辑(`engram_profile_edit`,版本链回滚 + 面板 diff 审计)、episode 情景记忆独立时间线(`engram_episode_timeline`,按会话分组、时间邻近扩展)、回填与实时会话摘要组头。
|
|
139
|
+
|
|
140
|
+
## [0.7.8] - 2026-09-21
|
|
141
|
+
|
|
142
|
+
- **阶段一飞轮闭环补强四项全部落地**:写入四态回报(ACCEPT / MERGE / DROP / DEFER)、分级递减注入预算、PII 脱敏扩充(中文密码 / 身份证 / 手机号)、证据门收尾提醒。
|
|
143
|
+
|
|
144
|
+
## [0.7.7] - 2026-09-21
|
|
145
|
+
|
|
146
|
+
- 今日待回忆降级为速览计数;陈展加「今日到期」筛选。
|
|
147
|
+
- 遗留库迁移治理:写入 JSON 墓碑 sidecar 记录归属,`legacyMigration` 支持 `eager` / `conservative` 两种策略。
|
|
148
|
+
|
|
149
|
+
## [0.7.6] - 2026-09-17
|
|
150
|
+
|
|
151
|
+
- 摄取逐条判宫殿(跨项目通用的进私人库,只跟当前项目有关的进项目库);项目宫殿随 GUI 工作区切换。
|
|
152
|
+
- 适配新版 dsh 的 `sessionPersistence` 只读句柄。
|
|
153
|
+
- 无 git 时的分库命名从「cwd 前 12 字符」改为 cwd 全量 sha256(修掉同前缀目录撞库)。
|
|
154
|
+
|
|
155
|
+
## [0.7.5] - 2026-09-12
|
|
156
|
+
|
|
157
|
+
- CJK token 估算;**证据门 `engram_assess`**(命中 ≠ 足以回答,代码强制三条件齐备);管家日志补词典。
|
|
158
|
+
|
|
159
|
+
## [0.7.4] - 2026-09-11
|
|
160
|
+
|
|
161
|
+
- 面板细节打磨:今日视图重排、工具栏 chips、日志工具条与类别色点、回填分段线。
|
|
162
|
+
|
|
163
|
+
## [0.7.3] - 2026-09-11
|
|
164
|
+
|
|
165
|
+
- **历史会话回填**:把 dsh 已持久化的历史会话逐轮提炼进宫殿(默认按每个会话自己的 cwd 分库),幂等键支持中断续跑;导入规则可配(时间窗 / 轮数上限 / 辅助模型 / 是否含子代理)。面板五视图重构。
|
|
166
|
+
|
|
167
|
+
## [0.7.2] - 2026-09-11
|
|
168
|
+
|
|
169
|
+
- **记忆宫殿信息架构落地**:位置当索引(写入按 kind 分房并钉「房间#桩位」坐标,房间容量 9,满员开新房)、固定路线定顺序(`tour_routes` append-only)、骨架长期复用、标记独一无二(门牌 0-1 评分);修复迁移与 dispose 崩溃。
|
|
170
|
+
|
|
171
|
+
## [0.7.1] - 2026-09-11
|
|
172
|
+
|
|
173
|
+
- UI 打磨与修复;上架 dsh-market「AGI 架构探索」类目。
|
|
174
|
+
|
|
175
|
+
## [0.6.1] - 2026-09-01
|
|
176
|
+
|
|
177
|
+
- 统计卡片补脱敏指标;`engram_export` 脱敏视图。
|
|
178
|
+
|
|
179
|
+
## [0.6.0] - 2026-09-01
|
|
180
|
+
|
|
181
|
+
- **注入防护三件套**(协议标签 + 入库脱敏 + 召回占位防回声室);多查询 RRF 融合;批量保存;脱敏筛选视图。
|
|
182
|
+
|
|
183
|
+
## [0.5.0] - 2026-09-04
|
|
184
|
+
|
|
185
|
+
- 竞品对标四项;管理 UI 全面翻新。
|
|
186
|
+
|
|
187
|
+
## [0.4.7] - 2026-09-02
|
|
188
|
+
|
|
189
|
+
- 发布时通过 `prepare` 链接 peer 包。
|
|
190
|
+
|
|
191
|
+
## [0.4.4] - 2026-09-01
|
|
192
|
+
|
|
193
|
+
- zh/en i18n 走宿主 locale 服务,面板文案全部本地化。
|
|
194
|
+
|
|
195
|
+
## [0.4.0] - 2026-09-01
|
|
196
|
+
|
|
197
|
+
- 设置页「记忆库」tab 取代独立页面。
|
|
198
|
+
|
|
199
|
+
## [0.3.0] - 2026-09-01
|
|
200
|
+
|
|
201
|
+
- Web 管理面板(`/engram`)+ `/api/engram/*` 回环 API;嵌入回填脚本(为降级期写入的记忆补算向量)。
|
|
202
|
+
|
|
203
|
+
## [0.2.0] - 2026-09-01
|
|
204
|
+
|
|
205
|
+
- 自动摄取、矛盾候选、蒸馏飞轮、审计工具;schema v2 记来源会话/轮次/seq、review/stats/export/decay。
|
|
206
|
+
|
|
207
|
+
## [0.0.1] - 2026-09-01
|
|
208
|
+
|
|
209
|
+
- 首个可用版本:`engram_*` 工具集、插件入口、画像注入、SQLite + FTS5 + 关系边 + op log 的本地存储。
|
|
210
|
+
|
|
211
|
+
[Unreleased]: https://github.com/kenz1117/dsh-engram/compare/v0.9.9...HEAD
|
|
212
|
+
[0.9.9]: https://github.com/kenz1117/dsh-engram/compare/v0.9.8...v0.9.9
|
|
213
|
+
[0.9.8]: https://github.com/kenz1117/dsh-engram/compare/v0.9.7...v0.9.8
|
|
214
|
+
[0.9.7]: https://github.com/kenz1117/dsh-engram/compare/v0.9.6...v0.9.7
|
|
215
|
+
[0.9.6]: https://github.com/kenz1117/dsh-engram/compare/v0.9.5...v0.9.6
|
|
216
|
+
[0.9.5]: https://github.com/kenz1117/dsh-engram/compare/v0.9.4...v0.9.5
|
|
217
|
+
[0.9.4]: https://github.com/kenz1117/dsh-engram/compare/v0.9.3...v0.9.4
|
|
218
|
+
[0.9.3]: https://github.com/kenz1117/dsh-engram/compare/v0.9.2...v0.9.3
|
|
219
|
+
[0.9.2]: https://github.com/kenz1117/dsh-engram/compare/v0.9.1...v0.9.2
|
|
220
|
+
[0.9.1]: https://github.com/kenz1117/dsh-engram/compare/v0.9.0...v0.9.1
|
|
221
|
+
[0.9.0]: https://github.com/kenz1117/dsh-engram/compare/v0.8.16...v0.9.0
|
|
222
|
+
[0.8.16]: https://github.com/kenz1117/dsh-engram/compare/v0.8.15...v0.8.16
|
|
223
|
+
[0.8.15]: https://github.com/kenz1117/dsh-engram/compare/v0.8.14...v0.8.15
|
|
224
|
+
[0.8.14]: https://github.com/kenz1117/dsh-engram/compare/v0.8.13...v0.8.14
|
|
225
|
+
[0.8.13]: https://github.com/kenz1117/dsh-engram/compare/v0.8.12...v0.8.13
|
|
226
|
+
[0.8.12]: https://github.com/kenz1117/dsh-engram/compare/v0.7.16...v0.8.12
|
|
227
|
+
[0.8.0]: https://github.com/kenz1117/dsh-engram/compare/v0.7.16...v0.8.0
|
|
228
|
+
[0.7.16]: https://github.com/kenz1117/dsh-engram/compare/v0.7.15...v0.7.16
|
|
229
|
+
[0.7.15]: https://github.com/kenz1117/dsh-engram/compare/v0.7.14...v0.7.15
|
|
230
|
+
[0.7.14]: https://github.com/kenz1117/dsh-engram/compare/v0.7.13...v0.7.14
|
|
231
|
+
[0.7.13]: https://github.com/kenz1117/dsh-engram/compare/v0.7.12...v0.7.13
|
|
232
|
+
[0.7.12]: https://github.com/kenz1117/dsh-engram/compare/v0.7.11...v0.7.12
|
|
233
|
+
[0.7.11]: https://github.com/kenz1117/dsh-engram/compare/v0.7.10...v0.7.11
|
|
234
|
+
[0.7.10]: https://github.com/kenz1117/dsh-engram/compare/v0.7.9...v0.7.10
|
|
235
|
+
[0.7.9]: https://github.com/kenz1117/dsh-engram/compare/v0.7.8...v0.7.9
|
|
236
|
+
[0.7.8]: https://github.com/kenz1117/dsh-engram/compare/v0.7.7...v0.7.8
|
|
237
|
+
[0.7.7]: https://github.com/kenz1117/dsh-engram/compare/v0.7.6...v0.7.7
|
|
238
|
+
[0.7.6]: https://github.com/kenz1117/dsh-engram/compare/v0.7.5...v0.7.6
|
|
239
|
+
[0.7.5]: https://github.com/kenz1117/dsh-engram/compare/v0.7.4...v0.7.5
|
|
240
|
+
[0.7.4]: https://github.com/kenz1117/dsh-engram/compare/v0.7.3...v0.7.4
|
|
241
|
+
[0.7.3]: https://github.com/kenz1117/dsh-engram/compare/v0.7.2...v0.7.3
|
|
242
|
+
[0.7.2]: https://github.com/kenz1117/dsh-engram/compare/v0.7.1...v0.7.2
|
|
243
|
+
[0.7.1]: https://github.com/kenz1117/dsh-engram/compare/v0.6.1...v0.7.1
|
|
244
|
+
[0.6.1]: https://github.com/kenz1117/dsh-engram/compare/v0.6.0...v0.6.1
|
|
245
|
+
[0.6.0]: https://github.com/kenz1117/dsh-engram/compare/v0.5.0...v0.6.0
|
|
246
|
+
[0.5.0]: https://github.com/kenz1117/dsh-engram/compare/v0.4.7...v0.5.0
|
|
247
|
+
[0.4.7]: https://github.com/kenz1117/dsh-engram/compare/v0.4.6...v0.4.7
|
|
248
|
+
[0.4.4]: https://github.com/kenz1117/dsh-engram/compare/v0.4.3...v0.4.4
|
|
249
|
+
[0.4.0]: https://github.com/kenz1117/dsh-engram/compare/v0.3.0...v0.4.0
|
|
250
|
+
[0.3.0]: https://github.com/kenz1117/dsh-engram/compare/v0.2.0...v0.3.0
|
|
251
|
+
[0.2.0]: https://github.com/kenz1117/dsh-engram/compare/v0.0.1...v0.2.0
|
|
252
|
+
[0.0.1]: https://github.com/kenz1117/dsh-engram/releases/tag/v0.0.1
|
package/README.en.md
CHANGED
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
# dsh-engram · Memory Palace
|
|
6
6
|
|
|
7
|
-
<p align="center">
|
|
7
|
+
<p align="center"><b>Local-first long-term memory for your coding agent.</b><br>
|
|
8
|
+
Cross-session long-term memory on plain local SQLite: <b>no external service, no API key, no Docker</b> — one command and it works.<br>
|
|
9
|
+
22 narrow-parameter tools · hybrid retrieval (FTS5 + local vectors, RRF) · an evidence gate · full provenance audit · SM-2 spaced-repetition review · a zh / en / ru panel.</p>
|
|
8
10
|
|
|
9
11
|
<p align="center">
|
|
10
12
|
<a href="https://github.com/kenz1117/dsh-engram/blob/main/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/kenz1117/dsh-engram"></a>
|
|
11
13
|
<a href="https://github.com/kenz1117/dsh-engram"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/kenz1117/dsh-engram"></a>
|
|
14
|
+
<a href="https://github.com/kenz1117/dsh-engram/actions/workflows/checks.yml"><img alt="CI" src="https://github.com/kenz1117/dsh-engram/actions/workflows/checks.yml/badge.svg"></a>
|
|
12
15
|
<a href="https://www.npmjs.com/package/@kenz1117/dsh-engram"><img alt="npm version" src="https://img.shields.io/npm/v/@kenz1117/dsh-engram"></a>
|
|
13
16
|
<a href="https://www.npmjs.com/package/@kenz1117/dsh-engram"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@kenz1117/dsh-engram"></a>
|
|
14
17
|
<a href="https://github.com/kenz1117/dsh-engram/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/kenz1117/dsh-engram"></a>
|
|
@@ -20,6 +23,28 @@
|
|
|
20
23
|
|
|
21
24
|
</div>
|
|
22
25
|
|
|
26
|
+
<details>
|
|
27
|
+
<summary><b>Contents</b></summary>
|
|
28
|
+
|
|
29
|
+
- [Quick Start](#quick-start)
|
|
30
|
+
- [Why this one](#why-this-one)
|
|
31
|
+
- [How a memory flows](#how-a-memory-flows)
|
|
32
|
+
- [Screenshots](#screenshots)
|
|
33
|
+
- [Palace Structure: the Directory Is the Room, the Path Is the Route](#palace-structure-the-directory-is-the-room-the-path-is-the-route)
|
|
34
|
+
- [Features](#features)
|
|
35
|
+
- [Tools (22, narrow parameters)](#tools-22-narrow-parameters)
|
|
36
|
+
- [Configuration](#configuration)
|
|
37
|
+
- [How It Works](#how-it-works)
|
|
38
|
+
- [Web Management Panel](#web-management-panel)
|
|
39
|
+
- [Development](#development)
|
|
40
|
+
- [Model Experience](#model-experience)
|
|
41
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
42
|
+
- [Roadmap](#roadmap)
|
|
43
|
+
- [Acknowledgements](#acknowledgements)
|
|
44
|
+
- [License](#license)
|
|
45
|
+
|
|
46
|
+
</details>
|
|
47
|
+
|
|
23
48
|
---
|
|
24
49
|
|
|
25
50
|
## Quick Start
|
|
@@ -30,6 +55,53 @@ dsh plugin --profile web add @kenz1117/dsh-engram
|
|
|
30
55
|
|
|
31
56
|
Zero configuration after install (stores and model cache default to `~/.dsh/engram`; profile injection on, automatic capture off).
|
|
32
57
|
|
|
58
|
+
**Let your agent install it** — paste this into any agent:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
Run this command to install dsh-engram, a cross-session long-term memory plugin for DeepSeek Harness:
|
|
62
|
+
dsh plugin --profile web add @kenz1117/dsh-engram
|
|
63
|
+
Then confirm the "Memory Palace" entry appears in the plugin center sidebar, and open a new session to
|
|
64
|
+
run engram_stats and confirm 22 engram_* tools are registered.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Why this one
|
|
68
|
+
|
|
69
|
+
Plenty of memory plugins exist, but most want you to stand up infrastructure first. Three mainstream shapes, side by side (compared against each project's public README and npm dependency declarations):
|
|
70
|
+
|
|
71
|
+
| | **dsh-engram** | Server-based (Postgres/pgvector/Milvus/Python service) | File-based (plain Markdown memory) |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| Setup cost | One npm command, **works immediately** | Docker + database + vector store + migrations | One npm command |
|
|
74
|
+
| External dependencies | **None**: embeddings run offline and degrade to keyword-only with an explicit marker | Required, usually plus an LLM API key | None |
|
|
75
|
+
| Agent-facing tools | **22 narrow-parameter tools** across the whole lifecycle — save, search, fact chains, timelines, audit, export, distill, beliefs, review | Usually 1–3 (search only) | Usually 0–1 |
|
|
76
|
+
| Evidence gate | **Yes**: `engram_assess` is enforced in code — "claims sufficient" + at least one valid ref from this batch + `nextStrategy=answer` | Generally none | Generally none |
|
|
77
|
+
| Audit | Session/turn/seq provenance, supersede chains, contradiction edges, full `op_log` | Usually logs only | None |
|
|
78
|
+
| Review | **SM-2 spaced repetition**: coordinates and placard cues only, never the body — recall first, reveal later | None | None |
|
|
79
|
+
| Injection safety | Protocol tags block prompt injection, redaction on write, capture placeholders break self-reinforcement loops | None | None |
|
|
80
|
+
| Portability | Markdown / JSON export + Obsidian/Logseq-friendly mirror | Varies | It is already files |
|
|
81
|
+
| UI languages | zh / en / ru | Varies | Usually one |
|
|
82
|
+
|
|
83
|
+
In one line: **we make memory a local library you install once, not a service you operate.**
|
|
84
|
+
|
|
85
|
+
## How a memory flows
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
session log --+
|
|
89
|
+
+--> capture / save --> four dispositions: accept · merge · defer · drop
|
|
90
|
+
agent call+
|
|
91
|
+
|
|
|
92
|
+
SQLite dual store: user.db (follows you) + project-<hash>.db (follows the repo)
|
|
93
|
+
|
|
|
94
|
+
+----------------------+----------------------+----------------------+
|
|
95
|
+
v v v
|
|
96
|
+
FTS5 keyword lane local vector lane (RRF) one-hop relation edges
|
|
97
|
+
+----------------------+----------------------+----------------------+
|
|
98
|
+
v
|
|
99
|
+
engram_search --> hits carry id= / ref= and a batch id
|
|
100
|
+
v
|
|
101
|
+
engram_assess (evidence gate): not enough -> keep searching
|
|
102
|
+
v
|
|
103
|
+
profile injection <-- beliefs · facts · entities <-- distill · decay · SM-2
|
|
104
|
+
```
|
|
33
105
|
|
|
34
106
|
## Screenshots
|
|
35
107
|
|
|
@@ -47,6 +119,8 @@ Zero configuration after install (stores and model cache default to `~/.dsh/engr
|
|
|
47
119
|
|
|
48
120
|
## Palace Structure: the Directory Is the Room, the Path Is the Route
|
|
49
121
|
|
|
122
|
+
A cross-session long-term memory plugin for DeepSeek Harness — it puts the memory palace's <b>information architecture</b> (not its neuroscience metaphor) into the agent: <b>location as index</b> (every memory pinned to a <code>room#slot</code> coordinate), <b>fixed route as order</b> (the tour route is append-only), <b>skeleton reused long-term</b> (a topic always lands in the same room and index), and <b>every marker unique</b> (placard rule: unique · distinctive · dated). Paired with spaced-repetition retrieval practice (cues only, never the body) and a knowledge flywheel (capture → reinforce → distill → decay).
|
|
123
|
+
|
|
50
124
|
What actually works in a memory palace is its **information architecture**, not the biology — machines can use the former, while an AI has neither the latter nor any need for it. Stripped down, there are only four things:
|
|
51
125
|
|
|
52
126
|
```
|
|
@@ -97,7 +171,7 @@ Sensory and emotional dimensions (smell, temperature, emotional weight) are deli
|
|
|
97
171
|
- **Portable data**: `engram_export` exports Markdown / JSON files in one step, with a redacted-view variant (secondary scrubbing + 40-char preview truncation, share-safe). `engram_mirror` writes an Obsidian / Logseq-friendly mirror directory (one Markdown per memory with YAML frontmatter + `[[id]]` backlinks), turning the palace into a human-readable private knowledge base.
|
|
98
172
|
- **AGI Architecture Exploration (dsh-market · AGI Architecture)**: listed in dsh-market's "AGI Architecture Exploration" category as a cognitive-science reframe of agent long-term memory — memory palace (imagery labels + room placards), corridor topology (force-directed graph), closure questions (the ingest prompt nudges the model to ask clarifying questions), consolidation merging (heuristic dedup + cosine similarity) — sitting alongside MemGPT / Letta in the "agent memory architecture" conversation.
|
|
99
173
|
|
|
100
|
-
## Tools (
|
|
174
|
+
## Tools (22, narrow parameters)
|
|
101
175
|
|
|
102
176
|
| Tool | Purpose |
|
|
103
177
|
|---|---|
|
|
@@ -263,7 +337,7 @@ Each turn's first step appends a plugin-source user snapshot: `User memory profi
|
|
|
263
337
|
|
|
264
338
|
#### Token effect
|
|
265
339
|
|
|
266
|
-
Profile injection is a conditional fixed cost (bounded by both the entry cap and the token budget); the tool schemas are a standing cost (
|
|
340
|
+
Profile injection is a conditional fixed cost (bounded by both the entry cap and the token budget); the tool schemas are a standing cost (22 narrow-parameter tools).
|
|
267
341
|
|
|
268
342
|
#### KV Cache effect
|
|
269
343
|
|
package/README.md
CHANGED
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
# dsh-engram · 记忆宫殿
|
|
6
6
|
|
|
7
|
-
<p align="center">
|
|
7
|
+
<p align="center"><b>Local-first long-term memory for your coding agent.</b><br>
|
|
8
|
+
纯本地 SQLite 的跨会话长期记忆:<b>零外部服务 · 零 API Key · 零 Docker</b>,一条命令装完即用。<br>
|
|
9
|
+
22 个窄参数工具 · 混合检索(FTS5 + 本地向量 RRF)· 证据门 · 全链路审计 · SM-2 间隔重复复习 · 面板中英俄文。</p>
|
|
8
10
|
|
|
9
11
|
<p align="center">
|
|
10
12
|
<a href="https://github.com/kenz1117/dsh-engram/blob/main/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/kenz1117/dsh-engram"></a>
|
|
11
13
|
<a href="https://github.com/kenz1117/dsh-engram"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/kenz1117/dsh-engram"></a>
|
|
14
|
+
<a href="https://github.com/kenz1117/dsh-engram/actions/workflows/checks.yml"><img alt="CI" src="https://github.com/kenz1117/dsh-engram/actions/workflows/checks.yml/badge.svg"></a>
|
|
12
15
|
<a href="https://www.npmjs.com/package/@kenz1117/dsh-engram"><img alt="npm version" src="https://img.shields.io/npm/v/@kenz1117/dsh-engram"></a>
|
|
13
16
|
<a href="https://www.npmjs.com/package/@kenz1117/dsh-engram"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@kenz1117/dsh-engram"></a>
|
|
14
17
|
<a href="https://github.com/kenz1117/dsh-engram/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/kenz1117/dsh-engram"></a>
|
|
@@ -20,6 +23,28 @@
|
|
|
20
23
|
|
|
21
24
|
</div>
|
|
22
25
|
|
|
26
|
+
<details>
|
|
27
|
+
<summary><b>目录</b></summary>
|
|
28
|
+
|
|
29
|
+
- [快速开始](#快速开始)
|
|
30
|
+
- [为什么是它](#为什么是它)
|
|
31
|
+
- [记忆怎么流动](#记忆怎么流动)
|
|
32
|
+
- [界面速览](#界面速览)
|
|
33
|
+
- [宫殿结构:目录即房间,路径即路线](#宫殿结构目录即房间路径即路线)
|
|
34
|
+
- [特性](#特性)
|
|
35
|
+
- [工具(22 个,窄参数)](#工具22-个窄参数)
|
|
36
|
+
- [配置](#配置)
|
|
37
|
+
- [工作原理](#工作原理)
|
|
38
|
+
- [Web 管理面板](#web-管理面板)
|
|
39
|
+
- [开发](#开发)
|
|
40
|
+
- [Model Experience](#model-experience)
|
|
41
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
42
|
+
- [路线图](#路线图)
|
|
43
|
+
- [致谢](#致谢)
|
|
44
|
+
- [许可证](#许可证)
|
|
45
|
+
|
|
46
|
+
</details>
|
|
47
|
+
|
|
23
48
|
---
|
|
24
49
|
|
|
25
50
|
## 快速开始
|
|
@@ -30,6 +55,54 @@ dsh plugin --profile web add @kenz1117/dsh-engram
|
|
|
30
55
|
|
|
31
56
|
安装后无需配置即可使用(默认分库与模型缓存在 `~/.dsh/engram`,画像注入开启,自动摄取关闭)。
|
|
32
57
|
|
|
58
|
+
**让 agent 自己装**——把下面这段话贴给任意 agent:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
请执行这条命令安装 dsh-engram(DeepSeek Harness 的跨会话长期记忆插件):
|
|
62
|
+
dsh plugin --profile web add @kenz1117/dsh-engram
|
|
63
|
+
装完后确认插件中心出现「记忆宫殿」侧栏入口,并在新会话里用 engram_stats
|
|
64
|
+
确认已注册 22 个 engram_* 工具。
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## 为什么是它
|
|
68
|
+
|
|
69
|
+
记忆插件不少,但多数要你先准备一整套基础设施。这里是三条主流路线与本插件的对照(对照对象为各项目公开 README 与 npm 依赖声明):
|
|
70
|
+
|
|
71
|
+
| | **dsh-engram** | 服务端型(Postgres/pgvector/Milvus/Python 服务) | 文件型(纯 Markdown 记忆) |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| 安装成本 | 一条 npm 命令,**装完即用** | Docker + 数据库 + 向量库 + 迁移 | 一条 npm 命令 |
|
|
74
|
+
| 外部依赖 | **无**:嵌入模型离线推理,失败自动降级纯关键词并显式标记 | 必装,通常还要 LLM API Key | 无 |
|
|
75
|
+
| agent 工具面 | **22 个窄参数工具**,覆盖保存/检索/事实链/时间线/审计/导出/蒸馏/信念/复习全生命周期 | 常见 1–3 个(只给检索) | 常见 0–1 个 |
|
|
76
|
+
| 证据门 | **有**:`engram_assess` 由代码强制「声称充足 + 本批次有效证据 + nextStrategy=answer」三者齐备才判充足 | 一般无 | 一般无 |
|
|
77
|
+
| 审计 | 来源会话/轮次/seq 三级溯源 + 取代链 + 矛盾边 + op_log 全量流水 | 通常只有日志 | 无 |
|
|
78
|
+
| 复习 | **SM-2 间隔重复**:只给坐标与门牌线索,不给正文,先回忆后揭示 | 无 | 无 |
|
|
79
|
+
| 注入防护 | 协议标签防提示注入 + 入库脱敏 + 召回占位防自强化回声 | 无 | 无 |
|
|
80
|
+
| 可携带 | Markdown / JSON 导出 + Obsidian/Logseq 友好镜像 | 看实现 | 本来就是文件 |
|
|
81
|
+
| 界面语言 | zh / en / ru | 看实现 | 一般单语 |
|
|
82
|
+
|
|
83
|
+
一句话:**我们把「记忆」做成一个装完就能用的本地库,而不是一个需要你运维的服务。**
|
|
84
|
+
|
|
85
|
+
## 记忆怎么流动
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
会话日志 --+
|
|
89
|
+
+--> 摄取 / 保存 --> 写入四态: accept · merge · defer · drop
|
|
90
|
+
agent 调用+
|
|
91
|
+
|
|
|
92
|
+
SQLite 双库: user.db(跟人走)+ project-<hash>.db(跟仓库走)
|
|
93
|
+
|
|
|
94
|
+
+----------------------+----------------------+----------------------+
|
|
95
|
+
v v v
|
|
96
|
+
FTS5 关键词道 本地向量道 (RRF) 关系边一跳扩展
|
|
97
|
+
+----------------------+----------------------+----------------------+
|
|
98
|
+
v
|
|
99
|
+
engram_search --> 命中行带 id= / ref= 与批次 id
|
|
100
|
+
v
|
|
101
|
+
engram_assess(证据门): 不足以回答就继续检索
|
|
102
|
+
v
|
|
103
|
+
每轮注入画像 <-- 信念 · 事实链 · 实体 <-- 蒸馏 · 巩固 · 衰减 · SM-2
|
|
104
|
+
```
|
|
105
|
+
|
|
33
106
|
## 界面速览
|
|
34
107
|
|
|
35
108
|
**今日**——记忆宫殿的仪表盘:速览 KPI、半年活动热力、入殿导航、房间目录。
|
|
@@ -47,6 +120,8 @@ dsh plugin --profile web add @kenz1117/dsh-engram
|
|
|
47
120
|
|
|
48
121
|
## 宫殿结构:目录即房间,路径即路线
|
|
49
122
|
|
|
123
|
+
DeepSeek Harness 跨会话长期记忆插件 —— 把记忆宫殿的**信息架构**(而不是它的神经科学隐喻)真正落进 agent:**位置当索引**(每条记忆钉在「房间#桩位」坐标上)、**固定路线定顺序**(巡游路线只增不改)、**骨架长期复用**(同主题永远同房同序)、**标记独一无二**(门牌纪律:唯一 · 差异化 · 带日期)。配套间隔重复的检索练习(只给线索、不给正文)与知识飞轮(摄取 → 强化 → 蒸馏 → 衰减)。
|
|
124
|
+
|
|
50
125
|
记忆宫殿真正管用的是它的**信息架构**,不是那套生物学机制——前者机器完全能用,后者 AI 既没有也不需要。拆开看只有四件事:
|
|
51
126
|
|
|
52
127
|
```
|
|
@@ -97,7 +172,7 @@ dsh plugin --profile web add @kenz1117/dsh-engram
|
|
|
97
172
|
- **数据可携带**:`engram_export` 一键导出 Markdown / JSON 文件,支持脱敏视图(内容二次清洗 + 预览截断,分享安全)。`engram_mirror` 导出可漫游的镜像目录(Obsidian / Logseq 友好:每条记忆一个 Markdown,正文 + YAML frontmatter + 双向链接 `[[id]]`),让「宫殿」也成为可人读的私人知识库。
|
|
98
173
|
- **认知架构探索(dsh-market · AGI 架构探索)**:本仓库是 dsh-market「AGI 架构探索」类目下,对 agent 长期记忆的认知科学方法论重构——记忆宫殿(意象标签 + 房间铭牌)、走廊拓扑(力导向图)、闭环提问(摄入时让模型主动追问用户细节)、巩固合并(启发式去重 + 余弦相似度),与 MemGPT/Letta 同层「agent 记忆架构」叙事。
|
|
99
174
|
|
|
100
|
-
## 工具(
|
|
175
|
+
## 工具(22 个,窄参数)
|
|
101
176
|
|
|
102
177
|
| 工具 | 作用 |
|
|
103
178
|
|---|---|
|
|
@@ -264,7 +339,7 @@ pnpm test
|
|
|
264
339
|
|
|
265
340
|
#### Token effect
|
|
266
341
|
|
|
267
|
-
画像注入为条件性固定成本(受条数上限与 token 预算双重约束);工具 schema 为常驻成本(
|
|
342
|
+
画像注入为条件性固定成本(受条数上限与 token 预算双重约束);工具 schema 为常驻成本(22 个窄参数工具)。
|
|
268
343
|
|
|
269
344
|
#### KV Cache effect
|
|
270
345
|
|