Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
1 issue found across 9 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="libraries/typescript/packages/server/examples/daytona/src/index.ts">
<violation number="1" location="libraries/typescript/packages/server/examples/daytona/src/index.ts:46">
P2: Every `run_code` call creates a new Daytona client but only deletes its sandbox, so repeated calls in the long-lived server accumulate client connections and resources. Reuse one module-scoped `Daytona` client or explicitly dispose each client after sandbox deletion.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| let error: string | undefined; | ||
| let cleanupError: string | undefined; | ||
| try { | ||
| daytona = new Daytona(); |
There was a problem hiding this comment.
P2: Every run_code call creates a new Daytona client but only deletes its sandbox, so repeated calls in the long-lived server accumulate client connections and resources. Reuse one module-scoped Daytona client or explicitly dispose each client after sandbox deletion.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At libraries/typescript/packages/server/examples/daytona/src/index.ts, line 46:
<comment>Every `run_code` call creates a new Daytona client but only deletes its sandbox, so repeated calls in the long-lived server accumulate client connections and resources. Reuse one module-scoped `Daytona` client or explicitly dispose each client after sandbox deletion.</comment>
<file context>
@@ -0,0 +1,88 @@
+ let error: string | undefined;
+ let cleanupError: string | undefined;
+ try {
+ daytona = new Daytona();
+ // Auto-stop/delete also limits leftovers if the server exits unexpectedly.
+ sandbox = await daytona.create(
</file context>
@mcp-use/agent
@mcp-use/cli
@mcp-use/client
create-mcp-use-app
@mcp-use/inspector
mcp-use
@mcp-use/tunnel
commit: |
Changes
Add a runnable Daytona example that exposes a single
run_codeMCP tool. Developers can execute Python, TypeScript, or JavaScript in a fresh sandbox and inspect the output through the built-in Inspector.Each call returns execution output and exit code, bounds execution time, and deletes the sandbox in
finally, waiting for deletion to complete. Missing credentials, nonzero exits, provider failures, and cleanup failures are reported as tool errors.Language / Project Scope
mcp-useserver examplesImplementation Details
.env.example, and concise local run instructions underpackages/server/examples/daytona.@daytona/[email protected], the current package name at a version allowed by the workspace release-age policy.Review Readiness
Testing
pnpm typecheck,pnpm build, andpnpm verifyin the example directory passed.verifychecks configuration and intentionally skips live provider calls.run_code, and returnedHello from Daytona!with exit code 0. Sandbox cleanup completed successfully.Related Issues
Supports MCP-2989. Cookbook pages and the public embedded demo are separate follow-ups.
Summary by cubic
Adds a runnable Daytona code execution example exposing a single
run_codeMCP tool. Developers can run Python, TypeScript, or JavaScript in a fresh sandbox and get output and exit code back.finally; cleanup failures return a tool error with the sandbox ID.@daytona/sdk0.210.0 and is registered for configuration verification; CI does not call the credential-dependent provider.protobufjspostinstall script inpnpm-workspace.yaml; the script only checks dependency version conventions and would otherwise run in CI.Written for commit 841734f. Summary will update on new commits.