diff --git a/.changeset/add-wait-for-exit.md b/.changeset/add-wait-for-exit.md deleted file mode 100644 index d9a27e18..00000000 --- a/.changeset/add-wait-for-exit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@cloudflare/sandbox': patch ---- - -Add waitForExit() method to Process interface for waiting until a process terminates diff --git a/.changeset/clean-pans-switch.md b/.changeset/clean-pans-switch.md deleted file mode 100644 index 2fae26b9..00000000 --- a/.changeset/clean-pans-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@cloudflare/sandbox': patch ---- - -fix race condition for PID retrieval diff --git a/.changeset/http-status-error-handling.md b/.changeset/http-status-error-handling.md deleted file mode 100644 index ff777145..00000000 --- a/.changeset/http-status-error-handling.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@cloudflare/sandbox': patch ---- - -Improve automatic retry behavior for container startup errors - -Transient errors like "container starting" now automatically retry with exponential backoff, while permanent errors like "missing image" fail immediately with clear error messages. diff --git a/examples/claude-code/Dockerfile b/examples/claude-code/Dockerfile index e9ab8cff..94896b5f 100644 --- a/examples/claude-code/Dockerfile +++ b/examples/claude-code/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/cloudflare/sandbox:0.6.5 +FROM docker.io/cloudflare/sandbox:0.6.6 RUN npm install -g @anthropic-ai/claude-code ENV COMMAND_TIMEOUT_MS=300000 EXPOSE 3000 diff --git a/examples/code-interpreter/Dockerfile b/examples/code-interpreter/Dockerfile index 2b15c2bb..35dbfd8b 100644 --- a/examples/code-interpreter/Dockerfile +++ b/examples/code-interpreter/Dockerfile @@ -1 +1 @@ -FROM docker.io/cloudflare/sandbox:0.6.5-python +FROM docker.io/cloudflare/sandbox:0.6.6-python diff --git a/examples/minimal/Dockerfile b/examples/minimal/Dockerfile index 9b2581b2..e5e904cb 100644 --- a/examples/minimal/Dockerfile +++ b/examples/minimal/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/cloudflare/sandbox:0.6.5 +FROM docker.io/cloudflare/sandbox:0.6.6 # Required during local development to access exposed ports EXPOSE 8080 diff --git a/examples/openai-agents/Dockerfile b/examples/openai-agents/Dockerfile index af9632fc..a1e18a91 100644 --- a/examples/openai-agents/Dockerfile +++ b/examples/openai-agents/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/cloudflare/sandbox:0.6.5 +FROM docker.io/cloudflare/sandbox:0.6.6 # Required during local development to access exposed ports EXPOSE 8080 diff --git a/examples/opencode/Dockerfile b/examples/opencode/Dockerfile index 0f122afd..5f960f0c 100644 --- a/examples/opencode/Dockerfile +++ b/examples/opencode/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/cloudflare/sandbox:0.6.5 +FROM docker.io/cloudflare/sandbox:0.6.6 # Add opencode install location to PATH before installation ENV PATH="/root/.opencode/bin:${PATH}" diff --git a/examples/typescript-validator/Dockerfile b/examples/typescript-validator/Dockerfile index eb9ac25b..815f7cf7 100644 --- a/examples/typescript-validator/Dockerfile +++ b/examples/typescript-validator/Dockerfile @@ -1,5 +1,5 @@ # Use Cloudflare sandbox as base -FROM docker.io/cloudflare/sandbox:0.6.5 +FROM docker.io/cloudflare/sandbox:0.6.6 # Install esbuild for TypeScript bundling RUN npm install -g esbuild diff --git a/package-lock.json b/package-lock.json index 3723f9aa..32342f60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -415,7 +415,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -437,7 +436,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -577,7 +575,6 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -1527,8 +1524,7 @@ "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20251126.0.tgz", "integrity": "sha512-DSeI1Q7JYmh5/D/tw5eZCjrKY34v69rwj63hHt60nSQW5QLwWCbj/lLtNz9f2EPa+JCACwpLXHgCXfzJ29x66w==", "devOptional": true, - "license": "MIT OR Apache-2.0", - "peer": true + "license": "MIT OR Apache-2.0" }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", @@ -2842,7 +2838,6 @@ "integrity": "sha512-/g2d4sW9nUDJOMz3mabVQvOGhVa4e/BN/Um7yca9Bb2XTzPPnfTWHWQg+IsEYO7M3Vx+EXvaM/I2pJWIMun1bg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@octokit/auth-token": "^4.0.0", "@octokit/graphql": "^7.1.0", @@ -4327,7 +4322,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -4343,7 +4337,6 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -4353,7 +4346,6 @@ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -4480,7 +4472,6 @@ "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/utils": "3.2.4", "pathe": "^2.0.3", @@ -4496,7 +4487,6 @@ "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/pretty-format": "3.2.4", "magic-string": "^0.30.17", @@ -4525,7 +4515,6 @@ "integrity": "sha512-hGISOaP18plkzbWEcP/QvtRW1xDXF2+96HbEX6byqQhAUbiS5oH6/9JwW+QsQCIYON2bI6QZBF+2PvOmrRZ9wA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/utils": "3.2.4", "fflate": "^0.8.2", @@ -4673,7 +4662,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -5419,7 +5407,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -5713,7 +5700,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -7648,7 +7634,6 @@ "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", "devOptional": true, "license": "MIT", - "peer": true, "bin": { "jiti": "lib/jiti-cli.mjs" } @@ -7913,7 +7898,6 @@ "integrity": "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==", "devOptional": true, "license": "MPL-2.0", - "peer": true, "dependencies": { "detect-libc": "^2.0.3" }, @@ -8199,6 +8183,7 @@ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "license": "MIT", + "peer": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -9767,7 +9752,6 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -9984,7 +9968,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -9994,7 +9977,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -10006,7 +9988,8 @@ "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/react-katex": { "version": "3.1.0", @@ -10380,7 +10363,6 @@ "integrity": "sha512-ZRLgPlS91l4JztLYEZnmMcd3Umcla1hkXJgiEiR4HloRJBBoeaX8qogTu5Jfu36rRMVLndzqYv0h+M5gJAkUfg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@oxc-project/types": "=0.98.0", "@rolldown/pluginutils": "1.0.0-beta.51" @@ -11196,7 +11178,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -11396,7 +11377,6 @@ "integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "~0.25.0", "get-tsconfig": "^4.7.5" @@ -11556,7 +11536,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -11626,7 +11605,6 @@ "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz", "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==", "license": "MIT", - "peer": true, "dependencies": { "pathe": "^2.0.3" } @@ -12068,7 +12046,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.4.tgz", "integrity": "sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==", "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", @@ -12183,7 +12160,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -12216,7 +12192,6 @@ "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/chai": "^5.2.2", "@vitest/expect": "3.2.4", @@ -12642,7 +12617,6 @@ "integrity": "sha512-Om5ns0Lyx/LKtYI04IV0bjIrkBgoFNg0p6urzr2asekJlfP18RqFzyqMFZKf0i9Gnjtz/JfAS/Ol6tjCe5JJsQ==", "hasInstallScript": true, "license": "Apache-2.0", - "peer": true, "bin": { "workerd": "bin/workerd" }, @@ -13406,7 +13380,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -13454,7 +13427,7 @@ }, "packages/sandbox": { "name": "@cloudflare/sandbox", - "version": "0.6.5", + "version": "0.6.6", "license": "Apache-2.0", "dependencies": { "@cloudflare/containers": "^0.0.30" diff --git a/packages/sandbox/CHANGELOG.md b/packages/sandbox/CHANGELOG.md index ce98775e..c45b5558 100644 --- a/packages/sandbox/CHANGELOG.md +++ b/packages/sandbox/CHANGELOG.md @@ -1,5 +1,17 @@ # @cloudflare/sandbox +## 0.6.6 + +### Patch Changes + +- [#299](https://github.com/cloudflare/sandbox-sdk/pull/299) [`d3252dc`](https://github.com/cloudflare/sandbox-sdk/commit/d3252dc9ef8f5c8ce23011c2a8492c6f248f92f2) Thanks [@whoiskatrin](https://github.com/whoiskatrin)! - Add waitForExit() method to Process interface for waiting until a process terminates + +- [#296](https://github.com/cloudflare/sandbox-sdk/pull/296) [`8a5d275`](https://github.com/cloudflare/sandbox-sdk/commit/8a5d275b0ccd341cd352a42c2659e56c6b841212) Thanks [@whoiskatrin](https://github.com/whoiskatrin)! - fix race condition for PID retrieval + +- [`a86f7db`](https://github.com/cloudflare/sandbox-sdk/commit/a86f7db01a4d8c4abf9843bfc1aef8841a775d70) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Improve automatic retry behavior for container startup errors + + Transient errors like "container starting" now automatically retry with exponential backoff, while permanent errors like "missing image" fail immediately with clear error messages. + ## 0.6.5 ### Patch Changes @@ -90,10 +102,10 @@ ```dockerfile # Before - FROM cloudflare/sandbox:0.6.5 + FROM cloudflare/sandbox:0.6.6 # After - FROM cloudflare/sandbox:0.6.5-python + FROM cloudflare/sandbox:0.6.6-python ``` Without this change, Python execution will fail with `PYTHON_NOT_AVAILABLE` error. diff --git a/packages/sandbox/package.json b/packages/sandbox/package.json index 930a6cf7..11bba2d5 100644 --- a/packages/sandbox/package.json +++ b/packages/sandbox/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/sandbox", - "version": "0.6.5", + "version": "0.6.6", "repository": { "type": "git", "url": "https://github.com/cloudflare/sandbox-sdk" diff --git a/packages/sandbox/src/version.ts b/packages/sandbox/src/version.ts index 97a62fb5..3f550757 100644 --- a/packages/sandbox/src/version.ts +++ b/packages/sandbox/src/version.ts @@ -3,4 +3,4 @@ * This file is auto-updated by .github/changeset-version.ts during releases * DO NOT EDIT MANUALLY - Changes will be overwritten on the next version bump */ -export const SDK_VERSION = '0.6.5'; +export const SDK_VERSION = '0.6.6'; diff --git a/tests/e2e/test-worker/Dockerfile b/tests/e2e/test-worker/Dockerfile index 347c0ecb..3238be15 100644 --- a/tests/e2e/test-worker/Dockerfile +++ b/tests/e2e/test-worker/Dockerfile @@ -1,6 +1,6 @@ # Base image Dockerfile (no Python) # Used for testing Python-not-available error handling -FROM docker.io/cloudflare/sandbox-test:0.6.5 +FROM docker.io/cloudflare/sandbox-test:0.6.6 # Expose ports used for testing # 8080: general testing diff --git a/tests/e2e/test-worker/Dockerfile.opencode b/tests/e2e/test-worker/Dockerfile.opencode index 60b0676f..4554ce5b 100644 --- a/tests/e2e/test-worker/Dockerfile.opencode +++ b/tests/e2e/test-worker/Dockerfile.opencode @@ -1,6 +1,6 @@ # E2E test Dockerfile for OpenCode # Uses the -opencode variant for testing the OpenCode integration -FROM docker.io/cloudflare/sandbox-test:0.6.5-opencode +FROM docker.io/cloudflare/sandbox-test:0.6.6-opencode # Expose ports used for testing # 4096: OpenCode server default port diff --git a/tests/e2e/test-worker/Dockerfile.python b/tests/e2e/test-worker/Dockerfile.python index cd86a4e6..a25d9adf 100644 --- a/tests/e2e/test-worker/Dockerfile.python +++ b/tests/e2e/test-worker/Dockerfile.python @@ -1,6 +1,6 @@ # Integration test Dockerfile # Uses the -python variant because E2E tests include Python code execution tests -FROM docker.io/cloudflare/sandbox-test:0.6.5-python +FROM docker.io/cloudflare/sandbox-test:0.6.6-python # Expose ports used for testing # 8080: general testing diff --git a/tests/e2e/test-worker/Dockerfile.standalone b/tests/e2e/test-worker/Dockerfile.standalone index faed6818..53a5ef72 100644 --- a/tests/e2e/test-worker/Dockerfile.standalone +++ b/tests/e2e/test-worker/Dockerfile.standalone @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # Copy standalone binary from sandbox image -COPY --from=cloudflare/sandbox-test:0.6.5 /container-server/sandbox /sandbox +COPY --from=cloudflare/sandbox-test:0.6.6 /container-server/sandbox /sandbox # Copy startup script for CMD passthrough testing COPY startup-test.sh /startup-test.sh diff --git a/tests/integration/Dockerfile b/tests/integration/Dockerfile index aae616af..1fc4088c 100644 --- a/tests/integration/Dockerfile +++ b/tests/integration/Dockerfile @@ -1,8 +1,8 @@ # This image is unique to this repo, and you'll never need it. # Whenever you're integrating with sandbox SDK in your own project, # you should use the official image instead: -# FROM docker.io/cloudflare/sandbox:0.6.5-python -FROM cloudflare/sandbox-test:0.6.5-python +# FROM docker.io/cloudflare/sandbox:0.6.6-python +FROM cloudflare/sandbox-test:0.6.6-python # Expose the ports you want to expose EXPOSE 8080