Source code for ralph.mcp.protocol._session_bridge_like
"""SessionBridgeLike Protocol for MCP session bridge abstraction."""
from __future__ import annotations
from typing import Protocol
[docs]
class SessionBridgeLike(Protocol):
"""Protocol describing the session bridge interface used here."""
[docs]
def start(self) -> None:
"""Start accepting MCP connections."""
...
[docs]
def agent_endpoint_uri(self) -> str:
"""Return the agent-facing endpoint URI."""
...
[docs]
def endpoint_uri(self) -> str:
"""Return the raw endpoint URI used for transport-level preflight."""
...
[docs]
def shutdown(self) -> None:
"""Shut down the bridge."""
...
__all__ = ["SessionBridgeLike"]