"""Channel adapter contracts for gateway-facing integrations."""

from __future__ import annotations

from typing import Protocol

from beaver.foundation.events import MessageBus, OutboundMessage


class ChannelAdapter(Protocol):
    """Minimal contract every gateway channel must implement."""

    name: str
    bus: MessageBus

    async def start(self) -> None:
        """Prepare the channel before messages are routed."""

    async def stop(self) -> None:
        """Stop accepting/routing channel messages."""

    async def send(self, message: OutboundMessage) -> None:
        """Deliver an outbound message to the concrete channel."""

