Compare commits
1 Commits
v1.26.9-gitcaddy
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bd0a95e9f |
@@ -109,3 +109,7 @@ func UnmarshalHandleDoubleEncode(bs []byte, v any) error {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// RawMessage is a raw encoded JSON value.
|
||||
// It implements Marshaler and Unmarshaler and can be used to delay JSON decoding.
|
||||
type RawMessage = json.RawMessage
|
||||
|
||||
@@ -22,16 +22,13 @@ import (
|
||||
"code.gitea.io/gitea/services/context"
|
||||
)
|
||||
|
||||
// RawMessage is a raw encoded JSON value (equivalent to encoding/json.RawMessage)
|
||||
type RawMessage []byte
|
||||
|
||||
// MCP Protocol Types (JSON-RPC 2.0)
|
||||
|
||||
type MCPRequest struct {
|
||||
JSONRPC string `json:"jsonrpc"`
|
||||
ID any `json:"id"`
|
||||
Method string `json:"method"`
|
||||
Params RawMessage `json:"params,omitempty"`
|
||||
JSONRPC string `json:"jsonrpc"`
|
||||
ID any `json:"id"`
|
||||
Method string `json:"method"`
|
||||
Params json.RawMessage `json:"params,omitempty"`
|
||||
}
|
||||
|
||||
type MCPResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user