Revert "refactor: reorganize message handling for better type safety and clar…" (#282)
Some checks failed
Main branch checks / checks (push) Has been cancelled
Some checks failed
Main branch checks / checks (push) Has been cancelled
This reverts commit 9d0f2daddb.
This commit is contained in:
parent
ebb81d3b2b
commit
7196604468
1 changed files with 151 additions and 283 deletions
|
|
@ -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__(
|
||||
|
|
|
|||
Loading…
Reference in a new issue