fix: detect musl/glibc at runtime for correct Claude binary download

Previously used cfg!(target_env = "musl") which checks compile-time,
causing musl-compiled sandbox-agent to always download musl binaries
even on glibc systems like Debian/E2B.

Now checks for /lib/ld-musl-*.so.1 at runtime to detect the actual
system libc and download the correct Claude binary variant.
This commit is contained in:
Nathan Flurry 2026-01-28 04:19:35 -08:00
parent 0bbe92b344
commit cbd36eeca8
12 changed files with 228 additions and 194 deletions

View file

@ -1,18 +0,0 @@
{
"name": "@sandbox-agent/example-vercel",
"private": true,
"type": "module",
"scripts": {
"start": "tsx src/vercel-sandbox.ts",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@vercel/sandbox": "latest",
"@sandbox-agent/example-shared": "workspace:*"
},
"devDependencies": {
"@types/node": "latest",
"tsx": "latest",
"typescript": "latest"
}
}