feat: Propagate Context to eager connect via McpClientSession#339
Merged
feat: Propagate Context to eager connect via McpClientSession#339
Conversation
In order to allow the initial connection to have contextual information in the reactive chain, the McpClientSession should be able to transform the McpClientTransport#connect result, e.g. to attach Context items. This change introduces a new constructor for sessions that makes it possible. Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
Member
Author
|
@tzolov Added a test to verify. |
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
6b001d2 to
3e1a889
Compare
Contributor
|
Thanks @chemicL |
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.
Motivation and Context
In order to allow the initial connection to have contextual information in the reactive chain, the
McpClientSessionshould be able to transform theMcpClientTransport#connectresult, e.g. to attachContextitems. This change introduces a new constructor for sessions that makes it possible.How Has This Been Tested?
A new test specifically for validating the presence of a context item has been added.
Breaking Changes
Deprecating the old
McpClientSessionconstructor.Types of changes
Checklist
Additional context
N/A