go-sdk/internal/jsonrpc2
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Robert Findley 875d1d30c2
mcp: don't break the streamable client connection for transient errors (#723)
When POST requests in the streamableClientConn return a transient error,
return this error to the caller rather than permanently breaking the
connection.

This is achieved by using the special sentinel ErrRejected error to the
jsonrpc2 layer. In doing so, the change revealed a pre-existing bug:
ErrRejected had the same code as ErrConnectionClosing, and
jsonrpc2.WireError implements errors.Is, so the two sentinel values
could be conflated. This is fixed by using a new internal code.

There's more to do for #683: we should also retry transient errors in
handleSSE.

For #683
2025-12-12 13:49:41 -05:00
..
conn.go mcp: don't break the streamable client connection for transient errors (#723) 2025-12-12 13:49:41 -05:00
frame.go internal/jsonrpc2: allow asynchronous writes 2025-08-08 12:38:43 -04:00
jsonrpc2.go mcp: implement a concurrency model for calls 2025-08-19 11:21:02 -04:00
jsonrpc2_test.go mcp: implement a concurrency model for calls 2025-08-19 11:21:02 -04:00
messages.go many: minor cosmetic changes (#529) 2025-09-25 16:06:24 -04:00
net.go internal/jsonrpc2_v2: update for go1.16+ 2025-05-27 10:50:54 -07:00
serve.go internal/mcp: implement HTTP SSE transport 2025-04-23 19:15:20 -07:00
serve_test.go internal/jsonrpc2_v2,mcp: remove unneeded dependencies 2025-06-18 22:11:26 -07:00
wire.go mcp: don't break the streamable client connection for transient errors (#723) 2025-12-12 13:49:41 -05:00
wire_test.go x/tools: modernize interface{} -> any 2025-02-19 15:14:27 -08:00