surreal-memory 2.7.0__tar.gz → 2.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.
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/PKG-INFO +28 -1
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/README.md +27 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/pyproject.toml +1 -1
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/__init__.py +1 -1
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/diagnostics.py +17 -7
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/retrieval.py +18 -9
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/app.py +40 -20
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/dashboard_api.py +33 -6
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/base.py +1 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/memory_store.py +1 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/shared_store.py +1 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_neurons.py +1 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/store.py +125 -3
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/unified_config.py +5 -5
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/.gitignore +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/LICENSE +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/NOTICE +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/__main__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/_helpers.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/brain.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/codebase.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/config_cmd.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/habits.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/info.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/listing.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/memory.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/project.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/reindex.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/shared.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/shortcuts.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/storage.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/telegram.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/tools.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/train.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/update.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/version.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/commands/watch.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/config.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/doctor.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/embedding_setup.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/full_setup.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/graph_export.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/ide_rules.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/main.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/markdown_export.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/setup.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/storage.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/tui.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/update_check.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/cli/wizard.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/config_presets.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/action_event.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/alert.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/brain.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/brain_mode.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/eternal_context.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/fiber.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/memory_types.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/neuron.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/project.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/review_schedule.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/source.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/synapse.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/core/trigger_engine.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/activation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/arousal.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/associative_inference.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/brain_evolution.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/brain_transplant.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/brain_versioning.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/causal_traversal.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/chart_generator.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/chunking.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/citation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/clustering.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/codebase_encoder.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/cognitive.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/compression.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/conflict_auto_resolve.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/conflict_detection.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/connection_explainer.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/consolidation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/consolidation_delta.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/context_merger.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/context_optimizer.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/context_retrieval.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/cross_brain.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/db_introspector.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/db_knowledge.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/db_trainer.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/decision_intel.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/dedup/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/dedup/config.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/dedup/llm_judge.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/dedup/pipeline.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/dedup/prompts.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/depth_prior.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/doc_chunker.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/doc_extractor.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/doc_trainer.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/dream.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/drift_detection.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/capability.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/config.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/gemini_embedding.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/ollama_embedding.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/openai_embedding.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/openrouter_embedding.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/provider.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/retry.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/embedding/sentence_transformer.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/encoder.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/enrichment.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/fidelity.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/file_watcher.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/fuzzy_match.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/fuzzy_query.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/gromov.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/hippocampal_replay.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/hooks.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/idf_anchor.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/importance.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/interference.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/koopman.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/learning_rule.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/lifecycle.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/memory_stages.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/merge.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/narrative.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/pattern_extraction.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/pipeline.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/pipeline_steps.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/ppr_activation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/prediction_error.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/priming.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/quality_scorer.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/query_expander.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/query_expansion.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/query_pattern_mining.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/reconsolidation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/reconstruction.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/reflection.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/reflex_activation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/reranker.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/retrieval_context.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/retrieval_types.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/schema_assimilation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/score_fusion.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/semantic_discovery.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/sequence_mining.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/session_state.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/spaced_repetition.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/stabilization.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/sufficiency.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/temporal_binding.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/tier_engine.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/token_budget.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/token_normalizer.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/tool_memory.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/topology_analysis.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/watch_state.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/workflow_suggest.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/engine/write_queue.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/codebase.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/entities.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/keywords.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/llm_provider.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/parser.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/relations.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/router.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/sentiment.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/structure_detector.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/extraction/temporal.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/git_context.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/hooks/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/hooks/post_tool_use.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/hooks/pre_compact.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/hooks/project_context.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/hooks/session_start.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/hooks/stop.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/hooks/task_context.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/adapter.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/adapters/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/adapters/awf_adapter.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/adapters/chromadb_adapter.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/adapters/cognee_adapter.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/adapters/graphiti_adapter.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/adapters/llamaindex_adapter.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/adapters/mem0_adapter.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/mapper.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/models.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/sync_engine.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integration/telegram.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integrations/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integrations/nanobot/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integrations/nanobot/base_tool.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integrations/nanobot/context.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integrations/nanobot/memory_store.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integrations/nanobot/protocol.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integrations/nanobot/setup.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integrations/nanobot/tools.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/integrations/openclaw_config.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/__main__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/alert_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/auto_capture.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/auto_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/budget_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/cognitive_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/conflict_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/connection_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/constants.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/db_train_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/drift_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/eternal_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/evolution_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/expiry_cleanup_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/http_transport.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/index_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/instruction_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/lifecycle_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/maintenance_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/mem0_sync_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/narrative_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/offload_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/onboarding_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/prompt.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/provenance_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/recall_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/remember_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/response_compactor.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/review_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/scheduled_consolidation_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/server.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/session_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/stats_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/surface_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/sync_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/telegram_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/tier_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/tool_handler_utils.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/tool_handlers.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/tool_schemas.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/train_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/version_check_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/visualize_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/mcp/watch_handler.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/plugins/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/plugins/base.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/plugins/community.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/py.typed +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/safety/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/safety/encryption.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/safety/freshness.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/safety/input_firewall.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/safety/sensitive.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/dependencies.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/models.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/brain.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/consolidation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/hub.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/integration_status.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/memory.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/oauth.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/openclaw_api.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/sync.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/DiagramsPage-BZV40eAE.css +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/DiagramsPage-DbhaKtcI.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/EvolutionPage-CzD9dgSX.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/GraphPage-CrI1ELz_.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/HealthPage-9CH7uxp0.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/OraclePage--QnA7bus.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/OverviewPage-uovTY60B.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/ProGate-37WFbaAW.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/SettingsPage-BwQ0sSKJ.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/StoragePage-Dfp1G5qu.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/SyncPage-CNbeBod6.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/TimelinePage-C2MQrnce.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/ToolStatsPage-zZWqg3RV.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/VisualizePage-D-CKRU7v.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/card-CB2KYkrP.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/embed-gLOWnRXV.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/index-CWIfFh7B.css +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/index-DzyKsRxc.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/skeleton-B4zDkVHp.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/timer-DWAvo6M8.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/vendor-icons-BYlYobEK.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/vendor-motion-Ct_HHbYW.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/vendor-query-CqA1cBNl.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/vendor-react-BfuodpLv.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/vendor-recharts-BkwZfCWA.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/assets/vendor-ui-Qm4_4bAc.js +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/static/dist/index.html +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/skills/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/skills/memory-audit/SKILL.md +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/skills/memory-evolution/SKILL.md +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/skills/memory-intake/SKILL.md +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/factory.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/memory_brain_ops.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/memory_collections.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/memory_reviews.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/neuron_cache.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/read_pool.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/shared_store_collections.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/shared_store_mappers.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_action_log.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_alerts.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_brain_ops.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_calibration.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_change_log.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_coactivation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_cognitive.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_compression.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_depth_priors.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_devices.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_drift.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_entity_refs.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_fibers.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_maturation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_merkle.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_projects.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_reviews.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_row_mappers.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_schema.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_sessions.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_sources.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_store.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_synapses.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_sync_state.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_tool_events.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_training_files.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_typed.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/sqlite_versioning.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/activity.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/alerts.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/cognitive.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/compression.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/connection.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/depth_priors.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/keyword_entity.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/maturation.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/migrations.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/projects.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/review_schedules.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/schema.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/sources.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/tool_events.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/typed_memory.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/storage/surrealdb/versions.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/surface/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/surface/generator.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/surface/lifecycle.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/surface/models.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/surface/parser.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/surface/resolver.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/surface/serializer.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/surface/token_budget.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/sync/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/sync/client.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/sync/device.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/sync/incremental_merge.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/sync/merkle.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/sync/protocol.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/sync/sync_engine.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/utils/__init__.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/utils/config.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/utils/consolidation_lock.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/utils/sandbox.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/utils/simhash.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/utils/ssl_helper.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/utils/tag_normalizer.py +0 -0
- {surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/utils/timeutils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: surreal-memory
|
|
3
|
-
Version: 2.7.
|
|
3
|
+
Version: 2.7.2
|
|
4
4
|
Summary: Reflex-based memory system for AI agents with SurrealDB backend — retrieval through activation, not search
|
|
5
5
|
Project-URL: Homepage, https://github.com/acidkill/surreal-memory
|
|
6
6
|
Project-URL: Documentation, https://github.com/acidkill/surreal-memory/blob/main/docs/getting-started/quickstart.md
|
|
@@ -266,6 +266,7 @@ Everything else — sessions, context loading, habit tracking, maintenance — w
|
|
|
266
266
|
|
|
267
267
|
- **Encoding Pipeline** — composable async steps: extract entities → create neurons → link synapses → bundle into fibers
|
|
268
268
|
- **Reflex Retrieval** — spreading activation through the neuron graph, combined with SurrealDB vector search when available
|
|
269
|
+
- **Reranking** — optional cross-encoder pass over-fetches SA candidates and blends relevance score with activation level for higher recall precision
|
|
269
270
|
- **Consolidation** — merges similar neurons, reinforces strong paths, prunes weak ones
|
|
270
271
|
- **Compression** — 5-tier lifecycle: full → summary → essence → ghost → metadata
|
|
271
272
|
|
|
@@ -307,6 +308,7 @@ Sync uses **Merkle delta** — only diffs travel, not the full brain.
|
|
|
307
308
|
- **15 memory types** — fact, decision, error, insight, preference, workflow, instruction, and more
|
|
308
309
|
- **Spreading activation** — memories surface by association, not keyword match
|
|
309
310
|
- **Vector search** — SurrealDB HNSW for semantic similarity (when embeddings are configured)
|
|
311
|
+
- **Cross-encoder reranking** — optional config-driven precision pass, HTTP (shared inference server) or in-process, blended with the activation score
|
|
310
312
|
- **Cognitive reasoning** — hypothesize, submit evidence, make predictions, verify with Bayesian confidence
|
|
311
313
|
|
|
312
314
|
#### Knowledge Ingestion
|
|
@@ -365,6 +367,31 @@ Set the provider to `auto` to pick the best available option at runtime
|
|
|
365
367
|
|
|
366
368
|
---
|
|
367
369
|
|
|
370
|
+
## Reranking
|
|
371
|
+
|
|
372
|
+
Spreading activation over-fetches candidates; an optional cross-encoder reranker then
|
|
373
|
+
scores each `(query, memory)` pair for relevance and blends that score with the
|
|
374
|
+
activation level (`blend_weight`, default `0.7`) for a final precision pass. Off by
|
|
375
|
+
default — recall works the same without it.
|
|
376
|
+
|
|
377
|
+
```toml
|
|
378
|
+
[reranker]
|
|
379
|
+
enabled = true
|
|
380
|
+
endpoint = "http://127.0.0.1:11435/v1" # OpenAI-compatible /rerank (e.g. llamastash)
|
|
381
|
+
model_name = "BAAI/bge-reranker-v2-m3"
|
|
382
|
+
blend_weight = 0.7
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
- **HTTP mode** (`endpoint` set) — runs on a shared inference server (e.g. llama.cpp /
|
|
386
|
+
llamastash on GPU), no `torch` dependency needed locally. Falls back to the
|
|
387
|
+
`SURREAL_MEMORY_RERANKER_ENDPOINT` env var when `endpoint` is unset.
|
|
388
|
+
- **In-process mode** (no endpoint) — loads a local `sentence-transformers` `CrossEncoder`.
|
|
389
|
+
Install with `pip install "surreal-memory[reranker]"`.
|
|
390
|
+
- Reranking never breaks recall — any error falls back to the spreading-activation
|
|
391
|
+
ordering unchanged.
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
368
395
|
## Setup by Tool
|
|
369
396
|
|
|
370
397
|
<details>
|
|
@@ -154,6 +154,7 @@ Everything else — sessions, context loading, habit tracking, maintenance — w
|
|
|
154
154
|
|
|
155
155
|
- **Encoding Pipeline** — composable async steps: extract entities → create neurons → link synapses → bundle into fibers
|
|
156
156
|
- **Reflex Retrieval** — spreading activation through the neuron graph, combined with SurrealDB vector search when available
|
|
157
|
+
- **Reranking** — optional cross-encoder pass over-fetches SA candidates and blends relevance score with activation level for higher recall precision
|
|
157
158
|
- **Consolidation** — merges similar neurons, reinforces strong paths, prunes weak ones
|
|
158
159
|
- **Compression** — 5-tier lifecycle: full → summary → essence → ghost → metadata
|
|
159
160
|
|
|
@@ -195,6 +196,7 @@ Sync uses **Merkle delta** — only diffs travel, not the full brain.
|
|
|
195
196
|
- **15 memory types** — fact, decision, error, insight, preference, workflow, instruction, and more
|
|
196
197
|
- **Spreading activation** — memories surface by association, not keyword match
|
|
197
198
|
- **Vector search** — SurrealDB HNSW for semantic similarity (when embeddings are configured)
|
|
199
|
+
- **Cross-encoder reranking** — optional config-driven precision pass, HTTP (shared inference server) or in-process, blended with the activation score
|
|
198
200
|
- **Cognitive reasoning** — hypothesize, submit evidence, make predictions, verify with Bayesian confidence
|
|
199
201
|
|
|
200
202
|
#### Knowledge Ingestion
|
|
@@ -253,6 +255,31 @@ Set the provider to `auto` to pick the best available option at runtime
|
|
|
253
255
|
|
|
254
256
|
---
|
|
255
257
|
|
|
258
|
+
## Reranking
|
|
259
|
+
|
|
260
|
+
Spreading activation over-fetches candidates; an optional cross-encoder reranker then
|
|
261
|
+
scores each `(query, memory)` pair for relevance and blends that score with the
|
|
262
|
+
activation level (`blend_weight`, default `0.7`) for a final precision pass. Off by
|
|
263
|
+
default — recall works the same without it.
|
|
264
|
+
|
|
265
|
+
```toml
|
|
266
|
+
[reranker]
|
|
267
|
+
enabled = true
|
|
268
|
+
endpoint = "http://127.0.0.1:11435/v1" # OpenAI-compatible /rerank (e.g. llamastash)
|
|
269
|
+
model_name = "BAAI/bge-reranker-v2-m3"
|
|
270
|
+
blend_weight = 0.7
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
- **HTTP mode** (`endpoint` set) — runs on a shared inference server (e.g. llama.cpp /
|
|
274
|
+
llamastash on GPU), no `torch` dependency needed locally. Falls back to the
|
|
275
|
+
`SURREAL_MEMORY_RERANKER_ENDPOINT` env var when `endpoint` is unset.
|
|
276
|
+
- **In-process mode** (no endpoint) — loads a local `sentence-transformers` `CrossEncoder`.
|
|
277
|
+
Install with `pip install "surreal-memory[reranker]"`.
|
|
278
|
+
- Reranking never breaks recall — any error falls back to the spreading-activation
|
|
279
|
+
ordering unchanged.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
256
283
|
## Setup by Tool
|
|
257
284
|
|
|
258
285
|
<details>
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "surreal-memory"
|
|
7
|
-
version = "2.7.
|
|
7
|
+
version = "2.7.2"
|
|
8
8
|
description = "Reflex-based memory system for AI agents with SurrealDB backend — retrieval through activation, not search"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -16,7 +16,7 @@ from surreal_memory.engine.encoder import EncodingResult, MemoryEncoder
|
|
|
16
16
|
from surreal_memory.engine.reflex_activation import CoActivation, ReflexActivation
|
|
17
17
|
from surreal_memory.engine.retrieval import DepthLevel, ReflexPipeline, RetrievalResult
|
|
18
18
|
|
|
19
|
-
__version__ = "2.7.
|
|
19
|
+
__version__ = "2.7.2"
|
|
20
20
|
|
|
21
21
|
__all__ = [
|
|
22
22
|
"__version__",
|
|
@@ -513,11 +513,16 @@ class DiagnosticsEngine:
|
|
|
513
513
|
if neuron_count == 0:
|
|
514
514
|
return 0.0
|
|
515
515
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
connected
|
|
516
|
+
# Prefer the DB-side distinct-endpoints aggregate over loading ~185k
|
|
517
|
+
# Synapse objects (that scan was seconds of the dashboard's slowness).
|
|
518
|
+
get_connected = getattr(self._storage, "get_connected_neuron_ids", None)
|
|
519
|
+
if get_connected is not None:
|
|
520
|
+
connected: set[str] = set(await get_connected())
|
|
521
|
+
else:
|
|
522
|
+
connected = set()
|
|
523
|
+
for s in await self._storage.get_all_synapses():
|
|
524
|
+
connected.add(s.source_id)
|
|
525
|
+
connected.add(s.target_id)
|
|
521
526
|
|
|
522
527
|
# Also count neurons that belong to fibers as connected
|
|
523
528
|
if fibers:
|
|
@@ -536,8 +541,13 @@ class DiagnosticsEngine:
|
|
|
536
541
|
if neuron_count == 0:
|
|
537
542
|
return 0.0
|
|
538
543
|
|
|
539
|
-
|
|
540
|
-
|
|
544
|
+
# DB aggregate instead of loading every neuron_state (~64k rows).
|
|
545
|
+
count_active = getattr(self._storage, "count_activated_neuron_states", None)
|
|
546
|
+
if count_active is not None:
|
|
547
|
+
activated_count = int(await count_active())
|
|
548
|
+
else:
|
|
549
|
+
states = await self._storage.get_all_neuron_states()
|
|
550
|
+
activated_count = sum(1 for s in states if s.access_frequency > 0)
|
|
541
551
|
return activated_count / max(neuron_count, 1)
|
|
542
552
|
|
|
543
553
|
@staticmethod
|
|
@@ -495,15 +495,24 @@ class ReflexPipeline:
|
|
|
495
495
|
logger.debug("Deferred write flush failed (non-critical)", exc_info=True)
|
|
496
496
|
return _early_result
|
|
497
497
|
|
|
498
|
-
# 4.9 Cross-encoder reranking (optional post-SA refinement)
|
|
499
|
-
|
|
498
|
+
# 4.9 Cross-encoder reranking (optional post-SA refinement).
|
|
499
|
+
# Reranking is deployment/runtime config, NOT per-brain state — read it
|
|
500
|
+
# from the effective app config so each client (CLI, MCP, web UI) uses its
|
|
501
|
+
# OWN endpoint. Persisting it on the (shared) brain made a reranker-off
|
|
502
|
+
# client — e.g. the web-UI container — flip the flag for everyone on
|
|
503
|
+
# connect (the reranker-flip bug). The brain's reranker_* fields are kept
|
|
504
|
+
# for compatibility but are no longer the source of truth here.
|
|
505
|
+
from surreal_memory.unified_config import get_config as _get_app_config
|
|
506
|
+
|
|
507
|
+
_rr = _get_app_config().reranker
|
|
508
|
+
if _rr.enabled and len(activations) > 1:
|
|
500
509
|
try:
|
|
501
510
|
from surreal_memory.engine.reranker import reranker_available
|
|
502
511
|
|
|
503
512
|
# The config endpoint (config.toml [reranker].endpoint) makes
|
|
504
513
|
# reranking available even when neither the env endpoint nor an
|
|
505
514
|
# in-process CrossEncoder is present, so gate on it explicitly.
|
|
506
|
-
config_endpoint = (
|
|
515
|
+
config_endpoint = (_rr.endpoint or "").strip()
|
|
507
516
|
if config_endpoint or reranker_available():
|
|
508
517
|
from surreal_memory.engine.reranker import rerank_activations
|
|
509
518
|
|
|
@@ -515,7 +524,7 @@ class ReflexPipeline:
|
|
|
515
524
|
key=lambda x: x[1].activation_level,
|
|
516
525
|
reverse=True,
|
|
517
526
|
)
|
|
518
|
-
][:
|
|
527
|
+
][: _rr.max_candidates]
|
|
519
528
|
neuron_batch = await self._storage.get_neurons_batch(top_nids)
|
|
520
529
|
neuron_contents = {
|
|
521
530
|
nid: n.content for nid, n in neuron_batch.items() if n.content
|
|
@@ -526,12 +535,12 @@ class ReflexPipeline:
|
|
|
526
535
|
query,
|
|
527
536
|
activations,
|
|
528
537
|
neuron_contents,
|
|
529
|
-
model_name=
|
|
530
|
-
blend_weight=
|
|
531
|
-
min_score=
|
|
532
|
-
max_candidates=
|
|
538
|
+
model_name=_rr.model_name,
|
|
539
|
+
blend_weight=_rr.blend_weight,
|
|
540
|
+
min_score=_rr.min_score,
|
|
541
|
+
max_candidates=_rr.max_candidates,
|
|
533
542
|
limit=50,
|
|
534
|
-
endpoint=
|
|
543
|
+
endpoint=_rr.endpoint,
|
|
535
544
|
)
|
|
536
545
|
logger.debug(
|
|
537
546
|
"Reranked %d → %d activations",
|
|
@@ -586,21 +586,33 @@ def create_app(
|
|
|
586
586
|
capped_limit = min(limit, 2000)
|
|
587
587
|
edge_cap = 4000
|
|
588
588
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
degree[
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
s for s in
|
|
603
|
-
|
|
589
|
+
# Degree ranking + edge fetch via DB aggregates/graph traversal when the
|
|
590
|
+
# backend supports it (SurrealDB). Loading all ~185k synapses into Python
|
|
591
|
+
# just to rank/filter them was ~10 s of the graph view's 30 s+ hang.
|
|
592
|
+
get_degrees = getattr(storage, "get_synapse_degrees", None)
|
|
593
|
+
get_edges = getattr(storage, "get_edges_for_neurons", None)
|
|
594
|
+
if get_degrees is not None and get_edges is not None:
|
|
595
|
+
degree: dict[str, int] = await get_degrees()
|
|
596
|
+
# Each edge contributes once to its in-group and once to its out-group.
|
|
597
|
+
total_synapses = sum(degree.values()) // 2
|
|
598
|
+
ranked_ids = sorted(degree, key=lambda nid: degree[nid], reverse=True)
|
|
599
|
+
selected_ids = set(ranked_ids[offset : offset + capped_limit])
|
|
600
|
+
# Indexed ->synapse traversal fetches only the selected core's edges.
|
|
601
|
+
core_edges = await get_edges(list(selected_ids))
|
|
602
|
+
visible_synapses = [s for s in core_edges if s.target_id in selected_ids][:edge_cap]
|
|
603
|
+
else:
|
|
604
|
+
synapses = await storage.get_all_synapses()
|
|
605
|
+
total_synapses = len(synapses)
|
|
606
|
+
degree = {}
|
|
607
|
+
for s in synapses:
|
|
608
|
+
degree[s.source_id] = degree.get(s.source_id, 0) + 1
|
|
609
|
+
degree[s.target_id] = degree.get(s.target_id, 0) + 1
|
|
610
|
+
ranked_ids = sorted(degree, key=lambda nid: degree[nid], reverse=True)
|
|
611
|
+
selected_ids = set(ranked_ids[offset : offset + capped_limit])
|
|
612
|
+
# Edge-first: keep edges with both endpoints in the dense set (cap payload).
|
|
613
|
+
visible_synapses = [
|
|
614
|
+
s for s in synapses if s.source_id in selected_ids and s.target_id in selected_ids
|
|
615
|
+
][:edge_cap]
|
|
604
616
|
|
|
605
617
|
# Nodes = every endpoint the visible edges reference, plus the selected core.
|
|
606
618
|
endpoint_ids = {s.source_id for s in visible_synapses} | {
|
|
@@ -608,11 +620,19 @@ def create_app(
|
|
|
608
620
|
}
|
|
609
621
|
node_ids = endpoint_ids | selected_ids
|
|
610
622
|
|
|
611
|
-
#
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
623
|
+
# Fetch ONLY the nodes we render, without the embedding vector. Loading all
|
|
624
|
+
# ~64k neurons here (each carrying a 1024-float embedding_vec) was the graph
|
|
625
|
+
# view's 30 s+ hang; node_ids is a few thousand at most.
|
|
626
|
+
find_by_ids = getattr(storage, "find_neurons_by_ids", None)
|
|
627
|
+
if find_by_ids is not None:
|
|
628
|
+
neurons = await find_by_ids(list(node_ids), include_embedding=False)
|
|
629
|
+
else:
|
|
630
|
+
all_neurons = await storage.find_neurons(limit=100000)
|
|
631
|
+
by_id = {n.id: n for n in all_neurons}
|
|
632
|
+
neurons = [by_id[nid] for nid in node_ids if nid in by_id]
|
|
633
|
+
# Isolated neurons never render in the graph, so the connected-node count
|
|
634
|
+
# (len(degree)) is the graph's universe; the true brain total is on /stats.
|
|
635
|
+
total_neurons = len(degree)
|
|
616
636
|
|
|
617
637
|
fibers = await storage.get_fibers(limit=1000)
|
|
618
638
|
|
{surreal_memory-2.7.0 → surreal_memory-2.7.2}/src/surreal_memory/server/routes/dashboard_api.py
RENAMED
|
@@ -94,13 +94,10 @@ async def get_stats() -> DashboardStats:
|
|
|
94
94
|
"""Analyze a single brain using its own per-brain storage."""
|
|
95
95
|
try:
|
|
96
96
|
brain_storage = await get_shared_storage(brain_name=name)
|
|
97
|
-
stats = await brain_storage.get_stats(name)
|
|
98
|
-
nc = stats.get("neuron_count", 0)
|
|
99
|
-
sc = stats.get("synapse_count", 0)
|
|
100
|
-
fc = stats.get("fiber_count", 0)
|
|
101
97
|
|
|
102
98
|
grade = "F"
|
|
103
99
|
purity = 0.0
|
|
100
|
+
nc = sc = fc = 0
|
|
104
101
|
try:
|
|
105
102
|
from surreal_memory.engine.diagnostics import DiagnosticsEngine
|
|
106
103
|
|
|
@@ -108,8 +105,18 @@ async def get_stats() -> DashboardStats:
|
|
|
108
105
|
report = await diag.analyze(name)
|
|
109
106
|
grade = report.grade
|
|
110
107
|
purity = report.purity_score
|
|
108
|
+
# The report already carries the counts (via get_enhanced_stats),
|
|
109
|
+
# so a separate get_stats here would just repeat the same three
|
|
110
|
+
# count queries per brain.
|
|
111
|
+
nc = report.neuron_count
|
|
112
|
+
sc = report.synapse_count
|
|
113
|
+
fc = report.fiber_count
|
|
111
114
|
except Exception:
|
|
112
115
|
logger.debug("Diagnostics failed for brain %s", name, exc_info=True)
|
|
116
|
+
stats = await brain_storage.get_stats(name)
|
|
117
|
+
nc = stats.get("neuron_count", 0)
|
|
118
|
+
sc = stats.get("synapse_count", 0)
|
|
119
|
+
fc = stats.get("fiber_count", 0)
|
|
113
120
|
|
|
114
121
|
return BrainSummary(
|
|
115
122
|
id=name,
|
|
@@ -379,7 +386,25 @@ async def get_timeline(
|
|
|
379
386
|
end: str | None = Query(default=None, description="ISO datetime end"),
|
|
380
387
|
) -> TimelineResponse:
|
|
381
388
|
"""Get chronological list of memories for timeline visualization."""
|
|
382
|
-
|
|
389
|
+
# Push the time window into the DB when both bounds are given, and never fetch
|
|
390
|
+
# the embedding_vec — the timeline uses only id/content/type/created_at/metadata,
|
|
391
|
+
# so dragging the 1024-float vector per row was pure waste.
|
|
392
|
+
from datetime import datetime as _dt
|
|
393
|
+
|
|
394
|
+
def _iso(s: str | None) -> _dt | None:
|
|
395
|
+
if not s:
|
|
396
|
+
return None
|
|
397
|
+
try:
|
|
398
|
+
return _dt.fromisoformat(s)
|
|
399
|
+
except ValueError:
|
|
400
|
+
return None
|
|
401
|
+
|
|
402
|
+
start_dt = _iso(start)
|
|
403
|
+
end_dt = _iso(end)
|
|
404
|
+
time_range = (start_dt, end_dt) if start_dt and end_dt else None
|
|
405
|
+
neurons = await storage.find_neurons(
|
|
406
|
+
limit=min(limit, 2000), time_range=time_range, include_embedding=False
|
|
407
|
+
)
|
|
383
408
|
|
|
384
409
|
entries: list[TimelineEntry] = []
|
|
385
410
|
for n in neurons:
|
|
@@ -444,7 +469,9 @@ async def get_daily_stats(
|
|
|
444
469
|
end = now
|
|
445
470
|
|
|
446
471
|
# Use public API: find_neurons with time_range
|
|
447
|
-
neurons = await storage.find_neurons(
|
|
472
|
+
neurons = await storage.find_neurons(
|
|
473
|
+
time_range=(start, end), limit=1000, include_embedding=False
|
|
474
|
+
)
|
|
448
475
|
|
|
449
476
|
# Aggregate neurons by day
|
|
450
477
|
days_map: dict[str, DailyStatsEntry] = {}
|
|
@@ -106,6 +106,7 @@ class InMemoryStorage(
|
|
|
106
106
|
limit: int = 100,
|
|
107
107
|
offset: int = 0,
|
|
108
108
|
ephemeral: bool | None = None,
|
|
109
|
+
include_embedding: bool = True,
|
|
109
110
|
) -> list[Neuron]:
|
|
110
111
|
full_scan = content_contains is None and content_exact is None
|
|
111
112
|
limit = min(limit, 10000 if full_scan else 1000)
|
|
@@ -201,6 +201,7 @@ class SharedStorage(SharedFiberBrainMixin, NeuralStorage):
|
|
|
201
201
|
limit: int = 100,
|
|
202
202
|
offset: int = 0,
|
|
203
203
|
ephemeral: bool | None = None,
|
|
204
|
+
include_embedding: bool = True,
|
|
204
205
|
) -> list[Neuron]:
|
|
205
206
|
"""Find neurons matching criteria."""
|
|
206
207
|
params: dict[str, Any] = {"limit": limit, "offset": offset}
|
|
@@ -192,6 +192,7 @@ class SQLiteNeuronMixin:
|
|
|
192
192
|
limit: int = 100,
|
|
193
193
|
offset: int = 0,
|
|
194
194
|
ephemeral: bool | None = None,
|
|
195
|
+
include_embedding: bool = True,
|
|
195
196
|
) -> list[Neuron]:
|
|
196
197
|
# Cache shortcut for exact-match lookups (most repeated pattern)
|
|
197
198
|
if content_exact is not None and content_contains is None and time_range is None:
|
|
@@ -601,6 +601,7 @@ class SurrealDBStorage(
|
|
|
601
601
|
limit: int = 100,
|
|
602
602
|
offset: int = 0,
|
|
603
603
|
ephemeral: bool | None = None,
|
|
604
|
+
include_embedding: bool = True,
|
|
604
605
|
) -> list[Neuron]:
|
|
605
606
|
brain_id = self._get_brain_id()
|
|
606
607
|
conditions = ["brain_id = $brain_id"]
|
|
@@ -629,12 +630,43 @@ class SurrealDBStorage(
|
|
|
629
630
|
params["ephemeral"] = ephemeral
|
|
630
631
|
|
|
631
632
|
where = " AND ".join(conditions)
|
|
633
|
+
# OMIT the 1024-3072-float embedding_vec when the caller doesn't need it
|
|
634
|
+
# (dashboard graph/timeline). It is ~4-8 KB/row, so dragging it over tens of
|
|
635
|
+
# thousands of rows is the single biggest dashboard slowdown after a re-embed.
|
|
636
|
+
projection = "SELECT *" if include_embedding else "SELECT * OMIT embedding_vec"
|
|
632
637
|
rows = await self._query(
|
|
633
|
-
f"
|
|
638
|
+
f"{projection} FROM neuron WHERE {where} ORDER BY id LIMIT {int(limit)} START {int(offset)}",
|
|
634
639
|
**params,
|
|
635
640
|
)
|
|
636
641
|
return [_row_to_neuron(r) for r in rows]
|
|
637
642
|
|
|
643
|
+
async def find_neurons_by_ids(
|
|
644
|
+
self, neuron_ids: list[str], include_embedding: bool = False
|
|
645
|
+
) -> list[Neuron]:
|
|
646
|
+
"""Fetch specific neurons by id in one query, omitting the embedding by
|
|
647
|
+
default. Used by the graph view, which needs only a few thousand nodes out
|
|
648
|
+
of tens of thousands and never uses the vector."""
|
|
649
|
+
if not neuron_ids:
|
|
650
|
+
return []
|
|
651
|
+
# Convert to SurrealDB record ids and keep only injection-safe names
|
|
652
|
+
# (alphanumeric + underscore), since they are interpolated into FROM.
|
|
653
|
+
safe = [
|
|
654
|
+
sid
|
|
655
|
+
for nid in neuron_ids
|
|
656
|
+
for sid in (_to_surreal_id(nid),)
|
|
657
|
+
if sid and all(c.isalnum() or c == "_" for c in sid)
|
|
658
|
+
]
|
|
659
|
+
if not safe:
|
|
660
|
+
return []
|
|
661
|
+
projection = "SELECT *" if include_embedding else "SELECT * OMIT embedding_vec"
|
|
662
|
+
out: list[Neuron] = []
|
|
663
|
+
# Chunk to keep the FROM record-id list a sane query size.
|
|
664
|
+
for i in range(0, len(safe), 1000):
|
|
665
|
+
things = ", ".join(f"neuron:{s}" for s in safe[i : i + 1000])
|
|
666
|
+
rows = await self._query(f"{projection} FROM {things}")
|
|
667
|
+
out.extend(_row_to_neuron(r) for r in rows)
|
|
668
|
+
return out
|
|
669
|
+
|
|
638
670
|
async def suggest_neurons(
|
|
639
671
|
self,
|
|
640
672
|
prefix: str,
|
|
@@ -2029,10 +2061,100 @@ class SurrealDBStorage(
|
|
|
2029
2061
|
)
|
|
2030
2062
|
return [_row_to_neuron_state(r) for r in rows]
|
|
2031
2063
|
|
|
2032
|
-
async def
|
|
2064
|
+
async def count_activated_neuron_states(self, brain_id: str | None = None) -> int:
|
|
2065
|
+
"""Count neuron_states with access_frequency > 0 via a DB aggregate.
|
|
2066
|
+
|
|
2067
|
+
Diagnostics used to load every neuron_state (~64k rows) just to count the
|
|
2068
|
+
activated ones — a multi-second scan on the dashboard. This does it in a
|
|
2069
|
+
single ``count() … GROUP ALL`` (~0.4 s)."""
|
|
2070
|
+
bid = brain_id or self._get_brain_id()
|
|
2071
|
+
rows = await self._query(
|
|
2072
|
+
"SELECT count() AS c FROM neuron_state"
|
|
2073
|
+
" WHERE brain_id = $bid AND access_frequency > 0 GROUP ALL",
|
|
2074
|
+
bid=bid,
|
|
2075
|
+
)
|
|
2076
|
+
return int(rows[0].get("c", 0)) if rows else 0
|
|
2077
|
+
|
|
2078
|
+
async def get_connected_neuron_ids(self, brain_id: str | None = None) -> set[str]:
|
|
2079
|
+
"""Return the set of neuron ids that are an endpoint of any synapse.
|
|
2080
|
+
|
|
2081
|
+
Uses ``GROUP BY in`` / ``GROUP BY out`` on the native RELATE edge (the
|
|
2082
|
+
`source_id`/`target_id` fields are computed, so `array::group` on them
|
|
2083
|
+
yields nothing — but the real `in`/`out` record links group fine). This
|
|
2084
|
+
replaces loading ~185k Synapse objects (~10 s) for the orphan-rate metric
|
|
2085
|
+
with two distinct-key scans (~2 s total)."""
|
|
2086
|
+
bid = brain_id or self._get_brain_id()
|
|
2087
|
+
connected: set[str] = set()
|
|
2088
|
+
for field in ("in", "out"):
|
|
2089
|
+
rows = await self._query(
|
|
2090
|
+
f"SELECT VALUE {field} FROM synapse WHERE brain_id = $bid GROUP BY {field}",
|
|
2091
|
+
bid=bid,
|
|
2092
|
+
)
|
|
2093
|
+
for rid in rows:
|
|
2094
|
+
connected.add(_from_surreal_id(str(rid)))
|
|
2095
|
+
return connected
|
|
2096
|
+
|
|
2097
|
+
async def get_synapse_degrees(self, brain_id: str | None = None) -> dict[str, int]:
|
|
2098
|
+
"""Per-neuron synapse degree via DB ``GROUP BY`` on the RELATE endpoints.
|
|
2099
|
+
|
|
2100
|
+
Replaces loading every synapse into Python just to count endpoints
|
|
2101
|
+
(the dashboard graph's ranking step). Note: grouping must target the
|
|
2102
|
+
real ``in``/``out`` record links — the ``source_id``/``target_id``
|
|
2103
|
+
fields are computed and do not aggregate."""
|
|
2104
|
+
bid = brain_id or self._get_brain_id()
|
|
2105
|
+
degree: dict[str, int] = {}
|
|
2106
|
+
for field in ("in", "out"):
|
|
2107
|
+
rows = await self._query(
|
|
2108
|
+
f"SELECT {field} AS nid, count() AS deg FROM synapse"
|
|
2109
|
+
f" WHERE brain_id = $bid GROUP BY {field}",
|
|
2110
|
+
bid=bid,
|
|
2111
|
+
)
|
|
2112
|
+
for r in rows:
|
|
2113
|
+
nid = _endpoint_to_id(r.get("nid"))
|
|
2114
|
+
if nid:
|
|
2115
|
+
degree[nid] = degree.get(nid, 0) + int(r.get("deg", 0) or 0)
|
|
2116
|
+
return degree
|
|
2117
|
+
|
|
2118
|
+
async def get_edges_for_neurons(self, neuron_ids: list[str]) -> list[Synapse]:
|
|
2119
|
+
"""Outgoing synapses of the given neurons via the indexed graph traversal.
|
|
2120
|
+
|
|
2121
|
+
``->synapse`` on a record id uses the RELATE edge index, so fetching the
|
|
2122
|
+
edges of a few thousand selected nodes is sub-second — versus ~10 s for a
|
|
2123
|
+
full ``SELECT * FROM synapse`` table scan with 185k+ edges."""
|
|
2124
|
+
if not neuron_ids:
|
|
2125
|
+
return []
|
|
2126
|
+
safe = [
|
|
2127
|
+
sid
|
|
2128
|
+
for nid in neuron_ids
|
|
2129
|
+
for sid in (_to_surreal_id(nid),)
|
|
2130
|
+
if sid and all(c.isalnum() or c == "_" for c in sid)
|
|
2131
|
+
]
|
|
2132
|
+
edges: list[Synapse] = []
|
|
2133
|
+
for i in range(0, len(safe), 500):
|
|
2134
|
+
things = ", ".join(f"neuron:{s}" for s in safe[i : i + 500])
|
|
2135
|
+
rows = await self._query(
|
|
2136
|
+
"SELECT id, ->synapse.{id, out, type, weight, direction, created_at} AS edges"
|
|
2137
|
+
f" FROM {things}"
|
|
2138
|
+
)
|
|
2139
|
+
for row in rows:
|
|
2140
|
+
src = row.get("id")
|
|
2141
|
+
for e in row.get("edges") or []:
|
|
2142
|
+
d = dict(e)
|
|
2143
|
+
d["in"] = src
|
|
2144
|
+
try:
|
|
2145
|
+
edges.append(_row_to_synapse(d))
|
|
2146
|
+
except Exception:
|
|
2147
|
+
continue
|
|
2148
|
+
return edges
|
|
2149
|
+
|
|
2150
|
+
async def get_all_synapses(self, include_metadata: bool = True) -> list[Synapse]:
|
|
2033
2151
|
brain_id = self._get_brain_id()
|
|
2152
|
+
# OMIT the metadata blob when the caller (e.g. the dashboard graph) only
|
|
2153
|
+
# needs endpoints/type/weight — it roughly halves the transfer for the
|
|
2154
|
+
# ~185k-row synapse scan.
|
|
2155
|
+
projection = "SELECT *" if include_metadata else "SELECT * OMIT metadata"
|
|
2034
2156
|
rows = await self._query(
|
|
2035
|
-
"
|
|
2157
|
+
f"{projection} FROM synapse WHERE brain_id = $brain_id",
|
|
2036
2158
|
brain_id=brain_id,
|
|
2037
2159
|
)
|
|
2038
2160
|
return [_row_to_synapse(r) for r in rows]
|
|
@@ -2130,12 +2130,12 @@ async def _migrate_brain_runtime_config(
|
|
|
2130
2130
|
must never break recall.
|
|
2131
2131
|
"""
|
|
2132
2132
|
try:
|
|
2133
|
+
# NOTE: reranker config is intentionally NOT layered onto the brain here.
|
|
2134
|
+
# It is deployment/runtime config, read from the app config at recall time
|
|
2135
|
+
# (see ReflexPipeline). Persisting it on a shared brain let a reranker-off
|
|
2136
|
+
# client (e.g. the web-UI container) flip the flag for everyone on
|
|
2137
|
+
# connect — the reranker-flip bug. Only [brain] extras are migrated.
|
|
2133
2138
|
overrides = config.brain.runtime_overrides()
|
|
2134
|
-
# Also layer config.toml [reranker] onto the stored brain so reranking is
|
|
2135
|
-
# driven by app config (issue: reranker BrainConfig fields were never
|
|
2136
|
-
# persisted, so the feature was dead code). Always applied; the diff check
|
|
2137
|
-
# below no-ops when the stored brain already matches.
|
|
2138
|
-
overrides.update(reranker_brain_config_overrides(config.reranker))
|
|
2139
2139
|
if not overrides:
|
|
2140
2140
|
return
|
|
2141
2141
|
|
|
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
|