SIGN IN SIGN UP

fix(sandbox-vercel): support @vercel/sandbox v3 (#19368)

## Summary

- Support `@vercel/sandbox` v2 and v3, and upgrade the repository
examples to v3.
- Preserve the existing `node24` runtime when callers omit both
`runtime` and `image`.
- Allow callers to opt into v3 managed images with the existing `image`
setting.
- Let snapshot restores and template forks inherit their environment
without conflicting `runtime` or `image` fields.
- Use `structuredClone` for network policies so v3’s mutually exclusive
rule variants remain intact.

## Upgrade behavior

- Calls without `runtime` or `image` continue using the Node 24 runtime
and require no code changes.
- Existing lockfiles may continue resolving `@vercel/sandbox` v2.
- Consumers already using Sandbox v3 can remove dependency overrides
after upgrading this adapter.
- Fresh installs resolve v3 while retaining the adapter’s previous
default environment.
- Managed images are opt-in.
B
Bryan Hunter committed
7ab0f88b53ca700b8e383b82e6c4cb4f1dcd38e1
Parent: b251584
Committed by GitHub <noreply@github.com> on 8/24/2026, 8:45:27 PM