Coverage for astrocyte/__init__.py: 100%
10 statements
« prev ^ index » next coverage.py v7.15.0, created at 2026-07-04 05:24 +0000
« prev ^ index » next coverage.py v7.15.0, created at 2026-07-04 05:24 +0000
1"""Astrocyte — open-source memory framework for AI agents.
3Public API surface. Import from here, not from submodules.
4"""
6from astrocyte._astrocyte import Astrocyte
7from astrocyte.config import IdentityConfig
8from astrocyte.errors import (
9 AccessDenied,
10 AstrocyteError,
11 CapabilityNotSupported,
12 ConfigError,
13 CrossBorderViolation,
14 IngestError,
15 LegalHoldActive,
16 MipRoutingError,
17 PiiRejected,
18 ProviderUnavailable,
19 RateLimited,
20)
21from astrocyte.hybrid import HybridEngineProvider
22from astrocyte.identity import (
23 BankResolver,
24 accessible_read_banks,
25 effective_permissions,
26 format_principal,
27 parse_principal,
28 resolve_actor,
29)
30from astrocyte.pipeline import (
31 PreparedRetainInput,
32 extraction_profile_for_source,
33 merged_extraction_profiles,
34 prepare_retain_input,
35)
36from astrocyte.provider import (
37 DocumentStore,
38 EngineProvider,
39 GraphStore,
40 LLMProvider,
41 OutboundTransportProvider,
42 VectorStore,
43)
44from astrocyte.recall import (
45 PLACE_BANK,
46 PLACE_QUERY,
47 auth_with_oauth_cache_namespace,
48 build_proxy_headers,
49 clear_oauth2_token_cache_for_tests,
50 exchange_oauth2_authorization_code,
51 fetch_oauth2_client_credentials_token,
52 fetch_oauth2_refresh_access_token,
53 fetch_proxy_recall_hits,
54 gather_proxy_hits_for_bank,
55 merge_external_into_recall_result,
56 merge_manual_and_proxy_hits,
57 post_oauth2_token_endpoint,
58 validate_proxy_recall_dns,
59 validate_proxy_recall_url,
60)
61from astrocyte.types import (
62 AccessGrant,
63 ActorIdentity,
64 AstrocyteContext,
65 AuditEvent,
66 BankHealth,
67 Completion,
68 ContentPart,
69 DataClassification,
70 Dispositions,
71 Document,
72 DocumentFilters,
73 DocumentHit,
74 EngineCapabilities,
75 Entity,
76 EntityLink,
77 EvalMetrics,
78 EvalResult,
79 ForgetRequest,
80 ForgetResult,
81 ForgetSelector,
82 GraphHit,
83 HealthIssue,
84 HealthStatus,
85 HookEvent,
86 HttpClientContext,
87 LegalHold,
88 LifecycleAction,
89 LifecycleRunResult,
90 LLMCapabilities,
91 MemoryEntityAssociation,
92 MemoryHit,
93 MemoryUsage,
94 Message,
95 Metadata,
96 MetadataValue,
97 MultiBankStrategy,
98 PiiMatch,
99 QualityDataPoint,
100 QueryResult,
101 RecallRequest,
102 RecallResult,
103 RecallTrace,
104 ReflectRequest,
105 ReflectResult,
106 RegressionAlert,
107 RetainRequest,
108 RetainResult,
109 RoutingDecision,
110 TokenUsage,
111 TransportCapabilities,
112 VectorFilters,
113 VectorHit,
114 VectorItem,
115)
117__all__ = [
118 # Main class
119 "Astrocyte",
120 "HybridEngineProvider",
121 # M3 extraction (stable imports)
122 "prepare_retain_input",
123 "merged_extraction_profiles",
124 "extraction_profile_for_source",
125 "PreparedRetainInput",
126 # M4.1 federated recall
127 "PLACE_QUERY",
128 "PLACE_BANK",
129 "auth_with_oauth_cache_namespace",
130 "build_proxy_headers",
131 "clear_oauth2_token_cache_for_tests",
132 "exchange_oauth2_authorization_code",
133 "fetch_oauth2_client_credentials_token",
134 "fetch_oauth2_refresh_access_token",
135 "fetch_proxy_recall_hits",
136 "gather_proxy_hits_for_bank",
137 "merge_manual_and_proxy_hits",
138 "merge_external_into_recall_result",
139 "post_oauth2_token_endpoint",
140 "validate_proxy_recall_dns",
141 "validate_proxy_recall_url",
142 # Errors
143 "AstrocyteError",
144 "ConfigError",
145 "IngestError",
146 "CapabilityNotSupported",
147 "AccessDenied",
148 "RateLimited",
149 "ProviderUnavailable",
150 "PiiRejected",
151 "CrossBorderViolation",
152 "LegalHoldActive",
153 "MipRoutingError",
154 # Protocols
155 "VectorStore",
156 "GraphStore",
157 "DocumentStore",
158 "EngineProvider",
159 "LLMProvider",
160 "OutboundTransportProvider",
161 # Types — common
162 "HealthStatus",
163 "Metadata",
164 "MetadataValue",
165 # Types — vector store
166 "VectorItem",
167 "VectorFilters",
168 "VectorHit",
169 # Types — graph store
170 "Entity",
171 "EntityLink",
172 "MemoryEntityAssociation",
173 "GraphHit",
174 # Types — document store
175 "Document",
176 "DocumentFilters",
177 "DocumentHit",
178 # Types — engine
179 "RetainRequest",
180 "RetainResult",
181 "RecallRequest",
182 "RecallResult",
183 "MemoryHit",
184 "RecallTrace",
185 "ReflectRequest",
186 "ReflectResult",
187 "Dispositions",
188 "ForgetRequest",
189 "ForgetResult",
190 "EngineCapabilities",
191 # Types — LLM
192 "Message",
193 "ContentPart",
194 "Completion",
195 "TokenUsage",
196 "LLMCapabilities",
197 # Types — transport
198 "HttpClientContext",
199 "TransportCapabilities",
200 # Types — multi-bank
201 "MultiBankStrategy",
202 # Types — access control
203 "AccessGrant",
204 "ActorIdentity",
205 "AstrocyteContext",
206 "IdentityConfig",
207 # Identity (M1)
208 "BankResolver",
209 "resolve_actor",
210 "format_principal",
211 "parse_principal",
212 "effective_permissions",
213 "accessible_read_banks",
214 # Types — hooks
215 "HookEvent",
216 # Types — governance
217 "DataClassification",
218 # Types — lifecycle
219 "AuditEvent",
220 "ForgetSelector",
221 "LegalHold",
222 "LifecycleAction",
223 "LifecycleRunResult",
224 # Types — MIP
225 "RoutingDecision",
226 # Types — analytics
227 "BankHealth",
228 "HealthIssue",
229 "MemoryUsage",
230 "QualityDataPoint",
231 # Types — evaluation
232 "EvalMetrics",
233 "EvalResult",
234 "QueryResult",
235 "RegressionAlert",
236 # Types — PII
237 "PiiMatch",
238]