withruntime 0.9.0 → 0.10.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 +4 -4
- package/DAYTONA.md +13 -7
- package/E2B.md +12 -8
- package/README.md +15 -7
- package/README.src.md +15 -7
- package/VERCEL.md +13 -3
- package/compatibility-lock.json +84 -8
- package/dist/blaxel/errors.js +1 -1
- package/dist/blaxel/lookup.d.ts +3 -2
- package/dist/blaxel/lookup.js +3 -2
- package/dist/blaxel/pagination.d.ts +2 -2
- package/dist/blaxel/pagination.js +45 -17
- package/dist/blaxel/preview.d.ts +2 -1
- package/dist/blaxel/preview.js +15 -13
- package/dist/blaxel/process.js +56 -10
- package/dist/blaxel/sandbox.d.ts +2 -0
- package/dist/blaxel/sandbox.js +2 -0
- package/dist/blaxel/snapshot.js +3 -5
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +189 -54
- package/dist/client.d.ts +29 -3
- package/dist/client.js +40 -11
- package/dist/cloudflare/identity.d.ts +7 -0
- package/dist/cloudflare/identity.js +13 -0
- package/dist/cloudflare/index.d.ts +9 -0
- package/dist/cloudflare/index.js +47 -9
- package/dist/cloudflare/worker.d.ts +4 -0
- package/dist/cloudflare/worker.js +166 -16
- package/dist/codesandbox/guest-service.js +57 -20
- package/dist/codesandbox/index.js +42 -8
- package/dist/compat/core.d.ts +9 -8
- package/dist/compat/core.js +60 -21
- package/dist/compat/files.js +22 -4
- package/dist/credentials.d.ts +6 -1
- package/dist/credentials.js +107 -38
- package/dist/daytona/daytona.js +11 -4
- package/dist/daytona/filesystem.d.ts +17 -4
- package/dist/daytona/filesystem.js +121 -38
- package/dist/daytona/index.d.ts +1 -1
- package/dist/daytona/sandbox.d.ts +1 -1
- package/dist/daytona/sandbox.js +16 -7
- package/dist/e2b/client.js +1 -1
- package/dist/e2b/commands.d.ts +30 -8
- package/dist/e2b/commands.js +142 -54
- package/dist/e2b/index.d.ts +1 -0
- package/dist/e2b/index.js +1 -0
- package/dist/e2b/pty.d.ts +24 -0
- package/dist/e2b/pty.js +80 -0
- package/dist/e2b/sandbox.d.ts +2 -1
- package/dist/e2b/sandbox.js +49 -15
- package/dist/file-source.d.ts +16 -0
- package/dist/file-source.js +162 -0
- package/dist/freestyle/index.d.ts +9 -1
- package/dist/freestyle/index.js +38 -5
- package/dist/index.d.ts +2 -1
- package/dist/login.js +16 -10
- package/dist/modal/index.js +2 -1
- package/dist/network-cli.js +111 -43
- package/dist/openai-agents/index.js +9 -45
- package/dist/page.d.ts +1 -1
- package/dist/page.js +2 -2
- package/dist/products/index.d.ts +12 -0
- package/dist/products/index.js +10 -0
- package/dist/products/observability.d.ts +44 -0
- package/dist/products/observability.js +6 -0
- package/dist/products/previews.d.ts +8 -2
- package/dist/products/previews.js +11 -3
- package/dist/products/volumes.d.ts +42 -0
- package/dist/products/volumes.js +36 -0
- package/dist/products/watch.js +61 -8
- package/dist/proxy.js +3 -1
- package/dist/runloop/index.d.ts +13 -27
- package/dist/runloop/index.js +149 -52
- package/dist/sandbox.d.ts +37 -8
- package/dist/sandbox.js +432 -68
- package/dist/snapshots.d.ts +9 -4
- package/dist/sprites/index.js +69 -33
- package/dist/tar.d.ts +3 -1
- package/dist/tar.js +140 -14
- package/dist/transport.d.ts +4 -7
- package/dist/transport.js +205 -122
- package/dist/vercel/command.d.ts +1 -1
- package/dist/vercel/command.js +3 -2
- package/dist/vercel/errors.d.ts +1 -1
- package/dist/vercel/errors.js +7 -1
- package/dist/vercel/sandbox.d.ts +8 -8
- package/dist/vercel/sandbox.js +154 -59
- package/dist/vercel/snapshot.d.ts +3 -2
- package/dist/vercel/snapshot.js +9 -5
- package/package.json +2 -1
package/BLAXEL.md
CHANGED
|
@@ -10,8 +10,8 @@ load it.
|
|
|
10
10
|
import { SandboxInstance } from "withruntime/blaxel"; // was: from "@blaxel/core"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The mapping was written against `@blaxel/core` 0.3.
|
|
14
|
-
source, checked
|
|
13
|
+
The mapping was written against `@blaxel/core` 0.3.24 and Blaxel's sandbox API
|
|
14
|
+
source, checked 30 September 2026. Every name `@blaxel/core` exports can be
|
|
15
15
|
imported: code that only mentions an agent, model or MCP helper still loads.
|
|
16
16
|
|
|
17
17
|
## Keys
|
|
@@ -100,7 +100,7 @@ name, or through `getByExternalId`, use the same Runtime key.
|
|
|
100
100
|
| `process.exec` without `waitForCompletion` | One Runtime process, answered running. Its Blaxel name is kept in its command line, so `get("name")` finds it from any client. |
|
|
101
101
|
| `process.exec({ waitForCompletion: true })` | One streamed call, answered with `status`, `exitCode`, `stdout`, `stderr` and `logs`. Past `timeout` the wait ends with a 422 and the process runs on. |
|
|
102
102
|
| `onLog`, `onStdout`, `onStderr`, `streamLogs` | The process's output as it comes; `streamLogs` gives whole lines, as Blaxel's does. |
|
|
103
|
-
| `process.get`, `wait`, `list`, `logs`, `stop`, `kill`, `writeStdin`, `closeStdin` | Runtime processes by id or name. `wait` follows
|
|
103
|
+
| `process.get`, `wait`, `list`, `logs`, `stop`, `kill`, `writeStdin`, `closeStdin` | Runtime processes by id or name. `wait` follows output with one deadline covering lookup and output. Cancellation leaves the process running. `stop` is SIGTERM, `kill` SIGKILL. |
|
|
104
104
|
| `keepAlive`, `timeout` | The sandbox does not pause for idleness while the process may run (its `timeout`, 600 s by default, 0 for as long as a lease allows); once no `keepAlive` process runs, it gets its idle pause back. |
|
|
105
105
|
| `restartOnFailure`, `maxRestarts`, `waitForPorts`, `workingDir`, `env`, `stdin` | A restart loop in the same process, with Blaxel's note in the output (`restartCount` counts the notes); a wait in the sandbox for the ports; as in Blaxel. |
|
|
106
106
|
| `fs.read`, `write`, `readBinary`, `writeBinary`, `writeTree`, `mkdir`, `rm`, `cp` | Runtime's files API, or one command. A path only root may read or write (outside `/workspace`, or made by a root process) goes through sudo, as Blaxel's root-owned API could. |
|
|
@@ -208,7 +208,7 @@ leaves those names alone.
|
|
|
208
208
|
|
|
209
209
|
`bun run test` in `packages/cloud-sdk` runs the unit tests against a fake of
|
|
210
210
|
Runtime's SDK: `tests/blaxel`, including a check that every name
|
|
211
|
-
`@blaxel/core` 0.3.
|
|
211
|
+
`@blaxel/core` 0.3.24 exports is exported here.
|
|
212
212
|
|
|
213
213
|
The end-to-end test runs Blaxel's guides, unmodified but for the import,
|
|
214
214
|
against the real API: `tests/fixtures/blaxel-quickstart.mjs` (create, processes,
|
package/DAYTONA.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Code written for Daytona, on Runtime
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Supported sandbox calls from [Daytona](https://www.daytona.io)'s SDK keep
|
|
4
|
+
their call shapes on Runtime Cloud after changing the import. It is part of Runtime's SDK (`withruntime`), built on
|
|
5
5
|
the same client, so it gets that SDK's retries, idempotency keys and errors.
|
|
6
6
|
Importing `withruntime` alone does not load it.
|
|
7
7
|
|
|
@@ -16,8 +16,9 @@ from withruntime.daytona import Daytona # was: from daytona import Daytona
|
|
|
16
16
|
from withruntime.daytona import AsyncDaytona # was: from daytona import AsyncDaytona
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The mapping was written against `@daytona/sdk` 0.
|
|
20
|
-
on PyPI, checked
|
|
19
|
+
The mapping was written against `@daytona/sdk` 0.220.0 and `daytona` 0.220.0
|
|
20
|
+
on PyPI, checked 29 September 2026. The exact releases and artifact hashes
|
|
21
|
+
are kept in `compatibility-lock.json`.
|
|
21
22
|
|
|
22
23
|
## Keys
|
|
23
24
|
|
|
@@ -60,6 +61,7 @@ package talks only to Runtime.
|
|
|
60
61
|
| `create({ image: "python:3.12" })` | Built once as a Runtime image from the registry reference (named after it), then reused. `onSnapshotCreateLogs` receives the build log. |
|
|
61
62
|
| `create({ image: Image.debianSlim(...).pipInstall(...)... })` | The Dockerfile Daytona's `Image` stands for, with its local files, built as a Runtime image named after its content and reused. |
|
|
62
63
|
| `resources`, `envVars`, `labels`, `name`, `volumes` | `vcpu`, `memoryMiB`, `diskMiB`; environment given to every command; labels; name; Runtime volumes by id or by name. |
|
|
64
|
+
| `setLabels` (Python `set_labels`) | Replaces customer labels while preserving the language and Runtime compatibility labels; reconnects retain the language. |
|
|
63
65
|
| `networkBlockAll`, `networkAllowList`, `domainAllowList`, `outboundProxyUrl` | Runtime network rules (`internet: false`, or an `allow` list); the proxy as `HTTP_PROXY` and `HTTPS_PROXY` for commands. |
|
|
64
66
|
| `public: true` | `getPreviewLink(port)` shares the port publicly; without it, privately with a token. |
|
|
65
67
|
| `language` | The language of `codeRun`, kept in Daytona's `code-toolbox-language` label so a sandbox found later keeps it. |
|
|
@@ -93,7 +95,7 @@ Each of these throws `NotSupportedError` before anything happens. Its
|
|
|
93
95
|
| `user` other than `daytona` | Commands run as the sandbox owner with passwordless `sudo`. |
|
|
94
96
|
| PTY sessions, the entrypoint session, language servers | `sandbox.withruntime.terminal(...)`, and sessions with `runAsync`. |
|
|
95
97
|
| `computerUse` | Runtime's desktop, `sandbox.withruntime.desktop`. |
|
|
96
|
-
| `
|
|
98
|
+
| `resize`, `recover` | Set labels and resources at create; create a new sandbox. |
|
|
97
99
|
| Signed preview URLs, signed upload and download URLs, SSH access | `getPreviewLink`, `fs.uploadFile` and `downloadFile`, `npx withruntime sandbox ssh <id>`. |
|
|
98
100
|
| `getMetrics` | `sandbox.withruntime.metrics()`: its CPU and memory over time. |
|
|
99
101
|
| `Image.pipInstallFromPyproject`, snapshot `resources` or `entrypoint` | `pipInstallFromRequirements`; resources at create; a session after create. |
|
|
@@ -102,10 +104,14 @@ Each of these throws `NotSupportedError` before anything happens. Its
|
|
|
102
104
|
| `runCode(code, { envs })` | `envVars` at create, or `os.environ` in the code. |
|
|
103
105
|
| Listing by anything but name, labels and states | Filter the result yourself. |
|
|
104
106
|
|
|
107
|
+
File download timeouts are seconds, including buffer and local-path overloads
|
|
108
|
+
and batches. A batch shares one deadline and stops starting later files once
|
|
109
|
+
it expires. JavaScript `downloadFileStream(path, { timeout, signal })` also
|
|
110
|
+
bounds and cancels the stream. An incomplete local download is never published
|
|
111
|
+
as the completed file.
|
|
112
|
+
|
|
105
113
|
Some differences are not refusals:
|
|
106
114
|
|
|
107
|
-
- Sandbox `envVars` live in the object that created the sandbox;
|
|
108
|
-
`daytona.get(id)` from another process does not know them.
|
|
109
115
|
- A session runs one command at a time. A command sent while another runs
|
|
110
116
|
waits for it, as it would typed into a shell. Sessions made by another
|
|
111
117
|
client are found by name, but only their output from then on is known.
|
package/E2B.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Code written for E2B, on Runtime
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Supported sandbox calls from [E2B](https://e2b.dev)'s SDK keep their call
|
|
4
|
+
shapes on Runtime Cloud after changing the import. It is part of Runtime's SDK (`withruntime`), built on the same
|
|
5
5
|
client, so it gets that SDK's retries, idempotency keys and errors. Importing
|
|
6
6
|
`withruntime` alone does not load it.
|
|
7
7
|
|
|
@@ -64,6 +64,7 @@ machine. An E2B key (`e2b_...`) is never sent anywhere. If one is passed as
|
|
|
64
64
|
| Command past its timeout | Disconnects with `TimeoutError` (Python: `TimeoutException`) without killing the command; reconnect by pid to keep reading. |
|
|
65
65
|
| `commands.run(cmd, { background: true })` | `spawn`. Returns a `CommandHandle` with `pid`, `wait()`, `kill()` (SIGKILL), `sendStdin`, `closeStdin`, `disconnect`, `stdout`, `stderr`, `exitCode`. |
|
|
66
66
|
| `commands.list`, `kill(pid)`, `sendStdin(pid)`, `closeStdin(pid)`, `connect(pid)` | Runtime's processes. A pid is a number derived from Runtime's process id, not the Linux pid. |
|
|
67
|
+
| `pty.create`, `connect`, `sendInput`, `resize`, `kill` (Python snake_case) | Native PTY processes with lossless byte callbacks. A reader timeout or disconnect detaches without killing the process; reconnect resumes reading. |
|
|
67
68
|
| `files.read(path, { format })` | `files.read`. `text`, `bytes`, `blob` and `stream` (Python: `text`, `bytes`, `stream`). |
|
|
68
69
|
| `files.write(path, data)`, `write([...])`, `writeFiles` | `files.write`. Parent directories are made, and a file that exists is replaced. |
|
|
69
70
|
| `files.list(path, { depth })` | `files.list`, hidden files included. `owner` and `group` come from native metadata, with `""` for older guests that omit them. |
|
|
@@ -76,12 +77,12 @@ machine. An E2B key (`e2b_...`) is never sent anywhere. If one is passed as
|
|
|
76
77
|
| `sandbox.pause()`, `betaPause`, `Sandbox.pause(id)` | `pause`, keeping memory and files. `false` when it was already paused. |
|
|
77
78
|
| `getInfo`, `isRunning` | `get`. `templateId` is `base` or the image or snapshot id. `envdVersion` is `runtime`. |
|
|
78
79
|
| `Sandbox.list({ query: { metadata, state }, limit })` | `sandboxes.list` by labels and state, oldest first, with E2B's paginator (`hasNext`, `nextItems()`). |
|
|
79
|
-
| `fork`, `createSnapshot`, `deleteSnapshot` | Runtime's forks and snapshots
|
|
80
|
+
| `fork`, `createSnapshot`, `deleteSnapshot` | Runtime's memory-preserving forks and snapshots; deleting a snapshot removes that saved capture. |
|
|
80
81
|
| `getHost(port)` | `<port>-<id>.runtimehost.com` at once, as E2B answers it, and the port is shared as a public Runtime preview beside the caller (the sync Python sandbox shares it before returning). `await sandbox.getPublicHost(port)` returns once the share has landed. |
|
|
81
82
|
| `runCode(code, { language, context, onStdout, onStderr, onResult, onError, timeoutMs })` | Runtime's interpreter: Python, JavaScript, TypeScript, R, Java and Bash, plus Go. The sandbox's `envs` reach code through a context made once for them. `onResult` streams each result and waits for asynchronous callbacks. |
|
|
82
83
|
| `Execution`, `Result`, `Logs`, `ExecutionError`, `OutputMessage` | The same shapes. Results that are too large to send inline are fetched and inlined. `logs.stdout` has one entry per line. |
|
|
83
84
|
| `createCodeContext`, `listCodeContexts`, `restartCodeContext`, `removeCodeContext` | Runtime's interpreter contexts. |
|
|
84
|
-
| `getMetrics({ start, end })`, `Sandbox.getMetrics(id)` | Runtime's measured CPU and memory, one entry per host reading
|
|
85
|
+
| `getMetrics({ start, end })`, `Sandbox.getMetrics(id)` | Runtime's measured CPU and memory, one entry per host reading. `diskUsed` is null: Runtime does not read disk use inside the sandbox. |
|
|
85
86
|
| Error classes | E2B's names and parents. Each also carries Runtime's `code`, `hint` and `requestId`, with the original error as `cause`. |
|
|
86
87
|
|
|
87
88
|
## Gaps
|
|
@@ -104,7 +105,6 @@ before anything happens. The error's `feature` names the gap and its
|
|
|
104
105
|
| `mcp`, `getMcpUrl`, `getMcpToken` | Runtime's own MCP server, `npx withruntime mcp`. |
|
|
105
106
|
| `iam`, `Secret` | A Runtime secret (`npx withruntime secrets set NAME --host <host>`): the sandbox sees a placeholder. |
|
|
106
107
|
| `volumeMounts`, `Volume` | Runtime volumes: `runtime: { create: { volumes: [{ volumeId, path }] } }`. |
|
|
107
|
-
| `pty` | `sandbox.runtime.terminal(...)`. |
|
|
108
108
|
| `git` | `commands.run("git ...")`. E2B has deprecated its git module too. |
|
|
109
109
|
| File `metadata` | Keep it in a file beside the data. |
|
|
110
110
|
| `uploadUrl`, `downloadUrl` | `files.write` and `files.read`. |
|
|
@@ -120,15 +120,19 @@ a callback. Stream failures and lost events are reported, never treated as a
|
|
|
120
120
|
successful empty watch. A positive watch timeout bounds the client subscription and stops its owned watch;
|
|
121
121
|
zero leaves the subscription unlimited. The sandbox lease still applies. Both languages refuse watching network mounts.
|
|
122
122
|
|
|
123
|
+
PTY `timeoutMs` (Python `timeout`, seconds) defaults to sixty seconds, including
|
|
124
|
+
the opening handshake; zero leaves the reader unlimited. Callbacks receive raw
|
|
125
|
+
bytes while the handle's `stdout` and `stderr` stay empty. PTYs made before
|
|
126
|
+
lossless output support cannot reconnect through this adapter; create a new one.
|
|
127
|
+
The sandbox lease still applies.
|
|
128
|
+
|
|
123
129
|
Some differences are not refusals, so code that depends on them should check:
|
|
124
130
|
|
|
125
|
-
- Sandbox-level `envs` live in the object that created the sandbox.
|
|
126
|
-
`Sandbox.connect(id)` from another process does not know them.
|
|
127
131
|
- Runtime's stock image is Ubuntu 24.04 with Python 3.12, Node.js 24 and Bun.
|
|
128
132
|
The current stock image includes NumPy, pandas and matplotlib; build an image
|
|
129
133
|
for additional dependencies. Results never carry `chart`. A DataFrame arrives in
|
|
130
134
|
`extra` under `application/vnd.runtime.table+json`, not in E2B's `data`.
|
|
131
|
-
- JavaScript file operations
|
|
135
|
+
- JavaScript file operations, command creation and reads, stdin/EOF, lookup, kill and reconnect honor `requestTimeoutMs` and `signal`.
|
|
132
136
|
Python file `request_timeout` bounds the request, including streamed reads. `retries`, `logger`, `secure` and `validateApiKey` are
|
|
133
137
|
accepted without changing the native transport settings.
|
|
134
138
|
- Interpreter deadlines follow the pinned packages: JavaScript defaults to
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ The client uses `RUNTIME_API_KEY` when it is set, and otherwise the connection
|
|
|
12
12
|
this machine saved when the CLI connected it (one browser approval, no key to
|
|
13
13
|
copy). On a server or a CI runner, set `RUNTIME_API_KEY` from your secret
|
|
14
14
|
manager: `npx withruntime keys create` prints a new key once after an account
|
|
15
|
-
owner approves it in the browser, or create one at
|
|
15
|
+
owner, admin or developer approves it in the browser, or create one at
|
|
16
16
|
https://withruntime.com/account/keys. Never put a key in browser code, a URL or
|
|
17
17
|
a command-line argument.
|
|
18
18
|
|
|
@@ -20,7 +20,8 @@ a command-line argument.
|
|
|
20
20
|
import { Sandbox } from "withruntime";
|
|
21
21
|
|
|
22
22
|
await using sbx = await Sandbox.create();
|
|
23
|
-
|
|
23
|
+
await sbx.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n");
|
|
24
|
+
const result = await sbx.exec("python3 /workspace/invoice.py");
|
|
24
25
|
console.log(result.exitCode, result.stdout);
|
|
25
26
|
```
|
|
26
27
|
|
|
@@ -30,6 +31,8 @@ Node 22 call `await sbx.stop()`). With no arguments you get the free
|
|
|
30
31
|
trial while it lasts (100 free hours, up to eight sandboxes running at once), 2 vCPU, 4 GiB of
|
|
31
32
|
memory and a 4 GiB disk. The current default image includes NumPy, pandas and
|
|
32
33
|
matplotlib; see the [sandbox environment](https://withruntime.com/docs/sandbox-environment).
|
|
34
|
+
Omitting `funding` can use prepaid credit after the trial is exhausted. Use
|
|
35
|
+
`Sandbox.create({ funding: "trial" })` for free use only; it never falls back to paid.
|
|
33
36
|
|
|
34
37
|
The sandbox object does the rest:
|
|
35
38
|
|
|
@@ -57,7 +60,9 @@ no compute; `idlePauseSeconds` sets 10 to 86,400, or 0 for never.
|
|
|
57
60
|
`Sandbox.getOrCreate(name)` returns the sandbox with that name, woken if it is
|
|
58
61
|
paused, or creates it.
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
`runtime.sandbox`, `snapshot`, `image`, `volume`, `job`, `domain`, `port` and
|
|
64
|
+
`address` name the products as the CLI does. Their existing plural names
|
|
65
|
+
remain aliases of the same product clients. The client has `sandboxes`, `images`, `volumes`, `snapshots`, `jobs`, `secrets`,
|
|
61
66
|
`limits`, `feedback` and `support`; `webhooks`, `events`, `otel` and `audit`
|
|
62
67
|
to watch the account; `domains`, `ports`, `addresses`, `tunnel` and `network`
|
|
63
68
|
to connect sandboxes to your own world (paid accounts); and `mcp`, `sso`,
|
|
@@ -65,6 +70,8 @@ to connect sandboxes to your own world (paid accounts); and `mcp`, `sso`,
|
|
|
65
70
|
the key is read-only and what its agent may still spend today. Every write carries an idempotency key, made for you, so the SDK's
|
|
66
71
|
own retries (timeouts, 429, 503) never do anything twice. Errors are typed and
|
|
67
72
|
carry a `code`, a `hint` and a `requestId`.
|
|
73
|
+
`runtime.usageRequests("7d")` reads the account's API call counts and error rates;
|
|
74
|
+
counts are exact decimal strings, and an empty window has a null `errorPercent`.
|
|
68
75
|
|
|
69
76
|
## Behind a proxy
|
|
70
77
|
|
|
@@ -87,7 +94,7 @@ Runtime improves fast because agents tell us what they run into: reports go stra
|
|
|
87
94
|
|
|
88
95
|
## Code written for E2B
|
|
89
96
|
|
|
90
|
-
`withruntime/e2b`
|
|
97
|
+
`withruntime/e2b` translates supported E2B sandbox calls to Runtime. Change the
|
|
91
98
|
import and set `RUNTIME_API_KEY`. The
|
|
92
99
|
[switch guide](https://withruntime.com/docs/migrate) covers the other providers
|
|
93
100
|
and how to work out what you save:
|
|
@@ -121,7 +128,7 @@ package list every mapping and gap.
|
|
|
121
128
|
|
|
122
129
|
## Code written for Blaxel
|
|
123
130
|
|
|
124
|
-
`withruntime/blaxel`
|
|
131
|
+
`withruntime/blaxel` translates supported Blaxel sandbox calls. Change the
|
|
125
132
|
import:
|
|
126
133
|
|
|
127
134
|
```ts no-run
|
|
@@ -132,7 +139,7 @@ Sandboxes get Blaxel's default of 4096 MB, with one vCPU for every 2048 MB.
|
|
|
132
139
|
Standby becomes Runtime's pause: after 60 seconds without a call a sandbox
|
|
133
140
|
pauses with its memory and processes, and the next call wakes it. Envs,
|
|
134
141
|
processes by name, files, previews, snapshots, forks and the code interpreter
|
|
135
|
-
|
|
142
|
+
are supported by the adapter, along with sessions: `sandbox.sessions` makes a
|
|
136
143
|
Runtime sandbox session and `SandboxInstance.fromSession` drives the sandbox
|
|
137
144
|
with its token. A Blaxel key is never sent anywhere. Drives, codegen, schedules and Blaxel's agent, model and MCP hosting throw
|
|
138
145
|
`NotSupportedError` before anything happens, naming what to use instead.
|
|
@@ -152,7 +159,8 @@ https://withruntime.com/docs/frameworks.
|
|
|
152
159
|
## CLI
|
|
153
160
|
|
|
154
161
|
```bash no-run
|
|
155
|
-
|
|
162
|
+
printf '%s\n' 'print(sum([125, 250, 375]))' > invoice.py
|
|
163
|
+
npx withruntime sandbox run -- python3 - < invoice.py # connects on first use
|
|
156
164
|
npx withruntime sandbox create
|
|
157
165
|
npx withruntime help
|
|
158
166
|
```
|
package/README.src.md
CHANGED
|
@@ -14,7 +14,7 @@ The client uses `RUNTIME_API_KEY` when it is set, and otherwise the connection
|
|
|
14
14
|
this machine saved when the CLI connected it (one browser approval, no key to
|
|
15
15
|
copy). On a server or a CI runner, set `RUNTIME_API_KEY` from your secret
|
|
16
16
|
manager: `npx withruntime keys create` prints a new key once after an account
|
|
17
|
-
owner approves it in the browser, or create one at
|
|
17
|
+
owner, admin or developer approves it in the browser, or create one at
|
|
18
18
|
https://withruntime.com/account/keys. Never put a key in browser code, a URL or
|
|
19
19
|
a command-line argument.
|
|
20
20
|
|
|
@@ -22,7 +22,8 @@ a command-line argument.
|
|
|
22
22
|
import { Sandbox } from "withruntime";
|
|
23
23
|
|
|
24
24
|
await using sbx = await Sandbox.create();
|
|
25
|
-
|
|
25
|
+
await sbx.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n");
|
|
26
|
+
const result = await sbx.exec("python3 /workspace/invoice.py");
|
|
26
27
|
console.log(result.exitCode, result.stdout);
|
|
27
28
|
```
|
|
28
29
|
|
|
@@ -32,6 +33,8 @@ Node 22 call `await sbx.stop()`). With no arguments you get the free
|
|
|
32
33
|
trial while it lasts ({{trial-hours}} free hours, up to {{trial-sandboxes}} sandboxes running at once), 2 vCPU, 4 GiB of
|
|
33
34
|
memory and a 4 GiB disk. The current default image includes NumPy, pandas and
|
|
34
35
|
matplotlib; see the [sandbox environment](https://withruntime.com/docs/sandbox-environment).
|
|
36
|
+
Omitting `funding` can use prepaid credit after the trial is exhausted. Use
|
|
37
|
+
`Sandbox.create({ funding: "trial" })` for free use only; it never falls back to paid.
|
|
35
38
|
|
|
36
39
|
The sandbox object does the rest:
|
|
37
40
|
|
|
@@ -59,7 +62,9 @@ no compute; `idlePauseSeconds` sets {{idle-pause-min}} to {{idle-pause-max}}, or
|
|
|
59
62
|
`Sandbox.getOrCreate(name)` returns the sandbox with that name, woken if it is
|
|
60
63
|
paused, or creates it.
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
`runtime.sandbox`, `snapshot`, `image`, `volume`, `job`, `domain`, `port` and
|
|
66
|
+
`address` name the products as the CLI does. Their existing plural names
|
|
67
|
+
remain aliases of the same product clients. The client has `sandboxes`, `images`, `volumes`, `snapshots`, `jobs`, `secrets`,
|
|
63
68
|
`limits`, `feedback` and `support`; `webhooks`, `events`, `otel` and `audit`
|
|
64
69
|
to watch the account; `domains`, `ports`, `addresses`, `tunnel` and `network`
|
|
65
70
|
to connect sandboxes to your own world (paid accounts); and `mcp`, `sso`,
|
|
@@ -67,6 +72,8 @@ to connect sandboxes to your own world (paid accounts); and `mcp`, `sso`,
|
|
|
67
72
|
the key is read-only and what its agent may still spend today. Every write carries an idempotency key, made for you, so the SDK's
|
|
68
73
|
own retries (timeouts, 429, 503) never do anything twice. Errors are typed and
|
|
69
74
|
carry a `code`, a `hint` and a `requestId`.
|
|
75
|
+
`runtime.usageRequests("7d")` reads the account's API call counts and error rates;
|
|
76
|
+
counts are exact decimal strings, and an empty window has a null `errorPercent`.
|
|
70
77
|
|
|
71
78
|
## Behind a proxy
|
|
72
79
|
|
|
@@ -89,7 +96,7 @@ Runtime improves fast because agents tell us what they run into: reports go stra
|
|
|
89
96
|
|
|
90
97
|
## Code written for E2B
|
|
91
98
|
|
|
92
|
-
`withruntime/e2b`
|
|
99
|
+
`withruntime/e2b` translates supported E2B sandbox calls to Runtime. Change the
|
|
93
100
|
import and set `RUNTIME_API_KEY`. The
|
|
94
101
|
[switch guide](https://withruntime.com/docs/migrate) covers the other providers
|
|
95
102
|
and how to work out what you save:
|
|
@@ -123,7 +130,7 @@ package list every mapping and gap.
|
|
|
123
130
|
|
|
124
131
|
## Code written for Blaxel
|
|
125
132
|
|
|
126
|
-
`withruntime/blaxel`
|
|
133
|
+
`withruntime/blaxel` translates supported Blaxel sandbox calls. Change the
|
|
127
134
|
import:
|
|
128
135
|
|
|
129
136
|
```ts no-run
|
|
@@ -134,7 +141,7 @@ Sandboxes get Blaxel's default of 4096 MB, with one vCPU for every 2048 MB.
|
|
|
134
141
|
Standby becomes Runtime's pause: after 60 seconds without a call a sandbox
|
|
135
142
|
pauses with its memory and processes, and the next call wakes it. Envs,
|
|
136
143
|
processes by name, files, previews, snapshots, forks and the code interpreter
|
|
137
|
-
|
|
144
|
+
are supported by the adapter, along with sessions: `sandbox.sessions` makes a
|
|
138
145
|
Runtime sandbox session and `SandboxInstance.fromSession` drives the sandbox
|
|
139
146
|
with its token. A Blaxel key is never sent anywhere. Drives, codegen, schedules and Blaxel's agent, model and MCP hosting throw
|
|
140
147
|
`NotSupportedError` before anything happens, naming what to use instead.
|
|
@@ -154,7 +161,8 @@ https://withruntime.com/docs/frameworks.
|
|
|
154
161
|
## CLI
|
|
155
162
|
|
|
156
163
|
```bash no-run
|
|
157
|
-
|
|
164
|
+
printf '%s\n' 'print(sum([125, 250, 375]))' > invoice.py
|
|
165
|
+
npx withruntime sandbox run -- python3 - < invoice.py # connects on first use
|
|
158
166
|
npx withruntime sandbox create
|
|
159
167
|
npx withruntime help
|
|
160
168
|
```
|
package/VERCEL.md
CHANGED
|
@@ -16,9 +16,9 @@ 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 mapping was written against `@vercel/sandbox` 3.5.
|
|
19
|
+
The mapping was written against `@vercel/sandbox` 3.5.1 and `vercel-sandbox`
|
|
20
20
|
0.7.0 on PyPI (the `vercel.sandbox` module of `vercel` 0.11.4), checked
|
|
21
|
-
|
|
21
|
+
30 September 2026.
|
|
22
22
|
|
|
23
23
|
## Keys
|
|
24
24
|
|
|
@@ -73,7 +73,7 @@ are ignored.
|
|
|
73
73
|
| `domain(port)`, `update({ ports })` | The public preview of that port; ports added or removed. |
|
|
74
74
|
| `stop()`, `delete()`, `extendTimeout(ms)` | `pause` (persistent) or `stop`; `stop`; `extend`. |
|
|
75
75
|
| `update({ timeout, networkPolicy, snapshotExpiration })` | `extend` (later only), network rules, retention. |
|
|
76
|
-
| `snapshot()`, `Snapshot.get`, `Snapshot.list`, `snapshot.delete()` | A
|
|
76
|
+
| `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`. |
|
|
77
77
|
| Error classes | `APIError` with a `response` whose status is Runtime's and `json` of `{ error: { code, message } }`; also `code`, `hint` and `requestId`. |
|
|
78
78
|
| 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. |
|
|
79
79
|
|
|
@@ -98,6 +98,16 @@ Each of these throws `NotSupportedError` before anything happens. Its
|
|
|
98
98
|
| `Drive`, `SandboxUser`, `defineSandboxProxy` | Runtime volumes; `sudo`; `sandbox.withruntime.previews`. |
|
|
99
99
|
| Listing by time, prefix or cursor (JavaScript) | List them all and filter the result yourself. (Python applies a name prefix and newest-first order itself.) |
|
|
100
100
|
|
|
101
|
+
Explicit snapshots require the released native disk-capture capability; a server
|
|
102
|
+
that does not confirm disk-only capture is refused. If capture succeeds but the
|
|
103
|
+
source cannot finish stopping, the error retains `snapshotId` and
|
|
104
|
+
`sourceSandboxId` so the saved filesystem remains recoverable. JavaScript exposes
|
|
105
|
+
them in `error.json.error.details` for API errors and directly on other errors;
|
|
106
|
+
Python exposes them in `error.data` for API errors and directly on other errors.
|
|
107
|
+
`snapshot_source_stop_timeout` means the source is still stopping after its wait;
|
|
108
|
+
a failed stop request keeps its original error code. These contracts remain
|
|
109
|
+
partial; controlled package comparisons do not prove hosted restoration.
|
|
110
|
+
|
|
101
111
|
Some differences are not refusals:
|
|
102
112
|
|
|
103
113
|
- A persistent sandbox keeps its memory and processes as well as its files
|
package/compatibility-lock.json
CHANGED
|
@@ -12,6 +12,29 @@
|
|
|
12
12
|
"version": "2.51.0",
|
|
13
13
|
"artifacts": {
|
|
14
14
|
"2.51.0": "sha512-P+50lx1nOYpgCFyE1xuz6JVN/TqJivMUiH7v+RW0CUSfb4+NCu8IkC5KruT2sNPgp6aexddQQ77+OZKGpZZJ+Q=="
|
|
15
|
+
},
|
|
16
|
+
"latestReview": {
|
|
17
|
+
"version": "2.52.0",
|
|
18
|
+
"artifacts": {
|
|
19
|
+
"2.52.0": "sha512-TmUZlAvQq8BbguodpA+BBdawR/x5uILMQtHcLkdaLUqevsDjDdh46IYYU8ZRYKsQ4OhWr4xhsFIPSg1kgf+O0w=="
|
|
20
|
+
},
|
|
21
|
+
"reviewedAt": "2026-10-01",
|
|
22
|
+
"disposition": "held-for-sdk-qualification",
|
|
23
|
+
"evidence": {
|
|
24
|
+
"sourceUrls": [
|
|
25
|
+
"https://registry.npmjs.org/e2b/2.52.0",
|
|
26
|
+
"https://registry.npmjs.org/e2b/-/e2b-2.52.0.tgz"
|
|
27
|
+
],
|
|
28
|
+
"artifactSha256": {
|
|
29
|
+
"2.52.0": "facbc53fa42757d94aa2be3433d779c7ab6b0afc780d4821a12a6d6815848c8e"
|
|
30
|
+
},
|
|
31
|
+
"changes": [
|
|
32
|
+
"dist/index.d.ts/index.mjs: HTTP1.1/2 selection, E2B_HTTP_VERSION, retry502/503 and connection failures, fork integer count 1..20, Dockerignore matching/precedence and invalid-pattern behavior changed. package.json changes protobuf/chalk/openapi-fetch floors. Installed transport/retry/fork/filesystem consumers not qualified; supported 2.51.0 unchanged.",
|
|
33
|
+
"Source digest dist/index.d.ts: 304acc9c8bbec8aeb69296719eb34986f987256e758aa7e220b551b9a7dcbd30 -> fa2e6eb09b6c6d3489056ee948248812e8879a23b6865561e5152f243bf6ca40.",
|
|
34
|
+
"Source digest dist/index.mjs: b75feeedb6543fee003533270b0f07fc1a9eb40315dfc0c44510e2dd8854b896 -> 343a41249ea8d48fe0a70fc986066d3ef97b6da2b71267211d21f77036efafea.",
|
|
35
|
+
"Source digest package.json: a2c759c4681b91b824aea7919f4661e498ec0e0b68d6cc333f4967f7b2b63f7b -> c5b699f80831b621178c83ea477d096bc1167e0083b6ba7a51d17f564207255f."
|
|
36
|
+
]
|
|
37
|
+
}
|
|
15
38
|
}
|
|
16
39
|
},
|
|
17
40
|
{
|
|
@@ -29,6 +52,34 @@
|
|
|
29
52
|
"artifacts": {
|
|
30
53
|
"e2b-2.51.0-py3-none-any.whl": "sha256-951d0fd069f017e760b338a435bdb83589b4bfb9574fc5203a7f777e9cb994c2",
|
|
31
54
|
"e2b-2.51.0.tar.gz": "sha256-902ee861b30c8ec3e46e7f84db8c993f30695872c7b4490efaad1627ec6e08ba"
|
|
55
|
+
},
|
|
56
|
+
"latestReview": {
|
|
57
|
+
"version": "2.52.0",
|
|
58
|
+
"artifacts": {
|
|
59
|
+
"e2b-2.52.0-py3-none-any.whl": "sha256-6f4b5084b09986db43e99c7405bae6b14dc56984a69bbb1dc0687f1c71515cfb",
|
|
60
|
+
"e2b-2.52.0.tar.gz": "sha256-58c0042609513799341d4c1837e2581a4a5e73d3d62c9f1c57495c5e23eedee2"
|
|
61
|
+
},
|
|
62
|
+
"reviewedAt": "2026-10-01",
|
|
63
|
+
"disposition": "held-for-sdk-qualification",
|
|
64
|
+
"evidence": {
|
|
65
|
+
"sourceUrls": [
|
|
66
|
+
"https://pypi.org/pypi/e2b/2.52.0/json",
|
|
67
|
+
"https://files.pythonhosted.org/packages/53/71/1a01b7e4486b5962eaade7dba7026876a1b4569e49b464e82912d8801e38/e2b-2.52.0-py3-none-any.whl",
|
|
68
|
+
"https://files.pythonhosted.org/packages/3c/c4/560e7de54cece3573086f09d304e595729964aa18593b437125d9f8bd926/e2b-2.52.0.tar.gz"
|
|
69
|
+
],
|
|
70
|
+
"artifactSha256": {
|
|
71
|
+
"e2b-2.52.0-py3-none-any.whl": "6f4b5084b09986db43e99c7405bae6b14dc56984a69bbb1dc0687f1c71515cfb",
|
|
72
|
+
"e2b-2.52.0.tar.gz": "58c0042609513799341d4c1837e2581a4a5e73d3d62c9f1c57495c5e23eedee2"
|
|
73
|
+
},
|
|
74
|
+
"changes": [
|
|
75
|
+
"e2b/connection_config.py/retry.py: HTTP1.1/2 selection and E2B_HTTP_VERSION; retries 502/503 and eligible network failures, excluding unsafe resource-creating replay. e2b/api clients replace pool shards with bounded least-in-flight shared pools, defaults 100 streams / 200 connections.",
|
|
76
|
+
"Fork count validation1..20 and template/dockerignore/fileIgnorePatterns matching/precedence changed. Installed sync/async transport/cleanup/retry/fork/filesystem consumers not qualified; supported 2.51.0 unchanged.",
|
|
77
|
+
"Source digest e2b/api/__init__.py: 00b09a79f25d01594c4b1ec5f14d3d0cc3ccc319958a2e1ca34ba91cdbf114b3 -> 640233a615a3c68752a2f2cecb1af919aebfc5e895bd4f09003aee61da38c7c0.",
|
|
78
|
+
"Source digest e2b/connection_config.py: 284aa3e7cc319432ca9147ddb7d9ab8cd315cf35283da7699eebe877375758a4 -> c165948133a2f174b5a490afa9502301d038d8097f91203b2c2174f451accf83.",
|
|
79
|
+
"Source digest e2b/retry.py: aa54aa8873fd44027a9c3ff790594d4583d2f415c0d3bd858566d2f0e15fa71f -> 40b1d7ea0732a721d77b31483e54f9f190e444cb798c54fc141856f52685e208.",
|
|
80
|
+
"Source digest e2b/template/dockerignore.py: None -> cba4ff9d7efa5ae987c4c0114770c114b5aefe2c18847e55d2bd811b9a1a088c."
|
|
81
|
+
]
|
|
82
|
+
}
|
|
32
83
|
}
|
|
33
84
|
},
|
|
34
85
|
{
|
|
@@ -38,6 +89,31 @@
|
|
|
38
89
|
"artifacts": {
|
|
39
90
|
"e2b_code_interpreter-2.10.0-py3-none-any.whl": "sha256-6ba776122086261875bc6033ef2dc42ac6b6e22cefdffdfd19d30e93bb09786f",
|
|
40
91
|
"e2b_code_interpreter-2.10.0.tar.gz": "sha256-57fb7f9b9ad99ebbdf407619786fdb84e31537c2fbc8358c394aa0f0cbc1af28"
|
|
92
|
+
},
|
|
93
|
+
"latestReview": {
|
|
94
|
+
"version": "2.10.1",
|
|
95
|
+
"artifacts": {
|
|
96
|
+
"e2b_code_interpreter-2.10.1-py3-none-any.whl": "sha256-f4c9732699ee4b1c289acedac8bff66fccecc6ab374bf0b4ef88d5ad063e333d",
|
|
97
|
+
"e2b_code_interpreter-2.10.1.tar.gz": "sha256-94e504667788c6cbb175e5deaf1f68e8df474b670343fe1d72e2496b49d5a666"
|
|
98
|
+
},
|
|
99
|
+
"reviewedAt": "2026-10-01",
|
|
100
|
+
"disposition": "held-for-sdk-qualification",
|
|
101
|
+
"evidence": {
|
|
102
|
+
"sourceUrls": [
|
|
103
|
+
"https://pypi.org/pypi/e2b-code-interpreter/2.10.1/json",
|
|
104
|
+
"https://files.pythonhosted.org/packages/27/1f/0f9a4c4d9669afd5389e91bd96099a8eb1d1a32f9c67871cc56c4a8556b7/e2b_code_interpreter-2.10.1-py3-none-any.whl",
|
|
105
|
+
"https://files.pythonhosted.org/packages/38/e6/b01e60524e7e4d2e8ce634b3be6d00fe09c606f3d24a448b4a5c087d3bda/e2b_code_interpreter-2.10.1.tar.gz"
|
|
106
|
+
],
|
|
107
|
+
"artifactSha256": {
|
|
108
|
+
"e2b_code_interpreter-2.10.1-py3-none-any.whl": "f4c9732699ee4b1c289acedac8bff66fccecc6ab374bf0b4ef88d5ad063e333d",
|
|
109
|
+
"e2b_code_interpreter-2.10.1.tar.gz": "94e504667788c6cbb175e5deaf1f68e8df474b670343fe1d72e2496b49d5a666"
|
|
110
|
+
},
|
|
111
|
+
"changes": [
|
|
112
|
+
"code_interpreter_{sync,async}.py: Jupyter get_transport argument changes from http2=False to http_version=\"1.1\". pyproject.toml and PKG-INFO raise e2b floor to 2.52.0,<3.0.0. Installed Jupyter cancellation/base SDK consumers not qualified; supported 2.10.0 unchanged.",
|
|
113
|
+
"Source digest e2b_code_interpreter/code_interpreter_sync.py: 298d832fe93e488300ac3174f2de590cc16d3563bdcc4ec31439d28265b66426 -> a88ff6a0df5163bceea545d077be090dbc78c96e48354e304677b02799eec17e.",
|
|
114
|
+
"Source digest pyproject.toml: 6c395fdf75ddc89acabb94fd0e419fc31317e6f3fa297894cbe7e766f090322c -> ef2b569a82f2e6edf722939ab27ca476a292886655c2af8f9e75eb9cae287941."
|
|
115
|
+
]
|
|
116
|
+
}
|
|
41
117
|
}
|
|
42
118
|
}
|
|
43
119
|
]
|
|
@@ -128,18 +204,18 @@
|
|
|
128
204
|
{
|
|
129
205
|
"registry": "npm",
|
|
130
206
|
"name": "@blaxel/core",
|
|
131
|
-
"version": "0.3.
|
|
207
|
+
"version": "0.3.25",
|
|
132
208
|
"artifacts": {
|
|
133
|
-
"0.3.
|
|
209
|
+
"0.3.25": "sha512-K6aGUyIpgrPnkpwMOI/U/gbZwveOMu1Am04pkawZQjkp7NUa/roG0HC6NJPBp3AVVJY3CQtkGSWpAJ2DV4ZKpw=="
|
|
134
210
|
}
|
|
135
211
|
},
|
|
136
212
|
{
|
|
137
213
|
"registry": "pypi",
|
|
138
214
|
"name": "blaxel",
|
|
139
|
-
"version": "0.4.
|
|
215
|
+
"version": "0.4.13",
|
|
140
216
|
"artifacts": {
|
|
141
|
-
"blaxel-0.4.
|
|
142
|
-
"blaxel-0.4.
|
|
217
|
+
"blaxel-0.4.13-py3-none-any.whl": "sha256-b8817718ca63a2b31a5026f98c7191d5ed8f2f4c1aafc2d4aa57491a560a2146",
|
|
218
|
+
"blaxel-0.4.13.tar.gz": "sha256-a036256792e85238724b8bce38fb7c0b4f661fe4c3ac576258a8be1736ac8483"
|
|
143
219
|
}
|
|
144
220
|
}
|
|
145
221
|
]
|
|
@@ -225,10 +301,10 @@
|
|
|
225
301
|
{
|
|
226
302
|
"registry": "pypi",
|
|
227
303
|
"name": "prime-sandboxes",
|
|
228
|
-
"version": "0.4.
|
|
304
|
+
"version": "0.4.1",
|
|
229
305
|
"artifacts": {
|
|
230
|
-
"prime_sandboxes-0.4.
|
|
231
|
-
"prime_sandboxes-0.4.
|
|
306
|
+
"prime_sandboxes-0.4.1-py3-none-any.whl": "sha256-1a1bb96afacc66d690815be82c0b7af180ea141421b7d180b4a0adbada4f38f0",
|
|
307
|
+
"prime_sandboxes-0.4.1.tar.gz": "sha256-53f7577dc9070e3b8e30db360f9e3cce3bcc35f8765b26f24f64dbc3c7763b06"
|
|
232
308
|
}
|
|
233
309
|
}
|
|
234
310
|
]
|
package/dist/blaxel/errors.js
CHANGED
|
@@ -95,7 +95,7 @@ const BLAXEL_HINTS = {
|
|
|
95
95
|
sandbox_paused: "Call sandbox.unarchive(), then try again.",
|
|
96
96
|
not_running: "The sandbox is not running: call sandbox.unarchive() if it was archived, or make a new one with SandboxInstance.create if it was deleted.",
|
|
97
97
|
trial_busy: "The trial's sandboxes are all in use: delete one you no longer need (sandbox.delete()) or archive it (sandbox.archive()), then try again. Moving to paid credit is the account owner's decision.",
|
|
98
|
-
public_preview_not_allowed: "On the trial, share the port privately: sandbox.previews.create({ metadata: { name }, spec: { port, public: false } }) and a token from preview.tokens.create(expiresAt). A public preview needs a paid sandbox, which is the account owner's decision.",
|
|
98
|
+
public_preview_not_allowed: "On the trial, share the port privately: sandbox.previews.create({ metadata: { name }, spec: { port, public: false } }) and a token from preview.tokens.create(expiresAt) on a server supporting absolute preview deadlines. A public preview needs a paid sandbox, which is the account owner's decision.",
|
|
99
99
|
busy: AGAIN,
|
|
100
100
|
guest_busy: AGAIN,
|
|
101
101
|
rate_limited: AGAIN,
|
package/dist/blaxel/lookup.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export declare function findSandbox(client: Runtime, name: string): Promise<Runt
|
|
|
32
32
|
export declare function findByExternalId(client: Runtime, externalId: string): Promise<RuntimeSandbox>;
|
|
33
33
|
/** Runs a create or fork that names a sandbox. When the name is still held
|
|
34
34
|
* by a sandbox that is stopping (deleted a moment ago, by this client or
|
|
35
|
-
* another), waits for it to stop, up to 30 seconds, and runs it once more
|
|
36
|
-
*
|
|
35
|
+
* another), waits for it to stop, up to 30 seconds, and runs it once more.
|
|
36
|
+
* This reconciles Runtime's stopping-name conflicts. Blaxel 0.3.25 delegates
|
|
37
|
+
* createIfNotExists reconciliation to its control plane without client polling. */
|
|
37
38
|
export declare function whenNameFree<T>(client: Runtime, work: () => Promise<T>): Promise<T>;
|
package/dist/blaxel/lookup.js
CHANGED
|
@@ -54,8 +54,9 @@ export async function findByExternalId(client, externalId) {
|
|
|
54
54
|
}
|
|
55
55
|
/** Runs a create or fork that names a sandbox. When the name is still held
|
|
56
56
|
* by a sandbox that is stopping (deleted a moment ago, by this client or
|
|
57
|
-
* another), waits for it to stop, up to 30 seconds, and runs it once more
|
|
58
|
-
*
|
|
57
|
+
* another), waits for it to stop, up to 30 seconds, and runs it once more.
|
|
58
|
+
* This reconciles Runtime's stopping-name conflicts. Blaxel 0.3.25 delegates
|
|
59
|
+
* createIfNotExists reconciliation to its control plane without client polling. */
|
|
59
60
|
export async function whenNameFree(client, work) {
|
|
60
61
|
try {
|
|
61
62
|
return await work();
|
|
@@ -28,7 +28,7 @@ export type PaginatedList<T, TQuery extends CursorPaginationQuery = CursorPagina
|
|
|
28
28
|
/** Blaxel's own helper: the items of a list answer in any of its shapes. */
|
|
29
29
|
export declare function unwrapListData<T>(response: ListResponse<T>): T[];
|
|
30
30
|
/** Blaxel's own helper, for a list fetched by `fetchPage`. */
|
|
31
|
-
export declare function createPaginatedList<TRaw, TItem, TQuery extends CursorPaginationQuery>({ response, fetchPage, mapItem, query, }: {
|
|
31
|
+
export declare function createPaginatedList<TRaw, TItem, TQuery extends CursorPaginationQuery>({ response, fetchPage, mapItem, query, seenCursors, }: {
|
|
32
32
|
response: ListResponse<TRaw>;
|
|
33
33
|
fetchPage: (query?: TQuery) => Promise<ListResponse<TRaw>>;
|
|
34
34
|
mapItem: (item: TRaw) => TItem | Promise<TItem>;
|
|
@@ -36,4 +36,4 @@ export declare function createPaginatedList<TRaw, TItem, TQuery extends CursorPa
|
|
|
36
36
|
seenCursors?: Set<string>;
|
|
37
37
|
}): Promise<PaginatedList<TItem, TQuery>>;
|
|
38
38
|
/** A Runtime page, each item mapped, as Blaxel's paginated list. */
|
|
39
|
-
export declare function paginate<TRaw, TItem>(page: Page<TRaw>, map: (item: TRaw) => TItem): PaginatedList<TItem>;
|
|
39
|
+
export declare function paginate<TRaw, TItem>(page: Page<TRaw>, map: (item: TRaw) => TItem, seenCursors?: Set<string>): PaginatedList<TItem>;
|