withruntime 0.35.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BLAXEL.md +207 -204
- package/COMPATIBILITY.md +367 -337
- package/DAYTONA.md +180 -173
- package/E2B.md +246 -230
- package/README.md +182 -142
- package/README.src.md +182 -142
- package/VERCEL.md +173 -168
- package/agent-platforms-inventory.json +387 -0
- package/dist/agents-cli.d.ts +7 -1
- package/dist/agents-cli.js +470 -6
- package/dist/agents-deploy.d.ts +1 -1
- package/dist/agents-deploy.js +62 -1
- package/dist/apps-cli.d.ts +3 -3
- package/dist/apps-cli.js +10 -5
- package/dist/browsers-cli.d.ts +1 -1
- package/dist/browsers-cli.js +122 -3
- package/dist/ci-cli.d.ts +11 -1
- package/dist/ci-cli.js +69 -6
- package/dist/cli-update.d.ts +11 -0
- package/dist/cli-update.js +46 -0
- package/dist/cli-words.js +1 -0
- package/dist/cli.d.ts +4 -6
- package/dist/cli.js +249 -58
- package/dist/daytona/daytona.js +1 -1
- package/dist/e2b/sandbox.d.ts +6 -5
- package/dist/e2b/sandbox.js +6 -5
- package/dist/errors.d.ts +4 -3
- package/dist/errors.js +7 -3
- package/dist/index.d.ts +5 -5
- package/dist/inngest/index.d.ts +96 -0
- package/dist/inngest/index.js +183 -0
- package/dist/jobs-code/cron.d.ts +12 -0
- package/dist/jobs-code/cron.js +93 -0
- package/dist/jobs-code/registry.d.ts +31 -0
- package/dist/jobs-code/registry.js +30 -0
- package/dist/jobs-code/runner.d.ts +1 -0
- package/dist/jobs-code/runner.js +74 -0
- package/dist/jobs-deploy.d.ts +22 -0
- package/dist/jobs-deploy.js +247 -0
- package/dist/jobs-import.d.ts +15 -0
- package/dist/jobs-import.js +231 -0
- package/dist/products/agents.d.ts +413 -2
- package/dist/products/agents.js +176 -0
- package/dist/products/apps.d.ts +2 -1
- package/dist/products/browsers.d.ts +87 -0
- package/dist/products/browsers.js +67 -0
- package/dist/products/builds.d.ts +11 -2
- package/dist/products/ci.d.ts +21 -1
- package/dist/products/jobs.d.ts +77 -0
- package/dist/products/jobs.js +5 -0
- package/dist/products/observability.d.ts +31 -3
- package/dist/products/plans.d.ts +5 -3
- package/dist/products/secrets.d.ts +67 -14
- package/dist/products/secrets.js +41 -12
- package/dist/transport.d.ts +6 -1
- package/dist/transport.js +38 -1
- package/dist/trigger/index.d.ts +202 -0
- package/dist/trigger/index.js +244 -0
- package/dist/types.d.ts +14 -0
- package/package.json +14 -3
package/VERCEL.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Code written for Vercel Sandbox, on Runtime
|
|
2
2
|
|
|
3
3
|
Run code written for [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox)'s
|
|
4
|
-
SDK on Runtime Cloud by changing one import.
|
|
5
|
-
(`withruntime`)
|
|
4
|
+
SDK on Runtime Cloud by changing one import. This is part of Runtime's SDK
|
|
5
|
+
(`withruntime`). It uses the same client, so it gets that SDK's retries,
|
|
6
6
|
idempotency keys and errors. Importing `withruntime` alone does not load it.
|
|
7
7
|
|
|
8
8
|
```ts no-run
|
|
@@ -16,208 +16,213 @@ from withruntime.vercel import sandbox # was: from vercel import sandbox
|
|
|
16
16
|
from withruntime.vercel.sandbox import sync as sandbox # was: from vercel.sandbox import sync as sandbox
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The JavaScript mapping was checked against `@vercel/sandbox` 3.8.0 on
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
0.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
drop-in has never offered (`withruntime.vercel` exports `sandbox` and
|
|
34
|
-
`api`), so nothing changes; the inventory's 684 Python items are unchanged.
|
|
19
|
+
The JavaScript mapping was checked against `@vercel/sandbox` 3.8.0 on 15 October 2026. The Python mapping was checked against `vercel-sandbox` 0.9.1 on PyPI (the
|
|
20
|
+
`vercel.sandbox` module of `vercel` 0.12.0), also on 15 October 2026. Version
|
|
21
|
+
0.9.0 added `get_drive`. It raises `NotSupportedError`, as the other Drive calls do.
|
|
22
|
+
|
|
23
|
+
Python review, 15 October 2026: each pinned wheel and sdist matched its SHA-256 in
|
|
24
|
+
`compatibility-lock.json`. Each new one matched the PyPI digest. Each new wheel's
|
|
25
|
+
source matched its sdist. The files were compared one by one. Nothing was installed
|
|
26
|
+
or run. `vercel-sandbox` 0.9.1 changes only its version and its
|
|
27
|
+
`vercel-internal-core` floor (0.2.2). No sandbox source changes. `vercel` 0.12.0
|
|
28
|
+
moves `vercel.blob` into the separate `vercel-blob` package, which is a new
|
|
29
|
+
dependency. It removes its own Blob code. It raises its floors (`vercel-sandbox`
|
|
30
|
+
0.9.1). Blob is Vercel's storage product, which the drop-in has never offered.
|
|
31
|
+
`withruntime.vercel` exports `sandbox` and `api`. So nothing changes here. The
|
|
32
|
+
inventory's 684 Python items are unchanged.
|
|
35
33
|
|
|
36
34
|
## Keys
|
|
37
35
|
|
|
38
|
-
The package uses, in order:
|
|
39
|
-
|
|
40
|
-
A
|
|
41
|
-
`RUNTIME_API_KEY
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
The package uses these keys, in this order:
|
|
37
|
+
|
|
38
|
+
1. A Runtime key (`rtcloud_...`) passed as `token`.
|
|
39
|
+
2. `RUNTIME_API_KEY`.
|
|
40
|
+
3. The key that `npx withruntime login` saved on this machine.
|
|
41
|
+
|
|
42
|
+
A Vercel token or an OIDC token is never sent anywhere. If one is passed as
|
|
43
|
+
`token` and `RUNTIME_API_KEY` is not set, the call throws `AuthenticationError`
|
|
44
|
+
(Python: `SandboxCredentialsError`). `teamId` and `projectId` have no meaning on
|
|
45
|
+
Runtime, so they are ignored.
|
|
44
46
|
|
|
45
47
|
## What a sandbox gets
|
|
46
48
|
|
|
47
|
-
- **Machine:** Vercel's default, 2 vCPUs with 2048 MiB each.
|
|
48
|
-
|
|
49
|
-
- **Timeout:** none unless you pass one
|
|
50
|
-
pauses itself when idle. A `timeout` is kept as a Runtime time limit
|
|
51
|
-
runs 60 seconds to an hour. A longer `timeout` (Python
|
|
52
|
-
hour's lease
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
- **Machine:** Vercel's default, 2 vCPUs with 2048 MiB each. `resources: { vcpus }`
|
|
50
|
+
sets another count, with 2048 MiB per vCPU.
|
|
51
|
+
- **Timeout:** none, unless you pass one. The sandbox runs while it works, and
|
|
52
|
+
pauses itself when it is idle. A `timeout` is kept as a Runtime time limit. It
|
|
53
|
+
runs from 60 seconds up to an hour. A longer `timeout` (Python
|
|
54
|
+
`execution_time_limit`) starts with an hour's lease. The sandbox object renews
|
|
55
|
+
the lease toward the timeout while the sandbox lives. It never renews past the
|
|
56
|
+
timeout. When the program ends, the sandbox pauses within an hour.
|
|
57
|
+
`extendTimeout` moves the end later, as often as you need.
|
|
55
58
|
- **Persistence:** persistent by default, as in Vercel. `stop()` and the end of
|
|
56
|
-
the timeout pause the sandbox
|
|
57
|
-
processes. `Sandbox.get({ name })`, or the next command or file call, wakes
|
|
58
|
-
it. A paused sandbox is kept
|
|
59
|
-
the trial, or `snapshotExpiration
|
|
59
|
+
the timeout pause the sandbox. The sandbox keeps its files, and also its memory
|
|
60
|
+
and processes. `Sandbox.get({ name })`, or the next command or file call, wakes
|
|
61
|
+
it. A paused sandbox is kept under Runtime's retention: 30 days on credit, 7
|
|
62
|
+
days on the trial, or `snapshotExpiration`. It is billed as paused storage. With
|
|
60
63
|
`persistent: false`, `stop()` ends the sandbox. `delete()` always ends it.
|
|
61
64
|
- **Ports:** each port in `ports` is shared at a public HTTPS address (a Runtime
|
|
62
|
-
preview) when the sandbox is created
|
|
63
|
-
browser sees a one-time page
|
|
64
|
-
- **Funding:** left to Runtime, as `withruntime`'s own `create()` does
|
|
65
|
-
trial while the account has trial time,
|
|
66
|
-
`withruntime: { create: { funding: "trial" } }`
|
|
67
|
-
`runtime_create={"funding": "trial"}`)
|
|
65
|
+
preview) when the sandbox is created. So `domain(port)` answers at once. A
|
|
66
|
+
browser first sees a one-time page that names Runtime, before the site.
|
|
67
|
+
- **Funding:** left to Runtime, as `withruntime`'s own `create()` does. The free
|
|
68
|
+
trial is used while the account has trial time. After that, prepaid credit is
|
|
69
|
+
used. To use only the trial, pass `withruntime: { create: { funding: "trial" } }`
|
|
70
|
+
(Python: `runtime_create={"funding": "trial"}`).
|
|
68
71
|
- **Anything else Runtime offers:** `withruntime: { create: { ... } }` sends
|
|
69
|
-
Runtime's create fields as they are. `sandbox.withruntime` is the Runtime
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
Runtime's create fields as they are. `sandbox.withruntime` is the Runtime sandbox
|
|
73
|
+
underneath. The key is `withruntime`, because Vercel's `runtime` names a Node.js
|
|
74
|
+
or Python version.
|
|
72
75
|
|
|
73
76
|
## Mapping
|
|
74
77
|
|
|
75
|
-
| Vercel Sandbox | On Runtime
|
|
76
|
-
| --------------------------------------------------------------------- |
|
|
77
|
-
| `Sandbox.create({ name, timeout, resources, env, tags, ports })` | `sandboxes.create
|
|
78
|
-
| `image`, legacy `runtime` | Vercel's managed images and runtimes
|
|
79
|
-
| `source: { type: "git", url, depth, revision, username, password }` | Cloned into the working directory after create
|
|
80
|
-
| `source: { type: "tarball", url }`, `{ type: "snapshot" }` | Downloaded and unpacked into the working directory
|
|
81
|
-
| `networkPolicy`, `updateNetworkPolicy` | Runtime network rules: `allow-all`, `deny-all`, or a list of domains and subnets to allow and deny.
|
|
82
|
-
| `Sandbox.get({ name })`, `getOrCreate`, `list({ tags })` | The newest live sandbox with that name (or a Runtime
|
|
83
|
-
| `list({ namePrefix, since, until, sortBy, sortOrder, cursor })` | Applied here over every sandbox the key
|
|
84
|
-
| `createUser`, `asUser`, `createGroup`, `addUserToGroup` | `useradd`, `groupadd` and `usermod
|
|
85
|
-
| `Sandbox.fork({ sourceSandbox, name })` | A Runtime fork
|
|
86
|
-
| `runCommand(cmd, args)`, `runCommand({ cmd, args, cwd, env, sudo })` | `exec` of the
|
|
87
|
-
| `stdout`, `stderr` writers, `detached: true`, `logs()`, `wait()` | Output streams to the writers
|
|
88
|
-
| `getCommand(cmdId)`, `kill(signal)` | Runtime processes by
|
|
89
|
-
| `writeFiles`, `readFile`, `readFileToBuffer`, `downloadFile`, `mkDir` | Runtime's files API. `mode` is set with `chmod`. A missing file
|
|
90
|
-
| `sandbox.fs` | `node:fs/promises` over the files API and coreutils, with Node's error codes.
|
|
91
|
-
| Paths | Relative paths resolve from `/vercel/sandbox`, which is `/workspace`. A command that names `/vercel/sandbox` finds a link to it.
|
|
92
|
-
| `domain(port)`, `update({ ports })` | The public preview of that port
|
|
93
|
-
| `stop()`, `delete()`, `extendTimeout(ms)` | `pause` (persistent) or `stop
|
|
94
|
-
| `update({ timeout, networkPolicy, snapshotExpiration })` | A new timeout (earlier only while the lease has not reached it), network rules, retention.
|
|
95
|
-
| `snapshot()`, `Snapshot.get`, `Snapshot.list`, `snapshot.delete()` | A verified disk-only capture
|
|
96
|
-
| Error classes | `APIError
|
|
97
|
-
| Python: `create_sandbox`, `run_process`, `create_process`, `box.fs` | The same mapping
|
|
78
|
+
| Vercel Sandbox | On Runtime |
|
|
79
|
+
| --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
80
|
+
| `Sandbox.create({ name, timeout, resources, env, tags, ports })` | `sandboxes.create`, with `name`, `timeoutSeconds`, `vcpu`, `memoryMiB` and labels. `env` is given to every command run through this object. |
|
|
81
|
+
| `image`, legacy `runtime` | Vercel's managed images and runtimes map to Runtime's stock image. Any other name must be a ready Runtime image with that name. |
|
|
82
|
+
| `source: { type: "git", url, depth, revision, username, password }` | Cloned into the working directory after create. Credentials reach git through the environment. |
|
|
83
|
+
| `source: { type: "tarball", url }`, `{ type: "snapshot" }` | Downloaded and unpacked into the working directory. A Runtime snapshot has its own shape. |
|
|
84
|
+
| `networkPolicy`, `updateNetworkPolicy` | Runtime network rules: `allow-all`, `deny-all`, or a list of domains and subnets to allow and deny. |
|
|
85
|
+
| `Sandbox.get({ name })`, `getOrCreate`, `list({ tags })` | The newest live sandbox with that name (or a Runtime ID), woken. Created if missing. `sandboxes.list` with Vercel's paginator. |
|
|
86
|
+
| `list({ namePrefix, since, until, sortBy, sortOrder, cursor })` | Applied here, over every sandbox the key can see. The cursor continues the same order. Python's `query_sandboxes` does the same. |
|
|
87
|
+
| `createUser`, `asUser`, `createGroup`, `addUserToGroup` | `useradd`, `groupadd` and `usermod`, run with `sudo`, as Vercel does. A user's commands run under `sudo -u` in its home directory. Its files are given to it. |
|
|
88
|
+
| `Sandbox.fork({ sourceSandbox, name })` | A Runtime fork. It copies memory and processes too. |
|
|
89
|
+
| `runCommand(cmd, args)`, `runCommand({ cmd, args, cwd, env, sudo })` | `exec` of the argument list, without a shell. `sudo` runs it under `sudo --preserve-env`. A non-zero exit is a result. Past `timeoutMs`, the command exits with 137. |
|
|
90
|
+
| `stdout`, `stderr` writers, `detached: true`, `logs()`, `wait()` | Output streams to the writers. A detached command is a Runtime process. Its logs are followed from the start. |
|
|
91
|
+
| `getCommand(cmdId)`, `kill(signal)` | Runtime processes, by ID. Signals by name or number. |
|
|
92
|
+
| `writeFiles`, `readFile`, `readFileToBuffer`, `downloadFile`, `mkDir` | Runtime's files API. `mode` is set with `chmod`. A missing file returns `null`, as in Vercel. |
|
|
93
|
+
| `sandbox.fs` | `node:fs/promises` over the files API and coreutils, with Node's error codes. |
|
|
94
|
+
| Paths | Relative paths resolve from `/vercel/sandbox`, which is `/workspace`. A command that names `/vercel/sandbox` finds a link to it. |
|
|
95
|
+
| `domain(port)`, `update({ ports })` | The public preview of that port. Ports are added or removed. |
|
|
96
|
+
| `stop()`, `delete()`, `extendTimeout(ms)` | `pause` (for a persistent sandbox) or `stop`. Then `stop`. Then `extend`. |
|
|
97
|
+
| `update({ timeout, networkPolicy, snapshotExpiration })` | A new timeout (earlier only while the lease has not reached it), network rules, and retention. |
|
|
98
|
+
| `snapshot()`, `Snapshot.get`, `Snapshot.list`, `snapshot.delete()` | A verified disk-only capture. Then the source stops. A restored snapshot starts fresh processes. `snapshots.get`, `list` and `delete`. |
|
|
99
|
+
| Error classes | `APIError`, with a `response` whose status is Runtime's, and `json` of `{ error: { code, message } }`. It also carries `code`, `hint` and `requestId`. |
|
|
100
|
+
| Python: `create_sandbox`, `run_process`, `create_process`, `box.fs` | The same mapping. Operations are awaited, or used as context managers. A context manager stops the sandbox, and by default destroys it. Readers iterate by line. |
|
|
98
101
|
|
|
99
102
|
## Gaps
|
|
100
103
|
|
|
101
|
-
Each of these throws `NotSupportedError` before anything happens.
|
|
102
|
-
`feature` names the gap
|
|
103
|
-
|
|
104
|
-
| Vercel Sandbox | Use instead
|
|
105
|
-
| ---------------------------------------------------------- |
|
|
106
|
-
| An `image` with no Runtime image of that name | Build it: `npx withruntime images build --dockerfile Dockerfile --name <image>`.
|
|
107
|
-
| Drives (`mounts`), `networkId` | Runtime volumes through `withruntime: { create: { volumes } }
|
|
108
|
-
| A region outside the US, `failoverRegions` | Runtime runs in one US region.
|
|
109
|
-
| Network rules that transform or forward requests | Allow the domain and store the credential as a Runtime secret for it
|
|
110
|
-
| A `timeout` earlier than the current lease's end | Stop the sandbox when you are done with it.
|
|
111
|
-
| Sessions (`currentSession`, `listSessions`) | A Runtime sandbox is its own session.
|
|
112
|
-
| `openInteractive` (Python: `open_interactive`) | `sandbox.withruntime.terminal(...)
|
|
113
|
-
| `update` of tags, resources, persistence or region | Create a new sandbox with them.
|
|
114
|
-
| Overrides on `Sandbox.fork` | Fork, then change what Runtime
|
|
115
|
-
| `delete({ deleteOrphanSnapshots: true })`, `Snapshot.tree` | Delete snapshots one by one
|
|
116
|
-
| `Drive`, `defineSandboxProxy` | Runtime volumes
|
|
117
|
-
| `keepLastSnapshots` | Manage saved snapshots with `Snapshot.list` and `snapshot.delete`.
|
|
118
|
-
|
|
119
|
-
Explicit snapshots
|
|
120
|
-
that does not confirm disk-only capture is refused. If capture succeeds but
|
|
121
|
-
source cannot finish stopping, the error
|
|
122
|
-
`sourceSandboxId
|
|
123
|
-
them in `error.json.error.details` for API errors and directly on other errors
|
|
124
|
-
Python exposes them in `error.data` for API errors and directly on other errors.
|
|
125
|
-
`snapshot_source_stop_timeout` means the source is still stopping after its wait
|
|
126
|
-
|
|
127
|
-
partial
|
|
104
|
+
Each of these throws `NotSupportedError` before anything happens. The error's
|
|
105
|
+
`feature` names the gap. Its `alternative` says what to use.
|
|
106
|
+
|
|
107
|
+
| Vercel Sandbox | Use instead |
|
|
108
|
+
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
109
|
+
| An `image` with no Runtime image of that name | Build it: `npx withruntime images build --dockerfile Dockerfile --name <image>`. |
|
|
110
|
+
| Drives (`mounts`), `networkId` | Runtime volumes, through `withruntime: { create: { volumes } }`. Network rules. |
|
|
111
|
+
| A region outside the US, `failoverRegions` | Runtime runs in one US region. |
|
|
112
|
+
| Network rules that transform or forward requests | Allow the domain, and store the credential as a Runtime secret for it. The sandbox sees a placeholder. |
|
|
113
|
+
| A `timeout` earlier than the current lease's end | Stop the sandbox when you are done with it. |
|
|
114
|
+
| Sessions (`currentSession`, `listSessions`) | A Runtime sandbox is its own session. |
|
|
115
|
+
| `openInteractive` (Python: `open_interactive`) | `sandbox.withruntime.terminal(...)`, or `npx withruntime sandboxes shell <id>`. |
|
|
116
|
+
| `update` of tags, resources, persistence or region | Create a new sandbox with them. |
|
|
117
|
+
| Overrides on `Sandbox.fork` | Fork, then change what Runtime allows. |
|
|
118
|
+
| `delete({ deleteOrphanSnapshots: true })`, `Snapshot.tree` | Delete snapshots one by one, with `Snapshot.list` to find them. |
|
|
119
|
+
| `Drive`, `defineSandboxProxy` | Runtime volumes, or `sandbox.withruntime.previews`. |
|
|
120
|
+
| `keepLastSnapshots` | Manage saved snapshots with `Snapshot.list` and `snapshot.delete`. |
|
|
121
|
+
|
|
122
|
+
Explicit snapshots need the released native disk-capture capability. A server
|
|
123
|
+
that does not confirm disk-only capture is refused. If the capture succeeds but
|
|
124
|
+
the source cannot finish stopping, the error keeps `snapshotId` and
|
|
125
|
+
`sourceSandboxId`. That keeps the saved filesystem recoverable. JavaScript exposes
|
|
126
|
+
them in `error.json.error.details` for API errors, and directly on other errors.
|
|
127
|
+
Python exposes them in `error.data` for API errors, and directly on other errors.
|
|
128
|
+
`snapshot_source_stop_timeout` means the source is still stopping after its wait.
|
|
129
|
+
A failed stop request keeps its original error code. These contracts stay
|
|
130
|
+
partial. Controlled package comparisons do not prove hosted restoration.
|
|
128
131
|
|
|
129
132
|
Some differences are not refusals:
|
|
130
133
|
|
|
131
|
-
- A persistent sandbox keeps its memory and processes as well as its files
|
|
132
|
-
across `stop()
|
|
133
|
-
- Commands run as the sandbox owner, `runtime`, with passwordless `sudo`.
|
|
134
|
-
|
|
135
|
-
- Runtime's stock image is Ubuntu 24.04 with Python 3.12, Node.js 24 and Bun
|
|
136
|
-
Vercel's `universal` has Python 3.14.
|
|
134
|
+
- A persistent sandbox keeps its memory and processes, as well as its files,
|
|
135
|
+
across `stop()`. They carry on after a wake. Vercel starts them again.
|
|
136
|
+
- Commands run as the sandbox owner, `runtime`, with passwordless `sudo`. `pwd`
|
|
137
|
+
prints `/workspace`.
|
|
138
|
+
- Runtime's stock image is Ubuntu 24.04, with Python 3.12, Node.js 24 and Bun.
|
|
139
|
+
Vercel's `universal` image has Python 3.14.
|
|
137
140
|
- A git source is cloned into the working directory itself.
|
|
138
141
|
|
|
139
142
|
## JavaScript qualification, 15 October 2026
|
|
140
143
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
SHA-512 in `compatibility-lock.json
|
|
144
|
-
`npm view @vercel/sandbox@<version> dist.integrity
|
|
145
|
-
`sha512-2ib+Dl8W
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
The source maps name six changed TypeScript files and one new one
|
|
149
|
-
(`utils/pipe-stdin.ts`)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
| Upstream change
|
|
153
|
-
|
|
|
154
|
-
| 3.7.0: `runCommand({ stdin: true, detached: true })` keeps the command's stdin open
|
|
155
|
-
| 3.7.0: `Command.writeStdin(data, { abortSignal })` and `closeStdin({ abortSignal })`. Writes are queued in call order
|
|
156
|
-
| 3.7.0: `CommandFinished.writeStdin
|
|
157
|
-
| 3.7.0: `stdin` may be a `Readable`, attached or detached. It is written with backpressure and stdin closes when
|
|
158
|
-
| 3.7.0: `SandboxUser.runCommand` passes `stdin
|
|
159
|
-
| 3.8.0: `runCommand({ onStart })`, only when not detached
|
|
160
|
-
| `APIClient.writeCommandStdin
|
|
161
|
-
| `@vercel/oidc` 3.2.0
|
|
162
|
-
| Declarations reorder existing status union members
|
|
144
|
+
We reviewed the exact published npm tarballs for `@vercel/sandbox` 3.6.1, 3.7.0
|
|
145
|
+
and 3.8.0. 3.7.0 is the only stable release between them. 3.6.1 matched its
|
|
146
|
+
SHA-512 in `compatibility-lock.json`. 3.7.0 and 3.8.0 matched
|
|
147
|
+
`npm view @vercel/sandbox@<version> dist.integrity`. For 3.8.0, the value starts
|
|
148
|
+
`sha512-2ib+Dl8W...`. No downloaded package code was installed or run, except
|
|
149
|
+
inside the oracle's frozen install.
|
|
150
|
+
|
|
151
|
+
The source maps name six changed TypeScript files, and one new one
|
|
152
|
+
(`utils/pipe-stdin.ts`). CommonJS and ES-module builds match. `index.d.ts` exports
|
|
153
|
+
nothing new. These are the changes, and how each one is handled:
|
|
154
|
+
|
|
155
|
+
| Upstream change | Drop-in disposition |
|
|
156
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
157
|
+
| 3.7.0: `runCommand({ stdin: true, detached: true })` keeps the command's stdin open. `stdin: true` without `detached` throws `TypeError` before anything runs. When `stdin` is unset or false, stdin is empty, as before. | Followed. The process is spawned with Runtime's piped stdin (`stdinMode: "pipe"`). The same `TypeError` message is thrown before any request. Without `stdin`, nothing changes. |
|
|
158
|
+
| 3.7.0: `Command.writeStdin(data, { abortSignal })` and `closeStdin({ abortSignal })`. Writes are queued in call order and chunked. They are resent with byte offsets, so a retry never duplicates bytes. After a write that may be partial, later writes are refused. `closeStdin` still works. | Followed on Runtime's process input (`:write` with `offset` and `eof`). It already resends by offset, so no byte is written twice. Writes are queued in call order. A failed write refuses later ones, with upstream's message. The exception is when the API rejected a single request with a 4xx, which applied none of it. A `Command` from `getCommand` reads its offset from the process. |
|
|
159
|
+
| 3.7.0: `CommandFinished.writeStdin` and `closeStdin` always throw, because the command has exited. | Followed, with the same messages. |
|
|
160
|
+
| 3.7.0: `stdin` may be a `Readable`, attached or detached. It is written with backpressure, and stdin closes when the stream ends. The stream is never ended or destroyed. Attached: a piping failure kills the command and rejects `runCommand`. Detached: `wait()` rejects, and `stdinPipe` clears. If the command exits, or stops accepting input (404, `command_stdin_unavailable`), piping stops quietly. `Command.stdinPipe` is the internal pipe. | Followed. An attached command with a stream starts as a process. It waits on its output, and streams to the `stdout` and `stderr` writers as before. Reading pauses past 512 KiB while it waits. Runtime's "input closed" answer (409 `stdin_closed`), or a 404, stops piping quietly, as upstream's does. `stdinPipe` is exposed the same way. |
|
|
161
|
+
| 3.7.0: `SandboxUser.runCommand` passes `stdin`. 3.8.0 also passes `onStart`. | Followed. Both reach the sandbox's `runCommand` through the user's `sudo -u` wrapper. |
|
|
162
|
+
| 3.8.0: `runCommand({ onStart })`, only when not detached. The type forbids it with `detached: true`, and upstream ignores it there. It is called with the running `Command` as soon as the command starts, and awaited before `runCommand` resolves. | Followed, with the same type. The command starts as a Runtime process, so its `Command` (ID, `kill`, `logs`) exists before it exits. Output and truncation are reported as for any attached command. |
|
|
163
|
+
| `APIClient.writeCommandStdin`, and its stdin retry policy (429 with `Retry-After`, resends on 502, 503 and 504, offset probes). Also the `CommandStdinResponse` validator. | Internal. `APIClient` is not exported. Runtime's transport and offsets cover resends. |
|
|
164
|
+
| `@vercel/oidc` 3.2.0 to 4.0.0, which now depends on `@vercel/cli-config` and `@vercel/cli-exec`. | The drop-in never uses Vercel OIDC. A Vercel or OIDC token still throws `AuthenticationError`. Only the oracle's lock changes. |
|
|
165
|
+
| Declarations reorder existing status union members. The README documents stdin. The package and internal version advance. | No adapter change. |
|
|
163
166
|
|
|
164
167
|
`tests/vercel-3-8.test.ts` (12 cases) runs the real Runtime transport over
|
|
165
|
-
controlled HTTP
|
|
166
|
-
empty stdin by default, finished
|
|
167
|
-
4xx recovery
|
|
168
|
-
quiet stop on `stdin_closed`), `onStart` ordering and
|
|
169
|
-
pass-through. Eleven fail before the adapter change
|
|
170
|
-
by default, guards existing
|
|
171
|
-
|
|
172
|
-
`writeStdin`, `closeStdin`, `stdinPipe
|
|
173
|
-
present
|
|
168
|
+
controlled HTTP. It covers piped spawn, write order and offsets, the `TypeError`,
|
|
169
|
+
empty stdin by default, refusals for finished commands, partial-write refusal and
|
|
170
|
+
4xx recovery. It also covers an attached and a detached `Readable` (end, failure
|
|
171
|
+
with kill, and quiet stop on `stdin_closed`), `onStart` ordering, and
|
|
172
|
+
`SandboxUser` pass-through. Eleven of the cases fail before the adapter change.
|
|
173
|
+
The twelfth, empty stdin by default, guards existing behavior. They do not prove
|
|
174
|
+
live-host behavior. The provider stays `partial`. `compat-inventory.json` now
|
|
175
|
+
counts `writeStdin`, `closeStdin`, `stdinPipe`, and the `stdin` and `onStart`
|
|
176
|
+
options as present. It counts `CommandFinished`'s stdin calls as refused, as
|
|
177
|
+
upstream's are.
|
|
174
178
|
|
|
175
179
|
## JavaScript qualification, 8 October 2026
|
|
176
180
|
|
|
177
|
-
|
|
178
|
-
Both tarballs matched their registry SHA-512 integrities
|
|
181
|
+
We reviewed the exact published npm tarballs for `@vercel/sandbox` 3.5.1 to 3.6.1.
|
|
182
|
+
Both tarballs matched their registry SHA-512 integrities. The 3.6.1 value in
|
|
179
183
|
`compatibility-lock.json` came from `npm view @vercel/sandbox@3.6.1 dist.integrity`.
|
|
180
|
-
No downloaded package code was installed or
|
|
181
|
-
|
|
182
|
-
The distribution diff changes 31 files
|
|
183
|
-
|
|
184
|
-
`
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
| Upstream change
|
|
188
|
-
|
|
|
189
|
-
| `Drive.get({ name, signal?, token?, teamId?, projectId?, fetch? })` retrieves an existing drive without creating one. Internally it sends GET to the encoded drive-name path with `projectId` in the query. | Already refused by the `Drive` export before credentials or requests
|
|
190
|
-
| `drive.fork({ name, signal? })` creates a drive
|
|
191
|
-
| `drive.parentDriveId` and `drive.rootDriveId`, optional strings, expose ancestry. Drive response validation now
|
|
192
|
-
| Streaming `runCommand`
|
|
193
|
-
| `Command.logs()` reconnects interrupted log bodies up to twice, waiting 200 ms then 400 ms
|
|
194
|
-
| `getCommand`, including waiting for completion, retries failures while
|
|
195
|
-
| Stream parsing now
|
|
196
|
-
| Sandbox
|
|
197
|
-
|
|
198
|
-
`tests/vercel-3-6.test.ts`
|
|
199
|
-
|
|
200
|
-
UTF-8 chunks, incomplete JSON, no command replay, bounded empty-stream
|
|
201
|
-
permanent errors, Drive lookup refusal and missing-output refusal.
|
|
202
|
-
adapter change, both missing-output cases resolved successfully
|
|
203
|
-
|
|
204
|
-
superiority or full Vercel compatibility
|
|
184
|
+
No downloaded package code was installed or run.
|
|
185
|
+
|
|
186
|
+
The distribution diff changes 31 files. That includes five TypeScript source files
|
|
187
|
+
in the source maps: `drive.ts`, `version.ts`, `api-client.ts`, `base-client.ts` and
|
|
188
|
+
`validators.ts`. CommonJS and ES-module source-map contents match. These are the
|
|
189
|
+
changes, and how each one is handled:
|
|
190
|
+
|
|
191
|
+
| Upstream change | Drop-in disposition |
|
|
192
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
193
|
+
| `Drive.get({ name, signal?, token?, teamId?, projectId?, fetch? })` retrieves an existing drive without creating one. Internally it sends GET to the encoded drive-name path, with `projectId` in the query. | Already refused by the `Drive` export, before credentials or requests are used. The error is `NotSupportedError`, and it names `runtime.volumes` and `withruntime: { create: { volumes } }`. |
|
|
194
|
+
| `drive.fork({ name, signal? })` creates a drive that inherits data, maximum size and region. Its POST uses the source drive name, a `projectId` query, and a `{ name }` body. | All Drive construction and retrieval stay refused. So no unsupported Drive instance can reach this call. Use Runtime volumes. No Vercel Drive fork is claimed. |
|
|
195
|
+
| `drive.parentDriveId` and `drive.rootDriveId`, optional strings, expose ancestry. Drive response validation now keeps those fields, including in list, get, create, fork and update responses. | The same Drive refusal applies. No ancestry or Vercel drive metadata is made up. |
|
|
196
|
+
| Streaming `runCommand` turns off retry of the command POST. After it receives the command ID, a cut, an early EOF, or an incomplete final JSON record recovers the logs. It then waits for the same command. | Mapped through native Runtime process IDs and byte cursors. No command restarts after its ID arrives. Initial Runtime transport retries use the same idempotency key. Attached commands now throw `StreamError` with `output_truncated` when recovery reports missing bytes, as detached commands already did. |
|
|
197
|
+
| `Command.logs()` reconnects interrupted log bodies up to twice, waiting 200 ms and then 400 ms. It skips stdout and stderr characters that were already delivered, counting each stream separately. | Mapped through Runtime's byte cursor across both streams. Runtime follows stream slices and connection cuts. Repeated empty streams stop after four reads. Continuous failures have a five-minute recovery budget. These are Runtime's own recovery limits, not Vercel's retry timing. |
|
|
198
|
+
| `getCommand`, including waiting for completion, retries failures while it reads the response body, up to twice. Parsing can use the body that was already read. | Native Runtime JSON reads already retry through the whole body, with the client's `maxRetries` (four by default). Completion comes from the native process output's exit event, not from Vercel's command-wait endpoint. |
|
|
199
|
+
| Stream parsing now keeps UTF-8 across chunks. It classifies connection cuts and incomplete final JSON. It closes readers. It passes cancellation or application errors through, without recovery. | Runtime already uses a persistent `TextDecoderStream`. It closes its readers, and resumes at the byte cursor after a cut or a partial record. Permanent structured API errors and cancellation are not replayed. Runtime also retries parse failures as stream cuts. It does not expose Vercel's private `ConnectionError`. |
|
|
200
|
+
| Sandbox and snapshot declarations reorder existing status union members. The package and internal version advance. | No status values, package exports, dependencies or other caller signatures change. No adapter change is needed. |
|
|
201
|
+
|
|
202
|
+
`tests/vercel-3-6.test.ts` runs the real Runtime transport with controlled HTTP
|
|
203
|
+
responses. It covers attached and detached recovery, stdout and stderr ordering,
|
|
204
|
+
one-byte UTF-8 chunks, incomplete JSON, no command replay, bounded empty-stream
|
|
205
|
+
failure, permanent errors, Drive lookup refusal, and missing-output refusal.
|
|
206
|
+
Before the adapter change, both missing-output cases resolved successfully. They
|
|
207
|
+
should have thrown. These tests do not prove live-host recovery, isolation,
|
|
208
|
+
performance superiority or full Vercel compatibility. The provider stays `partial`.
|
|
205
209
|
|
|
206
210
|
`tests/compat/reference.bun.lock` has no Vercel entry. The consumer declaration
|
|
207
|
-
check in `tests/compat/check-consumers.ts` reads the main compatibility lock
|
|
208
|
-
requires the extracted upstream version to match
|
|
209
|
-
Vercel version edit. The separate oracle was not run for this source
|
|
211
|
+
check in `tests/compat/check-consumers.ts` reads the main compatibility lock. It
|
|
212
|
+
requires the extracted upstream version to match that lock. Neither needs a
|
|
213
|
+
separate Vercel version edit. The separate oracle was not run for this source
|
|
214
|
+
review.
|
|
210
215
|
|
|
211
216
|
## Tests
|
|
212
217
|
|
|
213
|
-
`bun run test` in `packages/cloud-sdk` runs the unit tests
|
|
214
|
-
against fakes of Runtime's SDKs
|
|
218
|
+
`bun run test` in `packages/cloud-sdk` runs the unit tests for both languages,
|
|
219
|
+
against fakes of Runtime's SDKs. The tests are `tests/vercel` here and
|
|
215
220
|
`sdks/python/tests/test_vercel.py`.
|
|
216
221
|
|
|
217
|
-
The end-to-end tests run the judge panel's Vercel Sandbox eval and Vercel's
|
|
218
|
-
Python examples
|
|
219
|
-
refuse to start unless the free trial has an hour left
|
|
220
|
-
they create. They are not part of `bun run test`.
|
|
222
|
+
The end-to-end tests run the judge panel's Vercel Sandbox eval, and Vercel's
|
|
223
|
+
Python examples. They are unmodified except for the import, and they run against
|
|
224
|
+
the real API. They refuse to start unless the free trial has an hour left. They
|
|
225
|
+
end every sandbox they create. They are not part of `bun run test`.
|
|
221
226
|
|
|
222
227
|
```bash no-run
|
|
223
228
|
bun packages/cloud-sdk/scripts/dropin-e2e.ts # JavaScript, with the Daytona quickstart
|