Documentation
¶
Index ¶
- func AttachContextOrStderr(ctx context.Context, err error, stderr *StderrBuffer) error
- func AttachNotifications(result map[string]any, notifications []RPCEnvelope)
- func AttachStderr(err error, stderr *StderrBuffer) error
- func IDMatches(value any, want int) bool
- func RunCallTool(options Options, name string, arguments map[string]any) (map[string]any, error)
- func RunListTools(options Options) (map[string]any, error)
- func RunRequest(options Options, method string, params map[string]any) (map[string]any, error)
- func WriteNotification(writer io.Writer, method string, params any) error
- func WriteRequest(writer io.Writer, id int, method string, params any) error
- type Options
- type ProcessHooks
- type RPCEnvelope
- type RPCError
- type StderrBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachContextOrStderr ¶
func AttachContextOrStderr(ctx context.Context, err error, stderr *StderrBuffer) error
func AttachNotifications ¶
func AttachNotifications(result map[string]any, notifications []RPCEnvelope)
func AttachStderr ¶
func AttachStderr(err error, stderr *StderrBuffer) error
func RunCallTool ¶
func RunRequest ¶
Types ¶
type ProcessHooks ¶
type RPCEnvelope ¶
type RPCEnvelope struct {
JSONRPC string `json:"jsonrpc,omitempty"`
ID any `json:"id,omitempty"`
Method string `json:"method,omitempty"`
Params any `json:"params,omitempty"`
Result json.RawMessage `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
}
func ReadResponse ¶
type StderrBuffer ¶
type StderrBuffer struct {
// contains filtered or unexported fields
}
func (*StderrBuffer) String ¶
func (b *StderrBuffer) String() string
Click to show internal directories.
Click to hide internal directories.