NWcortex 1.0.7__tar.gz → 1.2.8__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.
- {nwcortex-1.0.7 → nwcortex-1.2.8/NWcortex.egg-info}/PKG-INFO +183 -101
- {nwcortex-1.0.7 → nwcortex-1.2.8}/NWcortex.egg-info/SOURCES.txt +35 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/NWcortex.egg-info/entry_points.txt +1 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/NWcortex.egg-info/requires.txt +8 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/NWcortex.egg-info/top_level.txt +1 -1
- {nwcortex-1.0.7/NWcortex.egg-info → nwcortex-1.2.8}/PKG-INFO +183 -101
- nwcortex-1.2.8/README.md +475 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/benchmarks/run_benchmarks.py +487 -487
- nwcortex-1.2.8/nwc/__init__.py +21 -0
- nwcortex-1.2.8/nwc/api/__init__.py +0 -0
- nwcortex-1.2.8/nwc/api/server.py +262 -0
- nwcortex-1.2.8/nwc/cli/__init__.py +0 -0
- nwcortex-1.2.8/nwc/cli/main.py +442 -0
- nwcortex-1.2.8/nwc/config/__init__.py +1 -0
- nwcortex-1.2.8/nwc/config/config.py +186 -0
- nwcortex-1.2.8/nwc/core/__init__.py +1 -0
- nwcortex-1.2.8/nwc/core/cortex.py +586 -0
- nwcortex-1.2.8/nwc/embeddings/__init__.py +4 -0
- nwcortex-1.2.8/nwc/embeddings/providers.py +94 -0
- nwcortex-1.2.8/nwc/llm/__init__.py +22 -0
- nwcortex-1.2.8/nwc/llm/anthropic.py +72 -0
- nwcortex-1.2.8/nwc/llm/base.py +54 -0
- nwcortex-1.2.8/nwc/llm/deepseek.py +12 -0
- nwcortex-1.2.8/nwc/llm/gemini.py +83 -0
- nwcortex-1.2.8/nwc/llm/ollama.py +66 -0
- nwcortex-1.2.8/nwc/llm/openai.py +98 -0
- nwcortex-1.2.8/nwc/mcp/__init__.py +0 -0
- nwcortex-1.2.8/nwc/mcp/server.py +297 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/pyproject.toml +8 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/__init__.py +93 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/abstraction.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/abstraction_chain.py +516 -516
- nwcortex-1.2.8/star_graph/activation_engine.py +560 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/agent_state.py +413 -413
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/anchor.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/async_manager.py +1 -1
- nwcortex-1.2.8/star_graph/autonomous_reasoning.py +309 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/batch_vectorizer.py +199 -199
- nwcortex-1.2.8/star_graph/belief_system.py +448 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/bm25.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cognitive_cache.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cognitive_closure.py +558 -558
- nwcortex-1.2.8/star_graph/cognitive_compression.py +353 -0
- nwcortex-1.2.8/star_graph/cognitive_identity.py +248 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cognitive_priority.py +232 -232
- nwcortex-1.2.8/star_graph/cognitive_workspace.py +616 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/community.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/competition.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/compression.py +1 -1
- nwcortex-1.2.8/star_graph/concept_cortex.py +463 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/conflict_detection.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/context_routing.py +319 -319
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/contrib/mcp_server.py +47 -23
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/runtime.py +12 -6
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/runtime_lifecycle.py +23 -5
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cross_encoder.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/defaults.yaml +256 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/domain_graph.py +316 -316
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/domain_router.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/dual_channel.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/evolution.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/exact_cache.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/forget_certificate.py +225 -225
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/gate.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/ghost.py +1 -1
- nwcortex-1.2.8/star_graph/goal_system.py +468 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/graph.py +5 -5
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/hebbian_learning.py +301 -301
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/hub.py +1 -1
- nwcortex-1.2.8/star_graph/importance_engine.py +432 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/index.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/manager.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/manager_stats.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/markdown_export.py +274 -274
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/mcp_server.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_budget.py +271 -271
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_core/graph.py +104 -90
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_core/sqlite_storage.py +26 -1
- nwcortex-1.2.8/star_graph/memory_core/storage_backend.py +148 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_layers.py +382 -382
- nwcortex-1.2.8/star_graph/memory_lifecycle.py +383 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_revision.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/micro_sleep.py +1 -1
- nwcortex-1.2.8/star_graph/perception.py +553 -0
- nwcortex-1.2.8/star_graph/personality_formation.py +581 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/quality_score.py +212 -212
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/reflection_loop.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_budget.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_core.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/cross_encoder.py +110 -110
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/retrieval_core.py +5 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_pipeline.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retriever.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/runtime.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/runtime_core.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/runtime_lifecycle.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/runtime_stats.py +1 -1
- nwcortex-1.2.8/star_graph/salience.py +265 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/scheduler.py +1 -1
- nwcortex-1.2.8/star_graph/self_model.py +340 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/self_org.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/server.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/sleep.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/sleep_consolidate.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/sleep_nrem.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/sleep_rem.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/sleep_report.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/sqlite_storage.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/stability_control.py +350 -350
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/storage.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/storage_backend.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/survival.py +1 -1
- nwcortex-1.2.8/star_graph/thought_object.py +234 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/tier.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/tiered.py +2 -2
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/typed_memory.py +376 -376
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/working_memory.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/write_gate.py +1 -1
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/zero_llm_pipeline.py +312 -312
- nwcortex-1.0.7/README.md +0 -400
- nwcortex-1.0.7/star_graph/memory_core/storage_backend.py +0 -66
- {nwcortex-1.0.7 → nwcortex-1.2.8}/LICENSE +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/MANIFEST.in +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/NWcortex.egg-info/dependency_links.txt +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/examples/ablation_benchmark.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/examples/emergence_demo.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/examples/locomo_eval.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/examples/locomo_llm_eval.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/examples/locomo_test.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/examples/memory_basic.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/examples/memory_benchmark.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/setup.cfg +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/__main__.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/atom_facts.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/autobiography.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/benchmark.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/brain_sphere.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cascade.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/causal_edges.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cli.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cluster_memory.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/compiler.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/config.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/__init__.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/abstraction.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/community.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/competition.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/compression.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/conflict_detection.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/domain_router.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/evolution.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/ghost.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/hub.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/memory_revision.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/micro_sleep.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/reflection_loop.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/self_org.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/sleep.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/sleep_consolidate.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/sleep_nrem.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/sleep_rem.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/sleep_report.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/consolidation/survival.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/contrib/__init__.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/contrib/benchmark.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/contrib/snapshot.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/contrib/streaming.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/contrib/symbolic_filter.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/__init__.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/async_manager.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/gate.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/manager.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/manager_stats.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/mcp_server.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/runtime_core.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/runtime_stats.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/scheduler.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/server.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/working_memory.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cortex_api/write_gate.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/cost_estimator.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/edge_budget.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/edge_decay.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/edge_management.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/embedding.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/embedding_provider/__init__.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/embedding_provider/providers.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/episodic_memory.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/extras/__init__.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/extras/autobiography.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/extras/resonance.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/four_layer.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/goal_tree.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/hippocampus.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/layers.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/logger.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/math_utils.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_core/__init__.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_core/anchor.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_core/index.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_core/storage.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_core/tier.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/memory_core/tiered.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/metrics.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/multimodal.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/online.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/personality.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/raw_buffer.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/resonance.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/__init__.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/bm25.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/cognitive_cache.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/dual_channel.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/exact_cache.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/retrieval_budget.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/retrieval_pipeline.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/retrieval_engine/retriever.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/router.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/seed.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/shard.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/snapshot.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/spreading.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/streaming.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/symbolic_filter.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/thermal_store.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/timespine.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/topology.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/tracing.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/star_graph/versioned_memory.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_abstraction.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_abstractive_memory.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_anchor.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_atom_facts.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_autobiography.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_bm25.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_brain_sphere.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_cascade.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_causal_edges.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_cluster_memory.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_cognitive_cache.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_cognitive_compiler.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_community.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_competition.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_compiler.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_compression.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_config_schema.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_cortex_hierarchy.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_cost_estimator.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_domain_router.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_edge_budget.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_edge_decay.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_edge_management.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_embedding.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_episodic_memory.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_evolution.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_four_layer.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_gate.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_ghost.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_ghost_intensity.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_goal_tree.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_graph.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_hippocampus.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_index.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_layers.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_logger.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_manager_stats.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_math_utils.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_memory_tier.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_metrics.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_micro_sleep.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_multimodal.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_online.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_oscillation_match.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_personality.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_raw_buffer.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_readme_doctest.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_reflection_loop.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_resonance.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_retrieval_budget.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_retrieval_trace.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_retriever.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_router.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_scheduler.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_seed.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_self_org.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_shard.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_sleep_consolidation.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_sleep_report.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_spreading.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_sqlite_storage.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_storage.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_storage_backend.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_streaming.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_survival.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_thermal_store.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_tier.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_timespine.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_topology.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_tracing.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_v08_modules.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_versioned_memory.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_working_memory.py +0 -0
- {nwcortex-1.0.7 → nwcortex-1.2.8}/tests/test_write_gate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NWcortex
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.8
|
|
4
4
|
Summary: NeuroWeave Cortex (NWC) — Graph-first cognitive memory runtime for AI agents. Hippocampal-inspired architecture with domain routing, spreading activation, edge budget management, 4-layer compression, thermal storage, personality modeling, and 8-phase sleep consolidation.
|
|
5
5
|
Author-email: Thatgfsj <thatgfsj@users.noreply.github.com>
|
|
6
6
|
License: MIT
|
|
@@ -22,35 +22,41 @@ License-File: LICENSE
|
|
|
22
22
|
Requires-Dist: numpy>=1.24.0
|
|
23
23
|
Requires-Dist: PyYAML>=6.0
|
|
24
24
|
Requires-Dist: scikit-learn>=1.3.0
|
|
25
|
+
Requires-Dist: typer>=0.9.0
|
|
26
|
+
Requires-Dist: rich>=13.0.0
|
|
27
|
+
Requires-Dist: fastapi>=0.109.0
|
|
28
|
+
Requires-Dist: uvicorn>=0.25.0
|
|
25
29
|
Provides-Extra: embeddings
|
|
26
30
|
Requires-Dist: sentence-transformers>=2.2.0; extra == "embeddings"
|
|
27
31
|
Provides-Extra: mcp
|
|
28
32
|
Requires-Dist: mcp>=1.0.0; extra == "mcp"
|
|
33
|
+
Provides-Extra: api
|
|
34
|
+
Requires-Dist: aiohttp>=3.8.0; extra == "api"
|
|
29
35
|
Provides-Extra: all
|
|
30
36
|
Requires-Dist: sentence-transformers>=2.2.0; extra == "all"
|
|
31
37
|
Requires-Dist: mcp>=1.0.0; extra == "all"
|
|
38
|
+
Requires-Dist: aiohttp>=3.8.0; extra == "all"
|
|
32
39
|
Dynamic: license-file
|
|
33
40
|
|
|
34
|
-
# NeuroWeave Cortex (NWC) — Cognitive
|
|
41
|
+
# NeuroWeave Cortex (NWC) — External Cognitive Cortex for AI Agents
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
Not a vector database. Not a graph database. Not RAG. An **external cognitive cortex** — a cognitive runtime that perceives, activates concepts, maintains working memory, forms reasoning chains, tracks goals, manages attention, and evolves a self-model. It remembers, forgets, strengthens, connects, abstracts, and reasons — the way biological cognition does.
|
|
37
44
|
|
|
38
45
|
```
|
|
39
|
-
|
|
40
|
-
Memory Stability: 0.72 Recall Plasticity: 0.58 Compression: 1.6x
|
|
46
|
+
v1.0.8 | 112 modules | Phase 1-6 complete | Cognitive Cortex Architecture
|
|
41
47
|
```
|
|
42
48
|
|
|
43
49
|
## What makes it different
|
|
44
50
|
|
|
45
|
-
Vector databases retrieve. Graph databases traverse. NeuroWeave Cortex runs a **cognitive lifecycle**:
|
|
51
|
+
Vector databases retrieve. Graph databases traverse. NeuroWeave Cortex runs a **full cognitive lifecycle**:
|
|
46
52
|
|
|
47
|
-
| Capability | Vector DB | Graph DB |
|
|
53
|
+
| Capability | Vector DB | Graph DB | NW Cortex |
|
|
48
54
|
|---|---|---|---|
|
|
49
55
|
| Semantic retrieval | yes | no | yes |
|
|
50
56
|
| Graph traversal | no | yes | yes |
|
|
51
57
|
| Automatic forgetting (survival decay) | no | no | yes |
|
|
52
58
|
| Memory strengthening (rehearsal) | no | no | yes |
|
|
53
|
-
| Conflict detection
|
|
59
|
+
| Conflict detection & resolution | no | no | yes |
|
|
54
60
|
| Multi-strategy RRF retrieval fusion | no | no | yes |
|
|
55
61
|
| Cross-Encoder reranking | no | no | yes |
|
|
56
62
|
| Explainable reasoning paths | no | no | yes |
|
|
@@ -61,133 +67,207 @@ Vector databases retrieve. Graph databases traverse. NeuroWeave Cortex runs a **
|
|
|
61
67
|
| Emergent abstraction (pattern discovery) | no | no | yes |
|
|
62
68
|
| Temporal context (TimeSpine-indexed) | no | no | yes |
|
|
63
69
|
| 8-phase sleep consolidation | no | no | yes |
|
|
64
|
-
| Ghost revival (savings effect) | no | no |
|
|
65
|
-
|
|
|
70
|
+
| Ghost revival (savings effect) | no | no | **world-first** |
|
|
71
|
+
| Hebbian edge learning | no | no | yes |
|
|
72
|
+
| 4-layer memory pyramid | no | no | yes |
|
|
73
|
+
| Goal-driven inference | no | no | yes |
|
|
74
|
+
| **Working Memory Workspace** | no | no | **yes** |
|
|
75
|
+
| **Concept Cortex** | no | no | **yes** |
|
|
76
|
+
| **Spreading Activation Engine** | no | no | **yes** |
|
|
77
|
+
| **Salience-based attention** | no | no | **yes** |
|
|
78
|
+
| **Self Model → LLM prompt injection** | no | no | **yes** |
|
|
79
|
+
| **Autonomous reasoning loop** | no | no | **yes** |
|
|
80
|
+
| **Full memory lifecycle (9 stages)** | no | no | **yes** |
|
|
66
81
|
|
|
67
82
|
## Quick Start
|
|
68
83
|
|
|
84
|
+
### Classic API (Phase 1-5)
|
|
85
|
+
|
|
69
86
|
```python
|
|
70
87
|
from star_graph import MemoryManager
|
|
71
88
|
from star_graph.scheduler import AgentContext
|
|
72
89
|
|
|
73
|
-
# One-line setup
|
|
74
90
|
mgr = MemoryManager()
|
|
75
91
|
|
|
76
|
-
# Remember
|
|
92
|
+
# Remember
|
|
77
93
|
mgr.remember("User debugs Redis connection timeout — pool was 10, fixed to 20",
|
|
78
94
|
tags=["redis", "debug", "timeout"])
|
|
79
|
-
mgr.remember("User knows Python async programming with asyncio",
|
|
80
|
-
tags=["python", "knowledge"])
|
|
81
95
|
mgr.remember("User prefers type hints and concise code",
|
|
82
96
|
tags=["preference", "style"])
|
|
83
97
|
|
|
84
|
-
# Working memory
|
|
98
|
+
# Working memory
|
|
85
99
|
mgr.remember_working("Currently debugging auth middleware timeout",
|
|
86
100
|
tags=["debug", "auth"])
|
|
87
101
|
|
|
88
|
-
# Context-aware recall
|
|
102
|
+
# Context-aware recall
|
|
89
103
|
ctx = AgentContext(task_type="debugging", active_goals=["fix Redis connection"])
|
|
90
104
|
memories = mgr.recall("Redis connection pool config", context=ctx)
|
|
91
105
|
print(memories.memory_summary)
|
|
92
106
|
|
|
93
|
-
#
|
|
94
|
-
memories = mgr.dual_recall("list all Redis-related issues", context=ctx)
|
|
95
|
-
|
|
96
|
-
# Micro-consolidation — incremental, non-blocking
|
|
97
|
-
mgr.micro_consolidate()
|
|
98
|
-
|
|
99
|
-
# Let the system sleep — 8-phase consolidation
|
|
107
|
+
# Sleep consolidation
|
|
100
108
|
report = mgr.sleep()
|
|
101
|
-
print(report)
|
|
102
109
|
|
|
103
110
|
# Persist
|
|
104
111
|
mgr.save("agent_memory.json")
|
|
105
|
-
|
|
112
|
+
```
|
|
106
113
|
|
|
107
|
-
|
|
108
|
-
|
|
114
|
+
### Cognitive Cortex API (Phase 6)
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
from star_graph import (
|
|
118
|
+
PerceptionLayer, CognitiveWorkspace, ConceptCortex,
|
|
119
|
+
ActivationEngine, GoalSystem, SalienceEngine, SelfModel
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# ── Full cognitive pipeline ──
|
|
123
|
+
pl = PerceptionLayer()
|
|
124
|
+
ws = CognitiveWorkspace(max_items=20)
|
|
125
|
+
cc = ConceptCortex()
|
|
126
|
+
ae = ActivationEngine(graph=graph)
|
|
127
|
+
gs = GoalSystem()
|
|
128
|
+
se = SalienceEngine()
|
|
129
|
+
|
|
130
|
+
# 1. Perceive user input
|
|
131
|
+
frame = pl.perceive("I need to debug a Redis memory leak urgently!")
|
|
132
|
+
# → PerceptionFrame(intent="command", valence=-0.4, concepts=["redis","debug","leak"])
|
|
133
|
+
|
|
134
|
+
# 2. Admit to working memory workspace
|
|
135
|
+
ws.on_perception(frame)
|
|
136
|
+
|
|
137
|
+
# 3. Activate concepts
|
|
138
|
+
for concept in frame.extracted_concepts:
|
|
139
|
+
cc.get_or_create_concept(concept)
|
|
140
|
+
|
|
141
|
+
# 4. Spread activation through memory graph
|
|
142
|
+
result = ae.activate_from_perception(frame)
|
|
143
|
+
|
|
144
|
+
# 5. Track goals
|
|
145
|
+
goal = gs.add_goal("Fix Redis pipeline memory leak", priority=0.9)
|
|
146
|
+
gs.activate_goal(goal.id)
|
|
147
|
+
|
|
148
|
+
# 6. Compute salience — decide what enters attention
|
|
149
|
+
signals = [se.compute_salience(item.id, "thought",
|
|
150
|
+
context={"task_relevance": item.relevance_to_current_task})
|
|
151
|
+
for item in ws.get_items()]
|
|
152
|
+
winners = se.compete(signals, max_winners=5)
|
|
153
|
+
|
|
154
|
+
# 7. Build self-model → LLM prompt injection
|
|
155
|
+
sm = SelfModel(workspace=ws, goal_system=gs, concept_cortex=cc, salience_engine=se)
|
|
156
|
+
prompt = sm.get_prompt_injection()
|
|
157
|
+
# → "# Cognitive State Summary\n## Current Focus: ...\n## Active Goals: ..."
|
|
158
|
+
|
|
159
|
+
# This is what the LLM sees — NOT raw memory dumps!
|
|
109
160
|
```
|
|
110
161
|
|
|
111
162
|
## Architecture
|
|
112
163
|
|
|
113
|
-
|
|
164
|
+
Four-layer cognitive design. Phase 6 adds the Cortex layer above Behavior.
|
|
114
165
|
|
|
115
166
|
```
|
|
167
|
+
Layer 4: Cortex │ Perception, Working Memory Workspace, Concept Cortex,
|
|
168
|
+
(Phase 6) │ Spreading Activation, Goal System, Salience Engine,
|
|
169
|
+
perception.py, │ Self Model, Autonomous Reasoning, Cognitive Compression,
|
|
170
|
+
cognitive_workspace.py,│ Memory Lifecycle Manager
|
|
171
|
+
concept_cortex.py,│ "What am I thinking right now? What should I focus on?"
|
|
172
|
+
activation_engine.py, │
|
|
173
|
+
goal_system.py, │
|
|
174
|
+
salience.py, │
|
|
175
|
+
self_model.py, │
|
|
176
|
+
autonomous_reasoning.py,│
|
|
177
|
+
cognitive_compression.py,│
|
|
178
|
+
memory_lifecycle.py)│
|
|
179
|
+
│
|
|
116
180
|
Layer 3: Behavior │ Cortex routing, memory gating, working memory,
|
|
117
|
-
(cortex.py, │ dual-channel retrieval,
|
|
118
|
-
router.py, │
|
|
119
|
-
gate.py, │
|
|
181
|
+
(cortex.py, │ dual-channel retrieval, scheduler, quality scoring,
|
|
182
|
+
router.py, │ memory budget, stability control, cognitive priority
|
|
183
|
+
gate.py, │ "What should I recall right now, at what detail level?"
|
|
120
184
|
working_memory.py,│
|
|
121
185
|
scheduler.py, │
|
|
122
|
-
|
|
186
|
+
quality_score.py,│
|
|
187
|
+
memory_budget.py,│
|
|
188
|
+
stability_control.py,│
|
|
189
|
+
cognitive_priority.py)│
|
|
123
190
|
│
|
|
124
191
|
Layer 2: Cognitive │ Hub abstraction, cascade recall, TimeSpine temporal index,
|
|
125
192
|
(retriever.py, │ sleep consolidation, evolution, ghost revival,
|
|
126
193
|
sleep.py, │ abstraction, community detection, competition,
|
|
127
|
-
evolution.py, │ conflict detection, memory revision, cross-encoder
|
|
128
|
-
ghost.py, │
|
|
129
|
-
abstraction.py, │
|
|
194
|
+
evolution.py, │ conflict detection, memory revision, cross-encoder,
|
|
195
|
+
ghost.py, │ Hebbian learning, domain routing, context routing
|
|
196
|
+
abstraction.py, │ "How do memories connect, strengthen, and fade?"
|
|
130
197
|
community.py, │
|
|
131
198
|
competition.py, │
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
timespine.py, │
|
|
136
|
-
cascade.py, │
|
|
137
|
-
hub.py) │
|
|
199
|
+
hebbian_learning.py,│
|
|
200
|
+
domain_graph.py,│
|
|
201
|
+
context_routing.py)│
|
|
138
202
|
│
|
|
139
203
|
Layer 1: Storage │ CRUD, persistence, ANN indexing, tiered storage,
|
|
140
|
-
(graph.py, │ BM25 keyword index, multi-level caching
|
|
141
|
-
anchor.py, │
|
|
142
|
-
storage.py, │
|
|
143
|
-
sqlite_storage.py,│
|
|
204
|
+
(graph.py, │ BM25 keyword index, multi-level caching, typed memory,
|
|
205
|
+
anchor.py, │ 4-layer memory pyramid, abstraction chain
|
|
206
|
+
storage.py, │ "Where is this memory stored?"
|
|
144
207
|
index.py, │
|
|
145
208
|
bm25.py, │
|
|
146
|
-
|
|
147
|
-
|
|
209
|
+
typed_memory.py,│
|
|
210
|
+
memory_layers.py,│
|
|
211
|
+
abstraction_chain.py)│
|
|
148
212
|
```
|
|
149
213
|
|
|
150
|
-
### Core modules
|
|
214
|
+
### Core modules (Phase 1-4 foundation)
|
|
151
215
|
|
|
152
216
|
| Module | Role |
|
|
153
217
|
|---|---|
|
|
154
218
|
| `manager.py` | High-level facade — `remember()`, `recall()`, `sleep()`, `save()` |
|
|
155
219
|
| `runtime.py` | Dependency container — manages all subsystem lifecycles |
|
|
156
|
-
| `retrieval_pipeline.py` | 5-layer dimensional descent (L0→L4) with automatic degradation |
|
|
157
220
|
| `scheduler.py` | Context-aware retrieval with memory type selection |
|
|
158
221
|
| `working_memory.py` | Short-term buffer (15-item, 1h TTL) — auto-promotes to long-term |
|
|
159
|
-
| `sleep.py` |
|
|
160
|
-
| `evolution.py` | Survival-based decay (Ebbinghaus/Power-law/Exponential), belief transitions
|
|
161
|
-
| `retriever.py` | HybridFusion + OscillationResonance + VectorSimilarity + Personalized PageRank
|
|
162
|
-
| `
|
|
163
|
-
| `
|
|
164
|
-
| `
|
|
165
|
-
| `conflict_detection.py` | Semantic contradiction detection with overwrite/coexist/deprecate resolution strategies |
|
|
166
|
-
| `memory_revision.py` | Sleep-phase memory revision engine — surprise-prioritized, template/LLM re-summarization |
|
|
167
|
-
| `ghost.py` | Latent memory traces with fuzzy recall and contradiction tracking (NegativeGhost) |
|
|
222
|
+
| `sleep.py` | 8-phase sleep: N1_Replay → N2_Merge → N2b_Conflict → N2c_Revision → N3_Compression → N3d_Rebuild → REM_Emotion → N4_Prune |
|
|
223
|
+
| `evolution.py` | Survival-based decay (Ebbinghaus/Power-law/Exponential), belief transitions |
|
|
224
|
+
| `retriever.py` | HybridFusion + OscillationResonance + VectorSimilarity + Personalized PageRank |
|
|
225
|
+
| `bm25.py` | Sparse keyword retrieval with RRF fusion |
|
|
226
|
+
| `cross_encoder.py` | Cross-Encoder reranking for precision improvement |
|
|
227
|
+
| `ghost.py` | Ghost traces, fuzzy recall, savings effect revival |
|
|
168
228
|
| `abstraction.py` | Emergent category discovery from anchor clusters |
|
|
169
229
|
| `community.py` | Louvain community detection with centroid routing |
|
|
170
|
-
| `anchor.py` | Memory unit with 6-state lifecycle, 10-dim AnchorVector
|
|
171
|
-
| `graph.py` | Star graph with RichEdge
|
|
172
|
-
| `timespine.py` | Temporal index for O(days×buckets) time-scoped retrieval |
|
|
173
|
-
| `cascade.py` | Causal chain traversal across connected memory sequences |
|
|
174
|
-
| `hub.py` | Hierarchical hub-and-spoke abstraction (leaf→domain→global) |
|
|
175
|
-
| `cortex.py` | Partitioned memory cortices with independent sleep and retrieval |
|
|
176
|
-
| `cognitive_cache.py` | Multi-level cache (query/session/topic/activation) + exact-match entity lookup |
|
|
177
|
-
| `tier.py` | STM/MTM/LTM/Core cognitive tiering + HOT/WARM/COLD storage tiers |
|
|
178
|
-
| `autobiography.py` | Self-narrative formation and autobiographical memory |
|
|
179
|
-
| `atom_facts.py` | LLM-powered atomic fact extraction from memory clusters |
|
|
180
|
-
| `survival.py` | Pluggable survival functions (Ebbinghaus, Power-law, Exponential, Custom) |
|
|
230
|
+
| `anchor.py` | Memory unit with 6-state lifecycle, 10-dim AnchorVector |
|
|
231
|
+
| `graph.py` | Star graph with RichEdge, Schema, ReflectionNode |
|
|
181
232
|
| `compression.py` | Multi-level session compression (episodic/strategic/meta) |
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
185
|
-
| `batch_vectorizer.py` | Deferred batch embedding writes
|
|
186
|
-
| `
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
|
233
|
+
| `forget_certificate.py` | Ed25519-signed JWS deletion certificates — GDPR Article 17 |
|
|
234
|
+
| `multimodal.py` | Cross-modal text/image/audio memory |
|
|
235
|
+
| `zero_llm_pipeline.py` | 7-stage zero-LLM ingestion pipeline |
|
|
236
|
+
| `batch_vectorizer.py` | Deferred batch embedding writes with SQLite WAL |
|
|
237
|
+
| `markdown_export.py` | GBrain-aligned Markdown memory export |
|
|
238
|
+
|
|
239
|
+
### Phase 5 — Cognitive Depth
|
|
240
|
+
|
|
241
|
+
| Module | Role |
|
|
242
|
+
|---|---|
|
|
243
|
+
| `memory_budget.py` | Token + anchor budget management with eviction policies |
|
|
244
|
+
| `quality_score.py` | 7-dimension memory quality scoring (usage, reasoning, feedback, etc.) |
|
|
245
|
+
| `stability_control.py` | Long-term stability with exponential/linear decay, drift monitoring |
|
|
246
|
+
| `memory_layers.py` | 4-layer pyramid: Working → Episodic → Semantic → Core Identity |
|
|
247
|
+
| `typed_memory.py` | 7 memory types (code/task/dialogue/tool_call/knowledge/event/preference) |
|
|
248
|
+
| `abstraction_chain.py` | Event → Summary → Pattern → Identity abstraction pipeline |
|
|
249
|
+
| `domain_graph.py` | Domain-based graph partitioning with soft isolation |
|
|
250
|
+
| `context_routing.py` | 6-dimension context-aware retrieval routing |
|
|
251
|
+
| `hebbian_learning.py` | Hebbian edge learning — "neurons that fire together wire together" |
|
|
252
|
+
| `agent_state.py` | Agent state memory: goal tree, tool calls, checkpoints |
|
|
253
|
+
| `cognitive_closure.py` | Closed-loop feedback: recall → use → learn → improve |
|
|
254
|
+
| `cognitive_priority.py` | 5-level priority assignment with forced injection for core identity |
|
|
255
|
+
|
|
256
|
+
### Phase 6 — Cognitive Cortex
|
|
257
|
+
|
|
258
|
+
| Module | Role |
|
|
259
|
+
|---|---|
|
|
260
|
+
| `thought_object.py` | Unified cognitive base class — activated nodes, not static memory |
|
|
261
|
+
| `perception.py` | Raw text → structured PerceptionFrame (intent, emotion, goals, concepts) |
|
|
262
|
+
| `cognitive_workspace.py` | **Core**: Working memory workspace with reasoning chains, attention, TTL decay |
|
|
263
|
+
| `concept_cortex.py` | Concept network: activation, fusion, competition, 10 built-in core concepts |
|
|
264
|
+
| `activation_engine.py` | Multi-source spreading activation (query/goal/concept/emotion seeds) |
|
|
265
|
+
| `goal_system.py` | Goal hierarchy, conflict detection, goal-driven inference |
|
|
266
|
+
| `salience.py` | 10-component attention competition with lateral inhibition |
|
|
267
|
+
| `cognitive_compression.py` | Events → Concepts → Identity → World Model compression pipeline |
|
|
268
|
+
| `self_model.py` | System self-model → compressed CognitiveState → LLM prompt injection |
|
|
269
|
+
| `autonomous_reasoning.py` | Contradiction → Activation → Resolution loop (no LLM required) |
|
|
270
|
+
| `memory_lifecycle.py` | Unified 9-stage lifecycle: Perception → Working → ... → Ghost → Dead |
|
|
191
271
|
|
|
192
272
|
## Retrieval Benchmarks
|
|
193
273
|
|
|
@@ -221,38 +301,40 @@ Per-category has_answer:
|
|
|
221
301
|
| **OscillationResonance** | **0.967** | **0.967** | 0.667 |
|
|
222
302
|
| HybridFusion | 0.900 | 0.900 | 0.667 |
|
|
223
303
|
|
|
224
|
-
## Memory Lifecycle
|
|
304
|
+
## Memory Lifecycle (9 stages)
|
|
225
305
|
|
|
226
|
-
Every
|
|
306
|
+
Every memory moves through a full 9-stage cognitive lifecycle (Phase 6.10 `memory_lifecycle.py`):
|
|
227
307
|
|
|
228
308
|
```
|
|
229
|
-
|
|
309
|
+
PERCEPTION → WORKING → SHORT_TERM → LONG_TERM → CONSOLIDATED → ARCHIVED → DORMANT → GHOST → DEAD
|
|
230
310
|
```
|
|
231
311
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
312
|
+
| Stage | Description | Duration |
|
|
313
|
+
|-------|-------------|----------|
|
|
314
|
+
| **Perception** | Initial intake, not yet stored | seconds |
|
|
315
|
+
| **Working** | In cognitive workspace, high activation | minutes~hours |
|
|
316
|
+
| **Short-term** | Stored, not yet consolidated | hours~days |
|
|
317
|
+
| **Long-term** | Consolidated, actively retrievable | days~months |
|
|
318
|
+
| **Consolidated** | Deeply integrated, high stability | months~years |
|
|
319
|
+
| **Archived** | Cold storage, low access frequency | indefinite |
|
|
320
|
+
| **Dormant** | Very low access, near ghost | indefinite |
|
|
321
|
+
| **Ghost** | Forgotten but potentially revivable | 90 days |
|
|
322
|
+
| **Dead** | Permanently removed | — |
|
|
238
323
|
|
|
239
|
-
Paired with **ThermalState** (HOT → WARM → COLD → DEAD) for storage tier switching
|
|
240
|
-
- HOT: in-memory, fully accessible
|
|
241
|
-
- WARM: in-memory, periodically flushed to disk
|
|
242
|
-
- COLD: disk-only, transparent thaw on access
|
|
324
|
+
Paired with **ThermalState** (HOT → WARM → COLD → DEAD) for storage tier switching and **4-layer pyramid** (Working → Episodic → Semantic → Core Identity).
|
|
243
325
|
|
|
244
|
-
## Sleep Consolidation
|
|
326
|
+
## Sleep Consolidation (8 phases)
|
|
245
327
|
|
|
246
328
|
Sleep is not cleanup. Sleep **changes the graph**:
|
|
247
329
|
|
|
248
|
-
1. **N1_Replay** —
|
|
249
|
-
2. **N2_Merge** —
|
|
250
|
-
3. **
|
|
251
|
-
4. **
|
|
252
|
-
5. **
|
|
253
|
-
6. **
|
|
254
|
-
7. **
|
|
255
|
-
8. **
|
|
330
|
+
1. **N1_Replay** — SWR-scored replay of surprising/emotional memories
|
|
331
|
+
2. **N2_Merge** — ANN-accelerated near-duplicate fusion + constellation bridging
|
|
332
|
+
3. **N2b_Conflict** — Semantic contradiction detection (overwrite/coexist/deprecate)
|
|
333
|
+
4. **N2c_Revision** — Surprise-prioritized memory revision engine
|
|
334
|
+
5. **N3_Compression** — Hippocampal→cortical transfer, schema formation
|
|
335
|
+
6. **N3d_Rebuild** — Multi-node fusion, edge rewiring, abstractive pattern discovery
|
|
336
|
+
7. **REM_Emotion** — Emotional decoupling from consolidated memories
|
|
337
|
+
8. **N4_Prune** — Weak anchor/edge removal, ghost trace creation (savings effect)
|
|
256
338
|
|
|
257
339
|
## Dual-Channel Retrieval
|
|
258
340
|
|
|
@@ -422,7 +504,7 @@ pytest tests/ -v
|
|
|
422
504
|
pytest tests/ --cov=star_graph --cov-report=term
|
|
423
505
|
```
|
|
424
506
|
|
|
425
|
-
**Status:** 1
|
|
507
|
+
**Status:** Phase 1-6 complete, 112 modules, v1.0.8.
|
|
426
508
|
|
|
427
509
|
## Roadmap
|
|
428
510
|
|
|
@@ -16,16 +16,39 @@ examples/locomo_llm_eval.py
|
|
|
16
16
|
examples/locomo_test.py
|
|
17
17
|
examples/memory_basic.py
|
|
18
18
|
examples/memory_benchmark.py
|
|
19
|
+
nwc/__init__.py
|
|
20
|
+
nwc/api/__init__.py
|
|
21
|
+
nwc/api/server.py
|
|
22
|
+
nwc/cli/__init__.py
|
|
23
|
+
nwc/cli/main.py
|
|
24
|
+
nwc/config/__init__.py
|
|
25
|
+
nwc/config/config.py
|
|
26
|
+
nwc/core/__init__.py
|
|
27
|
+
nwc/core/cortex.py
|
|
28
|
+
nwc/embeddings/__init__.py
|
|
29
|
+
nwc/embeddings/providers.py
|
|
30
|
+
nwc/llm/__init__.py
|
|
31
|
+
nwc/llm/anthropic.py
|
|
32
|
+
nwc/llm/base.py
|
|
33
|
+
nwc/llm/deepseek.py
|
|
34
|
+
nwc/llm/gemini.py
|
|
35
|
+
nwc/llm/ollama.py
|
|
36
|
+
nwc/llm/openai.py
|
|
37
|
+
nwc/mcp/__init__.py
|
|
38
|
+
nwc/mcp/server.py
|
|
19
39
|
star_graph/__init__.py
|
|
20
40
|
star_graph/__main__.py
|
|
21
41
|
star_graph/abstraction.py
|
|
22
42
|
star_graph/abstraction_chain.py
|
|
43
|
+
star_graph/activation_engine.py
|
|
23
44
|
star_graph/agent_state.py
|
|
24
45
|
star_graph/anchor.py
|
|
25
46
|
star_graph/async_manager.py
|
|
26
47
|
star_graph/atom_facts.py
|
|
27
48
|
star_graph/autobiography.py
|
|
49
|
+
star_graph/autonomous_reasoning.py
|
|
28
50
|
star_graph/batch_vectorizer.py
|
|
51
|
+
star_graph/belief_system.py
|
|
29
52
|
star_graph/benchmark.py
|
|
30
53
|
star_graph/bm25.py
|
|
31
54
|
star_graph/brain_sphere.py
|
|
@@ -35,11 +58,15 @@ star_graph/cli.py
|
|
|
35
58
|
star_graph/cluster_memory.py
|
|
36
59
|
star_graph/cognitive_cache.py
|
|
37
60
|
star_graph/cognitive_closure.py
|
|
61
|
+
star_graph/cognitive_compression.py
|
|
62
|
+
star_graph/cognitive_identity.py
|
|
38
63
|
star_graph/cognitive_priority.py
|
|
64
|
+
star_graph/cognitive_workspace.py
|
|
39
65
|
star_graph/community.py
|
|
40
66
|
star_graph/competition.py
|
|
41
67
|
star_graph/compiler.py
|
|
42
68
|
star_graph/compression.py
|
|
69
|
+
star_graph/concept_cortex.py
|
|
43
70
|
star_graph/config.py
|
|
44
71
|
star_graph/conflict_detection.py
|
|
45
72
|
star_graph/context_routing.py
|
|
@@ -61,11 +88,13 @@ star_graph/forget_certificate.py
|
|
|
61
88
|
star_graph/four_layer.py
|
|
62
89
|
star_graph/gate.py
|
|
63
90
|
star_graph/ghost.py
|
|
91
|
+
star_graph/goal_system.py
|
|
64
92
|
star_graph/goal_tree.py
|
|
65
93
|
star_graph/graph.py
|
|
66
94
|
star_graph/hebbian_learning.py
|
|
67
95
|
star_graph/hippocampus.py
|
|
68
96
|
star_graph/hub.py
|
|
97
|
+
star_graph/importance_engine.py
|
|
69
98
|
star_graph/index.py
|
|
70
99
|
star_graph/layers.py
|
|
71
100
|
star_graph/logger.py
|
|
@@ -76,12 +105,15 @@ star_graph/math_utils.py
|
|
|
76
105
|
star_graph/mcp_server.py
|
|
77
106
|
star_graph/memory_budget.py
|
|
78
107
|
star_graph/memory_layers.py
|
|
108
|
+
star_graph/memory_lifecycle.py
|
|
79
109
|
star_graph/memory_revision.py
|
|
80
110
|
star_graph/metrics.py
|
|
81
111
|
star_graph/micro_sleep.py
|
|
82
112
|
star_graph/multimodal.py
|
|
83
113
|
star_graph/online.py
|
|
114
|
+
star_graph/perception.py
|
|
84
115
|
star_graph/personality.py
|
|
116
|
+
star_graph/personality_formation.py
|
|
85
117
|
star_graph/quality_score.py
|
|
86
118
|
star_graph/raw_buffer.py
|
|
87
119
|
star_graph/reflection_loop.py
|
|
@@ -95,8 +127,10 @@ star_graph/runtime.py
|
|
|
95
127
|
star_graph/runtime_core.py
|
|
96
128
|
star_graph/runtime_lifecycle.py
|
|
97
129
|
star_graph/runtime_stats.py
|
|
130
|
+
star_graph/salience.py
|
|
98
131
|
star_graph/scheduler.py
|
|
99
132
|
star_graph/seed.py
|
|
133
|
+
star_graph/self_model.py
|
|
100
134
|
star_graph/self_org.py
|
|
101
135
|
star_graph/server.py
|
|
102
136
|
star_graph/shard.py
|
|
@@ -115,6 +149,7 @@ star_graph/streaming.py
|
|
|
115
149
|
star_graph/survival.py
|
|
116
150
|
star_graph/symbolic_filter.py
|
|
117
151
|
star_graph/thermal_store.py
|
|
152
|
+
star_graph/thought_object.py
|
|
118
153
|
star_graph/tier.py
|
|
119
154
|
star_graph/tiered.py
|
|
120
155
|
star_graph/timespine.py
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
numpy>=1.24.0
|
|
2
2
|
PyYAML>=6.0
|
|
3
3
|
scikit-learn>=1.3.0
|
|
4
|
+
typer>=0.9.0
|
|
5
|
+
rich>=13.0.0
|
|
6
|
+
fastapi>=0.109.0
|
|
7
|
+
uvicorn>=0.25.0
|
|
4
8
|
|
|
5
9
|
[all]
|
|
6
10
|
sentence-transformers>=2.2.0
|
|
7
11
|
mcp>=1.0.0
|
|
12
|
+
aiohttp>=3.8.0
|
|
13
|
+
|
|
14
|
+
[api]
|
|
15
|
+
aiohttp>=3.8.0
|
|
8
16
|
|
|
9
17
|
[embeddings]
|
|
10
18
|
sentence-transformers>=2.2.0
|