jsonrpc: package with JSON-RPC symbols (#117)
Move the aliases to the internal/jsonrpc2 package into their own package. Fixes #115.
This commit is contained in:
parent
2c577e564b
commit
bfa5e30cd1
1 changed files with 112 additions and 95 deletions
|
|
@ -13,6 +13,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/modelcontextprotocol/go-sdk/internal/jsonrpc2"
|
||||
"github.com/modelcontextprotocol/go-sdk/jsonrpc"
|
||||
)
|
||||
|
||||
// A Client is an MCP client, which may be connected to an MCP server
|
||||
|
|
@ -301,7 +302,7 @@ func (cs *ClientSession) receivingMethodInfos() map[string]methodInfo {
|
|||
return clientMethodInfos
|
||||
}
|
||||
|
||||
func (cs *ClientSession) handle(ctx context.Context, req *JSONRPCRequest) (any, error) {
|
||||
func (cs *ClientSession) handle(ctx context.Context, req *jsonrpc.Request) (any, error) {
|
||||
return handleReceive(ctx, cs, req)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue