runtime-memory 3.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. runtime_memory/__init__.py +28 -0
  2. runtime_memory/claude_code/__init__.py +48 -0
  3. runtime_memory/claude_code/commands.py +698 -0
  4. runtime_memory/claude_code/daemon.py +852 -0
  5. runtime_memory/claude_code/hooks.py +722 -0
  6. runtime_memory/cli/__init__.py +8 -0
  7. runtime_memory/cli/main.py +1936 -0
  8. runtime_memory/core/__init__.py +216 -0
  9. runtime_memory/core/config.py +473 -0
  10. runtime_memory/core/embeddings.py +908 -0
  11. runtime_memory/core/engine.py +1007 -0
  12. runtime_memory/core/exceptions.py +547 -0
  13. runtime_memory/core/legacy_env.py +39 -0
  14. runtime_memory/core/logging.py +160 -0
  15. runtime_memory/core/models.py +1051 -0
  16. runtime_memory/core/observability.py +725 -0
  17. runtime_memory/core/paths.py +30 -0
  18. runtime_memory/core/resilience.py +511 -0
  19. runtime_memory/core/retrieval.py +819 -0
  20. runtime_memory/core/storage.py +1105 -0
  21. runtime_memory/extraction/__init__.py +36 -0
  22. runtime_memory/extraction/extractor.py +1143 -0
  23. runtime_memory/hermes/__init__.py +39 -0
  24. runtime_memory/hermes/_base.py +154 -0
  25. runtime_memory/hermes/bridge.py +119 -0
  26. runtime_memory/hermes/plugin.yaml +13 -0
  27. runtime_memory/hermes/provider.py +536 -0
  28. runtime_memory/hermes/tools.py +230 -0
  29. runtime_memory/hermes/trace.py +177 -0
  30. runtime_memory/plugin/__init__.py +646 -0
  31. runtime_memory/sdk/__init__.py +97 -0
  32. runtime_memory/sdk/client.py +1577 -0
  33. runtime_memory/server/__init__.py +75 -0
  34. runtime_memory/server/api.py +1665 -0
  35. runtime_memory/server/mcp.py +1574 -0
  36. runtime_memory/server/static/css/styles.css +1110 -0
  37. runtime_memory/server/static/index.html +264 -0
  38. runtime_memory/server/static/js/api.js +294 -0
  39. runtime_memory/server/static/js/app.js +771 -0
  40. runtime_memory/tasks/__init__.py +114 -0
  41. runtime_memory/tasks/adapter.py +501 -0
  42. runtime_memory/tasks/claude_code_adapter.py +495 -0
  43. runtime_memory/tasks/claude_code_parser.py +339 -0
  44. runtime_memory/tasks/cli_bridge.py +415 -0
  45. runtime_memory/tasks/linking.py +397 -0
  46. runtime_memory/tasks/models.py +520 -0
  47. runtime_memory/tasks/outcomes.py +320 -0
  48. runtime_memory/tasks/parser.py +305 -0
  49. runtime_memory/tasks/unified_adapter.py +661 -0
  50. runtime_memory-3.0.0.dist-info/METADATA +497 -0
  51. runtime_memory-3.0.0.dist-info/RECORD +54 -0
  52. runtime_memory-3.0.0.dist-info/WHEEL +4 -0
  53. runtime_memory-3.0.0.dist-info/entry_points.txt +6 -0
  54. runtime_memory-3.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,97 @@
1
+ """Python SDK for Runtime Memory.
2
+
3
+ This module provides a unified client interface for accessing Runtime Memory
4
+ functionality in both local (direct engine access) and remote (REST API) modes.
5
+
6
+ Quick Start:
7
+ ```python
8
+ from runtime_memory.sdk import MemoryClient
9
+
10
+ # Async client (recommended)
11
+ async with MemoryClient(mode="local") as client:
12
+ memory = await client.add(
13
+ content="Use async/await for I/O operations",
14
+ category="pattern",
15
+ )
16
+ results = await client.search("async patterns")
17
+ await client.record_outcome(memory.id, "worked")
18
+
19
+ # Sync client for simple scripts
20
+ from runtime_memory.sdk import SyncMemoryClient
21
+
22
+ with SyncMemoryClient(mode="local") as client:
23
+ memory = client.add("Use async/await for I/O", category="pattern")
24
+ results = client.search("async patterns")
25
+ ```
26
+
27
+ Remote Mode:
28
+ ```python
29
+ # Connect to a running Runtime Memory server
30
+ async with MemoryClient(
31
+ mode="remote",
32
+ base_url="http://localhost:8080",
33
+ api_key="your-api-key",
34
+ ) as client:
35
+ results = await client.search("error handling")
36
+ ```
37
+
38
+ Module-Level Functions:
39
+ ```python
40
+ from runtime_memory.sdk import configure, add, search
41
+
42
+ configure(mode="local", db_path="~/.my-app/memories.db")
43
+
44
+ memory = await add("Use type hints", category="convention")
45
+ results = await search("type hints")
46
+ ```
47
+ """
48
+
49
+ from runtime_memory.sdk.client import (
50
+ AuthenticationError,
51
+ # Configuration
52
+ ClientConfig,
53
+ ClientMode,
54
+ ConnectionError,
55
+ # Main classes
56
+ MemoryClient,
57
+ NotFoundError,
58
+ RateLimitError,
59
+ # Exceptions
60
+ SDKError,
61
+ # Response types
62
+ StatsDict,
63
+ SyncMemoryClient,
64
+ ValidationError,
65
+ add,
66
+ close_default_client,
67
+ # Module-level functions
68
+ configure,
69
+ get_context,
70
+ record_outcome,
71
+ search,
72
+ )
73
+
74
+ __all__ = [
75
+ # Main classes
76
+ "MemoryClient",
77
+ "SyncMemoryClient",
78
+ # Configuration
79
+ "ClientConfig",
80
+ "ClientMode",
81
+ # Exceptions
82
+ "SDKError",
83
+ "ConnectionError",
84
+ "AuthenticationError",
85
+ "NotFoundError",
86
+ "ValidationError",
87
+ "RateLimitError",
88
+ # Response types
89
+ "StatsDict",
90
+ # Module-level functions
91
+ "configure",
92
+ "add",
93
+ "search",
94
+ "get_context",
95
+ "record_outcome",
96
+ "close_default_client",
97
+ ]