Add mcp.types as a permanent alias for mcp_types (#3190)
This commit is contained in:
parent
923341c98a
commit
b7c9a916d6
2 changed files with 467 additions and 364 deletions
|
|
@ -6,6 +6,29 @@ from typing import Annotated, Any, Final, Literal
|
|||
|
||||
from pydantic import BaseModel, Field, TypeAdapter
|
||||
|
||||
__all__ = [
|
||||
"CONNECTION_CLOSED",
|
||||
"HEADER_MISMATCH",
|
||||
"INTERNAL_ERROR",
|
||||
"INVALID_PARAMS",
|
||||
"INVALID_REQUEST",
|
||||
"JSONRPC_VERSION",
|
||||
"METHOD_NOT_FOUND",
|
||||
"MISSING_REQUIRED_CLIENT_CAPABILITY",
|
||||
"PARSE_ERROR",
|
||||
"REQUEST_TIMEOUT",
|
||||
"UNSUPPORTED_PROTOCOL_VERSION",
|
||||
"URL_ELICITATION_REQUIRED",
|
||||
"ErrorData",
|
||||
"JSONRPCError",
|
||||
"JSONRPCMessage",
|
||||
"JSONRPCNotification",
|
||||
"JSONRPCRequest",
|
||||
"JSONRPCResponse",
|
||||
"RequestId",
|
||||
"jsonrpc_message_adapter",
|
||||
]
|
||||
|
||||
RequestId = Annotated[int, Field(strict=True)] | str
|
||||
"""The ID of a JSON-RPC request."""
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,18 @@ ordering questions go through KNOWN_PROTOCOL_VERSIONS.
|
|||
|
||||
from typing import Final
|
||||
|
||||
__all__ = [
|
||||
"KNOWN_PROTOCOL_VERSIONS",
|
||||
"HANDSHAKE_PROTOCOL_VERSIONS",
|
||||
"MODERN_PROTOCOL_VERSIONS",
|
||||
"SUPPORTED_PROTOCOL_VERSIONS",
|
||||
"LATEST_PROTOCOL_VERSION",
|
||||
"LATEST_HANDSHAKE_VERSION",
|
||||
"LATEST_MODERN_VERSION",
|
||||
"OLDEST_SUPPORTED_VERSION",
|
||||
"is_version_at_least",
|
||||
]
|
||||
|
||||
KNOWN_PROTOCOL_VERSIONS: Final[tuple[str, ...]] = (
|
||||
"2024-11-05",
|
||||
"2025-03-26",
|
||||
|
|
|
|||
Loading…
Reference in a new issue