@chenhw7/dsh-memory 0.10.0 → 0.11.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/README.i18n.yaml +2 -2
- package/README.md +9 -8
- package/README.zh.md +9 -8
- package/assets/icon.svg +6 -0
- package/lib/client/index.js +1046 -291
- package/lib/context/index.d.ts +17 -4
- package/lib/context/index.d.ts.map +1 -1
- package/lib/context/index.js +11 -7
- package/lib/context/index.js.map +1 -1
- package/lib/context/package.json +4 -0
- package/lib/context/policy.d.ts +1 -1
- package/lib/context/policy.d.ts.map +1 -1
- package/lib/context/policy.js +5 -0
- package/lib/context/policy.js.map +1 -1
- package/lib/context/settings.d.ts +7 -6
- package/lib/context/settings.d.ts.map +1 -1
- package/lib/context/settings.js +11 -10
- package/lib/context/settings.js.map +1 -1
- package/lib/identity/index.d.ts +11 -1
- package/lib/identity/index.d.ts.map +1 -1
- package/lib/identity/index.js +3 -2
- package/lib/identity/index.js.map +1 -1
- package/lib/identity/package.json +4 -0
- package/lib/identity/settings.d.ts +5 -4
- package/lib/identity/settings.d.ts.map +1 -1
- package/lib/identity/settings.js +10 -7
- package/lib/identity/settings.js.map +1 -1
- package/lib/index.d.ts +13 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -1
- package/lib/live-config.d.ts +33 -0
- package/lib/live-config.d.ts.map +1 -0
- package/lib/live-config.js +26 -0
- package/lib/live-config.js.map +1 -0
- package/lib/notes/index.d.ts +8 -8
- package/lib/notes/index.d.ts.map +1 -1
- package/lib/notes/index.js +3 -2
- package/lib/notes/index.js.map +1 -1
- package/lib/notes/package.json +4 -0
- package/lib/notes/settings.d.ts +6 -5
- package/lib/notes/settings.d.ts.map +1 -1
- package/lib/notes/settings.js +13 -9
- package/lib/notes/settings.js.map +1 -1
- package/lib/remote/index.d.ts +9 -0
- package/lib/remote/index.d.ts.map +1 -1
- package/lib/remote/index.js +18 -2
- package/lib/remote/index.js.map +1 -1
- package/lib/remote/package.json +4 -0
- package/lib/remote/typert.remote-client.d.ts +7 -4
- package/lib/review/accumulator.d.ts +39 -3
- package/lib/review/accumulator.d.ts.map +1 -1
- package/lib/review/accumulator.js +72 -9
- package/lib/review/accumulator.js.map +1 -1
- package/lib/review/consolidate.d.ts +3 -0
- package/lib/review/consolidate.d.ts.map +1 -1
- package/lib/review/consolidate.js +2 -0
- package/lib/review/consolidate.js.map +1 -1
- package/lib/review/extract.d.ts +23 -6
- package/lib/review/extract.d.ts.map +1 -1
- package/lib/review/extract.js +33 -17
- package/lib/review/extract.js.map +1 -1
- package/lib/review/index.d.ts +42 -3
- package/lib/review/index.d.ts.map +1 -1
- package/lib/review/index.js +121 -75
- package/lib/review/index.js.map +1 -1
- package/lib/review/package.json +4 -0
- package/lib/store/decay.d.ts +32 -0
- package/lib/store/decay.d.ts.map +1 -0
- package/lib/store/decay.js +23 -0
- package/lib/store/decay.js.map +1 -0
- package/lib/store/index.d.ts +28 -19
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +61 -22
- package/lib/store/index.js.map +1 -1
- package/lib/store/limits.d.ts +16 -0
- package/lib/store/limits.d.ts.map +1 -0
- package/lib/store/limits.js +16 -0
- package/lib/store/limits.js.map +1 -0
- package/lib/store/package.json +4 -0
- package/lib/store/settings.d.ts +9 -8
- package/lib/store/settings.d.ts.map +1 -1
- package/lib/store/settings.js +16 -14
- package/lib/store/settings.js.map +1 -1
- package/lib/store/sqlite.d.ts +8 -5
- package/lib/store/sqlite.d.ts.map +1 -1
- package/lib/store/sqlite.js +41 -16
- package/lib/store/sqlite.js.map +1 -1
- package/lib/tool/index.d.ts.map +1 -1
- package/lib/tool/index.js +86 -13
- package/lib/tool/index.js.map +1 -1
- package/lib/tool/package.json +4 -0
- package/lib/types.d.ts +21 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +7 -4
package/README.i18n.yaml
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
README.md:
|
|
2
|
-
README.zh.md:
|
|
1
|
+
README.md: ca3de80b22f85d9d475cabaa7ad9e74f3d94dcb2
|
|
2
|
+
README.zh.md: 277e5d67ff54bf8889f2a0d0b1eed4d15c3b695c
|
package/README.md
CHANGED
|
@@ -42,10 +42,10 @@ Your dsh agent normally forgets everything when you close a session. This bundle
|
|
|
42
42
|
- **Persistent memory** — facts, preferences, and conventions stored in a durable KV backend with audit logging.
|
|
43
43
|
- **Three-layer scoping** — `global` (cross-project), `project` (per-repo, auto-detected), and `user` (cross-project profile).
|
|
44
44
|
- **Nine memory tools + the identity tool** — `memory_search`, `memory_add`, `memory_replace`, `memory_remove`, `memory_list`, `memory_get`, `memory_pin`, `memory_unpin`, `memory_forget`, plus `identity_update` (below).
|
|
45
|
-
- **Identity layer (opt-in)** — the agent's two self-documents, **SOUL.md** (its character) and **USER.md** (its understanding of you), grown *by the agent in conversation* through `identity_update` and injected into every session (`soul` @80 / `user-profile` @81, coexisting with — and yielding to — the deployment persona; explicit conversation instructions always win). Seeded once from built-in Chinese copy, versioned with full history, never decayed. You hold no editor — only governance: a read-only Identity
|
|
45
|
+
- **Identity layer (opt-in)** — the agent's two self-documents, **SOUL.md** (its character) and **USER.md** (its understanding of you), grown *by the agent in conversation* through `identity_update` and injected into every session (`soul` @80 / `user-profile` @81, coexisting with — and yielding to — the deployment persona; explicit conversation instructions always win). Seeded once from built-in Chinese copy, versioned with full history, never decayed. You hold no editor — only governance: a read-only Identity panel in the left sidebar with version history, a two-step **revert** valve (default on, separate from the remote write switch), and markdown export. Extraction never persists identity restatements (prompt rule + mechanical prefilter), and an eval slice + `--identity` axis pin the injection surface (see [TECH_DESIGN §7.10](docs/TECH_DESIGN.md)).
|
|
46
46
|
- **BM25 relevance search** — dependency-free Okapi BM25 over CJK-aware tokenization (Latin word tokens; CJK unigrams + bigrams), pinned entries surfaced ahead of equal-relevance matches. Retrieval quality is not vibes: a fixed golden set (35 entries × 35 query sets, English + Chinese) is evaluated in CI — success@5 = 100%, MRR = 0.902 — with injection-cost numbers per prompt mode (see [TECH_DESIGN §7.9](docs/TECH_DESIGN.md)).
|
|
47
47
|
- **Automatic learning** — a projection accumulator watches the conversation for explicit remember-intent, corrections, and *verified failure streaks* (repeated same-signature tool failures resolved by a success), then runs LLM extraction when enough candidates accumulate. Admission rules exclude anything the repository already records (code structure, git history, fixed-bug narratives), and model-handwritten date prefixes are stripped so timestamps always come from the program.
|
|
48
|
-
- **Project notes prompt section** — coding conventions and a pitfall log render into every session's system prompt (`project-notes` section). Nothing is written into your repository: memory lives entirely in the host-side store, is managed
|
|
48
|
+
- **Project notes prompt section** — coding conventions and a pitfall log render into every session's system prompt (`project-notes` section). Nothing is written into your repository: memory lives entirely in the host-side store, is managed from the Memory panel in the left sidebar, and upgrades automatically clean up notes files left by ≤0.5.x installs.
|
|
49
49
|
- **Digest-first injection (default)** — the system prompt carries only frozen guidance; the data rides step-tail messages instead: a one-time `<memory-digest>` inventory of the store (category counts + anchor topic words, re-appended once after compaction) on the session's first step, and per-step `<recalled-memory>` fences when the step's text matches stored entries. The prompt prefix stays byte-stable all session, and nothing resident has to be evicted on re-freeze.
|
|
50
50
|
- **Dedup pipeline** — two-stage deduplication (stop-word-filtered Jaccard prefilter + optional LLM judge with bounded merges) prevents near-duplicate accumulation; a low-frequency curator pass re-summarizes oversized entries.
|
|
51
51
|
- **Two-tier memory lifecycle** — pin important memories; overdue project-scoped entries are removed while overdue `global`/`user` entries are soft-decayed (hidden from standing injections, still searchable, un-stamped on recall); entries can also be manually archived from the UI; every write is audited.
|
|
@@ -53,8 +53,9 @@ Your dsh agent normally forgets everything when you close a session. This bundle
|
|
|
53
53
|
- **Compaction-aware flush** — when compaction shadows old context, the raw events are scanned for anything worth remembering.
|
|
54
54
|
- **Security scanning, write *and* load time** — API keys, tokens, prompt-injection patterns, and exfiltration attempts are blocked from being saved; anything that slips through is redacted (`[BLOCKED: …]`) wherever it would re-enter a prompt.
|
|
55
55
|
- **Frontend-configurable** — all settings exposed on the bundle's page in the dsh settings UI, applied live.
|
|
56
|
-
- **Optional human review before write** — flip one setting (`confirmBeforeWrite`) and every extraction *and* tool write becomes a *proposal* in a pending queue (repeated signals accumulate hits and float up); adopting applies it (with your edits), rejecting discards it. The model never self-promotes: a proposed change to an existing entry rewrites nothing until you accept it.
|
|
57
|
-
- **
|
|
56
|
+
- **Optional human review before write** — flip one setting (`confirmBeforeWrite`) and every extraction *and* tool write becomes a *proposal* in a pending queue (repeated signals accumulate hits and float up); adopting applies it (with your edits), rejecting discards it. The model never self-promotes: a proposed change to an existing entry rewrites nothing until you accept it. The same gate covers the destructive verbs — `memory_remove`, `memory_forget`, `memory_pin`, and `memory_unpin` queue a *removal / pin / unpin* proposal and change nothing until you adopt it.
|
|
57
|
+
- **Remembering is a tool call, not a promise** — the injected guidance tells the assistant to write in the same turn when you ask it to remember something or state a standing preference, and an explicit "remember this" candidate does not wait for the extraction threshold: one such message is enough to run extraction. A stated preference or a correction still waits for the threshold (default 10 signals), and a correction carries the assistant turn it revises so the corrected fact — not the superseded one — is what gets stored.
|
|
58
|
+
- **Memory manager UI** — a "Memory" panel in the left sidebar (icon + main panel, beside the tool panels) with four tabs: Overview (health dashboard, the operation counters, and the swallowed-failure list), Review (the pending-proposal queue, each row badged with what adoption does), Manage (scope and workspace filters, BM25 search, category chips, a lazily loaded entry list, full write actions, and a create form), and Audit (the mutation trail, filterable by operation and source) — in English and Chinese.
|
|
58
59
|
- **Time-window browsing + smart list view** — `memory_list` returns newest-first with `earliest`/`latest`/`hasStale` metadata, accepts `since`/`until` epoch-ms bounds so "what did we learn last week" pages within the window, and suggests widening the filter when a narrowed query comes back empty over a non-empty store.
|
|
59
60
|
- **Optional summaries for progressive disclosure** — `memory_add`/`memory_replace` accept a `summary`, and extraction can emit a `[summary:…]` tag; index mode and auto-recall render summaries instead of truncated content.
|
|
60
61
|
|
|
@@ -161,7 +162,7 @@ pnpm dsh plugin --profile web update @chenhw7/dsh-memory
|
|
|
161
162
|
|
|
162
163
|
### Upgrading from 0.5.x
|
|
163
164
|
|
|
164
|
-
Version 0.6 stops exporting memory into repository files. The `docs/agent-memory/CONVENTIONS.md` / `PITFALLS.md` renders and the managed `AGENTS.md` pointer block are gone; memory is prompt-injected and managed
|
|
165
|
+
Version 0.6 stops exporting memory into repository files. The `docs/agent-memory/CONVENTIONS.md` / `PITFALLS.md` renders and the managed `AGENTS.md` pointer block are gone; memory is prompt-injected and managed from the Memory panel in the left sidebar only. On the first session in each project, the plugin removes what ≤0.5.x left behind: the managed pointer block is stripped from `AGENTS.md` (a pointer-only `AGENTS.md` is deleted) and the generated files under `docs/agent-memory/` are deleted (only files the plugin generated; anything else in that directory is kept). You can also delete them by hand at any time — nothing writes there anymore.
|
|
165
166
|
|
|
166
167
|
## Uninstall
|
|
167
168
|
|
|
@@ -219,7 +220,7 @@ You should see seven rows pointing at `@chenhw7/dsh-memory/*`:
|
|
|
219
220
|
name: '@chenhw7/dsh-memory/remote-service'
|
|
220
221
|
```
|
|
221
222
|
|
|
222
|
-
Then start dsh
|
|
223
|
+
Then start dsh: **configuration** lives on the **Settings → Plugins → @chenhw7/dsh-memory** page (five configuration sections), while **management** lives in the two new left-sidebar panels — **Memory** (entry browsing / review queue / health dashboard) and **Identity** (read-only governance):
|
|
223
224
|
|
|
224
225
|
```sh
|
|
225
226
|
dsh web
|
|
@@ -296,7 +297,7 @@ Each value resolves in layers: schema defaults → the row's `config:` entry in
|
|
|
296
297
|
| `curatorEveryNSessions` | `20` | Run the curator pass every N session creations. |
|
|
297
298
|
| `curatorMaxEntries` | `5` | Max entries selected per curation pass (longest first). |
|
|
298
299
|
| `curatorMinChars` | `400` | Only entries at least this long are selected for re-summarization. |
|
|
299
|
-
| `confirmBeforeWrite` | `false` | Human-review mode: every extraction (review/flush/curator) *and* every `memory_add`/`memory_replace` call lands as a proposal in the pending queue instead of the store, until a human adopts it
|
|
300
|
+
| `confirmBeforeWrite` | `false` | Human-review mode: every extraction (review/flush/curator) *and* every `memory_add`/`memory_replace` call lands as a proposal in the pending queue instead of the store, until a human adopts it from the Memory panel's Review tab; the lifecycle verbs (`memory_remove`, `memory_forget`, `memory_pin`, `memory_unpin`) are governed the same way, as removal/pin/unpin proposals. Repeated observations of the same proposal accumulate `hits` and float it to the top; a proposed change to an existing entry carries its id and rewrites nothing until adopted. |
|
|
300
301
|
|
|
301
302
|
> There is deliberately **no `memory-tools` settings entry**: the tool row owns no knobs of its own. It reads `maxSearchResults` from `ctx.memory.settings()`, `confirmBeforeWrite` from `ctx.memoryReview.settings()`, and the identity gate/budgets from `ctx.identity.settings()`. Its own `config.maxSearchResults` is the fallback when no store is composed.
|
|
302
303
|
|
|
@@ -413,7 +414,7 @@ The bundle inserts seven rows over `dsh-base`, each pointing at this package's o
|
|
|
413
414
|
| `memory-notes` | `@chenhw7/dsh-memory/notes` | Project-notes prompt projection (render conventions/pitfalls into the `project-notes` section; no repo files), registers `ctx.projectNotes`; cleans up ≤0.5.x file-export artifacts on session start |
|
|
414
415
|
| `memory-identity` | `@chenhw7/dsh-memory/identity` | Registers `ctx.identity`: seeds and reads the two self-documents (SOUL.md / USER.md) from the store's identity tables |
|
|
415
416
|
| `memory-autorecall` | `@chenhw7/dsh-memory/context` | System-prompt injection (`memory` @6000 + `project-notes` @6001, after tool guidance) and step-tail messages (one-time digest + per-step recall fence); owns the auto-recall settings |
|
|
416
|
-
| `memory-remote` | `@chenhw7/dsh-memory/remote-service` | `@Remote` service behind the
|
|
417
|
+
| `memory-remote` | `@chenhw7/dsh-memory/remote-service` | `@Remote` service behind the Memory panel's management UI (consumed over the `/api` channel) |
|
|
417
418
|
|
|
418
419
|
**Storage**: this bundle does **not** insert `storage-json` / `storage-domain` rows. The `dsh-web-app` bundle already provides them (with the correct root path under `$DSH_HOME/storages`). Inserting them here would clobber that config (patches replace whole rows, last-write-wins). The memory store provider consumes the `storageDomain` service as a peer dependency.
|
|
419
420
|
|
package/README.zh.md
CHANGED
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
- **持久化记忆** — 将事实、偏好和约定存储在持久的 KV 后端中,带审计日志。
|
|
40
40
|
- **三层作用域** — `global`(跨项目)、`project`(按仓库自动检测)、`user`(跨项目 profile)。
|
|
41
41
|
- **九个记忆工具 + 身份工具** — `memory_search`、`memory_add`、`memory_replace`、`memory_remove`、`memory_list`、`memory_get`、`memory_pin`、`memory_unpin`、`memory_forget`,外加 `identity_update`(见下)。
|
|
42
|
-
- **身份层(opt-in)**——代理的两份自我文档:**SOUL.md**(它的人格)与 **USER.md**(它对你的了解),由代理在对话中经 `identity_update` 自己生长(显式指令始终优先;与部署 persona 共存而非替代),每个会话注入(`soul` @80 / `user-profile` @81)。内置中文种子落一次、全量版本历史、永不衰减。人没有编辑器——只有治理:只读 Identity
|
|
42
|
+
- **身份层(opt-in)**——代理的两份自我文档:**SOUL.md**(它的人格)与 **USER.md**(它对你的了解),由代理在对话中经 `identity_update` 自己生长(显式指令始终优先;与部署 persona 共存而非替代),每个会话注入(`soul` @80 / `user-profile` @81)。内置中文种子落一次、全量版本历史、永不衰减。人没有编辑器——只有治理:只读 Identity 面板(左侧栏)+ 版本历史 + 两步**回滚**阀门(默认开,独立于远程写开关)+ markdown 导出。提取永不入库身份复述(提示词规则 + 机械预筛);eval 切片与 `--identity` 轴钉住注入面(见 [TECH_DESIGN §7.10](docs/TECH_DESIGN.zh.md))。
|
|
43
43
|
- **BM25 相关性检索** — 零依赖的 Okapi BM25,CJK 感知分词(Latin 逐词;CJK 一元 + 相邻二元 bigram),固定(pin)条目在同等相关时优先靠前。检索质量不是玄学:固定 golden set(35 条 × 35 组查询,中英混合)在 CI 中实测——success@5 = 100%、MRR = 0.902——并附各注入模式的成本数字(见 [TECH_DESIGN §7.9](docs/TECH_DESIGN.zh.md))。
|
|
44
44
|
- **自动学习** — 投影累加器观察对话中的显式记忆意图、修正语句以及*已验证的失败序列*(同签名连续失败后最终成功),候选足够多时运行 LLM 提取。准入规则排除一切"仓库已记录的内容"(代码结构、git 历史、已修复 bug 的经过),模型手写的日期前缀会被剥离,时间戳永远由程序盖戳。
|
|
45
|
-
- **项目笔记 prompt 段落** — 编码约定与踩坑日志渲染进每次会话的 system prompt(`project-notes` 段)。不向仓库写入任何文件:记忆完全保存在 host
|
|
45
|
+
- **项目笔记 prompt 段落** — 编码约定与踩坑日志渲染进每次会话的 system prompt(`project-notes` 段)。不向仓库写入任何文件:记忆完全保存在 host 侧存储中,在左侧栏的 Memory 面板里管理;升级时自动清理 ≤0.5.x 留下的笔记文件。
|
|
46
46
|
- **digest 优先注入(默认)** — system prompt 只承载冻结的指引文本,数据改走消息尾部:会话首步一次性注入 `<memory-digest>` 库存清单(类目计数 + anchors 主题词,压缩后补发一次),每步按相关性追加 `<recalled-memory>` 召回围栏。提示词前缀整会话逐字节稳定,重冻结不再牵连常驻数据。
|
|
47
47
|
- **去重管线** — 两阶段去重(停用词过滤的 Jaccard 预过滤 + 可选 LLM 裁决,合并长度有上限),防止近似重复条目累积;低频 curator pass 会将过长条目改写为简洁单行。
|
|
48
48
|
- **两层记忆生命周期** — 固定重要记忆;过期的 project 作用域条目被移除,而过期的 `global`/`user` 条目做软衰减(从常驻注入面隐藏但仍可搜索,再次召回即解除);条目也可以从界面手动归档;每次写入都有审计。
|
|
@@ -50,8 +50,9 @@
|
|
|
50
50
|
- **压缩时自动落盘** — 当压缩使旧上下文失效时,扫描原始事件并保留值得记住的内容。
|
|
51
51
|
- **安全扫描:写入时 + 读取时** — API Key、Token、提示注入模式和泄露尝试会被阻止写入;漏网内容在重新进入 prompt 的任何位置都会被替换为 `[BLOCKED: …]` 占位符。
|
|
52
52
|
- **前端可配置** — 所有设置在 dsh 设置界面的 bundle 页面上暴露,实时生效。
|
|
53
|
-
- **可选的写入前人工确认** — 打开一个开关(`confirmBeforeWrite
|
|
54
|
-
-
|
|
53
|
+
- **可选的写入前人工确认** — 打开一个开关(`confirmBeforeWrite`)后,自动提取*与*工具调用产生的写入一律先进入待确认队列(同一提议反复出现会累计次数并置顶);采纳才落库(可先编辑),拒绝即丢弃。模型永不自我提升:对既有条目的修改提议在你采纳前不会改动原文。同一道门禁也覆盖破坏性动作——`memory_remove`、`memory_forget`、`memory_pin`、`memory_unpin` 会排队一条*删除 / 置顶 / 取消置顶*提议,在你采纳前什么都不改。
|
|
54
|
+
- **「记住」是一次工具调用,不是一句承诺** — 注入的指引要求它在你说「记住」或陈述长期偏好时**在同一轮就写**;而明确的「记住」候选不等阈值:一条这样的消息足以触发一次提取(普通偏好陈述与更正仍等阈值,默认 10 个信号)。更正会带上它所回应的那轮助手回答,因此入库的是被更正后的事实,不是被取代的那个。
|
|
55
|
+
- **记忆管理中心** — 左侧栏新增「记忆」面板(图标 + 主面板,与工具面板并列),四个标签页:概览(健康仪表盘 + 操作计数 + 被吞掉的后台失败)、待确认(提议队列,带 add/update/删除/置顶/取消置顶 动作徽标)、管理(作用域与工作区筛选、BM25 搜索、类别筛选、懒加载条目列表、完整写操作、新建记忆表单)、审计(变更轨迹,可按操作与来源筛选),中英双语。
|
|
55
56
|
- **时间窗浏览 + 智能列表视图** — `memory_list` 默认按最新在前返回,附带 `earliest`/`latest`/`hasStale` 元数据,支持 `since`/`until` 毫秒时间戳边界(「上周学了什么」这类查询直接在窗口内分页);过滤条件命中 0 条但库非空时,会提示放宽过滤条件。
|
|
56
57
|
- **可选摘要(渐进式披露)** — `memory_add`/`memory_replace` 接受 `summary`,提取也可以输出 `[summary:…]` 标签;index 模式与自动召回优先渲染摘要而非截断正文。
|
|
57
58
|
|
|
@@ -157,7 +158,7 @@ pnpm dsh plugin --profile web update @chenhw7/dsh-memory
|
|
|
157
158
|
|
|
158
159
|
### 从 0.5.x 升级
|
|
159
160
|
|
|
160
|
-
0.6 版本停止向仓库导出记忆文件:`docs/agent-memory/CONVENTIONS.md` / `PITFALLS.md` 渲染文件与 `AGENTS.md` 托管指针块一并移除,记忆只通过 prompt
|
|
161
|
+
0.6 版本停止向仓库导出记忆文件:`docs/agent-memory/CONVENTIONS.md` / `PITFALLS.md` 渲染文件与 `AGENTS.md` 托管指针块一并移除,记忆只通过 prompt 注入并在左侧栏 Memory 面板中管理。升级后在每个项目的第一次会话里,插件会自动清理 ≤0.5.x 留下的产物:从 `AGENTS.md` 中剥离托管指针块(若文件只含指针块则整文件删除),并删除 `docs/agent-memory/` 下由插件生成的文件(只删插件生成的;目录中的其他文件保留)。你也可以随时手动删除它们——现在不会再有任何文件被写入仓库。
|
|
161
162
|
|
|
162
163
|
## 卸载
|
|
163
164
|
|
|
@@ -215,7 +216,7 @@ dsh --profile web --dump-config | grep memory
|
|
|
215
216
|
name: '@chenhw7/dsh-memory/remote-service'
|
|
216
217
|
```
|
|
217
218
|
|
|
218
|
-
然后启动 dsh
|
|
219
|
+
然后启动 dsh:**配置**在 **设置 → 插件 → @chenhw7/dsh-memory** 的页面(五个配置 section),**管理**在左侧栏新出现的 **Memory** 图标(条目浏览 / 待确认队列 / 健康仪表盘)与 **Identity** 图标(只读身份治理):
|
|
219
220
|
|
|
220
221
|
```sh
|
|
221
222
|
dsh web
|
|
@@ -292,7 +293,7 @@ dsh web
|
|
|
292
293
|
| `curatorEveryNSessions` | `20` | 每 N 次会话创建运行一次 curator pass。 |
|
|
293
294
|
| `curatorMaxEntries` | `5` | 每次 curation 最多选中的条目数(最长优先)。 |
|
|
294
295
|
| `curatorMinChars` | `400` | 只有长度不小于该值的条目才会被选中改写。 |
|
|
295
|
-
| `confirmBeforeWrite` | `false` | 人审模式:所有提取(review/flush/curator)*与*每次 `memory_add`/`memory_replace`
|
|
296
|
+
| `confirmBeforeWrite` | `false` | 人审模式:所有提取(review/flush/curator)*与*每次 `memory_add`/`memory_replace` 调用都改为在待确认队列中生成提议,而非直接写库,直到有人在左侧栏 Memory 面板的待确认页采纳;生命周期动词(`memory_remove`、`memory_forget`、`memory_pin`、`memory_unpin`)走同一门禁,作为删除 / 置顶 / 取消置顶提议入队。同一提议被反复观察会累计 `hits` 并置顶;对既有条目的修改提议携带其 id,在人工采纳前不会改动原文。 |
|
|
296
297
|
|
|
297
298
|
> 特意**没有 `memory-tools` 设置条目**:工具行本身不拥有旋钮。它从 `ctx.memory.settings()` 读 `maxSearchResults`、从 `ctx.memoryReview.settings()` 读 `confirmBeforeWrite`、从 `ctx.identity.settings()` 读身份开关与预算。它自己的 `config.maxSearchResults` 只在没有 store 组合时兜底。
|
|
298
299
|
|
|
@@ -410,7 +411,7 @@ profile patch 示例(把每个条目的默认值钉住;设置页写入的也
|
|
|
410
411
|
| `memory-notes` | `@chenhw7/dsh-memory/notes` | 项目笔记 prompt 投影(渲染约定/踩坑进 `project-notes` 段落;0.6 起不写仓库文件),注册 `ctx.projectNotes`;会话创建时清理 ≤0.5.x 的文件导出残留 |
|
|
411
412
|
| `memory-identity` | `@chenhw7/dsh-memory/identity` | 注册 `ctx.identity`:从 store 的身份表播种并读取两份自我文档(SOUL.md / USER.md) |
|
|
412
413
|
| `memory-autorecall` | `@chenhw7/dsh-memory/context` | 系统提示注入(`memory` @6000 + `project-notes` @6001,位于工具指引之后)与消息尾部注入(一次性清单 + 每步召回围栏),持有 auto-recall 设置 |
|
|
413
|
-
| `memory-remote` | `@chenhw7/dsh-memory/remote-service` | 记忆管理 UI 的 `@Remote`
|
|
414
|
+
| `memory-remote` | `@chenhw7/dsh-memory/remote-service` | 记忆管理 UI 的 `@Remote` 服务(左侧栏 Memory 面板经 `/api` 通道消费) |
|
|
414
415
|
|
|
415
416
|
**存储**:本 bundle **不**插入 `storage-json` / `storage-domain` 行。`dsh-web-app` bundle 已经提供它们(并在 `$DSH_HOME/storages` 下使用正确的根路径)。如果在这里重复插入,会覆盖已有配置(patch 会替换整行,后写覆盖先写)。memory store provider 将 `storageDomain` 服务作为 peer dependency 使用。
|
|
416
417
|
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 128 128" role="img" aria-label="Cairn">
|
|
2
|
+
<rect width="128" height="128" rx="28" fill="#2F5BEA"/>
|
|
3
|
+
<path d="M64 26 100 45 64 64 28 45 64 26Z" fill="#FFFFFF" fill-opacity="0.95"/>
|
|
4
|
+
<path d="M28 62 64 81l36-19" stroke="#FFFFFF" stroke-opacity="0.8" stroke-width="9" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
5
|
+
<path d="M28 82 64 101l36-19" stroke="#FFFFFF" stroke-opacity="0.55" stroke-width="9" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
6
|
+
</svg>
|