withruntime 0.11.0 → 0.11.2
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 +8 -9
- package/DAYTONA.md +8 -9
- package/E2B.md +63 -21
- package/README.md +6 -5
- package/README.src.md +6 -5
- package/VERCEL.md +3 -2
- package/compatibility-lock.json +69 -14
- package/dist/api-defaults.d.ts +1 -1
- package/dist/api-defaults.js +1 -1
- package/dist/blaxel/errors.js +4 -4
- package/dist/blaxel/lookup.d.ts +2 -1
- package/dist/blaxel/lookup.js +2 -1
- package/dist/blaxel/sandbox.d.ts +8 -7
- package/dist/blaxel/sandbox.js +16 -12
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +99 -27
- package/dist/client.d.ts +16 -60
- package/dist/client.js +14 -103
- package/dist/compat/files.js +5 -1
- package/dist/compat/lease.d.ts +1 -0
- package/dist/compat/lease.js +14 -8
- package/dist/credentials.d.ts +9 -0
- package/dist/credentials.js +26 -4
- package/dist/daytona/daytona.d.ts +1 -2
- package/dist/daytona/daytona.js +30 -14
- package/dist/daytona/sandbox.d.ts +9 -4
- package/dist/daytona/sandbox.js +24 -5
- package/dist/e2b/client.d.ts +15 -2
- package/dist/e2b/client.js +61 -7
- package/dist/e2b/commands.d.ts +3 -0
- package/dist/e2b/commands.js +16 -5
- package/dist/e2b/errors.d.ts +26 -2
- package/dist/e2b/errors.js +38 -5
- package/dist/e2b/filesystem.d.ts +1 -1
- package/dist/e2b/filesystem.js +82 -16
- package/dist/e2b/index.d.ts +2 -2
- package/dist/e2b/index.js +2 -2
- package/dist/e2b/sandbox.d.ts +25 -12
- package/dist/e2b/sandbox.js +196 -165
- package/dist/e2b/unsupported.d.ts +19 -0
- package/dist/e2b/unsupported.js +21 -0
- package/dist/e2b/users.d.ts +9 -0
- package/dist/e2b/users.js +22 -0
- package/dist/errors.d.ts +10 -4
- package/dist/errors.js +18 -10
- package/dist/identity.js +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/machine.d.ts +180 -0
- package/dist/machine.js +504 -0
- package/dist/modal/index.js +6 -2
- package/dist/network-cli.js +7 -7
- package/dist/openai-agents/index.d.ts +1 -1
- package/dist/openai-agents/index.js +1 -1
- package/dist/products/browser.d.ts +2 -1
- package/dist/products/browser.js +9 -19
- package/dist/products/desktop.d.ts +2 -1
- package/dist/products/desktop.js +5 -30
- package/dist/products/jobs.d.ts +6 -5
- package/dist/products/jobs.js +6 -3
- package/dist/products/limits.d.ts +4 -10
- package/dist/products/mcp.d.ts +5 -1
- package/dist/products/mcp.js +29 -8
- package/dist/products/network-products.d.ts +1 -1
- package/dist/products/network-products.js +1 -1
- package/dist/products/network.d.ts +1 -1
- package/dist/products/observability.d.ts +1 -1
- package/dist/products/private-network.d.ts +1 -1
- package/dist/products/secrets.d.ts +3 -3
- package/dist/products/switching.d.ts +2 -3
- package/dist/runloop/index.js +6 -2
- package/dist/sandbox.d.ts +7 -84
- package/dist/sandbox.js +58 -345
- package/dist/tar.d.ts +2 -0
- package/dist/tar.js +74 -16
- package/dist/transport.d.ts +36 -8
- package/dist/transport.js +174 -37
- package/dist/types.d.ts +102 -12
- package/dist/vercel/filesystem.js +3 -1
- package/dist/vercel/sandbox.d.ts +18 -12
- package/dist/vercel/sandbox.js +27 -15
- package/dist/wait.d.ts +12 -0
- package/dist/wait.js +47 -0
- package/package.json +1 -1
package/BLAXEL.md
CHANGED
|
@@ -34,7 +34,7 @@ name, or through `getByExternalId`, use the same Runtime key.
|
|
|
34
34
|
- **Machine:** Blaxel's default of 4096 MB. vCPUs follow Blaxel's rule of one
|
|
35
35
|
per 2048 MB (at least one, at most 16): 2 for the default, 4 for 8192 MB. A
|
|
36
36
|
trial sandbox has at most 4096 MB (2 vCPUs); `memory: 8192` or more needs
|
|
37
|
-
prepaid credit, and on the trial is refused with a 400 (`
|
|
37
|
+
prepaid credit, and on the trial is refused with a 400 (`no_credit_size_limit`)
|
|
38
38
|
saying so.
|
|
39
39
|
- **Image:** Blaxel's `base-image`, `py-app`, `ts-app`, `node`,
|
|
40
40
|
`docker-in-sandbox` and `jupyter-server` are Runtime's stock image (Ubuntu
|
|
@@ -48,15 +48,14 @@ name, or through `getByExternalId`, use the same Runtime key.
|
|
|
48
48
|
resumes on the next call. On Runtime it pauses after 60 seconds without a
|
|
49
49
|
call (Runtime's shortest idle pause; Blaxel's is about 15 seconds), keeping
|
|
50
50
|
its memory, files and processes, and wakes by itself on the next command,
|
|
51
|
-
file call or preview visit.
|
|
52
|
-
|
|
53
|
-
does run out the sandbox pauses rather than ends.
|
|
51
|
+
file call or preview visit. It has no time limit, so a sandbox in use is
|
|
52
|
+
never paused on a clock.
|
|
54
53
|
- **How long it is kept:** Blaxel keeps a sandbox until it is deleted or its
|
|
55
54
|
TTL ends. A paused Runtime sandbox is kept 365 days when no TTL, expiry or
|
|
56
55
|
lifecycle is given. With one, it is never deleted before Blaxel would delete
|
|
57
56
|
it, and may be kept longer:
|
|
58
|
-
- a `ttl`, `expires`, `ttl-max-age` or `date` within the hour is a
|
|
59
|
-
ends the sandbox at that time, or later if the sandbox paused and woke;
|
|
57
|
+
- a `ttl`, `expires`, `ttl-max-age` or `date` within the hour is a time limit
|
|
58
|
+
that ends the sandbox at that time, or later if the sandbox paused and woke;
|
|
60
59
|
- any other deadline, and any `ttl-idle`, keeps a paused sandbox that many
|
|
61
60
|
days, rounded up, counted from each pause; with several, the shortest wins;
|
|
62
61
|
- at most 365 days.
|
|
@@ -161,9 +160,9 @@ Some differences are not refusals:
|
|
|
161
160
|
The old idle pause comes back once no `keepAlive` process runs, when a client
|
|
162
161
|
sees one end (a waited exec, `wait` or `get`), stops or kills one, or calls
|
|
163
162
|
`SandboxInstance.get`. With no such call, the sandbox pauses when it has been
|
|
164
|
-
idle for that `timeout`.
|
|
165
|
-
is paused with the sandbox when the
|
|
166
|
-
carries on at the next call.
|
|
163
|
+
idle for that `timeout`. On a sandbox with a time limit, a `keepAlive`
|
|
164
|
+
process past it is paused with the sandbox when the limit ends with no call
|
|
165
|
+
to renew it, and carries on at the next call.
|
|
167
166
|
- **A name is not refused while its process runs:** a second process may take a
|
|
168
167
|
running process's name, and `get(name)` answers the newest.
|
|
169
168
|
- **`process.list()` leaves each process's output empty** (Blaxel includes a
|
package/DAYTONA.md
CHANGED
|
@@ -17,7 +17,7 @@ from withruntime.daytona import AsyncDaytona # was: from daytona import AsyncDa
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
The mapping was written against `@daytona/sdk` 0.220.0 and `daytona` 0.220.0
|
|
20
|
-
on PyPI, checked
|
|
20
|
+
on PyPI, and checked against `@daytona/sdk` 0.222.0 on 5 October 2026. The exact releases and artifact hashes
|
|
21
21
|
are kept in `compatibility-lock.json`.
|
|
22
22
|
|
|
23
23
|
## Keys
|
|
@@ -38,14 +38,13 @@ package talks only to Runtime.
|
|
|
38
38
|
kept for Runtime's retention: 30 days on credit, 7 on the trial, or
|
|
39
39
|
`autoDeleteInterval` minutes rounded up to whole days. `delete()` ends it.
|
|
40
40
|
An `ephemeral` sandbox (or `autoDeleteInterval: 0`) ends on `stop()`.
|
|
41
|
-
- **Auto-stop:**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
the deadline.
|
|
41
|
+
- **Auto-stop:** `autoStopInterval` minutes (default 15; `0` never) is the
|
|
42
|
+
sandbox's idle pause: it pauses after that long with nothing happening in
|
|
43
|
+
it, counted by the sandbox itself, so a long command is never paused for
|
|
44
|
+
want of calls. It has no time limit. `ttlMinutes` gives it one, and with
|
|
45
|
+
it Daytona's own rule: the sandbox pauses after `autoStopInterval` minutes
|
|
46
|
+
without a call through the adapter, each call moving the limit on, and ends
|
|
47
|
+
at the deadline.
|
|
49
48
|
- **Funding:** left to Runtime, as `withruntime`'s own `create()` does: the free
|
|
50
49
|
trial while the account has trial time, then prepaid credit. Pass
|
|
51
50
|
`withruntime: { create: { funding: "trial" } }` to `new Daytona(...)` or to
|
package/E2B.md
CHANGED
|
@@ -20,9 +20,9 @@ from withruntime.e2b import Sandbox # was: from e2b import Sandbox
|
|
|
20
20
|
from withruntime.e2b.code_interpreter import Sandbox # was: from e2b_code_interpreter import Sandbox
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
The mapping was written against `e2b` 2.51.0 and checked against `e2b` 2.52.
|
|
24
|
-
and `@e2b/code-interpreter` 2.8.0 (Python: `e2b` 2.52.
|
|
25
|
-
2.10.1) on
|
|
23
|
+
The mapping was written against `e2b` 2.51.0 and checked against `e2b` 2.52.1
|
|
24
|
+
and `@e2b/code-interpreter` 2.8.0 (Python: `e2b` 2.52.1, `e2b-code-interpreter`
|
|
25
|
+
2.10.1) on 5 October 2026. The exact package releases and artifact hashes are kept in
|
|
26
26
|
`compatibility-lock.json`.
|
|
27
27
|
|
|
28
28
|
## Keys
|
|
@@ -30,17 +30,55 @@ and `@e2b/code-interpreter` 2.8.0 (Python: `e2b` 2.52.0, `e2b-code-interpreter`
|
|
|
30
30
|
The package uses, in order: an `apiKey` you pass, `RUNTIME_API_KEY`, a Runtime
|
|
31
31
|
key left in `E2B_API_KEY`, and the key `npx withruntime login` saved on this
|
|
32
32
|
machine. An E2B key (`e2b_...`) is never sent anywhere. If one is passed as
|
|
33
|
-
`apiKey` and `RUNTIME_API_KEY` is not set, the call
|
|
34
|
-
`AuthenticationError
|
|
33
|
+
`apiKey`, or left in `E2B_API_KEY`, and `RUNTIME_API_KEY` is not set, the call
|
|
34
|
+
fails with `AuthenticationError` (Python: `AuthenticationException`) saying
|
|
35
|
+
so, rather than fall back to a saved login that may be another account's.
|
|
36
|
+
When `RUNTIME_API_KEY` and `E2B_API_KEY` hold two different Runtime keys, which
|
|
37
|
+
may be two accounts, a warning says so once (`RUNTIME_E2B_TWO_KEYS`; Python: a
|
|
38
|
+
`RuntimeWarning`). A template with no image of its name fails naming the
|
|
39
|
+
account the key belongs to and where the key came from.
|
|
35
40
|
|
|
36
41
|
## What a sandbox gets
|
|
37
42
|
|
|
38
43
|
- **Machine:** E2B's default, 2 vCPU and 512 MiB. For another, pass
|
|
39
44
|
`runtime: { create: { memoryMiB: 4096 } }` (Python:
|
|
40
45
|
`runtime_create={"memory_mib": 4096}`).
|
|
41
|
-
- **Timeout:**
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
- **Timeout:** kept by Runtime's server, never by a timer in your process,
|
|
47
|
+
so it holds after the process that made the sandbox exits. A `timeoutMs`
|
|
48
|
+
you give (Python `timeout`, seconds), up to 24 hours, deletes the sandbox
|
|
49
|
+
when it runs out, as E2B kills it; so does `lifecycle: { onTimeout: "kill" }`.
|
|
50
|
+
With no timeout, E2B's default of 300 seconds applies, and when it runs out
|
|
51
|
+
the sandbox **pauses** instead: nobody asked for it to end, so nothing is
|
|
52
|
+
lost, and the next call wakes it. E2B deletes it at that point.
|
|
53
|
+
`lifecycle: { onTimeout: "pause" }` pauses at any timeout.
|
|
54
|
+
- **What a pause keeps, and costs:** memory, files and running processes, for
|
|
55
|
+
as long as the account has credit, billed as paused storage by the GB a
|
|
56
|
+
month for what the sandbox alone holds (`pricing.md`, "Paused storage").
|
|
57
|
+
Sandboxes created with no timeout and never killed pile up as paused
|
|
58
|
+
storage: call `kill()` when the work is done, or give a `timeoutMs`.
|
|
59
|
+
- **On a pilot account:** the server keeps every sandbox running until you
|
|
60
|
+
end it, with no idle pause, whatever `timeoutMs` says, and machine size is
|
|
61
|
+
the pilot's. `kill()` deletes it.
|
|
62
|
+
- **Kill:** `kill()` deletes the sandbox for good, as E2B's does: its disk,
|
|
63
|
+
memory and shared ports go, and it no longer counts against the account's
|
|
64
|
+
sandboxes.
|
|
65
|
+
- **Idle pause:** Runtime's default, which E2B does not have. After 60
|
|
66
|
+
seconds with nothing happening in it (no request, running command, open
|
|
67
|
+
connection, traffic or CPU use) the sandbox pauses with its memory kept, and
|
|
68
|
+
the next command or file call wakes it. To code written for E2B it is still
|
|
69
|
+
running: `isRunning()` is `true`, `getInfo()` says `running` and
|
|
70
|
+
`list({ query: { state: ["running"] } })` includes it. Pass
|
|
71
|
+
`runtime: { create: { idlePauseSeconds: 0 } }` (Python:
|
|
72
|
+
`runtime_create={"idle_pause_seconds": 0}`) to keep it running, as on E2B.
|
|
73
|
+
- **Connections:** one client per key, holding up to 4,096 connections to
|
|
74
|
+
the API at once, the most Runtime's edge gives an address that has used a
|
|
75
|
+
valid key. E2B's SDK holds no call back, and neither does this one: a
|
|
76
|
+
thousand commands at once from one process all run at once. Past an
|
|
77
|
+
account's room the API answers with a retry, which the client waits out. If
|
|
78
|
+
calls ever wait for a connection, a warning says so once
|
|
79
|
+
(`RUNTIME_E2B_QUEUED`). Runtime's own SDK keeps 48; pass your own client
|
|
80
|
+
with `runtime: { client: new Runtime({ maxConnections }) }` (Python:
|
|
81
|
+
`client=Runtime(max_connections=...)`).
|
|
44
82
|
- **Funding:** left to Runtime, as `withruntime`'s own `create()` does. The
|
|
45
83
|
free trial is used while the account has trial time, then prepaid credit.
|
|
46
84
|
Pass `runtime: { create: { funding: "trial" } }` to use only the trial.
|
|
@@ -53,30 +91,30 @@ machine. An E2B key (`e2b_...`) is never sent anywhere. If one is passed as
|
|
|
53
91
|
|
|
54
92
|
| E2B | On Runtime |
|
|
55
93
|
| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
56
|
-
| `Sandbox.create()`, `Sandbox.create(template, opts)` | `sandboxes.create`. `base` and `code-interpreter-v1` are Runtime's stock image. Any other name
|
|
57
|
-
| `timeoutMs` (Python `timeout`, seconds) | `timeoutSeconds`, rounded up
|
|
94
|
+
| `Sandbox.create()`, `Sandbox.create(template, opts)` | `sandboxes.create`. `base` and `code-interpreter-v1` are Runtime's stock image. Any other name, with its `:tag`, is a Runtime image of that name, resolved by the create itself; E2B's `team/` prefix is dropped, since an account's images are its own. A UUID is an image or a snapshot. A name no image has throws `TemplateError` saying how to build it. |
|
|
95
|
+
| `timeoutMs` (Python `timeout`, seconds) | `timeoutSeconds`, rounded up, kept by the server, with `onTimeout: "delete"`. Left out, 300 s with `onTimeout: "pause"`. Under 60 s becomes 60 s, with a warning. Up to 24 hours, as on E2B; over throws `InvalidArgumentError`. |
|
|
58
96
|
| `metadata` | labels (at most 32). |
|
|
59
97
|
| `envs` | Given to every command and code run through this object. |
|
|
60
98
|
| `allowInternetAccess: false` | `network: { internet: false }`. |
|
|
61
|
-
| `lifecycle.onTimeout` | `
|
|
99
|
+
| `lifecycle.onTimeout` | `onTimeout`: `kill` is `delete`, `pause` is `pause`. |
|
|
62
100
|
| `commands.run(cmd, { cwd, envs, timeoutMs, onStdout, onStderr })` | A native process started by a streamed exec that reads it from the first byte, so Runtime holds a fast writer back rather than drop output: the result is whole, however long. The default command connection deadline is 60 s; `0` disables it. The process lives up to 24 hours, within the sandbox lease. |
|
|
63
101
|
| Non-zero exit | Throws `CommandExitError` with `exitCode`, `stdout`, `stderr` and `error` (`exit status N`). A command killed by a signal has `exitCode` -1. |
|
|
64
|
-
| Command past its timeout | Disconnects with `TimeoutError` (Python: `TimeoutException`) without killing the command; reconnect by pid to keep reading.
|
|
102
|
+
| Command past its timeout | Disconnects with `TimeoutError` (Python: `TimeoutException`) without killing the command; reconnect by pid to keep reading. A command whose sandbox is killed under it ends with `TimeoutError` too, saying the sandbox was killed or reached its end of life. |
|
|
65
103
|
| `commands.run(cmd, { background: true })` | `spawn`. Returns a `CommandHandle` with `pid`, `wait()`, `kill()` (SIGKILL), `sendStdin`, `closeStdin`, `disconnect`, `stdout`, `stderr`, `exitCode`. Runtime keeps the last 1 MiB a process printed; anything older that was not read in time is lost, which sets `truncated` and warns. A command with `stdin: true` starts the same way. |
|
|
66
104
|
| `user` (commands, PTY and files) | Runs as that Linux user through `sudo -u`; `root` needs nothing more. A user the sandbox lacks throws `InvalidArgumentError` saying how to add one; none is ever created. `user: "user"` is the sandbox's own user. Watching a directory as another user is refused. |
|
|
67
|
-
| `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.
|
|
105
|
+
| `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. `commands.list` shows each command as E2B starts it: `cmd` `/bin/bash`, `args` `["-l", "-c", "<your command>"]` (a PTY: `["-i", "-l"]`), the command cut at 256 characters, `envs` empty. |
|
|
68
106
|
| `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. |
|
|
69
107
|
| `files.read(path, { format })` | `files.read`. `text`, `bytes`, `blob` and `stream` (Python: `text`, `bytes`, `stream`). |
|
|
70
108
|
| `files.write(path, data)`, `write([...])`, `writeFiles` | `files.write`. Parent directories are made, and a file that exists is replaced. |
|
|
71
|
-
| `files.list(path, { depth })` | `files.list`, hidden files included. `owner` and `group` come from native metadata, with `""` for older guests that omit them.
|
|
72
|
-
| `files.makeDir`, `exists`, `getInfo`, `rename`, `remove` | `files.stat`, `mkdir`, `rename` (replacing a file that exists) and `remove` (recursive). A missing file throws `FileNotFoundError`.
|
|
73
|
-
| Relative paths | Resolved against the home directory, `/workspace` on Runtime.
|
|
109
|
+
| `files.list(path, { depth })` | `files.list`, hidden files included. `owner` and `group` come from native metadata, with `""` for older guests that omit them. `depth` below one throws `InvalidArgumentError` "depth should be at least one". |
|
|
110
|
+
| `files.makeDir`, `exists`, `getInfo`, `rename`, `remove` | `files.stat`, `mkdir`, `rename` (replacing a file that exists) and `remove` (recursive). A missing file throws `FileNotFoundError`. Entries read as envd gives them: `permissions` begins with the kind's letter (`-rw-r--r--`, `drwxr-xr-x`, `L` for a link), the sandbox user is `user`, and a link's `symlinkTarget` is absolute. |
|
|
111
|
+
| Relative paths | Resolved against the home directory, `/workspace` on Runtime, and given back under `/home/user`, as E2B gives them: `write("a.txt")` returns `/home/user/a.txt`. A path given in full comes back as given. `pwd` in a command prints `/workspace`. |
|
|
74
112
|
| `/home/user` (E2B's home) | The first time a path, `cwd` or command names it, it becomes a link to `/workspace`, unless something is already there. |
|
|
75
|
-
| `sandbox.kill()`, `Sandbox.kill(id)` | `
|
|
76
|
-
| `sandbox.setTimeout(ms)`, `Sandbox.setTimeout(id, ms)` | `extend`: the end moves to now + ms, up to 24 hours
|
|
113
|
+
| `sandbox.kill()`, `Sandbox.kill(id)` | `delete`: gone for good. `false` when the sandbox was not found or was already deleted. |
|
|
114
|
+
| `sandbox.setTimeout(ms)`, `Sandbox.setTimeout(id, ms)` | `extend`: the end moves to now + ms, up to 24 hours. An earlier end is refused: Runtime cannot bring a time limit forward. A sandbox with no time limit (a pilot's) has no end to move, and nothing changes. |
|
|
77
115
|
| `Sandbox.connect(id, { timeoutMs })`, `sandbox.connect()` | `get`. A paused sandbox is woken. A running one's end moves later, never earlier, up to 24 hours. An ended one throws `SandboxNotFoundError`. |
|
|
78
116
|
| `sandbox.pause()`, `betaPause`, `Sandbox.pause(id)` | `pause`, keeping memory and files. `false` when it was already paused. |
|
|
79
|
-
| `getInfo`, `isRunning` | `get`. `templateId` is
|
|
117
|
+
| `getInfo`, `isRunning` | `get`. `templateId` is the template the sandbox was created from, as you named it (kept in the label `e2b-template`, which `metadata` leaves out), or `base`. `envdVersion` is `runtime`. A sandbox Runtime paused for being idle is `running`. `endAt` is when it ends by itself; one that never will (no time limit, as a pilot's) reads 24 hours ahead, the furthest E2B allows. |
|
|
80
118
|
| `Sandbox.list({ query: { metadata, state }, limit })` | `sandboxes.list` by labels and state, oldest first, with E2B's paginator (`hasNext`, `nextItems()`, `nextToken`). A `template` or `startedAfter` filter, `order: "desc"` and a saved `nextToken` are applied by the adapter, which reads every match once and pages through them. |
|
|
81
119
|
| `fork`, `createSnapshot`, `deleteSnapshot` | Runtime's memory-preserving forks and snapshots; deleting a snapshot removes that saved capture. A fork's `count` is 1 to 20, as E2B checks it. |
|
|
82
120
|
| `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. On the free trial a shared port is private and a host alone cannot reach it, so both throw `PublicPreviewNotAllowedError` (Python: `PublicPreviewNotAllowedException`, a kind of `NotSupportedError`) at once. Use `(await sandbox.runtime.previews.create(port)).urlWithToken`, or send its token as the `x-runtime-preview-token` header. |
|
|
@@ -84,7 +122,7 @@ machine. An E2B key (`e2b_...`) is never sent anywhere. If one is passed as
|
|
|
84
122
|
| `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. |
|
|
85
123
|
| `createCodeContext`, `listCodeContexts`, `restartCodeContext`, `removeCodeContext` | Runtime's interpreter contexts. |
|
|
86
124
|
| `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. |
|
|
87
|
-
| Error classes
|
|
125
|
+
| Error classes and other exports | Every name `e2b` and the code interpreter export imports, errors with E2B's names and parents. Python also imports each from the module E2B defines it in, so `from e2b.exceptions import TimeoutException` becomes `from withruntime.e2b.exceptions import TimeoutException`, and `WriteEntry` comes from `withruntime.e2b.sandbox.filesystem.filesystem`. Each error also carries Runtime's `code`, `hint` and `requestId`, with the original error as `cause`. |
|
|
88
126
|
|
|
89
127
|
## Gaps
|
|
90
128
|
|
|
@@ -117,6 +155,10 @@ returns a handle with `get_new_events()` and `stop()`; asynchronous
|
|
|
117
155
|
a callback. Stream failures and lost events are reported, never treated as a
|
|
118
156
|
successful empty watch. A positive watch timeout bounds the client subscription and stops its owned watch;
|
|
119
157
|
zero leaves the subscription unlimited. The sandbox lease still applies. Both languages refuse watching network mounts.
|
|
158
|
+
As on envd, a path that is a file is refused with `InvalidArgumentError`
|
|
159
|
+
(Python: `InvalidArgumentException`). Runtime writes a file whole, by a rename
|
|
160
|
+
into place, which its watch sees as a create; a file's create is therefore
|
|
161
|
+
followed by a write event, which E2B code waiting for the write receives.
|
|
120
162
|
|
|
121
163
|
PTY `timeoutMs` (Python `timeout`, seconds) defaults to sixty seconds, including
|
|
122
164
|
the opening handshake; zero leaves the reader unlimited. Callbacks receive raw
|
|
@@ -147,7 +189,7 @@ every refusal: `tests/e2b` here and `sdks/python/tests/test_e2b_*.py`.
|
|
|
147
189
|
|
|
148
190
|
The end-to-end tests run an unmodified E2B program against the real API with
|
|
149
191
|
its one import changed. They create six sandboxes on the key's account. Each
|
|
150
|
-
has 2 vCPU and 512 MiB, lasts at most five minutes and is
|
|
192
|
+
has 2 vCPU and 512 MiB, lasts at most five minutes and is deleted when its
|
|
151
193
|
case ends. They are not part of `bun run test`.
|
|
152
194
|
|
|
153
195
|
```bash no-run
|
package/README.md
CHANGED
|
@@ -27,12 +27,13 @@ console.log(result.exitCode, result.stdout);
|
|
|
27
27
|
|
|
28
28
|
`Sandbox.create()` needs no arguments and returns once the sandbox is running;
|
|
29
29
|
`await using` stops it when the block ends (Node 24, Bun or TypeScript; on
|
|
30
|
-
Node 22 call `await sbx.stop()`). With no arguments you get the
|
|
31
|
-
|
|
30
|
+
Node 22 call `await sbx.stop()`). With no arguments you get the
|
|
31
|
+
included usage, a 1 GB machine running all month every month with no card (up to
|
|
32
|
+
eight sandboxes running at once without credit), 2 vCPU, 4 GiB of
|
|
32
33
|
memory and a 4 GiB disk. The current default image includes NumPy, pandas and
|
|
33
34
|
matplotlib; see the [sandbox environment](https://withruntime.com/docs/sandbox-environment).
|
|
34
|
-
|
|
35
|
-
`
|
|
35
|
+
The included usage is spent first, then prepaid credit, with nothing to
|
|
36
|
+
choose; `funding` is accepted and ignored.
|
|
36
37
|
|
|
37
38
|
The sandbox object does the rest:
|
|
38
39
|
|
|
@@ -45,7 +46,7 @@ The sandbox object does the rest:
|
|
|
45
46
|
directories with `upload` and `download`;
|
|
46
47
|
- `pause`, `wake`, `extend`, `fork` and `snapshot` (a paused sandbox also wakes
|
|
47
48
|
by itself on the next call), `update` for its name, environment, automatic
|
|
48
|
-
wake, idle pause and persistence, `keepAlive` to
|
|
49
|
+
wake, idle pause and persistence, `keepAlive` to move a time limit on while your
|
|
49
50
|
process runs, `switchImage` to move it to a new image keeping /workspace,
|
|
50
51
|
and `delete` to remove it for good;
|
|
51
52
|
- `interpreter`, `network`, `previews`, `desktop`, `mounts` (your S3, R2 or
|
package/README.src.md
CHANGED
|
@@ -29,12 +29,13 @@ console.log(result.exitCode, result.stdout);
|
|
|
29
29
|
|
|
30
30
|
`Sandbox.create()` needs no arguments and returns once the sandbox is running;
|
|
31
31
|
`await using` stops it when the block ends (Node 24, Bun or TypeScript; on
|
|
32
|
-
Node 22 call `await sbx.stop()`). With no arguments you get the
|
|
33
|
-
|
|
32
|
+
Node 22 call `await sbx.stop()`). With no arguments you get the
|
|
33
|
+
included usage, {{included-machine}} every month with no card (up to
|
|
34
|
+
{{trial-sandboxes}} sandboxes running at once without credit), 2 vCPU, 4 GiB of
|
|
34
35
|
memory and a 4 GiB disk. The current default image includes NumPy, pandas and
|
|
35
36
|
matplotlib; see the [sandbox environment](https://withruntime.com/docs/sandbox-environment).
|
|
36
|
-
|
|
37
|
-
`
|
|
37
|
+
The included usage is spent first, then prepaid credit, with nothing to
|
|
38
|
+
choose; `funding` is accepted and ignored.
|
|
38
39
|
|
|
39
40
|
The sandbox object does the rest:
|
|
40
41
|
|
|
@@ -47,7 +48,7 @@ The sandbox object does the rest:
|
|
|
47
48
|
directories with `upload` and `download`;
|
|
48
49
|
- `pause`, `wake`, `extend`, `fork` and `snapshot` (a paused sandbox also wakes
|
|
49
50
|
by itself on the next call), `update` for its name, environment, automatic
|
|
50
|
-
wake, idle pause and persistence, `keepAlive` to
|
|
51
|
+
wake, idle pause and persistence, `keepAlive` to move a time limit on while your
|
|
51
52
|
process runs, `switchImage` to move it to a new image keeping /workspace,
|
|
52
53
|
and `delete` to remove it for good;
|
|
53
54
|
- `interpreter`, `network`, `previews`, `desktop`, `mounts` (your S3, R2 or
|
package/VERCEL.md
CHANGED
|
@@ -33,8 +33,9 @@ are ignored.
|
|
|
33
33
|
|
|
34
34
|
- **Machine:** Vercel's default, 2 vCPUs with 2048 MiB each.
|
|
35
35
|
`resources: { vcpus }` sets another, with 2048 MiB per vCPU.
|
|
36
|
-
- **Timeout:**
|
|
37
|
-
|
|
36
|
+
- **Timeout:** none unless you pass one: the sandbox runs while it works and
|
|
37
|
+
pauses itself when idle. A `timeout` is kept as a Runtime time limit, which
|
|
38
|
+
runs 60 seconds to an hour. A longer `timeout` (Python `execution_time_limit`) starts with an
|
|
38
39
|
hour's lease, and the sandbox object renews it toward the timeout while it
|
|
39
40
|
lives, never past it; once the program ends, the sandbox pauses within an
|
|
40
41
|
hour. `extendTimeout` moves the end later, as often as needed.
|
package/compatibility-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"checkedAt": "2026-
|
|
3
|
+
"checkedAt": "2026-10-05",
|
|
4
4
|
"providers": [
|
|
5
5
|
{
|
|
6
6
|
"id": "e2b",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
{
|
|
10
10
|
"registry": "npm",
|
|
11
11
|
"name": "e2b",
|
|
12
|
-
"version": "2.52.
|
|
12
|
+
"version": "2.52.1",
|
|
13
13
|
"artifacts": {
|
|
14
|
-
"2.52.
|
|
14
|
+
"2.52.1": "sha512-qbX0s6qV2gfN4/+NBTIli1hkztfH/1kL4AEAYTaP4wjx7dp2m2wnXcN35iz+8Gug0q4TPN9w4xbdw/TGJr/Bpw=="
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
{
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
{
|
|
26
26
|
"registry": "pypi",
|
|
27
27
|
"name": "e2b",
|
|
28
|
-
"version": "2.52.
|
|
28
|
+
"version": "2.52.1",
|
|
29
29
|
"artifacts": {
|
|
30
|
-
"e2b-2.52.
|
|
31
|
-
"e2b-2.52.
|
|
30
|
+
"e2b-2.52.1-py3-none-any.whl": "sha256-708583a37c9b797b0044bd92fa407c21aec65f101f2fd4c4a0ccd842dbe33de1",
|
|
31
|
+
"e2b-2.52.1.tar.gz": "sha256-3af5c037b971ebc89a1ef0e5ced0e1c9ecbf3d65f2c23df5db7ad9faef8f68fa"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
{
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
{
|
|
50
50
|
"registry": "npm",
|
|
51
51
|
"name": "@daytona/sdk",
|
|
52
|
-
"version": "0.
|
|
52
|
+
"version": "0.222.0",
|
|
53
53
|
"artifacts": {
|
|
54
|
-
"0.
|
|
54
|
+
"0.222.0": "sha512-N0hjbprttUcAQE3eBegzRNIhQTzbPOGAuS2LJvl4a6bLp3rjCY1R7G9HbE9STepiBQDAs5B08Vv1rpRTXw9PaA=="
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
{
|
|
@@ -66,25 +66,25 @@
|
|
|
66
66
|
{
|
|
67
67
|
"registry": "npm",
|
|
68
68
|
"name": "@daytona/api-client",
|
|
69
|
-
"version": "0.
|
|
69
|
+
"version": "0.222.0",
|
|
70
70
|
"artifacts": {
|
|
71
|
-
"0.
|
|
71
|
+
"0.222.0": "sha512-KvD+k6LMaqauQBedbMPTZG3UK3oITwmI5onfqbQJOdEG3xD6Occ3dJRphPlXqfF7tdtmDiXv3yrbyyOusqjvdA=="
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"registry": "npm",
|
|
76
76
|
"name": "@daytona/toolbox-api-client",
|
|
77
|
-
"version": "0.
|
|
77
|
+
"version": "0.222.0",
|
|
78
78
|
"artifacts": {
|
|
79
|
-
"0.
|
|
79
|
+
"0.222.0": "sha512-crdx4Zoxjtd7sGoURS3Dwd0xEQ+6lW6e+tu45TgUx85BpDAoTEr0z7i13HgXcEfAYMIcj8o70FOlI5JlkEJ5dw=="
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"registry": "npm",
|
|
84
84
|
"name": "@daytona/analytics-api-client",
|
|
85
|
-
"version": "0.
|
|
85
|
+
"version": "0.222.0",
|
|
86
86
|
"artifacts": {
|
|
87
|
-
"0.
|
|
87
|
+
"0.222.0": "sha512-KNIk2b21pLzKMdKPnz+7cOXE9Qjvlfe9hwfiIdAatxa9jYbwJQTmbxs7BpdDB7I9GtdUionpdskxJWL+rVcWvA=="
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
]
|
|
@@ -229,6 +229,34 @@
|
|
|
229
229
|
"artifacts": {
|
|
230
230
|
"prime_sandboxes-0.4.1-py3-none-any.whl": "sha256-1a1bb96afacc66d690815be82c0b7af180ea141421b7d180b4a0adbada4f38f0",
|
|
231
231
|
"prime_sandboxes-0.4.1.tar.gz": "sha256-53f7577dc9070e3b8e30db360f9e3cce3bcc35f8765b26f24f64dbc3c7763b06"
|
|
232
|
+
},
|
|
233
|
+
"latestReview": {
|
|
234
|
+
"version": "0.4.2",
|
|
235
|
+
"artifacts": {
|
|
236
|
+
"prime_sandboxes-0.4.2-py3-none-any.whl": "sha256-ed59f001c7575339d6c903166c5468f783eda0997586ec6476fd8b35f65746f9",
|
|
237
|
+
"prime_sandboxes-0.4.2.tar.gz": "sha256-4990a724cac0a662fde6e12e7eccfee092a78679cc568653b8ef52008dfa28e4"
|
|
238
|
+
},
|
|
239
|
+
"reviewedAt": "2026-10-02",
|
|
240
|
+
"disposition": "held-for-sdk-qualification",
|
|
241
|
+
"evidence": {
|
|
242
|
+
"sourceUrls": [
|
|
243
|
+
"https://pypi.org/pypi/prime-sandboxes/0.4.2/json",
|
|
244
|
+
"https://files.pythonhosted.org/packages/3f/4d/a379cdf82d6f06c970bd4f0333c2360c08aba65c809d7492f49aece84c66/prime_sandboxes-0.4.2.tar.gz",
|
|
245
|
+
"https://files.pythonhosted.org/packages/da/b5/6a9fe6ae1342872c1c0cc45072cc0c58a5fa2783c4c45770e585f2535c8f/prime_sandboxes-0.4.2-py3-none-any.whl",
|
|
246
|
+
"https://github.com/PrimeIntellect-ai/prime/tree/main/packages/prime-sandboxes"
|
|
247
|
+
],
|
|
248
|
+
"artifactSha256": {
|
|
249
|
+
"prime_sandboxes-0.4.2-py3-none-any.whl": "ed59f001c7575339d6c903166c5468f783eda0997586ec6476fd8b35f65746f9",
|
|
250
|
+
"prime_sandboxes-0.4.2.tar.gz": "4990a724cac0a662fde6e12e7eccfee092a78679cc568653b8ef52008dfa28e4"
|
|
251
|
+
},
|
|
252
|
+
"changes": [
|
|
253
|
+
"Source diff of the 0.4.1 and 0.4.2 sdists, downloaded and hashed on the Mac, nothing installed or run: README, __init__, models.py, sandbox.py, one test changed; tests/test_checkpoints.py added.",
|
|
254
|
+
"Adds filesystem checkpoints: SandboxCheckpoint, CheckpointLookupError and BatchCheckpointResponse models; checkpoint, get_checkpoint, get_checkpoints (batch of up to 100 ids), wait_for_checkpoint and list_checkpoints on the sync and async clients; CreateSandboxRequest takes checkpoint_id with a validate_restore_source check.",
|
|
255
|
+
"CreateSandboxRequest.docker_image becomes Optional (None when restoring from a checkpoint) and disk_size_gb's default 5.0 becomes None.",
|
|
256
|
+
"Background job launch: the working_dir prefix is 'cd DIR || exit 1;' instead of 'cd DIR &&', and the launch cwd is / for an absolute working_dir.",
|
|
257
|
+
"No existing method was removed or renamed. Installed consumer qualification against withruntime/prime is not run; the supported pin stays 0.4.1."
|
|
258
|
+
]
|
|
259
|
+
}
|
|
232
260
|
}
|
|
233
261
|
}
|
|
234
262
|
]
|
|
@@ -252,6 +280,33 @@
|
|
|
252
280
|
"artifacts": {
|
|
253
281
|
"modal-1.6.0-py3-none-any.whl": "sha256-2f5981ba656570ad96379d29f0ddff876880708c84966024ce130e9e1794fa68",
|
|
254
282
|
"modal-1.6.0.tar.gz": "sha256-c5dd551b5e0a283f3c764476c0a4ebe5bdef1e4a69432fa27e1b1ad8ca5e0817"
|
|
283
|
+
},
|
|
284
|
+
"latestReview": {
|
|
285
|
+
"version": "1.6.1",
|
|
286
|
+
"artifacts": {
|
|
287
|
+
"modal-1.6.1-py3-none-any.whl": "sha256-f408ef88563003a83e491a6be09d4221eaa6e038fa4faa2ad8b15b25afe949a4",
|
|
288
|
+
"modal-1.6.1.tar.gz": "sha256-ff17768f67a65595aa7882e893e6cb78e2e001b3653aa52cfe98d4051d8d9e9e"
|
|
289
|
+
},
|
|
290
|
+
"reviewedAt": "2026-10-03",
|
|
291
|
+
"disposition": "held-for-sdk-qualification",
|
|
292
|
+
"evidence": {
|
|
293
|
+
"sourceUrls": [
|
|
294
|
+
"https://pypi.org/pypi/modal/1.6.1/json",
|
|
295
|
+
"https://files.pythonhosted.org/packages/65/ba/2b36899ea5633bf101e6ba6f7e95a4da3e4b1f57f52bd0ba8f4cfd12e808/modal-1.6.1.tar.gz",
|
|
296
|
+
"https://files.pythonhosted.org/packages/d2/3c/6b7d9a15dab9af2833ce674bbc72b5654d4099d5b088f1cc1eda3f8249ca/modal-1.6.1-py3-none-any.whl"
|
|
297
|
+
],
|
|
298
|
+
"artifactSha256": {
|
|
299
|
+
"modal-1.6.1-py3-none-any.whl": "f408ef88563003a83e491a6be09d4221eaa6e038fa4faa2ad8b15b25afe949a4",
|
|
300
|
+
"modal-1.6.1.tar.gz": "ff17768f67a65595aa7882e893e6cb78e2e001b3653aa52cfe98d4051d8d9e9e"
|
|
301
|
+
},
|
|
302
|
+
"changes": [
|
|
303
|
+
"Source diff of the 1.6.0 and 1.6.1 sdists, downloaded and hashed on the Mac, nothing installed or run; the 1.6.0 hashes match the pin. No file added or removed; 37 files changed, most in sandbox.py, the CLI and the generated protos.",
|
|
304
|
+
"Sandbox v2 calls send a per-sandbox token (x-modal-sandbox-token, from the create response) beside the auth token through a new _v2_metadata helper, including command router access.",
|
|
305
|
+
"Experimental sidecars take include_oidc_identity_token and proxy, refused for GPU sandboxes. Server sessions retry start with an idempotency key for up to 25 minutes; the CLI gains endpoint commands; stats types gain container_total_count; agent detection reads tool variables before AGENT and AI_AGENT.",
|
|
306
|
+
"Requirements: protobuf below 8.0 instead of 7.0, synchronicity ~=0.12.6 instead of ~=0.12.5. Some iterator return types become AsyncGenerator.",
|
|
307
|
+
"No public Sandbox, ContainerProcess, Image, App or file method used by withruntime/modal was removed or renamed; that drop-in does not import modal. Installed consumer qualification is not run; the supported pin stays 1.6.0."
|
|
308
|
+
]
|
|
309
|
+
}
|
|
255
310
|
}
|
|
256
311
|
}
|
|
257
312
|
]
|
package/dist/api-defaults.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const WAIT_FOR_TIMEOUT_SECONDS = 60;
|
|
3
3
|
/** A streamed exec's command limit when none is given: the API's longest. */
|
|
4
4
|
export declare const STREAMED_EXEC_TIMEOUT_MS = 86400000;
|
|
5
|
-
/** The
|
|
5
|
+
/** The time keepAlive keeps ahead of a time limit, and so the most it extends by. */
|
|
6
6
|
export declare const KEEP_ALIVE_MARGIN_SECONDS = 600;
|
|
7
7
|
/** A webhook watch runs until stopped. */
|
|
8
8
|
export declare const WEBHOOK_WATCH_TIMEOUT_MS = 0;
|
package/dist/api-defaults.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
export const WAIT_FOR_TIMEOUT_SECONDS = 60;
|
|
8
8
|
/** A streamed exec's command limit when none is given: the API's longest. */
|
|
9
9
|
export const STREAMED_EXEC_TIMEOUT_MS = 86_400_000;
|
|
10
|
-
/** The
|
|
10
|
+
/** The time keepAlive keeps ahead of a time limit, and so the most it extends by. */
|
|
11
11
|
export const KEEP_ALIVE_MARGIN_SECONDS = 600;
|
|
12
12
|
/** A webhook watch runs until stopped. */
|
|
13
13
|
export const WEBHOOK_WATCH_TIMEOUT_MS = 0;
|
package/dist/blaxel/errors.js
CHANGED
|
@@ -94,15 +94,15 @@ const BLAXEL_HINTS = {
|
|
|
94
94
|
cwd_not_found: "Make the directory with sandbox.fs.mkdir(path), or pass an existing workingDir to sandbox.process.exec.",
|
|
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
|
-
|
|
98
|
-
public_preview_not_allowed: "
|
|
97
|
+
no_credit_running_limit: "The sandboxes an account without credit runs at once 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: "Without credit, 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,
|
|
102
102
|
unauthorized: "Set RUNTIME_API_KEY to a Runtime key (https://withruntime.com/account/keys), or run `npx withruntime login` once. A Blaxel key (BL_API_KEY) is never sent.",
|
|
103
103
|
};
|
|
104
104
|
/** A trial create over the trial's size, in Blaxel's field. */
|
|
105
|
-
const TRIAL_CAP = "
|
|
105
|
+
const TRIAL_CAP = "Without credit, a sandbox has at most 4096 MB of memory (2 vCPUs); pass memory 4096 or add credit.";
|
|
106
106
|
/** A Runtime SDK error as Blaxel's: ResponseError (SandboxGatewayError for a
|
|
107
107
|
* 502, 503 or 504), NotSupportedError for a product Runtime has switched off,
|
|
108
108
|
* CredentialsError when there is no Runtime key. Anything else passes through
|
|
@@ -118,7 +118,7 @@ export function translate(error) {
|
|
|
118
118
|
return new NotSupportedError(error.code.replace(/_unavailable$/, ""), error.hint ?? "", error.message);
|
|
119
119
|
if (error.status < 200 || error.status > 599)
|
|
120
120
|
return error;
|
|
121
|
-
const trialCap = error.code === "
|
|
121
|
+
const trialCap = error.code === "no_credit_size_limit";
|
|
122
122
|
const hint = trialCap ? undefined : (BLAXEL_HINTS[error.code] ?? error.hint);
|
|
123
123
|
const message = [
|
|
124
124
|
trialCap ? TRIAL_CAP : error.message,
|
package/dist/blaxel/lookup.d.ts
CHANGED
|
@@ -23,7 +23,8 @@ export declare const STANDBY: {
|
|
|
23
23
|
idlePauseSeconds: number;
|
|
24
24
|
autoWake: true;
|
|
25
25
|
};
|
|
26
|
-
/** Runtime's longest
|
|
26
|
+
/** Runtime's longest time limit. A sandbox made before 0300 has it, and the
|
|
27
|
+
* adapter renews it while the sandbox is used; one made since has none. */
|
|
27
28
|
export declare const LEASE_SECONDS = 3600;
|
|
28
29
|
/** The live sandbox with this name (or Runtime id): one call. A 404 when
|
|
29
30
|
* there is none, as Blaxel answers. */
|
package/dist/blaxel/lookup.js
CHANGED
|
@@ -30,7 +30,8 @@ export const STANDBY = {
|
|
|
30
30
|
idlePauseSeconds: 60,
|
|
31
31
|
autoWake: true,
|
|
32
32
|
};
|
|
33
|
-
/** Runtime's longest
|
|
33
|
+
/** Runtime's longest time limit. A sandbox made before 0300 has it, and the
|
|
34
|
+
* adapter renews it while the sandbox is used; one made since has none. */
|
|
34
35
|
export const LEASE_SECONDS = 3600;
|
|
35
36
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
36
37
|
/** The live sandbox with this name (or Runtime id): one call. A 404 when
|
package/dist/blaxel/sandbox.d.ts
CHANGED
|
@@ -58,16 +58,18 @@ type Resolved = {
|
|
|
58
58
|
};
|
|
59
59
|
/** A duration as Blaxel writes it ("30m", "24h", "7d", "1w", "1h30m"). */
|
|
60
60
|
export declare function durationMs(value: string): number;
|
|
61
|
-
/** The
|
|
62
|
-
* lifecycle: never deleted before Blaxel would delete it. A fixed
|
|
63
|
-
* within the hour is a
|
|
64
|
-
*
|
|
61
|
+
/** The time limit and the paused retention that honour Blaxel's TTL, expiry
|
|
62
|
+
* and lifecycle: never deleted before Blaxel would delete it. A fixed
|
|
63
|
+
* deadline within the hour is a time limit that ends the sandbox; past that
|
|
64
|
+
* there is none, so it runs while it works and pauses when idle (0300), and
|
|
65
|
+
* a paused sandbox is kept that many days, rounded up; none keeps it 365
|
|
66
|
+
* days. */
|
|
65
67
|
export declare function lifetimeOf(asked: {
|
|
66
68
|
ttl?: string | null;
|
|
67
69
|
expires?: Date;
|
|
68
70
|
lifecycle?: SandboxLifecycle | null;
|
|
69
71
|
}): {
|
|
70
|
-
timeoutSeconds
|
|
72
|
+
timeoutSeconds?: number;
|
|
71
73
|
onLeaseEnd: "pause" | "stop";
|
|
72
74
|
days: number;
|
|
73
75
|
};
|
|
@@ -125,8 +127,7 @@ export declare class SandboxInstance {
|
|
|
125
127
|
get expiresIn(): number | undefined;
|
|
126
128
|
/** Creates a sandbox and answers once it runs. Blaxel's defaults: the base
|
|
127
129
|
* image (Runtime's stock image) and 4096 MB, with vCPUs at one per 2048 MB.
|
|
128
|
-
* Funding is left to Runtime: the
|
|
129
|
-
* time, then prepaid credit. A name another live sandbox holds is refused
|
|
130
|
+
* Funding is left to Runtime: the included usage first, then prepaid credit. A name another live sandbox holds is refused
|
|
130
131
|
* with a 409, as in Blaxel. */
|
|
131
132
|
static create<T extends typeof SandboxInstance>(this: T, sandbox?: SandboxCreateConfiguration | SandboxModel, { createIfNotExist }?: {
|
|
132
133
|
safe?: boolean;
|