mcp: export Event (#145)
Export the Event type in preparation for providing user-definable storage for resumable streams. Also, move event code to a separate file. This PR is just renaming and code motion.
This commit is contained in:
parent
3bbe74f8a5
commit
a519c182e8
1 changed files with 256 additions and 227 deletions
|
|
@ -520,7 +520,7 @@ func streamingRequest(ctx context.Context, serverURL, sessionID, method string,
|
|||
}
|
||||
// TODO(rfindley): do we need to check evt.name?
|
||||
// Does the MCP spec say anything about this?
|
||||
msg, err := jsonrpc2.DecodeMessage(evt.data)
|
||||
msg, err := jsonrpc2.DecodeMessage(evt.Data)
|
||||
if err != nil {
|
||||
return newSessionID, resp.StatusCode, fmt.Errorf("decoding message: %w", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue