Fix/plugin resource leak #26
Merged
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.
This pull request refactors the code execution plugin to use the new
@mcpc-tech/handle-sandboxpackage 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:
SandboxExecutorwith the@mcpc-tech/handle-sandboxpackage, significantly simplifying sandbox management and code execution (src/sandbox-executor.ts). [1] [2] [3] [4]src/types.tsandsrc/json-rpc.ts, as they're no longer needed with the new sandbox implementation. [1] [2]sandbox/runtime.ts, as execution is now handled by the external package.Dependency and API Updates:
deno.jsonfiles to reference the new core version and the@mcpc-tech/handle-sandboxpackage, and removed the direct dependency on the Deno npm package. [1] [2] [3]Minor Improvements and Logging:
mod.tsand simplified code execution logic. [1] [2]These changes modernize the code execution plugin and make sandboxed execution more robust and easier to maintain.