smartmemory-core 0.7.0__tar.gz → 0.7.2__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.
Files changed (490) hide show
  1. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/PKG-INFO +1 -1
  2. smartmemory_core-0.7.2/VERSION +1 -0
  3. smartmemory_core-0.7.2/smartmemory/anchors/__init__.py +4 -0
  4. smartmemory_core-0.7.2/smartmemory/anchors/drift.py +100 -0
  5. smartmemory_core-0.7.2/smartmemory/anchors/manager.py +186 -0
  6. smartmemory_core-0.7.2/smartmemory/anchors/models.py +16 -0
  7. smartmemory_core-0.7.2/smartmemory/anchors/queries.py +139 -0
  8. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/background/extraction_worker.py +4 -0
  9. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/cli.py +81 -4
  10. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/code/models.py +1 -0
  11. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/importer.py +5 -1
  12. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/decisions/manager.py +6 -4
  13. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/batcher.py +4 -1
  14. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/backends/backend.py +17 -0
  15. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/backends/falkordb.py +26 -6
  16. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/backends/sqlite.py +42 -2
  17. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/core/search.py +88 -9
  18. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/models/schema_validator.py +45 -37
  19. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/types/episodic.py +2 -2
  20. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/public_knowledge_grounder.py +2 -1
  21. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/ingestion/enrichment.py +5 -2
  22. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/__init__.py +24 -0
  23. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/anchor.py +60 -0
  24. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/code_entity.py +103 -0
  25. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/conversation_turn.py +52 -0
  26. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/decision.py +89 -0
  27. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/hook_capture.py +44 -0
  28. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/plan.py +53 -0
  29. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/plan_task.py +64 -0
  30. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/seed_item.py +41 -0
  31. smartmemory_core-0.7.2/smartmemory/memory/ingestion/handlers/tool_call.py +46 -0
  32. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/ingestion/storage.py +5 -1
  33. smartmemory_core-0.7.2/smartmemory/memory/ingestion/structured.py +151 -0
  34. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/linking.py +3 -3
  35. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/crud.py +114 -67
  36. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/grounding.py +1 -1
  37. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/linking.py +2 -2
  38. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/storage.py +1 -1
  39. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/types/procedural_memory.py +3 -2
  40. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/types/zettel_extensions.py +4 -4
  41. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/metrics/graph_health.py +15 -0
  42. smartmemory_core-0.7.2/smartmemory/models/ingestion_strategy.py +17 -0
  43. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/memory_item.py +94 -3
  44. smartmemory_core-0.7.2/smartmemory/origin_policy.py +128 -0
  45. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/config.py +1 -0
  46. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/ground.py +1 -1
  47. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/link.py +6 -1
  48. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/store.py +75 -0
  49. smartmemory_core-0.7.2/smartmemory/plans/__init__.py +11 -0
  50. smartmemory_core-0.7.2/smartmemory/plans/failure_journal.py +168 -0
  51. smartmemory_core-0.7.2/smartmemory/plans/manager.py +186 -0
  52. smartmemory_core-0.7.2/smartmemory/plans/queries.py +202 -0
  53. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/enrichers/link_expansion.py +1 -1
  54. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/decision_confidence.py +7 -1
  55. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/enhanced/exponential_decay.py +14 -7
  56. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/enhanced/working_to_episodic.py +2 -0
  57. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/episodic_to_semantic.py +5 -0
  58. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/episodic_to_zettel.py +4 -0
  59. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/observation_synthesis.py +4 -1
  60. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/opinion_synthesis.py +4 -1
  61. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/stale_memory.py +1 -1
  62. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/working_to_episodic.py +1 -0
  63. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/working_to_procedural.py +2 -0
  64. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/extractors/llm_single.py +16 -15
  65. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/extractors/reasoning.py +1 -1
  66. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/grounders/wikipedia.py +2 -1
  67. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/retrieval/ssg_traversal.py +27 -6
  68. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/smart_memory.py +202 -12
  69. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/llm.py +70 -40
  70. smartmemory_core-0.7.2/smartmemory/utils/llm_client/openai_chat.py +71 -0
  71. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/serialization.py +4 -1
  72. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/validation/memory_validator.py +11 -9
  73. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory_core.egg-info/SOURCES.txt +23 -0
  74. smartmemory_core-0.7.0/VERSION +0 -1
  75. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/.env.example +0 -0
  76. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/CLA.md +0 -0
  77. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/LICENSE +0 -0
  78. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/LICENSE.agpl-v3 +0 -0
  79. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/LICENSE.header +0 -0
  80. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/MANIFEST.in +0 -0
  81. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/README.md +0 -0
  82. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/config.json +0 -0
  83. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/pyproject.toml +0 -0
  84. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/scripts/add_license_headers.py +0 -0
  85. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/scripts/migrate_agent_type.py +0 -0
  86. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/scripts/migrate_claude_memory.py +0 -0
  87. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/setup.cfg +0 -0
  88. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/__init__.py +0 -0
  89. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/__version__.py +0 -0
  90. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/background/__init__.py +0 -0
  91. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/background/id_resolver.py +0 -0
  92. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/clear_all.py +0 -0
  93. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/clustering/__init__.py +0 -0
  94. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/clustering/deduplicator.py +0 -0
  95. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/clustering/embedding.py +0 -0
  96. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/clustering/global_cluster.py +0 -0
  97. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/clustering/graph_aggregator.py +0 -0
  98. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/clustering/llm.py +0 -0
  99. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/code/__init__.py +0 -0
  100. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/code/indexer.py +0 -0
  101. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/code/parser.py +0 -0
  102. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/code/search.py +0 -0
  103. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/code/ts_parser.py +0 -0
  104. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/configuration/__init__.py +0 -0
  105. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/configuration/environment.py +0 -0
  106. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/configuration/loader.py +0 -0
  107. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/configuration/manager.py +0 -0
  108. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/configuration/models.py +0 -0
  109. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/configuration/validator.py +0 -0
  110. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/conversation/__init__.py +0 -0
  111. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/conversation/context.py +0 -0
  112. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/conversation/manager.py +0 -0
  113. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/conversation/session.py +0 -0
  114. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/__init__.py +0 -0
  115. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/exporter.py +0 -0
  116. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/format.py +0 -0
  117. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/pack.py +0 -0
  118. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/reader.py +0 -0
  119. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/rebel.py +0 -0
  120. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/registry.py +0 -0
  121. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/triplet_parser.py +0 -0
  122. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/corpus/writer.py +0 -0
  123. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/data/__init__.py +0 -0
  124. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/data/public_knowledge/__init__.py +0 -0
  125. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/data/seed_patterns.jsonl +0 -0
  126. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/decisions/__init__.py +0 -0
  127. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/decisions/queries.py +0 -0
  128. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/drift_detector.py +0 -0
  129. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evaluation/__init__.py +0 -0
  130. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evaluation/cli.py +0 -0
  131. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evaluation/dataset.py +0 -0
  132. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evaluation/judge.py +0 -0
  133. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evaluation/metrics.py +0 -0
  134. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evaluation/report.py +0 -0
  135. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evaluation/runner.py +0 -0
  136. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/__init__.py +0 -0
  137. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/cycle.py +0 -0
  138. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/diff_engine.py +0 -0
  139. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/events.py +0 -0
  140. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/flow.py +0 -0
  141. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/models.py +0 -0
  142. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/queue.py +0 -0
  143. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/registry.py +0 -0
  144. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/router.py +0 -0
  145. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/store.py +0 -0
  146. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/tracker.py +0 -0
  147. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/utilities.py +0 -0
  148. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/evolution/worker.py +0 -0
  149. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/extraction/__init__.py +0 -0
  150. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/extraction/extractor.py +0 -0
  151. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/extraction/models.py +0 -0
  152. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/feedback/__init__.py +0 -0
  153. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/feedback/agentic_improvement.py +0 -0
  154. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/feedback/agentic_routines.py +0 -0
  155. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/feedback/cli.py +0 -0
  156. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/feedback/manager.py +0 -0
  157. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/feedback/slack.py +0 -0
  158. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/__init__.py +0 -0
  159. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/algos.py +0 -0
  160. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/analytics/__init__.py +0 -0
  161. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/analytics/edge.py +0 -0
  162. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/analytics/episodes.py +0 -0
  163. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/analytics/export.py +0 -0
  164. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/analytics/prune.py +0 -0
  165. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/analytics/temporal.py +0 -0
  166. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/backends/__init__.py +0 -0
  167. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/backends/async_backend.py +0 -0
  168. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/backends/async_falkordb.py +0 -0
  169. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/backends/queries.py +0 -0
  170. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/base.py +0 -0
  171. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/compute.py +0 -0
  172. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/core/__init__.py +0 -0
  173. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/core/edges.py +0 -0
  174. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/core/memory_path.py +0 -0
  175. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/core/nodes.py +0 -0
  176. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/cypher_algos.py +0 -0
  177. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/indexes.py +0 -0
  178. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/models/__init__.py +0 -0
  179. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/models/canonical_types.py +0 -0
  180. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/models/node_types.py +0 -0
  181. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/networkx_algos.py +0 -0
  182. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/ontology_graph.py +0 -0
  183. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/smartgraph.py +0 -0
  184. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/types/__init__.py +0 -0
  185. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/types/interfaces.py +0 -0
  186. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/types/procedural.py +0 -0
  187. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/types/semantic.py +0 -0
  188. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/graph/types/zettel.py +0 -0
  189. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/__init__.py +0 -0
  190. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/benchmark.py +0 -0
  191. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/executors.py +0 -0
  192. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/falkordb_store.py +0 -0
  193. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/miner.py +0 -0
  194. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/models.py +0 -0
  195. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/registry.py +0 -0
  196. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/schemas.py +0 -0
  197. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/snapshot.py +0 -0
  198. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/sparql_client.py +0 -0
  199. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/sqlite_store.py +0 -0
  200. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/store.py +0 -0
  201. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/grounding/type_map.py +0 -0
  202. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/inference/__init__.py +0 -0
  203. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/inference/engine.py +0 -0
  204. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/inference/rules.py +0 -0
  205. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/__init__.py +0 -0
  206. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/archive/archive_provider.py +0 -0
  207. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/chat/__init__.py +0 -0
  208. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/chat/hitl.py +0 -0
  209. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/chat/integration.py +0 -0
  210. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/llm/__init__.py +0 -0
  211. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/llm/llm_client.py +0 -0
  212. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/llm/prompts/__init__.py +0 -0
  213. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/llm/prompts/prompt_manager.py +0 -0
  214. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/llm/prompts/prompt_provider.py +0 -0
  215. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/llm/prompts/prompts.json +0 -0
  216. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/llm/prompts/prompts_loader.py +0 -0
  217. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/llm/providers.py +0 -0
  218. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/llm/response_parser.py +0 -0
  219. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/integration/wikipedia_client.py +0 -0
  220. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/interfaces.py +0 -0
  221. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/managers/__init__.py +0 -0
  222. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/managers/debug.py +0 -0
  223. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/managers/enrichment.py +0 -0
  224. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/managers/evolution.py +0 -0
  225. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/managers/monitoring.py +0 -0
  226. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/__init__.py +0 -0
  227. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/base.py +0 -0
  228. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/canonical_store.py +0 -0
  229. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/context_types.py +0 -0
  230. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/ingestion/__init__.py +0 -0
  231. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/ingestion/extraction.py +0 -0
  232. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/ingestion/flow.py +0 -0
  233. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/ingestion/grounding.py +0 -0
  234. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/ingestion/observer.py +0 -0
  235. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/ingestion/registry.py +0 -0
  236. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/ingestion/utils.py +0 -0
  237. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/memory_factory.py +0 -0
  238. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/migrate.py +0 -0
  239. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/mixins.py +0 -0
  240. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/models/__init__.py +0 -0
  241. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/models/memory_item.py +0 -0
  242. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/__init__.py +0 -0
  243. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/classification.py +0 -0
  244. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/components.py +0 -0
  245. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/config.py +0 -0
  246. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/enrichment.py +0 -0
  247. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/extractor.py +0 -0
  248. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/grounding.py +0 -0
  249. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/input_adapter.py +0 -0
  250. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/plugin_base.py +0 -0
  251. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/__init__.py +0 -0
  252. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/analytics.py +0 -0
  253. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/clustering.py +0 -0
  254. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/coreference.py +0 -0
  255. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/enrichment.py +0 -0
  256. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/evolution.py +0 -0
  257. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/graph_operations.py +0 -0
  258. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/monitoring.py +0 -0
  259. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/personalization.py +0 -0
  260. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/search.py +0 -0
  261. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/stages/validation.py +0 -0
  262. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/state.py +0 -0
  263. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/transactions/__init__.py +0 -0
  264. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/transactions/change_set.py +0 -0
  265. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/transactions/ops.py +0 -0
  266. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/pipeline/transactions/transaction.py +0 -0
  267. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/types/__init__.py +0 -0
  268. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/types/episodic_memory.py +0 -0
  269. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/types/factory_memory_creator.py +0 -0
  270. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/types/semantic_memory.py +0 -0
  271. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/types/wikilink_parser.py +0 -0
  272. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/types/working_memory.py +0 -0
  273. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/types/zettel_memory.py +0 -0
  274. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/memory/utils.py +0 -0
  275. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/metrics/__init__.py +0 -0
  276. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/__init__.py +0 -0
  277. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/base.py +0 -0
  278. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/compat/__init__.py +0 -0
  279. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/compat/boundary_converter.py +0 -0
  280. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/compat/dataclass_model.py +0 -0
  281. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/compat/simple_boundary.py +0 -0
  282. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/concept.py +0 -0
  283. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/conditional_step.py +0 -0
  284. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/corpus.py +0 -0
  285. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/decision.py +0 -0
  286. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/drift_event.py +0 -0
  287. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/entity.py +0 -0
  288. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/entity_types.py +0 -0
  289. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/library.py +0 -0
  290. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/link_types.py +0 -0
  291. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/note.py +0 -0
  292. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/ontology.py +0 -0
  293. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/opinion.py +0 -0
  294. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/procedure.py +0 -0
  295. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/reasoning.py +0 -0
  296. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/schema_snapshot.py +0 -0
  297. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/status.py +0 -0
  298. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/step.py +0 -0
  299. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/tag.py +0 -0
  300. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/models/user_model.py +0 -0
  301. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/observability/__init__.py +0 -0
  302. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/observability/events.py +0 -0
  303. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/observability/instrumentation.py +0 -0
  304. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/observability/json_formatter.py +0 -0
  305. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/observability/logging_filter.py +0 -0
  306. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/observability/retrieval_tracking.py +0 -0
  307. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/observability/tracing.py +0 -0
  308. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/__init__.py +0 -0
  309. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/entity_pair_cache.py +0 -0
  310. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/falkordb_pattern_store.py +0 -0
  311. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/governance.py +0 -0
  312. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/governance_manager.py +0 -0
  313. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/hitl/__init__.py +0 -0
  314. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/hitl/hitl_interface.py +0 -0
  315. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/in_memory_store.py +0 -0
  316. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/inference/__init__.py +0 -0
  317. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/inference/inference.py +0 -0
  318. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/inference/ontogpt.py +0 -0
  319. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/ir_models.py +0 -0
  320. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/layered.py +0 -0
  321. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/llm_manager.py +0 -0
  322. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/manager.py +0 -0
  323. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/models.py +0 -0
  324. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/pattern_manager.py +0 -0
  325. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/promotion.py +0 -0
  326. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/reasoning_validator.py +0 -0
  327. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/registry.py +0 -0
  328. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/sqlite_store.py +0 -0
  329. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/template_service.py +0 -0
  330. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/templates/_manifest.json +0 -0
  331. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/templates/business.json +0 -0
  332. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/templates/general.json +0 -0
  333. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/ontology/templates/software.json +0 -0
  334. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/__init__.py +0 -0
  335. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/metrics_consumer.py +0 -0
  336. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/protocol.py +0 -0
  337. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/runner.py +0 -0
  338. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/__init__.py +0 -0
  339. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/classify.py +0 -0
  340. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/coreference.py +0 -0
  341. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/enrich.py +0 -0
  342. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/entity_ruler.py +0 -0
  343. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/evolve.py +0 -0
  344. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/llm_extract.py +0 -0
  345. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/ontology_constrain.py +0 -0
  346. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/reasoning_detect.py +0 -0
  347. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/stages/simplify.py +0 -0
  348. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/state.py +0 -0
  349. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/token_tracker.py +0 -0
  350. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/transport/__init__.py +0 -0
  351. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/pipeline/transport/event_bus.py +0 -0
  352. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/__init__.py +0 -0
  353. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/base.py +0 -0
  354. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/embedding.py +0 -0
  355. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/enrichers/__init__.py +0 -0
  356. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/enrichers/basic.py +0 -0
  357. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/enrichers/sentiment.py +0 -0
  358. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/enrichers/skills_tools.py +0 -0
  359. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/enrichers/temporal.py +0 -0
  360. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/enrichers/topic.py +0 -0
  361. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/enrichers/usage_tracking.py +0 -0
  362. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/__init__.py +0 -0
  363. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/base.py +0 -0
  364. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/enhanced/__init__.py +0 -0
  365. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/enhanced/hebbian_co_retrieval.py +0 -0
  366. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/enhanced/interference_based_consolidation.py +0 -0
  367. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/enhanced/retrieval_based_strengthening.py +0 -0
  368. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/episodic_decay.py +0 -0
  369. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/opinion_reinforcement.py +0 -0
  370. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/semantic_decay.py +0 -0
  371. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/evolvers/zettel_prune.py +0 -0
  372. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/executor.py +0 -0
  373. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/extractors/__init__.py +0 -0
  374. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/extractors/conversation_aware_llm.py +0 -0
  375. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/extractors/decision.py +0 -0
  376. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/extractors/llm.py +0 -0
  377. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/extractors/spacy.py +0 -0
  378. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/grounders/__init__.py +0 -0
  379. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/manager.py +0 -0
  380. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/registry.py +0 -0
  381. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/resolvers/__init__.py +0 -0
  382. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/resolvers/external_resolver.py +0 -0
  383. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/plugins/security.py +0 -0
  384. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/procedure_matcher.py +0 -0
  385. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/procedures/__init__.py +0 -0
  386. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/procedures/candidate_namer.py +0 -0
  387. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/procedures/candidate_scorer.py +0 -0
  388. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/procedures/models.py +0 -0
  389. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/procedures/pattern_detector.py +0 -0
  390. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/py.typed +0 -0
  391. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/__init__.py +0 -0
  392. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/challenger.py +0 -0
  393. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/confidence.py +0 -0
  394. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/detection/__init__.py +0 -0
  395. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/detection/base.py +0 -0
  396. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/detection/cascade.py +0 -0
  397. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/detection/embedding.py +0 -0
  398. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/detection/graph.py +0 -0
  399. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/detection/heuristic.py +0 -0
  400. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/detection/llm.py +0 -0
  401. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/fuzzy_confidence.py +0 -0
  402. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/models.py +0 -0
  403. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/proof_tree.py +0 -0
  404. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/query_router.py +0 -0
  405. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/reasoner.py +0 -0
  406. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/residuation.py +0 -0
  407. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/resolution/__init__.py +0 -0
  408. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/resolution/base.py +0 -0
  409. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/resolution/cascade.py +0 -0
  410. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/resolution/grounding.py +0 -0
  411. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/resolution/llm.py +0 -0
  412. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/resolution/recency.py +0 -0
  413. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/reasoning/resolution/wikipedia.py +0 -0
  414. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/relations/__init__.py +0 -0
  415. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/relations/benchmark.py +0 -0
  416. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/relations/discovery.py +0 -0
  417. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/relations/normalizer.py +0 -0
  418. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/relations/overlays.py +0 -0
  419. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/relations/schema.py +0 -0
  420. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/relations/scorer.py +0 -0
  421. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/relations/validator.py +0 -0
  422. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/retrieval/__init__.py +0 -0
  423. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/schema_diff.py +0 -0
  424. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/schema_providers.py +0 -0
  425. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/scope_provider.py +0 -0
  426. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/search/__init__.py +0 -0
  427. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/search/query_decomposer.py +0 -0
  428. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/search/rrf_merge.py +0 -0
  429. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/similarity/__init__.py +0 -0
  430. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/similarity/enhanced_metrics.py +0 -0
  431. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/similarity/framework.py +0 -0
  432. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/__init__.py +0 -0
  433. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/base.py +0 -0
  434. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/converters/__init__.py +0 -0
  435. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/converters/episodic_converter.py +0 -0
  436. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/converters/procedural_converter.py +0 -0
  437. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/converters/semantic_converter.py +0 -0
  438. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/converters/zettel_converter.py +0 -0
  439. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/corpus/__init__.py +0 -0
  440. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/corpus/store.py +0 -0
  441. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/example_memory_handler.py +0 -0
  442. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/external/__init__.py +0 -0
  443. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/external/file_handler.py +0 -0
  444. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/external/mcp_handler.py +0 -0
  445. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/external/s3_handler.py +0 -0
  446. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/external/web_handler.py +0 -0
  447. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/factory.py +0 -0
  448. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/json_store.py +0 -0
  449. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/mixins.py +0 -0
  450. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/ontology/__init__.py +0 -0
  451. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/ontology/falkordb.py +0 -0
  452. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/ontology/redis_service.py +0 -0
  453. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/persistence/__init__.py +0 -0
  454. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/persistence/base.py +0 -0
  455. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/persistence/entity_handler.py +0 -0
  456. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/persistence/json.py +0 -0
  457. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/persistence/model.py +0 -0
  458. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/persistence/ontology_handlers.py +0 -0
  459. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/registrations.py +0 -0
  460. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/registry.py +0 -0
  461. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/vector/__init__.py +0 -0
  462. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/vector/backends/__init__.py +0 -0
  463. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/vector/backends/base.py +0 -0
  464. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/vector/backends/falkor.py +0 -0
  465. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/vector/backends/usearch.py +0 -0
  466. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/stores/vector/vector_store.py +0 -0
  467. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/streams/__init__.py +0 -0
  468. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/streams/pipeline_producer.py +0 -0
  469. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/temporal/__init__.py +0 -0
  470. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/temporal/context.py +0 -0
  471. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/temporal/performance.py +0 -0
  472. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/temporal/queries.py +0 -0
  473. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/temporal/relationships.py +0 -0
  474. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/temporal/version_tracker.py +0 -0
  475. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/tools/__init__.py +0 -0
  476. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/tools/factory.py +0 -0
  477. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/tools/markdown_writer.py +0 -0
  478. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/__init__.py +0 -0
  479. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/cache.py +0 -0
  480. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/chunking.py +0 -0
  481. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/context.py +0 -0
  482. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/deduplication.py +0 -0
  483. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/hybrid_retrieval.py +0 -0
  484. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/llm_client/dspy.py +0 -0
  485. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/llm_client/litellm.py +0 -0
  486. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/llm_client/openai.py +0 -0
  487. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/pipeline_utils.py +0 -0
  488. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/utils/token_tracking.py +0 -0
  489. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/validation/__init__.py +0 -0
  490. {smartmemory_core-0.7.0 → smartmemory_core-0.7.2}/smartmemory/validation/edge_validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: smartmemory-core
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: Multi-layered AI memory system with graph databases, vector stores, and intelligent processing pipelines
5
5
  Author: SmartMemory Team
