Conversation
Replace the six-parameter flat constructor of StreamableHttpServerTransport with a typed Configuration class. This improves API ergonomics and provides a stable extension point for future options without further breaking the constructor signature.
Changes:
- Add `Configuration` as a public class nested directly on `StreamableHttpServerTransport`, with `enableJsonResponse` as the first
parameter (most commonly set)
- Change the primary constructor to accept `Configuration`
- Rename `retryIntervalMillis: Long?` to `retryInterval: Duration?` in Configuration, aligning with Kotlin's type-safe time API
- Deprecate the old flat constructor with a compatibility bridge
- Update KotlinTestBase integration test to use the new constructor
…simplify `StreamableHttpServerTransport` constructor
…erTransport.Configuration` in Application Ktor extensions Simplified `Application.mcp*StreamableHttp` functions by replacing individual parameters with the typed `StreamableHttpServerTransport.Configuration` for improved extensibility and performance.
d11ef9f to
bc3c750
Compare
…erTransport.Configuration` in Application Ktor extensions Simplified `Application.mcp*StreamableHttp` functions by replacing individual parameters with the typed `StreamableHttpServerTransport.Configuration` with default value for improved extensibility and performance.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor: replace flat parameter definitions with
StreamableHttpServerTransport.Configurationin Application Ktor extensionsSimplified
Application.mcp*StreamableHttpfunctions by replacing individual parameters with the typedStreamableHttpServerTransport.Configurationfor improved extensibility and performance.Includes #560
Motivation and Context
See #562, #560 see thr comment: #560 (comment)
How Has This Been Tested?
Regression test
Breaking Changes
No, it is safe. #562 was not shipped yet.
Types of changes
Checklist