stellar-memory 2.0.0__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stellar_memory-2.0.0/stellar_memory.egg-info → stellar_memory-3.0.0}/PKG-INFO +9 -14
- stellar_memory-3.0.0/celestial_engine/__init__.py +67 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/pyproject.toml +12 -16
- stellar_memory-3.0.0/stellar_memory/__init__.py +176 -0
- stellar_memory-3.0.0/stellar_memory/_plugin_manager.py +105 -0
- stellar_memory-3.0.0/stellar_memory/builder.py +389 -0
- stellar_memory-3.0.0/stellar_memory/compat.py +130 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/config.py +8 -56
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/models.py +20 -20
- stellar_memory-3.0.0/stellar_memory/plugin.py +65 -0
- stellar_memory-3.0.0/stellar_memory/protocols.py +89 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/providers/__init__.py +4 -16
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/stellar.py +140 -30
- {stellar_memory-2.0.0 → stellar_memory-3.0.0/stellar_memory.egg-info}/PKG-INFO +9 -14
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory.egg-info/SOURCES.txt +9 -8
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory.egg-info/requires.txt +0 -6
- stellar_memory-3.0.0/tests/test_builder.py +176 -0
- stellar_memory-3.0.0/tests/test_compat.py +115 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_packaging.py +4 -6
- stellar_memory-3.0.0/tests/test_plugin.py +157 -0
- stellar_memory-3.0.0/tests/test_protocols.py +87 -0
- stellar_memory-2.0.0/celestial_engine/__init__.py +0 -168
- stellar_memory-2.0.0/stellar_memory/__init__.py +0 -164
- stellar_memory-2.0.0/stellar_memory/billing/__init__.py +0 -21
- stellar_memory-2.0.0/stellar_memory/billing/base.py +0 -67
- stellar_memory-2.0.0/stellar_memory/billing/db_models.py +0 -94
- stellar_memory-2.0.0/stellar_memory/billing/lemonsqueezy.py +0 -157
- stellar_memory-2.0.0/stellar_memory/billing/stripe_provider.py +0 -118
- stellar_memory-2.0.0/stellar_memory/billing/tiers.py +0 -43
- stellar_memory-2.0.0/stellar_memory/billing/toss_provider.py +0 -148
- stellar_memory-2.0.0/stellar_memory/billing/webhooks.py +0 -100
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/LICENSE +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/README.md +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/adapters/__init__.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/adapters/anthropic.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/adapters/langchain.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/adapters/openai.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/auto_memory.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/importance.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/memory_function.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/middleware.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/models.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/rebalancer.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/storage/__init__.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/storage/memory.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/storage/sqlite.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/celestial_engine/zone_manager.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/setup.cfg +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/adapters/__init__.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/adapters/langchain.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/adapters/openai_plugin.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/adaptive_decay.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/auth.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/benchmark.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/cli.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/connectors/__init__.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/connectors/api_connector.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/connectors/file_connector.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/connectors/web_connector.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/consolidator.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/dashboard/__init__.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/dashboard/app.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/decay_manager.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/embedder.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/emotion.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/event_bus.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/event_logger.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/graph_analyzer.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/importance_evaluator.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/importer.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/knowledge_base.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/llm_adapter.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/mcp_server.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/memory_function.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/memory_graph.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/metacognition.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/multimodal.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/namespace.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/orbit_manager.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/persistent_graph.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/providers/ollama_provider.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/providers/openai_provider.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/reasoning.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/scanner.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/scheduler.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/security/__init__.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/security/access_control.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/security/audit.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/security/encryption.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/self_learning.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/serializer.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/server.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/session.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/storage/__init__.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/storage/in_memory.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/storage/postgres_storage.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/storage/redis_cache.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/storage/sqlite_storage.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/stream.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/summarizer.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/sync/__init__.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/sync/sync_manager.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/sync/ws_client.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/sync/ws_server.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/utils.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/vector_index.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/viz.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory/weight_tuner.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory.egg-info/dependency_links.txt +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory.egg-info/entry_points.txt +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/stellar_memory.egg-info/top_level.txt +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_adapters.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_adaptive_decay.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_blackhole.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_cli.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_connectors.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_consolidation.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_dashboard.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_decay.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_embedder.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_emotion.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_event_bus.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_event_logger.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_graph_analyzer.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_health.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_importance.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_mcp_server.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_memory_function.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_memory_graph.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_middleware.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_namespace.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_orbit_manager.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_p8_init_mcp.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_p8_openapi.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_p8_quickstart.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_p8_version.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_p9_benchmark.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_p9_metacognition.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_p9_multimodal.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_p9_reasoning.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_p9_self_learning.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_performance.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_persistent_graph.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_providers.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_recall_boost.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_security.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_semantic_search.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_serializer.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_server.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_session.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_stellar.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_storage.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_storage_backend.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_stream.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_summarizer.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_sync.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_tuner_integration.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_vector_index.py +0 -0
- {stellar_memory-2.0.0 → stellar_memory-3.0.0}/tests/test_weight_tuner.py +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: stellar-memory
|
|
3
|
-
Version:
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: AI Memory Platform SDK - Give any AI human-like memory
|
|
5
5
|
Author: Stellar Memory Contributors
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://stellar-memory.com/
|
|
8
8
|
Project-URL: Repository, https://github.com/sangjun0000/stellar-memory
|
|
9
9
|
Project-URL: Documentation, https://stellar-memory.com/docs/
|
|
10
10
|
Project-URL: Changelog, https://github.com/sangjun0000/stellar-memory/blob/main/CHANGELOG.md
|
|
11
|
-
Keywords: ai,memory,llm,mcp,recall,context
|
|
11
|
+
Keywords: ai,memory,llm,mcp,recall,context,sdk,platform
|
|
12
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -35,6 +35,12 @@ Provides-Extra: mcp
|
|
|
35
35
|
Requires-Dist: mcp[cli]>=1.2.0; extra == "mcp"
|
|
36
36
|
Provides-Extra: cli
|
|
37
37
|
Requires-Dist: mcp[cli]>=1.2.0; extra == "cli"
|
|
38
|
+
Provides-Extra: server
|
|
39
|
+
Requires-Dist: fastapi>=0.110.0; extra == "server"
|
|
40
|
+
Requires-Dist: uvicorn>=0.29.0; extra == "server"
|
|
41
|
+
Provides-Extra: dashboard
|
|
42
|
+
Requires-Dist: fastapi>=0.110.0; extra == "dashboard"
|
|
43
|
+
Requires-Dist: uvicorn>=0.29.0; extra == "dashboard"
|
|
38
44
|
Provides-Extra: postgres
|
|
39
45
|
Requires-Dist: asyncpg>=0.29.0; extra == "postgres"
|
|
40
46
|
Provides-Extra: redis
|
|
@@ -45,16 +51,6 @@ Provides-Extra: sync
|
|
|
45
51
|
Requires-Dist: websockets>=12.0; extra == "sync"
|
|
46
52
|
Provides-Extra: connectors
|
|
47
53
|
Requires-Dist: httpx>=0.27.0; extra == "connectors"
|
|
48
|
-
Provides-Extra: server
|
|
49
|
-
Requires-Dist: fastapi>=0.110.0; extra == "server"
|
|
50
|
-
Requires-Dist: uvicorn>=0.29.0; extra == "server"
|
|
51
|
-
Provides-Extra: dashboard
|
|
52
|
-
Requires-Dist: fastapi>=0.110.0; extra == "dashboard"
|
|
53
|
-
Requires-Dist: uvicorn>=0.29.0; extra == "dashboard"
|
|
54
|
-
Provides-Extra: billing
|
|
55
|
-
Requires-Dist: stripe>=7.0.0; extra == "billing"
|
|
56
|
-
Requires-Dist: httpx>=0.27.0; extra == "billing"
|
|
57
|
-
Requires-Dist: asyncpg>=0.29.0; extra == "billing"
|
|
58
54
|
Provides-Extra: adapters
|
|
59
55
|
Requires-Dist: langchain-core>=0.1.0; extra == "adapters"
|
|
60
56
|
Provides-Extra: full
|
|
@@ -71,7 +67,6 @@ Requires-Dist: httpx>=0.27.0; extra == "full"
|
|
|
71
67
|
Requires-Dist: fastapi>=0.110.0; extra == "full"
|
|
72
68
|
Requires-Dist: uvicorn>=0.29.0; extra == "full"
|
|
73
69
|
Requires-Dist: langchain-core>=0.1.0; extra == "full"
|
|
74
|
-
Requires-Dist: stripe>=7.0.0; extra == "full"
|
|
75
70
|
Provides-Extra: docs
|
|
76
71
|
Requires-Dist: mkdocs-material>=9.5.0; extra == "docs"
|
|
77
72
|
Provides-Extra: dev
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Celestial Memory Engine - DEPRECATED in v3.0.
|
|
2
|
+
|
|
3
|
+
Use stellar_memory instead::
|
|
4
|
+
|
|
5
|
+
# Before:
|
|
6
|
+
from celestial_engine import CelestialMemory
|
|
7
|
+
memory = CelestialMemory()
|
|
8
|
+
|
|
9
|
+
# After:
|
|
10
|
+
from stellar_memory import StellarBuilder, Preset
|
|
11
|
+
memory = StellarBuilder(Preset.MINIMAL).with_sqlite("celestial_memory.db").build()
|
|
12
|
+
|
|
13
|
+
See migration guide: docs/migration-v2-to-v3.md
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import warnings
|
|
19
|
+
|
|
20
|
+
warnings.warn(
|
|
21
|
+
"celestial_engine is deprecated in v3.0. Use stellar_memory instead. "
|
|
22
|
+
"See docs/migration-v2-to-v3.md for migration guide.",
|
|
23
|
+
DeprecationWarning,
|
|
24
|
+
stacklevel=2,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
# Thin shim: re-export stellar_memory classes under old names
|
|
28
|
+
from stellar_memory import StellarMemory as CelestialMemory # noqa: F401
|
|
29
|
+
from stellar_memory import StellarBuilder # noqa: F401
|
|
30
|
+
from stellar_memory import Preset # noqa: F401
|
|
31
|
+
from stellar_memory import StellarConfig # noqa: F401
|
|
32
|
+
from stellar_memory import MemoryItem as CelestialItem # noqa: F401
|
|
33
|
+
from stellar_memory import MemoryStats # noqa: F401
|
|
34
|
+
from stellar_memory.models import ScoreBreakdown, ReorbitResult # noqa: F401
|
|
35
|
+
from stellar_memory.config import ( # noqa: F401
|
|
36
|
+
MemoryFunctionConfig,
|
|
37
|
+
ZoneConfig,
|
|
38
|
+
DEFAULT_ZONES,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
# Legacy evaluator imports
|
|
42
|
+
from stellar_memory.protocols import ImportanceEvaluator # noqa: F401
|
|
43
|
+
from stellar_memory.importance_evaluator import ( # noqa: F401
|
|
44
|
+
RuleBasedEvaluator,
|
|
45
|
+
LLMEvaluator,
|
|
46
|
+
NullEvaluator as DefaultEvaluator,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
__version__ = "3.0.0-deprecated"
|
|
50
|
+
|
|
51
|
+
__all__ = [
|
|
52
|
+
"CelestialMemory",
|
|
53
|
+
"CelestialItem",
|
|
54
|
+
"StellarBuilder",
|
|
55
|
+
"Preset",
|
|
56
|
+
"StellarConfig",
|
|
57
|
+
"MemoryStats",
|
|
58
|
+
"MemoryFunctionConfig",
|
|
59
|
+
"ZoneConfig",
|
|
60
|
+
"ScoreBreakdown",
|
|
61
|
+
"ReorbitResult",
|
|
62
|
+
"DEFAULT_ZONES",
|
|
63
|
+
"ImportanceEvaluator",
|
|
64
|
+
"DefaultEvaluator",
|
|
65
|
+
"RuleBasedEvaluator",
|
|
66
|
+
"LLMEvaluator",
|
|
67
|
+
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "stellar-memory"
|
|
3
|
-
version = "
|
|
4
|
-
description = "
|
|
3
|
+
version = "3.0.0"
|
|
4
|
+
description = "AI Memory Platform SDK - Give any AI human-like memory"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
7
|
license = {text = "MIT"}
|
|
@@ -16,7 +16,7 @@ classifiers = [
|
|
|
16
16
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
17
17
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
18
18
|
]
|
|
19
|
-
keywords = ["ai", "memory", "llm", "mcp", "recall", "context"]
|
|
19
|
+
keywords = ["ai", "memory", "llm", "mcp", "recall", "context", "sdk", "platform"]
|
|
20
20
|
dependencies = []
|
|
21
21
|
|
|
22
22
|
[project.urls]
|
|
@@ -29,35 +29,32 @@ Changelog = "https://github.com/sangjun0000/stellar-memory/blob/main/CHANGELOG.m
|
|
|
29
29
|
stellar-memory = "stellar_memory.cli:main"
|
|
30
30
|
|
|
31
31
|
[project.optional-dependencies]
|
|
32
|
-
#
|
|
32
|
+
# AI Features
|
|
33
33
|
embedding = ["sentence-transformers>=2.2.0"]
|
|
34
34
|
llm = ["anthropic>=0.18.0"]
|
|
35
35
|
openai = ["openai>=1.0.0"]
|
|
36
36
|
ollama = ["requests>=2.28.0"]
|
|
37
37
|
ai = ["sentence-transformers>=2.2.0", "anthropic>=0.18.0"]
|
|
38
38
|
|
|
39
|
-
#
|
|
39
|
+
# Server & Interfaces
|
|
40
40
|
mcp = ["mcp[cli]>=1.2.0"]
|
|
41
41
|
cli = ["mcp[cli]>=1.2.0"]
|
|
42
|
+
server = ["fastapi>=0.110.0", "uvicorn>=0.29.0"]
|
|
43
|
+
dashboard = ["fastapi>=0.110.0", "uvicorn>=0.29.0"]
|
|
42
44
|
|
|
43
|
-
#
|
|
45
|
+
# Storage Backends
|
|
44
46
|
postgres = ["asyncpg>=0.29.0"]
|
|
45
47
|
redis = ["redis>=5.0.0"]
|
|
48
|
+
|
|
49
|
+
# Infrastructure
|
|
46
50
|
security = ["cryptography>=42.0.0"]
|
|
47
51
|
sync = ["websockets>=12.0"]
|
|
48
52
|
connectors = ["httpx>=0.27.0"]
|
|
49
53
|
|
|
50
|
-
# Server & Dashboard
|
|
51
|
-
server = ["fastapi>=0.110.0", "uvicorn>=0.29.0"]
|
|
52
|
-
dashboard = ["fastapi>=0.110.0", "uvicorn>=0.29.0"]
|
|
53
|
-
|
|
54
|
-
# Billing (Monetization Phase 2)
|
|
55
|
-
billing = ["stripe>=7.0.0", "httpx>=0.27.0", "asyncpg>=0.29.0"]
|
|
56
|
-
|
|
57
54
|
# Adapters
|
|
58
55
|
adapters = ["langchain-core>=0.1.0"]
|
|
59
56
|
|
|
60
|
-
# Full install
|
|
57
|
+
# Full install (everything except billing - removed in v3.0)
|
|
61
58
|
full = [
|
|
62
59
|
"sentence-transformers>=2.2.0", "anthropic>=0.18.0", "openai>=1.0.0",
|
|
63
60
|
"requests>=2.28.0", "mcp[cli]>=1.2.0",
|
|
@@ -65,11 +62,10 @@ full = [
|
|
|
65
62
|
"websockets>=12.0", "httpx>=0.27.0",
|
|
66
63
|
"fastapi>=0.110.0", "uvicorn>=0.29.0",
|
|
67
64
|
"langchain-core>=0.1.0",
|
|
68
|
-
"stripe>=7.0.0",
|
|
69
65
|
]
|
|
70
66
|
|
|
67
|
+
# Development
|
|
71
68
|
docs = ["mkdocs-material>=9.5.0"]
|
|
72
|
-
|
|
73
69
|
dev = ["pytest>=7.0", "pytest-cov>=4.0", "httpx>=0.27.0"]
|
|
74
70
|
|
|
75
71
|
[tool.setuptools.packages.find]
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"""Stellar Memory - AI Memory Platform SDK.
|
|
2
|
+
|
|
3
|
+
Give any AI human-like memory, built on a celestial structure.
|
|
4
|
+
|
|
5
|
+
v3.0: Clean SDK with 11 core exports. For v2.0 imports, use stellar_memory.compat.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
# 1. Main Class
|
|
9
|
+
from stellar_memory.stellar import StellarMemory
|
|
10
|
+
|
|
11
|
+
# 2. Builder
|
|
12
|
+
from stellar_memory.builder import StellarBuilder, Preset
|
|
13
|
+
|
|
14
|
+
# 3. Core Models
|
|
15
|
+
from stellar_memory.models import MemoryItem, MemoryStats
|
|
16
|
+
|
|
17
|
+
# 4. Plugin Interface
|
|
18
|
+
from stellar_memory.plugin import MemoryPlugin
|
|
19
|
+
|
|
20
|
+
# 5. Extension Protocols
|
|
21
|
+
from stellar_memory.protocols import (
|
|
22
|
+
StorageBackendProtocol,
|
|
23
|
+
EmbedderProvider,
|
|
24
|
+
ImportanceEvaluator,
|
|
25
|
+
MemoryStore,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
# 6. Config
|
|
29
|
+
from stellar_memory.config import StellarConfig
|
|
30
|
+
|
|
31
|
+
try:
|
|
32
|
+
from importlib.metadata import version as _pkg_version
|
|
33
|
+
__version__ = _pkg_version("stellar-memory")
|
|
34
|
+
except Exception:
|
|
35
|
+
__version__ = "3.0.0"
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
# Main
|
|
39
|
+
"StellarMemory",
|
|
40
|
+
# Builder
|
|
41
|
+
"StellarBuilder",
|
|
42
|
+
"Preset",
|
|
43
|
+
# Models
|
|
44
|
+
"MemoryItem",
|
|
45
|
+
"MemoryStats",
|
|
46
|
+
# Plugin
|
|
47
|
+
"MemoryPlugin",
|
|
48
|
+
# Protocols
|
|
49
|
+
"StorageBackendProtocol",
|
|
50
|
+
"EmbedderProvider",
|
|
51
|
+
"ImportanceEvaluator",
|
|
52
|
+
"MemoryStore",
|
|
53
|
+
# Config
|
|
54
|
+
"StellarConfig",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# --- Backward compatibility ---
|
|
59
|
+
# v2.0 imports (e.g., `from stellar_memory import EventBus`) are redirected
|
|
60
|
+
# to their module-level locations with a deprecation warning.
|
|
61
|
+
|
|
62
|
+
import importlib as _importlib
|
|
63
|
+
import warnings as _warnings
|
|
64
|
+
|
|
65
|
+
# Lazy-load v2.0 exports with deprecation warnings
|
|
66
|
+
_V2_COMPAT_MAP: dict[str, tuple[str, str]] = {
|
|
67
|
+
# Config classes
|
|
68
|
+
"MemoryFunctionConfig": (".config", "MemoryFunctionConfig"),
|
|
69
|
+
"ZoneConfig": (".config", "ZoneConfig"),
|
|
70
|
+
"EmbedderConfig": (".config", "EmbedderConfig"),
|
|
71
|
+
"LLMConfig": (".config", "LLMConfig"),
|
|
72
|
+
"TunerConfig": (".config", "TunerConfig"),
|
|
73
|
+
"ConsolidationConfig": (".config", "ConsolidationConfig"),
|
|
74
|
+
"SessionConfig": (".config", "SessionConfig"),
|
|
75
|
+
"NamespaceConfig": (".config", "NamespaceConfig"),
|
|
76
|
+
"GraphConfig": (".config", "GraphConfig"),
|
|
77
|
+
"DecayConfig": (".config", "DecayConfig"),
|
|
78
|
+
"EventLoggerConfig": (".config", "EventLoggerConfig"),
|
|
79
|
+
"RecallConfig": (".config", "RecallConfig"),
|
|
80
|
+
"VectorIndexConfig": (".config", "VectorIndexConfig"),
|
|
81
|
+
"SummarizationConfig": (".config", "SummarizationConfig"),
|
|
82
|
+
"AdaptiveDecayConfig": (".config", "AdaptiveDecayConfig"),
|
|
83
|
+
"GraphAnalyticsConfig": (".config", "GraphAnalyticsConfig"),
|
|
84
|
+
"StorageConfig": (".config", "StorageConfig"),
|
|
85
|
+
"SyncConfig": (".config", "SyncConfig"),
|
|
86
|
+
"SecurityConfig": (".config", "SecurityConfig"),
|
|
87
|
+
"ConnectorConfig": (".config", "ConnectorConfig"),
|
|
88
|
+
"DashboardConfig": (".config", "DashboardConfig"),
|
|
89
|
+
"EmotionConfig": (".config", "EmotionConfig"),
|
|
90
|
+
"ServerConfig": (".config", "ServerConfig"),
|
|
91
|
+
"MetacognitionConfig": (".config", "MetacognitionConfig"),
|
|
92
|
+
"SelfLearningConfig": (".config", "SelfLearningConfig"),
|
|
93
|
+
"MultimodalConfig": (".config", "MultimodalConfig"),
|
|
94
|
+
"ReasoningConfig": (".config", "ReasoningConfig"),
|
|
95
|
+
"BenchmarkConfig": (".config", "BenchmarkConfig"),
|
|
96
|
+
# Removed in v3.0 (redirect to compat for error messages)
|
|
97
|
+
# "BillingConfig" removed, "OnboardConfig" removed, "KnowledgeBaseConfig" removed
|
|
98
|
+
# Models
|
|
99
|
+
"ScoreBreakdown": (".models", "ScoreBreakdown"),
|
|
100
|
+
"ReorbitResult": (".models", "ReorbitResult"),
|
|
101
|
+
"EvaluationResult": (".models", "EvaluationResult"),
|
|
102
|
+
"FeedbackRecord": (".models", "FeedbackRecord"),
|
|
103
|
+
"ConsolidationResult": (".models", "ConsolidationResult"),
|
|
104
|
+
"SessionInfo": (".models", "SessionInfo"),
|
|
105
|
+
"MemorySnapshot": (".models", "MemorySnapshot"),
|
|
106
|
+
"MemoryEdge": (".models", "MemoryEdge"),
|
|
107
|
+
"DecayResult": (".models", "DecayResult"),
|
|
108
|
+
"HealthStatus": (".models", "HealthStatus"),
|
|
109
|
+
"SummarizationResult": (".models", "SummarizationResult"),
|
|
110
|
+
"ChangeEvent": (".models", "ChangeEvent"),
|
|
111
|
+
"AccessRole": (".models", "AccessRole"),
|
|
112
|
+
"IngestResult": (".models", "IngestResult"),
|
|
113
|
+
"ZoneDistribution": (".models", "ZoneDistribution"),
|
|
114
|
+
"EmotionVector": (".models", "EmotionVector"),
|
|
115
|
+
"TimelineEntry": (".models", "TimelineEntry"),
|
|
116
|
+
"IntrospectionResult": (".models", "IntrospectionResult"),
|
|
117
|
+
"ConfidentRecall": (".models", "ConfidentRecall"),
|
|
118
|
+
"RecallLog": (".models", "RecallLog"),
|
|
119
|
+
"OptimizationReport": (".models", "OptimizationReport"),
|
|
120
|
+
"ReasoningResult": (".models", "ReasoningResult"),
|
|
121
|
+
"Contradiction": (".models", "Contradiction"),
|
|
122
|
+
"BenchmarkReport": (".models", "BenchmarkReport"),
|
|
123
|
+
# Core classes
|
|
124
|
+
"EventBus": (".event_bus", "EventBus"),
|
|
125
|
+
"MemoryGraph": (".memory_graph", "MemoryGraph"),
|
|
126
|
+
"PersistentMemoryGraph": (".persistent_graph", "PersistentMemoryGraph"),
|
|
127
|
+
"NamespaceManager": (".namespace", "NamespaceManager"),
|
|
128
|
+
"DecayManager": (".decay_manager", "DecayManager"),
|
|
129
|
+
"EventLogger": (".event_logger", "EventLogger"),
|
|
130
|
+
"MemoryMiddleware": (".llm_adapter", "MemoryMiddleware"),
|
|
131
|
+
"AnthropicAdapter": (".llm_adapter", "AnthropicAdapter"),
|
|
132
|
+
"VectorIndex": (".vector_index", "VectorIndex"),
|
|
133
|
+
"BruteForceIndex": (".vector_index", "BruteForceIndex"),
|
|
134
|
+
"BallTreeIndex": (".vector_index", "BallTreeIndex"),
|
|
135
|
+
"MemorySummarizer": (".summarizer", "MemorySummarizer"),
|
|
136
|
+
"AdaptiveDecayManager": (".adaptive_decay", "AdaptiveDecayManager"),
|
|
137
|
+
"GraphAnalyzer": (".graph_analyzer", "GraphAnalyzer"),
|
|
138
|
+
"GraphStats": (".graph_analyzer", "GraphStats"),
|
|
139
|
+
"CentralityResult": (".graph_analyzer", "CentralityResult"),
|
|
140
|
+
"ProviderRegistry": (".providers", "ProviderRegistry"),
|
|
141
|
+
"StorageBackend": (".storage", "StorageBackend"),
|
|
142
|
+
"EncryptionManager": (".security.encryption", "EncryptionManager"),
|
|
143
|
+
"AccessControl": (".security.access_control", "AccessControl"),
|
|
144
|
+
"SecurityAudit": (".security.audit", "SecurityAudit"),
|
|
145
|
+
"MemorySyncManager": (".sync", "MemorySyncManager"),
|
|
146
|
+
"EmotionAnalyzer": (".emotion", "EmotionAnalyzer"),
|
|
147
|
+
"MemoryStream": (".stream", "MemoryStream"),
|
|
148
|
+
"Introspector": (".metacognition", "Introspector"),
|
|
149
|
+
"ConfidenceScorer": (".metacognition", "ConfidenceScorer"),
|
|
150
|
+
"ContentTypeHandler": (".multimodal", "ContentTypeHandler"),
|
|
151
|
+
"TextHandler": (".multimodal", "TextHandler"),
|
|
152
|
+
"CodeHandler": (".multimodal", "CodeHandler"),
|
|
153
|
+
"JsonHandler": (".multimodal", "JsonHandler"),
|
|
154
|
+
"get_handler": (".multimodal", "get_handler"),
|
|
155
|
+
"detect_content_type": (".multimodal", "detect_content_type"),
|
|
156
|
+
"PatternCollector": (".self_learning", "PatternCollector"),
|
|
157
|
+
"WeightOptimizer": (".self_learning", "WeightOptimizer"),
|
|
158
|
+
"MemoryReasoner": (".reasoning", "MemoryReasoner"),
|
|
159
|
+
"ContradictionDetector": (".reasoning", "ContradictionDetector"),
|
|
160
|
+
"StandardDataset": (".benchmark", "StandardDataset"),
|
|
161
|
+
"MemoryBenchmark": (".benchmark", "MemoryBenchmark"),
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def __getattr__(name: str):
|
|
166
|
+
if name in _V2_COMPAT_MAP:
|
|
167
|
+
module_path, attr = _V2_COMPAT_MAP[name]
|
|
168
|
+
_warnings.warn(
|
|
169
|
+
f"Importing '{name}' from stellar_memory is deprecated in v3.0. "
|
|
170
|
+
f"Use 'from stellar_memory{module_path} import {attr}' instead.",
|
|
171
|
+
DeprecationWarning,
|
|
172
|
+
stacklevel=2,
|
|
173
|
+
)
|
|
174
|
+
module = _importlib.import_module(module_path, package="stellar_memory")
|
|
175
|
+
return getattr(module, attr)
|
|
176
|
+
raise AttributeError(f"module 'stellar_memory' has no attribute {name}")
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""Internal plugin manager for dispatching lifecycle hooks."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import logging
|
|
6
|
+
from typing import TYPE_CHECKING
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from stellar_memory.models import MemoryItem
|
|
10
|
+
from stellar_memory.plugin import MemoryPlugin
|
|
11
|
+
from stellar_memory.stellar import StellarMemory
|
|
12
|
+
|
|
13
|
+
logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class PluginManager:
|
|
17
|
+
"""Manages registered plugins and dispatches hooks."""
|
|
18
|
+
|
|
19
|
+
def __init__(self):
|
|
20
|
+
self._plugins: list[MemoryPlugin] = []
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def plugins(self) -> list[MemoryPlugin]:
|
|
24
|
+
return list(self._plugins)
|
|
25
|
+
|
|
26
|
+
def register(self, plugin: MemoryPlugin, memory: StellarMemory) -> None:
|
|
27
|
+
"""Register a plugin and call on_init."""
|
|
28
|
+
self._plugins.append(plugin)
|
|
29
|
+
try:
|
|
30
|
+
plugin.on_init(memory)
|
|
31
|
+
except Exception:
|
|
32
|
+
logger.warning("Plugin %s.on_init failed", plugin.name, exc_info=True)
|
|
33
|
+
|
|
34
|
+
def dispatch_store(self, item: MemoryItem) -> MemoryItem:
|
|
35
|
+
"""Chain on_store through all plugins."""
|
|
36
|
+
for plugin in self._plugins:
|
|
37
|
+
try:
|
|
38
|
+
item = plugin.on_store(item)
|
|
39
|
+
except Exception:
|
|
40
|
+
logger.warning("Plugin %s.on_store failed", plugin.name, exc_info=True)
|
|
41
|
+
return item
|
|
42
|
+
|
|
43
|
+
def dispatch_pre_recall(self, query: str, **kwargs) -> str:
|
|
44
|
+
"""Chain on_pre_recall through all plugins."""
|
|
45
|
+
for plugin in self._plugins:
|
|
46
|
+
try:
|
|
47
|
+
query = plugin.on_pre_recall(query, **kwargs)
|
|
48
|
+
except Exception:
|
|
49
|
+
logger.warning("Plugin %s.on_pre_recall failed", plugin.name, exc_info=True)
|
|
50
|
+
return query
|
|
51
|
+
|
|
52
|
+
def dispatch_recall(self, query: str,
|
|
53
|
+
results: list[MemoryItem]) -> list[MemoryItem]:
|
|
54
|
+
"""Chain on_recall through all plugins."""
|
|
55
|
+
for plugin in self._plugins:
|
|
56
|
+
try:
|
|
57
|
+
results = plugin.on_recall(query, results)
|
|
58
|
+
except Exception:
|
|
59
|
+
logger.warning("Plugin %s.on_recall failed", plugin.name, exc_info=True)
|
|
60
|
+
return results
|
|
61
|
+
|
|
62
|
+
def dispatch_decay(self, item: MemoryItem, score: float) -> float:
|
|
63
|
+
"""Chain on_decay through all plugins."""
|
|
64
|
+
for plugin in self._plugins:
|
|
65
|
+
try:
|
|
66
|
+
score = plugin.on_decay(item, score)
|
|
67
|
+
except Exception:
|
|
68
|
+
logger.warning("Plugin %s.on_decay failed", plugin.name, exc_info=True)
|
|
69
|
+
return score
|
|
70
|
+
|
|
71
|
+
def dispatch_reorbit(self, moves: list[tuple[str, int, int]]) -> None:
|
|
72
|
+
"""Notify all plugins of reorbit."""
|
|
73
|
+
for plugin in self._plugins:
|
|
74
|
+
try:
|
|
75
|
+
plugin.on_reorbit(moves)
|
|
76
|
+
except Exception:
|
|
77
|
+
logger.warning("Plugin %s.on_reorbit failed", plugin.name, exc_info=True)
|
|
78
|
+
|
|
79
|
+
def dispatch_forget(self, memory_id: str) -> bool:
|
|
80
|
+
"""Check all plugins allow forget. Any False cancels."""
|
|
81
|
+
for plugin in self._plugins:
|
|
82
|
+
try:
|
|
83
|
+
if not plugin.on_forget(memory_id):
|
|
84
|
+
return False
|
|
85
|
+
except Exception:
|
|
86
|
+
logger.warning("Plugin %s.on_forget failed", plugin.name, exc_info=True)
|
|
87
|
+
return True
|
|
88
|
+
|
|
89
|
+
def dispatch_consolidate(self, merged: MemoryItem,
|
|
90
|
+
sources: list[MemoryItem]) -> MemoryItem:
|
|
91
|
+
"""Chain on_consolidate through all plugins."""
|
|
92
|
+
for plugin in self._plugins:
|
|
93
|
+
try:
|
|
94
|
+
merged = plugin.on_consolidate(merged, sources)
|
|
95
|
+
except Exception:
|
|
96
|
+
logger.warning("Plugin %s.on_consolidate failed", plugin.name, exc_info=True)
|
|
97
|
+
return merged
|
|
98
|
+
|
|
99
|
+
def shutdown(self) -> None:
|
|
100
|
+
"""Call on_shutdown for all plugins."""
|
|
101
|
+
for plugin in self._plugins:
|
|
102
|
+
try:
|
|
103
|
+
plugin.on_shutdown()
|
|
104
|
+
except Exception:
|
|
105
|
+
logger.warning("Plugin %s.on_shutdown failed", plugin.name, exc_info=True)
|