From 5233334d1152061ad6f12d97e7f878b98aeb3a0e Mon Sep 17 00:00:00 2001 From: Topper Bowers Date: Tue, 3 Feb 2026 22:27:02 +0100 Subject: [PATCH 1/8] linux-arm64 support --- .github/workflows/release.yaml | 5 + docker/release/build.sh | 6 ++ docker/release/linux-aarch64.Dockerfile | 108 ++++++++++++++++++++ justfile | 1 + scripts/release/sdk.ts | 2 + sdks/cli/bin/sandbox-agent | 3 +- sdks/cli/package.json | 1 + sdks/cli/platforms/linux-arm64/package.json | 22 ++++ sdks/cli/tests/launcher.test.ts | 2 + sdks/typescript/src/spawn.ts | 3 +- 10 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 docker/release/linux-aarch64.Dockerfile create mode 100644 sdks/cli/platforms/linux-arm64/package.json diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 76c5b31..78ab8e2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -96,6 +96,11 @@ jobs: target: x86_64-unknown-linux-musl binary_ext: "" arch: x86_64 + - platform: linux + runner: depot-ubuntu-24.04-arm-8 + target: aarch64-unknown-linux-musl + binary_ext: "" + arch: aarch64 - platform: windows runner: depot-ubuntu-24.04-8 target: x86_64-pc-windows-gnu diff --git a/docker/release/build.sh b/docker/release/build.sh index a9e42e4..6e7d66f 100755 --- a/docker/release/build.sh +++ b/docker/release/build.sh @@ -18,6 +18,12 @@ case $TARGET in TARGET_STAGE="x86_64-builder" BINARY="sandbox-agent-$TARGET" ;; + aarch64-unknown-linux-musl) + echo "Building for Linux aarch64 musl" + DOCKERFILE="linux-aarch64.Dockerfile" + TARGET_STAGE="aarch64-builder" + BINARY="sandbox-agent-$TARGET" + ;; x86_64-pc-windows-gnu) echo "Building for Windows x86_64" DOCKERFILE="windows.Dockerfile" diff --git a/docker/release/linux-aarch64.Dockerfile b/docker/release/linux-aarch64.Dockerfile new file mode 100644 index 0000000..d384f29 --- /dev/null +++ b/docker/release/linux-aarch64.Dockerfile @@ -0,0 +1,108 @@ +# syntax=docker/dockerfile:1.10.0 + +# Build inspector frontend +FROM node:22-alpine AS inspector-build +WORKDIR /app +RUN npm install -g pnpm + +# Copy package files for workspaces +COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ +COPY frontend/packages/inspector/package.json ./frontend/packages/inspector/ +COPY sdks/cli-shared/package.json ./sdks/cli-shared/ +COPY sdks/typescript/package.json ./sdks/typescript/ + +# Install dependencies +RUN pnpm install --filter @sandbox-agent/inspector... + +# Copy SDK source (with pre-generated types from docs/openapi.json) +COPY docs/openapi.json ./docs/ +COPY sdks/cli-shared ./sdks/cli-shared +COPY sdks/typescript ./sdks/typescript + +# Build cli-shared and SDK (just tsup, skip generate since types are pre-generated) +RUN cd sdks/cli-shared && pnpm exec tsup +RUN cd sdks/typescript && SKIP_OPENAPI_GEN=1 pnpm exec tsup + +# Copy inspector source and build +COPY frontend/packages/inspector ./frontend/packages/inspector +RUN cd frontend/packages/inspector && pnpm exec vite build + +FROM rust:1.88.0 AS base + +# Install dependencies +RUN apt-get update && apt-get install -y \ + musl-tools \ + musl-dev \ + llvm-14-dev \ + libclang-14-dev \ + clang-14 \ + libssl-dev \ + pkg-config \ + ca-certificates \ + g++ \ + g++-multilib \ + git \ + curl && \ + rm -rf /var/lib/apt/lists/* && \ + wget -q https://github.com/cross-tools/musl-cross/releases/latest/download/aarch64-unknown-linux-musl.tar.xz && \ + tar -xf aarch64-unknown-linux-musl.tar.xz -C /opt/ && \ + rm aarch64-unknown-linux-musl.tar.xz + +# Install musl targets +RUN rustup target add aarch64-unknown-linux-musl + +# Set environment variables +ENV PATH="/opt/aarch64-unknown-linux-musl/bin:$PATH" \ + LIBCLANG_PATH=/usr/lib/llvm-14/lib \ + CLANG_PATH=/usr/bin/clang-14 \ + CC_aarch64_unknown_linux_musl=aarch64-unknown-linux-musl-gcc \ + CXX_aarch64_unknown_linux_musl=aarch64-unknown-linux-musl-g++ \ + AR_aarch64_unknown_linux_musl=aarch64-unknown-linux-musl-ar \ + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-unknown-linux-musl-gcc \ + CARGO_INCREMENTAL=0 \ + RUSTFLAGS="-C target-feature=+crt-static -C link-arg=-static-libgcc" \ + CARGO_NET_GIT_FETCH_WITH_CLI=true + +# Set working directory +WORKDIR /build + +# Build for aarch64 +FROM base AS aarch64-builder + +# Accept version as build arg +ARG SANDBOX_AGENT_VERSION +ENV SANDBOX_AGENT_VERSION=${SANDBOX_AGENT_VERSION} + +# Set up OpenSSL for aarch64 musl target +ENV SSL_VER=1.1.1w +RUN wget https://www.openssl.org/source/openssl-$SSL_VER.tar.gz \ + && tar -xzf openssl-$SSL_VER.tar.gz \ + && cd openssl-$SSL_VER \ + && ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl linux-aarch64 \ + && make -j$(nproc) \ + && make install_sw \ + && cd .. \ + && rm -rf openssl-$SSL_VER* + +# Configure OpenSSL env vars for the build +ENV OPENSSL_DIR=/musl \ + OPENSSL_INCLUDE_DIR=/musl/include \ + OPENSSL_LIB_DIR=/musl/lib \ + PKG_CONFIG_ALLOW_CROSS=1 + +# Copy the source code +COPY . . + +# Copy pre-built inspector frontend +COPY --from=inspector-build /app/frontend/packages/inspector/dist ./frontend/packages/inspector/dist + +# Build for Linux with musl (static binary) - aarch64 +RUN --mount=type=cache,target=/usr/local/cargo/registry \ + --mount=type=cache,target=/usr/local/cargo/git \ + --mount=type=cache,target=/build/target \ + cargo build -p sandbox-agent --release --target aarch64-unknown-linux-musl && \ + mkdir -p /artifacts && \ + cp target/aarch64-unknown-linux-musl/release/sandbox-agent /artifacts/sandbox-agent-aarch64-unknown-linux-musl + +# Default command to show help +CMD ["ls", "-la", "/artifacts"] diff --git a/justfile b/justfile index 2b3dd6b..f9d4103 100644 --- a/justfile +++ b/justfile @@ -17,6 +17,7 @@ release-build target="x86_64-unknown-linux-musl": [group('release')] release-build-all: ./docker/release/build.sh x86_64-unknown-linux-musl + ./docker/release/build.sh aarch64-unknown-linux-musl ./docker/release/build.sh x86_64-pc-windows-gnu ./docker/release/build.sh x86_64-apple-darwin ./docker/release/build.sh aarch64-apple-darwin diff --git a/scripts/release/sdk.ts b/scripts/release/sdk.ts index 42b181d..78f3e6a 100644 --- a/scripts/release/sdk.ts +++ b/scripts/release/sdk.ts @@ -18,6 +18,7 @@ const CRATES = [ const CLI_PACKAGES = [ "@sandbox-agent/cli", "@sandbox-agent/cli-linux-x64", + "@sandbox-agent/cli-linux-arm64", "@sandbox-agent/cli-win32-x64", "@sandbox-agent/cli-darwin-x64", "@sandbox-agent/cli-darwin-arm64", @@ -26,6 +27,7 @@ const CLI_PACKAGES = [ // Mapping from npm package name to Rust target and binary extension const CLI_PLATFORM_MAP: Record = { "@sandbox-agent/cli-linux-x64": { target: "x86_64-unknown-linux-musl", binaryExt: "" }, + "@sandbox-agent/cli-linux-arm64": { target: "aarch64-unknown-linux-musl", binaryExt: "" }, "@sandbox-agent/cli-win32-x64": { target: "x86_64-pc-windows-gnu", binaryExt: ".exe" }, "@sandbox-agent/cli-darwin-x64": { target: "x86_64-apple-darwin", binaryExt: "" }, "@sandbox-agent/cli-darwin-arm64": { target: "aarch64-apple-darwin", binaryExt: "" }, diff --git a/sdks/cli/bin/sandbox-agent b/sdks/cli/bin/sandbox-agent index 66c1aac..3f1d3ad 100755 --- a/sdks/cli/bin/sandbox-agent +++ b/sdks/cli/bin/sandbox-agent @@ -8,7 +8,7 @@ const fs = require("fs"); const path = require("path"); const TRUST_PACKAGES = - "@sandbox-agent/cli-linux-x64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64"; + "@sandbox-agent/cli-linux-x64 @sandbox-agent/cli-linux-arm64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64"; function formatHint(binPath) { return formatNonExecutableBinaryMessage({ @@ -37,6 +37,7 @@ const PLATFORMS = { "darwin-arm64": "@sandbox-agent/cli-darwin-arm64", "darwin-x64": "@sandbox-agent/cli-darwin-x64", "linux-x64": "@sandbox-agent/cli-linux-x64", + "linux-arm64": "@sandbox-agent/cli-linux-arm64", "win32-x64": "@sandbox-agent/cli-win32-x64", }; diff --git a/sdks/cli/package.json b/sdks/cli/package.json index 968157b..0f85a6e 100644 --- a/sdks/cli/package.json +++ b/sdks/cli/package.json @@ -23,6 +23,7 @@ "@sandbox-agent/cli-darwin-arm64": "workspace:*", "@sandbox-agent/cli-darwin-x64": "workspace:*", "@sandbox-agent/cli-linux-x64": "workspace:*", + "@sandbox-agent/cli-linux-arm64": "workspace:*", "@sandbox-agent/cli-win32-x64": "workspace:*" }, "files": [ diff --git a/sdks/cli/platforms/linux-arm64/package.json b/sdks/cli/platforms/linux-arm64/package.json new file mode 100644 index 0000000..f4b12f7 --- /dev/null +++ b/sdks/cli/platforms/linux-arm64/package.json @@ -0,0 +1,22 @@ +{ + "name": "@sandbox-agent/cli-linux-arm64", + "version": "0.1.6-rc.1", + "description": "sandbox-agent CLI binary for Linux arm64", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/rivet-dev/sandbox-agent" + }, + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "scripts": { + "postinstall": "chmod +x bin/sandbox-agent || true" + }, + "files": [ + "bin" + ] +} diff --git a/sdks/cli/tests/launcher.test.ts b/sdks/cli/tests/launcher.test.ts index 1019bdf..0353284 100644 --- a/sdks/cli/tests/launcher.test.ts +++ b/sdks/cli/tests/launcher.test.ts @@ -38,6 +38,7 @@ describe("CLI Launcher", () => { "darwin-arm64": "@sandbox-agent/cli-darwin-arm64", "darwin-x64": "@sandbox-agent/cli-darwin-x64", "linux-x64": "@sandbox-agent/cli-linux-x64", + "linux-arm64": "@sandbox-agent/cli-linux-arm64", "win32-x64": "@sandbox-agent/cli-win32-x64", }; @@ -45,6 +46,7 @@ describe("CLI Launcher", () => { expect(PLATFORMS["darwin-arm64"]).toBe("@sandbox-agent/cli-darwin-arm64"); expect(PLATFORMS["darwin-x64"]).toBe("@sandbox-agent/cli-darwin-x64"); expect(PLATFORMS["linux-x64"]).toBe("@sandbox-agent/cli-linux-x64"); + expect(PLATFORMS["linux-arm64"]).toBe("@sandbox-agent/cli-linux-arm64"); expect(PLATFORMS["win32-x64"]).toBe("@sandbox-agent/cli-win32-x64"); }); diff --git a/sdks/typescript/src/spawn.ts b/sdks/typescript/src/spawn.ts index 6323e08..380afbc 100644 --- a/sdks/typescript/src/spawn.ts +++ b/sdks/typescript/src/spawn.ts @@ -29,11 +29,12 @@ const PLATFORM_PACKAGES: Record = { "darwin-arm64": "@sandbox-agent/cli-darwin-arm64", "darwin-x64": "@sandbox-agent/cli-darwin-x64", "linux-x64": "@sandbox-agent/cli-linux-x64", + "linux-arm64": "@sandbox-agent/cli-linux-arm64", "win32-x64": "@sandbox-agent/cli-win32-x64", }; const TRUST_PACKAGES = - "@sandbox-agent/cli-linux-x64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64"; + "@sandbox-agent/cli-linux-x64 @sandbox-agent/cli-linux-arm64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64"; export function isNodeRuntime(): boolean { return typeof process !== "undefined" && !!process.versions?.node; From 778c7b3064ce986efa2e69c4a7214f536f4b1bdc Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 4 Feb 2026 13:56:52 -0800 Subject: [PATCH 2/8] fix: linux-arm64 cross-compilation and docs --- README.md | 4 ++-- docker/release/linux-aarch64.Dockerfile | 4 ++-- docs/quickstart.mdx | 4 ++-- docs/sdks/typescript.mdx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f5d7b77..9cb114c 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ npm install sandbox-agent ```bash bun add sandbox-agent # Optional: allow Bun to run postinstall scripts for native binaries (required for SandboxAgent.start()). -bun pm trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 +bun pm trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-linux-arm64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 ``` **Setup** @@ -167,7 +167,7 @@ npm install -g @sandbox-agent/cli ```bash # Allow Bun to run postinstall scripts for native binaries. bun add -g @sandbox-agent/cli -bun pm -g trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 +bun pm -g trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-linux-arm64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 ``` Create a session and send a message: diff --git a/docker/release/linux-aarch64.Dockerfile b/docker/release/linux-aarch64.Dockerfile index d384f29..7b771b4 100644 --- a/docker/release/linux-aarch64.Dockerfile +++ b/docker/release/linux-aarch64.Dockerfile @@ -73,12 +73,12 @@ FROM base AS aarch64-builder ARG SANDBOX_AGENT_VERSION ENV SANDBOX_AGENT_VERSION=${SANDBOX_AGENT_VERSION} -# Set up OpenSSL for aarch64 musl target +# Set up OpenSSL for aarch64 musl target (cross-compile from x86_64) ENV SSL_VER=1.1.1w RUN wget https://www.openssl.org/source/openssl-$SSL_VER.tar.gz \ && tar -xzf openssl-$SSL_VER.tar.gz \ && cd openssl-$SSL_VER \ - && ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl linux-aarch64 \ + && ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl --cross-compile-prefix=aarch64-unknown-linux-musl- linux-aarch64 \ && make -j$(nproc) \ && make install_sw \ && cd .. \ diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index f2a1f1b..bf091c9 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -120,7 +120,7 @@ icon: "rocket" ```bash bun add -g @sandbox-agent/cli # Allow Bun to run postinstall scripts for native binaries (required for SandboxAgent.start()). - bun pm -g trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 + bun pm -g trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-linux-arm64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 sandbox-agent server --no-token --host 0.0.0.0 --port 2468 ``` @@ -146,7 +146,7 @@ icon: "rocket" ```bash bun add sandbox-agent # Allow Bun to run postinstall scripts for native binaries (required for SandboxAgent.start()). - bun pm trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 + bun pm trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-linux-arm64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 ``` ```typescript diff --git a/docs/sdks/typescript.mdx b/docs/sdks/typescript.mdx index bf338a7..13bb980 100644 --- a/docs/sdks/typescript.mdx +++ b/docs/sdks/typescript.mdx @@ -19,7 +19,7 @@ client for sessions, events, and agent operations. ```bash bun add sandbox-agent # Allow Bun to run postinstall scripts for native binaries (required for SandboxAgent.start()). - bun pm trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 + bun pm trust @sandbox-agent/cli-linux-x64 @sandbox-agent/cli-linux-arm64 @sandbox-agent/cli-darwin-arm64 @sandbox-agent/cli-darwin-x64 @sandbox-agent/cli-win32-x64 ``` From 2f2c33abc9519f2a158a3d6ce39097fad3ce08e2 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 4 Feb 2026 13:57:04 -0800 Subject: [PATCH 3/8] chore: add linux-arm64 to pnpm-lock --- pnpm-lock.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a27026..64e4230 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -342,6 +342,9 @@ importers: '@sandbox-agent/cli-darwin-x64': specifier: workspace:* version: link:platforms/darwin-x64 + '@sandbox-agent/cli-linux-arm64': + specifier: workspace:* + version: link:platforms/linux-arm64 '@sandbox-agent/cli-linux-x64': specifier: workspace:* version: link:platforms/linux-x64 @@ -369,6 +372,8 @@ importers: sdks/cli/platforms/darwin-x64: {} + sdks/cli/platforms/linux-arm64: {} + sdks/cli/platforms/linux-x64: {} sdks/cli/platforms/win32-x64: {} From 9e748d1bd9d1c1374a77705ec38eb00fabba9adb Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 4 Feb 2026 14:00:02 -0800 Subject: [PATCH 4/8] chore(release): update version to 0.1.6-rc.2 --- Cargo.toml | 14 +++++++------- docs/openapi.json | 2 +- sdks/cli-shared/package.json | 2 +- sdks/cli/package.json | 2 +- sdks/cli/platforms/darwin-arm64/package.json | 2 +- sdks/cli/platforms/darwin-x64/package.json | 2 +- sdks/cli/platforms/linux-arm64/package.json | 2 +- sdks/cli/platforms/linux-x64/package.json | 2 +- sdks/cli/platforms/win32-x64/package.json | 2 +- sdks/typescript/package.json | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a30a351..b21adf1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["server/packages/*"] [workspace.package] -version = "0.1.6-rc.1" +version = "0.1.6-rc.2" edition = "2021" authors = [ "Rivet Gaming, LLC " ] license = "Apache-2.0" @@ -12,12 +12,12 @@ description = "Universal API for automatic coding agents in sandboxes. Supprots [workspace.dependencies] # Internal crates -sandbox-agent = { version = "0.1.6-rc.1", path = "server/packages/sandbox-agent" } -sandbox-agent-error = { version = "0.1.6-rc.1", path = "server/packages/error" } -sandbox-agent-agent-management = { version = "0.1.6-rc.1", path = "server/packages/agent-management" } -sandbox-agent-agent-credentials = { version = "0.1.6-rc.1", path = "server/packages/agent-credentials" } -sandbox-agent-universal-agent-schema = { version = "0.1.6-rc.1", path = "server/packages/universal-agent-schema" } -sandbox-agent-extracted-agent-schemas = { version = "0.1.6-rc.1", path = "server/packages/extracted-agent-schemas" } +sandbox-agent = { version = "0.1.6-rc.2", path = "server/packages/sandbox-agent" } +sandbox-agent-error = { version = "0.1.6-rc.2", path = "server/packages/error" } +sandbox-agent-agent-management = { version = "0.1.6-rc.2", path = "server/packages/agent-management" } +sandbox-agent-agent-credentials = { version = "0.1.6-rc.2", path = "server/packages/agent-credentials" } +sandbox-agent-universal-agent-schema = { version = "0.1.6-rc.2", path = "server/packages/universal-agent-schema" } +sandbox-agent-extracted-agent-schemas = { version = "0.1.6-rc.2", path = "server/packages/extracted-agent-schemas" } # Serialization serde = { version = "1.0", features = ["derive"] } diff --git a/docs/openapi.json b/docs/openapi.json index 76c76f0..bf20396 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -10,7 +10,7 @@ "license": { "name": "Apache-2.0" }, - "version": "0.1.6-rc.1" + "version": "0.1.6-rc.2" }, "servers": [ { diff --git a/sdks/cli-shared/package.json b/sdks/cli-shared/package.json index d6d28ab..03b1e15 100644 --- a/sdks/cli-shared/package.json +++ b/sdks/cli-shared/package.json @@ -1,6 +1,6 @@ { "name": "@sandbox-agent/cli-shared", - "version": "0.1.6-rc.1", + "version": "0.1.6-rc.2", "description": "Shared helpers for sandbox-agent CLI and SDK", "license": "Apache-2.0", "repository": { diff --git a/sdks/cli/package.json b/sdks/cli/package.json index 0f85a6e..ef679e3 100644 --- a/sdks/cli/package.json +++ b/sdks/cli/package.json @@ -1,6 +1,6 @@ { "name": "@sandbox-agent/cli", - "version": "0.1.6-rc.1", + "version": "0.1.6-rc.2", "description": "CLI for sandbox-agent - run AI coding agents in sandboxes", "license": "Apache-2.0", "repository": { diff --git a/sdks/cli/platforms/darwin-arm64/package.json b/sdks/cli/platforms/darwin-arm64/package.json index cd66e2b..4add2f8 100644 --- a/sdks/cli/platforms/darwin-arm64/package.json +++ b/sdks/cli/platforms/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@sandbox-agent/cli-darwin-arm64", - "version": "0.1.6-rc.1", + "version": "0.1.6-rc.2", "description": "sandbox-agent CLI binary for macOS ARM64", "license": "Apache-2.0", "repository": { diff --git a/sdks/cli/platforms/darwin-x64/package.json b/sdks/cli/platforms/darwin-x64/package.json index 02d8f00..b705112 100644 --- a/sdks/cli/platforms/darwin-x64/package.json +++ b/sdks/cli/platforms/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@sandbox-agent/cli-darwin-x64", - "version": "0.1.6-rc.1", + "version": "0.1.6-rc.2", "description": "sandbox-agent CLI binary for macOS x64", "license": "Apache-2.0", "repository": { diff --git a/sdks/cli/platforms/linux-arm64/package.json b/sdks/cli/platforms/linux-arm64/package.json index f4b12f7..0d51d94 100644 --- a/sdks/cli/platforms/linux-arm64/package.json +++ b/sdks/cli/platforms/linux-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@sandbox-agent/cli-linux-arm64", - "version": "0.1.6-rc.1", + "version": "0.1.6-rc.2", "description": "sandbox-agent CLI binary for Linux arm64", "license": "Apache-2.0", "repository": { diff --git a/sdks/cli/platforms/linux-x64/package.json b/sdks/cli/platforms/linux-x64/package.json index b07eb77..8624724 100644 --- a/sdks/cli/platforms/linux-x64/package.json +++ b/sdks/cli/platforms/linux-x64/package.json @@ -1,6 +1,6 @@ { "name": "@sandbox-agent/cli-linux-x64", - "version": "0.1.6-rc.1", + "version": "0.1.6-rc.2", "description": "sandbox-agent CLI binary for Linux x64", "license": "Apache-2.0", "repository": { diff --git a/sdks/cli/platforms/win32-x64/package.json b/sdks/cli/platforms/win32-x64/package.json index 6dbb302..ccdd2c2 100644 --- a/sdks/cli/platforms/win32-x64/package.json +++ b/sdks/cli/platforms/win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@sandbox-agent/cli-win32-x64", - "version": "0.1.6-rc.1", + "version": "0.1.6-rc.2", "description": "sandbox-agent CLI binary for Windows x64", "license": "Apache-2.0", "repository": { diff --git a/sdks/typescript/package.json b/sdks/typescript/package.json index 29bb10e..2f3c94c 100644 --- a/sdks/typescript/package.json +++ b/sdks/typescript/package.json @@ -1,6 +1,6 @@ { "name": "sandbox-agent", - "version": "0.1.6-rc.1", + "version": "0.1.6-rc.2", "description": "Universal API for automatic coding agents in sandboxes. Supprots Claude Code, Codex, OpenCode, and Amp.", "license": "Apache-2.0", "repository": { From f3a8c8235aa0af558d5130988403cd965e6ced9f Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 4 Feb 2026 14:03:16 -0800 Subject: [PATCH 5/8] fix: override React types to v18 to fix lucide-react compatibility --- package.json | 6 ++++++ pnpm-lock.yaml | 50 +++++++++++++++++++------------------------------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index a8566b6..f86cc47 100644 --- a/package.json +++ b/package.json @@ -12,5 +12,11 @@ "devDependencies": { "turbo": "^2.4.0", "vitest": "^3.0.0" + }, + "pnpm": { + "overrides": { + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0" + } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64e4230..5bfc5da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,10 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + '@types/react': ^18.3.3 + '@types/react-dom': ^18.3.0 + importers: .: @@ -37,11 +41,11 @@ importers: specifier: latest version: 25.2.0 '@types/react': - specifier: ^19.1.0 - version: 19.2.10 + specifier: ^18.3.3 + version: 18.3.27 '@types/react-dom': - specifier: ^19.1.0 - version: 19.2.3(@types/react@19.2.10) + specifier: ^18.3.0 + version: 18.3.7(@types/react@18.3.27) '@vitejs/plugin-react': specifier: ^4.5.0 version: 4.7.0(vite@6.4.1(@types/node@25.2.0)(jiti@1.21.7)(tsx@4.21.0)(yaml@2.8.2)) @@ -200,7 +204,7 @@ importers: dependencies: '@astrojs/react': specifier: ^4.2.0 - version: 4.4.2(@types/node@25.2.0)(@types/react-dom@19.2.3(@types/react@19.2.10))(@types/react@19.2.10)(jiti@1.21.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(tsx@4.21.0)(yaml@2.8.2) + version: 4.4.2(@types/node@25.2.0)(@types/react-dom@18.3.7(@types/react@18.3.27))(@types/react@18.3.27)(jiti@1.21.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(tsx@4.21.0)(yaml@2.8.2) '@astrojs/tailwind': specifier: ^6.0.0 version: 6.0.2(astro@5.16.15(@types/node@25.2.0)(jiti@1.21.7)(rollup@4.56.0)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.2))(tailwindcss@3.4.19(tsx@4.21.0)(yaml@2.8.2)) @@ -224,11 +228,11 @@ importers: version: 3.4.19(tsx@4.21.0)(yaml@2.8.2) devDependencies: '@types/react': - specifier: ^19.0.0 - version: 19.2.10 + specifier: ^18.3.3 + version: 18.3.27 '@types/react-dom': - specifier: ^19.0.0 - version: 19.2.3(@types/react@19.2.10) + specifier: ^18.3.0 + version: 18.3.7(@types/react@18.3.27) typescript: specifier: ^5.7.0 version: 5.9.3 @@ -428,8 +432,8 @@ packages: resolution: {integrity: sha512-1tl95bpGfuaDMDn8O3x/5Dxii1HPvzjvpL2YTuqOOrQehs60I2DKiDgh1jrKc7G8lv+LQT5H15V6QONQ+9waeQ==} engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0} peerDependencies: - '@types/react': ^17.0.50 || ^18.0.21 || ^19.0.0 - '@types/react-dom': ^17.0.17 || ^18.0.6 || ^19.0.0 + '@types/react': ^18.3.3 + '@types/react-dom': ^18.3.0 react: ^17.0.2 || ^18.0.0 || ^19.0.0 react-dom: ^17.0.2 || ^18.0.0 || ^19.0.0 @@ -2208,19 +2212,11 @@ packages: '@types/react-dom@18.3.7': resolution: {integrity: sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==} peerDependencies: - '@types/react': ^18.0.0 - - '@types/react-dom@19.2.3': - resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==} - peerDependencies: - '@types/react': ^19.2.0 + '@types/react': ^18.3.3 '@types/react@18.3.27': resolution: {integrity: sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==} - '@types/react@19.2.10': - resolution: {integrity: sha512-WPigyYuGhgZ/cTPRXB2EwUw+XvsRA3GqHlsP4qteqrnnjDrApbS7MxcGr/hke5iUoeB7E/gQtrs9I37zAJ0Vjw==} - '@types/semver@7.7.1': resolution: {integrity: sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==} @@ -4561,10 +4557,10 @@ snapshots: dependencies: prismjs: 1.30.0 - '@astrojs/react@4.4.2(@types/node@25.2.0)(@types/react-dom@19.2.3(@types/react@19.2.10))(@types/react@19.2.10)(jiti@1.21.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(tsx@4.21.0)(yaml@2.8.2)': + '@astrojs/react@4.4.2(@types/node@25.2.0)(@types/react-dom@18.3.7(@types/react@18.3.27))(@types/react@18.3.27)(jiti@1.21.7)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(tsx@4.21.0)(yaml@2.8.2)': dependencies: - '@types/react': 19.2.10 - '@types/react-dom': 19.2.3(@types/react@19.2.10) + '@types/react': 18.3.27 + '@types/react-dom': 18.3.7(@types/react@18.3.27) '@vitejs/plugin-react': 4.7.0(vite@6.4.1(@types/node@25.2.0)(jiti@1.21.7)(tsx@4.21.0)(yaml@2.8.2)) react: 19.2.4 react-dom: 19.2.4(react@19.2.4) @@ -6480,19 +6476,11 @@ snapshots: dependencies: '@types/react': 18.3.27 - '@types/react-dom@19.2.3(@types/react@19.2.10)': - dependencies: - '@types/react': 19.2.10 - '@types/react@18.3.27': dependencies: '@types/prop-types': 15.7.15 csstype: 3.2.3 - '@types/react@19.2.10': - dependencies: - csstype: 3.2.3 - '@types/semver@7.7.1': {} '@types/ssh2@1.15.5': From 689e13c79b3c76e5c42a7d3d585fc588e1cf4b5a Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 4 Feb 2026 14:08:04 -0800 Subject: [PATCH 6/8] fix: remove g++-multilib from ARM64 Dockerfile (not available on ARM) --- docker/release/linux-aarch64.Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/release/linux-aarch64.Dockerfile b/docker/release/linux-aarch64.Dockerfile index 7b771b4..95173f5 100644 --- a/docker/release/linux-aarch64.Dockerfile +++ b/docker/release/linux-aarch64.Dockerfile @@ -29,7 +29,7 @@ RUN cd frontend/packages/inspector && pnpm exec vite build FROM rust:1.88.0 AS base -# Install dependencies +# Install dependencies (no g++-multilib on ARM64 - it's only for x86) RUN apt-get update && apt-get install -y \ musl-tools \ musl-dev \ @@ -40,7 +40,6 @@ RUN apt-get update && apt-get install -y \ pkg-config \ ca-certificates \ g++ \ - g++-multilib \ git \ curl && \ rm -rf /var/lib/apt/lists/* && \ From 8b718ad28f18957b3ad8b94f48572444bc8355c4 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 4 Feb 2026 14:12:11 -0800 Subject: [PATCH 7/8] fix: use native compilation for ARM64 builds (not cross-compile) --- docker/release/linux-aarch64.Dockerfile | 31 +++++++++++-------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/docker/release/linux-aarch64.Dockerfile b/docker/release/linux-aarch64.Dockerfile index 95173f5..9796a4e 100644 --- a/docker/release/linux-aarch64.Dockerfile +++ b/docker/release/linux-aarch64.Dockerfile @@ -29,7 +29,8 @@ RUN cd frontend/packages/inspector && pnpm exec vite build FROM rust:1.88.0 AS base -# Install dependencies (no g++-multilib on ARM64 - it's only for x86) +# Install dependencies for native ARM64 build with musl +# Note: This Dockerfile runs on ARM64 runners, so we use native compilation RUN apt-get update && apt-get install -y \ musl-tools \ musl-dev \ @@ -42,24 +43,20 @@ RUN apt-get update && apt-get install -y \ g++ \ git \ curl && \ - rm -rf /var/lib/apt/lists/* && \ - wget -q https://github.com/cross-tools/musl-cross/releases/latest/download/aarch64-unknown-linux-musl.tar.xz && \ - tar -xf aarch64-unknown-linux-musl.tar.xz -C /opt/ && \ - rm aarch64-unknown-linux-musl.tar.xz + rm -rf /var/lib/apt/lists/* -# Install musl targets +# Install musl target for Rust RUN rustup target add aarch64-unknown-linux-musl -# Set environment variables -ENV PATH="/opt/aarch64-unknown-linux-musl/bin:$PATH" \ - LIBCLANG_PATH=/usr/lib/llvm-14/lib \ +# Set environment variables for native musl build +ENV LIBCLANG_PATH=/usr/lib/llvm-14/lib \ CLANG_PATH=/usr/bin/clang-14 \ - CC_aarch64_unknown_linux_musl=aarch64-unknown-linux-musl-gcc \ - CXX_aarch64_unknown_linux_musl=aarch64-unknown-linux-musl-g++ \ - AR_aarch64_unknown_linux_musl=aarch64-unknown-linux-musl-ar \ - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-unknown-linux-musl-gcc \ + CC_aarch64_unknown_linux_musl=musl-gcc \ + CXX_aarch64_unknown_linux_musl=g++ \ + AR_aarch64_unknown_linux_musl=ar \ + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \ CARGO_INCREMENTAL=0 \ - RUSTFLAGS="-C target-feature=+crt-static -C link-arg=-static-libgcc" \ + RUSTFLAGS="-C target-feature=+crt-static" \ CARGO_NET_GIT_FETCH_WITH_CLI=true # Set working directory @@ -72,12 +69,12 @@ FROM base AS aarch64-builder ARG SANDBOX_AGENT_VERSION ENV SANDBOX_AGENT_VERSION=${SANDBOX_AGENT_VERSION} -# Set up OpenSSL for aarch64 musl target (cross-compile from x86_64) +# Set up OpenSSL for aarch64 musl target (native build on ARM64) ENV SSL_VER=1.1.1w RUN wget https://www.openssl.org/source/openssl-$SSL_VER.tar.gz \ && tar -xzf openssl-$SSL_VER.tar.gz \ && cd openssl-$SSL_VER \ - && ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl --cross-compile-prefix=aarch64-unknown-linux-musl- linux-aarch64 \ + && CC=musl-gcc ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl linux-aarch64 \ && make -j$(nproc) \ && make install_sw \ && cd .. \ @@ -87,7 +84,7 @@ RUN wget https://www.openssl.org/source/openssl-$SSL_VER.tar.gz \ ENV OPENSSL_DIR=/musl \ OPENSSL_INCLUDE_DIR=/musl/include \ OPENSSL_LIB_DIR=/musl/lib \ - PKG_CONFIG_ALLOW_CROSS=1 + OPENSSL_STATIC=1 # Copy the source code COPY . . From 79a4c4ec16e2d3d3df3483fc6723804e56f282c5 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 4 Feb 2026 14:16:27 -0800 Subject: [PATCH 8/8] fix: use Alpine-based Rust image for native musl ARM64 builds --- docker/release/linux-aarch64.Dockerfile | 43 ++++++++++++------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/docker/release/linux-aarch64.Dockerfile b/docker/release/linux-aarch64.Dockerfile index 9796a4e..2924a18 100644 --- a/docker/release/linux-aarch64.Dockerfile +++ b/docker/release/linux-aarch64.Dockerfile @@ -27,34 +27,33 @@ RUN cd sdks/typescript && SKIP_OPENAPI_GEN=1 pnpm exec tsup COPY frontend/packages/inspector ./frontend/packages/inspector RUN cd frontend/packages/inspector && pnpm exec vite build -FROM rust:1.88.0 AS base +# Use Alpine-based Rust image which has native musl support +FROM rust:1.88.0-alpine AS base -# Install dependencies for native ARM64 build with musl -# Note: This Dockerfile runs on ARM64 runners, so we use native compilation -RUN apt-get update && apt-get install -y \ - musl-tools \ +# Install dependencies for native ARM64 musl build +RUN apk add --no-cache \ musl-dev \ - llvm-14-dev \ - libclang-14-dev \ - clang-14 \ - libssl-dev \ - pkg-config \ + clang \ + llvm \ + openssl-dev \ + openssl-libs-static \ + pkgconfig \ ca-certificates \ - g++ \ git \ - curl && \ - rm -rf /var/lib/apt/lists/* + curl \ + build-base \ + linux-headers \ + perl \ + make -# Install musl target for Rust +# Install musl target for Rust (should be native on Alpine) RUN rustup target add aarch64-unknown-linux-musl # Set environment variables for native musl build -ENV LIBCLANG_PATH=/usr/lib/llvm-14/lib \ - CLANG_PATH=/usr/bin/clang-14 \ - CC_aarch64_unknown_linux_musl=musl-gcc \ - CXX_aarch64_unknown_linux_musl=g++ \ - AR_aarch64_unknown_linux_musl=ar \ - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \ +ENV LIBCLANG_PATH=/usr/lib \ + CC=gcc \ + CXX=g++ \ + AR=ar \ CARGO_INCREMENTAL=0 \ RUSTFLAGS="-C target-feature=+crt-static" \ CARGO_NET_GIT_FETCH_WITH_CLI=true @@ -69,12 +68,12 @@ FROM base AS aarch64-builder ARG SANDBOX_AGENT_VERSION ENV SANDBOX_AGENT_VERSION=${SANDBOX_AGENT_VERSION} -# Set up OpenSSL for aarch64 musl target (native build on ARM64) +# Build OpenSSL with musl (native on Alpine ARM64) ENV SSL_VER=1.1.1w RUN wget https://www.openssl.org/source/openssl-$SSL_VER.tar.gz \ && tar -xzf openssl-$SSL_VER.tar.gz \ && cd openssl-$SSL_VER \ - && CC=musl-gcc ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl linux-aarch64 \ + && ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl linux-aarch64 \ && make -j$(nproc) \ && make install_sw \ && cd .. \