Spaces:
Sleeping
Sleeping
File size: 1,365 Bytes
76af1af 31226fd 76af1af 31226fd 76af1af 31226fd 76af1af 31226fd 76af1af | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | """Runtime contracts and lazily loaded control primitives for MHRN.
The package root deliberately avoids importing control eagerly. Canonical
low-level modules such as src.runtime.determinism must remain usable without
importing Playground-facing runtime controllers and creating circular imports.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
from .backend import (
BackendCapabilities,
BackendState,
ExecutionBackend,
LiveInputExecutionBackend,
RunResult,
StepResult,
)
from .modes import ObservabilityProfile, StateMode, validate_modes
if TYPE_CHECKING:
from .control import (
ControlCommand,
ControlMode,
ControlSnapshot,
RuntimeController,
)
__all__ = [
"BackendCapabilities",
"BackendState",
"ExecutionBackend",
"LiveInputExecutionBackend",
"RunResult",
"StepResult",
"ControlCommand",
"ControlMode",
"ControlSnapshot",
"RuntimeController",
"ObservabilityProfile",
"StateMode",
"validate_modes",
]
def __getattr__(name: str) -> object:
if name in {
"ControlCommand",
"ControlMode",
"ControlSnapshot",
"RuntimeController",
}:
from . import control
return getattr(control, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|