mindforge-memory 6.5.2__tar.gz → 6.5.4__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.5.2/mindforge_memory.egg-info → mindforge_memory-6.5.4}/PKG-INFO +4 -4
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/README.md +3 -3
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/mindforge.py +63 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/version.py +2 -2
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4/mindforge_memory.egg-info}/PKG-INFO +4 -4
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge_memory.egg-info/SOURCES.txt +1 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v568_fixes.py +1 -1
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v575_release_consistency.py +2 -2
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v612_fixes.py +2 -2
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v643_fixes.py +1 -1
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v645_fixes.py +1 -1
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v646_fixes.py +1 -1
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v649_fixes.py +2 -2
- mindforge_memory-6.5.4/tests/test_v654_search_multi.py +100 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/LICENSE +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/MindForge.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/__init__.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/adapters/__init__.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/adapters/claude_adapter.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/adapters/crewai_memory.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/adapters/generic_api.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/adapters/langgraph_store.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/adapters/openclaw_adapter.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/api/__init__.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/api/server.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/cli/__init__.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/cli/main.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/__init__.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/embedding.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/encryption.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/indexer.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/paths.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/query.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/storage.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/core/types.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/daemon/__init__.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/daemon/server.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/mcp/__init__.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/mcp/server.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/__init__.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/categorizer.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/conflict_detector.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/connectors.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/context_window.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/event_bus.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/evolution.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/experience.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/federated.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/federated_acl.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/follow_up.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/hybrid_search.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/importer.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/integrator.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/intent_router.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/knowledge_graph.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/memory_compressor.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/memory_decay.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/memory_passport.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/multi_agent.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/multimodal.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/outcome_learning.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/personality.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/principled_forgetting.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/privacy.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/recall.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/session_focus.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/share_conflict.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/skill_extractor.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/skill_pack.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/timeline_viz.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/v6.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge_memory.egg-info/dependency_links.txt +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge_memory.egg-info/entry_points.txt +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge_memory.egg-info/requires.txt +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge_memory.egg-info/top_level.txt +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/pyproject.toml +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/setup.cfg +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/setup.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_core.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_security_hardening.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_trash_hard_delete.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v546_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v547_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v548_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v550_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v552_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v554_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v556_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v557_banner_insight_wal.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v557_security_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v557_webhook_sig_export.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v558_audit_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v558_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v560_decay_gc.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v560_kdf_versioning.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v560_module_coverage.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v561_security.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v562_p2_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v563_entry_coverage.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v563_perf_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v565_security.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v566_encrypted_search.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v567_security_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v569_fts_sync.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v570_coverage_expansion.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v570_drama_and_utils.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v570_encrypted_fallback.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v571_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v572_security.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v573_encrypted_export.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v573_security.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v576_bitemporal.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v576_gdpr.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v577_agent_governance.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v578_embedding.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v579_graph.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v580_experience.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v5812_bugfixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v583_security.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v584_adapters.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v585_benchmark.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v586_federated_mcp.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v590_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v592_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v593_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v595_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v600_forgetting_followup.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v600_import_timeline.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v600_multi_agent_formal.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v600_outcome_passport.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v600_skillpack_evolution.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v611_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v612_cascade_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v613_integrity.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v620_growth_governance.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v630_search_explain.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v631_scrypt.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v632_explain_interfaces.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v635_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v635_integration.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v636_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v648_fixes.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v652_context_expansion.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/tests/test_v65_features.py +0 -0
- {mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/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.5.
|
|
3
|
+
Version: 6.5.4
|
|
4
4
|
Summary: AI Agent 终身记忆系统 - 四层记忆架构 · 知识图谱 · 多模态支持
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/opok-ops/MindForge
|
|
@@ -36,11 +36,11 @@ Dynamic: license-file
|
|
|
36
36
|
|
|
37
37
|
MindForge gives AI agents a persistent, structured long-term memory: a four-tier lifecycle model, knowledge graphs, hybrid retrieval, end-to-end encryption, and MCP / CLI / REST interfaces. All data stays on your machine.
|
|
38
38
|
|
|
39
|
-
> **The story** — one developer, seven months, from v1.0 (March 2026) to v6.5.
|
|
39
|
+
> **The story** — one developer, seven months, from v1.0 (March 2026) to v6.5.4: no team, no funding, 1,272 passing tests. [Read the journey →](https://opok-ops.github.io/MindForge/#developer)
|
|
40
40
|
|
|
41
41
|
[](https://www.python.org/downloads/)
|
|
42
42
|
[](LICENSE)
|
|
43
|
-
[](https://github.com/opok-ops/MindForge/releases)
|
|
44
44
|
[](https://github.com/opok-ops/MindForge/stargazers)
|
|
45
45
|
[](https://github.com/opok-ops/MindForge/forks)
|
|
46
46
|
[](https://github.com/opok-ops/MindForge/issues)
|
|
@@ -188,7 +188,7 @@ v6.1.3 – v6.4.9 shipped in ten days (2026-11-01 → 11-11; four releases in th
|
|
|
188
188
|
|
|
189
189
|
```
|
|
190
190
|
┌──────────────────────────────────────────────────────┐
|
|
191
|
-
│ MindForge v6.5.
|
|
191
|
+
│ MindForge v6.5.4 │
|
|
192
192
|
│ Cognitive Layer Personality · KnowledgeGraph │
|
|
193
193
|
│ MemoryEvolution · FederatedMemory │
|
|
194
194
|
├──────────────────────────────────────────────────────┤
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
MindForge gives AI agents a persistent, structured long-term memory: a four-tier lifecycle model, knowledge graphs, hybrid retrieval, end-to-end encryption, and MCP / CLI / REST interfaces. All data stays on your machine.
|
|
8
8
|
|
|
9
|
-
> **The story** — one developer, seven months, from v1.0 (March 2026) to v6.5.
|
|
9
|
+
> **The story** — one developer, seven months, from v1.0 (March 2026) to v6.5.4: no team, no funding, 1,272 passing tests. [Read the journey →](https://opok-ops.github.io/MindForge/#developer)
|
|
10
10
|
|
|
11
11
|
[](https://www.python.org/downloads/)
|
|
12
12
|
[](LICENSE)
|
|
13
|
-
[](https://github.com/opok-ops/MindForge/releases)
|
|
14
14
|
[](https://github.com/opok-ops/MindForge/stargazers)
|
|
15
15
|
[](https://github.com/opok-ops/MindForge/forks)
|
|
16
16
|
[](https://github.com/opok-ops/MindForge/issues)
|
|
@@ -158,7 +158,7 @@ v6.1.3 – v6.4.9 shipped in ten days (2026-11-01 → 11-11; four releases in th
|
|
|
158
158
|
|
|
159
159
|
```
|
|
160
160
|
┌──────────────────────────────────────────────────────┐
|
|
161
|
-
│ MindForge v6.5.
|
|
161
|
+
│ MindForge v6.5.4 │
|
|
162
162
|
│ Cognitive Layer Personality · KnowledgeGraph │
|
|
163
163
|
│ MemoryEvolution · FederatedMemory │
|
|
164
164
|
├──────────────────────────────────────────────────────┤
|
|
@@ -888,6 +888,69 @@ class MindForge:
|
|
|
888
888
|
result.total_found = len(result.chunks)
|
|
889
889
|
return result
|
|
890
890
|
|
|
891
|
+
def search_multi(self, queries: Optional[List[str]],
|
|
892
|
+
per_query: int = 3,
|
|
893
|
+
max_results: int = 10,
|
|
894
|
+
expand_context: int = 0,
|
|
895
|
+
min_relevance: float = 0.3,
|
|
896
|
+
categories: Optional[List[str]] = None,
|
|
897
|
+
layers: Optional[List[str]] = None,
|
|
898
|
+
agent_id: str = "",
|
|
899
|
+
session_id: str = "",
|
|
900
|
+
use_embedding: bool = True,
|
|
901
|
+
explain: bool = False) -> "RecallResult":
|
|
902
|
+
"""多查询融合检索(v6.5.4)
|
|
903
|
+
|
|
904
|
+
各子查询独立检索(保留每条查询的词法锚点),按 memory_id
|
|
905
|
+
去重合并,结果顺序 = 首次出现的查询序位(保查询优先级)。
|
|
906
|
+
用途:查询拆解 / 实体扩展 / 多视角召回等应用层策略的检索
|
|
907
|
+
融合基座——拆解策略本身由调用方提供(LLM 或规则),本层只
|
|
908
|
+
负责融合与去重,不引入任何模型调用。
|
|
909
|
+
|
|
910
|
+
v6.5.4 实验背景(LoCoMo conv-26 cat2 多跳,199 问中的 37 问):
|
|
911
|
+
LLM 拆解与实体扩展两条 eval 层路径当日均证伪(高峰期拆解
|
|
912
|
+
质量不可控 / 实体子查询无增益),本 API 作为中性基座保留,
|
|
913
|
+
供后续 AdaptiveContextEngine 的两跳链检索使用。
|
|
914
|
+
|
|
915
|
+
副作用契约:每条子查询按普通 search 记审计与访问统计
|
|
916
|
+
(多查询=多次真实检索行为,如实记录)。
|
|
917
|
+
"""
|
|
918
|
+
import time as _time
|
|
919
|
+
start = _time.perf_counter()
|
|
920
|
+
empty = self._query_result_empty() if hasattr(
|
|
921
|
+
self, "_query_result_empty") else None
|
|
922
|
+
if not queries:
|
|
923
|
+
from mindforge.core.query import RecallResult as _RR
|
|
924
|
+
return _RR(chunks=[], total_found=0,
|
|
925
|
+
query_time_ms=0.0,
|
|
926
|
+
strategy_used="multi:0queries",
|
|
927
|
+
token_estimate=0)
|
|
928
|
+
merged = []
|
|
929
|
+
seen = set()
|
|
930
|
+
for i, q in enumerate(queries[:8]): # 上限 8 条防御
|
|
931
|
+
if not q:
|
|
932
|
+
continue
|
|
933
|
+
res = self.search(
|
|
934
|
+
q, max_results=per_query,
|
|
935
|
+
min_relevance=min_relevance,
|
|
936
|
+
categories=categories, layers=layers,
|
|
937
|
+
agent_id=agent_id, session_id=session_id,
|
|
938
|
+
use_embedding=use_embedding, explain=explain,
|
|
939
|
+
expand_context=expand_context)
|
|
940
|
+
for ch in res.chunks:
|
|
941
|
+
if ch.memory_id not in seen:
|
|
942
|
+
seen.add(ch.memory_id)
|
|
943
|
+
merged.append(ch)
|
|
944
|
+
merged = merged[:max_results]
|
|
945
|
+
elapsed = (_time.perf_counter() - start) * 1000
|
|
946
|
+
from mindforge.core.query import RecallResult as _RR
|
|
947
|
+
return _RR(
|
|
948
|
+
chunks=merged,
|
|
949
|
+
total_found=len(merged),
|
|
950
|
+
query_time_ms=round(elapsed, 2),
|
|
951
|
+
strategy_used=f"multi:{len(queries)}queries",
|
|
952
|
+
token_estimate=sum(len(c.content) for c in merged) // 4)
|
|
953
|
+
|
|
891
954
|
def rebuild_embeddings(self, batch_size: int = 100,
|
|
892
955
|
incremental: bool = True) -> dict:
|
|
893
956
|
"""重建/增量构建嵌入向量(v5.4.5 新增,v5.4.6 增量模式)
|
|
@@ -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.5.
|
|
23
|
+
__version__: str = "6.5.4"
|
|
24
24
|
|
|
25
25
|
#: 结构化版本元组,便于比较(如 `VERSION_INFO >= (6, 1, 0)`)
|
|
26
|
-
VERSION_INFO: Tuple[int, int, int] = (6, 5,
|
|
26
|
+
VERSION_INFO: Tuple[int, int, int] = (6, 5, 4)
|
|
27
27
|
|
|
28
28
|
#: 下一个大版本的目标版本号(供 v6 端口预留引用)
|
|
29
29
|
NEXT_MAJOR_TARGET: str = "7.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mindforge-memory
|
|
3
|
-
Version: 6.5.
|
|
3
|
+
Version: 6.5.4
|
|
4
4
|
Summary: AI Agent 终身记忆系统 - 四层记忆架构 · 知识图谱 · 多模态支持
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/opok-ops/MindForge
|
|
@@ -36,11 +36,11 @@ Dynamic: license-file
|
|
|
36
36
|
|
|
37
37
|
MindForge gives AI agents a persistent, structured long-term memory: a four-tier lifecycle model, knowledge graphs, hybrid retrieval, end-to-end encryption, and MCP / CLI / REST interfaces. All data stays on your machine.
|
|
38
38
|
|
|
39
|
-
> **The story** — one developer, seven months, from v1.0 (March 2026) to v6.5.
|
|
39
|
+
> **The story** — one developer, seven months, from v1.0 (March 2026) to v6.5.4: no team, no funding, 1,272 passing tests. [Read the journey →](https://opok-ops.github.io/MindForge/#developer)
|
|
40
40
|
|
|
41
41
|
[](https://www.python.org/downloads/)
|
|
42
42
|
[](LICENSE)
|
|
43
|
-
[](https://github.com/opok-ops/MindForge/releases)
|
|
44
44
|
[](https://github.com/opok-ops/MindForge/stargazers)
|
|
45
45
|
[](https://github.com/opok-ops/MindForge/forks)
|
|
46
46
|
[](https://github.com/opok-ops/MindForge/issues)
|
|
@@ -188,7 +188,7 @@ v6.1.3 – v6.4.9 shipped in ten days (2026-11-01 → 11-11; four releases in th
|
|
|
188
188
|
|
|
189
189
|
```
|
|
190
190
|
┌──────────────────────────────────────────────────────┐
|
|
191
|
-
│ MindForge v6.5.
|
|
191
|
+
│ MindForge v6.5.4 │
|
|
192
192
|
│ Cognitive Layer Personality · KnowledgeGraph │
|
|
193
193
|
│ MemoryEvolution · FederatedMemory │
|
|
194
194
|
├──────────────────────────────────────────────────────┤
|
|
@@ -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.5.
|
|
44
|
-
self.assertEqual(core_version.VERSION_INFO, (6, 5,
|
|
43
|
+
self.assertEqual(core_version.__version__, "6.5.4")
|
|
44
|
+
self.assertEqual(core_version.VERSION_INFO, (6, 5, 4))
|
|
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.5.
|
|
666
|
-
self.assertEqual(VERSION_INFO, (6, 5,
|
|
665
|
+
self.assertEqual(__version__, "6.5.4")
|
|
666
|
+
self.assertEqual(VERSION_INFO, (6, 5, 4))
|
|
667
667
|
|
|
668
668
|
def test_json_round_trip_safety_of_preview(self):
|
|
669
669
|
"""save_evolution 的预览序列化不得抛(不可 json 化的对象走 str 兜底)。"""
|
|
@@ -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.5.
|
|
122
|
-
self.assertEqual(VERSION_INFO, (6, 5,
|
|
121
|
+
self.assertEqual(__version__, "6.5.4")
|
|
122
|
+
self.assertEqual(VERSION_INFO, (6, 5, 4))
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
if __name__ == "__main__":
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""v6.5.4 多查询融合检索(search_multi)行为契约
|
|
3
|
+
|
|
4
|
+
背景:LLM 拆解与实体扩展两条 eval 路径当日证伪(LoCoMo cat2 多跳
|
|
5
|
+
实验),本 API 作为中性融合基座保留——拆解策略由调用方提供。
|
|
6
|
+
契约:去重合并、查询序位保序、副作用只记一次、空输入降级安全。
|
|
7
|
+
"""
|
|
8
|
+
import tempfile
|
|
9
|
+
|
|
10
|
+
import pytest
|
|
11
|
+
|
|
12
|
+
from mindforge.core.mindforge import MindForge
|
|
13
|
+
from mindforge.core.types import MemoryConfig
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@pytest.fixture
|
|
17
|
+
def mf():
|
|
18
|
+
tmp = tempfile.mkdtemp()
|
|
19
|
+
inst = MindForge(config=MemoryConfig(
|
|
20
|
+
db_path=f"{tmp}/mf.db", key_file=None, encrypted=False))
|
|
21
|
+
yield inst
|
|
22
|
+
inst.close()
|
|
23
|
+
import shutil
|
|
24
|
+
shutil.rmtree(tmp, ignore_errors=True)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _seed(mf):
|
|
28
|
+
mf.add("alpha project kickoff meeting notes", category="work")
|
|
29
|
+
mf.add("beta launch timeline discussion", category="work")
|
|
30
|
+
mf.add("alpha budget review with finance", category="work")
|
|
31
|
+
mf.add("gamma unrelated memo", category="general")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class TestSearchMulti:
|
|
35
|
+
def test_merge_dedup(self, mf):
|
|
36
|
+
"""两查询命中交集记忆:结果无重复 memory_id"""
|
|
37
|
+
_seed(mf)
|
|
38
|
+
res = mf.search_multi(["alpha project", "alpha budget"], per_query=3)
|
|
39
|
+
ids = [c.memory_id for c in res.chunks]
|
|
40
|
+
assert len(ids) == len(set(ids)), "memory_id 出现重复"
|
|
41
|
+
|
|
42
|
+
def test_query_priority_order(self, mf):
|
|
43
|
+
"""第一查询的命中整体排在后续查询之前"""
|
|
44
|
+
_seed(mf)
|
|
45
|
+
res = mf.search_multi(["beta launch", "alpha"], per_query=2)
|
|
46
|
+
assert res.chunks, "应有结果"
|
|
47
|
+
first_query_ids = set()
|
|
48
|
+
r1 = mf.search("beta launch", max_results=2)
|
|
49
|
+
for ch in r1.chunks:
|
|
50
|
+
first_query_ids.add(ch.memory_id)
|
|
51
|
+
# 首查全部命中应在合并结果的前 len(first_query_ids) 位内
|
|
52
|
+
got = set(c.memory_id for c in res.chunks[:len(first_query_ids)])
|
|
53
|
+
assert first_query_ids <= got or first_query_ids == set(
|
|
54
|
+
c.memory_id for c in res.chunks), "首查优先级被破坏"
|
|
55
|
+
|
|
56
|
+
def test_empty_queries(self, mf):
|
|
57
|
+
"""空查询列表:空结果不炸"""
|
|
58
|
+
_seed(mf)
|
|
59
|
+
res = mf.search_multi([], per_query=3)
|
|
60
|
+
assert res.chunks == []
|
|
61
|
+
assert res.strategy_used == "multi:0queries"
|
|
62
|
+
|
|
63
|
+
def test_none_queries(self, mf):
|
|
64
|
+
"""None 查询:等价空"""
|
|
65
|
+
_seed(mf)
|
|
66
|
+
res = mf.search_multi(None)
|
|
67
|
+
assert res.chunks == []
|
|
68
|
+
|
|
69
|
+
def test_single_query_equivalence(self, mf):
|
|
70
|
+
"""单查询(放宽序):合并结果 ⊆ 单 search 结果集"""
|
|
71
|
+
_seed(mf)
|
|
72
|
+
res = mf.search_multi(["alpha"], per_query=3)
|
|
73
|
+
r1 = mf.search("alpha", max_results=3)
|
|
74
|
+
assert {c.memory_id for c in res.chunks} == {
|
|
75
|
+
c.memory_id for c in r1.chunks}
|
|
76
|
+
|
|
77
|
+
def test_max_results_cap(self, mf):
|
|
78
|
+
"""合并结果不超过 max_results"""
|
|
79
|
+
_seed(mf)
|
|
80
|
+
res = mf.search_multi(["alpha", "beta", "gamma"], per_query=3,
|
|
81
|
+
max_results=2)
|
|
82
|
+
assert len(res.chunks) <= 2
|
|
83
|
+
|
|
84
|
+
def test_strategy_and_timing(self, mf):
|
|
85
|
+
"""strategy_used 标记多查询数"""
|
|
86
|
+
_seed(mf)
|
|
87
|
+
res = mf.search_multi(["alpha", "beta"], per_query=2)
|
|
88
|
+
assert res.strategy_used == "multi:2queries"
|
|
89
|
+
assert res.query_time_ms >= 0
|
|
90
|
+
|
|
91
|
+
def test_expand_context_passthrough(self, mf):
|
|
92
|
+
"""expand_context 透传到子查询"""
|
|
93
|
+
for i in range(6):
|
|
94
|
+
mf.add(f"unique-seq-{i} anchor-text",
|
|
95
|
+
category="session",
|
|
96
|
+
tags=[f"ctxgrp:sm", f"ctxseq:{i}"])
|
|
97
|
+
res = mf.search_multi(["unique-seq-2", "unique-seq-4"],
|
|
98
|
+
per_query=1, expand_context=2)
|
|
99
|
+
any_exp = any(c.context_expansion for c in res.chunks)
|
|
100
|
+
assert any_exp, "context_expansion 未透传"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge/modules/principled_forgetting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge_memory.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{mindforge_memory-6.5.2 → mindforge_memory-6.5.4}/mindforge_memory.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|