6
6
  License-Expression: AGPL-3.0-or-later
@@ -0,0 +1 @@
1
+ 0.7.2
@@ -0,0 +1,4 @@
1
+ from smartmemory.anchors.manager import AnchorManager
2
+ from smartmemory.anchors.queries import AnchorQueries
3
+
4
+ __all__ = ["AnchorManager", "AnchorQueries"]
@@ -0,0 +1,100 @@
1
+ """Stateless drift checker for CORE-GAPS-1.
2
+
3
+ Compares anchor content against recent outputs using keyword overlap.
4
+ No SmartMemory dependency — pure Python, testable with plain strings.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from smartmemory.anchors.models import DriftReport
10
+ from smartmemory.models.memory_item import MemoryItem
11
+
12
+ # Common English stopwords to filter out of keyword extraction
13
+ _STOPWORDS = frozenset({
14
+ "a", "an", "the", "is", "are", "was", "were", "be", "been", "being",
15
+ "have", "has", "had", "do", "does", "did", "will", "would", "could",
16
+ "should", "may", "might", "shall", "can", "need", "must", "ought",
17
+ "and", "but", "or", "nor", "not", "no", "so", "yet", "both", "either",
18
+ "neither", "each", "every", "all", "any", "few", "more", "most", "other",
19
+ "some", "such", "than", "too", "very", "just", "also", "only",
20
+ "in", "on", "at", "to", "for", "of", "with", "by", "from", "as",
21
+ "into", "through", "during", "before", "after", "above", "below",
22
+ "between", "under", "over", "about", "up", "out", "off", "then",
23
+ "once", "here", "there", "when", "where", "why", "how", "what",
24
+ "which", "who", "whom", "this", "that", "these", "those",
25
+ "i", "me", "my", "we", "our", "you", "your", "he", "him", "his",
26
+ "she", "her", "it", "its", "they", "them", "their",
27
+ "use", "used", "using", "get", "got", "set", "let", "put", "run",
28
+ "make", "made", "take", "give", "keep", "find", "tell", "ask",
29
+ })
30
+
31
+
32
+ class AnchorDriftChecker:
33
+ """Stateless comparator — receives anchors and recent text, returns drift signals."""
34
+
35
+ def check(
36
+ self,
37
+ anchors: list[MemoryItem],
38
+ recent_outputs: list[str],
39
+ ) -> list[DriftReport]:
40
+ """Check each anchor against recent outputs for keyword drift.
41
+
42
+ Args:
43
+ anchors: List of anchor MemoryItems.
44
+ recent_outputs: List of recent output strings to check against.
45
+
46
+ Returns:
47
+ One DriftReport per anchor.
48
+ """
49
+ if not anchors:
50
+ return []
51
+
52
+ output_tokens = self._extract_keywords(" ".join(recent_outputs))
53
+
54
+ reports = []
55
+ for anchor in anchors:
56
+ anchor_keywords = self._extract_keywords(anchor.content)
57
+ if not anchor_keywords:
58
+ reports.append(DriftReport(
59
+ anchor_id=getattr(anchor, "item_id", "") or "",
60
+ anchor_content=anchor.content,
61
+ drift_score=0.0,
62
+ missing_keywords=[],
63
+ severity="none",
64
+ ))
65
+ continue
66
+
67
+ overlap = anchor_keywords & output_tokens
68
+ missing = sorted(anchor_keywords - output_tokens)
69
+ score = 1.0 - (len(overlap) / len(anchor_keywords))
70
+
71
+ reports.append(DriftReport(
72
+ anchor_id=getattr(anchor, "item_id", "") or "",
73
+ anchor_content=anchor.content,
74
+ drift_score=round(score, 3),
75
+ missing_keywords=missing,
76
+ severity=self._severity(score),
77
+ ))
78
+
79
+ return reports
80
+
81
+ def _extract_keywords(self, text: str) -> set[str]:
82
+ """Extract meaningful keywords from text."""
83
+ tokens = set()
84
+ for word in text.lower().split():
85
+ # Strip punctuation
86
+ cleaned = word.strip(".,;:!?()[]{}\"'`-_/\\")
87
+ if len(cleaned) >= 3 and cleaned not in _STOPWORDS:
88
+ tokens.add(cleaned)
89
+ return tokens
90
+
91
+ def _severity(self, score: float) -> str:
92
+ """Map drift score to severity level."""
93
+ if score <= 0.2:
94
+ return "none"
95
+ elif score <= 0.5:
96
+ return "mild"
97
+ elif score <= 0.8:
98
+ return "significant"
99
+ else:
100
+ return "critical"
@@ -0,0 +1,186 @@
1
+ """AnchorManager — lifecycle orchestrator for CORE-GAPS-1.
2
+
3
+ Manages anchor creation, listing, clearing, graduation to decisions,
4
+ and drift detection. Follows the PlanManager pattern.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import logging
10
+ from typing import TYPE_CHECKING, Any, Optional
11
+ from uuid import uuid4
12
+
13
+ from smartmemory.anchors.drift import AnchorDriftChecker
14
+ from smartmemory.anchors.models import DriftReport
15
+ from smartmemory.anchors.queries import AnchorQueries
16
+
17
+ if TYPE_CHECKING:
18
+ from smartmemory.smart_memory import SmartMemory
19
+
20
+ logger = logging.getLogger(__name__)
21
+
22
+ VALID_ANCHOR_TYPES = {"spec", "scope", "decision", "constraint"}
23
+
24
+ # Graduation mapping: anchor_type -> decision_type
25
+ _GRADUATION_MAP = {
26
+ "spec": "policy",
27
+ "scope": "policy",
28
+ "constraint": "policy",
29
+ "decision": "inference",
30
+ }
31
+
32
+
33
+ class AnchorManager:
34
+ """Lifecycle manager for spec anchors."""
35
+
36
+ def __init__(self, memory: SmartMemory) -> None:
37
+ self.memory = memory
38
+ self.queries = AnchorQueries(memory)
39
+ self.drift_checker = AnchorDriftChecker()
40
+
41
+ def set(self, content: str, anchor_type: str, session_id: str) -> str:
42
+ """Create a new anchor.
43
+
44
+ Args:
45
+ content: The requirement/constraint text.
46
+ anchor_type: One of spec, scope, decision, constraint.
47
+ session_id: Session scope for this anchor.
48
+
49
+ Returns:
50
+ The anchor item_id.
51
+
52
+ Raises:
53
+ ValueError: If anchor_type is invalid.
54
+ """
55
+ if anchor_type not in VALID_ANCHOR_TYPES:
56
+ raise ValueError(
57
+ f"Invalid anchor_type '{anchor_type}'. "
58
+ f"Must be one of: {', '.join(sorted(VALID_ANCHOR_TYPES))}"
59
+ )
60
+
61
+ anchor_id = f"anchor_{uuid4().hex[:12]}"
62
+ item_id = self.memory.ingest_structured(
63
+ {
64
+ "content": content,
65
+ "anchor_type": anchor_type,
66
+ "session_id": session_id,
67
+ "anchor_id": anchor_id,
68
+ },
69
+ schema="anchor",
70
+ )
71
+ logger.info(f"Anchor set: {item_id} type={anchor_type} session={session_id}")
72
+ return item_id
73
+
74
+ def list(
75
+ self, session_id: str, anchor_type: Optional[str] = None
76
+ ) -> list[dict[str, Any]]:
77
+ """List active anchors for a session.
78
+
79
+ Args:
80
+ session_id: Session scope.
81
+ anchor_type: Optional type filter.
82
+
83
+ Returns:
84
+ List of anchor dicts.
85
+ """
86
+ return self.queries.get_active(session_id, anchor_type)
87
+
88
+ def clear(
89
+ self, session_id: str, anchor_type: Optional[str] = None
90
+ ) -> int:
91
+ """Clear (deactivate) anchors for a session.
92
+
93
+ Args:
94
+ session_id: Session scope.
95
+ anchor_type: Optional type filter. If None, clears all.
96
+
97
+ Returns:
98
+ Number of anchors cleared.
99
+ """
100
+ active = self.queries.get_active(session_id, anchor_type)
101
+ count = 0
102
+ for anchor in active:
103
+ try:
104
+ self.memory.update_properties(
105
+ anchor["anchor_id"],
106
+ {"anchor_status": "cleared"},
107
+ )
108
+ count += 1
109
+ except Exception as e:
110
+ logger.warning(f"Failed to clear anchor {anchor['anchor_id']}: {e}")
111
+ logger.info(f"Cleared {count} anchors for session={session_id}")
112
+ return count
113
+
114
+ def graduate(self, session_id: str) -> list[str]:
115
+ """Graduate active anchors to decisions.
116
+
117
+ Creates a decision for each active anchor via DecisionManager,
118
+ then marks the anchor as graduated.
119
+
120
+ Args:
121
+ session_id: Session scope.
122
+
123
+ Returns:
124
+ List of created decision IDs.
125
+ """
126
+ from smartmemory.decisions.manager import DecisionManager
127
+
128
+ active = self.queries.get_active(session_id)
129
+ if not active:
130
+ return []
131
+
132
+ dm = DecisionManager(self.memory)
133
+ decision_ids = []
134
+
135
+ for anchor in active:
136
+ anchor_type = anchor.get("anchor_type", "spec")
137
+ decision_type = _GRADUATION_MAP.get(anchor_type, "policy")
138
+
139
+ try:
140
+ decision = dm.create(
141
+ content=anchor["content"],
142
+ decision_type=decision_type,
143
+ evidence_ids=[anchor["anchor_id"]],
144
+ )
145
+ decision_id = decision.decision_id
146
+
147
+ self.memory.update_properties(
148
+ anchor["anchor_id"],
149
+ {
150
+ "anchor_status": "graduated",
151
+ "graduated_to": decision_id,
152
+ },
153
+ )
154
+ decision_ids.append(decision_id)
155
+ logger.info(
156
+ f"Graduated anchor {anchor['anchor_id']} -> decision {decision_id}"
157
+ )
158
+ except Exception as e:
159
+ logger.error(f"Failed to graduate anchor {anchor['anchor_id']}: {e}")
160
+
161
+ return decision_ids
162
+
163
+ def check_drift(
164
+ self, session_id: str, recent_outputs: list[str]
165
+ ) -> list[DriftReport]:
166
+ """Check active anchors for drift against recent outputs.
167
+
168
+ Args:
169
+ session_id: Session scope.
170
+ recent_outputs: List of recent output strings.
171
+
172
+ Returns:
173
+ List of DriftReport, one per active anchor.
174
+ """
175
+ active = self.queries.get_active(session_id)
176
+ if not active:
177
+ return []
178
+
179
+ # Convert dicts to MemoryItems for the drift checker
180
+ anchor_items = []
181
+ for a in active:
182
+ item = self.memory.get(a["anchor_id"])
183
+ if item is not None:
184
+ anchor_items.append(item)
185
+
186
+ return self.drift_checker.check(anchor_items, recent_outputs)
@@ -0,0 +1,16 @@
1
+ """Data models for CORE-GAPS-1 anchor drift detection."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass
6
+
7
+
8
+ @dataclass
9
+ class DriftReport:
10
+ """Result of comparing an anchor against recent outputs."""
11
+
12
+ anchor_id: str
13
+ anchor_content: str
14
+ drift_score: float # 0.0 = aligned, 1.0 = fully drifted
15
+ missing_keywords: list[str]
16
+ severity: str # "none" | "mild" | "significant" | "critical"
@@ -0,0 +1,139 @@
1
+ """Read-only query helpers for CORE-GAPS-1 anchors.
2
+
3
+ Follows the PlanQueries pattern: direct SQLite for INDEXED types,
4
+ search fallback for FalkorDB.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import json
10
+ import logging
11
+ from typing import TYPE_CHECKING, Any, Optional
12
+
13
+ if TYPE_CHECKING:
14
+ from smartmemory.smart_memory import SmartMemory
15
+
16
+ logger = logging.getLogger(__name__)
17
+
18
+
19
+ class AnchorQueries:
20
+ """Read-only queries for anchor items."""
21
+
22
+ def __init__(self, memory: SmartMemory) -> None:
23
+ self.memory = memory
24
+
25
+ def get_active(
26
+ self, session_id: str, anchor_type: Optional[str] = None
27
+ ) -> list[dict[str, Any]]:
28
+ """Get active anchors for a session.
29
+
30
+ Args:
31
+ session_id: Session scope.
32
+ anchor_type: Optional filter (spec, scope, decision, constraint).
33
+
34
+ Returns:
35
+ List of anchor dicts with keys: anchor_id, content, anchor_type,
36
+ session_id, status, created_at.
37
+ """
38
+ backend = self.memory._graph.backend
39
+
40
+ from smartmemory.graph.backends.sqlite import SQLiteBackend
41
+ if isinstance(backend, SQLiteBackend):
42
+ return self._get_active_sqlite(backend, session_id, anchor_type)
43
+ return self._get_active_search_fallback(session_id, anchor_type)
44
+
45
+ def get_by_id(self, anchor_id: str) -> Optional[dict[str, Any]]:
46
+ """Get a single anchor by ID."""
47
+ item = self.memory.get(anchor_id)
48
+ if item is None:
49
+ return None
50
+ if getattr(item, "memory_type", None) != "anchor":
51
+ return None
52
+ return self._to_dict(item)
53
+
54
+ # -- SQLite path --
55
+
56
+ def _get_active_sqlite(
57
+ self, backend: Any, session_id: str, anchor_type: Optional[str]
58
+ ) -> list[dict[str, Any]]:
59
+ """Direct SQLite query for active anchors."""
60
+ sql = (
61
+ "SELECT item_id, properties FROM nodes "
62
+ "WHERE memory_type = 'anchor' "
63
+ "AND json_extract(properties, '$.anchor_status') = 'active' "
64
+ "AND json_extract(properties, '$.anchor_session') = ?"
65
+ )
66
+ params: list[Any] = [session_id]
67
+
68
+ if anchor_type:
69
+ sql += " AND json_extract(properties, '$.anchor_type') = ?"
70
+ params.append(anchor_type)
71
+
72
+ with backend._lock:
73
+ rows = backend._conn.execute(sql, params).fetchall()
74
+
75
+ return [self._row_to_dict(row) for row in rows]
76
+
77
+ # -- Search fallback --
78
+
79
+ def _get_active_search_fallback(
80
+ self, session_id: str, anchor_type: Optional[str]
81
+ ) -> list[dict[str, Any]]:
82
+ """Fallback using graph.search_nodes() for non-SQLite backends.
83
+
84
+ INDEXED types have no embeddings, so memory.search() is unreliable.
85
+ Use direct property-equality queries on the graph backend instead.
86
+ """
87
+ query: dict[str, Any] = {
88
+ "memory_type": "anchor",
89
+ "anchor_status": "active",
90
+ "anchor_session": session_id,
91
+ }
92
+ if anchor_type:
93
+ query["anchor_type"] = anchor_type
94
+
95
+ try:
96
+ rows = self.memory._graph.backend.search_nodes(query)
97
+ except Exception as e:
98
+ logger.warning(f"FalkorDB anchor query failed: {e}")
99
+ return []
100
+
101
+ return [self._node_to_dict(row) for row in rows]
102
+
103
+ def _node_to_dict(self, node: dict[str, Any]) -> dict[str, Any]:
104
+ """Convert a graph node dict to anchor dict."""
105
+ return {
106
+ "anchor_id": node.get("item_id", ""),
107
+ "content": node.get("content", ""),
108
+ "anchor_type": node.get("anchor_type", "spec"),
109
+ "session_id": node.get("anchor_session", ""),
110
+ "status": node.get("anchor_status", "active"),
111
+ "created_at": node.get("transaction_time", ""),
112
+ }
113
+
114
+ # -- Converters --
115
+
116
+ def _row_to_dict(self, row: tuple) -> dict[str, Any]:
117
+ """Convert SQLite row to anchor dict."""
118
+ item_id, props_str = row
119
+ props = json.loads(props_str) if props_str else {}
120
+ return {
121
+ "anchor_id": item_id,
122
+ "content": props.get("content", ""),
123
+ "anchor_type": props.get("anchor_type", "spec"),
124
+ "session_id": props.get("anchor_session", ""),
125
+ "status": props.get("anchor_status", "active"),
126
+ "created_at": props.get("transaction_time", ""),
127
+ }
128
+
129
+ def _to_dict(self, item: Any) -> dict[str, Any]:
130
+ """Convert MemoryItem to anchor dict."""
131
+ meta = getattr(item, "metadata", {}) or {}
132
+ return {
133
+ "anchor_id": getattr(item, "item_id", ""),
134
+ "content": getattr(item, "content", ""),
135
+ "anchor_type": meta.get("anchor_type", "spec"),
136
+ "session_id": meta.get("anchor_session", ""),
137
+ "status": meta.get("anchor_status", "active"),
138
+ "created_at": str(getattr(item, "transaction_time", "")),
139
+ }
@@ -50,6 +50,7 @@ def _entity_for_storage(memory: Any, entity: MemoryItem) -> MemoryItem:
50
50
  entities=entity.entities,
