You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

entities.py 608B

12345678910111213141516171819
  1. from dataclasses import dataclass
  2. from typing import Any, Generic, TypeVar
  3. from core.mcp.session.base_session import BaseSession
  4. from core.mcp.types import LATEST_PROTOCOL_VERSION, RequestId, RequestParams
  5. SUPPORTED_PROTOCOL_VERSIONS: list[str] = ["2024-11-05", LATEST_PROTOCOL_VERSION]
  6. SessionT = TypeVar("SessionT", bound=BaseSession[Any, Any, Any, Any, Any])
  7. LifespanContextT = TypeVar("LifespanContextT")
  8. @dataclass
  9. class RequestContext(Generic[SessionT, LifespanContextT]):
  10. request_id: RequestId
  11. meta: RequestParams.Meta | None
  12. session: SessionT
  13. lifespan_context: LifespanContextT