"""AgentTransport - A2A ready abstraction."""
from __future__ import annotations

from typing import Any, Protocol, runtime_checkable


@runtime_checkable
class AgentTransport(Protocol):
    """Transport pro agent-to-agent komunikaci."""

    async def send(self, agent_id: str, message: dict[str, Any]) -> dict[str, Any]:
        ...

    async def discover(self, agent_id: str) -> dict[str, Any] | None:
        ...


@runtime_checkable
class AgentProtocolProvider(Protocol):
    """Provider pro A2A nebo jiny agent-to-agent protokol."""

    @property
    def protocol_name(self) -> str:
        ...

    def create_transport(self, config: dict[str, Any]) -> AgentTransport:
        ...
