recallnest 2.3.0 → 2.5.4
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 +150 -0
- package/README.md +17 -31
- package/README_CN.md +12 -22
- package/assets/ui/app.js +1031 -0
- package/assets/ui/index.html +224 -0
- package/assets/ui/styles.css +781 -0
- package/config.json.example +4 -1
- package/docs/api-reference.md +1291 -0
- package/docs/architecture.md +168 -0
- package/docs/connector-spec.md +126 -0
- package/eval/cases-canary.json +58 -0
- package/eval/cases-scope-robustness.json +278 -0
- package/eval/cases.json +117 -20
- package/package.json +22 -1
- package/src/__tests__/access-tracker-novelty.test.ts +238 -0
- package/src/__tests__/activity-counter.test.ts +125 -0
- package/src/__tests__/adaptive-fidelity.test.ts +102 -0
- package/src/__tests__/admission-control.test.ts +206 -0
- package/src/__tests__/anchor-generator.test.ts +67 -0
- package/src/__tests__/auto-consolidation.test.ts +168 -0
- package/src/__tests__/auto-recall.test.ts +131 -0
- package/src/__tests__/babel-integration.test.ts +144 -0
- package/src/__tests__/batch-dedup.test.ts +65 -0
- package/src/__tests__/canary-eval.test.ts +114 -0
- package/src/__tests__/capture-engine.test.ts +1238 -0
- package/src/__tests__/capture-heuristic.test.ts +171 -0
- package/src/__tests__/cascade-forget.test.ts +210 -0
- package/src/__tests__/category-min-scores.test.ts +33 -0
- package/src/__tests__/cc8-cc1-essential-context.test.ts +298 -0
- package/src/__tests__/circuit-breaker.test.ts +99 -0
- package/src/__tests__/cluster-consolidation.test.ts +782 -0
- package/src/__tests__/confidence-metadata.test.ts +125 -0
- package/src/__tests__/confidence-tracker.test.ts +261 -0
- package/src/__tests__/conflict-advisor.test.ts +206 -0
- package/src/__tests__/conflict-escalation.test.ts +149 -0
- package/src/__tests__/conflict-lifecycle.test.ts +83 -0
- package/src/__tests__/conflict-output.test.ts +85 -0
- package/src/__tests__/conflict-store.test.ts +374 -0
- package/src/__tests__/connector-v1.test.ts +181 -0
- package/src/__tests__/consolidation-engine.test.ts +333 -0
- package/src/__tests__/constructive-retrieval.test.ts +509 -0
- package/src/__tests__/context-collapse-renderer.test.ts +214 -0
- package/src/__tests__/context-composer-pins.test.ts +64 -0
- package/src/__tests__/context-composer-task-selection.test.ts +24 -0
- package/src/__tests__/context-reconstructor.test.ts +65 -0
- package/src/__tests__/context-renderer.test.ts +91 -0
- package/src/__tests__/continuity-eval.test.ts +275 -0
- package/src/__tests__/continuity-schema.test.ts +97 -0
- package/src/__tests__/contracts.test.ts +216 -0
- package/src/__tests__/conversation-importer.test.ts +692 -0
- package/src/__tests__/core-recall-eval.test.ts +235 -0
- package/src/__tests__/core-summary.test.ts +109 -0
- package/src/__tests__/data-checkup.test.ts +276 -0
- package/src/__tests__/decay-exemption.test.ts +84 -0
- package/src/__tests__/dedup-actions.test.ts +58 -0
- package/src/__tests__/dedup-guard.test.ts +39 -0
- package/src/__tests__/deterministic-id.test.ts +39 -0
- package/src/__tests__/distill-lock.test.ts +305 -0
- package/src/__tests__/distill-session-argshape.test.ts +79 -0
- package/src/__tests__/doctor.test.ts +319 -0
- package/src/__tests__/dream-pipeline.test.ts +321 -0
- package/src/__tests__/drill-down.test.ts +108 -0
- package/src/__tests__/embedder.test.ts +122 -0
- package/src/__tests__/emotion-decay.test.ts +46 -0
- package/src/__tests__/emotion-detector.test.ts +56 -0
- package/src/__tests__/emotion-phase1-integration.test.ts +153 -0
- package/src/__tests__/emotion-retrieval.test.ts +56 -0
- package/src/__tests__/entity-resolver.test.ts +58 -0
- package/src/__tests__/env-config.test.ts +151 -0
- package/src/__tests__/error-signature-boost.test.ts +87 -0
- package/src/__tests__/error-signature.test.ts +95 -0
- package/src/__tests__/error-taxonomy.test.ts +129 -0
- package/src/__tests__/ethics-layer.test.ts +476 -0
- package/src/__tests__/event-segmenter.test.ts +153 -0
- package/src/__tests__/feature-flags-integration.test.ts +54 -0
- package/src/__tests__/frequency-tracker.test.ts +113 -0
- package/src/__tests__/graph-export.test.ts +489 -0
- package/src/__tests__/hotness-blend.test.ts +76 -0
- package/src/__tests__/ingest-chunking.test.ts +44 -0
- package/src/__tests__/ingest.test.ts +360 -0
- package/src/__tests__/interference-detector.test.ts +203 -0
- package/src/__tests__/kg-extractor.test.ts +192 -0
- package/src/__tests__/kg-store.test.ts +300 -0
- package/src/__tests__/llm-consolidation.test.ts +226 -0
- package/src/__tests__/maintenance-locks.test.ts +174 -0
- package/src/__tests__/mcp-efficiency.test.ts +288 -0
- package/src/__tests__/mcp-related-scopes.test.ts +151 -0
- package/src/__tests__/memory-boundaries.test.ts +250 -0
- package/src/__tests__/memory-evolution-b2-b3-e1.test.ts +345 -0
- package/src/__tests__/memory-evolution.test.ts +271 -0
- package/src/__tests__/memory-health-rebalance.test.ts +144 -0
- package/src/__tests__/memory-lint.test.ts +421 -0
- package/src/__tests__/memory-output.test.ts +215 -0
- package/src/__tests__/memory-promotion.test.ts +315 -0
- package/src/__tests__/migrate-dedup-ids.test.ts +65 -0
- package/src/__tests__/multi-vector.test.ts +242 -0
- package/src/__tests__/narrative-architecture.test.ts +456 -0
- package/src/__tests__/noise-filter.test.ts +205 -0
- package/src/__tests__/obsidian-connector.test.ts +363 -0
- package/src/__tests__/omitted-reporting.test.ts +98 -0
- package/src/__tests__/pending-review.test.ts +77 -0
- package/src/__tests__/pii-redact.test.ts +314 -0
- package/src/__tests__/post-retrieval-filter.test.ts +178 -0
- package/src/__tests__/ppr-traversal.test.ts +256 -0
- package/src/__tests__/prediction-engine.test.ts +349 -0
- package/src/__tests__/predictive-prospective-memory.test.ts +416 -0
- package/src/__tests__/preference-guard-smoke.test.ts +211 -0
- package/src/__tests__/preference-matcher.test.ts +230 -0
- package/src/__tests__/preference-slots.test.ts +205 -0
- package/src/__tests__/prospective-memory.test.ts +283 -0
- package/src/__tests__/query-entity-detector.test.ts +171 -0
- package/src/__tests__/query-expander-alias.test.ts +146 -0
- package/src/__tests__/query-expander.test.ts +34 -0
- package/src/__tests__/recall-governor.test.ts +227 -0
- package/src/__tests__/recall-mode.test.ts +64 -0
- package/src/__tests__/result-synthesizer.test.ts +198 -0
- package/src/__tests__/resume-context.test.ts +4898 -0
- package/src/__tests__/retrieval-trace.test.ts +213 -0
- package/src/__tests__/retriever-boundary-weight.test.ts +136 -0
- package/src/__tests__/retroactive-boost.test.ts +223 -0
- package/src/__tests__/salience-scoring.test.ts +106 -0
- package/src/__tests__/scope-inventory.test.ts +200 -0
- package/src/__tests__/scope-policy.test.ts +69 -0
- package/src/__tests__/scope-suggester.test.ts +80 -0
- package/src/__tests__/session-checkpoint.test.ts +291 -0
- package/src/__tests__/session-distiller.test.ts +640 -0
- package/src/__tests__/session-gc.test.ts +215 -0
- package/src/__tests__/skill-engine.test.ts +552 -0
- package/src/__tests__/skill-promotion.test.ts +601 -0
- package/src/__tests__/skill-verifier.test.ts +122 -0
- package/src/__tests__/source-heartbeat.test.ts +250 -0
- package/src/__tests__/store-patch-metadata.test.ts +205 -0
- package/src/__tests__/store-scope-audit.test.ts +81 -0
- package/src/__tests__/store-upsert.test.ts +184 -0
- package/src/__tests__/supersede-chain.test.ts +154 -0
- package/src/__tests__/temporal-parser.test.ts +241 -0
- package/src/__tests__/temporal-validity.test.ts +160 -0
- package/src/__tests__/term-registry.test.ts +121 -0
- package/src/__tests__/tool-error-surfacing.test.ts +98 -0
- package/src/__tests__/tool-output-compressor.test.ts +160 -0
- package/src/__tests__/topic-tag.test.ts +113 -0
- package/src/__tests__/trusted-memory.test.ts +839 -0
- package/src/__tests__/usage-tracker.test.ts +287 -0
- package/src/__tests__/version-manager.test.ts +213 -0
- package/src/__tests__/workflow-observation-skill-outcome.test.ts +352 -0
- package/src/__tests__/workflow-observation.test.ts +433 -0
- package/src/__tests__/write-verifier.test.ts +122 -0
- package/src/access-tracker.ts +38 -32
- package/src/activity-counter.ts +46 -18
- package/src/aliases.ts +133 -0
- package/src/api-server.ts +27 -7
- package/src/audit-log.ts +4 -2
- package/src/auto-consolidation.ts +8 -3
- package/src/auto-gc.ts +85 -21
- package/src/capture-engine.ts +54 -21
- package/src/cli.ts +169 -37
- package/src/confidence-tracker.ts +36 -18
- package/src/consolidation-engine.ts +109 -11
- package/src/context-composer.ts +8 -1
- package/src/data-checkup.ts +95 -6
- package/src/distill-lock.ts +194 -15
- package/src/doctor.ts +9 -2
- package/src/dream-pipeline.ts +118 -34
- package/src/env-config.ts +77 -0
- package/src/error-signature.ts +153 -0
- package/src/error-taxonomy.ts +115 -0
- package/src/eval.ts +251 -6
- package/src/idempotency.ts +8 -0
- package/src/ingest.ts +31 -10
- package/src/kg-extractor.ts +6 -2
- package/src/kg-store.ts +236 -44
- package/src/llm-consolidation.ts +2 -1
- package/src/mcp-server.ts +85 -1799
- package/src/mcp-tool-deps.ts +48 -0
- package/src/mcp-tools-advanced.ts +941 -0
- package/src/mcp-tools-core.ts +633 -0
- package/src/mcp-tools-governance.ts +475 -0
- package/src/memory-boundaries.ts +3 -1
- package/src/memory-evolution.ts +73 -1
- package/src/memory-lint.ts +183 -10
- package/src/memory-output.ts +114 -3
- package/src/memory-promotion.ts +246 -0
- package/src/memory-schema.ts +25 -2
- package/src/memory-store-port.ts +43 -0
- package/src/multi-vector.ts +2 -1
- package/src/narrative-schema.ts +2 -1
- package/src/noise-filter.ts +57 -6
- package/src/pii-detector.ts +157 -5
- package/src/query-expander.ts +90 -9
- package/src/result-synthesizer.ts +2 -1
- package/src/retention-policy.ts +2 -1
- package/src/retriever.ts +259 -139
- package/src/runtime-config.ts +8 -1
- package/src/scope-suggester.ts +113 -0
- package/src/session-distiller.ts +23 -2
- package/src/session-engine.ts +2 -1
- package/src/session-schema.ts +1 -0
- package/src/session-store.ts +5 -0
- package/src/skill-engine.ts +78 -0
- package/src/skill-promotion.ts +247 -47
- package/src/skill-schema.ts +16 -3
- package/src/skill-verifier.ts +152 -0
- package/src/store.ts +267 -38
- package/src/tool-output-compressor.ts +3 -1
- package/src/ui-server.ts +2 -1
- package/src/usage-tracker.ts +242 -0
- package/src/version-manager.ts +3 -2
- package/src/workflow-observation-engine.ts +2 -1
- package/src/workflow-observation-schema.ts +2 -1
- package/src/workflow-observation-store.ts +6 -2
- package/.env +0 -4
- package/CLAUDE.md +0 -46
- package/config.json +0 -55
- package/daily-recall.sh +0 -110
- package/logs/daily-recall.error.log +0 -0
- package/logs/daily-recall.log +0 -60
- package/logs/ingest-2026-04-11.log +0 -110
- package/logs/ingest-2026-04-12.log +0 -90
- package/logs/ingest-2026-04-13.log +0 -87
- package/logs/launchagent-stderr.log +0 -0
- package/logs/launchagent-stdout.log +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v2.5.4 — npm 发布边界修复 (2026-07-17)
|
|
4
|
+
|
|
5
|
+
- package.json 改为严格 files 白名单,只发布运行所需源码、示例配置、UI、集成脚本和必要文档。
|
|
6
|
+
- 新增实际 tarball 内容检查:环境文件、运行配置、日志、会话、数据库、密钥材料和开发工作树一旦进入包即失败。
|
|
7
|
+
- npm publish 前自动执行同一检查,CI 也验证最终包清单,避免本地运行数据再次随包发布。
|
|
8
|
+
- 补齐 npm 包中的 UI 资源与 README 引用文档,并将中文 README 的 MCP 工具数对齐为 43。
|
|
9
|
+
- 清理历史可视化 HTML 中遗留的两段 provider-shaped token,并增加只报路径/行号的 tracked-file 凭据扫描。
|
|
10
|
+
- `doctor` 不再显示 API key 前缀,只报告是否已设置。
|
|
11
|
+
|
|
12
|
+
> **CHANGELOG gap notice**: v1.3.1 (2026-03-12) → v2.5.2 (2026-05-27) 中间有较长开发期未更新 CHANGELOG。v2.5+ 系列以下开始恢复跟踪。历史 v1.4 - v2.4 间的变更见 git log。
|
|
13
|
+
|
|
14
|
+
## v2.5.3 — 诊断工具失明 + 失效功能 + score 显示 三批修复 (2026-05-29)
|
|
15
|
+
|
|
16
|
+
一轮临床向审查(CC 多 agent + Codex trio 二审)发现的一组修复:诊断工具在生产给虚假健康信号、三个功能完全失效、检索 score 显示失去区分度。
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **三处让功能完全失效的 bug**:
|
|
21
|
+
- `distill_session` MCP tool 引用未声明的 `llmClient` → 调用必抛 ReferenceError、工具 100% 不可用(SDK 接住转错误响应,server 不崩但永远 distill 不了)。改用模块级已初始化的 `llm`。
|
|
22
|
+
- `ingest --no-llm` 空操作:commander 把 `--no-llm` 解析成 `options.llm=false`,代码却读 `options.noLlm`(恒 undefined)→ 想跳过 LLM 实际仍全程调用。改读 `options.llm===false`,Gemini/memory 两源同步遵守。
|
|
23
|
+
- `tool-output-compressor` 正则 lookahead 末项 `\z` 在 JS 中是字面字符 z(非锚点)→ 末尾工具输出漏压缩、在字面 z 处误截断。改为 `(?![\s\S])`。
|
|
24
|
+
- **`memory_lint` / `data_checkup` 因空向量假报健康** — `store.list()` 为性能返回 `vector:[]`,而矛盾/去重/维度/干扰检查全靠向量算相似度 → cosine 恒 0 → 静默失效(实测 contradictions=0/duplicates=0、维度检查把"全 0 维"假报 OK)。现在经 `store.getVectors()`(已加分批)补回真实向量再检查;维度检查排除取不到向量的条目、空库才判 ok。真实库验证:矛盾 0→174、重复 0→1473。
|
|
25
|
+
- **诊断扫描截断不透明** — `memory_lint`/`data_checkup` 只扫最近 10000 条(库 9 万+),新增 `scanLimited`/`totalAvailable` 截断披露。
|
|
26
|
+
- **检索 score 显示失去区分度** — `memory-output` 的 search/brief/full 三处用 `toFixed(0)`/`round` 把 score 取整(0.996 与 1.0 都显示 100%),改为 `toFixed(1)`。`search_memory` MCP description 从 "by semantic similarity" 改为明确 "fused ranking score, NOT pure cosine similarity"。
|
|
27
|
+
|
|
28
|
+
### Internal
|
|
29
|
+
|
|
30
|
+
- 修测试 mock 失真:`memory-lint` / `data-checkup` / `source-heartbeat` 三个测试的 mock store 原本直接返回带向量 entry(与生产 `vector:[]` 不符,正是它放过了诊断哑火 bug),改为复刻真实行为(list 空向量 + getVectors 补回)。
|
|
31
|
+
- 基线 1525 tests / 0 fail。
|
|
32
|
+
|
|
33
|
+
## v2.5.2 — store.delete(prefix) bug fix (2026-05-27)
|
|
34
|
+
|
|
35
|
+
Codex trio review (2026-05-27, ref `~/Desktop/codex-v2.5.1-fix-review-20260527.md`) 发现的独立非阻塞 bug。
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- **`store.delete(prefix)` 在 90K+ 库下可能漏删** — 旧实现先 `.select(["id","scope"]).limit(1000).toArray()` 再 app-layer filter,若目标 entry 不在前 1000 行就漏查。现在改成和 `store.getById` 对齐的 SQL LIKE:`where("id LIKE 'prefix%'").limit(2)`,ambiguous prefix 通过 `limit(2)` 检测并 throw。**不影响 `forget_memory` 主路径**(`forget-engine` 走 `store.get(memoryId)` 解析成完整 entry.id 再 `store.delete(entry.id)`),是 direct prefix delete caller 的潜在风险修补。
|
|
40
|
+
- 基线 1523 / 0 fail(修补未引入新 test,依赖 Codex 上轮 LanceDB LIKE 临时验证 + 全量回归测试不破坏)
|
|
41
|
+
|
|
42
|
+
## v2.5.1 — P0 production path: API exposure surface fixes (2026-05-27)
|
|
43
|
+
|
|
44
|
+
Fresh CC session 第一次真用 `store_skill → workflow_observe(skillId=prefix) → retrieve_skill` 链路就**死锁**——返回 `Skill 1d9420b2 → not updated (skill_not_found)`。诊断出 3 处 API 暴露面割裂。
|
|
45
|
+
|
|
46
|
+
Codex trio 二审评分 **8.5/10**,子 agent production smoke 验证 successCount 0→1 真递增 ✅。
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- **`store.getById` 加 8+ hex prefix lookup** — 之前只接完整 UUID,与 `store.update / store.delete` 行为不一致;现在通过 SQL `LIKE 'prefix%' limit(2)` 检测歧义并返回 null。现有 caller(access-tracker / persistSkill / capture-engine 等 13 处)全部传完整 UUID,向后兼容零隐患(Codex 全仓库 grep 验证)。
|
|
51
|
+
- **`store_skill` MCP handler 返回加 `Skill ID: <full UUID>` 行** — 之前只显示 `Stored skill <8 hex prefix>` 截断到 8 位,agent 拿不到完整 UUID 后续没法传给 `workflow_observe`。保留 short prefix 显示给人看。
|
|
52
|
+
- **`retrieve_skill` MCP handler markdown 加 `**ID**:` + `**Outcome counts**: success=N failure=M [(last: ISO)]`** — 之前不暴露 id / successCount / failureCount / lastRefinedAt,agent 看不到反馈循环效果。
|
|
53
|
+
- **`recordSkillOutcome` 用 `entry.id` 调 `store.update`** — 之前用 caller-provided skillId(可能 prefix)直接调 store.update,ambiguous prefix 在写操作风险翻倍;改用 getById 已 disambiguated 的完整 entry.id。
|
|
54
|
+
|
|
55
|
+
### Notes
|
|
56
|
+
|
|
57
|
+
- **8-char prefix 全库碰撞数学**: 4.3 亿组合 vs 90K 条记录,生日悖论 P(any collision) ≈ 61%;但 P(specific prefix collides) ≈ 0.002% (1/47,722)。**首选 full UUID 输入**,8-char prefix 作为兼容;歧义时返回 `skill_not_found`,不会误更新。
|
|
58
|
+
- **Codex 5 步 smoke troubleshooting**: 见 `~/Desktop/codex-v2.5.1-fix-review-20260527.md` line 186-192。
|
|
59
|
+
|
|
60
|
+
### Tests
|
|
61
|
+
|
|
62
|
+
- 基线 1521 → 1523 / 0 fail(+2 prefix lookup case:`resolves 8+ hex prefix to full UUID and bumps successCount` / `returns skill_not_found for ambiguous prefix`)
|
|
63
|
+
|
|
64
|
+
## v2.5.0 — SkillImplementationType schema 收缩 (2026-05-27)
|
|
65
|
+
|
|
66
|
+
brgsk《agent memory: an anatomy》借鉴审计 + Codex trio 二审建议 "P1 选收缩 / 删承诺,不接 evaluator"。
|
|
67
|
+
|
|
68
|
+
### Changed (Breaking)
|
|
69
|
+
|
|
70
|
+
- **`SkillImplementationTypeSchema` 收缩到 `["instruction_sequence"]` 唯一值** — 原 enum 含 `bash` / `python` / `mcp_tool_chain` / `instruction_sequence` 四种,但 `implementation` 字段**从未真执行**(无 evaluator,仅作 context 给 agent 读)——是 schema 撒谎暗示可执行。现在明确 skill 是 **agent-readable runbook** 而非可执行物。
|
|
71
|
+
- **`implementation` 字段 describe**: `"Executable content"` → `"Agent-readable runbook content: markdown steps, natural language workflow, or structured procedure. RecallNest does NOT execute this — it stores runbooks for agents to read and follow as context."`
|
|
72
|
+
- **`store_skill` MCP tool description** 更新强调 "agent-readable skill runbook" + "RecallNest does NOT execute skills"。
|
|
73
|
+
|
|
74
|
+
### Migration
|
|
75
|
+
|
|
76
|
+
- 新写入受新 schema 约束,`bash` / `python` / `mcp_tool_chain` 会被拒。
|
|
77
|
+
- **`parseSkillFromEntry` 用 type cast 不走 schema 校验** — 历史 `bash` / `python` skill records 仍可 retrieve(backward-compat path)。
|
|
78
|
+
- production 库 2026-05-27 实测**无真实 skill 数据**(3 条 category=skills 是历史抓取噪声),破坏面接近 zero。
|
|
79
|
+
|
|
80
|
+
### Tests
|
|
81
|
+
|
|
82
|
+
- 基线 1520 → 1521 / 0 fail(删 1 个 "accepts all 4 types",加 2 个 "accepts only instruction_sequence" / "rejects pre-v2.5 implementationType values")
|
|
83
|
+
|
|
84
|
+
## v2.5.0-pre — workflow_observe ↔ skill outcome 绑定 (2026-05-27)
|
|
85
|
+
|
|
86
|
+
P0 反馈闭环:让 skill 的 `successCount` / `failureCount` 真有真实使用回流。commit `09dec62`,后由 v2.5.0 schema 收缩 + v2.5.1 API 暴露面 + v2.5.2 store.delete 补丁一起构成完整 P0 工作。
|
|
87
|
+
|
|
88
|
+
### New
|
|
89
|
+
|
|
90
|
+
- **`WorkflowObservationInputSchema` 加可选 `skillId` 字段** — `workflow_observe` 带 skillId + outcome 时自动 bump skill 的 successCount/failureCount,回写 lastRefinedAt。
|
|
91
|
+
- **`recordSkillOutcome()` 导出函数** — `skill-engine.ts`,二分映射:`success` → successCount +1;`failure` / `corrected` / `missed` → failureCount +1。返回结构化结果不抛错,skill_not_found / not_a_skill / metadata_missing 静默跳过。
|
|
92
|
+
- **`mcp-server.ts workflow_observe` + `api-server.ts /v1/workflow-observe`** 接 recordSkillOutcome。
|
|
93
|
+
|
|
94
|
+
### Deployment
|
|
95
|
+
|
|
96
|
+
- **新增 `RECALLNEST_MCP_TIER=full` 环境变量需求** — `workflow_observe` 在 TOOL_TIERS 标 governance,需 full tier 才暴露给 MCP ToolSearch。MacBook + mini × CC + Codex 4 处 config 已加(args inline / [env] 段)。
|
|
97
|
+
|
|
98
|
+
### Tests
|
|
99
|
+
|
|
100
|
+
- 基线 1486 → 1520 / 0 fail(+13 新 case 覆盖 outcome 映射 + 错误路径 + 元数据完整性 + 时间戳;+1 顺手修 workflow-observation.test.ts dashboard 漏传 now 参数 pre-existing bug)
|
|
101
|
+
|
|
102
|
+
## v1.3.1 — Upstream Sync (2026-03-12)
|
|
103
|
+
|
|
104
|
+
Synced with [CortexReach/memory-lancedb-pro](https://github.com/CortexReach/memory-lancedb-pro) master (v1.1.0-beta.6+).
|
|
105
|
+
|
|
106
|
+
### Changed
|
|
107
|
+
|
|
108
|
+
- **Retriever**: Added `source` field to `RetrievalContext` — access reinforcement now only fires on manual retrieval, preventing auto-recall from strengthening noise memories (synced from upstream beta.2 design).
|
|
109
|
+
- **Noise filter**: Added Chinese meta-question patterns (`你记得`, `记不记得`, `还记得…吗`, `上次…说`, `之前…提到`) and diagnostic artifact filter (synced from upstream beta.3).
|
|
110
|
+
- **README**: Updated upstream credit link from `win4r/memory-lancedb-pro` to `CortexReach/memory-lancedb-pro`, added CortexReach team acknowledgement.
|
|
111
|
+
|
|
112
|
+
## v1.2.0 — First Distributable Release (2026-03-08)
|
|
113
|
+
|
|
114
|
+
The goal of this release: a new user can go from `git clone` to first search result in 15 minutes.
|
|
115
|
+
|
|
116
|
+
### New
|
|
117
|
+
|
|
118
|
+
- **`lm doctor`** — one-command pre-flight check for Bun, config, API key, data directory, transcript paths, and index health. Supports `--ci` mode for GitHub Actions.
|
|
119
|
+
- **`lm demo`** — run sample queries to see RecallNest in action before writing your own.
|
|
120
|
+
- **`config.json.example`** — ships with absolute `~/.recallnest/data/lancedb` path. New users copy this instead of editing the tracked config.
|
|
121
|
+
- **GitHub Actions CI** — runs `doctor --ci` and TypeScript check on every push.
|
|
122
|
+
- **Ingest pre-validation** — embedding API is tested before processing any files. Invalid Jina key now fails fast with a clear message instead of crashing mid-ingest.
|
|
123
|
+
|
|
124
|
+
### Changed
|
|
125
|
+
|
|
126
|
+
- **README rewritten** — added Prerequisites table (Bun + Jina key), 5-step quickstart with expected output, Troubleshooting section.
|
|
127
|
+
- **Gemini support marked "coming soon"** — README, config example, and doctor all honestly reflect that Gemini CLI sessions are encrypted protobuf and not yet parseable. The `lm ingest` command prints a clear skip message instead of silently failing.
|
|
128
|
+
- **Config path robustness** — default `dbPath` changed from relative `./data/lancedb` to absolute `~/.recallnest/data/lancedb` in config example. Auto-detect failure messages now include the user's actual home path.
|
|
129
|
+
- **`config.json` untracked** — added to `.gitignore` so user config is not overwritten by `git pull`.
|
|
130
|
+
|
|
131
|
+
### Fixed
|
|
132
|
+
|
|
133
|
+
- Auto-detect hint in `doctor` now shows a real example path based on the current user's home directory.
|
|
134
|
+
- `findConfigPath()` error message now suggests `cp config.json.example config.json` when the example file exists.
|
|
135
|
+
|
|
136
|
+
## v1.1.0 — Hybrid Retrieval + MCP + UI (2026-02)
|
|
137
|
+
|
|
138
|
+
- Hybrid retrieval: LanceDB vector + BM25 keyword search with configurable weights
|
|
139
|
+
- Retrieval profiles: `default`, `writing`, `debug`, `fact-check`
|
|
140
|
+
- MCP server with 9 tools: search, explain, distill, brief, pin, list assets/pins, export, stats
|
|
141
|
+
- Local web workbench UI at `http://localhost:4317`
|
|
142
|
+
- Multi-source ingest: Claude Code transcripts, Codex sessions, Gemini sessions, markdown notes
|
|
143
|
+
- Asset system: pin, brief, export with re-indexing
|
|
144
|
+
- Time-aware scoring with configurable decay
|
|
145
|
+
|
|
146
|
+
## v1.0.0 — Initial Release (2026-01)
|
|
147
|
+
|
|
148
|
+
- Basic vector search over Claude Code transcripts
|
|
149
|
+
- LanceDB storage with Jina embeddings
|
|
150
|
+
- CLI interface
|
package/README.md
CHANGED
|
@@ -12,8 +12,8 @@ A local-first memory system backed by LanceDB that turns scattered conversation
|
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://bun.sh)
|
|
14
14
|
[](https://lancedb.com)
|
|
15
|
-
[](https://modelcontextprotocol.io)
|
|
16
|
+
[](https://github.com/AliceLJY/recallnest)
|
|
17
17
|
[](https://github.com/AliceLJY/recallnest)
|
|
18
18
|
|
|
19
19
|
**English** | [简体中文](README_CN.md) | [Roadmap](ROADMAP.md)
|
|
@@ -26,22 +26,8 @@ A local-first memory system backed by LanceDB that turns scattered conversation
|
|
|
26
26
|
|
|
27
27
|
Coding agents forget everything between windows. Your context — project configs, debugging decisions, entity mappings — is scattered across Claude Code, Codex, and Gemini CLI with no shared memory.
|
|
28
28
|
|
|
29
|
-
RecallNest solves this: **a single LanceDB-backed memory layer that
|
|
29
|
+
RecallNest solves this: **a single LanceDB-backed memory layer that your coding agents read and write**. Context stored in one window is auto-recalled in another. Sessions checkpoint on exit and resume on start. Memory decays, evolves, and self-organizes — not just raw log storage.
|
|
30
30
|
|
|
31
|
-
### Benchmark: LongMemEval (ICLR 2025)
|
|
32
|
-
|
|
33
|
-
Evaluated on 500 questions across 6 memory abilities ([methodology](https://arxiv.org/abs/2407.15168)):
|
|
34
|
-
|
|
35
|
-
| | RecallNest | Vector-only baseline | Delta |
|
|
36
|
-
|---|---|---|---|
|
|
37
|
-
| Overall Accuracy | **29.6%** | 24.2% | **+5.4pp** |
|
|
38
|
-
| User Facts | **64.3%** | 52.9% | +11.4pp |
|
|
39
|
-
| Knowledge Update | **43.6%** | 42.3% | +1.3pp |
|
|
40
|
-
| Abstention Rate | **55.6%** | 67.8% | **-12.2pp** |
|
|
41
|
-
|
|
42
|
-
Wins or ties in **all 6 categories**, with no regression. The hybrid retrieval pipeline (BM25 + vector + recency + RIF dedup) surfaces 12.2% more relevant context than vector-only search.
|
|
43
|
-
|
|
44
|
-
---
|
|
45
31
|
|
|
46
32
|
## Quick Start
|
|
47
33
|
|
|
@@ -167,6 +153,7 @@ bun run src/ui-server.ts
|
|
|
167
153
|
| **Session Distiller** | 3-layer conversation compression: microcompact → LLM summary → knowledge extraction |
|
|
168
154
|
| **Conversation Import** | Import from Claude Code, Claude.ai, ChatGPT, Slack, and plaintext |
|
|
169
155
|
| **Topic Tags** | Intra-scope topic partitioning — auto-detected, filterable in search |
|
|
156
|
+
| **Related Scope Sidecar** | Opt-in `includeRelatedScopes` search over configured `scopeRelations`, shown separately from the main scoped ranking |
|
|
170
157
|
|
|
171
158
|
### Memory Lifecycle & Governance
|
|
172
159
|
|
|
@@ -233,6 +220,8 @@ v2.1 added philosophy-informed behavior; v2.2 closes the last three engine-layer
|
|
|
233
220
|
|
|
234
221
|
- **Temporal Validity Windows** *(TSM / TiMem / Zep)* — `store_memory` accepts `validUntil` (expiration) and `eventTime` (when the event actually happened). `search_memory` supports `validAt` (point-in-time query) and `includeExpired` (demote 80% instead of hide). Auto-GC applies 2× decay acceleration to expired memories.
|
|
235
222
|
|
|
223
|
+
- **Usage-Adjusted Auto-GC** *(off by default)* — `RECALLNEST_USAGE_DECAY=true` enables a GC-only cold-memory penalty when constructive retrieval is also active. Cold memories discount the frequency component instead of changing online retrieval ranking.
|
|
224
|
+
|
|
236
225
|
---
|
|
237
226
|
|
|
238
227
|
## New in v2.3: Connector Ecosystem + Source Health
|
|
@@ -264,7 +253,7 @@ v2.2 hardened retrieval quality; v2.3 opens RecallNest to external data sources
|
|
|
264
253
|
│ Integration Layer │
|
|
265
254
|
│ ┌─────────────────────┐ ┌────────────────────────────┐ │
|
|
266
255
|
│ │ MCP Server │ │ HTTP API Server │ │
|
|
267
|
-
│ │
|
|
256
|
+
│ │ 43 tools │ │ 21 endpoints │ │
|
|
268
257
|
│ └─────────┬───────────┘ └──────────┬─────────────────┘ │
|
|
269
258
|
└────────────┼─────────────────────────┼───────────────────┘
|
|
270
259
|
└──────────┬──────────────┘
|
|
@@ -326,22 +315,23 @@ Examples live in [`integrations/examples/`](integrations/examples/):
|
|
|
326
315
|
---
|
|
327
316
|
|
|
328
317
|
<details>
|
|
329
|
-
<summary><strong>MCP Tools (
|
|
318
|
+
<summary><strong>MCP Tools (43 tools)</strong></summary>
|
|
330
319
|
|
|
331
320
|
| Tool | Description |
|
|
332
321
|
|------|-------------|
|
|
333
|
-
| `workflow_observe` | Store an append-only workflow observation outside regular memory |
|
|
322
|
+
| `workflow_observe` | Store an append-only workflow observation outside regular memory; accepts `idempotencyKey` for retry-safe writes |
|
|
334
323
|
| `workflow_health` | Inspect workflow observation health or show a degraded-workflow dashboard |
|
|
335
324
|
| `workflow_evidence` | Build an evidence pack for a workflow primitive |
|
|
336
325
|
| `store_memory` | Store a durable memory for future windows |
|
|
337
326
|
| `store_workflow_pattern` | Store a reusable workflow as durable `patterns` memory |
|
|
338
327
|
| `store_case` | Store a reusable problem-solution pair as durable `cases` memory |
|
|
339
328
|
| `promote_memory` | Explicitly promote evidence into durable memory |
|
|
329
|
+
| `promote_scan` | Scan recent evidence and auto-promote qualifying memories into durable storage |
|
|
340
330
|
| `list_conflicts` | List or inspect promotion conflict candidates |
|
|
341
331
|
| `audit_conflicts` | Summarize stale/escalated conflict priorities |
|
|
342
332
|
| `escalate_conflicts` | Preview or apply conflict escalation metadata |
|
|
343
333
|
| `resolve_conflict` | Resolve a stored conflict candidate (keep / accept / merge) |
|
|
344
|
-
| `checkpoint_session` | Store the current active work state outside durable memory |
|
|
334
|
+
| `checkpoint_session` | Store the current active work state outside durable memory; accepts `idempotencyKey` for retry-safe writes |
|
|
345
335
|
| `latest_checkpoint` | Inspect the latest saved checkpoint by session or scope |
|
|
346
336
|
| `resume_context` | Compose startup context for a fresh window |
|
|
347
337
|
| `search_memory` | Proactive recall at task start |
|
|
@@ -417,7 +407,7 @@ bun run src/cli.ts distill "topic" --profile writing
|
|
|
417
407
|
bun run src/cli.ts stats
|
|
418
408
|
|
|
419
409
|
# Workflow observation
|
|
420
|
-
bun run src/cli.ts workflow-observe resume_context "Fresh window skipped continuity recovery." --outcome missed --scope project:recallnest
|
|
410
|
+
bun run src/cli.ts workflow-observe resume_context "Fresh window skipped continuity recovery." --outcome missed --scope project:recallnest --idempotency-key smoke-2026-06-26
|
|
421
411
|
bun run src/cli.ts workflow-health resume_context --scope project:recallnest
|
|
422
412
|
bun run src/cli.ts workflow-evidence checkpoint_session --scope project:recallnest
|
|
423
413
|
|
|
@@ -504,18 +494,14 @@ Part of the **小试AI** open-source AI workflow:
|
|
|
504
494
|
| Project | Description |
|
|
505
495
|
|---------|-------------|
|
|
506
496
|
| [babel-memory](https://github.com/AliceLJY/babel-memory) | Multilingual preprocessing for BM25 — 27+ languages, zero deps |
|
|
507
|
-
| [
|
|
508
|
-
| [content-publisher](https://github.com/AliceLJY/content-publisher) | Image generation + layout + WeChat publishing |
|
|
509
|
-
| [wechat-ai-bridge](https://github.com/AliceLJY/wechat-ai-bridge) | Run Claude Code / Codex / Gemini in WeChat with session management |
|
|
497
|
+
| [cc-empire](https://github.com/AliceLJY/cc-empire) | Hooks/rules/methodology — the connective tissue of the whole ecosystem |
|
|
510
498
|
| [telegram-ai-bridge](https://github.com/AliceLJY/telegram-ai-bridge) | Telegram bots for Claude, Codex, and Gemini |
|
|
511
|
-
| [
|
|
512
|
-
| [
|
|
513
|
-
| [openclaw-
|
|
499
|
+
| [tg-bridge-channel](https://github.com/AliceLJY/tg-bridge-channel) | Sister Telegram bridge using Claude Agent View background sessions |
|
|
500
|
+
| [wechat-ai-bridge](https://github.com/AliceLJY/wechat-ai-bridge) | Run Claude Code / Codex / Gemini in WeChat with session management |
|
|
501
|
+
| [openclaw-tunnel](https://github.com/AliceLJY/openclaw-tunnel) | Docker ↔ host CLI bridge (maintenance mode — LanceDB test only) |
|
|
514
502
|
| [digital-clone-skill](https://github.com/AliceLJY/digital-clone-skill) | Build digital clones from corpus data |
|
|
515
503
|
| [claude-code-studio](https://github.com/AliceLJY/claude-code-studio) | Multi-session collaboration platform for Claude Code |
|
|
516
|
-
| [
|
|
517
|
-
| [agent-nexus](https://github.com/AliceLJY/agent-nexus) | One-command installer for memory + remote control |
|
|
518
|
-
| [cc-cabin](https://github.com/AliceLJY/cc-cabin) | Complete Claude Code workflow scaffold |
|
|
504
|
+
| [workflow-orchestrator](https://github.com/AliceLJY/workflow-orchestrator) | Natural-language pipeline orchestrator for Claude Code |
|
|
519
505
|
|
|
520
506
|
</details>
|
|
521
507
|
|
package/README_CN.md
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://bun.sh)
|
|
14
14
|
[](https://lancedb.com)
|
|
15
|
-
[](https://modelcontextprotocol.io)
|
|
16
|
+
[](https://github.com/AliceLJY/recallnest)
|
|
17
17
|
[](https://github.com/AliceLJY/recallnest)
|
|
18
18
|
|
|
19
19
|
[English](README.md) | **简体中文** | [Roadmap](ROADMAP.md)
|
|
@@ -26,22 +26,8 @@
|
|
|
26
26
|
|
|
27
27
|
编程 Agent 每开一个窗口就失忆。项目配置、调试决策、实体映射——散落在 Claude Code、Codex、Gemini CLI 三个终端里,互相不通。
|
|
28
28
|
|
|
29
|
-
RecallNest 的解法:**一个 LanceDB
|
|
29
|
+
RecallNest 的解法:**一个 LanceDB 驱动的记忆层,供你的编程 Agent 共读共写**。一个窗口存入的上下文,另一个窗口自动召回。会话退出时 checkpoint,启动时 resume。记忆会衰减、演化、自组织——不是简单的日志堆积。
|
|
30
30
|
|
|
31
|
-
### 基准测试:LongMemEval (ICLR 2025)
|
|
32
|
-
|
|
33
|
-
在 6 项记忆能力、500 个问题上评估([评测方法](https://arxiv.org/abs/2407.15168)):
|
|
34
|
-
|
|
35
|
-
| | RecallNest | 纯向量基线 | 差值 |
|
|
36
|
-
|---|---|---|---|
|
|
37
|
-
| 总体准确率 | **29.6%** | 24.2% | **+5.4pp** |
|
|
38
|
-
| 用户事实 | **64.3%** | 52.9% | +11.4pp |
|
|
39
|
-
| 知识更新 | **43.6%** | 42.3% | +1.3pp |
|
|
40
|
-
| 弃权率 | **55.6%** | 67.8% | **-12.2pp** |
|
|
41
|
-
|
|
42
|
-
**全部 6 项胜出或持平**,无任何退步。混合检索管线(BM25 + 向量 + 时效性 + RIF 去重)比纯向量搜索多召回 12.2% 的相关上下文。
|
|
43
|
-
|
|
44
|
-
---
|
|
45
31
|
|
|
46
32
|
## 快速开始
|
|
47
33
|
|
|
@@ -167,6 +153,7 @@ bun run src/ui-server.ts
|
|
|
167
153
|
| **会话蒸馏** | 3 层对话压缩:微缩 → LLM 结构化摘要 → 知识提取 |
|
|
168
154
|
| **对话导入** | 支持 Claude Code、Claude.ai、ChatGPT、Slack、纯文本 |
|
|
169
155
|
| **Topic Tags** | scope 内 topic 分区,自动检测,搜索时可过滤 |
|
|
156
|
+
| **关联 scope 侧栏** | 显式传 `includeRelatedScopes` 时,按 `scopeRelations` 白名单额外检索,并和主 scope 排序分开展示 |
|
|
170
157
|
|
|
171
158
|
### 记忆生命周期与治理
|
|
172
159
|
|
|
@@ -233,6 +220,8 @@ v2.1 加入了哲学记忆行为;v2.2 补齐前沿扫描(ACC、PI-LLM、TSM
|
|
|
233
220
|
|
|
234
221
|
- **时间有效性窗口** *(TSM / TiMem / Zep)* —— `store_memory` 接受 `validUntil`(过期时间)和 `eventTime`(事件发生时间)。`search_memory` 支持 `validAt`(时间点查询)和 `includeExpired`(降权 80% 而非隐藏)。auto-GC 对过期记忆施加 2 倍衰减加速。
|
|
235
222
|
|
|
223
|
+
- **Usage-adjusted Auto-GC** *(默认关闭)* —— `RECALLNEST_USAGE_DECAY=true` 且建构式检索 use 信号开启时,GC 专用分支才会对 cold 记忆的 frequency 项打折;在线检索排序不读取这个分支。
|
|
224
|
+
|
|
236
225
|
---
|
|
237
226
|
|
|
238
227
|
## v2.3 新增:Connector 生态 + 数据源健康
|
|
@@ -264,7 +253,7 @@ v2.2 强化了检索质量;v2.3 通过标准 Connector 框架和运维健康
|
|
|
264
253
|
│ 集成层 │
|
|
265
254
|
│ ┌─────────────────────┐ ┌────────────────────────────┐ │
|
|
266
255
|
│ │ MCP Server │ │ HTTP API Server │ │
|
|
267
|
-
│ │
|
|
256
|
+
│ │ 42 个工具 │ │ 21 个端点 │ │
|
|
268
257
|
│ └─────────┬───────────┘ └──────────┬─────────────────┘ │
|
|
269
258
|
└────────────┼─────────────────────────┼───────────────────┘
|
|
270
259
|
└──────────┬──────────────┘
|
|
@@ -325,22 +314,23 @@ RecallNest 提供两种接口:
|
|
|
325
314
|
---
|
|
326
315
|
|
|
327
316
|
<details>
|
|
328
|
-
<summary><strong>MCP 工具(
|
|
317
|
+
<summary><strong>MCP 工具(42 个)</strong></summary>
|
|
329
318
|
|
|
330
319
|
| 工具 | 说明 |
|
|
331
320
|
|------|------|
|
|
332
|
-
| `workflow_observe` | 存储 append-only
|
|
321
|
+
| `workflow_observe` | 存储 append-only 工作流观察记录;支持 `idempotencyKey` 防重复写入 |
|
|
333
322
|
| `workflow_health` | 查看工作流健康状态或降级面板 |
|
|
334
323
|
| `workflow_evidence` | 构建工作流证据包 |
|
|
335
324
|
| `store_memory` | 存储一条持久记忆 |
|
|
336
325
|
| `store_workflow_pattern` | 存储可复用工作流模式 |
|
|
337
326
|
| `store_case` | 存储问题-方案对 |
|
|
338
327
|
| `promote_memory` | 显式升级 evidence 为持久记忆 |
|
|
328
|
+
| `promote_scan` | 扫描近期 evidence,自动晋升合格记忆为持久存储 |
|
|
339
329
|
| `list_conflicts` | 列出或查看冲突候选 |
|
|
340
330
|
| `audit_conflicts` | 汇总过期/升级的冲突优先级 |
|
|
341
331
|
| `escalate_conflicts` | 预览或应用冲突升级元数据 |
|
|
342
332
|
| `resolve_conflict` | 解决冲突(保留 / 接受 / 合并) |
|
|
343
|
-
| `checkpoint_session` |
|
|
333
|
+
| `checkpoint_session` | 保存当前工作状态;支持 `idempotencyKey` 防重复写入 |
|
|
344
334
|
| `latest_checkpoint` | 查看最近的 checkpoint |
|
|
345
335
|
| `resume_context` | 为新窗口编排启动上下文 |
|
|
346
336
|
| `search_memory` | 任务开始时主动召回 |
|
|
@@ -416,7 +406,7 @@ bun run src/cli.ts distill "topic" --profile writing
|
|
|
416
406
|
bun run src/cli.ts stats
|
|
417
407
|
|
|
418
408
|
# 工作流观察
|
|
419
|
-
bun run src/cli.ts workflow-observe resume_context "Fresh window skipped continuity recovery." --outcome missed --scope project:recallnest
|
|
409
|
+
bun run src/cli.ts workflow-observe resume_context "Fresh window skipped continuity recovery." --outcome missed --scope project:recallnest --idempotency-key smoke-2026-06-26
|
|
420
410
|
bun run src/cli.ts workflow-health resume_context --scope project:recallnest
|
|
421
411
|
bun run src/cli.ts workflow-evidence checkpoint_session --scope project:recallnest
|
|
422
412
|
|