mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 23:04:25 +01:00
Revert "refactor: reorganize message handling for better type safety and clar…" (#282)
This reverts commit 9d0f2daddb.
This commit is contained in:
committed by
GitHub
parent
ebb81d3b2b
commit
7196604468
@@ -42,15 +42,14 @@ from typing import Any, TypeVar
|
||||
|
||||
import anyio
|
||||
import anyio.lowlevel
|
||||
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream
|
||||
from pydantic import AnyUrl
|
||||
|
||||
import mcp.types as types
|
||||
from mcp.server.models import InitializationOptions
|
||||
from mcp.shared.session import (
|
||||
BaseSession,
|
||||
ReadStream,
|
||||
RequestResponder,
|
||||
WriteStream,
|
||||
)
|
||||
|
||||
|
||||
@@ -77,8 +76,8 @@ class ServerSession(
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
read_stream: ReadStream,
|
||||
write_stream: WriteStream,
|
||||
read_stream: MemoryObjectReceiveStream[types.JSONRPCMessage | Exception],
|
||||
write_stream: MemoryObjectSendStream[types.JSONRPCMessage],
|
||||
init_options: InitializationOptions,
|
||||
) -> None:
|
||||
super().__init__(
|
||||
|
||||
Reference in New Issue
Block a user