aikernel-net 0.0.5.1__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 (30) hide show
  1. aikernel_net/__init__.py +57 -0
  2. aikernel_net/managed/.gitkeep +1 -0
  3. aikernel_net/managed/AIKernel.Abstractions.dll +0 -0
  4. aikernel_net/managed/AIKernel.Common.dll +0 -0
  5. aikernel_net/managed/AIKernel.Core.dll +0 -0
  6. aikernel_net/managed/AIKernel.Dtos.dll +0 -0
  7. aikernel_net/managed/AIKernel.Enums.dll +0 -0
  8. aikernel_net/managed/AIKernel.Kernel.deps.json +378 -0
  9. aikernel_net/managed/AIKernel.Kernel.dll +0 -0
  10. aikernel_net/managed/Microsoft.Extensions.Configuration.Abstractions.dll +0 -0
  11. aikernel_net/managed/Microsoft.Extensions.Configuration.Binder.dll +0 -0
  12. aikernel_net/managed/Microsoft.Extensions.Configuration.dll +0 -0
  13. aikernel_net/managed/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
  14. aikernel_net/managed/Microsoft.Extensions.DependencyInjection.dll +0 -0
  15. aikernel_net/managed/Microsoft.Extensions.Diagnostics.Abstractions.dll +0 -0
  16. aikernel_net/managed/Microsoft.Extensions.Diagnostics.dll +0 -0
  17. aikernel_net/managed/Microsoft.Extensions.Http.dll +0 -0
  18. aikernel_net/managed/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
  19. aikernel_net/managed/Microsoft.Extensions.Logging.dll +0 -0
  20. aikernel_net/managed/Microsoft.Extensions.Options.ConfigurationExtensions.dll +0 -0
  21. aikernel_net/managed/Microsoft.Extensions.Options.dll +0 -0
  22. aikernel_net/managed/Microsoft.Extensions.Primitives.dll +0 -0
  23. aikernel_net/managed/YamlDotNet.dll +0 -0
  24. aikernel_net/managed.py +135 -0
  25. aikernel_net/monads.py +886 -0
  26. aikernel_net/py.typed +1 -0
  27. aikernel_net-0.0.5.1.dist-info/METADATA +293 -0
  28. aikernel_net-0.0.5.1.dist-info/RECORD +30 -0
  29. aikernel_net-0.0.5.1.dist-info/WHEEL +5 -0
  30. aikernel_net-0.0.5.1.dist-info/licenses/LICENSE +189 -0
