scitrera-aether-client 0.1.58__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 (31) hide show
  1. scitrera_aether_client/__init__.py +367 -0
  2. scitrera_aether_client/_common.py +406 -0
  3. scitrera_aether_client/admin.py +373 -0
  4. scitrera_aether_client/admin_async.py +358 -0
  5. scitrera_aether_client/authority.py +292 -0
  6. scitrera_aether_client/authority_cache.py +447 -0
  7. scitrera_aether_client/client.py +2939 -0
  8. scitrera_aether_client/client_async.py +3918 -0
  9. scitrera_aether_client/echo_test/__init__.py +29 -0
  10. scitrera_aether_client/echo_test/echo_agent.py +294 -0
  11. scitrera_aether_client/echo_test/echo_agent_async.py +309 -0
  12. scitrera_aether_client/echo_test/echo_orchestrator.py +170 -0
  13. scitrera_aether_client/exceptions.py +504 -0
  14. scitrera_aether_client/httpx_transport.py +257 -0
  15. scitrera_aether_client/metrics.py +43 -0
  16. scitrera_aether_client/orchestrator/__init__.py +623 -0
  17. scitrera_aether_client/orchestrator/multiprocess.py +637 -0
  18. scitrera_aether_client/proto/__init__.py +0 -0
  19. scitrera_aether_client/proto/aether_pb2.py +439 -0
  20. scitrera_aether_client/proto/aether_pb2.pyi +2739 -0
  21. scitrera_aether_client/proto/aether_pb2_grpc.py +100 -0
  22. scitrera_aether_client/proxy.py +846 -0
  23. scitrera_aether_client/proxy_terminator.py +1082 -0
  24. scitrera_aether_client/py.typed +0 -0
  25. scitrera_aether_client/requests_adapter.py +178 -0
  26. scitrera_aether_client/tunnel.py +940 -0
  27. scitrera_aether_client/types.py +563 -0
  28. scitrera_aether_client-0.1.58.dist-info/METADATA +788 -0
  29. scitrera_aether_client-0.1.58.dist-info/RECORD +31 -0
  30. scitrera_aether_client-0.1.58.dist-info/WHEEL +5 -0
  31. scitrera_aether_client-0.1.58.dist-info/top_level.txt +1 -0
