Codec

ch.linkyard.mcp.protocol.Codec
object Codec

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Codec.type

Members list

Value members

Concrete methods

def encodeClientNotification(notification: ClientNotification): Notification
def encodeClientRequest(id: RequestId, request: ClientRequest): Request
def encodeResponse(id: RequestId, response: ServerResponse | ClientResponse): Response
def encodeServerNotification(notification: ServerNotification): Notification
def encodeServerRequest(id: RequestId, request: ServerRequest): Request
def fromJsonRpc(jsonRpcRequest: Request): Either[DecodingFailure, (RequestId, Request)]

Convert a JsonRpc.Request to protocol Request based on the method field

Convert a JsonRpc.Request to protocol Request based on the method field

Attributes

def fromJsonRpc[A <: McpResponse : Decoder](jsonRpcResponse: Response): Either[DecodingFailure, A]

Convert a JsonRpc.Response to a specific protocol Response type

Convert a JsonRpc.Response to a specific protocol Response type

Attributes

def fromJsonRpc(jsonRpcNotification: Notification): Either[DecodingFailure, Notification]

Convert a JsonRpc.Notification to protocol Notification based on the method field

Convert a JsonRpc.Notification to protocol Notification based on the method field

Attributes

Extensions

Extensions

extension (id: Id)
extension (id: RequestId)
def toJsonRpc: Id