@@ -0,0 +1,57 @@
1
+ """AIKernel Python bindings."""
2
+
3
+ from .managed import (
4
+ ManagedAssemblySet,
5
+ RuntimeLayout,
6
+ managed_assemblies,
7
+ require_managed_assemblies,
8
+ runtime_layout,
9
+ )
10
+ from .monads import (
11
+ AsyncEither,
12
+ AsyncOption,
13
+ AsyncResult,
14
+ Either,
15
+ Failure,
16
+ Left,
17
+ Nothing,
18
+ Option,
19
+ Result,
20
+ Right,
21
+ Some,
22
+ Success,
23
+ Try,
24
+ async_do,
25
+ async_either,
26
+ async_option,
27
+ async_result,
28
+ do,
29
+ )
30
+
31
+ __all__ = [
32
+ "AsyncEither",
33
+ "AsyncOption",
34
+ "AsyncResult",
35
+ "Either",
36
+ "Failure",
37
+ "Left",
38
+ "ManagedAssemblySet",
39
+ "Nothing",
40
+ "Option",
41
+ "Result",
42
+ "RuntimeLayout",
43
+ "Right",
44
+ "Some",
45
+ "Success",
46
+ "Try",
47
+ "async_do",
48
+ "async_either",
49
+ "async_option",
50
+ "async_result",
51
+ "do",
52
+ "managed_assemblies",
53
+ "require_managed_assemblies",
54
+ "runtime_layout",
55
+ ]
56
+
57
+ __version__ = "0.0.5.1"
@@ -0,0 +1 @@
1
+
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,378 @@
1
+ {
2
+ "runtimeTarget": {
3
+ "name": ".NETCoreApp,Version=v10.0",
4
+ "signature": ""
5
+ },
6
+ "compilationOptions": {},
7
+ "targets": {
8
+ ".NETCoreApp,Version=v10.0": {
9
+ "AIKernel.Kernel/0.0.5": {
10
+ "dependencies": {
11
+ "AIKernel.Abstractions": "0.0.5",
12
+ "AIKernel.Core": "0.0.5",
13
+ "AIKernel.Dtos": "0.0.5",
14
+ "AIKernel.Enums": "0.0.5",
15
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.8"
16
+ },
17
+ "runtime": {
18
+ "AIKernel.Kernel.dll": {}
19
+ }
20
+ },
21
+ "AIKernel.Abstractions/0.0.5": {
22
+ "dependencies": {
23
+ "AIKernel.Dtos": "0.0.5",
24
+ "AIKernel.Enums": "0.0.5"
25
+ },
26
+ "runtime": {
27
+ "lib/net10.0/AIKernel.Abstractions.dll": {
28
+ "assemblyVersion": "0.0.5.0",
29
+ "fileVersion": "0.0.5.0"
30
+ }
31
+ }
32
+ },
33
+ "AIKernel.Dtos/0.0.5": {
34
+ "dependencies": {
35
+ "AIKernel.Enums": "0.0.5"
36
+ },
37
+ "runtime": {
38
+ "lib/net10.0/AIKernel.Dtos.dll": {
39
+ "assemblyVersion": "0.0.5.0",
40
+ "fileVersion": "0.0.5.0"
41
+ }
42
+ }
43
+ },
44
+ "AIKernel.Enums/0.0.5": {
45
+ "runtime": {
46
+ "lib/net10.0/AIKernel.Enums.dll": {
47
+ "assemblyVersion": "0.0.5.0",
48
+ "fileVersion": "0.0.5.0"
49
+ }
50
+ }
51
+ },
52
+ "Microsoft.Extensions.Configuration/10.0.8": {
53
+ "dependencies": {
54
+ "Microsoft.Extensions.Configuration.Abstractions": "10.0.8",
55
+ "Microsoft.Extensions.Primitives": "10.0.8"
56
+ },
57
+ "runtime": {
58
+ "lib/net10.0/Microsoft.Extensions.Configuration.dll": {
59
+ "assemblyVersion": "10.0.0.0",
60
+ "fileVersion": "10.0.826.23019"
61
+ }
62
+ }
63
+ },
64
+ "Microsoft.Extensions.Configuration.Abstractions/10.0.8": {
65
+ "dependencies": {
66
+ "Microsoft.Extensions.Primitives": "10.0.8"
67
+ },
68
+ "runtime": {
69
+ "lib/net10.0/Microsoft.Extensions.Configuration.Abstractions.dll": {
70
+ "assemblyVersion": "10.0.0.0",
71
+ "fileVersion": "10.0.826.23019"
72
+ }
73
+ }
74
+ },
75
+ "Microsoft.Extensions.Configuration.Binder/10.0.8": {
76
+ "dependencies": {
77
+ "Microsoft.Extensions.Configuration": "10.0.8",
78
+ "Microsoft.Extensions.Configuration.Abstractions": "10.0.8"
79
+ },
80
+ "runtime": {
81
+ "lib/net10.0/Microsoft.Extensions.Configuration.Binder.dll": {
82
+ "assemblyVersion": "10.0.0.0",
83
+ "fileVersion": "10.0.826.23019"
84
+ }
85
+ }
86
+ },
87
+ "Microsoft.Extensions.DependencyInjection/10.0.8": {
88
+ "dependencies": {
89
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.8"
90
+ },
91
+ "runtime": {
92
+ "lib/net10.0/Microsoft.Extensions.DependencyInjection.dll": {
93
+ "assemblyVersion": "10.0.0.0",
94
+ "fileVersion": "10.0.826.23019"
95
+ }
96
+ }
97
+ },
98
+ "Microsoft.Extensions.DependencyInjection.Abstractions/10.0.8": {
99
+ "runtime": {
100
+ "lib/net10.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
101
+ "assemblyVersion": "10.0.0.0",
102
+ "fileVersion": "10.0.826.23019"
103
+ }
104
+ }
105
+ },
106
+ "Microsoft.Extensions.Diagnostics/10.0.8": {
107
+ "dependencies": {
108
+ "Microsoft.Extensions.Configuration": "10.0.8",
109
+ "Microsoft.Extensions.Diagnostics.Abstractions": "10.0.8",
110
+ "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.8"
111
+ },
112
+ "runtime": {
113
+ "lib/net10.0/Microsoft.Extensions.Diagnostics.dll": {
114
+ "assemblyVersion": "10.0.0.0",
115
+ "fileVersion": "10.0.826.23019"
116
+ }
117
+ }
118
+ },
119
+ "Microsoft.Extensions.Diagnostics.Abstractions/10.0.8": {
120
+ "dependencies": {
121
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.8",
122
+ "Microsoft.Extensions.Options": "10.0.8"
123
+ },
124
+ "runtime": {
125
+ "lib/net10.0/Microsoft.Extensions.Diagnostics.Abstractions.dll": {
126
+ "assemblyVersion": "10.0.0.0",
127
+ "fileVersion": "10.0.826.23019"
128
+ }
129
+ }
130
+ },
131
+ "Microsoft.Extensions.Http/10.0.8": {
132
+ "dependencies": {
133
+ "Microsoft.Extensions.Configuration.Abstractions": "10.0.8",
134
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.8",
135
+ "Microsoft.Extensions.Diagnostics": "10.0.8",
136
+ "Microsoft.Extensions.Logging": "10.0.8",
137
+ "Microsoft.Extensions.Logging.Abstractions": "10.0.8",
138
+ "Microsoft.Extensions.Options": "10.0.8"
139
+ },
140
+ "runtime": {
141
+ "lib/net10.0/Microsoft.Extensions.Http.dll": {
142
+ "assemblyVersion": "10.0.0.0",
143
+ "fileVersion": "10.0.826.23019"
144
+ }
145
+ }
146
+ },
147
+ "Microsoft.Extensions.Logging/10.0.8": {
148
+ "dependencies": {
149
+ "Microsoft.Extensions.DependencyInjection": "10.0.8",
150
+ "Microsoft.Extensions.Logging.Abstractions": "10.0.8",
151
+ "Microsoft.Extensions.Options": "10.0.8"
152
+ },
153
+ "runtime": {
154
+ "lib/net10.0/Microsoft.Extensions.Logging.dll": {
155
+ "assemblyVersion": "10.0.0.0",
156
+ "fileVersion": "10.0.826.23019"
157
+ }
158
+ }
159
+ },
160
+ "Microsoft.Extensions.Logging.Abstractions/10.0.8": {
161
+ "dependencies": {
162
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.8"
163
+ },
164
+ "runtime": {
165
+ "lib/net10.0/Microsoft.Extensions.Logging.Abstractions.dll": {
166
+ "assemblyVersion": "10.0.0.0",
167
+ "fileVersion": "10.0.826.23019"
168
+ }
169
+ }
170
+ },
171
+ "Microsoft.Extensions.Options/10.0.8": {
172
+ "dependencies": {
173
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.8",
174
+ "Microsoft.Extensions.Primitives": "10.0.8"
175
+ },
176
+ "runtime": {
177
+ "lib/net10.0/Microsoft.Extensions.Options.dll": {
178
+ "assemblyVersion": "10.0.0.0",
179
+ "fileVersion": "10.0.826.23019"
180
+ }
181
+ }
182
+ },
183
+ "Microsoft.Extensions.Options.ConfigurationExtensions/10.0.8": {
184
+ "dependencies": {
185
+ "Microsoft.Extensions.Configuration.Abstractions": "10.0.8",
186
+ "Microsoft.Extensions.Configuration.Binder": "10.0.8",
187
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.8",
188
+ "Microsoft.Extensions.Options": "10.0.8",
189
+ "Microsoft.Extensions.Primitives": "10.0.8"
190
+ },
191
+ "runtime": {
192
+ "lib/net10.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll": {
193
+ "assemblyVersion": "10.0.0.0",
194
+ "fileVersion": "10.0.826.23019"
195
+ }
196
+ }
197
+ },
198
+ "Microsoft.Extensions.Primitives/10.0.8": {
199
+ "runtime": {
200
+ "lib/net10.0/Microsoft.Extensions.Primitives.dll": {
201
+ "assemblyVersion": "10.0.0.0",
202
+ "fileVersion": "10.0.826.23019"
203
+ }
204
+ }
205
+ },
206
+ "YamlDotNet/18.0.0": {
207
+ "runtime": {
208
+ "lib/net10.0/YamlDotNet.dll": {
209
+ "assemblyVersion": "18.0.0.0",
210
+ "fileVersion": "18.0.0.0"
211
+ }
212
+ }
213
+ },
214
+ "AIKernel.Common/0.0.5": {
215
+ "runtime": {
216
+ "AIKernel.Common.dll": {
217
+ "assemblyVersion": "0.0.5.0",
218
+ "fileVersion": "0.0.5.0"
219
+ }
220
+ }
221
+ },
222
+ "AIKernel.Core/0.0.5": {
223
+ "dependencies": {
224
+ "AIKernel.Abstractions": "0.0.5",
225
+ "AIKernel.Common": "0.0.5",
226
+ "AIKernel.Dtos": "0.0.5",
227
+ "AIKernel.Enums": "0.0.5",
228
+ "Microsoft.Extensions.Configuration.Abstractions": "10.0.8",
229
+ "Microsoft.Extensions.Http": "10.0.8",
230
+ "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.8",
231
+ "YamlDotNet": "18.0.0"
232
+ },
233
+ "runtime": {
234
+ "AIKernel.Core.dll": {
235
+ "assemblyVersion": "0.0.5.0",
236
+ "fileVersion": "0.0.5.0"
237
+ }
238
+ }
239
+ }
240
+ }
241
+ },
242
+ "libraries": {
243
+ "AIKernel.Kernel/0.0.5": {
244
+ "type": "project",
245
+ "serviceable": false,
246
+ "sha512": ""
247
+ },
248
+ "AIKernel.Abstractions/0.0.5": {
249
+ "type": "package",
250
+ "serviceable": true,
251
+ "sha512": "sha512-Nv4DDVdCi4hA2atZdK1Fs+9goFlNQNi0WwTqbGtwWeOXjQQhftXK2cHqFSaj459JnK2A/GSZ9qTrwMvUQ7VzIg==",
252
+ "path": "aikernel.abstractions/0.0.5",
253
+ "hashPath": "aikernel.abstractions.0.0.5.nupkg.sha512"
254
+ },
255
+ "AIKernel.Dtos/0.0.5": {
256
+ "type": "package",
257
+ "serviceable": true,
258
+ "sha512": "sha512-WbxLEORRnTQglzIUEWJf8pr0faXGU4uuFFM8nj+Psm69BFIwSBTOHrXbFuZIfpOQNzJmet977yzTXaZUcSDXEg==",
259
+ "path": "aikernel.dtos/0.0.5",
260
+ "hashPath": "aikernel.dtos.0.0.5.nupkg.sha512"
261
+ },
262
+ "AIKernel.Enums/0.0.5": {
263
+ "type": "package",
264
+ "serviceable": true,
265
+ "sha512": "sha512-Hgn101k7sOH83gN85QXafuMvyCnM28DiChG7tXEyKqGwX6aCTo3LSqgedAHKUCT+5w8snEIl4Jnx9JeLB3gKtw==",
266
+ "path": "aikernel.enums/0.0.5",
267
+ "hashPath": "aikernel.enums.0.0.5.nupkg.sha512"
268
+ },
269
+ "Microsoft.Extensions.Configuration/10.0.8": {
270
+ "type": "package",
271
+ "serviceable": true,
272
+ "sha512": "sha512-ehZcoPbjzWzS4XFvuz7R3V55SmpdkyMqFURLH3yXaN9NtXd9tR6CGB7pd49HYtCkenl+G7ctXSFLhNI08xLfRg==",
273
+ "path": "microsoft.extensions.configuration/10.0.8",
274
+ "hashPath": "microsoft.extensions.configuration.10.0.8.nupkg.sha512"
275
+ },
276
+ "Microsoft.Extensions.Configuration.Abstractions/10.0.8": {
277
+ "type": "package",
278
+ "serviceable": true,
279
+ "sha512": "sha512-I63esIFbL3h5pSt7gXpXOlmcwDmYBUoYNEglKfDPFUqtYvSV84f2l28hO2lfVXsV0wdlplgAM7IVz16matapSg==",
280
+ "path": "microsoft.extensions.configuration.abstractions/10.0.8",
281
+ "hashPath": "microsoft.extensions.configuration.abstractions.10.0.8.nupkg.sha512"
282
+ },
283
+ "Microsoft.Extensions.Configuration.Binder/10.0.8": {
284
+ "type": "package",
285
+ "serviceable": true,
286
+ "sha512": "sha512-R3NN1X+kVu14uoxLEW6sBSQyhogDSbaOQzILnCtuXxBN4hx22AgjWPwZX6v/suERFkEDgU1lk12AglHTrUxhlw==",
287
+ "path": "microsoft.extensions.configuration.binder/10.0.8",
288
+ "hashPath": "microsoft.extensions.configuration.binder.10.0.8.nupkg.sha512"
289
+ },
290
+ "Microsoft.Extensions.DependencyInjection/10.0.8": {
291
+ "type": "package",
292
+ "serviceable": true,
293
+ "sha512": "sha512-daf62xHIrq8pnE709hgaZZN9tSam9TGGepWe1+bE6V3GEuVwJiMs6ib+38lfMCyAJAHiX0vapxBhsuMSV7U+cg==",
294
+ "path": "microsoft.extensions.dependencyinjection/10.0.8",
295
+ "hashPath": "microsoft.extensions.dependencyinjection.10.0.8.nupkg.sha512"
296
+ },
297
+ "Microsoft.Extensions.DependencyInjection.Abstractions/10.0.8": {
298
+ "type": "package",
299
+ "serviceable": true,
300
+ "sha512": "sha512-21nbDV60SRPWGIivsyl6lqBeEJNG1sginhhfWgRrr3Ais7aQ12To25OAHQxgoiJkjqy1aQ6RxpZBGYuTi7Ge6A==",
301
+ "path": "microsoft.extensions.dependencyinjection.abstractions/10.0.8",
302
+ "hashPath": "microsoft.extensions.dependencyinjection.abstractions.10.0.8.nupkg.sha512"
303
+ },
304
+ "Microsoft.Extensions.Diagnostics/10.0.8": {
305
+ "type": "package",
306
+ "serviceable": true,
307
+ "sha512": "sha512-uduyw9d3Fi+sbredO5drA1S44AQS2FRNFyn72UmB2vmQIO1qaXprpp1U/2lYhYi8yFdVERfY9sy/pxw/qPOU9w==",
308
+ "path": "microsoft.extensions.diagnostics/10.0.8",
309
+ "hashPath": "microsoft.extensions.diagnostics.10.0.8.nupkg.sha512"
310
+ },
311
+ "Microsoft.Extensions.Diagnostics.Abstractions/10.0.8": {
312
+ "type": "package",
313
+ "serviceable": true,
314
+ "sha512": "sha512-+f4C5g78QCGNyxzUfrTYsB7qYx06Zca0e88s3qFlea9/lQhgPImYdNprlgzl1uHhRU3fVHLfmbijayU2sJEZ6w==",
315
+ "path": "microsoft.extensions.diagnostics.abstractions/10.0.8",
316
+ "hashPath": "microsoft.extensions.diagnostics.abstractions.10.0.8.nupkg.sha512"
317
+ },
318
+ "Microsoft.Extensions.Http/10.0.8": {
319
+ "type": "package",
320
+ "serviceable": true,
321
+ "sha512": "sha512-/9LU/KWJOrtZJB9ymPjcARDyjp679BvBA/aSncv2Kt84WlSKz767HtxHg8EFsu8n21BMLZi+5XxlkKbLwfn4iA==",
322
+ "path": "microsoft.extensions.http/10.0.8",
323
+ "hashPath": "microsoft.extensions.http.10.0.8.nupkg.sha512"
324
+ },
325
+ "Microsoft.Extensions.Logging/10.0.8": {
326
+ "type": "package",
327
+ "serviceable": true,
328
+ "sha512": "sha512-K60JhWC2hN/Gi7TP68tBxSzk5ACWOs7lkmPzsfA8Bcf/IXTajujt2ORMf9rSMk1bsng6Lv4Y3fuxp3bm1+15ug==",
329
+ "path": "microsoft.extensions.logging/10.0.8",
330
+ "hashPath": "microsoft.extensions.logging.10.0.8.nupkg.sha512"
331
+ },
332
+ "Microsoft.Extensions.Logging.Abstractions/10.0.8": {
333
+ "type": "package",
334
+ "serviceable": true,
335
+ "sha512": "sha512-fdVadZmsC8jRP0KvKy8mO8f6GV/HyBvElfcSxEhd+5FM5boAw/01iSaCto5G3G37ApJira4A3pNaVvBv8cUiLQ==",
336
+ "path": "microsoft.extensions.logging.abstractions/10.0.8",
337
+ "hashPath": "microsoft.extensions.logging.abstractions.10.0.8.nupkg.sha512"
338
+ },
339
+ "Microsoft.Extensions.Options/10.0.8": {
340
+ "type": "package",
341
+ "serviceable": true,
342
+ "sha512": "sha512-VBD+131DpTNCNDfA4kIyKTiCySvJGNhwibdWBSdFRu7GMfXLXcXODkgA+KStKbbhzraLglZWUN4nXyHgW4JIRA==",
343
+ "path": "microsoft.extensions.options/10.0.8",
344
+ "hashPath": "microsoft.extensions.options.10.0.8.nupkg.sha512"
345
+ },
346
+ "Microsoft.Extensions.Options.ConfigurationExtensions/10.0.8": {
347
+ "type": "package",
348
+ "serviceable": true,
349
+ "sha512": "sha512-VOapXeO3lhBH0zYoyAH7tjapuo4V5pTHlevPpiSHueEquAajqd5nF0mttm+h/uE/exwAEuM5s26SzOJtletE3w==",
350
+ "path": "microsoft.extensions.options.configurationextensions/10.0.8",
351
+ "hashPath": "microsoft.extensions.options.configurationextensions.10.0.8.nupkg.sha512"
352
+ },
353
+ "Microsoft.Extensions.Primitives/10.0.8": {
354
+ "type": "package",
355
+ "serviceable": true,
356
+ "sha512": "sha512-OBPo4nYhMyIbtueoC10CBm6AGAbo/A9IV8QQ/6ryZS7VvmqpGT7hunazeHLxFawRzn3oLOq4jhqhpBX4tfswWQ==",
357
+ "path": "microsoft.extensions.primitives/10.0.8",
358
+ "hashPath": "microsoft.extensions.primitives.10.0.8.nupkg.sha512"
359
+ },
360
+ "YamlDotNet/18.0.0": {
361
+ "type": "package",
362
+ "serviceable": true,
363
+ "sha512": "sha512-ptHVgcYmLejGuWXV7RMFoEqFKYMXnieOlWLPzEslfDtzZ9ngMhjYwykfqjBN2+fMEAEyobozkj07lKEpR4dssA==",
364
+ "path": "yamldotnet/18.0.0",
365
+ "hashPath": "yamldotnet.18.0.0.nupkg.sha512"
366
+ },
367
+ "AIKernel.Common/0.0.5": {
368
+ "type": "project",
369
+ "serviceable": false,
370
+ "sha512": ""
371
+ },
372
+ "AIKernel.Core/0.0.5": {
373
+ "type": "project",
374
+ "serviceable": false,
375
+ "sha512": ""
376
+ }
377
+ }
378
+ }
Binary file
Binary file
@@ -0,0 +1,135 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ from dataclasses import dataclass
5
+ from pathlib import Path
6
+
7
+
8
+ _PACKAGE_VERSION = "0.0.5"
9
+ _MANAGED_ASSEMBLIES = (
10
+ "AIKernel.Abstractions.dll",
11
+ "AIKernel.Common.dll",
12
+ "AIKernel.Core.dll",
13
+ "AIKernel.Kernel.dll",
14
+ "AIKernel.Dtos.dll",
15
+ "AIKernel.Enums.dll",
16
+ )
17
+ _ASSEMBLY_PACKAGES = {
18
+ "AIKernel.Abstractions.dll": "AIKernel.Abstractions",
19
+ "AIKernel.Common.dll": "AIKernel.Common",
20
+ "AIKernel.Core.dll": "AIKernel.Core",
21
+ "AIKernel.Kernel.dll": "AIKernel.Kernel",
22
+ "AIKernel.Dtos.dll": "AIKernel.Dtos",
23
+ "AIKernel.Enums.dll": "AIKernel.Enums",
24
+ }
25
+
26
+
27
+ @dataclass(frozen=True)
28
+ class ManagedAssemblySet:
29
+ root: Path
30
+ assemblies: tuple[Path, ...]
31
+
32
+ @property
33
+ def is_complete(self) -> bool:
34
+ return all(path.exists() for path in self.assemblies)
35
+
36
+ @property
37
+ def missing(self) -> tuple[str, ...]:
38
+ return tuple(path.name for path in self.assemblies if not path.exists())
39
+
40
+ @property
41
+ def dlls(self) -> tuple[Path, ...]:
42
+ roots = {
43
+ self.root,
44
+ *(path.parent for path in self.assemblies),
45
+ }
46
+ return tuple(sorted({path for root in roots for path in root.glob("*.dll")}))
47
+
48
+ @property
49
+ def dependency_manifests(self) -> tuple[Path, ...]:
50
+ roots = {
51
+ self.root,
52
+ *(path.parent for path in self.assemblies),
53
+ }
54
+ return tuple(sorted({path for root in roots for path in root.glob("*.deps.json")}))
55
+
56
+
57
+ @dataclass(frozen=True)
58
+ class RuntimeLayout:
59
+ managed: ManagedAssemblySet
60
+ native_root: Path
61
+
62
+ @property
63
+ def native_libraries(self) -> tuple[Path, ...]:
64
+ patterns = ("*.dll", "*.so", "*.dylib")
65
+ return tuple(sorted(path for pattern in patterns for path in self.native_root.glob(pattern)))
66
+
67
+
68
+ def managed_assemblies() -> ManagedAssemblySet:
69
+ root = _managed_package_root()
70
+ return ManagedAssemblySet(
71
+ root=root,
72
+ assemblies=tuple(_resolve_assembly(name) for name in _MANAGED_ASSEMBLIES),
73
+ )
74
+
75
+
76
+ def runtime_layout() -> RuntimeLayout:
77
+ package_root = Path(__file__).resolve().parent
78
+ return RuntimeLayout(
79
+ managed=managed_assemblies(),
80
+ native_root=package_root / "native",
81
+ )
82
+
83
+
84
+ def require_managed_assemblies() -> ManagedAssemblySet:
85
+ assemblies = managed_assemblies()
86
+ if not assemblies.is_complete:
87
+ missing = ", ".join(assemblies.missing)
88
+ raise FileNotFoundError(
89
+ "AIKernel managed assemblies are not bundled in this Python package: "
90
+ f"{missing}. Build with AIKERNEL_PYTHON_INCLUDE_MANAGED=ON or use the "
91
+ "repository .NET packages directly."
92
+ )
93
+
94
+ return assemblies
95
+
96
+
97
+ def _resolve_assembly(name: str) -> Path:
98
+ for root in _managed_roots():
99
+ candidate = root / name
100
+ if candidate.exists():
101
+ return candidate
102
+
103
+ nuget_candidate = _resolve_nuget_assembly(name)
104
+ if nuget_candidate is not None:
105
+ return nuget_candidate
106
+
107
+ return _managed_package_root() / name
108
+
109
+
110
+ def _managed_roots() -> tuple[Path, ...]:
111
+ roots: list[Path] = [_managed_package_root()]
112
+ override = os.environ.get("AIKERNEL_MANAGED_ASSEMBLY_PATH")
113
+ if override:
114
+ roots.extend(Path(path) for path in override.split(os.pathsep) if path)
115
+ return tuple(roots)
116
+
117
+
118
+ def _managed_package_root() -> Path:
119
+ return Path(__file__).resolve().parent / "managed"
120
+
121
+
122
+ def _resolve_nuget_assembly(name: str) -> Path | None:
123
+ package = _ASSEMBLY_PACKAGES[name]
124
+ package_root = _nuget_root() / package.lower() / _PACKAGE_VERSION / "lib" / "net10.0"
125
+ candidate = package_root / name
126
+ if candidate.exists():
127
+ return candidate
128
+ return None
129
+
130
+
131
+ def _nuget_root() -> Path:
132
+ configured = os.environ.get("NUGET_PACKAGES")
133
+ if configured:
134
+ return Path(configured)
135
+ return Path.home() / ".nuget" / "packages"