51
51
  relations=entity.relations,
52
52
  metadata=dict(entity.metadata or {}),
53
+ derived_from=entity.derived_from, # Phase 0: preserve lineage (CORE-ORIGIN-1)
53
54
  )
54
55
  return entity
55
56
 
@@ -171,6 +172,7 @@ def process_extract_job(
171
172
  if stored_entity.metadata is None:
172
173
  stored_entity.metadata = {}
173
174
  stored_entity.metadata.setdefault("node_category", "entity")
175
+ stored_entity.derived_from = item_id # Phase 0: link to parent memory (CORE-ORIGIN-1)
174
176
  result = memory._crud.add(stored_entity)
175
177
  if isinstance(result, dict):
176
178
  net_new_node_id = result.get("memory_node_id") or stored_entity.item_id or entity.item_id
@@ -225,6 +227,8 @@ def process_extract_job(
225
227
  "canonical_type": canonical,
226
228
  "raw_predicate": raw_pred,
227
229
  "normalization_confidence": norm_conf,
230
+ "origin": "enricher:llm_extract",
231
+ "confidence": 0.6,
228
232
  }
229
233
  memory._graph.add_edge(
230
234
  rel["source_id"],
@@ -31,11 +31,39 @@ def _get_memory(ctx):
31
31
  @main.command()
32
32
  @click.argument("text")
33
33
  @click.option("--no-markdown", is_flag=True, default=False, help="Skip markdown file creation")
34
+ @click.option("--schema", default=None, help="Structured ingestion schema (e.g. decision, tool_call, plan)")
34
35
  @click.pass_context
35
- def add(ctx, text, no_markdown):
36
- """Add a memory. Extracts entities and stores to local database."""
36
+ def add(ctx, text, no_markdown, schema):
37
+ """Add a memory. Extracts entities and stores to local database.
38
+
39
+ With --schema, treats TEXT as JSON and routes through structured ingestion
40
+ (bypasses NLP pipeline). Available schemas: decision, tool_call, plan_task,
41
+ conversation_turn, hook_capture, seed_item, code_entity, plan.
42
+ """
37
43
  memory = _get_memory(ctx)
38
- item_id = memory.ingest(text)
44
+
45
+ if schema:
46
+ import json as _json
47
+
48
+ try:
49
+ data = _json.loads(text)
50
+ except _json.JSONDecodeError as e:
51
+ console.print(f"[red]Invalid JSON:[/red] {e}")
52
+ raise SystemExit(1) from None
53
+ try:
54
+ item_id = memory.ingest_structured(data, schema=schema)
55
+ except KeyError as e:
56
+ console.print(f"[red]Unknown schema:[/red] {e}")
57
+ raise SystemExit(1) from None
58
+ except ValueError as e:
59
+ console.print(f"[red]Validation error:[/red] {e}")
60
+ raise SystemExit(1) from None
61
+ console.print(f"[green]Stored ({schema}):[/green] {item_id}")
62
+ return
63
+
64
+ from smartmemory.models.memory_item import MemoryItem as _MI
65
+ _item = _MI(content=text, origin="cli:add")
66
+ item_id = memory.ingest(_item)
39
67
  console.print(f"[green]Stored:[/green] {item_id}")
40
68
  if not no_markdown:
41
69
  data_dir = ctx.obj["data_dir"] or str(Path.home() / ".smartmemory")
@@ -146,7 +174,9 @@ def watch(ctx, vault_path):
146
174
  def _ingest(self, path):
147
175
  try:
148
176
  content = Path(path).read_text(encoding="utf-8")
149
- item_id = memory.ingest(content)
177
+ from smartmemory.models.memory_item import MemoryItem as _MI
178
+ _item = _MI(content=content, origin="cli:watch")
179
+ item_id = memory.ingest(_item)
150
180
  console.print(f"[green]Ingested:[/green] {path} → {item_id}")
151
181
  except Exception as e:
152
182
  console.print(f"[red]Error ingesting {path}:[/red] {e}")
@@ -162,3 +192,50 @@ def watch(ctx, vault_path):
162
192
  except KeyboardInterrupt:
163
193
  observer.stop()
164
194
  observer.join()
195
+
196
+
197
+ @main.command()
198
+ @click.argument("text")
199
+ @click.option("--type", "anchor_type", default="spec",
200
+ type=click.Choice(["spec", "scope", "decision", "constraint"]))
201
+ @click.option("--session", default="")
202
+ @click.pass_context
203
+ def anchor(ctx, text, anchor_type, session):
204
+ """Set a spec anchor (requirement/constraint for anti-drift)."""
205
+ memory = _get_memory(ctx)
206
+ from smartmemory.anchors.manager import AnchorManager
207
+ manager = AnchorManager(memory)
208
+ item_id = manager.set(text, anchor_type, session)
209
+ console.print(f"[green]Anchor set:[/green] {item_id} (type={anchor_type})")
210
+
211
+
212
+ @main.command()
213
+ @click.option("--session", default="")
214
+ @click.option("--type", "anchor_type", default=None,
215
+ type=click.Choice(["spec", "scope", "decision", "constraint"]))
216
+ @click.pass_context
217
+ def anchors(ctx, session, anchor_type):
218
+ """List active anchors."""
219
+ memory = _get_memory(ctx)
220
+ from smartmemory.anchors.manager import AnchorManager
221
+ manager = AnchorManager(memory)
222
+ items = manager.list(session, anchor_type)
223
+ if not items:
224
+ console.print("[dim]No active anchors.[/dim]")
225
+ return
226
+ for item in items:
227
+ console.print(f"[bold][{item['anchor_type']}][/bold] {item['content']}")
228
+
229
+
230
+ @main.command(name="anchor-clear")
231
+ @click.option("--session", default="")
232
+ @click.option("--type", "anchor_type", default=None,
233
+ type=click.Choice(["spec", "scope", "decision", "constraint"]))
234
+ @click.pass_context
235
+ def anchor_clear(ctx, session, anchor_type):
236
+ """Clear active anchors."""
237
+ memory = _get_memory(ctx)
238
+ from smartmemory.anchors.manager import AnchorManager
239
+ manager = AnchorManager(memory)
240
+ count = manager.clear(session, anchor_type)
241
+ console.print(f"[green]Cleared {count} anchor(s).[/green]")
@@ -42,6 +42,7 @@ class CodeEntity:
42
42
  "line_number": self.line_number,
43
43
  "repo": self.repo,
44
44
  "memory_type": "code",
45
+ "origin": "code:index",
45
46
  }
46
47
  if self.docstring:
47
48
  props["docstring"] = self.docstring[:500] # truncate long docstrings
@@ -148,9 +148,12 @@ class CorpusImporter:
148
148
 
149
149
  def _import_full(self, record: CorpusRecord) -> None:
150
150
  """Full pipeline import via SmartMemory.ingest()."""
151
+ # CORE-PROPS-1 Phase 6: pack content is reference data
152
+ meta = dict(record.metadata) if record.metadata else {}
153
+ meta["reference"] = True
151
154
  self._sm.ingest(
152
155
  {"content": record.content, "memory_type": record.memory_type},
153
- **record.metadata,
156
+ **meta,
154
157
  )
155
158
 
156
159
  def _import_direct(self, record: CorpusRecord) -> None:
@@ -158,6 +161,7 @@ class CorpusImporter:
158
161
  from smartmemory.models.memory_item import MemoryItem
159
162
 
160
163
  item = MemoryItem(content=record.content, memory_type=record.memory_type)
164
+ item.reference = True # CORE-PROPS-1 Phase 6: pack content is reference data
161
165
  if record.metadata:
162
166
  item.metadata.update(record.metadata)
163
167
 
@@ -86,7 +86,7 @@ class DecisionManager:
86
86
  source_id=source_trace_id,
87
87
  target_id=decision.decision_id,
88
88
  edge_type="PRODUCED",
89
- properties={"confidence": confidence, "timestamp": datetime.now(timezone.utc).isoformat()},
89
+ properties={"confidence": 0.5, "timestamp": datetime.now(timezone.utc).isoformat(), "origin": "evolver:decision"},
90
90
  )
