@mcp-z/cli
    Preparing search index...

    Function protocolToVersionNegotiation

    • Map a --protocol value to the SDK's version-negotiation option.

      • undefined (flag absent) → undefined: the client connects with its default, the plain 2025-era sequence.
      • legacy → skip negotiation, plain 2025 connect.
      • auto → probe the server first and fall back to 2025 when it cannot serve the modern revision.
      • 2026-07-28 → require that revision; a server that cannot serve it fails the connect with a typed era-negotiation error (see eraNegotiationError).

      Parameters

      • protocol: string | undefined

      Returns VersionNegotiationOptions | undefined

      Error for any value not in PROTOCOL_VALUES, naming the accepted ones.