"""C7 Inference Runtime — Public API (AZ-297).

Per ``inference_runtime_protocol.md`` v1.0.0 the public surface
consists of:

- :class:`InferenceRuntime` Protocol (6 methods).
- DTOs: :class:`BuildConfig`, :class:`EngineCacheEntry`,
  :class:`EngineHandle` (opaque marker), :class:`OptimizationProfile`,
  :class:`PrecisionMode` enum.
- :class:`ThermalState` re-exported from
  :mod:`gps_denied_onboard._types.thermal` (its canonical home for
  C4 forward-compatibility).
- Error family rooted at :class:`RuntimeError`; nine documented subtypes.
- Config block :class:`C7InferenceConfig` (registered on import).

Concrete strategies (``TensorrtRuntime``, ``OnnxTrtEpRuntime``,
``PytorchFp16Runtime``) live in sibling modules and are imported
lazily by :mod:`gps_denied_onboard.runtime_root.inference_factory` —
Risk-2 mitigation: this ``__init__.py`` MUST NOT import any concrete
strategy module.
"""

from gps_denied_onboard._types.inference import (
    BuildConfig,
    EngineCacheEntry,
    EngineHandle,
    OptimizationProfile,
    PrecisionMode,
)
from gps_denied_onboard._types.thermal import ThermalState
from gps_denied_onboard.components.c7_inference.architecture_registry import (
    ArchitectureFactory,
    default_registry,
    register_architecture,
)
from gps_denied_onboard.components.c7_inference.config import C7InferenceConfig
from gps_denied_onboard.components.c7_inference.engine_gate import (
    EngineGate,
    HostTuple,
)
from gps_denied_onboard.components.c7_inference.errors import (
    CalibrationCacheError,
    EngineBuildError,
    EngineDeserializeError,
    EngineHashMismatchError,
    EngineSchemaMismatchError,
    EngineSidecarMissingError,
    InferenceError,
    OutOfMemoryError,
    RuntimeError,
    TelemetryUnavailableError,
)
from gps_denied_onboard.components.c7_inference.interface import InferenceRuntime
from gps_denied_onboard.components.c7_inference.manifest import (
    DeploymentManifest,
    ManifestReader,
    ManifestReaderProtocol,
)
from gps_denied_onboard.components.c7_inference.thermal_publisher import (
    ThermalReading,
    ThermalSource,
    ThermalStatePublisher,
)
from gps_denied_onboard.config.schema import register_component_block

register_component_block("c7_inference", C7InferenceConfig)

__all__ = [
    "ArchitectureFactory",
    "BuildConfig",
    "C7InferenceConfig",
    "CalibrationCacheError",
    "DeploymentManifest",
    "EngineBuildError",
    "EngineCacheEntry",
    "EngineDeserializeError",
    "EngineGate",
    "EngineHandle",
    "EngineHashMismatchError",
    "EngineSchemaMismatchError",
    "EngineSidecarMissingError",
    "HostTuple",
    "InferenceError",
    "InferenceRuntime",
    "ManifestReader",
    "ManifestReaderProtocol",
    "OptimizationProfile",
    "OutOfMemoryError",
    "PrecisionMode",
    "RuntimeError",
    "TelemetryUnavailableError",
    "ThermalReading",
    "ThermalSource",
    "ThermalState",
    "ThermalStatePublisher",
    "default_registry",
    "register_architecture",
]
