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.
Files changed (60) hide show
  1. package/BLAXEL.md +207 -204
  2. package/COMPATIBILITY.md +367 -337
  3. package/DAYTONA.md +180 -173
  4. package/E2B.md +246 -230
  5. package/README.md +182 -142
  6. package/README.src.md +182 -142
  7. package/VERCEL.md +173 -168
  8. package/agent-platforms-inventory.json +387 -0
  9. package/dist/agents-cli.d.ts +7 -1
  10. package/dist/agents-cli.js +470 -6
  11. package/dist/agents-deploy.d.ts +1 -1
  12. package/dist/agents-deploy.js +62 -1
  13. package/dist/apps-cli.d.ts +3 -3
  14. package/dist/apps-cli.js +10 -5
  15. package/dist/browsers-cli.d.ts +1 -1
  16. package/dist/browsers-cli.js +122 -3
  17. package/dist/ci-cli.d.ts +11 -1
  18. package/dist/ci-cli.js +69 -6
  19. package/dist/cli-update.d.ts +11 -0
  20. package/dist/cli-update.js +46 -0
  21. package/dist/cli-words.js +1 -0
  22. package/dist/cli.d.ts +4 -6
  23. package/dist/cli.js +249 -58
  24. package/dist/daytona/daytona.js +1 -1
  25. package/dist/e2b/sandbox.d.ts +6 -5
  26. package/dist/e2b/sandbox.js +6 -5
  27. package/dist/errors.d.ts +4 -3
  28. package/dist/errors.js +7 -3
  29. package/dist/index.d.ts +5 -5
  30. package/dist/inngest/index.d.ts +96 -0
  31. package/dist/inngest/index.js +183 -0
  32. package/dist/jobs-code/cron.d.ts +12 -0
  33. package/dist/jobs-code/cron.js +93 -0
  34. package/dist/jobs-code/registry.d.ts +31 -0
  35. package/dist/jobs-code/registry.js +30 -0
  36. package/dist/jobs-code/runner.d.ts +1 -0
  37. package/dist/jobs-code/runner.js +74 -0
  38. package/dist/jobs-deploy.d.ts +22 -0
  39. package/dist/jobs-deploy.js +247 -0
  40. package/dist/jobs-import.d.ts +15 -0
  41. package/dist/jobs-import.js +231 -0
  42. package/dist/products/agents.d.ts +413 -2
  43. package/dist/products/agents.js +176 -0
  44. package/dist/products/apps.d.ts +2 -1
  45. package/dist/products/browsers.d.ts +87 -0
  46. package/dist/products/browsers.js +67 -0
  47. package/dist/products/builds.d.ts +11 -2
  48. package/dist/products/ci.d.ts +21 -1
  49. package/dist/products/jobs.d.ts +77 -0
  50. package/dist/products/jobs.js +5 -0
  51. package/dist/products/observability.d.ts +31 -3
  52. package/dist/products/plans.d.ts +5 -3
  53. package/dist/products/secrets.d.ts +67 -14
  54. package/dist/products/secrets.js +41 -12
  55. package/dist/transport.d.ts +6 -1
  56. package/dist/transport.js +38 -1
  57. package/dist/trigger/index.d.ts +202 -0
  58. package/dist/trigger/index.js +244 -0
  59. package/dist/types.d.ts +14 -0
  60. 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. It is part of Runtime's SDK
