Return a specific server session instance of request context

We currently return a generic instance of RequestContext without
a specialization on the Session type. This makes it impossible
for servers to typesafe call `list_roots()` and other methods.

We now return a specific instance of `RequestContext[ServerSession]`
This commit is contained in:
David Soria Parra
2024-11-11 21:04:44 +00:00
parent 99c402d575
commit 1177a11910
2 changed files with 4 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ async def sse_client(
case "message":
try:
message = types.JSONRPCMessage.model_validate_json( # noqa: E501
message = types.JSONRPCMessage.model_validate_json( # noqa: E501
sse.data
)
logger.debug(