Default draft protocol support: sessionless + handshake-less (SEP-2575 + SEP-2567) (#1610)
This commit is contained in:
parent
3368bb7349
commit
6c323e783b
1 changed files with 5704 additions and 712 deletions
|
|
@ -490,6 +490,8 @@ public abstract class ResumabilityIntegrationTestsBase(ITestOutputHelper testOut
|
|||
var serverBuilder = Builder.Services.AddMcpServer()
|
||||
.WithHttpTransport(options =>
|
||||
{
|
||||
// Resumability is a stateful concern; pin Stateless = false now that the new default is true.
|
||||
options.Stateless = false;
|
||||
options.EventStreamStore = eventStreamStore;
|
||||
configureTransport?.Invoke(options);
|
||||
})
|
||||
|
|
@ -515,7 +517,11 @@ public abstract class ResumabilityIntegrationTestsBase(ITestOutputHelper testOut
|
|||
TransportMode = HttpTransportMode.StreamableHttp,
|
||||
}, HttpClient, LoggerFactory);
|
||||
|
||||
return await McpClient.CreateAsync(transport, loggerFactory: LoggerFactory,
|
||||
// Resumability (Last-Event-ID) and Mcp-Session-Id are removed in the draft revision
|
||||
// (SEP-2567). Pin the client to the latest stable version so it negotiates the stateful,
|
||||
// resumable legacy handshake instead of the sessionless draft default.
|
||||
return await McpClient.CreateAsync(transport, new McpClientOptions { ProtocolVersion = "2025-11-25" },
|
||||
loggerFactory: LoggerFactory,
|
||||
cancellationToken: TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue