[Feature] Add MCP Protocol API as Alternative Interface to E2B#165
[Feature] Add MCP Protocol API as Alternative Interface to E2B#165bcfre wants to merge 1 commit intoopenkruise:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #165 +/- ##
==========================================
+ Coverage 56.87% 59.73% +2.86%
==========================================
Files 94 103 +9
Lines 5734 6549 +815
==========================================
+ Hits 3261 3912 +651
- Misses 2236 2381 +145
- Partials 237 256 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The coverage of 59.87805% seems to be not high enough |
|
@bcfre: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Ⅰ. Describe what this PR does
Both E2B and MCP APIs share the same underlying sandbox infrastructure - they are simply different protocol adapters over the unified sandbox management layer.
Changes
1. MCP Server Integration (
cmd/sandbox-manager/main.go)MCP_SERVER_ENABLED,MCP_SERVER_PORT,MCP_SANDBOX_TTL,MCP_SESSION_SYNC_PORT2. Sandbox Event Callback (
pkg/sandbox-manager/infra/)SandboxEventHandlerinterface to propagate sandbox lifecycle events to MCP session layer3. Session-Sandbox Binding (
api/v1alpha1/sandboxset_types.go)AnnotationMCPSessionIDto link MCP sessions with underlying sandboxes4. Expose Shared Components (
pkg/servers/e2b/core.go,pkg/sandbox-manager/core.go)SandboxManagerandKeyStoragefor MCP server reuseListPeers()for MCP cluster discoveryⅡ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews