Merge upstream/main into MCP sampling branch#2
Merged
cbcoutinho merged 302 commits intofix/mcp-memory-leak-sampling-issuesfrom Dec 13, 2025
Merged
Merge upstream/main into MCP sampling branch#2cbcoutinho merged 302 commits intofix/mcp-memory-leak-sampling-issuesfrom
cbcoutinho merged 302 commits intofix/mcp-memory-leak-sampling-issuesfrom
Conversation
…oogle-gemini#13398) Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
… banner has been displayed (google-gemini#13428)
…emini#13488) Co-authored-by: Vishvananda Abrams <vabrams@google.com>
…unused restart support. (google-gemini#13565)
…r characters + remove truncation text (google-gemini#10501)
…pport (google-gemini#14737) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Jacob Richman <jacob314@gmail.com>
# Conflicts: # packages/core/src/tools/mcp-client-manager.ts # packages/core/src/tools/mcp-client.test.ts # packages/core/src/tools/mcp-client.ts # packages/core/src/utils/events.ts
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.
Summary
This PR merges the latest changes from
upstream/maininto thefix/mcp-memory-leak-sampling-issuesbranch to bring it up-to-date before submitting upstream.Merge Conflicts Resolved
Successfully resolved conflicts in 4 files while preserving both upstream improvements and our MCP sampling support:
1.
packages/core/src/tools/mcp-client.tsconnectToMcpServerto returnClientdirectly (instead of{client, transport})CreateMessageRequestSchemaandcliConfigparameterconnectAndDiscoverto work with new return type, removed transport cleanup (now handled internally)2.
packages/core/src/tools/mcp-client-manager.tsonToolsUpdatedcallback parameter toMcpClientconstructor3.
packages/core/src/utils/events.tsMcpSamplingRequestevent andMcpSamplingRequestPayloadinterface4.
packages/core/src/tools/mcp-client.test.tsBuild Fixes
connectAndDiscoverfunction to handle newClientreturn typeMcpClientconstructor calls in tests to pass correct parametersconnectToMcpServercalls to match new 5-parameter signatureTesting
✅ Build: All packages built successfully
✅ Tests: All 194 test files passed (3644 tests passed)
Changes Summary
This PR was generated with the help of AI, and reviewed by a Human