Skip to content

Commit ae8f869

Browse files
authored
Merge branch 'master' into bbdx/add-json-and-toml-serialization-methods/2026-03-05
2 parents 8c6de43 + 2d1ff23 commit ae8f869

16 files changed

Lines changed: 1218 additions & 1235 deletions

File tree

pkgs/standards/tigrbl/tigrbl/hook/types.py

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,10 @@
22

33
from __future__ import annotations
44

5-
from enum import Enum
6-
from typing import Any, Awaitable, Callable, Literal, Tuple
5+
from typing import Any, Awaitable, Callable
76

7+
from tigrbl_typing.phases import PHASE, HOOK_PHASES as PHASES, HookPhase
88

9-
class PHASE(str, Enum):
10-
PRE_TX_BEGIN = "PRE_TX_BEGIN"
11-
START_TX = "START_TX"
12-
PRE_HANDLER = "PRE_HANDLER"
13-
HANDLER = "HANDLER"
14-
POST_HANDLER = "POST_HANDLER"
15-
PRE_COMMIT = "PRE_COMMIT"
16-
END_TX = "END_TX"
17-
POST_COMMIT = "POST_COMMIT"
18-
POST_RESPONSE = "POST_RESPONSE"
19-
ON_ERROR = "ON_ERROR"
20-
ON_PRE_TX_BEGIN_ERROR = "ON_PRE_TX_BEGIN_ERROR"
21-
ON_START_TX_ERROR = "ON_START_TX_ERROR"
22-
ON_PRE_HANDLER_ERROR = "ON_PRE_HANDLER_ERROR"
23-
ON_HANDLER_ERROR = "ON_HANDLER_ERROR"
24-
ON_POST_HANDLER_ERROR = "ON_POST_HANDLER_ERROR"
25-
ON_PRE_COMMIT_ERROR = "ON_PRE_COMMIT_ERROR"
26-
ON_END_TX_ERROR = "ON_END_TX_ERROR"
27-
ON_POST_COMMIT_ERROR = "ON_POST_COMMIT_ERROR"
28-
ON_POST_RESPONSE_ERROR = "ON_POST_RESPONSE_ERROR"
29-
ON_ROLLBACK = "ON_ROLLBACK"
30-
31-
32-
HookPhase = Literal[
33-
"PRE_TX_BEGIN",
34-
"START_TX",
35-
"PRE_HANDLER",
36-
"HANDLER",
37-
"POST_HANDLER",
38-
"PRE_COMMIT",
39-
"END_TX",
40-
"POST_COMMIT",
41-
"POST_RESPONSE",
42-
"ON_ERROR",
43-
"ON_PRE_TX_BEGIN_ERROR",
44-
"ON_START_TX_ERROR",
45-
"ON_PRE_HANDLER_ERROR",
46-
"ON_HANDLER_ERROR",
47-
"ON_POST_HANDLER_ERROR",
48-
"ON_PRE_COMMIT_ERROR",
49-
"ON_END_TX_ERROR",
50-
"ON_POST_COMMIT_ERROR",
51-
"ON_POST_RESPONSE_ERROR",
52-
"ON_ROLLBACK",
53-
]
54-
55-
PHASES: Tuple[HookPhase, ...] = tuple(p.value for p in PHASE)
569
Ctx = Any
5710
StepFn = Callable[[Ctx], Awaitable[Any] | Any]
5811
HookPredicate = Callable[[Any], bool]

pkgs/standards/tigrbl_kernel/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ classifiers = [
1818
]
1919
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
2020
dependencies = [
21+
"tigrbl-typing",
2122
"tigrbl-atoms",
2223
"tigrbl-canon",
2324
]
2425
keywords = ["tigrbl", "sdk", "standards", "framework"]
2526

2627
[tool.uv.sources]
28+
"tigrbl-typing" = { workspace = true }
2729
"tigrbl-atoms" = { workspace = true }
2830
"tigrbl-canon" = { workspace = true }
2931

pkgs/standards/tigrbl_kernel/tigrbl_kernel/kernel/atoms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020
from tigrbl_runtime.hook_types import PHASES as HOOK_PHASES
2121
from tigrbl_runtime.hook_types import StepFn
22-
from tigrbl_runtime import events as _ev, ordering as _ordering, system as _sys
22+
from . import events as _ev, ordering as _ordering
23+
from tigrbl_runtime import system as _sys
2324

2425
logger = logging.getLogger(__name__)
2526

pkgs/standards/tigrbl_kernel/tigrbl_kernel/kernel/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from tigrbl_runtime.hook_types import StepFn
1010
from tigrbl_runtime.executor import _Ctx, _invoke
11-
from tigrbl_runtime import events as _ev
11+
from . import events as _ev
1212
from .atoms import (
1313
_DiscoveredAtom,
1414
_discover_atoms,
@@ -21,7 +21,7 @@
2121
)
2222
from .cache import _SpecsOnceCache, _WeakMaybeDict
2323
from .models import KernelPlan, OpKey, OpMeta, OpView
24-
from tigrbl_runtime.labels import label_hook
24+
from .labels import label_hook
2525
from .opview_compiler import compile_opview_from_specs
2626

2727
logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)