from typing import Protocol

from bussdcc.device import DeviceProtocol
from bussdcc.context import ContextProtocol


class RuntimeProtocol(Protocol):
    ctx: ContextProtocol

    @property
    def booted(self) -> bool: ...

    def attach_device(self, device: DeviceProtocol) -> None: ...
    def detach_device(self, id: str) -> None: ...
    def get_device(self, id: str) -> DeviceProtocol | None: ...
    def list_devices(self, *, kind: str | None = None) -> list[DeviceProtocol]: ...
