tigrbl-kernel 0.1.0.dev15__tar.gz → 0.1.11.dev1__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.
- tigrbl_kernel-0.1.11.dev1/PKG-INFO +46 -0
- tigrbl_kernel-0.1.11.dev1/README.md +23 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/pyproject.toml +3 -3
- tigrbl_kernel-0.1.11.dev1/tigrbl_kernel/__init__.py +88 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/_compile.py +32 -8
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/core.py +9 -4
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/opview_compiler.py +21 -1
- tigrbl_kernel-0.1.11.dev1/tigrbl_kernel/rust_compile.py +43 -0
- tigrbl_kernel-0.1.11.dev1/tigrbl_kernel/rust_plan.py +14 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/types.py +12 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/utils.py +2 -2
- tigrbl_kernel-0.1.0.dev15/PKG-INFO +0 -52
- tigrbl_kernel-0.1.0.dev15/README.md +0 -29
- tigrbl_kernel-0.1.0.dev15/tigrbl_kernel/__init__.py +0 -44
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/_build.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/atoms.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/cache.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/events.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/helpers.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/hook_types.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/labels.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/models.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/ordering.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/payload.py +0 -0
- {tigrbl_kernel-0.1.0.dev15 → tigrbl_kernel-0.1.11.dev1}/tigrbl_kernel/trace.py +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tigrbl-kernel
|
|
3
|
+
Version: 0.1.11.dev1
|
|
4
|
+
Summary: Kernel orchestration for Tigrbl runtime composition.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Keywords: tigrbl,sdk,standards,framework
|
|
7
|
+
Author: Jacob Stewart
|
|
8
|
+
Author-email: jacob@swarmauri.com
|
|
9
|
+
Requires-Python: >=3.10,<3.14
|
|
10
|
+
Classifier: Development Status :: 1 - Planning
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Requires-Dist: tigrbl-atoms
|
|
19
|
+
Requires-Dist: tigrbl-core
|
|
20
|
+
Requires-Dist: tigrbl-typing
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# tigrbl_kernel
|
|
24
|
+
|
|
25
|
+
This file is a package-local distribution entry point.
|
|
26
|
+
It is not the authoritative location for repository governance, current target status, current state reporting, certification claims, or release evidence.
|
|
27
|
+
|
|
28
|
+
## Canonical repository docs
|
|
29
|
+
|
|
30
|
+
- `README.md`
|
|
31
|
+
- `docs/README.md`
|
|
32
|
+
- `docs/conformance/CURRENT_TARGET.md`
|
|
33
|
+
- `docs/conformance/CURRENT_STATE.md`
|
|
34
|
+
- `docs/conformance/NEXT_STEPS.md`
|
|
35
|
+
- `docs/governance/DOC_POINTERS.md`
|
|
36
|
+
- `docs/developer/PACKAGE_CATALOG.md`
|
|
37
|
+
- `docs/developer/PACKAGE_LAYOUT.md`
|
|
38
|
+
|
|
39
|
+
## Package identity
|
|
40
|
+
|
|
41
|
+
- workspace path: `pkgs/core/tigrbl_kernel`
|
|
42
|
+
- workspace class: core Python package
|
|
43
|
+
- implementation layout: `tigrbl_kernel/`
|
|
44
|
+
|
|
45
|
+
Long-form repository documentation is governed from `docs/`.
|
|
46
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# tigrbl_kernel
|
|
2
|
+
|
|
3
|
+
This file is a package-local distribution entry point.
|
|
4
|
+
It is not the authoritative location for repository governance, current target status, current state reporting, certification claims, or release evidence.
|
|
5
|
+
|
|
6
|
+
## Canonical repository docs
|
|
7
|
+
|
|
8
|
+
- `README.md`
|
|
9
|
+
- `docs/README.md`
|
|
10
|
+
- `docs/conformance/CURRENT_TARGET.md`
|
|
11
|
+
- `docs/conformance/CURRENT_STATE.md`
|
|
12
|
+
- `docs/conformance/NEXT_STEPS.md`
|
|
13
|
+
- `docs/governance/DOC_POINTERS.md`
|
|
14
|
+
- `docs/developer/PACKAGE_CATALOG.md`
|
|
15
|
+
- `docs/developer/PACKAGE_LAYOUT.md`
|
|
16
|
+
|
|
17
|
+
## Package identity
|
|
18
|
+
|
|
19
|
+
- workspace path: `pkgs/core/tigrbl_kernel`
|
|
20
|
+
- workspace class: core Python package
|
|
21
|
+
- implementation layout: `tigrbl_kernel/`
|
|
22
|
+
|
|
23
|
+
Long-form repository documentation is governed from `docs/`.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "tigrbl-kernel"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.11.dev1"
|
|
4
4
|
description = "Kernel orchestration for Tigrbl runtime composition."
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
repository = "http://github.com/swarmauri/swarmauri-sdk"
|
|
8
|
-
requires-python = ">=3.10,<3.
|
|
8
|
+
requires-python = ">=3.10,<3.14"
|
|
9
9
|
classifiers = [
|
|
10
|
-
"License :: OSI Approved :: Apache Software License",
|
|
11
10
|
"Development Status :: 1 - Planning",
|
|
12
11
|
"Programming Language :: Python :: 3.10",
|
|
13
12
|
"Programming Language :: Python :: 3.11",
|
|
14
13
|
"Programming Language :: Python :: 3.12",
|
|
14
|
+
"Programming Language :: Python :: 3.13",
|
|
15
15
|
"Programming Language :: Python",
|
|
16
16
|
"Programming Language :: Python :: 3",
|
|
17
17
|
"Programming Language :: Python :: 3 :: Only",
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from importlib import import_module
|
|
4
|
+
from typing import Any, Dict, List, Mapping
|
|
5
|
+
|
|
6
|
+
try: # pragma: no cover - additive optional integration
|
|
7
|
+
_runtime_rust = import_module("tigrbl_runtime.rust")
|
|
8
|
+
ExecutionBackend = _runtime_rust.ExecutionBackend
|
|
9
|
+
RustBackendConfig = _runtime_rust.RustBackendConfig
|
|
10
|
+
except Exception: # pragma: no cover
|
|
11
|
+
ExecutionBackend = RustBackendConfig = None
|
|
12
|
+
|
|
13
|
+
from .rust_compile import (
|
|
14
|
+
build_rust_kernel,
|
|
15
|
+
build_rust_parity_snapshot,
|
|
16
|
+
normalize_rust_spec,
|
|
17
|
+
)
|
|
18
|
+
from .rust_plan import RustPlan
|
|
19
|
+
|
|
20
|
+
_LAZY_EXPORTS = {
|
|
21
|
+
"Kernel": "core",
|
|
22
|
+
"OpView": "models",
|
|
23
|
+
"PackedKernel": "models",
|
|
24
|
+
"SchemaIn": "models",
|
|
25
|
+
"SchemaOut": "models",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
_default_kernel = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _kernel():
|
|
32
|
+
global _default_kernel
|
|
33
|
+
if _default_kernel is None:
|
|
34
|
+
kernel_cls = __getattr__("Kernel")
|
|
35
|
+
_default_kernel = kernel_cls()
|
|
36
|
+
return _default_kernel
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def __getattr__(name: str) -> Any:
|
|
40
|
+
module_name = _LAZY_EXPORTS.get(name)
|
|
41
|
+
if module_name is None:
|
|
42
|
+
raise AttributeError(name)
|
|
43
|
+
module = import_module(f"{__name__}.{module_name}")
|
|
44
|
+
value = getattr(module, name)
|
|
45
|
+
globals()[name] = value
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def get_cached_specs(model: type) -> Mapping[str, Any]:
|
|
50
|
+
return _kernel().get_specs(model)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def build_phase_chains(model: type, alias: str) -> Dict[str, List[Any]]:
|
|
54
|
+
return _kernel()._build_op(model, alias)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def build_kernel_plan(app: Any):
|
|
58
|
+
return _kernel().kernel_plan(app)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def build_packed_kernel(app: Any):
|
|
62
|
+
return _kernel().kernel_plan(app).packed
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def plan_labels(model: type, alias: str) -> list[str]:
|
|
66
|
+
return _kernel().plan_labels(model, alias)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
__all__ = [
|
|
70
|
+
"ExecutionBackend",
|
|
71
|
+
"Kernel",
|
|
72
|
+
"RustBackendConfig",
|
|
73
|
+
"RustPlan",
|
|
74
|
+
"OpView",
|
|
75
|
+
"PackedKernel",
|
|
76
|
+
"SchemaIn",
|
|
77
|
+
"SchemaOut",
|
|
78
|
+
"build_kernel_plan",
|
|
79
|
+
"build_rust_kernel",
|
|
80
|
+
"build_rust_parity_snapshot",
|
|
81
|
+
"build_packed_kernel",
|
|
82
|
+
"get_cached_specs",
|
|
83
|
+
"build_phase_chains",
|
|
84
|
+
"normalize_rust_spec",
|
|
85
|
+
"plan_labels",
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
_default_kernel = _kernel()
|
|
@@ -4,6 +4,7 @@ from dataclasses import replace
|
|
|
4
4
|
from typing import Any, Mapping
|
|
5
5
|
|
|
6
6
|
from tigrbl_atoms import StepFn
|
|
7
|
+
from tigrbl_core.config.constants import __JSONRPC_DEFAULT_ENDPOINT__
|
|
7
8
|
|
|
8
9
|
from . import events as _ev
|
|
9
10
|
from .models import KernelPlan, OpKey, OpMeta, OpView
|
|
@@ -33,6 +34,9 @@ def _compile_plan(self: Any, app: Any) -> KernelPlan:
|
|
|
33
34
|
from tigrbl_core._spec.binding_spec import (
|
|
34
35
|
HttpJsonRpcBindingSpec,
|
|
35
36
|
HttpRestBindingSpec,
|
|
37
|
+
HttpStreamBindingSpec,
|
|
38
|
+
SseBindingSpec,
|
|
39
|
+
WebTransportBindingSpec,
|
|
36
40
|
WsBindingSpec,
|
|
37
41
|
)
|
|
38
42
|
|
|
@@ -64,7 +68,10 @@ def _compile_plan(self: Any, app: Any) -> KernelPlan:
|
|
|
64
68
|
)
|
|
65
69
|
|
|
66
70
|
for binding in getattr(sp, "bindings", ()) or ():
|
|
67
|
-
if isinstance(
|
|
71
|
+
if isinstance(
|
|
72
|
+
binding,
|
|
73
|
+
(HttpRestBindingSpec, HttpStreamBindingSpec, SseBindingSpec),
|
|
74
|
+
):
|
|
68
75
|
bucket = route_data.setdefault(
|
|
69
76
|
binding.proto, {"exact": {}, "templated": []}
|
|
70
77
|
)
|
|
@@ -94,14 +101,29 @@ def _compile_plan(self: Any, app: Any) -> KernelPlan:
|
|
|
94
101
|
)
|
|
95
102
|
|
|
96
103
|
elif isinstance(binding, HttpJsonRpcBindingSpec):
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
104
|
+
endpoint = str(
|
|
105
|
+
getattr(binding, "endpoint", __JSONRPC_DEFAULT_ENDPOINT__)
|
|
106
|
+
or __JSONRPC_DEFAULT_ENDPOINT__
|
|
107
|
+
)
|
|
108
|
+
selector = f"{endpoint}:{binding.rpc_method}"
|
|
109
|
+
opkey_to_meta[OpKey(proto=binding.proto, selector=selector)] = (
|
|
101
110
|
meta_index
|
|
102
111
|
)
|
|
103
|
-
|
|
104
|
-
|
|
112
|
+
proto_bucket = route_data.setdefault(
|
|
113
|
+
binding.proto, {"endpoints": {}}
|
|
114
|
+
)
|
|
115
|
+
endpoint_bucket = proto_bucket.setdefault("endpoints", {}).setdefault(
|
|
116
|
+
endpoint, {}
|
|
117
|
+
)
|
|
118
|
+
proto_bucket[binding.rpc_method] = meta_index
|
|
119
|
+
endpoint_bucket[binding.rpc_method] = {
|
|
120
|
+
"meta_index": meta_index,
|
|
121
|
+
"selector": selector,
|
|
122
|
+
"rpc_method": binding.rpc_method,
|
|
123
|
+
"endpoint": endpoint,
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
elif isinstance(binding, (WsBindingSpec, WebTransportBindingSpec)):
|
|
105
127
|
bucket = route_data.setdefault(
|
|
106
128
|
binding.proto, {"exact": {}, "templated": []}
|
|
107
129
|
)
|
|
@@ -119,7 +141,9 @@ def _compile_plan(self: Any, app: Any) -> KernelPlan:
|
|
|
119
141
|
"names": names,
|
|
120
142
|
"meta_index": meta_index,
|
|
121
143
|
"selector": selector,
|
|
122
|
-
"subprotocols": tuple(
|
|
144
|
+
"subprotocols": tuple(
|
|
145
|
+
getattr(binding, "subprotocols", ()) or ()
|
|
146
|
+
),
|
|
123
147
|
}
|
|
124
148
|
)
|
|
125
149
|
else:
|
|
@@ -24,6 +24,7 @@ from .cache import _SpecsOnceCache, _WeakMaybeDict
|
|
|
24
24
|
from .models import KernelPlan, OpView
|
|
25
25
|
from .opview_compiler import compile_opview_from_specs
|
|
26
26
|
from .types import DEFAULT_PHASE_ORDER as _DEFAULT_PHASE_ORDER
|
|
27
|
+
from .rust_compile import build_rust_kernel as _build_rust_kernel
|
|
27
28
|
from .utils import (
|
|
28
29
|
_opspecs,
|
|
29
30
|
_table_iter,
|
|
@@ -43,16 +44,17 @@ class Kernel:
|
|
|
43
44
|
cls._instance = super().__new__(cls)
|
|
44
45
|
return cls._instance
|
|
45
46
|
|
|
46
|
-
def __init__(self, atoms: Optional[Sequence[_DiscoveredAtom]] = None):
|
|
47
|
+
def __init__(self, atoms: Optional[Sequence[_DiscoveredAtom]] = None, backend: str = "python"):
|
|
47
48
|
if atoms is None and getattr(self, "_singleton_initialized", False):
|
|
48
|
-
self._reset(atoms)
|
|
49
|
+
self._reset(atoms, backend=backend)
|
|
49
50
|
return
|
|
50
|
-
self._reset(atoms)
|
|
51
|
+
self._reset(atoms, backend=backend)
|
|
51
52
|
if atoms is None:
|
|
52
53
|
self._singleton_initialized = True
|
|
53
54
|
|
|
54
|
-
def _reset(self, atoms: Optional[Sequence[_DiscoveredAtom]] = None) -> None:
|
|
55
|
+
def _reset(self, atoms: Optional[Sequence[_DiscoveredAtom]] = None, backend: str = "python") -> None:
|
|
55
56
|
self._atoms_cache = list(atoms) if atoms else None
|
|
57
|
+
self.backend = backend
|
|
56
58
|
self._specs_cache = _SpecsOnceCache()
|
|
57
59
|
self._opviews = _WeakMaybeDict()
|
|
58
60
|
self._phase_chains = _WeakMaybeDict()
|
|
@@ -153,6 +155,9 @@ class Kernel:
|
|
|
153
155
|
return payload
|
|
154
156
|
return {}
|
|
155
157
|
|
|
158
|
+
def compile_rust_plan(self, app: Any):
|
|
159
|
+
return _build_rust_kernel(app)
|
|
160
|
+
|
|
156
161
|
def invalidate_kernelz_payload(self, app: Optional[Any] = None) -> None:
|
|
157
162
|
with self._lock:
|
|
158
163
|
if app is None:
|
|
@@ -5,6 +5,23 @@ from typing import Any, Dict, Mapping
|
|
|
5
5
|
from .models import OpView, SchemaIn, SchemaOut
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
def _storage_requires_input(storage: Any, alias: str) -> bool:
|
|
9
|
+
if storage is None or alias == "update":
|
|
10
|
+
return False
|
|
11
|
+
if bool(getattr(storage, "primary_key", False)):
|
|
12
|
+
if alias in {"replace", "delete"}:
|
|
13
|
+
return True
|
|
14
|
+
auto = getattr(storage, "autoincrement", False)
|
|
15
|
+
if auto not in (False, None) or getattr(storage, "identity", None) is not None:
|
|
16
|
+
return False
|
|
17
|
+
has_default = (
|
|
18
|
+
getattr(storage, "default", None) is not None
|
|
19
|
+
or getattr(storage, "server_default", None) is not None
|
|
20
|
+
or callable(getattr(storage, "default_factory", None))
|
|
21
|
+
)
|
|
22
|
+
return not bool(getattr(storage, "nullable", True)) and not has_default
|
|
23
|
+
|
|
24
|
+
|
|
8
25
|
def compile_opview_from_specs(specs: Mapping[str, Any], sp: Any) -> OpView:
|
|
9
26
|
"""Build a basic OpView from collected specs when no app/model is present."""
|
|
10
27
|
alias = getattr(sp, "alias", "")
|
|
@@ -38,7 +55,10 @@ def compile_opview_from_specs(specs: Mapping[str, Any], sp: Any) -> OpView:
|
|
|
38
55
|
meta["header_required_in"] = bool(
|
|
39
56
|
getattr(io, "header_required_in", False)
|
|
40
57
|
)
|
|
41
|
-
required = bool(
|
|
58
|
+
required = bool(
|
|
59
|
+
(fs and alias in getattr(fs, "required_in", ()))
|
|
60
|
+
or _storage_requires_input(storage, alias)
|
|
61
|
+
)
|
|
42
62
|
meta["required"] = required
|
|
43
63
|
base_nullable = (
|
|
44
64
|
True if storage is None else getattr(storage, "nullable", True)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from importlib import import_module
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from .rust_plan import RustPlan
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _runtime_rust_helpers():
|
|
9
|
+
rust = import_module("tigrbl_runtime.rust")
|
|
10
|
+
codec = import_module("tigrbl_runtime.rust.codec")
|
|
11
|
+
return (
|
|
12
|
+
rust.compile_app,
|
|
13
|
+
rust.rust_parity_snapshot,
|
|
14
|
+
rust.normalize_spec,
|
|
15
|
+
codec.build_rust_app_spec,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def build_rust_kernel(app: Any) -> RustPlan:
|
|
20
|
+
compile_app, rust_parity_snapshot, normalize_spec, build_rust_app_spec = (
|
|
21
|
+
_runtime_rust_helpers()
|
|
22
|
+
)
|
|
23
|
+
payload = build_rust_app_spec(app)
|
|
24
|
+
normalized = normalize_spec(payload)
|
|
25
|
+
compiled = compile_app(payload)
|
|
26
|
+
return RustPlan(
|
|
27
|
+
description=f"compiled rust KernelPlan for {compiled.get('app_name', payload['name'])}",
|
|
28
|
+
compiled_plan=compiled,
|
|
29
|
+
backend="rust",
|
|
30
|
+
normalized_spec=normalized,
|
|
31
|
+
parity_snapshot=rust_parity_snapshot(payload),
|
|
32
|
+
claimable=False,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def normalize_rust_spec(app: Any) -> str:
|
|
37
|
+
_, _, normalize_spec, build_rust_app_spec = _runtime_rust_helpers()
|
|
38
|
+
return normalize_spec(build_rust_app_spec(app))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def build_rust_parity_snapshot(app: Any) -> dict[str, object]:
|
|
42
|
+
_, rust_parity_snapshot, _, build_rust_app_spec = _runtime_rust_helpers()
|
|
43
|
+
return rust_parity_snapshot(build_rust_app_spec(app))
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@dataclass(slots=True)
|
|
8
|
+
class RustPlan:
|
|
9
|
+
description: str
|
|
10
|
+
compiled_plan: dict[str, Any] | None = None
|
|
11
|
+
backend: str = "rust"
|
|
12
|
+
normalized_spec: str | None = None
|
|
13
|
+
parity_snapshot: dict[str, Any] | None = None
|
|
14
|
+
claimable: bool = False
|
|
@@ -28,6 +28,18 @@ EFFECT_BY_ATOM_NAME = {
|
|
|
28
28
|
"sys.handler_bulk_replace": EFFECT_DB_WRITE,
|
|
29
29
|
"sys.handler_bulk_merge": EFFECT_DB_WRITE,
|
|
30
30
|
"sys.handler_bulk_delete": EFFECT_DB_WRITE,
|
|
31
|
+
"sys.handler_count": EFFECT_DB_READ,
|
|
32
|
+
"sys.handler_exists": EFFECT_DB_READ,
|
|
33
|
+
"sys.handler_aggregate": EFFECT_DB_READ,
|
|
34
|
+
"sys.handler_group_by": EFFECT_DB_READ,
|
|
35
|
+
"sys.handler_publish": EFFECT_WIRE,
|
|
36
|
+
"sys.handler_subscribe": EFFECT_WIRE,
|
|
37
|
+
"sys.handler_tail": EFFECT_WIRE,
|
|
38
|
+
"sys.handler_upload": EFFECT_WIRE,
|
|
39
|
+
"sys.handler_download": EFFECT_WIRE,
|
|
40
|
+
"sys.handler_append_chunk": EFFECT_WIRE,
|
|
41
|
+
"sys.handler_send_datagram": EFFECT_WIRE,
|
|
42
|
+
"sys.handler_checkpoint": EFFECT_WIRE,
|
|
31
43
|
"egress.to_transport_response": EFFECT_WIRE,
|
|
32
44
|
"egress.asgi_send": EFFECT_WIRE,
|
|
33
45
|
}
|
|
@@ -161,8 +161,8 @@ def _route_payload_template() -> dict[str, Any]:
|
|
|
161
161
|
return {
|
|
162
162
|
"http.rest": {"exact": {}, "templated": []},
|
|
163
163
|
"https.rest": {"exact": {}, "templated": []},
|
|
164
|
-
"http.jsonrpc": {},
|
|
165
|
-
"https.jsonrpc": {},
|
|
164
|
+
"http.jsonrpc": {"endpoints": {}},
|
|
165
|
+
"https.jsonrpc": {"endpoints": {}},
|
|
166
166
|
"ws": {"exact": {}, "templated": []},
|
|
167
167
|
"wss": {"exact": {}, "templated": []},
|
|
168
168
|
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: tigrbl-kernel
|
|
3
|
-
Version: 0.1.0.dev15
|
|
4
|
-
Summary: Kernel orchestration for Tigrbl runtime composition.
|
|
5
|
-
License-Expression: Apache-2.0
|
|
6
|
-
Keywords: tigrbl,sdk,standards,framework
|
|
7
|
-
Author: Jacob Stewart
|
|
8
|
-
Author-email: jacob@swarmauri.com
|
|
9
|
-
Requires-Python: >=3.10,<3.13
|
|
10
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
-
Classifier: Development Status :: 1 - Planning
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Classifier: Programming Language :: Python
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
Requires-Dist: tigrbl-atoms
|
|
19
|
-
Requires-Dist: tigrbl-core
|
|
20
|
-
Requires-Dist: tigrbl-typing
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
|
|
23
|
-

|
|
24
|
-
|
|
25
|
-
# tigrbl-kernel
|
|
26
|
-
|
|
27
|
-
    
|
|
28
|
-
|
|
29
|
-
## Features
|
|
30
|
-
|
|
31
|
-
- Modular package in the Tigrbl namespace.
|
|
32
|
-
- Supports Python 3.10 through 3.12.
|
|
33
|
-
- Distributed as part of the swarmauri-sdk workspace.
|
|
34
|
-
|
|
35
|
-
## Installation
|
|
36
|
-
|
|
37
|
-
### uv
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
uv add tigrbl-kernel
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### pip
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
pip install tigrbl-kernel
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Usage
|
|
50
|
-
|
|
51
|
-
Import from the shared package-specific module namespaces after installation in your environment.
|
|
52
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
# tigrbl-kernel
|
|
4
|
-
|
|
5
|
-
    
|
|
6
|
-
|
|
7
|
-
## Features
|
|
8
|
-
|
|
9
|
-
- Modular package in the Tigrbl namespace.
|
|
10
|
-
- Supports Python 3.10 through 3.12.
|
|
11
|
-
- Distributed as part of the swarmauri-sdk workspace.
|
|
12
|
-
|
|
13
|
-
## Installation
|
|
14
|
-
|
|
15
|
-
### uv
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
uv add tigrbl-kernel
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### pip
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
pip install tigrbl-kernel
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Usage
|
|
28
|
-
|
|
29
|
-
Import from the shared package-specific module namespaces after installation in your environment.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from typing import Any, Dict, List, Mapping
|
|
4
|
-
|
|
5
|
-
from tigrbl_atoms import StepFn
|
|
6
|
-
from .core import Kernel
|
|
7
|
-
from .models import OpView, PackedKernel, SchemaIn, SchemaOut
|
|
8
|
-
|
|
9
|
-
_default_kernel = Kernel()
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def get_cached_specs(model: type) -> Mapping[str, Any]:
|
|
13
|
-
return _default_kernel.get_specs(model)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def build_phase_chains(model: type, alias: str) -> Dict[str, List[StepFn]]:
|
|
17
|
-
return _default_kernel._build_op(model, alias)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def build_kernel_plan(app: Any):
|
|
21
|
-
return _default_kernel.kernel_plan(app)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def build_packed_kernel(app: Any) -> PackedKernel | None:
|
|
25
|
-
return _default_kernel.kernel_plan(app).packed
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def plan_labels(model: type, alias: str) -> list[str]:
|
|
29
|
-
return _default_kernel.plan_labels(model, alias)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
__all__ = [
|
|
33
|
-
"Kernel",
|
|
34
|
-
"OpView",
|
|
35
|
-
"PackedKernel",
|
|
36
|
-
"SchemaIn",
|
|
37
|
-
"SchemaOut",
|
|
38
|
-
"build_kernel_plan",
|
|
39
|
-
"build_packed_kernel",
|
|
40
|
-
"get_cached_specs",
|
|
41
|
-
"_default_kernel",
|
|
42
|
-
"build_phase_chains",
|
|
43
|
-
"plan_labels",
|
|
44
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|