mcp: improvements for 'stateless' streamable servers; 'distributed' mode
Several improvements for the stateless streamable mode, plus support for a 'distributed' (or rather, distributable) version of the stateless server. - Add a 'Stateless' option to StreamableHTTPOptions and StreamableServerTransport, which controls stateless behavior. GetSessionID may still return a non-empty session ID. - Audit validation of stateless mode to allow requests with a session id. Propagate this session ID to the temporary connection. - Peek at requests to allow 'initialize' requests to go through to the session, so that version negotiation can occur (FIXME: add tests). Fixes #284 For #148
This commit is contained in:
parent
0eb03e0d76
commit
98e67fdf62
1 changed files with 203 additions and 37 deletions
|
|
@ -40,8 +40,8 @@ type Transport interface {
|
|||
type Connection interface {
|
||||
// Read reads the next message to process off the connection.
|
||||
//
|
||||
// Read need not be safe for concurrent use: Read is called in a
|
||||
// concurrency-safe manner by the JSON-RPC library.
|
||||
// Connections must allow Read to be called concurrently with Close. In
|
||||
// particular, calling Close should unblock a Read waiting for input.
|
||||
Read(context.Context) (jsonrpc.Message, error)
|
||||
|
||||
// Write writes a new message to the connection.
|
||||
|
|
|
|||
Loading…
Reference in a new issue