5
- (`withruntime`), built on the same client, so it gets that SDK's retries,
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
- 15 October 2026. Python was checked against `vercel-sandbox` 0.9.1 on PyPI
21
- (the `vercel.sandbox` module of `vercel` 0.12.0) on 15 October 2026.
22
- 0.9.0 added `get_drive`, which raises `NotSupportedError` like the other
23
- Drive calls.
24
-
25
- Python review, 15 October 2026: each pinned wheel and sdist matched its
26
- SHA-256 in `compatibility-lock.json`, each new one the PyPI digest, and each
27
- new wheel's source its sdist; they were compared file by file, nothing
28
- installed or run. `vercel-sandbox` 0.9.1 changes only its version and its
29
- `vercel-internal-core` floor (0.2.2); no sandbox source changes. `vercel`
30
- 0.12.0 moves `vercel.blob` into the separate `vercel-blob` package (a new
31
- dependency), removing its own Blob code, and raises its floors
32
- (`vercel-sandbox` 0.9.1). Blob is Vercel's storage product, which the
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: a Runtime key (`rtcloud_...`) passed as `token`,
39
- `RUNTIME_API_KEY`, and the key `npx withruntime login` saved on this machine.
40
- A Vercel token or OIDC token is never sent anywhere: passed as `token` while
41
- `RUNTIME_API_KEY` is not set, it throws `AuthenticationError` (Python:
42
- `SandboxCredentialsError`). `teamId` and `projectId` mean nothing on Runtime and
43
- are ignored.
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
- `resources: { vcpus }` sets another, with 2048 MiB per vCPU.
49
- - **Timeout:** none unless you pass one: the sandbox runs while it works and
50
- pauses itself when idle. A `timeout` is kept as a Runtime time limit, which
51
- runs 60 seconds to an hour. A longer `timeout` (Python `execution_time_limit`) starts with an
52
- hour's lease, and the sandbox object renews it toward the timeout while it
53
- lives, never past it; once the program ends, the sandbox pauses within an
54
- hour. `extendTimeout` moves the end later, as often as needed.
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, keeping its files and also its memory and
57
- processes. `Sandbox.get({ name })`, or the next command or file call, wakes
58
- it. A paused sandbox is kept for Runtime's retention (30 days on credit, 7 on
59
- the trial, or `snapshotExpiration`) and billed as paused storage. With
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, so `domain(port)` answers at once. A
63
- browser sees a one-time page naming Runtime before the site.
64
- - **Funding:** left to Runtime, as `withruntime`'s own `create()` does: the free
65
- trial while the account has trial time, then prepaid credit. Pass
66
- `withruntime: { create: { funding: "trial" } }` (Python:
67
- `runtime_create={"funding": "trial"}`) to use only the 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
- sandbox underneath. (The key is `withruntime` because Vercel's `runtime`
71
- names a Node.js or Python version.)
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` with `name`, `timeoutSeconds`, `vcpu` and `memoryMiB`, labels; `env` is given to every command run through this object. |
78
- | `image`, legacy `runtime` | Vercel's managed images and runtimes are Runtime's stock image. Any other name must be a ready Runtime image with that name. |
79
- | `source: { type: "git", url, depth, revision, username, password }` | Cloned into the working directory after create; credentials reach git through the environment. |
80
- | `source: { type: "tarball", url }`, `{ type: "snapshot" }` | Downloaded and unpacked into the working directory; a Runtime snapshot, with its own shape. |
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 id), woken; create when missing; `sandboxes.list` with Vercel's paginator. |
83
- | `list({ namePrefix, since, until, sortBy, sortOrder, cursor })` | Applied here over every sandbox the key sees; the cursor continues the same order. Python's `query_sandboxes` does the same. |
84
- | `createUser`, `asUser`, `createGroup`, `addUserToGroup` | `useradd`, `groupadd` and `usermod` with `sudo`, as Vercel does; a user's commands run under `sudo -u` in its home, its files given to it. |
85
- | `Sandbox.fork({ sourceSandbox, name })` | A Runtime fork, which copies memory and processes too. |
86
- | `runCommand(cmd, args)`, `runCommand({ cmd, args, cwd, env, sudo })` | `exec` of the argv without a shell. `sudo` runs it under `sudo --preserve-env`. A non-zero exit is a result. Past `timeoutMs` it exits 137. |
87
- | `stdout`, `stderr` writers, `detached: true`, `logs()`, `wait()` | Output streams to the writers; a detached command is a Runtime process, its logs followed from the start. |
88
- | `getCommand(cmdId)`, `kill(signal)` | Runtime processes by id; signals by name or number. |
89
- | `writeFiles`, `readFile`, `readFileToBuffer`, `downloadFile`, `mkDir` | Runtime's files API. `mode` is set with `chmod`. A missing file is `null`, as in Vercel. |
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; ports added or removed. |
93
- | `stop()`, `delete()`, `extendTimeout(ms)` | `pause` (persistent) or `stop`; `stop`; `extend`. |
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, then the source stops; restored snapshots start fresh processes; `snapshots.get`, `list`, `delete`. |
96
- | Error classes | `APIError` with a `response` whose status is Runtime's and `json` of `{ error: { code, message } }`; also `code`, `hint` and `requestId`. |
97
- | Python: `create_sandbox`, `run_process`, `create_process`, `box.fs` | The same mapping; operations await or work as context managers, which stop and by default destroy the sandbox; readers iterate by line. |
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. Its
102
- `feature` names the gap and its `alternative` says what to use.
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 } }`; network rules. |
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: the sandbox sees a placeholder. |
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(...)` or `npx withruntime sandboxes shell <id>`. |
113
- | `update` of tags, resources, persistence or region | Create a new sandbox with them. |
114
- | Overrides on `Sandbox.fork` | Fork, then change what Runtime can change. |
115
- | `delete({ deleteOrphanSnapshots: true })`, `Snapshot.tree` | Delete snapshots one by one; `Snapshot.list`. |
116
- | `Drive`, `defineSandboxProxy` | Runtime volumes; `sandbox.withruntime.previews`. |
117
- | `keepLastSnapshots` | Manage saved snapshots with `Snapshot.list` and `snapshot.delete`. |
118
-
119
- Explicit snapshots require the released native disk-capture capability; a server
120
- that does not confirm disk-only capture is refused. If capture succeeds but the
121
- source cannot finish stopping, the error retains `snapshotId` and
122
- `sourceSandboxId` so the saved filesystem remains recoverable. JavaScript exposes
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
- a failed stop request keeps its original error code. These contracts remain
127
- partial; controlled package comparisons do not prove hosted restoration.
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()`: they carry on after a wake, where Vercel starts them again.
133
- - Commands run as the sandbox owner, `runtime`, with passwordless `sudo`.
134
- `pwd` prints `/workspace`.
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
- Reviewed the exact published npm tarballs for `@vercel/sandbox` 3.6.1 → 3.7.0
142
- → 3.8.0 (3.7.0 is the only stable release between them). 3.6.1 matched its
143
- SHA-512 in `compatibility-lock.json`; 3.7.0 and 3.8.0 matched
144
- `npm view @vercel/sandbox@<version> dist.integrity` (3.8.0:
145
- `sha512-2ib+Dl8W...`). No downloaded package code was installed or executed
146
- outside the oracle's frozen install.
147
-
148
- The source maps name six changed TypeScript files and one new one
149
- (`utils/pipe-stdin.ts`); CommonJS and ES-module builds match. `index.d.ts`
150
- exports nothing new. The changes and their dispositions:
151
-
152
- | Upstream change | Drop-in disposition |
153
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
154
- | 3.7.0: `runCommand({ stdin: true, detached: true })` keeps the command's stdin open; `stdin: true` without `detached` throws `TypeError` before anything runs. 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. |
155
- | 3.7.0: `Command.writeStdin(data, { abortSignal })` and `closeStdin({ abortSignal })`. Writes are queued in call order, chunked, resent with byte offsets so retries never duplicate; 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`), which 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, unless the API rejected a single request with a 4xx, which applied none of it. A `Command` from `getCommand` reads its offset from the process. |
156
- | 3.7.0: `CommandFinished.writeStdin`/`closeStdin` always throw: the command has exited. | Followed with the same messages. |
157
- | 3.7.0: `stdin` may be a `Readable`, attached or detached. It is written with backpressure and stdin closes when it ends; the stream is never ended or destroyed. Attached: a piping failure kills the command and rejects `runCommand`. Detached: `wait()` rejects (and `stdinPipe` clears). The command exiting or no longer accepting input (404, `command_stdin_unavailable`) stops piping quietly. `Command.stdinPipe` is the (internal) pipe. | Followed. An attached command with a stream starts as a process and waits on its output, streaming to `stdout`/`stderr` writers as before. Reading pauses past 512 KiB waiting. Runtime's "input closed" answer (409 `stdin_closed`) or a 404 stops piping quietly, as upstream's does. `stdinPipe` is exposed the same way. |
158
- | 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. |
159
- | 3.8.0: `runCommand({ onStart })`, only when not detached (the type forbids it with `detached: true`; upstream ignores it there): called with the running `Command` as soon as it 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. |
160
- | `APIClient.writeCommandStdin` and its stdin retry policy (429 `Retry-After`, 502/503/504 resends, offset probes); `CommandStdinResponse` validator. | Internal; `APIClient` is not exported. Runtime's transport and offsets cover resends. |
161
- | `@vercel/oidc` 3.2.0 → 4.0.0 (now depending 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. |
162
- | Declarations reorder existing status union members; README documents stdin; the package and internal version advance. | No adapter change. |
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: piped spawn, write order and offsets, the `TypeError`,
166
- empty stdin by default, finished-command refusals, partial-write refusal and
167
- 4xx recovery, an attached and a detached `Readable` (end, failure with kill,
168
- quiet stop on `stdin_closed`), `onStart` ordering and `SandboxUser`
169
- pass-through. Eleven fail before the adapter change (the twelfth, empty stdin
170
- by default, guards existing behaviour). They do not prove live-host
171
- behaviour; the provider remains `partial`. `compat-inventory.json` now counts
172
- `writeStdin`, `closeStdin`, `stdinPipe` and the `stdin`/`onStart` options
173
- present (and `CommandFinished`'s stdin calls refused, as upstream's are).
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
- Reviewed the exact published npm tarballs for `@vercel/sandbox` 3.5.1 → 3.6.1.
178
- Both tarballs matched their registry SHA-512 integrities; the 3.6.1 value in
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 executed.
181
-
182
- The distribution diff changes 31 files, representing five TypeScript source
183
- files in the source maps: `drive.ts`, `version.ts`, `api-client.ts`,
184
- `base-client.ts` and `validators.ts`. CommonJS and ES-module source-map
185
- contents match. The changes and their dispositions:
186
-
187
- | Upstream change | Drop-in disposition |
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, with `NotSupportedError` naming `runtime.volumes` and `withruntime: { create: { volumes } }`. |
190
- | `drive.fork({ name, signal? })` creates a drive inheriting data, maximum size and region. Its POST uses the source drive name, `projectId` query and `{ name }` body. | All Drive construction and retrieval remain refused, so no unsupported Drive instance can reach this call. Use Runtime volumes; no Vercel Drive fork is claimed. |
191
- | `drive.parentDriveId` and `drive.rootDriveId`, optional strings, expose ancestry. Drive response validation now retains those fields, including list/get/create/fork/update responses. | The same Drive refusal applies. No ancestry or Vercel drive metadata is fabricated. |
192
- | Streaming `runCommand` disables retry of the command POST. After receiving its command id, a cut, early EOF or incomplete final JSON record recovers logs and then waits for the same command. | Mapped through native Runtime process ids and byte cursors: no command is restarted 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 do. |
193
- | `Command.logs()` reconnects interrupted log bodies up to twice, waiting 200 ms then 400 ms, skipping previously delivered stdout/stderr characters separately. | Mapped through Runtime's byte cursor across both streams. Runtime follows stream slices and connection cuts; repeated empty streams stop after four reads, and continuous failures have a five-minute recovery budget. These are Runtime's recovery limits, not Vercel's retry timing. |
194
- | `getCommand`, including waiting for completion, retries failures while reading the response body, up to twice. Parsing can consume the already-read body. | Native Runtime JSON reads already retry through the complete body, with the client's `maxRetries` (four by default). Completion comes from the native process output's exit event rather than Vercel's command-wait endpoint. |
195
- | Stream parsing now preserves UTF-8 across chunks, classifies connection cuts and incomplete final JSON, closes readers and propagates cancellation or application errors without recovery. | Runtime already uses a persistent `TextDecoderStream`, closes its readers and resumes at the byte cursor after a cut or 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`. |
196
- | Sandbox/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 needed. |
197
-
198
- `tests/vercel-3-6.test.ts` exercises the real Runtime transport with controlled
199
- HTTP responses: attached and detached recovery, stdout/stderr ordering, one-byte
200
- UTF-8 chunks, incomplete JSON, no command replay, bounded empty-stream failure,
201
- permanent errors, Drive lookup refusal and missing-output refusal. Before the
202
- adapter change, both missing-output cases resolved successfully instead of
203
- throwing. These tests do not prove live-host recovery, isolation, performance
204
- superiority or full Vercel compatibility; the provider remains `partial`.
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 and
208
- requires the extracted upstream version to match it; neither needs a separate
209
- Vercel version edit. The separate oracle was not run for this source review.
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 of both languages
214
- against fakes of Runtime's SDKs: `tests/vercel` here and
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, unmodified but for the import, against the real API. They
219
- refuse to start unless the free trial has an hour left, and end every sandbox
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