91
91
 
92
92
  if evidence_ids:
@@ -153,7 +153,7 @@ class DecisionManager:
153
153
  source_id=new_decision.decision_id,
154
154
  target_id=old_decision_id,
155
155
  edge_type="SUPERSEDES",
156
- properties={"reason": reason, "timestamp": datetime.now(timezone.utc).isoformat()},
156
+ properties={"reason": reason, "timestamp": datetime.now(timezone.utc).isoformat(), "origin": "evolver:decision", "confidence": 0.5},
157
157
  )
158
158
 
159
159
  return new_decision
@@ -229,7 +229,7 @@ class DecisionManager:
229
229
  source_id=evidence_id,
230
230
  target_id=decision_id,
231
231
  edge_type="CONTRADICTS",
232
- properties={"detected_at": datetime.now(timezone.utc).isoformat()},
232
+ properties={"detected_at": datetime.now(timezone.utc).isoformat(), "origin": "evolver:decision", "confidence": 0.5},
233
233
  )
234
234
 
235
235
  return decision
@@ -284,6 +284,8 @@ class DecisionManager:
284
284
  content=decision.content,
285
285
  memory_type="decision",
286
286
  item_id=decision.decision_id,
287
+ confidence=decision.confidence, # Phase 0: first-class field (CORE-ORIGIN-1)
288
+ derived_from=decision.evidence_ids[0] if decision.evidence_ids else None, # Phase 0: primary evidence
287
289
  metadata=decision.to_dict(),
288
290
  )
289
291
  return self.memory.add(item)
@@ -321,7 +323,7 @@ class DecisionManager:
321
323
  source_id=decision_id,
322
324
  target_id=evidence_id,
323
325
  edge_type="DERIVED_FROM",
324
- properties={"role": "evidence"},
326
+ properties={"role": "evidence", "origin": "evolver:decision", "confidence": 0.5},
325
327
  )
326
328
  except Exception as e:
327
329
  logger.debug(f"Failed to create DERIVED_FROM edge {decision_id} -> {evidence_id}: {e}")