Releases: cloudflare/sandbox-sdk
@cloudflare/[email protected]
Patch Changes
- #273
8cf6b2fThanks @whoiskatrin! - Add process readiness detection with port and log pattern waiting
TheProcessobject returned bystartProcess()now includes readiness methods:process.waitForPort(port, options?): Wait for process to listen on a port- Supports HTTP mode (default): checks endpoint returns expected status (200-399)
- Supports TCP mode: checks port accepts connections
- Configurable timeout, interval, path, and expected status
process.waitForLog(pattern, options?): Wait for pattern in process output- Supports string or RegExp patterns
- Returns matching line and capture groups
@cloudflare/[email protected]
Patch Changes
-
#261
b6cc244Thanks @whoiskatrin! - Add top-level await support for JavaScript code executionJavaScript code can now use
awaitat the top level without wrapping in an async IIFE. Variables declared withconst,let, orvarpersist across executions, enabling multi-step workflows like:// Execution 1 const data = await fetch('https://api.example.com').then((r) => r.json()); // Execution 2 console.log(data); // Works - data persists
@cloudflare/[email protected]
Minor Changes
-
#259
0a2cb93Thanks @ghostwriternr! - Add lean and Python image variants to reduce Docker image sizeBREAKING CHANGE for Python users: The default image no longer includes Python.
cloudflare/sandbox:<version>- lean image without Python (~600-800MB)cloudflare/sandbox:<version>-python- full image with Python + data science packages (~1.3GB)
Migration: If using
CodeInterpreter.runCode()with Python, update your Dockerfile:# Before FROM cloudflare/sandbox:0.6.0 # After FROM cloudflare/sandbox:0.6.0-python
Without this change, Python execution will fail with
PYTHON_NOT_AVAILABLEerror.
@cloudflare/[email protected]
Patch Changes
-
#249
e69dce5Thanks @ghostwriternr! - Fix code context isolation bug where contexts leaked state after 10 executions. Each code context now gets a dedicated executor process from creation to deletion, ensuring complete isolation between contexts. Removed maximum pool size limits to allow organic scaling. -
#258
34bfb81Thanks @ghostwriternr! - Fix executor mutex race condition and memory leak in code interpreter -
#256
088ee5fThanks @ghostwriternr! - Remove output size limit for command executionThe 10MB output size limit that was intended to prevent OOM attacks has been removed. This limit was too restrictive for legitimate use cases like reading large media files. Developers are now trusted to manage their own resource usage and handle potential OOM situations.
-
#254
8728890Thanks @deathbyknowledge! - close stream before releasing lock
@cloudflare/[email protected]
Patch Changes
- #243
32a0dabThanks @whoiskatrin! - add getFileMetadata method in FileService to get only metadata
@cloudflare/[email protected]
Patch Changes
- #204
55981f8Thanks @whoiskatrin! - add environment variables and working directory support to command exec
@cloudflare/[email protected]
Patch Changes
-
#234
d4cee5eThanks @ghostwriternr! - Remove unused logging infrastructure (getLogger, runWithLogger) that was never called -
#224
71e86f4Thanks @ghostwriternr! - Fix memory leaks from listener accumulation, unbounded process storage, and stale DO state -
#221
3aba9e8Thanks @threepointone! - Add OpenAI Agents adaptersAdd OpenAI Agents adapters (
ShellandEditor) that integrate Cloudflare Sandbox with the OpenAI Agents SDK. These adapters enable AI agents to execute shell commands and perform file operations (create, update, delete) inside sandboxed environments. Both adapters automatically collect and timestamp results from operations, making it easy to track command execution and file modifications during agent sessions. The adapters are exported from@cloudflare/sandbox/openaiand implement the OpenAI AgentsShellandEditorinterfaces.
@cloudflare/[email protected]
Patch Changes
-
#190
57d764cThanks @ghostwriternr! - Add S3-compatible bucket mountingEnable mounting S3-compatible buckets (R2, S3, GCS, MinIO, etc.) as local filesystem paths using s3fs-fuse. Supports automatic credential detection from environment variables and intelligent provider detection from endpoint URLs.
-
#223
b1a86c8Thanks @ghostwriternr! - Improve container startup resiliencySDK now retries both 503 (provisioning) and 500 (startup failure) errors automatically. Container timeouts increased to 30s instance + 90s ports (was 8s + 20s).
-
#219
94e53f8Thanks @threepointone! - Update dependencies
@cloudflare/[email protected]
Patch Changes
228ef5bThanks @ghostwriternr! - Fix encoding parameter handling in file operations to enable MIME auto-detection. Previously, SDK and container handlers added default 'utf8' encoding, preventing MIME-based detection of binary files. Now encoding parameter is passed through as-is, allowing automatic detection when not explicitly specified.
@cloudflare/[email protected]
Patch Changes
- #198
93c6cc7Thanks @ghostwriternr! - Fix container startup failures when WORKDIR is changed in derived Dockerfiles