@kenz1117/dsh-engram 0.9.8 → 0.10.0
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 +281 -0
- package/README.en.md +78 -3
- package/README.md +79 -3
- package/docs/agent-language-guide.ru.md +102 -0
- package/i18n/panel.ru.txt +57 -0
- package/i18n/ru.txt +514 -0
- package/lib/client.js +2 -2
- package/lib/client.js.map +1 -1
- package/lib/index.js +5993 -787
- package/package.json +21 -3
- package/registry/bindings.json +14 -0
- package/registry/languages.json +8 -0
- package/registry/models.json +27 -0
- package/registry/schema.json +79 -0
- package/scripts/check-hook-order.mjs +129 -0
- package/scripts/check-messages.mjs +112 -24
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
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 整批是「稳定性与可审计」,0.10.x 整批是「多语言与数据驱动」。同一批次内的 `PATCH` 位通常是修复与加固。
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
_暂无。_
|
|
14
|
+
|
|
15
|
+
## [0.10.0] - 2026-10-24
|
|
16
|
+
|
|
17
|
+
> **0.10 是新的一批功能**:0.9.x 整批是「稳定性与可审计」,0.10.x 整批是「多语言与数据驱动」。
|
|
18
|
+
> 本版首次把「默认值」从代码属性改为数据属性——模型、语言绑定、服务端词典都不再写死在代码里。
|
|
19
|
+
|
|
20
|
+
### 多语言层、数据注册表与库维护(合并 #36)
|
|
21
|
+
|
|
22
|
+
- **默认嵌入模型改为注册表数据,不再是代码常量**:模型目录 `registry/models.json`(`bge-small-zh` 512 维 / `minilm-l12` 384 维)、语言绑定 `registry/bindings.json`(zh → bge-small-zh,`*` → minilm-l12)、语言表 `registry/languages.json` 与结构说明 `registry/schema.json` 全部作为数据文件落盘;`src/embedder/local.ts` 不再硬编码模型标识,`src/embedder/select.ts` 按语言解析模型,`embedder.localModel` 保留为显式覆盖。
|
|
23
|
+
- **服务端词典外置**:`i18n/ru.txt`(498 条)与 `i18n/panel.ru.txt`(48 条)以 TAB 分隔的左原文/右译文格式落盘,服务端消息与面板文案从文件读取,不再内嵌在代码里。
|
|
24
|
+
- **新增 `engram_language_guide` 工具**(工具总数 22 → **23**):输出 `<包根>/docs/agent-language-guide.ru.md`,兑现首启窗口对未内置语言用户的「agent 会输出一份说明」承诺。
|
|
25
|
+
- **面板新增「维护」视图**:库状态、模型标签、向量重算(`runVectorConvert`)、宫殿语言切换、词典查看与维护。
|
|
26
|
+
- **面板词典接口**:`/api/engram/locales` 提供「非内置语言 + 面板词典」,客户端 `src/client/index.ts` 拉取后 `addLanguage` + `register(NS, code, entries)`;路由不可用时回落到内置语言。
|
|
27
|
+
- **语言切换的联锁移到服务端**(`src/registry/palace-guard.ts`):窗口的状态现在活在服务端——它自己记住第一个事件(由 `palace-change/open` 打开窗口)与那一刻库所在的语言,并按自己的状态计算窗口。客户端不再发送 `from` 与 `startedAt`:此前校验的是"客户端送来的值"而非实际状态,任何客户端都能靠伪造当前时间让条件自动成立。重复开窗不会延长窗口;另一条写入路径(`palace-language`)同样受联锁约束(一个联锁挂在两条路径上,等于没有联锁)。此条关闭 `docs/tech-debt.md` 的 3.1。
|
|
28
|
+
- **其余已知边界**记于 `docs/tech-debt.md`(三条,均不阻塞使用):远程嵌入器不参与目标模型选择、未知维度的库可能被盖上目标标签、向量转换只校验条数不校验每条长度。
|
|
29
|
+
- **打包修复**:`i18n/`、`registry/`、`docs/agent-language-guide.ru.md` 三条路径补进 `package.json` 的 `files`;`scripts/check-hook-order.mjs` 新增静态钩子顺序检查(React 只在运行时报 #310,构建与 `tsc` 不会)。
|
|
30
|
+
- **文档**:新增 `docs/author/`(中英俄三语的作者向设计文档与插图,留在仓库不进包)、`docs/tech-debt.md`;工具数 22 → 23 同步到 README(中英)与落地页。
|
|
31
|
+
|
|
32
|
+
### ⚠️ 升级说明:存量库需要重建向量
|
|
33
|
+
|
|
34
|
+
**升级后默认嵌入模型从 512 维的 `bge-small-zh` 变为 384 维的 `minilm-l12`(多语言)。** 宫殿语言为中文的库不受影响(`registry/bindings.json` 里 zh 仍绑定 bge-small-zh 512 维);其余语言的库——包括语言未设、回落默认(`ru`)的库——会落到 384 维的多语言模型。
|
|
35
|
+
|
|
36
|
+
**两套向量不可比,维度也不一致。** 仍在旧模型上的库写入时会被拒绝(`store.embedderDimensionMismatch`:比较与写入都拒绝,不做静默截断)——**如果不重建,升级看起来就像「坏了」**。处理办法二选一:
|
|
37
|
+
|
|
38
|
+
- 用新模型重建:`pnpm backfill --force`(重建全部向量;不带 `--force` 时脚本在写入前就发现维度不符并报错退出,绝不会写出混合维度的库);
|
|
39
|
+
- 或把模型改回去:在配置里写 `embedder.localModel: 'Xenova/bge-small-zh-v1.5'`(此时与旧库同维,可继续用)。
|
|
40
|
+
|
|
41
|
+
想按语言分别用不同模型,改 `registry/bindings.json` 即可,无需动代码。
|
|
42
|
+
|
|
43
|
+
## [0.9.9] - 2026-10-23
|
|
44
|
+
|
|
45
|
+
### 文档与市场曝光
|
|
46
|
+
|
|
47
|
+
- README 首屏重写(中英双语同步):新增一句话英文定位句「Local-first long-term memory for your coding agent.」、可折叠目录、「为什么是它」三条主流路线对照表、记忆流动 ASCII 流程图、**给 agent 自己装的安装 prompt**;新增 CI 徽章。
|
|
48
|
+
- 新增 `docs/store/icon-180.png`(商店卡片位图图标,含可复现的 `icon-180.html` 源)与 `docs/store/social-preview.png`(GitHub 社交预览图,含 `social-preview.html` 源)。
|
|
49
|
+
- 新增本 CHANGELOG。
|
|
50
|
+
- 修正文档中的工具数量:实际注册 **22** 个 `engram_*` 工具(原文档写作 21,英文版另一处写作 20)。
|
|
51
|
+
- `package.json` 补 `homepage` / `bugs` / 更全的 `keywords`。
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### 商店与社区
|
|
55
|
+
|
|
56
|
+
- 商店条目描述更新到 v0.9.8 现状并补 `icon` 字段(category 保持 `agi` 不变)。
|
|
57
|
+
- 仓库描述、主页与 topics 补齐;启用 GitHub Pages 落地页 `https://kenz1117.github.io/dsh-engram/`。
|
|
58
|
+
|
|
59
|
+
## [0.9.8] - 2026-10-22
|
|
60
|
+
|
|
61
|
+
- `pnpm backfill` 新增 `--force`(重建全部向量)与 `--model`(指定模型),扫描 `<dbDir>` 下全部分库(`user.db` / `shared.db` / `project-<hash>.db`);维度与库中已有向量不符时在写入前报错退出,绝不写出混合维度的库。
|
|
62
|
+
- 嵌入器远程端点的离线测试补齐;维度不匹配降级为显式报错而非静默失败。
|
|
63
|
+
- 补上 `vite`(vitest 5 把 vite 降成了 peer 依赖)。
|
|
64
|
+
|
|
65
|
+
## [0.9.7] - 2026-10-22
|
|
66
|
+
|
|
67
|
+
- 路由层错误分类收敛:超限 413、坏 JSON 400、不是对象 400,三类失败各说各的话;删除重复的 review-answer 处理器。
|
|
68
|
+
- i18n:导入失败的措辞去掉「校验失败」叠词;大 body 的报错不再套「文件校验失败」。
|
|
69
|
+
|
|
70
|
+
## [0.9.6] - 2026-10-21
|
|
71
|
+
|
|
72
|
+
- 路由级断言补齐三类失败场景;修正「内存封顶」的措辞;修正 `net.connect` 重载(补 `host` 参数)。
|
|
73
|
+
|
|
74
|
+
## [0.9.5] - 2026-10-21
|
|
75
|
+
|
|
76
|
+
- **导入不再被 64 KiB body 上限静默丢弃**(#34):导入接口单独放开到 16 MiB;上限改按**字节**计(原按字符数算,中文一字 3 字节,等于把字节防线悄悄放宽了三倍);请求体改整块 UTF-8 解码(原逐块解码,多字节字符跨块边界会被切成乱码);三类失败各给各的提示(413 / 400 非法 JSON / 400 不是对象);面板加前置体量检查。
|
|
77
|
+
- 补「请求中途断掉的导入不会带崩服务」等 10 个回归用例。
|
|
78
|
+
|
|
79
|
+
## [0.9.4] - 2026-10-21
|
|
80
|
+
|
|
81
|
+
- **嵌入向量维度成为硬约束**:库中向量与当前模型维度不一致时,写入与相似度比较都直接拒绝并报 `EMBEDDER_DIMENSION_MISMATCH`(说清两边各是多少维),而不是逐维截断后给出一个像样的相似度。
|
|
82
|
+
- 嵌入器可配置:本地模型与池化可选,支持 OpenAI 兼容远程端点(`apiKeyEnv` 从环境变量读,插件不落密钥)。
|
|
83
|
+
- Jev 裁决改为**运行时解析**:provider 与模型取自 DSH,插件不保存密钥与地址;旧格式字段一次性告警。
|
|
84
|
+
|
|
85
|
+
## [0.9.3] - 2026-10-20
|
|
86
|
+
|
|
87
|
+
- **新增 `engram_import` 记忆导入**(#33):JSON 回路 + 预览勾选 + 内容去重 + 就地补嵌入;导入独立成前置图标按钮,格式支持 JSON 与导出的 Markdown。
|
|
88
|
+
- 面板导出菜单项补 button 样式重置(此前镜像目录与导入菜单项渲染成大盒子)。
|
|
89
|
+
|
|
90
|
+
## [0.9.2] - 2026-10-19
|
|
91
|
+
|
|
92
|
+
- 镜像导出改 fetch + toast,修复点击崩溃;导入改同款下拉(显式 JSON / Markdown 两项)。
|
|
93
|
+
- 会话压缩后重新注入常驻画像(#32)。
|
|
94
|
+
- hero 图引用指向 `hero.jpg`(此前引用了已删除的 png);移除被替换的 `hero.png`,仓库瘦身 2.1 MB。
|
|
95
|
+
|
|
96
|
+
## [0.9.1] - 2026-10-18
|
|
97
|
+
|
|
98
|
+
- 翻新清单满宽铺开 + 弹窗不透明兜底(#19 问题一/二)。
|
|
99
|
+
- `stats` 分部补上 `shared`。
|
|
100
|
+
|
|
101
|
+
## [0.9.0] - 2026-10-18
|
|
102
|
+
|
|
103
|
+
**稳定性与可审计批次(据 [审计报告](../docs/audit-2026-10-18.md))**
|
|
104
|
+
|
|
105
|
+
- 视图级 ErrorBoundary(按视图降级 + 重试按钮)——把整类白屏从「不可见事故」变成「可见警告」。
|
|
106
|
+
- 失败不再伪装成空态;修搜索框 trim 过早。
|
|
107
|
+
- 版本握手 + `VERSION` 单一来源化;客户端与服务端版本偏斜时顶部出现重启提醒横幅。
|
|
108
|
+
- 摄取重放循环逐键隔离 + 陈旧放弃 + 已付费的 LLM 产物不静默丢弃。
|
|
109
|
+
- 数据安全三连:restore 后关闭并失效分库缓存、SQLite 开 WAL / busy_timeout、迁移前自动快照。
|
|
110
|
+
- i18n:翻新理由跟随面板语言、降级墓志铭走词典、俄语复数。
|
|
111
|
+
|
|
112
|
+
## [0.8.16] - 2026-10-18
|
|
113
|
+
|
|
114
|
+
- dependabot 接入(npm 每周 / actions 每月)+ `packageManager` 钉 `pnpm@10.15.0`;新增 CONTRIBUTING 与 SECURITY。
|
|
115
|
+
|
|
116
|
+
## [0.8.15] - 2026-10-18
|
|
117
|
+
|
|
118
|
+
- #19 修复:翻新清单卡片内联原文与合并候选;侧栏图标回归宿主单色。
|
|
119
|
+
- 打包修复:host peers 全部 optional,tarball 能装进干净 profile(0.8.0–0.8.14 十五个版本带病发布的事故收口)。
|
|
120
|
+
- CI 门禁:在托管 runner 上真实执行两道不依赖 harness 树的自检。
|
|
121
|
+
|
|
122
|
+
## [0.8.14] - 2026-10-17
|
|
123
|
+
|
|
124
|
+
## [0.8.13] - 2026-10-17
|
|
125
|
+
|
|
126
|
+
- 吸顶 Header/Tab 栏;修复 tab 栏 1px 滚动条;调整 scope 顺序。
|
|
127
|
+
|
|
128
|
+
## [0.8.12] - 2026-10-15
|
|
129
|
+
|
|
130
|
+
- 历史回填「卡住」修复:逐轮进度 + 轮询失败显形 + 重启哨兵。
|
|
131
|
+
|
|
132
|
+
## [0.8.0] - 2026-10-13
|
|
133
|
+
|
|
134
|
+
- **面板入口升级为顶层侧栏**(`sidebar.panellist` + `main` 双槽位),主列满宽渲染,不再受设置弹窗宽度限制。
|
|
135
|
+
- 新增第九视图「信念」与 UI 布局重构。
|
|
136
|
+
- 关系图模式补完;侧栏图标改品牌渐变 tile;活动热力日历;走廊真·建筑平面图。
|
|
137
|
+
|
|
138
|
+
## [0.7.16] - 2026-10-13
|
|
139
|
+
|
|
140
|
+
## [0.7.15] - 2026-10-03
|
|
141
|
+
|
|
142
|
+
- 面板第九视图「信念」落地;UI 砍 Header 品牌区、加暖色渐变水印与线性图标。
|
|
143
|
+
|
|
144
|
+
## [0.7.14] - 2026-10-03
|
|
145
|
+
|
|
146
|
+
- **自动信念巩固**(`reflect: suggest|auto` + observations 表,schema v12):把「尚未成为任何信念证据」的原始记忆交给辅助 LLM 巩固为带证据数的一句话信念;同主题经向量近邻自动归并并持续细化;新证据与既有信念近邻时信念先转 `stale`,下次巩固四选一(form / refine / still / refute)。原始记忆全部保留,信念是叠加的抽象层。
|
|
147
|
+
|
|
148
|
+
## [0.7.13] - 2026-09-25
|
|
149
|
+
|
|
150
|
+
- 采用 v4 producer-owned plugin message sources。
|
|
151
|
+
|
|
152
|
+
## [0.7.12] - 2026-09-22
|
|
153
|
+
|
|
154
|
+
- **Jev 系统一裁决**:DEFER 模糊带的三路判定(并入 / 放行 / 搁置)与矛盾边确认可交外部 Jev 模型判决;Jev 不可用时静默回落纯规则四态,不阻断写入。每次裁决旁路留观测(判定结果、是否参与、耗时、回落原因),面板「裁决」视图可排查。
|
|
155
|
+
|
|
156
|
+
## [0.7.11] - 2026-09-21
|
|
157
|
+
|
|
158
|
+
- **实体词典与时序事实链**(阶段三):事实级三元组携带 `valid_at` / `invalid_at` 时间窗,冲突事实软失效不删除;`engram_facts` 读写事实链;`engram_search` 加 `asOf` 时点回看;面板实体页事实链详情。
|
|
159
|
+
|
|
160
|
+
## [0.7.10] - 2026-09-21
|
|
161
|
+
|
|
162
|
+
- 实体词典:摄取与保存的辅助 LLM 输出同时抽取实体提及(人物 / 项目 / 工具 / 概念,可带别名),按归一化名与既有实体精确匹配消解;记忆与实体多对多关联。
|
|
163
|
+
|
|
164
|
+
## [0.7.9] - 2026-09-21
|
|
165
|
+
|
|
166
|
+
- **阶段二记忆分层首批**:画像可编辑(`engram_profile_edit`,版本链回滚 + 面板 diff 审计)、episode 情景记忆独立时间线(`engram_episode_timeline`,按会话分组、时间邻近扩展)、回填与实时会话摘要组头。
|
|
167
|
+
|
|
168
|
+
## [0.7.8] - 2026-09-21
|
|
169
|
+
|
|
170
|
+
- **阶段一飞轮闭环补强四项全部落地**:写入四态回报(ACCEPT / MERGE / DROP / DEFER)、分级递减注入预算、PII 脱敏扩充(中文密码 / 身份证 / 手机号)、证据门收尾提醒。
|
|
171
|
+
|
|
172
|
+
## [0.7.7] - 2026-09-21
|
|
173
|
+
|
|
174
|
+
- 今日待回忆降级为速览计数;陈展加「今日到期」筛选。
|
|
175
|
+
- 遗留库迁移治理:写入 JSON 墓碑 sidecar 记录归属,`legacyMigration` 支持 `eager` / `conservative` 两种策略。
|
|
176
|
+
|
|
177
|
+
## [0.7.6] - 2026-09-17
|
|
178
|
+
|
|
179
|
+
- 摄取逐条判宫殿(跨项目通用的进私人库,只跟当前项目有关的进项目库);项目宫殿随 GUI 工作区切换。
|
|
180
|
+
- 适配新版 dsh 的 `sessionPersistence` 只读句柄。
|
|
181
|
+
- 无 git 时的分库命名从「cwd 前 12 字符」改为 cwd 全量 sha256(修掉同前缀目录撞库)。
|
|
182
|
+
|
|
183
|
+
## [0.7.5] - 2026-09-12
|
|
184
|
+
|
|
185
|
+
- CJK token 估算;**证据门 `engram_assess`**(命中 ≠ 足以回答,代码强制三条件齐备);管家日志补词典。
|
|
186
|
+
|
|
187
|
+
## [0.7.4] - 2026-09-11
|
|
188
|
+
|
|
189
|
+
- 面板细节打磨:今日视图重排、工具栏 chips、日志工具条与类别色点、回填分段线。
|
|
190
|
+
|
|
191
|
+
## [0.7.3] - 2026-09-11
|
|
192
|
+
|
|
193
|
+
- **历史会话回填**:把 dsh 已持久化的历史会话逐轮提炼进宫殿(默认按每个会话自己的 cwd 分库),幂等键支持中断续跑;导入规则可配(时间窗 / 轮数上限 / 辅助模型 / 是否含子代理)。面板五视图重构。
|
|
194
|
+
|
|
195
|
+
## [0.7.2] - 2026-09-11
|
|
196
|
+
|
|
197
|
+
- **记忆宫殿信息架构落地**:位置当索引(写入按 kind 分房并钉「房间#桩位」坐标,房间容量 9,满员开新房)、固定路线定顺序(`tour_routes` append-only)、骨架长期复用、标记独一无二(门牌 0-1 评分);修复迁移与 dispose 崩溃。
|
|
198
|
+
|
|
199
|
+
## [0.7.1] - 2026-09-11
|
|
200
|
+
|
|
201
|
+
- UI 打磨与修复;上架 dsh-market「AGI 架构探索」类目。
|
|
202
|
+
|
|
203
|
+
## [0.6.1] - 2026-09-01
|
|
204
|
+
|
|
205
|
+
- 统计卡片补脱敏指标;`engram_export` 脱敏视图。
|
|
206
|
+
|
|
207
|
+
## [0.6.0] - 2026-09-01
|
|
208
|
+
|
|
209
|
+
- **注入防护三件套**(协议标签 + 入库脱敏 + 召回占位防回声室);多查询 RRF 融合;批量保存;脱敏筛选视图。
|
|
210
|
+
|
|
211
|
+
## [0.5.0] - 2026-09-04
|
|
212
|
+
|
|
213
|
+
- 竞品对标四项;管理 UI 全面翻新。
|
|
214
|
+
|
|
215
|
+
## [0.4.7] - 2026-09-02
|
|
216
|
+
|
|
217
|
+
- 发布时通过 `prepare` 链接 peer 包。
|
|
218
|
+
|
|
219
|
+
## [0.4.4] - 2026-09-01
|
|
220
|
+
|
|
221
|
+
- zh/en i18n 走宿主 locale 服务,面板文案全部本地化。
|
|
222
|
+
|
|
223
|
+
## [0.4.0] - 2026-09-01
|
|
224
|
+
|
|
225
|
+
- 设置页「记忆库」tab 取代独立页面。
|
|
226
|
+
|
|
227
|
+
## [0.3.0] - 2026-09-01
|
|
228
|
+
|
|
229
|
+
- Web 管理面板(`/engram`)+ `/api/engram/*` 回环 API;嵌入回填脚本(为降级期写入的记忆补算向量)。
|
|
230
|
+
|
|
231
|
+
## [0.2.0] - 2026-09-01
|
|
232
|
+
|
|
233
|
+
- 自动摄取、矛盾候选、蒸馏飞轮、审计工具;schema v2 记来源会话/轮次/seq、review/stats/export/decay。
|
|
234
|
+
|
|
235
|
+
## [0.0.1] - 2026-09-01
|
|
236
|
+
|
|
237
|
+
- 首个可用版本:`engram_*` 工具集、插件入口、画像注入、SQLite + FTS5 + 关系边 + op log 的本地存储。
|
|
238
|
+
|
|
239
|
+
[Unreleased]: https://github.com/kenz1117/dsh-engram/compare/v0.10.0...HEAD
|
|
240
|
+
[0.10.0]: https://github.com/kenz1117/dsh-engram/compare/v0.9.9...v0.10.0
|
|
241
|
+
[0.9.9]: https://github.com/kenz1117/dsh-engram/compare/v0.9.8...v0.9.9
|
|
242
|
+
[0.9.8]: https://github.com/kenz1117/dsh-engram/compare/v0.9.7...v0.9.8
|
|
243
|
+
[0.9.7]: https://github.com/kenz1117/dsh-engram/compare/v0.9.6...v0.9.7
|
|
244
|
+
[0.9.6]: https://github.com/kenz1117/dsh-engram/compare/v0.9.5...v0.9.6
|
|
245
|
+
[0.9.5]: https://github.com/kenz1117/dsh-engram/compare/v0.9.4...v0.9.5
|
|
246
|
+
[0.9.4]: https://github.com/kenz1117/dsh-engram/compare/v0.9.3...v0.9.4
|
|
247
|
+
[0.9.3]: https://github.com/kenz1117/dsh-engram/compare/v0.9.2...v0.9.3
|
|
248
|
+
[0.9.2]: https://github.com/kenz1117/dsh-engram/compare/v0.9.1...v0.9.2
|
|
249
|
+
[0.9.1]: https://github.com/kenz1117/dsh-engram/compare/v0.9.0...v0.9.1
|
|
250
|
+
[0.9.0]: https://github.com/kenz1117/dsh-engram/compare/v0.8.16...v0.9.0
|
|
251
|
+
[0.8.16]: https://github.com/kenz1117/dsh-engram/compare/v0.8.15...v0.8.16
|
|
252
|
+
[0.8.15]: https://github.com/kenz1117/dsh-engram/compare/v0.8.14...v0.8.15
|
|
253
|
+
[0.8.14]: https://github.com/kenz1117/dsh-engram/compare/v0.8.13...v0.8.14
|
|
254
|
+
[0.8.13]: https://github.com/kenz1117/dsh-engram/compare/v0.8.12...v0.8.13
|
|
255
|
+
[0.8.12]: https://github.com/kenz1117/dsh-engram/compare/v0.7.16...v0.8.12
|
|
256
|
+
[0.8.0]: https://github.com/kenz1117/dsh-engram/compare/v0.7.16...v0.8.0
|
|
257
|
+
[0.7.16]: https://github.com/kenz1117/dsh-engram/compare/v0.7.15...v0.7.16
|
|
258
|
+
[0.7.15]: https://github.com/kenz1117/dsh-engram/compare/v0.7.14...v0.7.15
|
|
259
|
+
[0.7.14]: https://github.com/kenz1117/dsh-engram/compare/v0.7.13...v0.7.14
|
|
260
|
+
[0.7.13]: https://github.com/kenz1117/dsh-engram/compare/v0.7.12...v0.7.13
|
|
261
|
+
[0.7.12]: https://github.com/kenz1117/dsh-engram/compare/v0.7.11...v0.7.12
|
|
262
|
+
[0.7.11]: https://github.com/kenz1117/dsh-engram/compare/v0.7.10...v0.7.11
|
|
263
|
+
[0.7.10]: https://github.com/kenz1117/dsh-engram/compare/v0.7.9...v0.7.10
|
|
264
|
+
[0.7.9]: https://github.com/kenz1117/dsh-engram/compare/v0.7.8...v0.7.9
|
|
265
|
+
[0.7.8]: https://github.com/kenz1117/dsh-engram/compare/v0.7.7...v0.7.8
|
|
266
|
+
[0.7.7]: https://github.com/kenz1117/dsh-engram/compare/v0.7.6...v0.7.7
|
|
267
|
+
[0.7.6]: https://github.com/kenz1117/dsh-engram/compare/v0.7.5...v0.7.6
|
|
268
|
+
[0.7.5]: https://github.com/kenz1117/dsh-engram/compare/v0.7.4...v0.7.5
|
|
269
|
+
[0.7.4]: https://github.com/kenz1117/dsh-engram/compare/v0.7.3...v0.7.4
|
|
270
|
+
[0.7.3]: https://github.com/kenz1117/dsh-engram/compare/v0.7.2...v0.7.3
|
|
271
|
+
[0.7.2]: https://github.com/kenz1117/dsh-engram/compare/v0.7.1...v0.7.2
|
|
272
|
+
[0.7.1]: https://github.com/kenz1117/dsh-engram/compare/v0.6.1...v0.7.1
|
|
273
|
+
[0.6.1]: https://github.com/kenz1117/dsh-engram/compare/v0.6.0...v0.6.1
|
|
274
|
+
[0.6.0]: https://github.com/kenz1117/dsh-engram/compare/v0.5.0...v0.6.0
|
|
275
|
+
[0.5.0]: https://github.com/kenz1117/dsh-engram/compare/v0.4.7...v0.5.0
|
|
276
|
+
[0.4.7]: https://github.com/kenz1117/dsh-engram/compare/v0.4.6...v0.4.7
|
|
277
|
+
[0.4.4]: https://github.com/kenz1117/dsh-engram/compare/v0.4.3...v0.4.4
|
|
278
|
+
[0.4.0]: https://github.com/kenz1117/dsh-engram/compare/v0.3.0...v0.4.0
|
|
279
|
+
[0.3.0]: https://github.com/kenz1117/dsh-engram/compare/v0.2.0...v0.3.0
|
|
280
|
+
[0.2.0]: https://github.com/kenz1117/dsh-engram/compare/v0.0.1...v0.2.0
|
|
281
|
+
[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
|
+
23 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 | **23 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
|
|---|---|
|
|
@@ -122,6 +196,7 @@ Sensory and emotional dimensions (smell, temperature, emotional weight) are deli
|
|
|
122
196
|
| `engram_distill` | Distill: merge same-topic clusters into higher-level rules (LLM) |
|
|
123
197
|
| `engram_reflect` | Belief consolidation: abstract unconsolidated raw memories into proof-backed higher-level beliefs (four actions form/refine/still/refute; automatic vector-near-neighbor merging; raw memories stay active). Also drains the pending-consolidation queue created by reflect=suggest |
|
|
124
198
|
| `engram_profile_edit` | Edit the curated profile block: `view` shows the current content and version history; `edit` writes a new version (optimistic lock via `expectedVersion`, conflicts fail loud); `rollback` restores a historical version (appended as a new version; history is never rewritten). The curated profile is injected ahead of the derived profile; every edit lands in the operation log, and the profile card on the panel's Today view shows version diffs |
|
|
199
|
+
| `engram_language_guide` | Output the plugin language guide (the body of `<package-root>/docs/agent-language-guide.ru.md`). The first-run window promises a human whose language is not built in that the agent will print an instruction; this tool keeps that promise. The source text is written in Russian as a draft — the agent translates it into the asker's language itself |
|
|
125
200
|
|
|
126
201
|
## Configuration
|
|
127
202
|
|
|
@@ -263,7 +338,7 @@ Each turn's first step appends a plugin-source user snapshot: `User memory profi
|
|
|
263
338
|
|
|
264
339
|
#### Token effect
|
|
265
340
|
|
|
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 (
|
|
341
|
+
Profile injection is a conditional fixed cost (bounded by both the entry cap and the token budget); the tool schemas are a standing cost (23 narrow-parameter tools).
|
|
267
342
|
|
|
268
343
|
#### KV Cache effect
|
|
269
344
|
|
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
|
+
23 个窄参数工具 · 混合检索(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
|
+
- [工具(23 个,窄参数)](#工具23-个窄参数)
|
|
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
|
+
确认已注册 23 个 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 工具面 | **23 个窄参数工具**,覆盖保存/检索/事实链/时间线/审计/导出/蒸馏/信念/复习全生命周期 | 常见 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
|
+
## 工具(23 个,窄参数)
|
|
101
176
|
|
|
102
177
|
| 工具 | 作用 |
|
|
103
178
|
|---|---|
|
|
@@ -122,6 +197,7 @@ dsh plugin --profile web add @kenz1117/dsh-engram
|
|
|
122
197
|
| `engram_distill` | 蒸馏:同主题簇合并为高层规律(LLM) |
|
|
123
198
|
| `engram_reflect` | 信念巩固:把尚未巩固的原始记忆经辅助 LLM 抽象为带证据数的高层信念(form/refine/still/refute 四动作,向量近邻自动归并,原始记忆保留不归档);同时是 reflect=suggest 待巩固登记的执行出口 |
|
|
124
199
|
| `engram_profile_edit` | 画像 curated block 编辑:`view` 看当前内容与版本历史;`edit` 写入新版本(乐观锁 `expectedVersion`,冲突 loud 失败);`rollback` 回滚到历史版本(作为新版本追加,历史永不改写)。curated 画像优先于派生画像注入;编辑记录入操作日志,面板今日页画像卡可查版本 diff |
|
|
200
|
+
| `engram_language_guide` | 输出插件语言指南(`<包根>/docs/agent-language-guide.ru.md` 的正文)。首启时对未内置语言的人承诺「agent 会输出一份说明」,这份承诺由本工具兑现;正文以俄文写成草稿,由 agent 按提问者的语言自行翻译 |
|
|
125
201
|
|
|
126
202
|
## 配置
|
|
127
203
|
|
|
@@ -264,7 +340,7 @@ pnpm test
|
|
|
264
340
|
|
|
265
341
|
#### Token effect
|
|
266
342
|
|
|
267
|
-
画像注入为条件性固定成本(受条数上限与 token 预算双重约束);工具 schema 为常驻成本(
|
|
343
|
+
画像注入为条件性固定成本(受条数上限与 token 预算双重约束);工具 schema 为常驻成本(23 个窄参数工具)。
|
|
268
344
|
|
|
269
345
|
#### KV Cache effect
|
|
270
346
|
|