recallnest 2.3.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +187 -0
- package/README.md +49 -38
- package/README_CN.md +46 -31
- 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 +25 -4
- package/src/__tests__/access-tracker-novelty.test.ts +304 -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__/api-server-security.test.ts +102 -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__/belief-history.test.ts +220 -0
- package/src/__tests__/canary-eval.test.ts +114 -0
- package/src/__tests__/capture-engine.test.ts +1328 -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 +116 -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 +945 -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 +418 -0
- package/src/__tests__/connector-v1.test.ts +181 -0
- package/src/__tests__/consolidation-engine.test.ts +430 -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 +262 -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 +129 -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 +780 -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__/freshness.test.ts +186 -0
- package/src/__tests__/graph-export.test.ts +489 -0
- package/src/__tests__/hotness-blend.test.ts +283 -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-client-pivot.test.ts +628 -0
- package/src/__tests__/llm-consolidation.test.ts +226 -0
- package/src/__tests__/maintenance-locks.test.ts +189 -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 +282 -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__/noise-prototype-bank.test.ts +280 -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 +333 -0
- package/src/__tests__/pivot-apply.test.ts +373 -0
- package/src/__tests__/pivot-distill-supervisor.test.ts +457 -0
- package/src/__tests__/pivot-distill.test.ts +1178 -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 +282 -0
- package/src/__tests__/preference-slots.test.ts +205 -0
- package/src/__tests__/prospective-memory.test.ts +283 -0
- package/src/__tests__/pull-from-macbook-sync-only.test.ts +679 -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-gate.test.ts +266 -0
- package/src/__tests__/recall-governor.test.ts +227 -0
- package/src/__tests__/recall-mode.test.ts +64 -0
- package/src/__tests__/resolve-db-path.test.ts +130 -0
- package/src/__tests__/resolve-tier.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-eval.test.ts +163 -0
- package/src/__tests__/retrieval-trace.test.ts +213 -0
- package/src/__tests__/retriever-boundary-weight.test.ts +136 -0
- package/src/__tests__/retriever-lazy-init-dispatch.test.ts +123 -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 +654 -0
- package/src/__tests__/skill-verifier.test.ts +122 -0
- package/src/__tests__/source-heartbeat.test.ts +250 -0
- package/src/__tests__/stable-context-length-contract.test.ts +62 -0
- package/src/__tests__/store-patch-metadata.test.ts +205 -0
- package/src/__tests__/store-read-consistency.test.ts +122 -0
- package/src/__tests__/store-schema-migration.test.ts +87 -0
- package/src/__tests__/store-scope-audit.test.ts +81 -0
- package/src/__tests__/store-upsert.test.ts +201 -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-terminal-roster.test.ts +127 -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__/ui-server-security.test.ts +93 -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 +90 -34
- package/src/activity-counter.ts +46 -18
- package/src/adaptive-retrieval.ts +11 -0
- package/src/aliases.ts +133 -0
- package/src/api-server.ts +36 -9
- package/src/audit-log.ts +4 -2
- package/src/auto-consolidation.ts +8 -3
- package/src/auto-gc.ts +85 -21
- package/src/auto-recall.ts +61 -1
- package/src/belief-history.ts +164 -0
- package/src/capture-engine.ts +142 -32
- package/src/cli.ts +268 -41
- package/src/confidence-tracker.ts +36 -18
- package/src/conflict-engine.ts +24 -3
- package/src/consolidation-engine.ts +255 -23
- package/src/context-composer-stable-selection.ts +7 -1
- package/src/context-composer.ts +8 -1
- package/src/data-checkup.ts +96 -7
- package/src/decay-engine.ts +59 -7
- package/src/distill-lock.ts +194 -15
- package/src/doctor.ts +13 -4
- package/src/dream-pipeline.ts +473 -41
- package/src/env-config.ts +118 -0
- package/src/error-signature.ts +153 -0
- package/src/error-taxonomy.ts +115 -0
- package/src/eval.ts +402 -14
- package/src/freshness.ts +192 -0
- package/src/http-request-policy.ts +148 -0
- package/src/idempotency.ts +8 -0
- package/src/ingest.ts +308 -12
- package/src/kg-extractor.ts +13 -3
- package/src/kg-store.ts +236 -44
- package/src/llm-client.ts +106 -11
- package/src/llm-consolidation.ts +2 -1
- package/src/mcp-server.ts +87 -1800
- package/src/mcp-tool-deps.ts +48 -0
- package/src/mcp-tools-advanced.ts +954 -0
- package/src/mcp-tools-core.ts +637 -0
- package/src/mcp-tools-governance.ts +475 -0
- package/src/memory-boundaries.ts +26 -3
- package/src/memory-evolution.ts +73 -1
- package/src/memory-health-rebalance.ts +4 -0
- package/src/memory-lint.ts +183 -10
- package/src/memory-output.ts +129 -4
- package/src/memory-promotion.ts +246 -0
- package/src/memory-schema.ts +25 -2
- package/src/memory-store-port.ts +46 -0
- package/src/multi-vector.ts +2 -1
- package/src/narrative-schema.ts +2 -1
- package/src/noise-filter.ts +57 -6
- package/src/noise-prototype-bank.ts +408 -0
- package/src/pii-detector.ts +207 -5
- package/src/pivot-apply.ts +399 -0
- package/src/preference-matcher.ts +37 -3
- package/src/query-expander.ts +90 -9
- package/src/recall-gate.ts +305 -0
- package/src/result-synthesizer.ts +2 -1
- package/src/retention-policy.ts +2 -1
- package/src/retrieval-profiles.ts +46 -4
- package/src/retriever.ts +354 -157
- package/src/retroactive-boost.ts +6 -2
- package/src/runtime-config.ts +78 -6
- 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 +304 -48
- package/src/skill-schema.ts +16 -3
- package/src/skill-verifier.ts +152 -0
- package/src/store.ts +321 -57
- package/src/term-registry.ts +35 -0
- package/src/tool-output-compressor.ts +3 -1
- package/src/ui-server.ts +9 -1
- package/src/usage-tracker.ts +242 -0
- package/src/version-manager.ts +3 -2
- package/src/version.ts +19 -0
- 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,187 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v2.6.0 — Cross-process consistency and reliable distribution (2026-08-13)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Claude Code marketplace installation now registers the RecallNest MCP server and continuity skill instead of shipping metadata only. Jina credentials use sensitive plugin configuration; generated config and LanceDB data live under `${CLAUDE_PLUGIN_DATA}` and survive plugin updates.
|
|
8
|
+
- Kimi, AGY/Antigravity, and minis transcript sources are recognized across ingestion, memory-boundary policy, and term resolution.
|
|
9
|
+
- Retrieval audit logging is connected to the live retriever, and the opt-in layer-admission shadow/enforcement pipeline is available through `RECALLNEST_LAYER_ADMISSION=observe|on`.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- `package.json` is now the single version source for CLI output, MCP server metadata, HTTP health responses, npm metadata, and the Claude Code marketplace. All public surfaces report `2.6.0`.
|
|
14
|
+
- LanceDB uses strong cross-process read consistency by default. `RECALLNEST_READ_CONSISTENCY_INTERVAL=<seconds>` selects bounded staleness; `off` restores the legacy unchecked handle behavior.
|
|
15
|
+
- Belief changes preserve prior rows as `superseded`; procedural memories avoid time decay; cold-start scoring, length normalization, and short single-token queries have safer retrieval behavior.
|
|
16
|
+
- `dream` adds failure classification, wall-clock budgeting, vector refill before clustering, and output assertions so a successful status means useful work was produced.
|
|
17
|
+
- `@modelcontextprotocol/sdk` is updated to 1.30.0, with both npm and Bun lockfiles aligned.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Empty legacy LanceDB tables now receive schema migrations before their first new write.
|
|
22
|
+
- Long-lived retrievers now see writes committed by CLI ingest and other processes without a restart.
|
|
23
|
+
- Runtime and maintenance scripts resolve the configured database path consistently instead of silently opening a second database.
|
|
24
|
+
- Local HTTP access is constrained to the intended loopback boundary, and tracked credential scans cover release contents without printing secret values.
|
|
25
|
+
- Per-cluster LLM timeouts no longer abort an entire `dream` scope; failures are counted, single-scope runs emit the same metrics contract as automatic runs, and the launch wrapper no longer fails after successful work because of an undefined log-file variable.
|
|
26
|
+
|
|
27
|
+
### Upgrade notes
|
|
28
|
+
|
|
29
|
+
- v2.5.4 databases open in place; no export/import step is required. The schema migration also covers empty tables.
|
|
30
|
+
- Plugin users need Bun and will be prompted for a Jina API key on first install. Existing manual-clone installations keep their current configuration and data path.
|
|
31
|
+
- Retrievals now add audit rows. `audit.jsonl` has no automatic rotation; archive it when it approaches 50 MB.
|
|
32
|
+
- Layer admission remains off by default. Use `observe` before enabling enforcement on an existing memory corpus.
|
|
33
|
+
|
|
34
|
+
### Verification
|
|
35
|
+
|
|
36
|
+
- 2,152 tests pass across 152 files.
|
|
37
|
+
- A database written by the remote v2.5.4 release was opened, read, and extended by v2.6.0 in an isolated upgrade smoke test.
|
|
38
|
+
- An isolated Claude Code installation connected to the plugin MCP server with all 43 tools; packed npm installs reported `2.6.0` from both `recallnest` and the legacy `local-memory` alias.
|
|
39
|
+
|
|
40
|
+
## v2.5.4 — npm 发布边界修复 (2026-07-17)
|
|
41
|
+
|
|
42
|
+
- package.json 改为严格 files 白名单,只发布运行所需源码、示例配置、UI、集成脚本和必要文档。
|
|
43
|
+
- 新增实际 tarball 内容检查:环境文件、运行配置、日志、会话、数据库、密钥材料和开发工作树一旦进入包即失败。
|
|
44
|
+
- npm publish 前自动执行同一检查,CI 也验证最终包清单,避免本地运行数据再次随包发布。
|
|
45
|
+
- 补齐 npm 包中的 UI 资源与 README 引用文档,并将中文 README 的 MCP 工具数对齐为 43。
|
|
46
|
+
- 清理历史可视化 HTML 中遗留的两段 provider-shaped token,并增加只报路径/行号的 tracked-file 凭据扫描。
|
|
47
|
+
- `doctor` 不再显示 API key 前缀,只报告是否已设置。
|
|
48
|
+
|
|
49
|
+
> **CHANGELOG gap notice**: v1.3.1 (2026-03-12) → v2.5.2 (2026-05-27) 中间有较长开发期未更新 CHANGELOG。v2.5+ 系列以下开始恢复跟踪。历史 v1.4 - v2.4 间的变更见 git log。
|
|
50
|
+
|
|
51
|
+
## v2.5.3 — 诊断工具失明 + 失效功能 + score 显示 三批修复 (2026-05-29)
|
|
52
|
+
|
|
53
|
+
一轮临床向审查(CC 多 agent + Codex trio 二审)发现的一组修复:诊断工具在生产给虚假健康信号、三个功能完全失效、检索 score 显示失去区分度。
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- **三处让功能完全失效的 bug**:
|
|
58
|
+
- `distill_session` MCP tool 引用未声明的 `llmClient` → 调用必抛 ReferenceError、工具 100% 不可用(SDK 接住转错误响应,server 不崩但永远 distill 不了)。改用模块级已初始化的 `llm`。
|
|
59
|
+
- `ingest --no-llm` 空操作:commander 把 `--no-llm` 解析成 `options.llm=false`,代码却读 `options.noLlm`(恒 undefined)→ 想跳过 LLM 实际仍全程调用。改读 `options.llm===false`,Gemini/memory 两源同步遵守。
|
|
60
|
+
- `tool-output-compressor` 正则 lookahead 末项 `\z` 在 JS 中是字面字符 z(非锚点)→ 末尾工具输出漏压缩、在字面 z 处误截断。改为 `(?![\s\S])`。
|
|
61
|
+
- **`memory_lint` / `data_checkup` 因空向量假报健康** — `store.list()` 为性能返回 `vector:[]`,而矛盾/去重/维度/干扰检查全靠向量算相似度 → cosine 恒 0 → 静默失效(实测 contradictions=0/duplicates=0、维度检查把"全 0 维"假报 OK)。现在经 `store.getVectors()`(已加分批)补回真实向量再检查;维度检查排除取不到向量的条目、空库才判 ok。真实库验证:矛盾 0→174、重复 0→1473。
|
|
62
|
+
- **诊断扫描截断不透明** — `memory_lint`/`data_checkup` 只扫最近 10000 条(库 9 万+),新增 `scanLimited`/`totalAvailable` 截断披露。
|
|
63
|
+
- **检索 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"。
|
|
64
|
+
|
|
65
|
+
### Internal
|
|
66
|
+
|
|
67
|
+
- 修测试 mock 失真:`memory-lint` / `data-checkup` / `source-heartbeat` 三个测试的 mock store 原本直接返回带向量 entry(与生产 `vector:[]` 不符,正是它放过了诊断哑火 bug),改为复刻真实行为(list 空向量 + getVectors 补回)。
|
|
68
|
+
- 基线 1525 tests / 0 fail。
|
|
69
|
+
|
|
70
|
+
## v2.5.2 — store.delete(prefix) bug fix (2026-05-27)
|
|
71
|
+
|
|
72
|
+
Codex trio review (2026-05-27, ref `~/Desktop/codex-v2.5.1-fix-review-20260527.md`) 发现的独立非阻塞 bug。
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
|
|
76
|
+
- **`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 的潜在风险修补。
|
|
77
|
+
- 基线 1523 / 0 fail(修补未引入新 test,依赖 Codex 上轮 LanceDB LIKE 临时验证 + 全量回归测试不破坏)
|
|
78
|
+
|
|
79
|
+
## v2.5.1 — P0 production path: API exposure surface fixes (2026-05-27)
|
|
80
|
+
|
|
81
|
+
Fresh CC session 第一次真用 `store_skill → workflow_observe(skillId=prefix) → retrieve_skill` 链路就**死锁**——返回 `Skill 1d9420b2 → not updated (skill_not_found)`。诊断出 3 处 API 暴露面割裂。
|
|
82
|
+
|
|
83
|
+
Codex trio 二审评分 **8.5/10**,子 agent production smoke 验证 successCount 0→1 真递增 ✅。
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- **`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 验证)。
|
|
88
|
+
- **`store_skill` MCP handler 返回加 `Skill ID: <full UUID>` 行** — 之前只显示 `Stored skill <8 hex prefix>` 截断到 8 位,agent 拿不到完整 UUID 后续没法传给 `workflow_observe`。保留 short prefix 显示给人看。
|
|
89
|
+
- **`retrieve_skill` MCP handler markdown 加 `**ID**:` + `**Outcome counts**: success=N failure=M [(last: ISO)]`** — 之前不暴露 id / successCount / failureCount / lastRefinedAt,agent 看不到反馈循环效果。
|
|
90
|
+
- **`recordSkillOutcome` 用 `entry.id` 调 `store.update`** — 之前用 caller-provided skillId(可能 prefix)直接调 store.update,ambiguous prefix 在写操作风险翻倍;改用 getById 已 disambiguated 的完整 entry.id。
|
|
91
|
+
|
|
92
|
+
### Notes
|
|
93
|
+
|
|
94
|
+
- **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`,不会误更新。
|
|
95
|
+
- **Codex 5 步 smoke troubleshooting**: 见 `~/Desktop/codex-v2.5.1-fix-review-20260527.md` line 186-192。
|
|
96
|
+
|
|
97
|
+
### Tests
|
|
98
|
+
|
|
99
|
+
- 基线 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`)
|
|
100
|
+
|
|
101
|
+
## v2.5.0 — SkillImplementationType schema 收缩 (2026-05-27)
|
|
102
|
+
|
|
103
|
+
brgsk《agent memory: an anatomy》借鉴审计 + Codex trio 二审建议 "P1 选收缩 / 删承诺,不接 evaluator"。
|
|
104
|
+
|
|
105
|
+
### Changed (Breaking)
|
|
106
|
+
|
|
107
|
+
- **`SkillImplementationTypeSchema` 收缩到 `["instruction_sequence"]` 唯一值** — 原 enum 含 `bash` / `python` / `mcp_tool_chain` / `instruction_sequence` 四种,但 `implementation` 字段**从未真执行**(无 evaluator,仅作 context 给 agent 读)——是 schema 撒谎暗示可执行。现在明确 skill 是 **agent-readable runbook** 而非可执行物。
|
|
108
|
+
- **`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."`
|
|
109
|
+
- **`store_skill` MCP tool description** 更新强调 "agent-readable skill runbook" + "RecallNest does NOT execute skills"。
|
|
110
|
+
|
|
111
|
+
### Migration
|
|
112
|
+
|
|
113
|
+
- 新写入受新 schema 约束,`bash` / `python` / `mcp_tool_chain` 会被拒。
|
|
114
|
+
- **`parseSkillFromEntry` 用 type cast 不走 schema 校验** — 历史 `bash` / `python` skill records 仍可 retrieve(backward-compat path)。
|
|
115
|
+
- production 库 2026-05-27 实测**无真实 skill 数据**(3 条 category=skills 是历史抓取噪声),破坏面接近 zero。
|
|
116
|
+
|
|
117
|
+
### Tests
|
|
118
|
+
|
|
119
|
+
- 基线 1520 → 1521 / 0 fail(删 1 个 "accepts all 4 types",加 2 个 "accepts only instruction_sequence" / "rejects pre-v2.5 implementationType values")
|
|
120
|
+
|
|
121
|
+
## v2.5.0-pre — workflow_observe ↔ skill outcome 绑定 (2026-05-27)
|
|
122
|
+
|
|
123
|
+
P0 反馈闭环:让 skill 的 `successCount` / `failureCount` 真有真实使用回流。commit `09dec62`,后由 v2.5.0 schema 收缩 + v2.5.1 API 暴露面 + v2.5.2 store.delete 补丁一起构成完整 P0 工作。
|
|
124
|
+
|
|
125
|
+
### New
|
|
126
|
+
|
|
127
|
+
- **`WorkflowObservationInputSchema` 加可选 `skillId` 字段** — `workflow_observe` 带 skillId + outcome 时自动 bump skill 的 successCount/failureCount,回写 lastRefinedAt。
|
|
128
|
+
- **`recordSkillOutcome()` 导出函数** — `skill-engine.ts`,二分映射:`success` → successCount +1;`failure` / `corrected` / `missed` → failureCount +1。返回结构化结果不抛错,skill_not_found / not_a_skill / metadata_missing 静默跳过。
|
|
129
|
+
- **`mcp-server.ts workflow_observe` + `api-server.ts /v1/workflow-observe`** 接 recordSkillOutcome。
|
|
130
|
+
|
|
131
|
+
### Deployment
|
|
132
|
+
|
|
133
|
+
- **新增 `RECALLNEST_MCP_TIER=full` 环境变量需求** — `workflow_observe` 在 TOOL_TIERS 标 governance,需 full tier 才暴露给 MCP ToolSearch。MacBook + mini × CC + Codex 4 处 config 已加(args inline / [env] 段)。
|
|
134
|
+
|
|
135
|
+
### Tests
|
|
136
|
+
|
|
137
|
+
- 基线 1486 → 1520 / 0 fail(+13 新 case 覆盖 outcome 映射 + 错误路径 + 元数据完整性 + 时间戳;+1 顺手修 workflow-observation.test.ts dashboard 漏传 now 参数 pre-existing bug)
|
|
138
|
+
|
|
139
|
+
## v1.3.1 — Upstream Sync (2026-03-12)
|
|
140
|
+
|
|
141
|
+
Synced with [CortexReach/memory-lancedb-pro](https://github.com/CortexReach/memory-lancedb-pro) master (v1.1.0-beta.6+).
|
|
142
|
+
|
|
143
|
+
### Changed
|
|
144
|
+
|
|
145
|
+
- **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).
|
|
146
|
+
- **Noise filter**: Added Chinese meta-question patterns (`你记得`, `记不记得`, `还记得…吗`, `上次…说`, `之前…提到`) and diagnostic artifact filter (synced from upstream beta.3).
|
|
147
|
+
- **README**: Updated upstream credit link from `win4r/memory-lancedb-pro` to `CortexReach/memory-lancedb-pro`, added CortexReach team acknowledgement.
|
|
148
|
+
|
|
149
|
+
## v1.2.0 — First Distributable Release (2026-03-08)
|
|
150
|
+
|
|
151
|
+
The goal of this release: a new user can go from `git clone` to first search result in 15 minutes.
|
|
152
|
+
|
|
153
|
+
### New
|
|
154
|
+
|
|
155
|
+
- **`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.
|
|
156
|
+
- **`lm demo`** — run sample queries to see RecallNest in action before writing your own.
|
|
157
|
+
- **`config.json.example`** — ships with absolute `~/.recallnest/data/lancedb` path. New users copy this instead of editing the tracked config.
|
|
158
|
+
- **GitHub Actions CI** — runs `doctor --ci` and TypeScript check on every push.
|
|
159
|
+
- **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.
|
|
160
|
+
|
|
161
|
+
### Changed
|
|
162
|
+
|
|
163
|
+
- **README rewritten** — added Prerequisites table (Bun + Jina key), 5-step quickstart with expected output, Troubleshooting section.
|
|
164
|
+
- **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.
|
|
165
|
+
- **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.
|
|
166
|
+
- **`config.json` untracked** — added to `.gitignore` so user config is not overwritten by `git pull`.
|
|
167
|
+
|
|
168
|
+
### Fixed
|
|
169
|
+
|
|
170
|
+
- Auto-detect hint in `doctor` now shows a real example path based on the current user's home directory.
|
|
171
|
+
- `findConfigPath()` error message now suggests `cp config.json.example config.json` when the example file exists.
|
|
172
|
+
|
|
173
|
+
## v1.1.0 — Hybrid Retrieval + MCP + UI (2026-02)
|
|
174
|
+
|
|
175
|
+
- Hybrid retrieval: LanceDB vector + BM25 keyword search with configurable weights
|
|
176
|
+
- Retrieval profiles: `default`, `writing`, `debug`, `fact-check`
|
|
177
|
+
- MCP server with 9 tools: search, explain, distill, brief, pin, list assets/pins, export, stats
|
|
178
|
+
- Local web workbench UI at `http://localhost:4317`
|
|
179
|
+
- Multi-source ingest: Claude Code transcripts, Codex sessions, Gemini sessions, markdown notes
|
|
180
|
+
- Asset system: pin, brief, export with re-indexing
|
|
181
|
+
- Time-aware scoring with configurable decay
|
|
182
|
+
|
|
183
|
+
## v1.0.0 — Initial Release (2026-01)
|
|
184
|
+
|
|
185
|
+
- Basic vector search over Claude Code transcripts
|
|
186
|
+
- LanceDB storage with Jina embeddings
|
|
187
|
+
- CLI interface
|
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# RecallNest
|
|
4
4
|
|
|
5
|
-
**Shared Memory Layer for Claude Code, Codex,
|
|
5
|
+
**Shared Memory Layer for Any MCP Client — Claude Code, Codex, Kimi, Antigravity, Gemini CLI**
|
|
6
6
|
|
|
7
|
-
*One memory.
|
|
7
|
+
*One memory. Every terminal. Context that survives across windows.*
|
|
8
8
|
|
|
9
9
|
A local-first memory system backed by LanceDB that turns scattered conversation history into reusable knowledge — shared across your coding agents, recalled automatically.
|
|
10
10
|
|
|
@@ -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/actions/workflows/ci.yml)
|
|
17
17
|
[](https://github.com/AliceLJY/recallnest)
|
|
18
18
|
|
|
19
19
|
**English** | [简体中文](README_CN.md) | [Roadmap](ROADMAP.md)
|
|
@@ -24,24 +24,10 @@ A local-first memory system backed by LanceDB that turns scattered conversation
|
|
|
24
24
|
|
|
25
25
|
## Why RecallNest?
|
|
26
26
|
|
|
27
|
-
Coding agents forget everything between windows. Your context — project configs, debugging decisions, entity mappings — is scattered across Claude Code, Codex, and
|
|
27
|
+
Coding agents forget everything between windows. Your context — project configs, debugging decisions, entity mappings — is scattered across Claude Code, Codex, Kimi, Antigravity — and every other terminal you open — 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
|
|
|
@@ -54,7 +40,11 @@ Wins or ties in **all 6 categories**, with no regression. The hybrid retrieval p
|
|
|
54
40
|
|
|
55
41
|
RecallNest starts automatically with Claude Code. No manual MCP config needed.
|
|
56
42
|
|
|
57
|
-
|
|
43
|
+
Claude Code prompts for a Jina API key during installation. The key is stored through Claude Code's sensitive plugin configuration, while the generated config and LanceDB database live in the plugin's persistent data directory rather than the versioned plugin cache.
|
|
44
|
+
|
|
45
|
+
> The Claude Code plugin and npm package share one release version and are updated together.
|
|
46
|
+
>
|
|
47
|
+
> **Requires:** [Bun](https://bun.sh). Dependencies install on first start.
|
|
58
48
|
|
|
59
49
|
### Option B: npm install
|
|
60
50
|
|
|
@@ -153,7 +143,7 @@ bun run src/ui-server.ts
|
|
|
153
143
|
| Capability | Description |
|
|
154
144
|
|---|---|
|
|
155
145
|
| **CC Plugin** | Install in Claude Code with one command — no manual config |
|
|
156
|
-
| **Shared Index** | One LanceDB store
|
|
146
|
+
| **Shared Index** | One LanceDB store shared by every terminal that speaks MCP |
|
|
157
147
|
| **Dual Interface** | MCP (stdio) for CLI tools + HTTP API for custom agents |
|
|
158
148
|
| **One-Click Setup** | Integration scripts install MCP access and continuity rules |
|
|
159
149
|
|
|
@@ -167,6 +157,7 @@ bun run src/ui-server.ts
|
|
|
167
157
|
| **Session Distiller** | 3-layer conversation compression: microcompact → LLM summary → knowledge extraction |
|
|
168
158
|
| **Conversation Import** | Import from Claude Code, Claude.ai, ChatGPT, Slack, and plaintext |
|
|
169
159
|
| **Topic Tags** | Intra-scope topic partitioning — auto-detected, filterable in search |
|
|
160
|
+
| **Related Scope Sidecar** | Opt-in `includeRelatedScopes` search over configured `scopeRelations`, shown separately from the main scoped ranking |
|
|
170
161
|
|
|
171
162
|
### Memory Lifecycle & Governance
|
|
172
163
|
|
|
@@ -205,6 +196,26 @@ bun run src/ui-server.ts
|
|
|
205
196
|
|
|
206
197
|
---
|
|
207
198
|
|
|
199
|
+
## New in v2.6: Reliable Cross-Process Memory and Distribution
|
|
200
|
+
|
|
201
|
+
v2.6 turns the development since v2.5.4 into a release-ready upgrade:
|
|
202
|
+
|
|
203
|
+
- **Cross-process visibility** — LanceDB now checks for external commits on every read by default, so resident MCP/API/UI processes see writes from CLI ingestion without a restart. Set `RECALLNEST_READ_CONSISTENCY_INTERVAL=<seconds>` for bounded staleness or `off` for the legacy unchecked behavior.
|
|
204
|
+
- **Safer memory evolution** — belief changes preserve the old row as `superseded`; procedural memories avoid time decay; cold-start and length-normalization behavior no longer suppress short entity queries or stable memories.
|
|
205
|
+
- **More reliable consolidation** — `dream` now distinguishes failure classes, honors wall-clock budgets, refills vectors before semantic clustering, and asserts that successful runs actually produced work.
|
|
206
|
+
- **Broader conversation coverage** — Kimi, AGY/Antigravity, and minis sources are recognized across ingestion, scope boundaries, and term resolution.
|
|
207
|
+
- **One public version** — npm metadata, CLI `--version`, MCP handshakes, HTTP health responses, and the Claude Code marketplace all follow the `2.6.0` release contract.
|
|
208
|
+
- **Installable Claude Code plugin** — installation now registers the 43-tool MCP server and continuity skill, asks for the Jina key through sensitive plugin configuration, and keeps config plus LanceDB data in Claude Code's persistent plugin data directory.
|
|
209
|
+
|
|
210
|
+
### Upgrading from v2.5.4
|
|
211
|
+
|
|
212
|
+
- Existing LanceDB data is opened in place. Legacy tables missing newer fields are migrated automatically, including empty tables.
|
|
213
|
+
- Plugin data survives plugin updates because it is stored outside the versioned cache. A manual clone continues to use its existing `config.json` and database path.
|
|
214
|
+
- Retrieval auditing now includes read operations. `audit.jsonl` has no automatic rotation yet; consider archiving it if it approaches 50 MB.
|
|
215
|
+
- `RECALLNEST_LAYER_ADMISSION` remains opt-in (`observe` or `on`); the default is `off`.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
208
219
|
## New in v2.1: Philosophy-Informed Memory
|
|
209
220
|
|
|
210
221
|
v2.0 built the operational memory platform; v2.1 added philosophy-informed memory behavior.
|
|
@@ -233,6 +244,8 @@ v2.1 added philosophy-informed behavior; v2.2 closes the last three engine-layer
|
|
|
233
244
|
|
|
234
245
|
- **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
246
|
|
|
247
|
+
- **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.
|
|
248
|
+
|
|
236
249
|
---
|
|
237
250
|
|
|
238
251
|
## New in v2.3: Connector Ecosystem + Source Health
|
|
@@ -264,7 +277,7 @@ v2.2 hardened retrieval quality; v2.3 opens RecallNest to external data sources
|
|
|
264
277
|
│ Integration Layer │
|
|
265
278
|
│ ┌─────────────────────┐ ┌────────────────────────────┐ │
|
|
266
279
|
│ │ MCP Server │ │ HTTP API Server │ │
|
|
267
|
-
│ │
|
|
280
|
+
│ │ 43 tools │ │ 21 endpoints │ │
|
|
268
281
|
│ └─────────┬───────────┘ └──────────┬─────────────────┘ │
|
|
269
282
|
└────────────┼─────────────────────────┼───────────────────┘
|
|
270
283
|
└──────────┬──────────────┘
|
|
@@ -310,7 +323,7 @@ v2.2 hardened retrieval quality; v2.3 opens RecallNest to external data sources
|
|
|
310
323
|
|
|
311
324
|
RecallNest serves two interfaces:
|
|
312
325
|
|
|
313
|
-
- **MCP** — for Claude Code,
|
|
326
|
+
- **MCP** — for any MCP client: Claude Code, Codex, Kimi, Antigravity, Gemini CLI (native tool access)
|
|
314
327
|
- **HTTP API** — for custom agents, SDK-based apps, and any HTTP client
|
|
315
328
|
|
|
316
329
|
### Agent framework examples
|
|
@@ -326,22 +339,23 @@ Examples live in [`integrations/examples/`](integrations/examples/):
|
|
|
326
339
|
---
|
|
327
340
|
|
|
328
341
|
<details>
|
|
329
|
-
<summary><strong>MCP Tools (
|
|
342
|
+
<summary><strong>MCP Tools (43 tools)</strong></summary>
|
|
330
343
|
|
|
331
344
|
| Tool | Description |
|
|
332
345
|
|------|-------------|
|
|
333
|
-
| `workflow_observe` | Store an append-only workflow observation outside regular memory |
|
|
346
|
+
| `workflow_observe` | Store an append-only workflow observation outside regular memory; accepts `idempotencyKey` for retry-safe writes |
|
|
334
347
|
| `workflow_health` | Inspect workflow observation health or show a degraded-workflow dashboard |
|
|
335
348
|
| `workflow_evidence` | Build an evidence pack for a workflow primitive |
|
|
336
349
|
| `store_memory` | Store a durable memory for future windows |
|
|
337
350
|
| `store_workflow_pattern` | Store a reusable workflow as durable `patterns` memory |
|
|
338
351
|
| `store_case` | Store a reusable problem-solution pair as durable `cases` memory |
|
|
339
352
|
| `promote_memory` | Explicitly promote evidence into durable memory |
|
|
353
|
+
| `promote_scan` | Scan recent evidence and auto-promote qualifying memories into durable storage |
|
|
340
354
|
| `list_conflicts` | List or inspect promotion conflict candidates |
|
|
341
355
|
| `audit_conflicts` | Summarize stale/escalated conflict priorities |
|
|
342
356
|
| `escalate_conflicts` | Preview or apply conflict escalation metadata |
|
|
343
357
|
| `resolve_conflict` | Resolve a stored conflict candidate (keep / accept / merge) |
|
|
344
|
-
| `checkpoint_session` | Store the current active work state outside durable memory |
|
|
358
|
+
| `checkpoint_session` | Store the current active work state outside durable memory; accepts `idempotencyKey` for retry-safe writes |
|
|
345
359
|
| `latest_checkpoint` | Inspect the latest saved checkpoint by session or scope |
|
|
346
360
|
| `resume_context` | Compose startup context for a fresh window |
|
|
347
361
|
| `search_memory` | Proactive recall at task start |
|
|
@@ -362,6 +376,7 @@ Examples live in [`integrations/examples/`](integrations/examples/):
|
|
|
362
376
|
| `store_skill` | Store an executable skill with trigger conditions and verification |
|
|
363
377
|
| `retrieve_skill` | Retrieve matching executable skills by semantic similarity |
|
|
364
378
|
| `scan_skill_promotions` | Scan cases/patterns for promotion candidates to skills |
|
|
379
|
+
| `manage_alias` | Add, remove, list, or explain user query aliases for BM25 retrieval |
|
|
365
380
|
| `list_tools` | Discover available tools by tier (core/advanced/full) |
|
|
366
381
|
| `batch_store` | Store up to 20 memories in a single call with dedup |
|
|
367
382
|
| `distill_session` | Distill a conversation into structured knowledge via 3-layer pipeline |
|
|
@@ -417,7 +432,7 @@ bun run src/cli.ts distill "topic" --profile writing
|
|
|
417
432
|
bun run src/cli.ts stats
|
|
418
433
|
|
|
419
434
|
# Workflow observation
|
|
420
|
-
bun run src/cli.ts workflow-observe resume_context "Fresh window skipped continuity recovery." --outcome missed --scope project:recallnest
|
|
435
|
+
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
436
|
bun run src/cli.ts workflow-health resume_context --scope project:recallnest
|
|
422
437
|
bun run src/cli.ts workflow-evidence checkpoint_session --scope project:recallnest
|
|
423
438
|
|
|
@@ -484,7 +499,7 @@ RecallNest is actively maintained. All major architecture phases are complete
|
|
|
484
499
|
RecallNest started as a fork of [memory-lancedb-pro](https://github.com/CortexReach/memory-lancedb-pro) and shares its core ideas around hybrid retrieval, decay modeling, and memory-as-engineering-system. The key difference:
|
|
485
500
|
|
|
486
501
|
- **memory-lancedb-pro** is an OpenClaw plugin — it adds long-term memory to a single OpenClaw agent.
|
|
487
|
-
- **RecallNest** is a standalone memory layer — it serves Claude Code, Codex,
|
|
502
|
+
- **RecallNest** is a standalone memory layer — it serves any MCP client (Claude Code, Codex, Kimi, Antigravity, Gemini CLI) simultaneously through MCP + HTTP API, with session continuity, structured assets, and conflict management built in.
|
|
488
503
|
|
|
489
504
|
## Credit
|
|
490
505
|
|
|
@@ -504,18 +519,14 @@ Part of the **小试AI** open-source AI workflow:
|
|
|
504
519
|
| Project | Description |
|
|
505
520
|
|---------|-------------|
|
|
506
521
|
| [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 |
|
|
522
|
+
| cc-empire *(private)* | Hooks/rules/methodology — the connective tissue of the whole ecosystem |
|
|
510
523
|
| [telegram-ai-bridge](https://github.com/AliceLJY/telegram-ai-bridge) | Telegram bots for Claude, Codex, and Gemini |
|
|
511
|
-
| [
|
|
512
|
-
| [
|
|
513
|
-
| [openclaw-
|
|
524
|
+
| [tg-bridge-channel](https://github.com/AliceLJY/tg-bridge-channel) | Sister Telegram bridge using Claude Agent View background sessions |
|
|
525
|
+
| [wechat-ai-bridge](https://github.com/AliceLJY/wechat-ai-bridge) | Run Claude Code / Codex / Gemini in WeChat with session management |
|
|
526
|
+
| [openclaw-tunnel](https://github.com/AliceLJY/openclaw-tunnel) | Docker ↔ host CLI bridge (maintenance mode — LanceDB test only) |
|
|
514
527
|
| [digital-clone-skill](https://github.com/AliceLJY/digital-clone-skill) | Build digital clones from corpus data |
|
|
515
528
|
| [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 |
|
|
529
|
+
| [workflow-orchestrator](https://github.com/AliceLJY/workflow-orchestrator) | Natural-language pipeline orchestrator for Claude Code |
|
|
519
530
|
|
|
520
531
|
</details>
|
|
521
532
|
|
package/README_CN.md
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
# RecallNest
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**面向任意 MCP 客户端的共享记忆层 —— Claude Code、Codex、Kimi、Antigravity、Gemini CLI**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
*一套记忆,每个终端,上下文跨窗口延续。*
|
|
8
8
|
|
|
9
|
-
基于 LanceDB
|
|
9
|
+
基于 LanceDB 的本地优先记忆系统,把散落在各个终端的对话历史沉淀为可复用知识,跨终端共享,自动召回。
|
|
10
10
|
|
|
11
11
|
[](https://github.com/AliceLJY/recallnest)
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://bun.sh)
|
|
14
14
|
[](https://lancedb.com)
|
|
15
|
-
[](https://modelcontextprotocol.io)
|
|
16
|
+
[](https://github.com/AliceLJY/recallnest/actions/workflows/ci.yml)
|
|
17
17
|
[](https://github.com/AliceLJY/recallnest)
|
|
18
18
|
|
|
19
19
|
[English](README.md) | **简体中文** | [Roadmap](ROADMAP.md)
|
|
@@ -24,24 +24,10 @@
|
|
|
24
24
|
|
|
25
25
|
## 为什么需要 RecallNest?
|
|
26
26
|
|
|
27
|
-
编程 Agent 每开一个窗口就失忆。项目配置、调试决策、实体映射——散落在 Claude Code、Codex、
|
|
27
|
+
编程 Agent 每开一个窗口就失忆。项目配置、调试决策、实体映射——散落在 Claude Code、Codex、Kimi、Antigravity 以及你打开的每一个终端里,互相不通。
|
|
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
|
|
|
@@ -54,7 +40,11 @@ RecallNest 的解法:**一个 LanceDB 驱动的记忆层,三个终端共读
|
|
|
54
40
|
|
|
55
41
|
RecallNest 随 Claude Code 自动启动,无需手动配置 MCP。
|
|
56
42
|
|
|
57
|
-
|
|
43
|
+
安装时 Claude Code 会提示填写 Jina API key。密钥由 Claude Code 的敏感插件配置保存;自动生成的配置和 LanceDB 数据库则放在插件持久数据目录,不会混进按版本更新的插件缓存。
|
|
44
|
+
|
|
45
|
+
> Claude Code 插件与 npm 包共用同一个发布版本,并随版本发布同步更新。
|
|
46
|
+
>
|
|
47
|
+
> **前置要求:** [Bun](https://bun.sh)。首次启动自动安装依赖。
|
|
58
48
|
|
|
59
49
|
### 方式 B:npm 安装
|
|
60
50
|
|
|
@@ -153,7 +143,7 @@ bun run src/ui-server.ts
|
|
|
153
143
|
| 能力 | 说明 |
|
|
154
144
|
|---|---|
|
|
155
145
|
| **CC Plugin** | 一行命令装入 Claude Code,无需手动配置 MCP |
|
|
156
|
-
| **共享索引** |
|
|
146
|
+
| **共享索引** | 所有支持 MCP 的终端共用同一个 LanceDB 存储 |
|
|
157
147
|
| **双通道接入** | MCP(stdio)给 CLI 工具 + HTTP API 给自定义 Agent |
|
|
158
148
|
| **一键接入** | 集成脚本同时安装 MCP 和 continuity 规则 |
|
|
159
149
|
|
|
@@ -167,6 +157,7 @@ bun run src/ui-server.ts
|
|
|
167
157
|
| **会话蒸馏** | 3 层对话压缩:微缩 → LLM 结构化摘要 → 知识提取 |
|
|
168
158
|
| **对话导入** | 支持 Claude Code、Claude.ai、ChatGPT、Slack、纯文本 |
|
|
169
159
|
| **Topic Tags** | scope 内 topic 分区,自动检测,搜索时可过滤 |
|
|
160
|
+
| **关联 scope 侧栏** | 显式传 `includeRelatedScopes` 时,按 `scopeRelations` 白名单额外检索,并和主 scope 排序分开展示 |
|
|
170
161
|
|
|
171
162
|
### 记忆生命周期与治理
|
|
172
163
|
|
|
@@ -205,6 +196,26 @@ bun run src/ui-server.ts
|
|
|
205
196
|
|
|
206
197
|
---
|
|
207
198
|
|
|
199
|
+
## v2.6 新增:跨进程一致性与可靠分发
|
|
200
|
+
|
|
201
|
+
v2.6 把 v2.5.4 以来的开发整理成一版可升级、可安装、版本口径一致的正式候选:
|
|
202
|
+
|
|
203
|
+
- **跨进程即时可见** —— LanceDB 默认每次读取都检查外部提交,常驻 MCP/API/UI 无需重启即可看见 CLI ingest 写入。可用 `RECALLNEST_READ_CONSISTENCY_INTERVAL=<秒>` 设置允许的延迟窗口,或设为 `off` 恢复旧版不检查行为。
|
|
204
|
+
- **更安全的记忆演化** —— 信念变化不再原地覆盖,旧记录保留为 `superseded`;程序性记忆免于时间衰减;冷启动和长度归一化不再压低短实体查询与稳定记忆。
|
|
205
|
+
- **更可靠的整合管线** —— `dream` 增加失败分型、总时长预算、聚类前向量回填,以及“成功必须真的产出结果”的断言。
|
|
206
|
+
- **更完整的对话来源** —— Kimi、AGY/Antigravity 和 minis 已同步纳入 ingest、scope 边界与术语识别。
|
|
207
|
+
- **一个公开版本号** —— npm 元数据、CLI `--version`、MCP 握手、HTTP 健康接口和 Claude Code marketplace 统一遵守 `2.6.0` 发布契约。
|
|
208
|
+
- **真正可安装的 Claude Code 插件** —— 安装后自动注册 43 个 MCP 工具与连续性 skill,通过敏感插件配置接收 Jina key,并把配置与 LanceDB 数据放进 Claude Code 的持久插件数据目录。
|
|
209
|
+
|
|
210
|
+
### 从 v2.5.4 升级
|
|
211
|
+
|
|
212
|
+
- 现有 LanceDB 数据原地打开;缺少新字段的旧表会自动迁移,空表也覆盖。
|
|
213
|
+
- 插件数据位于版本缓存之外,更新插件不会清空;手动 clone 仍沿用现有 `config.json` 与数据库路径。
|
|
214
|
+
- 检索操作现已写入审计日志。`audit.jsonl` 暂无自动轮转,接近 50 MB 时建议人工归档。
|
|
215
|
+
- `RECALLNEST_LAYER_ADMISSION` 仍是显式开启项(`observe` 或 `on`),默认 `off`。
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
208
219
|
## v2.1 新增:记忆哲学驱动的架构升级
|
|
209
220
|
|
|
210
221
|
v2.0 建立了完整的记忆操作平台;v2.1 加入了记忆哲学驱动的记忆行为。
|
|
@@ -233,6 +244,8 @@ v2.1 加入了哲学记忆行为;v2.2 补齐前沿扫描(ACC、PI-LLM、TSM
|
|
|
233
244
|
|
|
234
245
|
- **时间有效性窗口** *(TSM / TiMem / Zep)* —— `store_memory` 接受 `validUntil`(过期时间)和 `eventTime`(事件发生时间)。`search_memory` 支持 `validAt`(时间点查询)和 `includeExpired`(降权 80% 而非隐藏)。auto-GC 对过期记忆施加 2 倍衰减加速。
|
|
235
246
|
|
|
247
|
+
- **Usage-adjusted Auto-GC** *(默认关闭)* —— `RECALLNEST_USAGE_DECAY=true` 且建构式检索 use 信号开启时,GC 专用分支才会对 cold 记忆的 frequency 项打折;在线检索排序不读取这个分支。
|
|
248
|
+
|
|
236
249
|
---
|
|
237
250
|
|
|
238
251
|
## v2.3 新增:Connector 生态 + 数据源健康
|
|
@@ -264,7 +277,7 @@ v2.2 强化了检索质量;v2.3 通过标准 Connector 框架和运维健康
|
|
|
264
277
|
│ 集成层 │
|
|
265
278
|
│ ┌─────────────────────┐ ┌────────────────────────────┐ │
|
|
266
279
|
│ │ MCP Server │ │ HTTP API Server │ │
|
|
267
|
-
│ │
|
|
280
|
+
│ │ 43 个工具 │ │ 21 个端点 │ │
|
|
268
281
|
│ └─────────┬───────────┘ └──────────┬─────────────────┘ │
|
|
269
282
|
└────────────┼─────────────────────────┼───────────────────┘
|
|
270
283
|
└──────────┬──────────────┘
|
|
@@ -309,7 +322,7 @@ v2.2 强化了检索质量;v2.3 通过标准 Connector 框架和运维健康
|
|
|
309
322
|
|
|
310
323
|
RecallNest 提供两种接口:
|
|
311
324
|
|
|
312
|
-
- **MCP** ——
|
|
325
|
+
- **MCP** —— 给任意 MCP 客户端使用:Claude Code、Codex、Kimi、Antigravity、Gemini CLI(原生工具访问)
|
|
313
326
|
- **HTTP API** —— 给自定义 Agent、SDK 应用和任何 HTTP 客户端使用
|
|
314
327
|
|
|
315
328
|
### Agent 框架示例
|
|
@@ -325,22 +338,23 @@ RecallNest 提供两种接口:
|
|
|
325
338
|
---
|
|
326
339
|
|
|
327
340
|
<details>
|
|
328
|
-
<summary><strong>MCP 工具(
|
|
341
|
+
<summary><strong>MCP 工具(43 个)</strong></summary>
|
|
329
342
|
|
|
330
343
|
| 工具 | 说明 |
|
|
331
344
|
|------|------|
|
|
332
|
-
| `workflow_observe` | 存储 append-only
|
|
345
|
+
| `workflow_observe` | 存储 append-only 工作流观察记录;支持 `idempotencyKey` 防重复写入 |
|
|
333
346
|
| `workflow_health` | 查看工作流健康状态或降级面板 |
|
|
334
347
|
| `workflow_evidence` | 构建工作流证据包 |
|
|
335
348
|
| `store_memory` | 存储一条持久记忆 |
|
|
336
349
|
| `store_workflow_pattern` | 存储可复用工作流模式 |
|
|
337
350
|
| `store_case` | 存储问题-方案对 |
|
|
338
351
|
| `promote_memory` | 显式升级 evidence 为持久记忆 |
|
|
352
|
+
| `promote_scan` | 扫描近期 evidence,自动晋升合格记忆为持久存储 |
|
|
339
353
|
| `list_conflicts` | 列出或查看冲突候选 |
|
|
340
354
|
| `audit_conflicts` | 汇总过期/升级的冲突优先级 |
|
|
341
355
|
| `escalate_conflicts` | 预览或应用冲突升级元数据 |
|
|
342
356
|
| `resolve_conflict` | 解决冲突(保留 / 接受 / 合并) |
|
|
343
|
-
| `checkpoint_session` |
|
|
357
|
+
| `checkpoint_session` | 保存当前工作状态;支持 `idempotencyKey` 防重复写入 |
|
|
344
358
|
| `latest_checkpoint` | 查看最近的 checkpoint |
|
|
345
359
|
| `resume_context` | 为新窗口编排启动上下文 |
|
|
346
360
|
| `search_memory` | 任务开始时主动召回 |
|
|
@@ -361,6 +375,7 @@ RecallNest 提供两种接口:
|
|
|
361
375
|
| `store_skill` | 存储可执行技能 |
|
|
362
376
|
| `retrieve_skill` | 按语义相似度检索技能 |
|
|
363
377
|
| `scan_skill_promotions` | 扫描可升级为技能的候选 |
|
|
378
|
+
| `manage_alias` | 新增、删除、列出或解释 BM25 用户查询别名 |
|
|
364
379
|
| `list_tools` | 按层级发现工具(core/advanced/full) |
|
|
365
380
|
| `batch_store` | 批量存储最多 20 条记忆 |
|
|
366
381
|
| `distill_session` | 三层管线蒸馏对话为结构化知识 |
|
|
@@ -416,7 +431,7 @@ bun run src/cli.ts distill "topic" --profile writing
|
|
|
416
431
|
bun run src/cli.ts stats
|
|
417
432
|
|
|
418
433
|
# 工作流观察
|
|
419
|
-
bun run src/cli.ts workflow-observe resume_context "Fresh window skipped continuity recovery." --outcome missed --scope project:recallnest
|
|
434
|
+
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
435
|
bun run src/cli.ts workflow-health resume_context --scope project:recallnest
|
|
421
436
|
bun run src/cli.ts workflow-evidence checkpoint_session --scope project:recallnest
|
|
422
437
|
|
|
@@ -483,7 +498,7 @@ RecallNest 持续维护中。所有主要架构阶段已完成——完整路线
|
|
|
483
498
|
RecallNest 起源于 [memory-lancedb-pro](https://github.com/CortexReach/memory-lancedb-pro) 的 fork,共享混合检索、衰减建模、记忆即系统的核心理念。关键区别:
|
|
484
499
|
|
|
485
500
|
- **memory-lancedb-pro** 是 OpenClaw 插件——为单个 OpenClaw Agent 添加长期记忆。
|
|
486
|
-
- **RecallNest** 是独立记忆层——通过 MCP + HTTP API
|
|
501
|
+
- **RecallNest** 是独立记忆层——通过 MCP + HTTP API 同时服务任意 MCP 客户端(Claude Code、Codex、Kimi、Antigravity、Gemini CLI),内建会话连续性、结构化资产和冲突管理。
|
|
487
502
|
|
|
488
503
|
## 致谢
|
|
489
504
|
|
|
@@ -514,7 +529,7 @@ RecallNest 起源于 [memory-lancedb-pro](https://github.com/CortexReach/memory-
|
|
|
514
529
|
| [claude-code-studio](https://github.com/AliceLJY/claude-code-studio) | Claude Code 多会话协作平台 |
|
|
515
530
|
| [cc-genius](https://github.com/AliceLJY/cc-genius) | Web 版 Claude 客户端(PWA)—— 自托管,iPad 可用 |
|
|
516
531
|
| [agent-nexus](https://github.com/AliceLJY/agent-nexus) | 一键安装:记忆 + 远程控制 |
|
|
517
|
-
|
|
|
532
|
+
| cc-empire *(private)* | Claude Code 完整工作流脚手架 |
|
|
518
533
|
|
|
519
534
|
</details>
|
|
520
535
|
|