@chenhw7/dsh-memory 0.7.0 → 0.9.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 -0
- package/README.md +9 -8
- package/{README.zh-CN.md → README.zh.md} +8 -7
- package/cordis.patch.yml +5 -1
- package/lib/benchmark/index.d.ts +24 -7
- package/lib/benchmark/index.d.ts.map +1 -1
- package/lib/benchmark/index.js +55 -7
- package/lib/benchmark/index.js.map +1 -1
- package/lib/client/index.js +75 -11
- package/lib/context/conflict.d.ts +23 -10
- package/lib/context/conflict.d.ts.map +1 -1
- package/lib/context/conflict.js +59 -20
- package/lib/context/conflict.js.map +1 -1
- package/lib/context/index.d.ts +45 -1
- package/lib/context/index.d.ts.map +1 -1
- package/lib/context/index.js +153 -9
- package/lib/context/index.js.map +1 -1
- package/lib/context/policy.d.ts +12 -0
- package/lib/context/policy.d.ts.map +1 -1
- package/lib/context/policy.js +22 -4
- package/lib/context/policy.js.map +1 -1
- package/lib/index.d.ts +50 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +46 -1
- package/lib/index.js.map +1 -1
- package/lib/notes/cleanup.d.ts +7 -1
- package/lib/notes/cleanup.d.ts.map +1 -1
- package/lib/notes/cleanup.js +17 -12
- package/lib/notes/cleanup.js.map +1 -1
- package/lib/notes/index.d.ts +3 -1
- package/lib/notes/index.d.ts.map +1 -1
- package/lib/notes/index.js +8 -3
- package/lib/notes/index.js.map +1 -1
- package/lib/notes/scope.d.ts +5 -5
- package/lib/notes/scope.js +5 -5
- package/lib/remote/index.d.ts +67 -6
- package/lib/remote/index.d.ts.map +1 -1
- package/lib/remote/index.js +94 -9
- package/lib/remote/index.js.map +1 -1
- package/lib/remote/typert.remote-client.d.ts +8 -1
- package/lib/remote/typert.remote-client.js +6 -0
- package/lib/remote/types.d.ts +1 -1
- package/lib/remote/types.d.ts.map +1 -1
- package/lib/review/accumulator.d.ts +1 -1
- package/lib/review/accumulator.js +1 -1
- package/lib/review/consolidate.d.ts +230 -0
- package/lib/review/consolidate.d.ts.map +1 -0
- package/lib/review/consolidate.js +435 -0
- package/lib/review/consolidate.js.map +1 -0
- package/lib/review/dedup.d.ts +23 -15
- package/lib/review/dedup.d.ts.map +1 -1
- package/lib/review/dedup.js +34 -83
- package/lib/review/dedup.js.map +1 -1
- package/lib/review/extract.d.ts +63 -12
- package/lib/review/extract.d.ts.map +1 -1
- package/lib/review/extract.js +168 -31
- package/lib/review/extract.js.map +1 -1
- package/lib/review/index.d.ts +20 -0
- package/lib/review/index.d.ts.map +1 -1
- package/lib/review/index.js +68 -16
- package/lib/review/index.js.map +1 -1
- package/lib/review/sweep.d.ts +171 -0
- package/lib/review/sweep.d.ts.map +1 -0
- package/lib/review/sweep.js +310 -0
- package/lib/review/sweep.js.map +1 -0
- package/lib/scanner.d.ts +2 -0
- package/lib/scanner.d.ts.map +1 -1
- package/lib/scanner.js +22 -0
- package/lib/scanner.js.map +1 -1
- package/lib/store/bm25.d.ts +75 -1
- package/lib/store/bm25.d.ts.map +1 -1
- package/lib/store/bm25.js +162 -17
- package/lib/store/bm25.js.map +1 -1
- package/lib/store/cross-process.d.ts +155 -0
- package/lib/store/cross-process.d.ts.map +1 -0
- package/lib/store/cross-process.js +254 -0
- package/lib/store/cross-process.js.map +1 -0
- package/lib/store/index.d.ts +199 -9
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +652 -92
- package/lib/store/index.js.map +1 -1
- package/lib/store/sqlite.d.ts +126 -0
- package/lib/store/sqlite.d.ts.map +1 -0
- package/lib/store/sqlite.js +653 -0
- package/lib/store/sqlite.js.map +1 -0
- package/lib/tool/index.d.ts +17 -5
- package/lib/tool/index.d.ts.map +1 -1
- package/lib/tool/index.js +253 -21
- package/lib/tool/index.js.map +1 -1
- package/lib/types.d.ts +81 -2
- package/lib/types.d.ts.map +1 -1
- package/package.json +18 -3
package/README.i18n.yaml
ADDED
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
This is a **self-contained single package** (not a multi-package workspace). It depends on dsh core services as **peer dependencies** (provided by the dsh installation you already have) and ships its own `cordis.patch.yml` so `dsh plugin add` activates it as one profile layer.
|
|
6
6
|
|
|
7
|
-
**English** | [简体中文](README.zh
|
|
7
|
+
**English** | [简体中文](README.zh.md)
|
|
8
8
|
|
|
9
9
|
## Interactive Deep-Dive
|
|
10
10
|
|
|
@@ -34,8 +34,8 @@ Your dsh agent normally forgets everything when you close a session. This bundle
|
|
|
34
34
|
|
|
35
35
|
- **Persistent memory** — facts, preferences, and conventions stored in a durable KV backend with audit logging.
|
|
36
36
|
- **Three-layer scoping** — `global` (cross-project), `project` (per-repo, auto-detected), and `user` (cross-project profile).
|
|
37
|
-
- **
|
|
38
|
-
- **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 (
|
|
37
|
+
- **Nine model-facing tools** — `memory_search`, `memory_add`, `memory_replace`, `memory_remove`, `memory_list`, `memory_get`, `memory_pin`, `memory_unpin`, `memory_forget`.
|
|
38
|
+
- **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)).
|
|
39
39
|
- **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.
|
|
40
40
|
- **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 in the Memory settings UI, and upgrades automatically clean up notes files left by ≤0.5.x installs.
|
|
41
41
|
- **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.
|
|
@@ -223,7 +223,7 @@ Every namespace resolves in layers: schema defaults → the composition `config:
|
|
|
223
223
|
|
|
224
224
|
| Setting | Default | Meaning |
|
|
225
225
|
|---|---|---|
|
|
226
|
-
| `memoryMode` | `
|
|
226
|
+
| `memoryMode` | `index` | `full`: inject memory content + guidance. `policy-only`: inject guidance only, model searches on demand. `custom`: inject user-defined policy text. `off`: no injection. `index`: inject an existence index (one line per entry) so the model can see what is stored and route to `memory_get`/`memory_search`. |
|
|
227
227
|
| `memoryPolicyCustomText` | — | Custom policy text used when `memoryMode` is `custom`. |
|
|
228
228
|
| `memoryCharLimit` | `5000` | Character budget for the frozen per-session memory snapshot injected in `full` mode (`0` = no content). |
|
|
229
229
|
| `memoryMaxEntries` | `20` | Entry-count cap for the same frozen snapshot (`0` = no limit). The snapshot ends with a `≈N tokens` estimate so injection cost stays visible. |
|
|
@@ -267,7 +267,7 @@ memory:
|
|
|
267
267
|
maxSearchResults: 100
|
|
268
268
|
```
|
|
269
269
|
|
|
270
|
-
By default, extraction, judging, and curation use the **same model the user is chatting with** — the session's provider/model route. To run them on a dedicated cheaper model, set `extractionModelProvider` and `extractionModelModel` (in the composition config or the UI — the UI offers dropdowns fed by the host model catalog):
|
|
270
|
+
By default, extraction, judging, and curation use the **same model the user is chatting with** — the session's provider/model route. To run them on a dedicated cheaper model, set `extractionModelProvider` and `extractionModelModel` (in the composition config or the UI — the UI offers dropdowns fed by the host model catalog). Naming a provider here sends conversation excerpts and stored entries to it, so pick one you trust with conversation content; leaving both empty adds no data path beyond the model you are already talking to:
|
|
271
271
|
|
|
272
272
|
```yaml
|
|
273
273
|
memory-review:
|
|
@@ -280,7 +280,7 @@ Example `$DSH_HOME/settings.yaml` (both namespaces):
|
|
|
280
280
|
|
|
281
281
|
```yaml
|
|
282
282
|
memory:
|
|
283
|
-
memoryMode:
|
|
283
|
+
memoryMode: index
|
|
284
284
|
memoryPolicyCustomText: ""
|
|
285
285
|
memoryCharLimit: 5000
|
|
286
286
|
memoryMaxEntries: 20
|
|
@@ -340,8 +340,8 @@ The bundle inserts seven rows over `dsh-base`, each pointing at this package's o
|
|
|
340
340
|
| Row | Export | Role |
|
|
341
341
|
|---|---|---|
|
|
342
342
|
| `memory-root` | `@chenhw7/dsh-memory` | No-op root entry for client-module scanner discovery |
|
|
343
|
-
| `memory-store` | `@chenhw7/dsh-memory/store` | Opens the `memory` domain (entries + audit + suggestion-queue tables), registers `ctx.memory` (BM25 search + two-tier decay) |
|
|
344
|
-
| `tool-memory` | `@chenhw7/dsh-memory/tool` |
|
|
343
|
+
| `memory-store` | `@chenhw7/dsh-memory/store` | Opens the `memory` domain (entries + audit + suggestion-queue + meta tables), registers `ctx.memory` (BM25 search + two-tier decay) |
|
|
344
|
+
| `tool-memory` | `@chenhw7/dsh-memory/tool` | Nine model-facing tools (confirm-mode writes queue as proposals) |
|
|
345
345
|
| `memory-review` | `@chenhw7/dsh-memory/review` | Automatic extraction (projection + failure-streak pitfalls + flush + dedup + janitor + curator + human-review queue) and the `memory-review` settings namespace |
|
|
346
346
|
| `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 |
|
|
347
347
|
| `memory-context` | `@chenhw7/dsh-memory/context` | System-prompt injection (`memory` @90 + `project-notes` @91), step-level auto recall, owns the `memory` settings namespace |
|
|
@@ -369,6 +369,7 @@ The bundle inserts seven rows over `dsh-base`, each pointing at this package's o
|
|
|
369
369
|
- **No semantic/vector retrieval** — `memory_search` is BM25 lexical ranking over structured KV entries (Latin word tokens, CJK unigrams + bigrams), not embeddings; synonyms that share no tokens will not match.
|
|
370
370
|
- **Extraction quality tracks the session model** — review/flush/curator reuse the session's routed provider/model unless explicitly overridden.
|
|
371
371
|
- **Mid-session extractions stay out of the prompt until the next compaction or session** — the injected snapshot is frozen for KV-cache stability; step-level auto recall (opt-in) covers per-step freshness instead.
|
|
372
|
+
- **Memory read/write is gated only at the transport layer** — the management UI's RPC methods carry no per-method authorization, so any host the dsh host admits through its `trustedHosts` setting can read and write the whole memory store, and written content reaches later sessions' system prompts. Keep the fence at loopback unless every admitted host is trusted ([threat model](docs/TECH_DESIGN.md)).
|
|
372
373
|
- **dsh is in developer preview** — breaking changes are expected; this bundle's peer dependency ranges track the dsh release line.
|
|
373
374
|
- **Alpha channel (0.1.2-alpha.x) required** — the bundle uses the 0.1.2-alpha settings API (`ctx.settings.installSection`, host-only projection registrations) and declares `^0.1.2-alpha.2` peers. The rc (`next`) line still ships the removed module-level `installSettingsSection` helper and cannot load this bundle; install dsh from the `alpha` dist-tag. The client bundle likewise targets the alpha client packages (`@deepseek-ai/dsh-client-store` / `dsh-client-ui-settings`), which replaced the removed `dsh-client-runtime`.
|
|
374
375
|
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
|
|
32
32
|
- **持久化记忆** — 将事实、偏好和约定存储在持久的 KV 后端中,带审计日志。
|
|
33
33
|
- **三层作用域** — `global`(跨项目)、`project`(按仓库自动检测)、`user`(跨项目 profile)。
|
|
34
|
-
-
|
|
35
|
-
- **BM25 相关性检索** — 零依赖的 Okapi BM25,CJK 感知分词(Latin 逐词;CJK 一元 + 相邻二元 bigram),固定(pin)条目在同等相关时优先靠前。检索质量不是玄学:固定 golden set(
|
|
34
|
+
- **九个模型可用工具** — `memory_search`、`memory_add`、`memory_replace`、`memory_remove`、`memory_list`、`memory_get`、`memory_pin`、`memory_unpin`、`memory_forget`。
|
|
35
|
+
- **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))。
|
|
36
36
|
- **自动学习** — 投影累加器观察对话中的显式记忆意图、修正语句以及*已验证的失败序列*(同签名连续失败后最终成功),候选足够多时运行 LLM 提取。准入规则排除一切"仓库已记录的内容"(代码结构、git 历史、已修复 bug 的经过),模型手写的日期前缀会被剥离,时间戳永远由程序盖戳。
|
|
37
37
|
- **项目笔记 prompt 段落** — 编码约定与踩坑日志渲染进每次会话的 system prompt(`project-notes` 段)。不向仓库写入任何文件:记忆完全保存在 host 侧存储中,在 Memory 设置 UI 里管理;升级时自动清理 ≤0.5.x 留下的笔记文件。
|
|
38
38
|
- **去重管线** — 两阶段去重(停用词过滤的 Jaccard 预过滤 + 可选 LLM 裁决,合并长度有上限),防止近似重复条目累积;低频 curator pass 会将过长条目改写为简洁单行。
|
|
@@ -220,7 +220,7 @@ dsh web
|
|
|
220
220
|
|
|
221
221
|
| 设置 | 默认值 | 说明 |
|
|
222
222
|
|---|---|---|
|
|
223
|
-
| `memoryMode` | `
|
|
223
|
+
| `memoryMode` | `index` | `full`:注入记忆内容 + 指引;`policy-only`:只注入指引,模型按需搜索;`custom`:注入用户自定义策略文本;`off`:不注入;`index`:注入存在性索引(每个条目一行),模型可看见存了什么并路由到 `memory_get`/`memory_search`。 |
|
|
224
224
|
| `memoryPolicyCustomText` | — | 当 `memoryMode` 为 `custom` 时使用的自定义策略文本。 |
|
|
225
225
|
| `memoryCharLimit` | `5000` | 会话内冻结记忆快照注入 `full` 模式时的字符预算(`0` = 不注入内容)。 |
|
|
226
226
|
| `memoryMaxEntries` | `20` | 同一冻结快照的条目数上限(`0` = 无限制)。快照尾部附 `≈N tokens` 估算,注入成本始终可见。 |
|
|
@@ -264,7 +264,7 @@ memory:
|
|
|
264
264
|
maxSearchResults: 100
|
|
265
265
|
```
|
|
266
266
|
|
|
267
|
-
默认情况下,提取、去重裁决和 curation 使用**与用户对话相同的模型**——即会话的 provider/model 路由。若要在专用廉价模型上运行,设置 `extractionModelProvider` 和 `extractionModelModel`(在组合配置或 UI 中均可——UI
|
|
267
|
+
默认情况下,提取、去重裁决和 curation 使用**与用户对话相同的模型**——即会话的 provider/model 路由。若要在专用廉价模型上运行,设置 `extractionModelProvider` 和 `extractionModelModel`(在组合配置或 UI 中均可——UI 提供由宿主模型目录驱动的下拉框)。在此指定 provider 会把对话摘录与已存条目发送给它,因此请选择你愿意托付对话内容的一方;两者留空则不会新增任何数据通路,只用你本来就在对话的模型:
|
|
268
268
|
|
|
269
269
|
```yaml
|
|
270
270
|
memory-review:
|
|
@@ -277,7 +277,7 @@ memory-review:
|
|
|
277
277
|
|
|
278
278
|
```yaml
|
|
279
279
|
memory:
|
|
280
|
-
memoryMode:
|
|
280
|
+
memoryMode: index
|
|
281
281
|
memoryPolicyCustomText: ""
|
|
282
282
|
memoryCharLimit: 5000
|
|
283
283
|
memoryMaxEntries: 20
|
|
@@ -337,8 +337,8 @@ memory:
|
|
|
337
337
|
| 行 | 导出 | 作用 |
|
|
338
338
|
|---|---|---|
|
|
339
339
|
| `memory-root` | `@chenhw7/dsh-memory` | 无操作根条目,供 client-module 扫描器发现 |
|
|
340
|
-
| `memory-store` | `@chenhw7/dsh-memory/store` | 打开 `memory` 域(entries + audit +
|
|
341
|
-
| `tool-memory` | `@chenhw7/dsh-memory/tool` |
|
|
340
|
+
| `memory-store` | `@chenhw7/dsh-memory/store` | 打开 `memory` 域(entries + audit + 待确认队列 + meta 四张表),注册 `ctx.memory`(BM25 检索 + 两层衰减) |
|
|
341
|
+
| `tool-memory` | `@chenhw7/dsh-memory/tool` | 九个模型可用工具(人审模式下写入改为入队) |
|
|
342
342
|
| `memory-review` | `@chenhw7/dsh-memory/review` | 自动提取(投影 + 失败序列踩坑 + flush + 去重 + janitor + curator + 人审队列),持有 `memory-review` 设置命名空间 |
|
|
343
343
|
| `memory-notes` | `@chenhw7/dsh-memory/notes` | 项目笔记 prompt 投影(渲染约定/踩坑进 `project-notes` 段落;0.6 起不写仓库文件),注册 `ctx.projectNotes`;会话创建时清理 ≤0.5.x 的文件导出残留 |
|
|
344
344
|
| `memory-context` | `@chenhw7/dsh-memory/context` | 系统提示注入(`memory` @90 + `project-notes` @91)、步级自动召回,持有 `memory` 设置命名空间 |
|
|
@@ -366,6 +366,7 @@ memory:
|
|
|
366
366
|
- **无语义/向量检索** — `memory_search` 是对结构化 KV 条目的 BM25 词法排序(Latin 逐词、CJK 一元 + 二元分词),不是 embeddings;不含相同词元的同义表述无法命中。
|
|
367
367
|
- **提取质量跟随会话模型** — review/flush/curator 复用会话当前路由的 provider/model,除非显式覆盖。
|
|
368
368
|
- **会话中途的提取在下次压缩或新会话前不会出现在提示里** — 注入快照为 KV-cache 稳定性而冻结;步级自动召回(可选)提供逐步新鲜度。
|
|
369
|
+
- **记忆的读写只在传输层设闸** — 管理 UI 的 RPC 方法没有方法级鉴权,因此任何被 dsh 宿主 `trustedHosts` 放行的主机都能读写整个记忆库,而写入的内容会进入后续会话的 system prompt。除非放行的每台主机都可信,否则把围栏保持在 loopback(见[威胁模型](docs/TECH_DESIGN.zh.md))。
|
|
369
370
|
- **dsh 仍处于开发者预览阶段** — 可能会有破坏性变更;本 bundle 的 peer dependency 范围跟随 dsh 发布线。
|
|
370
371
|
- **要求 alpha 渠道(0.1.2-alpha.x)** — 本 bundle 使用 0.1.2-alpha 的 settings API(`ctx.settings.installSection`、host-only 投影注册),peer 范围为 `^0.1.2-alpha.2`。rc(`next`)线仍是旧的模块级 `installSettingsSection` helper,无法加载本 bundle;请从 `alpha` dist-tag 安装 dsh。client bundle 同样对齐 alpha 客户端包(`@deepseek-ai/dsh-client-store` / `dsh-client-ui-settings`),它们取代了已移除的 `dsh-client-runtime`。
|
|
371
372
|
|
package/cordis.patch.yml
CHANGED
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
- id: memory-context
|
|
45
45
|
name: '@chenhw7/dsh-memory/context'
|
|
46
46
|
|
|
47
|
-
# @Remote service for the memory management UI (§
|
|
47
|
+
# @Remote service for the memory management UI (§7.7). The write switch
|
|
48
|
+
# defaults to false (deny by default — see the remote-write-guard Agent
|
|
49
|
+
# Note); this deployment drives the management UI, so it opts in here.
|
|
48
50
|
- id: memory-remote
|
|
49
51
|
name: '@chenhw7/dsh-memory/remote-service'
|
|
52
|
+
config:
|
|
53
|
+
remoteWritesEnabled: true
|
package/lib/benchmark/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Recall evaluation baseline (P1-4) and injection-cost comparison (P1-8).
|
|
3
3
|
*
|
|
4
|
-
* A fixed golden-set fixture —
|
|
5
|
-
* scopes (English + CJK
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* (tokenization, weights, budgets) must
|
|
4
|
+
* A fixed golden-set fixture — 35 topically distinct entries across the three
|
|
5
|
+
* scopes (English + CJK; the original 24 plus the wave-3 synonym and inflection
|
|
6
|
+
* slices) with 35 known relevant queries — turns "the retrieval is strong"
|
|
7
|
+
* from a structural claim into numbers: precision@k, recall@k, and MRR over
|
|
8
|
+
* the shipping BM25 search, plus per-mode standing injection cost (characters
|
|
9
|
+
* ≈ tokens). Any future retrieval change (tokenization, weights, budgets) must
|
|
10
|
+
* run against this baseline first.
|
|
10
11
|
*
|
|
11
12
|
* Pure module: builds its own store-shaped searcher via a callback, so both
|
|
12
13
|
* the real DomainMemoryStore (spec) and offline copies can be evaluated.
|
|
@@ -35,12 +36,28 @@ export interface GoldenCase {
|
|
|
35
36
|
* The fixed memory fixture. Entries are deliberately topically separated so
|
|
36
37
|
* BM25 can discriminate them; several share a few decoy tokens (e.g. two
|
|
37
38
|
* entries mention 端口/port) to keep precision honest.
|
|
39
|
+
*
|
|
40
|
+
* Fixture growth history: the original 24 entries (g1–g8, p1–p8, u1–u8) are
|
|
41
|
+
* topically disjoint with keyword-style queries — they measure "can find",
|
|
42
|
+
* not synonym/inflection behavior. Wave-3 retrieval work (conservative Latin
|
|
43
|
+
* stemming, summary indexing) needed adversarial cases, so two groups were
|
|
44
|
+
* APPENDED without touching the original block:
|
|
45
|
+
* - synonym/paraphrase pairs (s1–s4b): the query words never appear verbatim
|
|
46
|
+
* in the entry — recall comes only from the summary field, which is why
|
|
47
|
+
* summary indexing is load-bearing for this slice; s4/s4b are a mirrored
|
|
48
|
+
* pair (zh content + en summary / en content + zh summary) that also pins
|
|
49
|
+
* the summary path's cross-language direction;
|
|
50
|
+
* - Latin inflection pairs (f1–f4): query and content share a stem but not a
|
|
51
|
+
* surface form (test/tests/testing, configure/configuration, build/builds,
|
|
52
|
+
* deploy/deployment) — these miss without conservative stemming.
|
|
38
53
|
*/
|
|
39
54
|
export declare const GOLDEN_ENTRIES: readonly GoldenEntry[];
|
|
40
55
|
/**
|
|
41
56
|
* The golden query table: each query names exactly the entries a correct
|
|
42
57
|
* search must return within the top-k. Queries mix keyword style ("redis
|
|
43
|
-
* 缓存")
|
|
58
|
+
* 缓存"), question style ("数据库迁移什么时候执行"), synonym paraphrase
|
|
59
|
+
* ("凭据 怎么 管理" for the secrets entry), and Latin inflections
|
|
60
|
+
* ("unit tests 怎么跑" against "Component tests ... vitest").
|
|
44
61
|
*/
|
|
45
62
|
export declare const GOLDEN_CASES: readonly GoldenCase[];
|
|
46
63
|
/** Minimal search face the evaluator needs (satisfied by MemoryStore.search). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/benchmark/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/benchmark/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,wEAAwE;AACxE,MAAM,WAAW,WAAW;IAC1B,kDAAkD;IAClD,QAAQ,CAAC,EAAE,EAAE,M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,CAAA;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAC3B,eAAe,EAAE,MAAM,EACvB,IAAI,GAAE;IAAE,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,GAC3D,aAAa,CAQf;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAGzD"}
|
package/lib/benchmark/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Recall evaluation baseline (P1-4) and injection-cost comparison (P1-8).
|
|
3
3
|
*
|
|
4
|
-
* A fixed golden-set fixture —
|
|
5
|
-
* scopes (English + CJK
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* (tokenization, weights, budgets) must
|
|
4
|
+
* A fixed golden-set fixture — 35 topically distinct entries across the three
|
|
5
|
+
* scopes (English + CJK; the original 24 plus the wave-3 synonym and inflection
|
|
6
|
+
* slices) with 35 known relevant queries — turns "the retrieval is strong"
|
|
7
|
+
* from a structural claim into numbers: precision@k, recall@k, and MRR over
|
|
8
|
+
* the shipping BM25 search, plus per-mode standing injection cost (characters
|
|
9
|
+
* ≈ tokens). Any future retrieval change (tokenization, weights, budgets) must
|
|
10
|
+
* run against this baseline first.
|
|
10
11
|
*
|
|
11
12
|
* Pure module: builds its own store-shaped searcher via a callback, so both
|
|
12
13
|
* the real DomainMemoryStore (spec) and offline copies can be evaluated.
|
|
@@ -17,6 +18,20 @@
|
|
|
17
18
|
* The fixed memory fixture. Entries are deliberately topically separated so
|
|
18
19
|
* BM25 can discriminate them; several share a few decoy tokens (e.g. two
|
|
19
20
|
* entries mention 端口/port) to keep precision honest.
|
|
21
|
+
*
|
|
22
|
+
* Fixture growth history: the original 24 entries (g1–g8, p1–p8, u1–u8) are
|
|
23
|
+
* topically disjoint with keyword-style queries — they measure "can find",
|
|
24
|
+
* not synonym/inflection behavior. Wave-3 retrieval work (conservative Latin
|
|
25
|
+
* stemming, summary indexing) needed adversarial cases, so two groups were
|
|
26
|
+
* APPENDED without touching the original block:
|
|
27
|
+
* - synonym/paraphrase pairs (s1–s4b): the query words never appear verbatim
|
|
28
|
+
* in the entry — recall comes only from the summary field, which is why
|
|
29
|
+
* summary indexing is load-bearing for this slice; s4/s4b are a mirrored
|
|
30
|
+
* pair (zh content + en summary / en content + zh summary) that also pins
|
|
31
|
+
* the summary path's cross-language direction;
|
|
32
|
+
* - Latin inflection pairs (f1–f4): query and content share a stem but not a
|
|
33
|
+
* surface form (test/tests/testing, configure/configuration, build/builds,
|
|
34
|
+
* deploy/deployment) — these miss without conservative stemming.
|
|
20
35
|
*/
|
|
21
36
|
export const GOLDEN_ENTRIES = [
|
|
22
37
|
// ── global (8) ──
|
|
@@ -45,11 +60,31 @@ export const GOLDEN_ENTRIES = [
|
|
|
45
60
|
{ id: 'u6', scope: 'user', content: 'The user dislikes emoji anywhere in commit messages or changelogs' },
|
|
46
61
|
{ id: 'u7', scope: 'user', content: '用户偏好 vim 键位绑定,编辑器与终端都保持一致', category: 'preference' },
|
|
47
62
|
{ id: 'u8', scope: 'user', content: 'Morning standup notes are posted to the team wiki page before ten' },
|
|
63
|
+
// ── synonym/paraphrase slice (s1–s6) ──
|
|
64
|
+
// The query's own words never appear in the content; only the human-written
|
|
65
|
+
// summary carries the query vocabulary. These cases are the acceptance
|
|
66
|
+
// signal for summary indexing: before it, the whole slice misses.
|
|
67
|
+
{ id: 's1', scope: 'global', content: '始终先在分支上完成改动,确认流水线通过后再合入主干', summary: '代码合并策略:合并前必须通过 CI 检查', category: 'procedure' },
|
|
68
|
+
{ id: 's2', scope: 'global', content: 'Secrets are injected at runtime; never bake credentials into image layers', summary: '凭据管理:禁止把密钥写进镜像', category: 'convention' },
|
|
69
|
+
{ id: 's3', scope: 'project', projectName: 'demo-repo', content: 'The checkout flow talks to the payments adapter over the internal gateway', summary: '订单支付走内部网关的 payments 服务', category: 'insight' },
|
|
70
|
+
{ id: 's4', scope: 'project', projectName: 'demo-repo', content: 'Cache invalidation happens on the write path, not on a TTL clock', summary: '缓存失效由写路径主动触发而非到期', category: 'insight' },
|
|
71
|
+
{ id: 's4b', scope: 'project', projectName: 'demo-repo', content: '缓存键带构建哈希,发布后自动整体刷新', summary: 'Cache entries expire by build hash, invalidating wholesale on deploy', category: 'insight' },
|
|
72
|
+
{ id: 's5', scope: 'user', content: '用户喜欢在解释里穿插真实代码片段,而不是纯文字描述', summary: '讲解风格:多贴示例代码少空谈', category: 'preference' },
|
|
73
|
+
{ id: 's6', scope: 'user', content: '用户不希望助手重复确认已经明确过的决定', summary: '不要反复追问已拍板的事项', category: 'preference' },
|
|
74
|
+
// ── Latin inflection slice (f1–f4) ──
|
|
75
|
+
// Query and content share a stem but never a surface token — conservative
|
|
76
|
+
// suffix stemming (s/es/ies, ed, ing) is what makes them hit.
|
|
77
|
+
{ id: 'f1', scope: 'global', content: 'Component tests run through vitest with jsdom enabled', summary: '组件层的 testing 由 vitest 承担', category: 'convention' },
|
|
78
|
+
{ id: 'f2', scope: 'project', projectName: 'demo-repo', content: 'A fresh clone needs one command to configure the local environment', summary: '克隆后第一步是 configuration 脚本', category: 'procedure' },
|
|
79
|
+
{ id: 'f3', scope: 'project', projectName: 'demo-repo', content: 'The release pipeline builds artifacts then signs them with cosign', summary: '发版流程:先 builds 再签名', category: 'procedure' },
|
|
80
|
+
{ id: 'f4', scope: 'user', content: '用户要求每次改动都附带回滚方案,防止部署失败无法恢复', summary: 'deploy 前必须准备 rollback 预案', category: 'preference' },
|
|
48
81
|
];
|
|
49
82
|
/**
|
|
50
83
|
* The golden query table: each query names exactly the entries a correct
|
|
51
84
|
* search must return within the top-k. Queries mix keyword style ("redis
|
|
52
|
-
* 缓存")
|
|
85
|
+
* 缓存"), question style ("数据库迁移什么时候执行"), synonym paraphrase
|
|
86
|
+
* ("凭据 怎么 管理" for the secrets entry), and Latin inflections
|
|
87
|
+
* ("unit tests 怎么跑" against "Component tests ... vitest").
|
|
53
88
|
*/
|
|
54
89
|
export const GOLDEN_CASES = [
|
|
55
90
|
{ query: 'package manager preference pnpm', relevant: ['g1'], lang: 'en' },
|
|
@@ -76,6 +111,19 @@ export const GOLDEN_CASES = [
|
|
|
76
111
|
{ query: 'emoji commit messages dislike', relevant: ['u6'], lang: 'en' },
|
|
77
112
|
{ query: 'vim 键位 编辑器 偏好', relevant: ['u7'], lang: 'zh' },
|
|
78
113
|
{ query: 'standup notes where posted morning wiki', relevant: ['u8'], lang: 'en' },
|
|
114
|
+
// ── synonym/paraphrase slice: query vocabulary lives only in the summary ──
|
|
115
|
+
{ query: '合并代码 前 检查 通过', relevant: ['s1'], lang: 'zh' },
|
|
116
|
+
{ query: '镜像 里 能不能 放 密码 凭据', relevant: ['s2'], lang: 'zh' },
|
|
117
|
+
{ query: '支付 请求 走 哪个 网关', relevant: ['s3'], lang: 'zh' },
|
|
118
|
+
{ query: 'cache expiry invalidation behavior', relevant: ['s4'], lang: 'en' },
|
|
119
|
+
{ query: '缓存 什么时候 过期 失效', relevant: ['s4b'], lang: 'zh' },
|
|
120
|
+
{ query: '讲解 风格 要不要 贴 代码', relevant: ['s5'], lang: 'zh' },
|
|
121
|
+
{ query: '已经 决定 的事 别 再问', relevant: ['s6'], lang: 'zh' },
|
|
122
|
+
// ── Latin inflection slice: stem shared, surface form different ──
|
|
123
|
+
{ query: 'unit tests 组件层 怎么 跑', relevant: ['f1'], lang: 'zh' },
|
|
124
|
+
{ query: 'new clone configuring steps', relevant: ['f2'], lang: 'en' },
|
|
125
|
+
{ query: 'release builds signing artifacts', relevant: ['f3'], lang: 'en' },
|
|
126
|
+
{ query: 'deployment 回滚 预案 要求', relevant: ['f4'], lang: 'zh' },
|
|
79
127
|
];
|
|
80
128
|
function sliceStats(perCase, k) {
|
|
81
129
|
if (perCase.length === 0)
|
|
@@ -1 +1 @@
|
|
|
1
|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CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAA;AACrK,CAAC"}
|
package/lib/client/index.js
CHANGED
|
@@ -528,7 +528,7 @@ function TextareaField(props) {
|
|
|
528
528
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
529
529
|
var MODES = ["policy-only", "full", "index", "custom", "off"];
|
|
530
530
|
var DEFAULTS = {
|
|
531
|
-
memoryMode: "
|
|
531
|
+
memoryMode: "index",
|
|
532
532
|
memoryPolicyCustomText: "",
|
|
533
533
|
memoryCharLimit: 5e3,
|
|
534
534
|
memoryMaxEntries: 20,
|
|
@@ -1012,17 +1012,31 @@ var MemorySectionController = class {
|
|
|
1012
1012
|
...edits.summary !== void 0 ? { summary: edits.summary ?? "" } : {}
|
|
1013
1013
|
});
|
|
1014
1014
|
if (!response.result.ok) return { ok: false, message: response.result.error.message };
|
|
1015
|
-
if (!response.result.value.found) return { ok: false, message: "entry vanished before it could be saved" };
|
|
1015
|
+
if (!response.result.value.found) return { ok: false, message: response.result.value.error ?? "entry vanished before it could be saved" };
|
|
1016
1016
|
await this.refreshAfterMutation();
|
|
1017
1017
|
return { ok: true };
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Fetch one entry's unredacted content through the break-glass `getRaw`
|
|
1022
|
+
* RPC (audit-logged server-side). Returns undefined when the entry is gone
|
|
1023
|
+
* or the read fails — the editor keeps the redacted draft either way.
|
|
1024
|
+
*/
|
|
1025
|
+
async loadRawContent(id) {
|
|
1026
|
+
try {
|
|
1027
|
+
const response = await this.requireApi().getRaw({ id });
|
|
1028
|
+
if (!response.result.ok) return void 0;
|
|
1029
|
+
return response.result.value.entry?.content;
|
|
1030
|
+
} catch {
|
|
1031
|
+
return void 0;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1020
1034
|
/** Delete one entry after the component-level confirmation. */
|
|
1021
1035
|
async deleteEntry(id) {
|
|
1022
1036
|
return this.act(async (api) => {
|
|
1023
1037
|
const response = await api.removeEntry({ id });
|
|
1024
1038
|
if (!response.result.ok) return { ok: false, message: response.result.error.message };
|
|
1025
|
-
if (!response.result.value.removed) return { ok: false, message: "entry was already gone" };
|
|
1039
|
+
if (!response.result.value.removed) return { ok: false, message: response.result.value.error ?? "entry was already gone" };
|
|
1026
1040
|
await this.refreshAfterMutation();
|
|
1027
1041
|
return { ok: true };
|
|
1028
1042
|
});
|
|
@@ -1032,7 +1046,7 @@ var MemorySectionController = class {
|
|
|
1032
1046
|
return this.act(async (api) => {
|
|
1033
1047
|
const response = await api.pin({ id: entry.id, pinned: entry.pinned !== true });
|
|
1034
1048
|
if (!response.result.ok) return { ok: false, message: response.result.error.message };
|
|
1035
|
-
if (!response.result.value.found) return { ok: false, message: "entry was already gone" };
|
|
1049
|
+
if (!response.result.value.found) return { ok: false, message: response.result.value.error ?? "entry was already gone" };
|
|
1036
1050
|
await this.refreshAfterMutation();
|
|
1037
1051
|
return { ok: true };
|
|
1038
1052
|
});
|
|
@@ -1042,7 +1056,7 @@ var MemorySectionController = class {
|
|
|
1042
1056
|
return this.act(async (api) => {
|
|
1043
1057
|
const response = await api.archive({ id: entry.id, archived: entry.staleSince === void 0 });
|
|
1044
1058
|
if (!response.result.ok) return { ok: false, message: response.result.error.message };
|
|
1045
|
-
if (!response.result.value.found) return { ok: false, message: "entry was already gone" };
|
|
1059
|
+
if (!response.result.value.found) return { ok: false, message: response.result.value.error ?? "entry was already gone" };
|
|
1046
1060
|
await this.refreshAfterMutation();
|
|
1047
1061
|
return { ok: true };
|
|
1048
1062
|
});
|
|
@@ -1068,7 +1082,7 @@ var MemorySectionController = class {
|
|
|
1068
1082
|
...edits?.category !== void 0 && edits.category !== "" ? { category: edits.category } : {}
|
|
1069
1083
|
});
|
|
1070
1084
|
if (!response.result.ok) return { ok: false, message: response.result.error.message };
|
|
1071
|
-
if (!response.result.value.found) return { ok: false, message: "proposal was already decided" };
|
|
1085
|
+
if (!response.result.value.found) return { ok: false, message: response.result.value.error ?? "proposal was already decided" };
|
|
1072
1086
|
return { ok: true };
|
|
1073
1087
|
});
|
|
1074
1088
|
if (done) {
|
|
@@ -1082,7 +1096,7 @@ var MemorySectionController = class {
|
|
|
1082
1096
|
const done = await this.act(async (api) => {
|
|
1083
1097
|
const response = await api.suggestReject({ id });
|
|
1084
1098
|
if (!response.result.ok) return { ok: false, message: response.result.error.message };
|
|
1085
|
-
return
|
|
1099
|
+
return response.result.value.rejected ? { ok: true } : { ok: false, message: response.result.value.error ?? "proposal was already decided" };
|
|
1086
1100
|
});
|
|
1087
1101
|
if (done) this.set({ pending: this.store.getSnapshot().pending.filter((s) => s.id !== id), actionError: null });
|
|
1088
1102
|
return done;
|
|
@@ -1574,8 +1588,18 @@ function emptyKeyOf(state) {
|
|
|
1574
1588
|
return "emptyAll";
|
|
1575
1589
|
}
|
|
1576
1590
|
function EntryEditor(props) {
|
|
1577
|
-
const { entry, translate, onSave, onCancel } = props;
|
|
1591
|
+
const { entry, translate, loadRaw, onSave, onCancel } = props;
|
|
1578
1592
|
const [draftContent, setDraftContent] = (0, import_react2.useState)(entry.content);
|
|
1593
|
+
(0, import_react2.useEffect)(() => {
|
|
1594
|
+
let alive = true;
|
|
1595
|
+
loadRaw(entry.id).then((raw) => {
|
|
1596
|
+
if (alive && raw !== void 0) setDraftContent(raw);
|
|
1597
|
+
}).catch(() => {
|
|
1598
|
+
});
|
|
1599
|
+
return () => {
|
|
1600
|
+
alive = false;
|
|
1601
|
+
};
|
|
1602
|
+
}, [entry.id, loadRaw]);
|
|
1579
1603
|
const [draftCategory, setDraftCategory] = (0, import_react2.useState)(entry.category ?? NO_CATEGORY);
|
|
1580
1604
|
const [draftSummary, setDraftSummary] = (0, import_react2.useState)(entry.summary ?? "");
|
|
1581
1605
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: css2.editForm, children: [
|
|
@@ -1644,7 +1668,7 @@ function EntryEditor(props) {
|
|
|
1644
1668
|
] });
|
|
1645
1669
|
}
|
|
1646
1670
|
function EntryRow(props) {
|
|
1647
|
-
const { entry, expanded, staleLabel, staleHint, pinnedLabel, neverRecalledLabel, scopeLabels, translate, onToggle, onSaveEdits, onDelete, onTogglePin, onToggleArchive } = props;
|
|
1671
|
+
const { entry, expanded, staleLabel, staleHint, pinnedLabel, neverRecalledLabel, scopeLabels, translate, onToggle, loadRaw, onSaveEdits, onDelete, onTogglePin, onToggleArchive } = props;
|
|
1648
1672
|
const category = entry.category;
|
|
1649
1673
|
const projectName = entry.projectName;
|
|
1650
1674
|
const isStale = entry.staleSince !== void 0;
|
|
@@ -1664,6 +1688,7 @@ function EntryRow(props) {
|
|
|
1664
1688
|
{
|
|
1665
1689
|
entry,
|
|
1666
1690
|
translate,
|
|
1691
|
+
loadRaw,
|
|
1667
1692
|
onSave: (edits) => {
|
|
1668
1693
|
setEditing(false);
|
|
1669
1694
|
onSaveEdits(edits);
|
|
@@ -2051,6 +2076,7 @@ function MemorySection(props) {
|
|
|
2051
2076
|
onToggle: () => {
|
|
2052
2077
|
toggleExpanded(entry.id);
|
|
2053
2078
|
},
|
|
2079
|
+
loadRaw: props.loadRawContent,
|
|
2054
2080
|
onSaveEdits: (edits) => {
|
|
2055
2081
|
void props.saveEntryEdits(entry.id, edits);
|
|
2056
2082
|
},
|
|
@@ -2343,6 +2369,12 @@ function modelOptions({ catalog, draft }) {
|
|
|
2343
2369
|
}
|
|
2344
2370
|
return options;
|
|
2345
2371
|
}
|
|
2372
|
+
function consolidationOptions() {
|
|
2373
|
+
return [
|
|
2374
|
+
{ value: "two-tier", label: "two-tier" },
|
|
2375
|
+
{ value: "legacy-judge", label: "legacy-judge" }
|
|
2376
|
+
];
|
|
2377
|
+
}
|
|
2346
2378
|
|
|
2347
2379
|
// src/client/locales.ts
|
|
2348
2380
|
var en = {
|
|
@@ -2418,6 +2450,8 @@ var en = {
|
|
|
2418
2450
|
extractionBudgetHint: "Max extraction + judge calls per session; 0 means unlimited.",
|
|
2419
2451
|
judgeEnabled: "Dedup judge",
|
|
2420
2452
|
judgeEnabledHint: "Run the LLM judge on near-duplicate hits before merging them.",
|
|
2453
|
+
consolidation: "Consolidation path",
|
|
2454
|
+
consolidationHint: "Two-tier: one batch consolidation call replaces per-pair dedup judging. legacy-judge: the old per-pair LLM judge (kept one release as a rollback).",
|
|
2421
2455
|
pitfallStreakThreshold: "Pitfall streak threshold",
|
|
2422
2456
|
pitfallStreakThresholdHint: "Consecutive same-signature failures \u2014 once resolved \u2014 that log a pitfall entry.",
|
|
2423
2457
|
curatorEnabled: "Curator pass",
|
|
@@ -2428,6 +2462,16 @@ var en = {
|
|
|
2428
2462
|
curatorMaxEntriesHint: "Maximum entries selected per pass, longest first; minimum 1.",
|
|
2429
2463
|
curatorMinChars: "Curator minimum length",
|
|
2430
2464
|
curatorMinCharsHint: "Only entries at least this long are selected for re-summarization.",
|
|
2465
|
+
hitSignalEnabled: "Usage-hit signal",
|
|
2466
|
+
hitSignalEnabledHint: "When the assistant's answer echoes an injected entry's tokens, count one hit. Feeds the store sweep's selection only \u2014 never deletion. Off by default.",
|
|
2467
|
+
hitSignalThreshold: "Hit overlap threshold",
|
|
2468
|
+
hitSignalThresholdHint: "Weighted token overlap between an injected entry and the answer above which the answer counts as a hit (0\u20131).",
|
|
2469
|
+
sweepEnabled: "Store sweep",
|
|
2470
|
+
sweepEnabledHint: "Periodically re-judge usage-ranked pairs of stored entries with one consolidation call \u2014 catches reworded duplicates the per-round pre-screen misses. Off by default.",
|
|
2471
|
+
sweepEveryNSessions: "Sweep interval (sessions)",
|
|
2472
|
+
sweepEveryNSessionsHint: "Run the store sweep every N session creations (plus once at startup); minimum 1.",
|
|
2473
|
+
sweepTopN: "Sweep max entries",
|
|
2474
|
+
sweepTopNHint: "Maximum entries selected per sweep pass, most-used first; minimum 2.",
|
|
2431
2475
|
// ── Memory content-management section (Settings → Memory, phase 1) ──
|
|
2432
2476
|
nav: "Memory",
|
|
2433
2477
|
sectionTitle: "Memory",
|
|
@@ -2581,6 +2625,8 @@ var zh = {
|
|
|
2581
2625
|
extractionBudgetHint: "\u6BCF\u4F1A\u8BDD\u6700\u5927\u63D0\u53D6 + \u53BB\u91CD\u88C1\u51B3\u8C03\u7528\u6B21\u6570\uFF1B0 \u8868\u793A\u4E0D\u9650\u3002",
|
|
2582
2626
|
judgeEnabled: "\u53BB\u91CD\u88C1\u51B3",
|
|
2583
2627
|
judgeEnabledHint: "\u5BF9\u8FD1\u4F3C\u91CD\u590D\u547D\u4E2D\u5728\u5408\u5E76\u524D\u8FD0\u884C LLM \u88C1\u51B3\u3002",
|
|
2628
|
+
consolidation: "\u6574\u5408\u8DEF\u5F84",
|
|
2629
|
+
consolidationHint: "two-tier\uFF1A\u6BCF\u6B21\u6279\u91CF\u63D0\u53D6\u53EA\u53D1\u4E00\u6B21\u6574\u5408\u8C03\u7528\uFF0C\u66FF\u4EE3\u9010\u5BF9\u53BB\u91CD\u88C1\u51B3\u3002legacy-judge\uFF1A\u65E7\u7684\u9010\u5BF9 LLM \u88C1\u51B3\uFF08\u4FDD\u7559\u4E00\u4E2A\u53D1\u5E03\u5468\u671F\u4F5C\u56DE\u9000\uFF09\u3002",
|
|
2584
2630
|
pitfallStreakThreshold: "\u8E29\u5751\u8FDE\u7EED\u9608\u503C",
|
|
2585
2631
|
pitfallStreakThresholdHint: "\u540C\u7B7E\u540D\u8FDE\u7EED\u5931\u8D25\u8FBE\u5230\u8BE5\u6B21\u6570\u4E14\u6700\u7EC8\u89E3\u51B3\uFF0C\u624D\u8BB0\u5F55\u4E00\u6761\u8E29\u5751\u3002",
|
|
2586
2632
|
curatorEnabled: "\u7B56\u5C55\u6574\u7406",
|
|
@@ -2591,6 +2637,16 @@ var zh = {
|
|
|
2591
2637
|
curatorMaxEntriesHint: "\u6BCF\u6B21\u6574\u7406\u6700\u591A\u9009\u4E2D\u7684\u6761\u76EE\u6570\uFF08\u6700\u957F\u4F18\u5148\uFF09\uFF0C\u6700\u5C0F\u4E3A 1\u3002",
|
|
2592
2638
|
curatorMinChars: "\u53C2\u4E0E\u6574\u7406\u6700\u5C0F\u957F\u5EA6",
|
|
2593
2639
|
curatorMinCharsHint: "\u4EC5\u957F\u5EA6\u4E0D\u4F4E\u4E8E\u8BE5\u5B57\u7B26\u6570\u7684\u6761\u76EE\u4F1A\u88AB\u9009\u4E2D\u6539\u5199\u3002",
|
|
2640
|
+
hitSignalEnabled: "\u4F7F\u7528\u547D\u4E2D\u4FE1\u53F7",
|
|
2641
|
+
hitSignalEnabledHint: "\u52A9\u624B\u4F5C\u7B54\u56DE\u58F0\u4E86\u5DF2\u6CE8\u5165\u6761\u76EE\u7684 token \u65F6\u8BB0\u4E00\u6B21\u547D\u4E2D\u3002\u53EA\u5582\u5168\u5E93\u626B\u63CF\u7684\u9009\u62D4\uFF0C\u7EDD\u4E0D\u9A71\u52A8\u5220\u9664\u3002\u9ED8\u8BA4\u5173\u95ED\u3002",
|
|
2642
|
+
hitSignalThreshold: "\u547D\u4E2D\u91CD\u53E0\u9608\u503C",
|
|
2643
|
+
hitSignalThresholdHint: "\u5DF2\u6CE8\u5165\u6761\u76EE\u4E0E\u4F5C\u7B54\u7684\u52A0\u6743 token \u91CD\u53E0\u8FBE\u5230\u8BE5\u503C\uFF080\u20131\uFF09\u624D\u8BA1\u4E00\u6B21\u547D\u4E2D\u3002",
|
|
2644
|
+
sweepEnabled: "\u5168\u5E93\u6574\u7406\u626B\u63CF",
|
|
2645
|
+
sweepEnabledHint: "\u4F4E\u9891\u5730\u5BF9\u6309\u7528\u91CF\u6392\u5E8F\u7684\u65E2\u6709\u6761\u76EE\u5BF9\u8FD0\u884C\u4E00\u6B21\u6574\u5408\u8C03\u7528\u2014\u2014\u515C\u4F4F\u6BCF\u8F6E\u9884\u7B5B\u6F0F\u6389\u7684\u6362\u8FF0\u91CD\u590D\u3002\u9ED8\u8BA4\u5173\u95ED\u3002",
|
|
2646
|
+
sweepEveryNSessions: "\u626B\u63CF\u95F4\u9694\uFF08\u4F1A\u8BDD\u6570\uFF09",
|
|
2647
|
+
sweepEveryNSessionsHint: "\u6BCF\u521B\u5EFA N \u4E2A\u4F1A\u8BDD\u8FD0\u884C\u4E00\u6B21\u5168\u5E93\u626B\u63CF\uFF08\u542F\u52A8\u65F6\u4E5F\u8DD1\u4E00\u6B21\uFF09\uFF0C\u6700\u5C0F\u4E3A 1\u3002",
|
|
2648
|
+
sweepTopN: "\u5355\u6B21\u626B\u63CF\u6761\u6570\u4E0A\u9650",
|
|
2649
|
+
sweepTopNHint: "\u6BCF\u6B21\u626B\u63CF\u6700\u591A\u9009\u4E2D\u7684\u6761\u76EE\u6570\uFF08\u5E38\u7528\u4F18\u5148\uFF09\uFF0C\u6700\u5C0F\u4E3A 2\u3002",
|
|
2594
2650
|
// ── 记忆内容管理 section(Settings → Memory,一期)──
|
|
2595
2651
|
nav: "\u8BB0\u5FC6",
|
|
2596
2652
|
sectionTitle: "\u8BB0\u5FC6",
|
|
@@ -2688,7 +2744,9 @@ var AUTORECALL_SPEC = {
|
|
|
2688
2744
|
fields: [
|
|
2689
2745
|
{ key: "autoRecallEnabled", kind: "checkbox" },
|
|
2690
2746
|
{ key: "autoRecallLimit", kind: "number", minValue: 1 },
|
|
2691
|
-
{ key: "autoRecallMinChars", kind: "number", minValue: 1 }
|
|
2747
|
+
{ key: "autoRecallMinChars", kind: "number", minValue: 1 },
|
|
2748
|
+
{ key: "hitSignalEnabled", kind: "checkbox", labelKey: "hitSignalEnabled", hintKey: "hitSignalEnabledHint" },
|
|
2749
|
+
{ key: "hitSignalThreshold", kind: "number", minValue: 0, labelKey: "hitSignalThreshold", hintKey: "hitSignalThresholdHint" }
|
|
2692
2750
|
]
|
|
2693
2751
|
};
|
|
2694
2752
|
var PROVIDER_FIELD2 = "extractionModelProvider";
|
|
@@ -2714,6 +2772,7 @@ var REVIEW_SPEC = {
|
|
|
2714
2772
|
},
|
|
2715
2773
|
{ key: "extractionBudget", kind: "number" },
|
|
2716
2774
|
{ key: "judgeEnabled", kind: "checkbox" },
|
|
2775
|
+
{ key: "consolidation", kind: "select", options: consolidationOptions, labelKey: "consolidation", hintKey: "consolidationHint" },
|
|
2717
2776
|
{ key: "pitfallStreakThreshold", kind: "number", minValue: 1 },
|
|
2718
2777
|
{
|
|
2719
2778
|
key: "confirmBeforeWrite",
|
|
@@ -2724,7 +2783,10 @@ var REVIEW_SPEC = {
|
|
|
2724
2783
|
{ key: "curatorEnabled", kind: "checkbox" },
|
|
2725
2784
|
{ key: "curatorEveryNSessions", kind: "number", minValue: 1 },
|
|
2726
2785
|
{ key: "curatorMaxEntries", kind: "number", minValue: 1 },
|
|
2727
|
-
{ key: "curatorMinChars", kind: "number", minValue: 1 }
|
|
2786
|
+
{ key: "curatorMinChars", kind: "number", minValue: 1 },
|
|
2787
|
+
{ key: "sweepEnabled", kind: "checkbox", labelKey: "sweepEnabled", hintKey: "sweepEnabledHint" },
|
|
2788
|
+
{ key: "sweepEveryNSessions", kind: "number", minValue: 1, labelKey: "sweepEveryNSessions", hintKey: "sweepEveryNSessionsHint" },
|
|
2789
|
+
{ key: "sweepTopN", kind: "number", minValue: 2, labelKey: "sweepTopN", hintKey: "sweepTopNHint" }
|
|
2728
2790
|
]
|
|
2729
2791
|
};
|
|
2730
2792
|
var inject3 = ["slots", "locale", "connection", "settingsScope"];
|
|
@@ -2763,6 +2825,7 @@ function createMemoryRemoteApi(connection) {
|
|
|
2763
2825
|
return {
|
|
2764
2826
|
list: (request) => invoke("list", request),
|
|
2765
2827
|
search: (request) => invoke("search", request),
|
|
2828
|
+
getRaw: (request) => invoke("getRaw", request),
|
|
2766
2829
|
projects: () => invoke("projects"),
|
|
2767
2830
|
health: () => invoke("health"),
|
|
2768
2831
|
update: (request) => invoke("update", request),
|
|
@@ -2847,6 +2910,7 @@ function apply(ctx) {
|
|
|
2847
2910
|
void controller.loadMore();
|
|
2848
2911
|
},
|
|
2849
2912
|
saveEntryEdits: (id, edits) => controller.saveEntryEdits(id, edits),
|
|
2913
|
+
loadRawContent: (id) => controller.loadRawContent(id),
|
|
2850
2914
|
deleteEntry: (id) => controller.deleteEntry(id),
|
|
2851
2915
|
togglePin: (entry) => controller.togglePin(entry),
|
|
2852
2916
|
toggleArchive: (entry) => controller.toggleArchive(entry),
|