Make the per-version wire packages private (mcp_types._v*) (#3191)
This commit is contained in:
parent
45f2a88a9a
commit
b9422f1c9b
6 changed files with 133 additions and 127 deletions
|
|
@ -3,7 +3,7 @@
|
|||
One model per protocol construct, carrying every field from every supported
|
||||
protocol version, so application code sees a single set of types regardless of
|
||||
the negotiated version. Per-field docstrings note version availability. The
|
||||
`mcp_types.v*` surface packages carry the schema-exact wire shapes.
|
||||
`mcp_types._v*` surface packages carry the schema-exact wire shapes.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
|
|||
3526
src/mcp-types/mcp_types/_v2025_11_25/__init__.py
Normal file
3526
src/mcp-types/mcp_types/_v2025_11_25/__init__.py
Normal file
File diff suppressed because it is too large
Load diff
3746
src/mcp-types/mcp_types/_v2026_07_28/__init__.py
Normal file
3746
src/mcp-types/mcp_types/_v2026_07_28/__init__.py
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,4 @@
|
|||
"""Shared pydantic base for the generated `mcp_types.v*` wire-shape packages."""
|
||||
"""Shared pydantic base for the generated `mcp_types._v*` wire-shape packages."""
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"""Per-version method maps and parse/serialize functions for MCP traffic.
|
||||
|
||||
This module is supported public API; the `mcp_types.v*` packages it draws on
|
||||
This module is supported public API; the `mcp_types._v*` packages it draws on
|
||||
are internal validators and not for direct import.
|
||||
|
||||
Surface maps key `(method, version)` to per-version wire types (key absence is
|
||||
|
|
@ -18,8 +18,8 @@ from typing import Any, Final, Literal, TypeGuard, TypeVar, cast, get_args
|
|||
from pydantic import BaseModel, TypeAdapter
|
||||
|
||||
import mcp_types as types
|
||||
import mcp_types.v2025_11_25 as v2025
|
||||
import mcp_types.v2026_07_28 as v2026
|
||||
import mcp_types._v2025_11_25 as v2025
|
||||
import mcp_types._v2026_07_28 as v2026
|
||||
from mcp_types.version import KNOWN_PROTOCOL_VERSIONS
|
||||
|
||||
__all__ = [
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from typing import Any, Generic, Literal, TypeVar
|
|||
from mcp_types import RequestId
|
||||
|
||||
# Internal surface package; imported as the gate's source of truth for spec-valid property schemas.
|
||||
from mcp_types.v2025_11_25 import PrimitiveSchemaDefinition
|
||||
from mcp_types._v2025_11_25 import PrimitiveSchemaDefinition
|
||||
from pydantic import BaseModel, ValidationError
|
||||
from pydantic.json_schema import GenerateJsonSchema, JsonSchemaValue
|
||||
from pydantic_core import core_schema
|
||||
|
|
|
|||
Loading…
Reference in a new issue