mindforge-memory 6.6.3__tar.gz → 6.7.0__tar.gz
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.
- {mindforge_memory-6.6.3/mindforge_memory.egg-info → mindforge_memory-6.7.0}/PKG-INFO +33 -4
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/README.md +32 -3
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/storage.py +12 -3
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/version.py +2 -2
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/daemon/server.py +6 -1
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0/mindforge_memory.egg-info}/PKG-INFO +33 -4
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge_memory.egg-info/SOURCES.txt +3 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge_memory.egg-info/entry_points.txt +1 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/pyproject.toml +1 -0
- mindforge_memory-6.7.0/tests/test_bench_v670.py +215 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v568_fixes.py +1 -1
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v575_release_consistency.py +2 -2
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v612_fixes.py +2 -2
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v643_fixes.py +1 -1
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v645_fixes.py +1 -1
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v646_fixes.py +1 -1
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v649_fixes.py +2 -2
- mindforge_memory-6.7.0/tests/test_v663_bench_header.py +71 -0
- mindforge_memory-6.7.0/tests/test_v663_conn_registry.py +152 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/LICENSE +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/MindForge.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/__init__.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/adapters/__init__.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/adapters/claude_adapter.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/adapters/crewai_memory.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/adapters/generic_api.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/adapters/langgraph_store.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/adapters/openclaw_adapter.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/api/__init__.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/api/server.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/cli/__init__.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/cli/main.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/__init__.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/embedding.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/encryption.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/indexer.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/mindforge.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/paths.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/query.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/core/types.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/daemon/__init__.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/mcp/__init__.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/mcp/server.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/__init__.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/categorizer.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/conflict_detector.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/connectors.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/context_window.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/event_bus.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/evolution.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/experience.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/federated.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/federated_acl.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/follow_up.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/hybrid_search.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/importer.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/integrator.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/intent_router.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/knowledge_graph.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/memory_compressor.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/memory_decay.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/memory_passport.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/multi_agent.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/multimodal.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/outcome_learning.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/personality.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/principled_forgetting.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/privacy.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/recall.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/session_focus.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/share_conflict.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/skill_extractor.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/skill_pack.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/timeline_viz.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge/modules/v6.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge_memory.egg-info/dependency_links.txt +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge_memory.egg-info/requires.txt +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/mindforge_memory.egg-info/top_level.txt +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/setup.cfg +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/setup.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_core.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_security_hardening.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_trash_hard_delete.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v546_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v547_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v548_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v550_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v552_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v554_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v556_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v557_banner_insight_wal.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v557_security_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v557_webhook_sig_export.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v558_audit_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v558_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v560_decay_gc.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v560_kdf_versioning.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v560_module_coverage.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v561_security.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v562_p2_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v563_entry_coverage.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v563_perf_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v565_security.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v566_encrypted_search.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v567_security_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v569_fts_sync.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v570_coverage_expansion.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v570_drama_and_utils.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v570_encrypted_fallback.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v571_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v572_security.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v573_encrypted_export.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v573_security.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v576_bitemporal.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v576_gdpr.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v577_agent_governance.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v578_embedding.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v579_graph.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v580_experience.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v5812_bugfixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v583_security.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v584_adapters.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v585_benchmark.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v586_federated_mcp.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v590_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v592_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v593_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v595_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v600_forgetting_followup.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v600_import_timeline.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v600_multi_agent_formal.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v600_outcome_passport.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v600_skillpack_evolution.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v611_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v612_cascade_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v613_integrity.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v620_growth_governance.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v630_search_explain.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v631_scrypt.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v632_explain_interfaces.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v635_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v635_integration.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v636_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v648_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v652_context_expansion.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v654_search_multi.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v655_temporal_norm.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v656_security.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v657_six_path.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v65_features.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v660_pending_guard.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v661_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v661_llm_judge.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v662_crypto.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v662_iface.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v662_search.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v662_stability.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v663_fixes.py +0 -0
- {mindforge_memory-6.6.3 → mindforge_memory-6.7.0}/tests/test_v6_ports.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mindforge-memory
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.7.0
|
|
4
4
|
Summary: AI Agent 终身记忆系统 - 四层记忆架构 · 知识图谱 · 多模态支持
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/opok-ops/MindForge
|
|
@@ -42,7 +42,7 @@ MindForge gives AI agents a persistent, structured long-term memory: a four-tier
|
|
|
42
42
|
|
|
43
43
|
[](https://www.python.org/downloads/)
|
|
44
44
|
[](LICENSE)
|
|
45
|
-
[](https://github.com/opok-ops/MindForge/releases)
|
|
46
46
|
[](https://github.com/opok-ops/MindForge/stargazers)
|
|
47
47
|
[](https://github.com/opok-ops/MindForge/forks)
|
|
48
48
|
[](https://github.com/opok-ops/MindForge/issues)
|
|
@@ -97,6 +97,25 @@ MindForge stats
|
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
|
|
100
|
+
## Benchmark Suite (v6.7.0, `mindforge.bench`)
|
|
101
|
+
|
|
102
|
+
Open standardized evaluation pipeline for agent memory systems — three-stage decoupled design: **Backend (retrieval) → Answerer (generation) → Judge (scoring)**. MindForge is just one built-in backend; any system implementing the `BaseBackend` protocol (add/search) competes on equal footing.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Zero-cost pipeline: no API key needed, reproducible
|
|
106
|
+
MindForge-bench run # smoke set (12 zh questions)
|
|
107
|
+
MindForge-bench run --backend context_window # bare context-window baseline
|
|
108
|
+
MindForge-bench report out1.json out2.json --out cmp.md # comparison table
|
|
109
|
+
|
|
110
|
+
# Full pipeline (same protocol as the 58.4% LoCoMo full-suite report)
|
|
111
|
+
MindForge-bench run --dataset locomo --data locomo10.json \
|
|
112
|
+
--judge llm --answerer llm --judge-api-key sk-xxx
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
- Datasets: built-in zh smoke set (12 questions, singlehop/multihop/temporal) + LoCoMo loader (1,986 questions / 10 conversations; category map aligned bucket-by-bucket with the v6.5.12 full-suite report). LoCoMo data file not bundled — download from `snap-research/locomo`.
|
|
116
|
+
- Judges: `deterministic` (keyword / gold-substring matching, zero cost) and `llm` (1–10 score, **≥9 = correct** — the exact protocol of the 58.4% full-suite report).
|
|
117
|
+
- Guardrails: per-conversation isolated memory stores; answerer never touches gold answers (interface-level leak prevention); judge failures are counted explicitly in reports, never silently dropped.
|
|
118
|
+
|
|
100
119
|
## Scale & Quality Benchmarks (v6.4.9, measured)
|
|
101
120
|
|
|
102
121
|
| Scale | add throughput | search p50 (rare token) | search p50 (realistic mixed) | search p50 (pathological all-common) | db size |
|
|
@@ -116,7 +135,7 @@ MindForge stats
|
|
|
116
135
|
|
|
117
136
|
v6.1.3 – v6.6.3 shipped in two weeks (2026-11-01 → 11-17), guarded by **1,400+ tests**.
|
|
118
137
|
|
|
119
|
-
- **v6.6.3 — ultimate bug-fix pack + retrieval enhancement for the named v6.6 targets** (2026-11-17). Three externally-found must-fix stability bugs closed (daemon dies on any invalid-UTF-8 input line — strict→replace decoding; REST double HTTP response after 413; lone-surrogate crash in the encrypted write path), plus rekey race honest-error and daemon error-dict forwarding. Temporal parsing overhauled: year-month queries (2024年5月 / 2024-05) no longer parse to None (full-month window now), English month-name dates (17 July 2023 / May 2023) parsed and matched on the evidence side, N-quantity windows actually multiply (two weeks ago had a 2-day window since v6.5.7), weekday expressions (last Wednesday / 上周三) resolved precisely, and Chinese phrases now flow through assembly-layer normalization. New retrieval layer (zero LLM, all rule-based): `search_chain` (hop1 evidence → entity extraction → hop2, the structural fix behind the multi-hop 25.2% bucket), path-aware graph retrieval (A-B shortest-path bridge evidence at 0.65), `decompose_two_hop` rule split, and `search_broad` open-domain entry.
|
|
138
|
+
- **v6.6.3 — ultimate bug-fix pack + retrieval enhancement for the named v6.6 targets** (2026-11-17). Three externally-found must-fix stability bugs closed (daemon dies on any invalid-UTF-8 input line — strict→replace decoding; REST double HTTP response after 413; lone-surrogate crash in the encrypted write path), plus rekey race honest-error and daemon error-dict forwarding. Temporal parsing overhauled: year-month queries (2024年5月 / 2024-05) no longer parse to None (full-month window now), English month-name dates (17 July 2023 / May 2023) parsed and matched on the evidence side, N-quantity windows actually multiply (two weeks ago had a 2-day window since v6.5.7), weekday expressions (last Wednesday / 上周三) resolved precisely, and Chinese phrases now flow through assembly-layer normalization. New retrieval layer (zero LLM, all rule-based): `search_chain` (hop1 evidence → entity extraction → hop2, the structural fix behind the multi-hop 25.2% bucket), path-aware graph retrieval (A-B shortest-path bridge evidence at 0.65), `decompose_two_hop` rule split, and `search_broad` open-domain entry. 40 new contract tests (`tests/test_v663_fixes.py`, `test_v663_bench_header.py`); full suite 1,481 green. LoCoMo re-judge pending an external API key.
|
|
120
139
|
|
|
121
140
|
- **v6.6.0 — security fix pack from dual-judge external review** (2026-11-14). Qwen4-Max (Doubao) and Kimi K3.1 independently reviewed the codebase; their overlapping findings became this release. (1) **GDPR erasure completed**: `gdpr_erase_all` now cascades to 17 tables — added `knowledge_graph` entities, `memory_snapshots`, `memory_templates`, and the four drama_* creation-content tables that previously survived erasure (the "right to be forgotten" had a real gap). (2) **Legacy key-file verification fixed**: v5.5-era key files (no `verify_blob`) previously accepted *any* password during `rekey` — a wrong old password could rewrite the key file and orphan all data. Rekey now probe-decrypts a real ciphertext from the store; empty stores fall back to the old behavior. (3) **KDF cost floor**: `KDFParams.from_dict` rejects tampered parameters (PBKDF2 < 60k, scrypt N < 4096) that would downgrade brute-force cost — key files and ciphertext headers are attacker-visible input. (4) **Compression × encryption unblocked**: `compress_memories` previously raised `SecurityError` on encrypted stores, making the two flagship features mutually exclusive by default. Compression now hydrates its TF-IDF index via the same in-memory decryption path as `fuzzy_search` (`_plaintext_for_index`) — plaintext never touches disk or FTS5. (5) **Interface matrix completed**: REST gains `/api/gdpr/report`, `/api/gdpr/export`, `/api/gdpr/erase` (confirm=true required), `/api/compress`, `/api/compressions`; MCP gains `gdpr_report`, `gdpr_erase` (confirm required), `memory_compress` — 87→90 tools, all three interfaces now expose the full governance surface. (6) **Honesty fixes**: README previously claimed "six-way hybrid search"; the actual retrieval count is four (vector/FTS5/TF-IDF/fuzzy) — wording corrected, and the cross-encoder/heuristic distinction is now explicit. LoCoMo full-suite results (51.5%, dual-judge) added to the benchmarks section. 7+ new contract tests (`tests/test_v656_security.py`).
|
|
122
141
|
|
|
@@ -195,7 +214,7 @@ v6.1.3 – v6.6.3 shipped in two weeks (2026-11-01 → 11-17), guarded by **1,40
|
|
|
195
214
|
|
|
196
215
|
```
|
|
197
216
|
┌──────────────────────────────────────────────────────┐
|
|
198
|
-
│ MindForge v6.
|
|
217
|
+
│ MindForge v6.7.0 │
|
|
199
218
|
│ Cognitive Layer Personality · KnowledgeGraph │
|
|
200
219
|
│ MemoryEvolution · FederatedMemory │
|
|
201
220
|
├──────────────────────────────────────────────────────┤
|
|
@@ -306,6 +325,16 @@ See [SECURITY.md](SECURITY.md) for the full security policy.
|
|
|
306
325
|
- [Contributing guide](CONTRIBUTING.md)
|
|
307
326
|
- [Security policy](SECURITY.md)
|
|
308
327
|
|
|
328
|
+
## About the Author
|
|
329
|
+
|
|
330
|
+
Solo maintainer building **open-source memory infrastructure for AI agents** — systems that remember, forget, and retrieve knowledge the way humans do.
|
|
331
|
+
|
|
332
|
+
Focus areas: agent memory architecture · local-first AI infrastructure (no cloud lock-in) · privacy-preserving AI (encryption, access control, on-device data) · hybrid retrieval (vector + lexical + graph + fuzzy).
|
|
333
|
+
|
|
334
|
+
Tech stack: `Python` · `TypeScript` · `SQLite` · `FastAPI` · `MCP` · `Embeddings` · `Knowledge Graphs`
|
|
335
|
+
|
|
336
|
+
Official plugin: [dsh-mindforge](https://github.com/opok-ops/dsh-mindforge) — encrypted memory bridge for DeepSeek Harness.
|
|
337
|
+
|
|
309
338
|
## License
|
|
310
339
|
|
|
311
340
|
[MIT](LICENSE) — Copyright (c) 2026 MindForge Project. If MindForge is useful to you, consider starring it on GitHub — it helps the project stay active and visible.
|
|
@@ -12,7 +12,7 @@ MindForge gives AI agents a persistent, structured long-term memory: a four-tier
|
|
|
12
12
|
|
|
13
13
|
[](https://www.python.org/downloads/)
|
|
14
14
|
[](LICENSE)
|
|
15
|
-
[](https://github.com/opok-ops/MindForge/releases)
|
|
16
16
|
[](https://github.com/opok-ops/MindForge/stargazers)
|
|
17
17
|
[](https://github.com/opok-ops/MindForge/forks)
|
|
18
18
|
[](https://github.com/opok-ops/MindForge/issues)
|
|
@@ -67,6 +67,25 @@ MindForge stats
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
|
|
70
|
+
## Benchmark Suite (v6.7.0, `mindforge.bench`)
|
|
71
|
+
|
|
72
|
+
Open standardized evaluation pipeline for agent memory systems — three-stage decoupled design: **Backend (retrieval) → Answerer (generation) → Judge (scoring)**. MindForge is just one built-in backend; any system implementing the `BaseBackend` protocol (add/search) competes on equal footing.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Zero-cost pipeline: no API key needed, reproducible
|
|
76
|
+
MindForge-bench run # smoke set (12 zh questions)
|
|
77
|
+
MindForge-bench run --backend context_window # bare context-window baseline
|
|
78
|
+
MindForge-bench report out1.json out2.json --out cmp.md # comparison table
|
|
79
|
+
|
|
80
|
+
# Full pipeline (same protocol as the 58.4% LoCoMo full-suite report)
|
|
81
|
+
MindForge-bench run --dataset locomo --data locomo10.json \
|
|
82
|
+
--judge llm --answerer llm --judge-api-key sk-xxx
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
- Datasets: built-in zh smoke set (12 questions, singlehop/multihop/temporal) + LoCoMo loader (1,986 questions / 10 conversations; category map aligned bucket-by-bucket with the v6.5.12 full-suite report). LoCoMo data file not bundled — download from `snap-research/locomo`.
|
|
86
|
+
- Judges: `deterministic` (keyword / gold-substring matching, zero cost) and `llm` (1–10 score, **≥9 = correct** — the exact protocol of the 58.4% full-suite report).
|
|
87
|
+
- Guardrails: per-conversation isolated memory stores; answerer never touches gold answers (interface-level leak prevention); judge failures are counted explicitly in reports, never silently dropped.
|
|
88
|
+
|
|
70
89
|
## Scale & Quality Benchmarks (v6.4.9, measured)
|
|
71
90
|
|
|
72
91
|
| Scale | add throughput | search p50 (rare token) | search p50 (realistic mixed) | search p50 (pathological all-common) | db size |
|
|
@@ -86,7 +105,7 @@ MindForge stats
|
|
|
86
105
|
|
|
87
106
|
v6.1.3 – v6.6.3 shipped in two weeks (2026-11-01 → 11-17), guarded by **1,400+ tests**.
|
|
88
107
|
|
|
89
|
-
- **v6.6.3 — ultimate bug-fix pack + retrieval enhancement for the named v6.6 targets** (2026-11-17). Three externally-found must-fix stability bugs closed (daemon dies on any invalid-UTF-8 input line — strict→replace decoding; REST double HTTP response after 413; lone-surrogate crash in the encrypted write path), plus rekey race honest-error and daemon error-dict forwarding. Temporal parsing overhauled: year-month queries (2024年5月 / 2024-05) no longer parse to None (full-month window now), English month-name dates (17 July 2023 / May 2023) parsed and matched on the evidence side, N-quantity windows actually multiply (two weeks ago had a 2-day window since v6.5.7), weekday expressions (last Wednesday / 上周三) resolved precisely, and Chinese phrases now flow through assembly-layer normalization. New retrieval layer (zero LLM, all rule-based): `search_chain` (hop1 evidence → entity extraction → hop2, the structural fix behind the multi-hop 25.2% bucket), path-aware graph retrieval (A-B shortest-path bridge evidence at 0.65), `decompose_two_hop` rule split, and `search_broad` open-domain entry.
|
|
108
|
+
- **v6.6.3 — ultimate bug-fix pack + retrieval enhancement for the named v6.6 targets** (2026-11-17). Three externally-found must-fix stability bugs closed (daemon dies on any invalid-UTF-8 input line — strict→replace decoding; REST double HTTP response after 413; lone-surrogate crash in the encrypted write path), plus rekey race honest-error and daemon error-dict forwarding. Temporal parsing overhauled: year-month queries (2024年5月 / 2024-05) no longer parse to None (full-month window now), English month-name dates (17 July 2023 / May 2023) parsed and matched on the evidence side, N-quantity windows actually multiply (two weeks ago had a 2-day window since v6.5.7), weekday expressions (last Wednesday / 上周三) resolved precisely, and Chinese phrases now flow through assembly-layer normalization. New retrieval layer (zero LLM, all rule-based): `search_chain` (hop1 evidence → entity extraction → hop2, the structural fix behind the multi-hop 25.2% bucket), path-aware graph retrieval (A-B shortest-path bridge evidence at 0.65), `decompose_two_hop` rule split, and `search_broad` open-domain entry. 40 new contract tests (`tests/test_v663_fixes.py`, `test_v663_bench_header.py`); full suite 1,481 green. LoCoMo re-judge pending an external API key.
|
|
90
109
|
|
|
91
110
|
- **v6.6.0 — security fix pack from dual-judge external review** (2026-11-14). Qwen4-Max (Doubao) and Kimi K3.1 independently reviewed the codebase; their overlapping findings became this release. (1) **GDPR erasure completed**: `gdpr_erase_all` now cascades to 17 tables — added `knowledge_graph` entities, `memory_snapshots`, `memory_templates`, and the four drama_* creation-content tables that previously survived erasure (the "right to be forgotten" had a real gap). (2) **Legacy key-file verification fixed**: v5.5-era key files (no `verify_blob`) previously accepted *any* password during `rekey` — a wrong old password could rewrite the key file and orphan all data. Rekey now probe-decrypts a real ciphertext from the store; empty stores fall back to the old behavior. (3) **KDF cost floor**: `KDFParams.from_dict` rejects tampered parameters (PBKDF2 < 60k, scrypt N < 4096) that would downgrade brute-force cost — key files and ciphertext headers are attacker-visible input. (4) **Compression × encryption unblocked**: `compress_memories` previously raised `SecurityError` on encrypted stores, making the two flagship features mutually exclusive by default. Compression now hydrates its TF-IDF index via the same in-memory decryption path as `fuzzy_search` (`_plaintext_for_index`) — plaintext never touches disk or FTS5. (5) **Interface matrix completed**: REST gains `/api/gdpr/report`, `/api/gdpr/export`, `/api/gdpr/erase` (confirm=true required), `/api/compress`, `/api/compressions`; MCP gains `gdpr_report`, `gdpr_erase` (confirm required), `memory_compress` — 87→90 tools, all three interfaces now expose the full governance surface. (6) **Honesty fixes**: README previously claimed "six-way hybrid search"; the actual retrieval count is four (vector/FTS5/TF-IDF/fuzzy) — wording corrected, and the cross-encoder/heuristic distinction is now explicit. LoCoMo full-suite results (51.5%, dual-judge) added to the benchmarks section. 7+ new contract tests (`tests/test_v656_security.py`).
|
|
92
111
|
|
|
@@ -165,7 +184,7 @@ v6.1.3 – v6.6.3 shipped in two weeks (2026-11-01 → 11-17), guarded by **1,40
|
|
|
165
184
|
|
|
166
185
|
```
|
|
167
186
|
┌──────────────────────────────────────────────────────┐
|
|
168
|
-
│ MindForge v6.
|
|
187
|
+
│ MindForge v6.7.0 │
|
|
169
188
|
│ Cognitive Layer Personality · KnowledgeGraph │
|
|
170
189
|
│ MemoryEvolution · FederatedMemory │
|
|
171
190
|
├──────────────────────────────────────────────────────┤
|
|
@@ -276,6 +295,16 @@ See [SECURITY.md](SECURITY.md) for the full security policy.
|
|
|
276
295
|
- [Contributing guide](CONTRIBUTING.md)
|
|
277
296
|
- [Security policy](SECURITY.md)
|
|
278
297
|
|
|
298
|
+
## About the Author
|
|
299
|
+
|
|
300
|
+
Solo maintainer building **open-source memory infrastructure for AI agents** — systems that remember, forget, and retrieve knowledge the way humans do.
|
|
301
|
+
|
|
302
|
+
Focus areas: agent memory architecture · local-first AI infrastructure (no cloud lock-in) · privacy-preserving AI (encryption, access control, on-device data) · hybrid retrieval (vector + lexical + graph + fuzzy).
|
|
303
|
+
|
|
304
|
+
Tech stack: `Python` · `TypeScript` · `SQLite` · `FastAPI` · `MCP` · `Embeddings` · `Knowledge Graphs`
|
|
305
|
+
|
|
306
|
+
Official plugin: [dsh-mindforge](https://github.com/opok-ops/dsh-mindforge) — encrypted memory bridge for DeepSeek Harness.
|
|
307
|
+
|
|
279
308
|
## License
|
|
280
309
|
|
|
281
310
|
[MIT](LICENSE) — Copyright (c) 2026 MindForge Project. If MindForge is useful to you, consider starring it on GitHub — it helps the project stay active and visible.
|
|
@@ -832,7 +832,10 @@ class StorageEngine:
|
|
|
832
832
|
# v6.6.1:记录属主线程——_close_conns 只关属主已死亡的
|
|
833
833
|
# 遗留连接,绝不从外部关闭存活线程正在使用的连接
|
|
834
834
|
# (实测会触发 SQLite 原生层 access violation)。
|
|
835
|
-
|
|
835
|
+
# v6.6.4(缺陷 #10):存 Thread 对象而非 ident——pthread
|
|
836
|
+
# handle 复用会让死线程 ident 撞上新线程(实测 5 连发全
|
|
837
|
+
# 同),ident 判活系统性误判;is_alive() 与复用无关。
|
|
838
|
+
self._conn_owners[id(conn)] = threading.current_thread()
|
|
836
839
|
except Exception:
|
|
837
840
|
pass
|
|
838
841
|
conn.row_factory = sqlite3.Row
|
|
@@ -7799,11 +7802,17 @@ class StorageEngine:
|
|
|
7799
7802
|
# 层 access violation 硬崩溃,test_v576 TestAPI 复现);存活线程
|
|
7800
7803
|
# 的连接由其自己的 close_thread_conn 关闭。
|
|
7801
7804
|
with self._access_lock:
|
|
7802
|
-
|
|
7805
|
+
# v6.6.4 修复(缺陷 #10):属主存活判定不得用 enumerate().ident。
|
|
7806
|
+
# 实测 pthread handle 复用是常态(连续 5 线程 ident 全同)——
|
|
7807
|
+
# ThreadingHTTPServer 每请求一线程,死线程的连接属主 ident 会
|
|
7808
|
+
# 被下一个请求线程撞上 → 误判「属主存活」→ skip → 连接永久
|
|
7809
|
+
# 悬挂,Windows WinError 32 只是概率性躲过、未根除(v6.6.1
|
|
7810
|
+
# 缺陷 #5 / v6.6.2 P3-7 的残余)。改为存 Thread 对象 +
|
|
7811
|
+
# is_alive()(基于 tstate_lock 状态,与 ident 复用无关)。
|
|
7803
7812
|
owners = getattr(self, "_conn_owners", None) or {}
|
|
7804
7813
|
for c in list(getattr(self, "_all_conns", ()) or ()):
|
|
7805
7814
|
owner = owners.get(id(c))
|
|
7806
|
-
if owner is not None and owner
|
|
7815
|
+
if owner is not None and owner.is_alive():
|
|
7807
7816
|
continue # 属主存活:留给它自己关
|
|
7808
7817
|
try:
|
|
7809
7818
|
c.close()
|
|
@@ -20,10 +20,10 @@ core/mindforge.py、cli/main.py、mcp/server.py),每处都带一份硬编码
|
|
|
20
20
|
from typing import Tuple
|
|
21
21
|
|
|
22
22
|
#: 当前发布版本(唯一真值)
|
|
23
|
-
__version__: str = "6.
|
|
23
|
+
__version__: str = "6.7.0"
|
|
24
24
|
|
|
25
25
|
#: 结构化版本元组,便于比较(如 `VERSION_INFO >= (6, 1, 0)`)
|
|
26
|
-
VERSION_INFO: Tuple[int, int, int] = (6,
|
|
26
|
+
VERSION_INFO: Tuple[int, int, int] = (6, 7, 0)
|
|
27
27
|
|
|
28
28
|
#: 下一个大版本的目标版本号(供 v6 端口预留引用)
|
|
29
29
|
NEXT_MAJOR_TARGET: str = "7.0.0"
|
|
@@ -290,7 +290,12 @@ def run_daemon(db_path: str, key_file: str | None = None, encrypted: bool = Fals
|
|
|
290
290
|
# v6.6.3(次要-2):handler 返回的 dict 若自带 error 字段(如
|
|
291
291
|
# memory-recall/memory-context 在 agent 为空时返回的错误 dict),
|
|
292
292
|
# 是调用方配置错误,不能包装成 ok:true 静默吞掉——转 ok:false。
|
|
293
|
-
|
|
293
|
+
# v6.6.4 修复(缺陷 #11):判定收紧为 error 非空——compress 域
|
|
294
|
+
# (decompress 等)的返回契约里 error 是状态位,成功时为空串,
|
|
295
|
+
# v6.6.3 的存在性判定把这类成功响应误转成 ok:false + 空 error,
|
|
296
|
+
# e2e「decompress 可逆原子契约」因此拿不到 restored_count 而
|
|
297
|
+
# 失败(376dad1 起 CI e2e 红的根因)。非空 error 才是失败。
|
|
298
|
+
if isinstance(data, dict) and "ok" not in data and data.get("error"):
|
|
294
299
|
sys.stdout.write(
|
|
295
300
|
json.dumps(
|
|
296
301
|
{"id": rid, "ok": False, "error": str(data.get("error"))},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mindforge-memory
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.7.0
|
|
4
4
|
Summary: AI Agent 终身记忆系统 - 四层记忆架构 · 知识图谱 · 多模态支持
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/opok-ops/MindForge
|
|
@@ -42,7 +42,7 @@ MindForge gives AI agents a persistent, structured long-term memory: a four-tier
|
|
|
42
42
|
|
|
43
43
|
[](https://www.python.org/downloads/)
|
|
44
44
|
[](LICENSE)
|
|
45
|
-
[](https://github.com/opok-ops/MindForge/releases)
|
|
46
46
|
[](https://github.com/opok-ops/MindForge/stargazers)
|
|
47
47
|
[](https://github.com/opok-ops/MindForge/forks)
|
|
48
48
|
[](https://github.com/opok-ops/MindForge/issues)
|
|
@@ -97,6 +97,25 @@ MindForge stats
|
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
|
|
100
|
+
## Benchmark Suite (v6.7.0, `mindforge.bench`)
|
|
101
|
+
|
|
102
|
+
Open standardized evaluation pipeline for agent memory systems — three-stage decoupled design: **Backend (retrieval) → Answerer (generation) → Judge (scoring)**. MindForge is just one built-in backend; any system implementing the `BaseBackend` protocol (add/search) competes on equal footing.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Zero-cost pipeline: no API key needed, reproducible
|
|
106
|
+
MindForge-bench run # smoke set (12 zh questions)
|
|
107
|
+
MindForge-bench run --backend context_window # bare context-window baseline
|
|
108
|
+
MindForge-bench report out1.json out2.json --out cmp.md # comparison table
|
|
109
|
+
|
|
110
|
+
# Full pipeline (same protocol as the 58.4% LoCoMo full-suite report)
|
|
111
|
+
MindForge-bench run --dataset locomo --data locomo10.json \
|
|
112
|
+
--judge llm --answerer llm --judge-api-key sk-xxx
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
- Datasets: built-in zh smoke set (12 questions, singlehop/multihop/temporal) + LoCoMo loader (1,986 questions / 10 conversations; category map aligned bucket-by-bucket with the v6.5.12 full-suite report). LoCoMo data file not bundled — download from `snap-research/locomo`.
|
|
116
|
+
- Judges: `deterministic` (keyword / gold-substring matching, zero cost) and `llm` (1–10 score, **≥9 = correct** — the exact protocol of the 58.4% full-suite report).
|
|
117
|
+
- Guardrails: per-conversation isolated memory stores; answerer never touches gold answers (interface-level leak prevention); judge failures are counted explicitly in reports, never silently dropped.
|
|
118
|
+
|
|
100
119
|
## Scale & Quality Benchmarks (v6.4.9, measured)
|
|
101
120
|
|
|
102
121
|
| Scale | add throughput | search p50 (rare token) | search p50 (realistic mixed) | search p50 (pathological all-common) | db size |
|
|
@@ -116,7 +135,7 @@ MindForge stats
|
|
|
116
135
|
|
|
117
136
|
v6.1.3 – v6.6.3 shipped in two weeks (2026-11-01 → 11-17), guarded by **1,400+ tests**.
|
|
118
137
|
|
|
119
|
-
- **v6.6.3 — ultimate bug-fix pack + retrieval enhancement for the named v6.6 targets** (2026-11-17). Three externally-found must-fix stability bugs closed (daemon dies on any invalid-UTF-8 input line — strict→replace decoding; REST double HTTP response after 413; lone-surrogate crash in the encrypted write path), plus rekey race honest-error and daemon error-dict forwarding. Temporal parsing overhauled: year-month queries (2024年5月 / 2024-05) no longer parse to None (full-month window now), English month-name dates (17 July 2023 / May 2023) parsed and matched on the evidence side, N-quantity windows actually multiply (two weeks ago had a 2-day window since v6.5.7), weekday expressions (last Wednesday / 上周三) resolved precisely, and Chinese phrases now flow through assembly-layer normalization. New retrieval layer (zero LLM, all rule-based): `search_chain` (hop1 evidence → entity extraction → hop2, the structural fix behind the multi-hop 25.2% bucket), path-aware graph retrieval (A-B shortest-path bridge evidence at 0.65), `decompose_two_hop` rule split, and `search_broad` open-domain entry.
|
|
138
|
+
- **v6.6.3 — ultimate bug-fix pack + retrieval enhancement for the named v6.6 targets** (2026-11-17). Three externally-found must-fix stability bugs closed (daemon dies on any invalid-UTF-8 input line — strict→replace decoding; REST double HTTP response after 413; lone-surrogate crash in the encrypted write path), plus rekey race honest-error and daemon error-dict forwarding. Temporal parsing overhauled: year-month queries (2024年5月 / 2024-05) no longer parse to None (full-month window now), English month-name dates (17 July 2023 / May 2023) parsed and matched on the evidence side, N-quantity windows actually multiply (two weeks ago had a 2-day window since v6.5.7), weekday expressions (last Wednesday / 上周三) resolved precisely, and Chinese phrases now flow through assembly-layer normalization. New retrieval layer (zero LLM, all rule-based): `search_chain` (hop1 evidence → entity extraction → hop2, the structural fix behind the multi-hop 25.2% bucket), path-aware graph retrieval (A-B shortest-path bridge evidence at 0.65), `decompose_two_hop` rule split, and `search_broad` open-domain entry. 40 new contract tests (`tests/test_v663_fixes.py`, `test_v663_bench_header.py`); full suite 1,481 green. LoCoMo re-judge pending an external API key.
|
|
120
139
|
|
|
121
140
|
- **v6.6.0 — security fix pack from dual-judge external review** (2026-11-14). Qwen4-Max (Doubao) and Kimi K3.1 independently reviewed the codebase; their overlapping findings became this release. (1) **GDPR erasure completed**: `gdpr_erase_all` now cascades to 17 tables — added `knowledge_graph` entities, `memory_snapshots`, `memory_templates`, and the four drama_* creation-content tables that previously survived erasure (the "right to be forgotten" had a real gap). (2) **Legacy key-file verification fixed**: v5.5-era key files (no `verify_blob`) previously accepted *any* password during `rekey` — a wrong old password could rewrite the key file and orphan all data. Rekey now probe-decrypts a real ciphertext from the store; empty stores fall back to the old behavior. (3) **KDF cost floor**: `KDFParams.from_dict` rejects tampered parameters (PBKDF2 < 60k, scrypt N < 4096) that would downgrade brute-force cost — key files and ciphertext headers are attacker-visible input. (4) **Compression × encryption unblocked**: `compress_memories` previously raised `SecurityError` on encrypted stores, making the two flagship features mutually exclusive by default. Compression now hydrates its TF-IDF index via the same in-memory decryption path as `fuzzy_search` (`_plaintext_for_index`) — plaintext never touches disk or FTS5. (5) **Interface matrix completed**: REST gains `/api/gdpr/report`, `/api/gdpr/export`, `/api/gdpr/erase` (confirm=true required), `/api/compress`, `/api/compressions`; MCP gains `gdpr_report`, `gdpr_erase` (confirm required), `memory_compress` — 87→90 tools, all three interfaces now expose the full governance surface. (6) **Honesty fixes**: README previously claimed "six-way hybrid search"; the actual retrieval count is four (vector/FTS5/TF-IDF/fuzzy) — wording corrected, and the cross-encoder/heuristic distinction is now explicit. LoCoMo full-suite results (51.5%, dual-judge) added to the benchmarks section. 7+ new contract tests (`tests/test_v656_security.py`).
|
|
122
141
|
|
|
@@ -195,7 +214,7 @@ v6.1.3 – v6.6.3 shipped in two weeks (2026-11-01 → 11-17), guarded by **1,40
|
|
|
195
214
|
|
|
196
215
|
```
|
|
197
216
|
┌──────────────────────────────────────────────────────┐
|
|
198
|
-
│ MindForge v6.
|
|
217
|
+
│ MindForge v6.7.0 │
|
|
199
218
|
│ Cognitive Layer Personality · KnowledgeGraph │
|
|
200
219
|
│ MemoryEvolution · FederatedMemory │
|
|
201
220
|
├──────────────────────────────────────────────────────┤
|
|
@@ -306,6 +325,16 @@ See [SECURITY.md](SECURITY.md) for the full security policy.
|
|
|
306
325
|
- [Contributing guide](CONTRIBUTING.md)
|
|
307
326
|
- [Security policy](SECURITY.md)
|
|
308
327
|
|
|
328
|
+
## About the Author
|
|
329
|
+
|
|
330
|
+
Solo maintainer building **open-source memory infrastructure for AI agents** — systems that remember, forget, and retrieve knowledge the way humans do.
|
|
331
|
+
|
|
332
|
+
Focus areas: agent memory architecture · local-first AI infrastructure (no cloud lock-in) · privacy-preserving AI (encryption, access control, on-device data) · hybrid retrieval (vector + lexical + graph + fuzzy).
|
|
333
|
+
|
|
334
|
+
Tech stack: `Python` · `TypeScript` · `SQLite` · `FastAPI` · `MCP` · `Embeddings` · `Knowledge Graphs`
|
|
335
|
+
|
|
336
|
+
Official plugin: [dsh-mindforge](https://github.com/opok-ops/dsh-mindforge) — encrypted memory bridge for DeepSeek Harness.
|
|
337
|
+
|
|
309
338
|
## License
|
|
310
339
|
|
|
311
340
|
[MIT](LICENSE) — Copyright (c) 2026 MindForge Project. If MindForge is useful to you, consider starring it on GitHub — it helps the project stay active and visible.
|
|
@@ -66,6 +66,7 @@ mindforge_memory.egg-info/dependency_links.txt
|
|
|
66
66
|
mindforge_memory.egg-info/entry_points.txt
|
|
67
67
|
mindforge_memory.egg-info/requires.txt
|
|
68
68
|
mindforge_memory.egg-info/top_level.txt
|
|
69
|
+
tests/test_bench_v670.py
|
|
69
70
|
tests/test_core.py
|
|
70
71
|
tests/test_security_hardening.py
|
|
71
72
|
tests/test_trash_hard_delete.py
|
|
@@ -150,5 +151,7 @@ tests/test_v662_crypto.py
|
|
|
150
151
|
tests/test_v662_iface.py
|
|
151
152
|
tests/test_v662_search.py
|
|
152
153
|
tests/test_v662_stability.py
|
|
154
|
+
tests/test_v663_bench_header.py
|
|
155
|
+
tests/test_v663_conn_registry.py
|
|
153
156
|
tests/test_v663_fixes.py
|
|
154
157
|
tests/test_v6_ports.py
|
|
@@ -32,6 +32,7 @@ Source = "https://github.com/opok-ops/MindForge"
|
|
|
32
32
|
[project.scripts]
|
|
33
33
|
MindForge = "mindforge.cli.main:main"
|
|
34
34
|
MindForge-mcp = "mindforge.mcp.server:main"
|
|
35
|
+
MindForge-bench = "mindforge.bench.cli:main"
|
|
35
36
|
|
|
36
37
|
[project.optional-dependencies]
|
|
37
38
|
dev = ["pytest", "pytest-cov"]
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""v6.7.0 mindforge.bench 契约测试。
|
|
3
|
+
|
|
4
|
+
守卫基准的评测口径不被破坏:
|
|
5
|
+
- deterministic 判官双模式(must_have / gold 子串 fallback)
|
|
6
|
+
- LoCoMo 类别映射(与 v6.5.12 全量报告类别分布逐项对齐)
|
|
7
|
+
- runner 三段式管道端到端(零成本链路)
|
|
8
|
+
- 评测防泄漏:answerer 不得接触 gold_answer
|
|
9
|
+
- 环境声明与报告结构
|
|
10
|
+
"""
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import sys
|
|
14
|
+
import unittest
|
|
15
|
+
|
|
16
|
+
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
17
|
+
|
|
18
|
+
from mindforge.bench.datasets import (
|
|
19
|
+
load_dataset, load_locomo, LOCOMO_CATEGORY_MAP,
|
|
20
|
+
SMOKE_SESSIONS, SMOKE_QUESTIONS)
|
|
21
|
+
from mindforge.bench.backends import (
|
|
22
|
+
MindForgeBackend, ContextWindowBackend, BACKEND_REGISTRY)
|
|
23
|
+
from mindforge.bench.judges import DeterministicJudge
|
|
24
|
+
from mindforge.bench.answerers import ExtractiveAnswerer
|
|
25
|
+
from mindforge.bench.metrics import aggregate, percentile
|
|
26
|
+
from mindforge.bench.runner import run_benchmark
|
|
27
|
+
from mindforge.bench.report import aggregate_markdown
|
|
28
|
+
from mindforge.bench.cli import main as cli_main
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class TestSmokeDataset(unittest.TestCase):
|
|
32
|
+
|
|
33
|
+
def test_schema_and_counts(self):
|
|
34
|
+
items = load_dataset("smoke")
|
|
35
|
+
self.assertEqual(len(items), len(SMOKE_QUESTIONS))
|
|
36
|
+
self.assertEqual(len(SMOKE_SESSIONS), 12)
|
|
37
|
+
for it in items:
|
|
38
|
+
for key in ("qid", "question", "must_have", "category",
|
|
39
|
+
"source_turns", "meta"):
|
|
40
|
+
self.assertIn(key, it, f"schema 缺 {key}")
|
|
41
|
+
self.assertIn(it["category"],
|
|
42
|
+
("singlehop", "multihop", "temporal"))
|
|
43
|
+
self.assertTrue(it["must_have"], "smoke 必须带 must_have")
|
|
44
|
+
|
|
45
|
+
def test_unknown_dataset_rejected(self):
|
|
46
|
+
with self.assertRaises(ValueError):
|
|
47
|
+
load_dataset("不存在")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class TestLocomoMapper(unittest.TestCase):
|
|
51
|
+
|
|
52
|
+
def test_category_map_aligns_with_full_report(self):
|
|
53
|
+
# 与 v6.5.12 全量报告类别分布逐项对齐的映射
|
|
54
|
+
self.assertEqual(LOCOMO_CATEGORY_MAP,
|
|
55
|
+
{1: "temporal", 2: "multihop",
|
|
56
|
+
3: "open_domain", 4: "singlehop",
|
|
57
|
+
5: "adversarial"})
|
|
58
|
+
|
|
59
|
+
def test_load_locomo_real_file(self):
|
|
60
|
+
data = "/home/z/my-project/tmp/locomo/locomo-main/data/locomo10.json"
|
|
61
|
+
if not os.path.isfile(data):
|
|
62
|
+
self.skipTest("本地无 LoCoMo 数据")
|
|
63
|
+
items = load_locomo(data, convs=1)
|
|
64
|
+
self.assertEqual(len(items), 199) # conv-26 实测问数
|
|
65
|
+
conv0 = items[0]["meta"]["conv_id"]
|
|
66
|
+
for it in items:
|
|
67
|
+
self.assertIn(it["category"],
|
|
68
|
+
("singlehop", "multihop", "temporal",
|
|
69
|
+
"adversarial", "open_domain"))
|
|
70
|
+
self.assertEqual(it["meta"]["conv_id"], conv0)
|
|
71
|
+
self.assertTrue(it["source_turns"], "必须有入库轮")
|
|
72
|
+
|
|
73
|
+
def test_locomo_requires_data_path(self):
|
|
74
|
+
with self.assertRaises(FileNotFoundError):
|
|
75
|
+
load_dataset("locomo")
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class TestDeterministicJudge(unittest.TestCase):
|
|
79
|
+
|
|
80
|
+
def setUp(self):
|
|
81
|
+
self.j = DeterministicJudge()
|
|
82
|
+
|
|
83
|
+
def test_must_have_mode(self):
|
|
84
|
+
it = {"question": "q", "must_have": ["花生"], "gold_answer": ""}
|
|
85
|
+
self.assertEqual(self.j.score(it, "用户对花生过敏", [])["score"], 10)
|
|
86
|
+
self.assertEqual(self.j.score(it, "用户对大豆过敏", [])["score"], 1)
|
|
87
|
+
|
|
88
|
+
def test_gold_substring_mode(self):
|
|
89
|
+
# must_have 为空 → gold 子串 fallback(LoCoMo QA 式)
|
|
90
|
+
it = {"question": "q", "must_have": [], "gold_answer": "Sommelier"}
|
|
91
|
+
self.assertEqual(self.j.score(it, "he is a sommelier", [])["score"], 10)
|
|
92
|
+
self.assertEqual(self.j.score(it, "a chef", [])["score"], 1)
|
|
93
|
+
|
|
94
|
+
def test_empty_answer_scores_one(self):
|
|
95
|
+
it = {"question": "q", "must_have": ["x"], "gold_answer": ""}
|
|
96
|
+
self.assertEqual(self.j.score(it, "", [])["score"], 1)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class TestMetrics(unittest.TestCase):
|
|
100
|
+
|
|
101
|
+
def test_percentile(self):
|
|
102
|
+
self.assertEqual(percentile([], 50), 0.0)
|
|
103
|
+
self.assertEqual(percentile([3.0], 50), 3.0)
|
|
104
|
+
self.assertEqual(percentile(sorted([1.0, 2.0, 3.0, 4.0]), 50), 2.5)
|
|
105
|
+
self.assertEqual(percentile(sorted([1.0, 2.0, 3.0, 4.0]), 95), 3.85)
|
|
106
|
+
|
|
107
|
+
def test_aggregate_counts(self):
|
|
108
|
+
recs = [{"score": 10, "correct": True, "latency_ms": 1.0,
|
|
109
|
+
"retrieved": True, "first_hit_rank": 1, "category": "a"},
|
|
110
|
+
{"score": 1, "correct": False, "latency_ms": 3.0,
|
|
111
|
+
"retrieved": False, "first_hit_rank": 0, "category": "a"}]
|
|
112
|
+
agg = aggregate(recs)
|
|
113
|
+
self.assertEqual(agg["count"], 2)
|
|
114
|
+
self.assertEqual(agg["acc"], 50.0)
|
|
115
|
+
self.assertEqual(agg["avg_score"], 5.5)
|
|
116
|
+
self.assertEqual(agg["recall_at_k"], 50.0)
|
|
117
|
+
self.assertAlmostEqual(agg["mrr_at_k"], 0.5)
|
|
118
|
+
self.assertEqual(agg["latency_ms"]["p50"], 2.0)
|
|
119
|
+
|
|
120
|
+
def test_aggregate_empty(self):
|
|
121
|
+
self.assertEqual(aggregate([])["count"], 0)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class TestRunnerEndToEnd(unittest.TestCase):
|
|
125
|
+
"""零成本链路端到端:smoke + mindforge + extractive + deterministic。"""
|
|
126
|
+
|
|
127
|
+
def test_full_pipeline(self):
|
|
128
|
+
items = load_dataset("smoke")
|
|
129
|
+
backend = MindForgeBackend()
|
|
130
|
+
report = run_benchmark(
|
|
131
|
+
items, backend, ExtractiveAnswerer(), DeterministicJudge(),
|
|
132
|
+
k=5, seed=42, dataset_id="smoke",
|
|
133
|
+
args_decl={"backend": "mindforge", "answerer": "extractive",
|
|
134
|
+
"judge": "deterministic", "k": 5, "seed": 42})
|
|
135
|
+
backend.close()
|
|
136
|
+
agg = report["aggregate"]
|
|
137
|
+
self.assertEqual(agg["count"], len(items))
|
|
138
|
+
self.assertIn("acc", agg)
|
|
139
|
+
self.assertIn("env", report)
|
|
140
|
+
self.assertEqual(report["env"]["dataset"], "smoke")
|
|
141
|
+
self.assertEqual(report["env"]["backend"], "mindforge")
|
|
142
|
+
# 环境声明可 JSON 序列化(报告落盘的前提)
|
|
143
|
+
json.dumps(report["env"])
|
|
144
|
+
|
|
145
|
+
def test_per_conv_isolation(self):
|
|
146
|
+
# 不同 conv_id 分组 → 独立记忆库(不串记忆)
|
|
147
|
+
items = load_dataset("smoke")
|
|
148
|
+
items = [dict(it, meta=dict(it["meta"], conv_id=it["qid"]))
|
|
149
|
+
for it in items]
|
|
150
|
+
backend = ContextWindowBackend()
|
|
151
|
+
report = run_benchmark(items, backend, ExtractiveAnswerer(),
|
|
152
|
+
DeterministicJudge(), k=5, dataset_id="smoke")
|
|
153
|
+
backend.close()
|
|
154
|
+
# 每问独立库(1 轮),检索层命中率应大幅下降——证明分组生效
|
|
155
|
+
retrieved = [r["retrieved"] for r in report["records"]]
|
|
156
|
+
self.assertFalse(all(retrieved), "串库则全部命中")
|
|
157
|
+
|
|
158
|
+
def test_baseline_underperforms_mindforge(self):
|
|
159
|
+
# context_window 基线 acc 不得高于 mindforge(增量价值守卫)
|
|
160
|
+
items = load_dataset("smoke")
|
|
161
|
+
accs = {}
|
|
162
|
+
for name in ("mindforge", "context_window"):
|
|
163
|
+
backend = BACKEND_REGISTRY[name]()
|
|
164
|
+
rep = run_benchmark(items, backend, ExtractiveAnswerer(),
|
|
165
|
+
DeterministicJudge(), k=5, dataset_id="smoke")
|
|
166
|
+
backend.close()
|
|
167
|
+
accs[name] = rep["aggregate"]["acc"]
|
|
168
|
+
self.assertGreater(accs["mindforge"], accs["context_window"],
|
|
169
|
+
f"记忆系统必须优于裸上下文基线: {accs}")
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class TestLeakGuard(unittest.TestCase):
|
|
173
|
+
"""评测防泄漏:answerer 接口上不存在接触 gold 的通道。"""
|
|
174
|
+
|
|
175
|
+
def test_answerer_signature_has_no_gold(self):
|
|
176
|
+
import inspect
|
|
177
|
+
sig = inspect.signature(ExtractiveAnswerer.answer)
|
|
178
|
+
self.assertEqual(list(sig.parameters), ["self", "question", "chunks"])
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class TestReportAndCLI(unittest.TestCase):
|
|
182
|
+
|
|
183
|
+
def test_aggregate_markdown(self):
|
|
184
|
+
items = load_dataset("smoke")
|
|
185
|
+
backend = ContextWindowBackend()
|
|
186
|
+
rep = run_benchmark(items[:4], backend, ExtractiveAnswerer(),
|
|
187
|
+
DeterministicJudge(), k=2, dataset_id="smoke")
|
|
188
|
+
backend.close()
|
|
189
|
+
path = "/tmp/bench_test_run.json"
|
|
190
|
+
with open(path, "w", encoding="utf-8") as f:
|
|
191
|
+
json.dump(rep, f)
|
|
192
|
+
md = aggregate_markdown([path])
|
|
193
|
+
self.assertIn("| 指标 |", md)
|
|
194
|
+
self.assertIn("acc%", md)
|
|
195
|
+
self.assertIn("## 环境声明", md)
|
|
196
|
+
|
|
197
|
+
def test_cli_report_cmd(self):
|
|
198
|
+
rc = cli_main(["report", "/tmp/bench_test_run.json"])
|
|
199
|
+
self.assertEqual(rc, 0)
|
|
200
|
+
|
|
201
|
+
def test_cli_run_smoke_json(self):
|
|
202
|
+
out = "/tmp/bench_test_cli.json"
|
|
203
|
+
rc = cli_main(["run", "--json", out, "--k", "2"])
|
|
204
|
+
self.assertEqual(rc, 0)
|
|
205
|
+
with open(out, encoding="utf-8") as f:
|
|
206
|
+
d = json.load(f)
|
|
207
|
+
self.assertEqual(d["aggregate"]["count"], 12)
|
|
208
|
+
|
|
209
|
+
def test_cli_unknown_subcmd_exit_2(self):
|
|
210
|
+
rc = cli_main(["不存在"])
|
|
211
|
+
self.assertEqual(rc, 2)
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
if __name__ == "__main__":
|
|
215
|
+
unittest.main()
|
|
@@ -40,8 +40,8 @@ class TestVersionTruth(unittest.TestCase):
|
|
|
40
40
|
def test_core_version_matches_release(self):
|
|
41
41
|
# 版本推进时必须一并更新此处的钉值(与 test_v568_fixes 的
|
|
42
42
|
# _EXPECTED_VERSION 同一约定:让「忘记 bump 版本」在测试里显形)。
|
|
43
|
-
self.assertEqual(core_version.__version__, "6.
|
|
44
|
-
self.assertEqual(core_version.VERSION_INFO, (6,
|
|
43
|
+
self.assertEqual(core_version.__version__, "6.7.0")
|
|
44
|
+
self.assertEqual(core_version.VERSION_INFO, (6, 7, 0))
|
|
45
45
|
|
|
46
46
|
def test_pyproject_matches_core_version(self):
|
|
47
47
|
# v5.8.13 起 pyproject 不再写死静态版本:
|
|
@@ -662,8 +662,8 @@ class TestVersionConsistency(unittest.TestCase):
|
|
|
662
662
|
def test_version_is_612(self):
|
|
663
663
|
from mindforge.core.version import VERSION_INFO, __version__
|
|
664
664
|
# v6.1.3:版本钉值随发版推进更新(历史方法名保留)
|
|
665
|
-
self.assertEqual(__version__, "6.
|
|
666
|
-
self.assertEqual(VERSION_INFO, (6,
|
|
665
|
+
self.assertEqual(__version__, "6.7.0")
|
|
666
|
+
self.assertEqual(VERSION_INFO, (6, 7, 0))
|
|
667
667
|
|
|
668
668
|
def test_json_round_trip_safety_of_preview(self):
|
|
669
669
|
"""save_evolution 的预览序列化不得抛(不可 json 化的对象走 str 兜底)。"""
|
|
@@ -109,7 +109,7 @@ class TestVersionBump(unittest.TestCase):
|
|
|
109
109
|
钉点集合随版本数递增,发版链清单必须扫全部 test_v*fixes.py。"""
|
|
110
110
|
|
|
111
111
|
def test_version_is_current(self):
|
|
112
|
-
self.assertEqual(__version__, "6.
|
|
112
|
+
self.assertEqual(__version__, "6.7.0")
|
|
113
113
|
|
|
114
114
|
|
|
115
115
|
if __name__ == "__main__":
|
|
@@ -118,8 +118,8 @@ class TestVersionBump(unittest.TestCase):
|
|
|
118
118
|
"""版本钉值(每版随发版一并 bump,v6.4.5 教训)。"""
|
|
119
119
|
|
|
120
120
|
def test_version_is_649(self):
|
|
121
|
-
self.assertEqual(__version__, "6.
|
|
122
|
-
self.assertEqual(VERSION_INFO, (6,
|
|
121
|
+
self.assertEqual(__version__, "6.7.0")
|
|
122
|
+
self.assertEqual(VERSION_INFO, (6, 7, 0))
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
if __name__ == "__main__":
|