@@ -0,0 +1,367 @@
1
+ __version__ = "0.1.58"
2
+
3
+ # Import the proxy module for its side effect: installs the
4
+ # ``ProxyHttpResponse`` / ``ProxyHttpBodyChunk`` dispatcher hook on
5
+ # ``BaseAetherClient._do_connect`` and ``BaseAsyncAetherClient._do_connect``.
6
+ # Hooks must be in place BEFORE any client opens its gRPC connection,
7
+ # otherwise the responses iterator is the unwrapped one and inbound proxy
8
+ # frames are silently dropped (calls to ``proxy_http`` / ``proxy_http_async``
9
+ # would hang until their timeout fires). Importing here means every consumer
10
+ # of the SDK gets the hooks for free, with no requirement to import
11
+ # ``scitrera_aether_client.proxy`` explicitly.
12
+ from . import proxy as _proxy_side_effect # noqa: F401
13
+
14
+ from .client import (
15
+ # Client classes (sync)
16
+ AgentClient,
17
+ TaskClient,
18
+ UserClient,
19
+ OrchestratorClient,
20
+ WorkflowEngineClient,
21
+ MetricsBridgeClient,
22
+ ServiceClient,
23
+ # Audit submission response
24
+ AuditSubmitResponse,
25
+ )
26
+
27
+ from .client_async import (
28
+ # Client classes (async)
29
+ AsyncAgentClient,
30
+ AsyncTaskClient,
31
+ AsyncUserClient,
32
+ AsyncServiceClient,
33
+ AsyncOrchestratorClient,
34
+ AsyncWorkflowEngineClient,
35
+ AsyncMetricsBridgeClient,
36
+ )
37
+
38
+ from .orchestrator import (
39
+ # Orchestrator classes
40
+ BaseOrchestrator,
41
+ LaunchedProcess,
42
+ MultiprocessOrchestrator,
43
+ SubprocessInfo,
44
+ )
45
+
46
+ from .admin import AdminClient
47
+ from .admin_async import AsyncAdminClient
48
+
49
+ from .metrics import (
50
+ MetricBuilder,
51
+ new_metric,
52
+ )
53
+
54
+ from ._common import (
55
+ # Message type constants
56
+ MESSAGE_TYPE_UNSPECIFIED,
57
+ OPAQUE,
58
+ CHAT,
59
+ CONTROL,
60
+ TOOL_CALL,
61
+ EVENT,
62
+ METRIC,
63
+
64
+ # Task assignment mode constants
65
+ SELF_ASSIGN,
66
+ TARGETED,
67
+ POOL,
68
+
69
+ # KV operation type constants
70
+ KV_GET,
71
+ KV_PUT,
72
+ KV_LIST,
73
+ KV_DELETE,
74
+
75
+ # KV scope constants
76
+ KV_SCOPE_GLOBAL,
77
+ KV_SCOPE_WORKSPACE,
78
+ KV_SCOPE_USER,
79
+ KV_SCOPE_USER_WORKSPACE,
80
+ KV_SCOPE_GLOBAL_EXCLUSIVE,
81
+ KV_SCOPE_WORKSPACE_EXCLUSIVE,
82
+ KV_SCOPE_USER_SHARED,
83
+ KV_SCOPE_USER_WORKSPACE_SHARED,
84
+
85
+ # Auth credentials builder
86
+ Credentials,
87
+ )
88
+
89
+ from .exceptions import (
90
+ # Base exception
91
+ AetherError,
92
+ # Connection exceptions
93
+ ConnectionError,
94
+ ConnectionClosedError,
95
+ ReconnectionError,
96
+ # Auth exceptions
97
+ AuthenticationError,
98
+ PermissionDeniedError,
99
+ # Identity exceptions
100
+ DuplicateIdentityError,
101
+ # Timeout exception
102
+ TimeoutError,
103
+ # Request/Response exceptions
104
+ InvalidArgumentError,
105
+ NotFoundError,
106
+ NotImplementedError,
107
+ # Message/Protocol exceptions
108
+ MessageError,
109
+ KVOperationError,
110
+ CheckpointError,
111
+ # Utility functions
112
+ from_grpc_error,
113
+ is_recoverable_error,
114
+ )
115
+
116
+ from .types import (
117
+ # Configuration TypedDicts
118
+ ConnectionConfig,
119
+ TLSConfig,
120
+ AgentConfig,
121
+ TaskConfig,
122
+ UserConfig,
123
+ OrchestratorConfig,
124
+ # KV Types
125
+ KVScope,
126
+ KVGetParams,
127
+ KVPutParams,
128
+ KVListParams,
129
+ KVDeleteParams,
130
+ # Task Types
131
+ TaskAssignmentMode,
132
+ CreateTaskParams,
133
+ # Checkpoint Types
134
+ CheckpointSaveParams,
135
+ CheckpointLoadParams,
136
+ # Message Types
137
+ MessageType,
138
+ SendMessageParams,
139
+ # Message Shape Protocols
140
+ IncomingMessageLike,
141
+ ConfigLike,
142
+ # Callback Protocols
143
+ MessageCallback,
144
+ ConfigCallback,
145
+ SignalCallback,
146
+ ErrorCallback,
147
+ KVResponseCallback,
148
+ TaskAssignmentCallback,
149
+ CheckpointResponseCallback,
150
+ ProgressCallback,
151
+ ConnectCallback,
152
+ DisconnectCallback,
153
+ # Sync Callback Type Aliases
154
+ SyncMessageCallback,
155
+ SyncConfigCallback,
156
+ SyncSignalCallback,
157
+ SyncErrorCallback,
158
+ SyncKVResponseCallback,
159
+ SyncTaskAssignmentCallback,
160
+ SyncCheckpointResponseCallback,
161
+ SyncProgressCallback,
162
+ SyncConnectCallback,
163
+ SyncDisconnectCallback,
164
+ # Async Callback Type Aliases
165
+ AsyncMessageCallback,
166
+ AsyncConfigCallback,
167
+ AsyncSignalCallback,
168
+ AsyncErrorCallback,
169
+ AsyncKVResponseCallback,
170
+ AsyncTaskAssignmentCallback,
171
+ AsyncCheckpointResponseCallback,
172
+ AsyncProgressCallback,
173
+ AsyncConnectCallback,
174
+ AsyncDisconnectCallback,
175
+ # Union Type Aliases
176
+ AnyMessageCallback,
177
+ AnyConfigCallback,
178
+ AnySignalCallback,
179
+ AnyErrorCallback,
180
+ AnyKVResponseCallback,
181
+ AnyTaskAssignmentCallback,
182
+ AnyCheckpointResponseCallback,
183
+ AnyProgressCallback,
184
+ AnyConnectCallback,
185
+ AnyDisconnectCallback,
186
+ )
187
+
188
+ __all__ = (
189
+ # Client classes (sync)
190
+ 'AgentClient',
191
+ 'TaskClient',
192
+ 'UserClient',
193
+ 'OrchestratorClient',
194
+ 'WorkflowEngineClient',
195
+ 'MetricsBridgeClient',
196
+ 'ServiceClient',
197
+
198
+ # Client classes (async)
199
+ 'AsyncAgentClient',
200
+ 'AsyncTaskClient',
201
+ 'AsyncUserClient',
202
+ 'AsyncServiceClient',
203
+ 'AsyncOrchestratorClient',
204
+ 'AsyncWorkflowEngineClient',
205
+ 'AsyncMetricsBridgeClient',
206
+
207
+ # Orchestrator classes
208
+ 'BaseOrchestrator',
209
+ 'LaunchedProcess',
210
+ 'MultiprocessOrchestrator',
211
+ 'SubprocessInfo',
212
+
213
+ # Admin clients
214
+ 'AdminClient',
215
+ 'AsyncAdminClient',
216
+
217
+ # Audit submission response
218
+ 'AuditSubmitResponse',
219
+
220
+ # Message type constants
221
+ 'MESSAGE_TYPE_UNSPECIFIED',
222
+ 'OPAQUE',
223
+ 'CHAT',
224
+ 'CONTROL',
225
+ 'TOOL_CALL',
226
+ 'EVENT',
227
+ 'METRIC',
228
+
229
+ # Task assignment mode constants
230
+ 'SELF_ASSIGN',
231
+ 'TARGETED',
232
+ 'POOL',
233
+
234
+ # KV operation type constants
235
+ 'KV_GET',
236
+ 'KV_PUT',
237
+ 'KV_LIST',
238
+ 'KV_DELETE',
239
+
240
+ # KV scope constants
241
+ 'KV_SCOPE_GLOBAL',
242
+ 'KV_SCOPE_WORKSPACE',
243
+ 'KV_SCOPE_USER',
244
+ 'KV_SCOPE_USER_WORKSPACE',
245
+ 'KV_SCOPE_GLOBAL_EXCLUSIVE',
246
+ 'KV_SCOPE_WORKSPACE_EXCLUSIVE',
247
+ 'KV_SCOPE_USER_SHARED',
248
+ 'KV_SCOPE_USER_WORKSPACE_SHARED',
249
+
250
+ # Exceptions - Base
251
+ 'AetherError',
252
+
253
+ # Exceptions - Connection
254
+ 'ConnectionError',
255
+ 'ConnectionClosedError',
256
+ 'ReconnectionError',
257
+
258
+ # Exceptions - Auth
259
+ 'AuthenticationError',
260
+ 'PermissionDeniedError',
261
+
262
+ # Exceptions - Identity
263
+ 'DuplicateIdentityError',
264
+
265
+ # Exceptions - Timeout
266
+ 'TimeoutError',
267
+
268
+ # Exceptions - Request/Response
269
+ 'InvalidArgumentError',
270
+ 'NotFoundError',
271
+ 'NotImplementedError',
272
+
273
+ # Exceptions - Message/Protocol
274
+ 'MessageError',
275
+ 'KVOperationError',
276
+ 'CheckpointError',
277
+
278
+ # Exception utility functions
279
+ 'from_grpc_error',
280
+ 'is_recoverable_error',
281
+
282
+ # Types - Configuration TypedDicts
283
+ 'ConnectionConfig',
284
+ 'TLSConfig',
285
+ 'AgentConfig',
286
+ 'TaskConfig',
287
+ 'UserConfig',
288
+ 'OrchestratorConfig',
289
+
290
+ # Types - KV
291
+ 'KVScope',
292
+ 'KVGetParams',
293
+ 'KVPutParams',
294
+ 'KVListParams',
295
+ 'KVDeleteParams',
296
+
297
+ # Types - Task
298
+ 'TaskAssignmentMode',
299
+ 'CreateTaskParams',
300
+
301
+ # Types - Checkpoint
302
+ 'CheckpointSaveParams',
303
+ 'CheckpointLoadParams',
304
+
305
+ # Types - Message
306
+ 'MessageType',
307
+ 'SendMessageParams',
308
+
309
+ # Types - Message Shape Protocols
310
+ 'IncomingMessageLike',
311
+ 'ConfigLike',
312
+
313
+ # Types - Callback Protocols
314
+ 'MessageCallback',
315
+ 'ConfigCallback',
316
+ 'SignalCallback',
317
+ 'ErrorCallback',
318
+ 'KVResponseCallback',
319
+ 'TaskAssignmentCallback',
320
+ 'CheckpointResponseCallback',
321
+ 'ProgressCallback',
322
+ 'ConnectCallback',
323
+ 'DisconnectCallback',
324
+
325
+ # Types - Sync Callback Type Aliases
326
+ 'SyncMessageCallback',
327
+ 'SyncConfigCallback',
328
+ 'SyncSignalCallback',
329
+ 'SyncErrorCallback',
330
+ 'SyncKVResponseCallback',
331
+ 'SyncTaskAssignmentCallback',
332
+ 'SyncCheckpointResponseCallback',
333
+ 'SyncProgressCallback',
334
+ 'SyncConnectCallback',
335
+ 'SyncDisconnectCallback',
336
+
337
+ # Types - Async Callback Type Aliases
338
+ 'AsyncMessageCallback',
339
+ 'AsyncConfigCallback',
340
+ 'AsyncSignalCallback',
341
+ 'AsyncErrorCallback',
342
+ 'AsyncKVResponseCallback',
343
+ 'AsyncTaskAssignmentCallback',
344
+ 'AsyncCheckpointResponseCallback',
345
+ 'AsyncProgressCallback',
346
+ 'AsyncConnectCallback',
347
+ 'AsyncDisconnectCallback',
348
+
349
+ # Types - Union Type Aliases
350
+ 'AnyMessageCallback',
351
+ 'AnyConfigCallback',
352
+ 'AnySignalCallback',
353
+ 'AnyErrorCallback',
354
+ 'AnyKVResponseCallback',
355
+ 'AnyTaskAssignmentCallback',
356
+ 'AnyCheckpointResponseCallback',
357
+ 'AnyProgressCallback',
358
+ 'AnyConnectCallback',
359
+ 'AnyDisconnectCallback',
360
+
361
+ # Types - Other
362
+ 'Credentials',
363
+
364
+ # Metric builder
365
+ 'MetricBuilder',
366
+ 'new_metric',
367
+ )