INNER CODE UNIT · Python
__init__
caiovicentino/polymarket-mcp-server · src/polymarket_mcp/server.py:167
def __init__(
self,
read_stream: MemoryObjectReceiveStream[Union[SessionMessage, Exception]],
write_stream: MemoryObjectSendStream[SessionMessage],
) -> None:
self._read_stream = read_stream
self._write_stream = write_stream
self._iterator: Any = None
# Sessionless serving bridge (2026-07-28 model): set once the synthetic
# ``notifications/initialized`` has been queued for this session, so a
# later real initialize still runs its full negotiation path.
self._sessionless_bridge_installed = False
# A request stashed while its synthetic-initialized bridge is emitted
# first (see _intercept); delivered on the following __anext__ call.
self._queued_message: Optional[SessionMessage] = None
# Serve the declared revisions at handshake time (see discover.py).
ensure_sdk_supports_declared_revisions()