dsh-cross-memory 0.2.0 → 0.2.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/README.md +9 -3
- package/lib/client.js +1424 -1316
- package/lib/config.js +3 -3
- package/lib/index.js +18 -5
- package/lib/persona.js +52 -1
- package/lib/remote.js +35 -0
- package/lib/test/client-wiring.test.js +8 -7
- package/lib/test/consolidate-job.test.js +13 -0
- package/lib/test/disputes-panel.test.js +29 -2
- package/lib/test/notices.test.js +4 -2
- package/lib/test/persona.test.js +14 -1
- package/lib/test/remote.test.js +11 -0
- package/lib/test/settings-card.test.js +1 -1
- package/lib/test/sync.test.js +1 -1
- package/lib/types/persona.d.ts +33 -0
- package/lib/types/remote.d.ts +13 -0
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -18,10 +18,16 @@
|
|
|
18
18
|
| 分层注入 | 每个会话注入一次有界摘要;另有按需补注(当前这轮明显相关时)、标题轮转与增量块。 |
|
|
19
19
|
| 按需召回 | 关键词 + 时间衰减 + 一跳扩展;命中原因可在日志里核对。 |
|
|
20
20
|
| 原始片段(可选) | 补注块可附带来源会话的原文片段,默认关闭,因为它会把别的会话的原文带进当前上下文。 |
|
|
21
|
-
| persona |
|
|
21
|
+
| persona | 维护「这个人是谁」的画像(`persona/human.md`),注入在记忆摘要之前,默认预算 12000 字节;设置 → 记忆 → 画像 可查看/编辑,并可锁定不让后台改写。 |
|
|
22
22
|
| 开放承诺 | 把会话里答应过、但还没到期/没做的事记成台账,到期未闭环会提醒。 |
|
|
23
23
|
| 反思与技能草稿 | 每周从记忆里提炼跨项目观察(必须引用来源记忆);可把重复流程提成技能草稿,需你手动晋升。 |
|
|
24
|
-
| GUI | 设置 →
|
|
24
|
+
| GUI | 设置 → 记忆:浏览/搜索/新增/删除、**画像查看/编辑与锁定**、配置项、待裁决;插件页该包下也有同一张配置卡。 |
|
|
25
|
+
|
|
26
|
+
### Persona 画像
|
|
27
|
+
|
|
28
|
+
- **在哪看**:画像是记忆库里的 `persona/human.md`(旧的单文件 `persona.md` 仍兼容读取)。每次会话开始时它被包进 `<persona>…snapshot 日期…</persona>`,注入在记忆摘要之前;超过 `personaMaxBytes`(默认 **12000**,0 关闭)的部分按行截断。
|
|
29
|
+
- **怎么编辑**:**设置 → 记忆 → 画像**,改完点「保存画像」即写回,不经过后台合并,不用重启宿主。
|
|
30
|
+
- **锁定**:同一页勾选「锁定画像」会在画像旁边写 `persona/human.lock`;锁定后后台 consolidation 即使提出画像改写也会跳过(日志会记 `persona is locked; the automatic profile update was skipped`),只有你手动保存才会改变它。取消勾选即解除。
|
|
25
31
|
|
|
26
32
|
更细的设计说明见 [`docs/DETAIL.zh.md`](docs/DETAIL.zh.md)(英文版 [`docs/DETAIL.md`](docs/DETAIL.md))。
|
|
27
33
|
|
|
@@ -172,7 +178,7 @@ $DSH_HOME/memories/
|
|
|
172
178
|
│ └── archive/<id>.md
|
|
173
179
|
├── sessions/<session-id>.md # 证据笔记(被挖掘过的会话)
|
|
174
180
|
├── skills/<name>/SKILL.md # 技能草稿(未晋升前 DSH 看不到)
|
|
175
|
-
├── persona/ # persona
|
|
181
|
+
├── persona/ # persona 画像(human.md;human.lock 存在表示已锁定)
|
|
176
182
|
├── reflections/ # 每周反思
|
|
177
183
|
└── state.db # SQLite 状态
|
|
178
184
|
```
|