-
Notifications
You must be signed in to change notification settings - Fork 183
[WIP] StreamableHttpServerTransport implementation #449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d189d4f
4667bf0
a40db1d
e593c2e
02c3c15
04956fb
600850e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||||||||||||||
| package io.modelcontextprotocol.kotlin.sdk.server | ||||||||||||||||||||
|
|
||||||||||||||||||||
| import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCMessage | ||||||||||||||||||||
|
|
||||||||||||||||||||
| /** | ||||||||||||||||||||
| * Interface for resumability support via event storage | ||||||||||||||||||||
| */ | ||||||||||||||||||||
| public interface EventStore { | ||||||||||||||||||||
| /** | ||||||||||||||||||||
| * Stores an event for later retrieval | ||||||||||||||||||||
| * @param streamId ID of the stream the event belongs to | ||||||||||||||||||||
| * @param message The JSON-RPC message to store | ||||||||||||||||||||
| * @returns The generated event ID for the stored event | ||||||||||||||||||||
|
||||||||||||||||||||
| * @returns The generated event ID for the stored event | |
| * @return The generated event ID for the stored event |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing KDoc documentation for the getStreamIdForEventId method. The inline comment on line 30 describes it as a "no-op" default implementation, but there's no actual default implementation provided (it's an interface method). Consider either providing a default implementation or clarifying the documentation to explain that implementers may throw NotImplementedError or UnsupportedOperationException to disable this validation.
| * Returns the stream ID associated with [eventId], or null if the event is unknown. | |
| * Default implementation is a no-op which disables extra validation during replay. | |
| * Returns the stream ID associated with the given [eventId], or null if the event is unknown. | |
| * | |
| * Implementers may throw [NotImplementedError] or [UnsupportedOperationException] to disable | |
| * extra validation during replay, as there is no default implementation provided. | |
| * | |
| * @param eventId The event ID to look up. | |
| * @return The stream ID associated with the event, or null if unknown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
idfield ofJSONRPCErroris now nullable, but this could be a breaking API change. According to the JSON-RPC 2.0 specification, theidmember is required in error responses except when there was an error in detecting the id in the request object (e.g., parse error). Consider documenting whennullis appropriate, or ensure this aligns with how the codebase handles error scenarios where the request ID cannot be determined.