Skip to content

Conversation

@yaonyan
Copy link
Contributor

@yaonyan yaonyan commented Nov 10, 2025

This pull request refactors the code execution plugin to use the new @mcpc-tech/handle-sandbox package for sandboxed code execution, replacing the previous custom Deno subprocess and JSON-RPC implementation. The changes simplify the sandbox management, remove custom JSON-RPC protocol code, and update dependencies for improved reliability and maintainability.

Sandbox Execution Refactor:

  • Replaced the custom Deno subprocess and JSON-RPC communication in SandboxExecutor with the @mcpc-tech/handle-sandbox package, significantly simplifying sandbox management and code execution (src/sandbox-executor.ts). [1] [2] [3] [4]
  • Removed custom JSON-RPC protocol types and handler classes from src/types.ts and src/json-rpc.ts, as they're no longer needed with the new sandbox implementation. [1] [2]
  • Deleted the old Deno sandbox runtime implementation in sandbox/runtime.ts, as execution is now handled by the external package.

Dependency and API Updates:

  • Updated dependencies in deno.json files to reference the new core version and the @mcpc-tech/handle-sandbox package, and removed the direct dependency on the Deno npm package. [1] [2] [3]
  • Updated the plugin disposal logic to be asynchronous and to properly wait for sandbox termination.

Minor Improvements and Logging:

  • Added a debug log for missing tool definitions to aid development and troubleshooting.
  • Minor API cleanup: removed unused exports from mod.ts and simplified code execution logic. [1] [2]

These changes modernize the code execution plugin and make sandboxed execution more robust and easier to maintain.

…se plugins

Version bump in deno.json. Add ComposableMCPServer.close override to ensure all plugins are disposed before closing the server.
@yaonyan yaonyan self-assigned this Nov 10, 2025
@yaonyan yaonyan added the enhancement New feature or request label Nov 10, 2025
- Remove console.log debugging statement from plugin
- Make dispose function synchronous and remove artificial delay
- Add test delays to ensure proper server cleanup
- Improve plugin performance and cleanup behavior
@yaonyan yaonyan merged commit 2395e3b into main Nov 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants