-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel.go
More file actions
139 lines (116 loc) · 2.49 KB
/
model.go
File metadata and controls
139 lines (116 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
package mcp
import "github.com/tinywasm/fmt"
// ormc:formonly
type rpcRequest struct {
JSONRPC string
ID string
Method string
Params string
}
// ormc:formonly
type rpcResponse struct {
JSONRPC string
ID string
Result fmt.RawJSON
Error string
}
// ormc:formonly
type jsonRPCError struct {
Code int64
Message string
Data string
}
// ormc:formonly
type initializeParams struct {
ProtocolVersion string `json:"protocolVersion"`
ClientInfo implementationInfo `json:"clientInfo"`
}
// ormc:formonly
type implementationInfo struct {
Name string
Version string
}
// ormc:formonly
type initializeResult struct {
ProtocolVersion string `json:"protocolVersion"`
ServerInfo implementationInfo `json:"serverInfo"`
Capabilities fmt.RawJSON
}
// ormc:formonly
type CallToolParams struct {
Name string
Arguments string `json:",omitempty"`
}
// ormc:formonly
type Result struct {
IsError bool `json:"isError,omitempty"`
Content fmt.RawJSON
}
// ormc:formonly
type TextContent struct {
Type string
Text string
}
// ormc:formonly
type toolEntry struct {
Name string
Description string `json:",omitempty"`
InputSchema string `json:"inputSchema,omitempty"`
}
// ormc:formonly
type listToolsResult struct {
Tools fmt.RawJSON
NextCursor string `json:"nextCursor,omitempty"`
}
// ormc:formonly
type errorResponse struct {
JSONRPC string
ID string `json:",omitempty"`
Error jsonRPCError
}
// ormc:formonly
type Meta struct {
ProgressToken string `json:"progressToken,omitempty"`
}
// ormc:formonly
type NotificationParams struct {
Meta string `json:",omitempty"`
}
// ormc:formonly
type EmptyResult struct {
Result string `json:",omitempty"`
}
// ormc:formonly
type JSONRPCRequest struct {
JSONRPC string
ID RequestId
Method string
Params string `json:",omitempty"`
}
// ormc:formonly
type JSONRPCNotification struct {
JSONRPC string
Method string
Params string `json:",omitempty"`
}
// ormc:formonly
type JSONRPCResponseStruct struct {
JSONRPC string
ID string
Result fmt.RawJSON `json:",omitempty"`
Error fmt.RawJSON `json:",omitempty"`
}
func (r *JSONRPCResponseStruct) jsonrpcMessage() {}
// ormc:formonly
type JSONRPCError struct {
JSONRPC string
ID string `json:",omitempty"`
Error fmt.RawJSON `json:",omitempty"`
}
func (e *JSONRPCError) jsonrpcMessage() {}
// ormc:formonly
type JSONRPCErrorDetails struct {
Code int64
Message string
Data string `json:",omitempty"`
}