from abc import ABC, abstractmethod

from deconvolute.observability.models import AccessEvent, DiscoveryEvent


class ObservabilityBackend(ABC):
    """
    Abstract base class for observability backends.

    A backend is responsible for persisting or transmitting telemetry events
    generated by the SDK.
    """

    @abstractmethod
    async def log_discovery(self, event: DiscoveryEvent) -> None:
        """
        Log a tool discovery event.

        Args:
            event: The fully constructed DiscoveryEvent model.
        """
        pass

    @abstractmethod
    async def log_access(self, event: AccessEvent) -> None:
        """
        Log a tool execution event.

        Args:
            event: The fully constructed AccessEvent model.
        """
        pass
