23 lines
533 B
Go
23 lines
533 B
Go
package toolsrv
|
|
|
|
import "encoding/json"
|
|
|
|
// RPCRequest is a JSON-RPC 2.0 request.
|
|
type RPCRequest struct {
|
|
JSONRPC string `json:"jsonrpc"`
|
|
ID json.RawMessage `json:"id"`
|
|
Method string `json:"method"`
|
|
Params json.RawMessage `json:"params,omitempty"`
|
|
}
|
|
|
|
// RPCError is a JSON-RPC 2.0 error object.
|
|
type RPCError struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
// OutputNotification carries streamed tool output data.
|
|
type OutputNotification struct {
|
|
Data string `json:"data"`
|
|
}
|