withruntime 0.8.4 → 0.9.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/COMPATIBILITY.md +145 -0
- package/E2B.md +23 -13
- package/README.md +8 -5
- package/README.src.md +8 -5
- package/compatibility-lock.json +281 -0
- package/dist/ai-harness/index.js +2 -2
- package/dist/api-defaults.d.ts +17 -0
- package/dist/api-defaults.js +22 -0
- package/dist/blaxel/preview.d.ts +1 -1
- package/dist/blaxel/preview.js +1 -1
- package/dist/blaxel/process.d.ts +1 -1
- package/dist/blaxel/process.js +11 -2
- package/dist/cli-words.d.ts +27 -0
- package/dist/cli-words.js +135 -0
- package/dist/cli.js +162 -31
- package/dist/client.d.ts +4 -1
- package/dist/client.js +8 -2
- package/dist/cloudflare/index.d.ts +294 -0
- package/dist/cloudflare/index.js +554 -0
- package/dist/cloudflare/worker.d.ts +415 -0
- package/dist/cloudflare/worker.js +297 -0
- package/dist/codesandbox/guest-service.d.ts +31 -0
- package/dist/codesandbox/guest-service.js +453 -0
- package/dist/codesandbox/index.d.ts +386 -0
- package/dist/codesandbox/index.js +1313 -0
- package/dist/compat/core.d.ts +39 -0
- package/dist/compat/core.js +199 -0
- package/dist/compat/files.d.ts +26 -0
- package/dist/compat/files.js +115 -0
- package/dist/compat/shell.d.ts +4 -0
- package/dist/compat/shell.js +165 -0
- package/dist/daytona/context.js +2 -1
- package/dist/daytona/process.d.ts +1 -1
- package/dist/daytona/process.js +27 -4
- package/dist/e2b/code-interpreter.d.ts +4 -5
- package/dist/e2b/code-interpreter.js +54 -56
- package/dist/e2b/commands.d.ts +5 -4
- package/dist/e2b/commands.js +37 -29
- package/dist/e2b/errors.js +1 -1
- package/dist/e2b/filesystem.d.ts +8 -6
- package/dist/e2b/filesystem.js +127 -28
- package/dist/e2b/sandbox.d.ts +4 -3
- package/dist/e2b/sandbox.js +10 -10
- package/dist/errors.d.ts +8 -0
- package/dist/errors.js +15 -2
- package/dist/freestyle/index.d.ts +301 -0
- package/dist/freestyle/index.js +310 -0
- package/dist/index.d.ts +1 -0
- package/dist/mcp.js +2 -2
- package/dist/modal/index.d.ts +205 -0
- package/dist/modal/index.js +485 -0
- package/dist/network-cli.js +1 -1
- package/dist/openai-agents/index.js +9 -26
- package/dist/products/audit.d.ts +3 -0
- package/dist/products/index.d.ts +2 -0
- package/dist/products/index.js +2 -0
- package/dist/products/interpreter.d.ts +11 -4
- package/dist/products/interpreter.js +33 -9
- package/dist/products/jobs.js +3 -2
- package/dist/products/limits.d.ts +10 -0
- package/dist/products/previews.d.ts +10 -2
- package/dist/products/previews.js +3 -2
- package/dist/products/tailscale.d.ts +57 -0
- package/dist/products/tailscale.js +17 -0
- package/dist/products/watch.d.ts +25 -4
- package/dist/products/watch.js +75 -14
- package/dist/runloop/index.d.ts +340 -0
- package/dist/runloop/index.js +438 -0
- package/dist/runloop/pagination.d.ts +46 -0
- package/dist/runloop/pagination.js +82 -0
- package/dist/runloop/snapshots.d.ts +52 -0
- package/dist/runloop/snapshots.js +244 -0
- package/dist/sandbox.d.ts +40 -9
- package/dist/sandbox.js +273 -76
- package/dist/snapshots.d.ts +11 -1
- package/dist/snapshots.js +11 -1
- package/dist/sprites/index.d.ts +251 -0
- package/dist/sprites/index.js +552 -0
- package/dist/tar.d.ts +8 -1
- package/dist/tar.js +185 -35
- package/dist/tools/index.js +2 -1
- package/dist/transport.d.ts +20 -2
- package/dist/transport.js +48 -11
- package/dist/types.d.ts +52 -3
- package/dist/vercel/command.js +12 -1
- package/dist/vercel/errors.d.ts +2 -2
- package/dist/vercel/errors.js +12 -1
- package/dist/vercel/filesystem.d.ts +21 -18
- package/dist/vercel/filesystem.js +95 -48
- package/dist/vercel/sandbox.js +5 -5
- package/package.json +45 -3
package/COMPATIBILITY.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Sandbox compatibility evidence
|
|
2
|
+
|
|
3
|
+
The compatibility modules are **partial, version-pinned sandbox adapters**. Their
|
|
4
|
+
exported methods translate to Runtime's native client. They are not replacements
|
|
5
|
+
for every service in a competitor's SDK, and this document does not claim that
|
|
6
|
+
all applications switch unchanged.
|
|
7
|
+
|
|
8
|
+
The four established modules are documented in `E2B.md`, `DAYTONA.md`, `VERCEL.md`
|
|
9
|
+
and `BLAXEL.md`. The six additional TypeScript modules below were checked against
|
|
10
|
+
published package declarations downloaded on 29 September 2026. Prime Intellect
|
|
11
|
+
publishes a Python sandbox SDK; Runtime does not invent a TypeScript drop-in
|
|
12
|
+
interface for it. Python coverage is in the Python SDK's compatibility documents.
|
|
13
|
+
|
|
14
|
+
The Cloudflare module implements the 0.x `@cloudflare/sandbox` API. Version 1.0.0,
|
|
15
|
+
published 30 September 2026, is a different package: it removes `getSandbox`, the
|
|
16
|
+
`Sandbox` class, `exec`, processes, sessions and preview proxying, and keeps only
|
|
17
|
+
`Files`, `S3Mount` and `DirectoryBackup` for the caller's own Durable Object. The
|
|
18
|
+
pin stays 0.12.10; `compatibility-lock.json` records 1.0.0 as reviewed and
|
|
19
|
+
unsupported, and `bun run compat:upstream` flags any other release.
|
|
20
|
+
|
|
21
|
+
| Provider | Published package inspected | Runtime import | Implemented sandbox surface |
|
|
22
|
+
| ----------- | --------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| Runloop | `@runloop/api-client` 1.32.0 | `withruntime/runloop` | `Runloop`, devbox create/get/list/suspend/resume/shutdown, disk snapshots; synchronous and asynchronous commands, resident named shells with variables, functions, aliases, options and working directory, execution completion/output/stdin/signals, text files |
|
|
24
|
+
| CodeSandbox | `@codesandbox/sdk` 2.4.2 | `withruntime/codesandbox` | `CodeSandbox`, `VMTier`, create/fork/resume/shutdown/restart/hibernate/delete/list/get; connected command and file clients; output/status subscriptions and same-client command restart; configured tasks and setup steps; public preview ports and readiness checks |
|
|
25
|
+
| Fly Sprites | `@fly/sprites` 0.2.3 | `withruntime/sprites` | `SpritesClient`, create/lookup/list/delete/restart; `exec`, `execFile`, Node streams and event-based `spawn`; attachable native processes; binary/text/JSON files, directory traversal, append, chmod; preview access settings |
|
|
26
|
+
| Freestyle | `freestyle` 0.2.16 | `withruntime/freestyle` | `Freestyle`, VM create/ref/get/list/start/pause/delete/update; command execution, binary/text files and streams, filesystem metadata; native snapshots; explicit deny-all or outbound-public firewall intent |
|
|
27
|
+
| Modal | `modal` 0.11.0 | `withruntime/modal` | `ModalClient`, app-name grouping, registry images and Dockerfile layers, CPU sandbox create/get/list/name lookup, text/binary process streams and stdin, command completion, filesystem transfer and metadata, tags, encrypted public previews, outbound allowlists, memory snapshot capture |
|
|
28
|
+
| Cloudflare | `@cloudflare/sandbox` 0.12.10 (0.x API) | `withruntime/cloudflare` | `getSandbox`, named Runtime sandboxes, explicit execution sessions, text exec and SSE output, background processes, logs/signals/waits, binary/text files, recursive listings, environment updates, signed Runtime previews, conditional Worker Durable Object entry, Worker preview proxy, destruction |
|
|
29
|
+
|
|
30
|
+
## Authentication and resources
|
|
31
|
+
|
|
32
|
+
Set `RUNTIME_API_KEY` or sign in with `runtime login`. An explicitly supplied
|
|
33
|
+
Runtime key begins with `rtcloud_`. Vendor credentials supplied to a replaced
|
|
34
|
+
constructor are discarded locally, never forwarded to Runtime. Every adapter
|
|
35
|
+
also accepts an injected native `Runtime` client for testing or configured
|
|
36
|
+
transports. The conditional Worker entry reads the `RUNTIME_API_KEY` Worker secret and optional
|
|
37
|
+
`RUNTIME_API_URL`; a Durable Object binding is not a Runtime credential.
|
|
38
|
+
|
|
39
|
+
CodeSandbox, Sprites and Freestyle request Runtime persistence to preserve their
|
|
40
|
+
resource-lifetime intent. Persistent sandboxes require paid credit. Runloop enables persistence only when the caller
|
|
41
|
+
explicitly suspends: native stop retains its disk and resume boots that disk afresh,
|
|
42
|
+
without restoring old processes. Paid admission must succeed before stopping. An
|
|
43
|
+
uncertain stop keeps persistence enabled so the caller can retry without discarding
|
|
44
|
+
data. Lifecycle calls serialize within one client; competing opposite intents from
|
|
45
|
+
different clients rely on native transition admission. Runtime
|
|
46
|
+
admission, credit, disk and CPU limits remain authoritative; an adapter does not
|
|
47
|
+
buy resources, override account limits or promise another provider's capacity.
|
|
48
|
+
Supported explicit regions use Runtime's region names. Unsupported provider
|
|
49
|
+
regions, GPU requests and fractional CPU shapes fail before allocation rather
|
|
50
|
+
than silently receiving different hardware.
|
|
51
|
+
|
|
52
|
+
Environment variables are stored in a sandbox-private file with mode 0600, not
|
|
53
|
+
in resource labels. Reconnecting clients read the file; snapshots preserve it
|
|
54
|
+
unless an explicit replacement environment is supplied. Python and TypeScript
|
|
55
|
+
share the file path and `compat.provider` resource label.
|
|
56
|
+
|
|
57
|
+
## Evidence that can be repeated locally
|
|
58
|
+
|
|
59
|
+
Run `bun test tests/compat` from the SDK package and run `bun run check-types`.
|
|
60
|
+
The test run compiles unchanged typed consumer bodies from
|
|
61
|
+
`tests/compat/consumers/workflows.ts.txt` against all ten TypeScript adapters,
|
|
62
|
+
including E2B's interpreter. Run
|
|
63
|
+
`bun tests/compat/check-consumers.ts <verified-cache>` to compile the
|
|
64
|
+
same bodies against the pinned upstream declarations; the script checks each
|
|
65
|
+
package name and version against the lock before compiling. Both targets passed
|
|
66
|
+
on 29 September 2026. Only import resolution changes between the two runs.
|
|
67
|
+
|
|
68
|
+
The published-package behavior checks are also reproducible. Prepare the integrity-verified
|
|
69
|
+
cache with the SDK's compatibility preparation command. Run
|
|
70
|
+
`bun tests/compat/prepare-runtime.ts <verified-cache> <reference-directory>`;
|
|
71
|
+
it copies published packages without modifying the cache, removes build-only development
|
|
72
|
+
dependencies from copied manifests, and installs runtime dependencies with scripts disabled
|
|
73
|
+
and the checked-in frozen `tests/compat/reference.bun.lock`. Then run
|
|
74
|
+
`bun tests/compat/compare-upstream.ts <verified-cache> <reference-directory>` and
|
|
75
|
+
`bun tests/compat/worker-local.ts <reference-directory>/node_modules/miniflare <reference-directory>`.
|
|
76
|
+
|
|
77
|
+
| Published implementation executed | Shared behavior compared | Instrument boundary |
|
|
78
|
+
| -------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
79
|
+
| Sprites filesystem | Binary/text/JSON files, dotfiles, directory entries, missing-file errors | Controlled HTTP versus native API router and simulated guest |
|
|
80
|
+
| Freestyle filesystem | Blob/string writes, progress, byte ranges, streamed slices | Controlled HTTP versus native API router and simulated guest |
|
|
81
|
+
| Runloop client | Create, text files, command results, shutdown | Controlled HTTP versus native API router and simulated guest |
|
|
82
|
+
| CodeSandbox client | Creation defaults, tags, metadata, hibernate/delete | Controlled HTTP; native metadata/lifecycle modeled because fixture has no orchestration database |
|
|
83
|
+
| Modal client and Sandbox | Tag replacement/clearing and terminate | Published injected control-plane client; native metadata/lifecycle modeled |
|
|
84
|
+
| Cloudflare getSandbox/session wrappers | ID validation, sessions, file calls, exec, process waits | Both run in pinned local workerd against Runtime's Durable Object and simulated guest; the official Container daemon is not run |
|
|
85
|
+
|
|
86
|
+
All six comparisons passed locally on 29 September 2026. They establish the stated
|
|
87
|
+
client behavior with controlled responses, not equivalence of hosted vendor services.
|
|
88
|
+
|
|
89
|
+
The new adapter contract tests drive Runtime's actual API router, request
|
|
90
|
+
validation and response schemas with a simulated guest. They exercise:
|
|
91
|
+
|
|
92
|
+
- Command failures and asynchronous execution output.
|
|
93
|
+
- Reconnection with retained environment and unchanged dotfile paths.
|
|
94
|
+
- Binary file transfers larger than the native single-request limit.
|
|
95
|
+
- Large append staging and cleanup.
|
|
96
|
+
- Refusal of unsupported resource options before allocation.
|
|
97
|
+
- Failed initialization cleanup, including a second failure during cleanup.
|
|
98
|
+
- Preserving a snapshot's environment when no override was given.
|
|
99
|
+
- Never forwarding vendor credentials to Runtime.
|
|
100
|
+
- Stopping paused persistent sandboxes before releasing their disk, including a
|
|
101
|
+
pause racing a client's cached state, without waking them.
|
|
102
|
+
- Named-shell environment and working-directory persistence in real local Bash,
|
|
103
|
+
nonzero exits, variable-name collisions, and explicit per-call overrides. The resident
|
|
104
|
+
broker also exercises function/alias/option persistence, return/exit/exec, concurrent
|
|
105
|
+
calls, cancellation, overridden printf and an invalid command PATH.
|
|
106
|
+
- Cloudflare session callbacks/files/process waits and Modal process streams,
|
|
107
|
+
stdin, files and entrypoint completion. These two tests replace create/image
|
|
108
|
+
orchestration because the simulated-guest fixture has no database/image builder.
|
|
109
|
+
|
|
110
|
+
The optional `tests/compat/live.ts` runner requires `--run`, an explicit Runtime
|
|
111
|
+
key, and at least one remaining trial hour. It allocates at most six resources,
|
|
112
|
+
forces trial funding and short leases, records every created ID, and attempts
|
|
113
|
+
cleanup for all IDs even after a failure. It does not build images, create
|
|
114
|
+
snapshots or expose public previews. Its explicit persistence override makes it
|
|
115
|
+
an execution/file smoke test, not evidence of paid persistent lifetime behavior.
|
|
116
|
+
|
|
117
|
+
Local tests do not prove cross-host durability, Linux isolation, vendor runtime
|
|
118
|
+
image equivalence, public Worker hosting, or performance against a competitor.
|
|
119
|
+
The measured results of live acceptance belong in its run report.
|
|
120
|
+
|
|
121
|
+
## Exact boundaries of this version
|
|
122
|
+
|
|
123
|
+
These boundaries describe present behavior, rather than a second worklist.
|
|
124
|
+
Remaining implementation work is tracked only in the repository `WORKLIST.md`.
|
|
125
|
+
|
|
126
|
+
| Provider | Boundary |
|
|
127
|
+
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
128
|
+
| All six | Default sandboxes use Runtime's environment. Explicit vendor image/template/snapshot IDs require migration to Runtime; arbitrary foreign IDs are not substituted with a stock image. Provider credential formats, wire protocols, error hierarchies and every optional transport hook are not interchangeable. Retained process output is bounded. Binary process mode requires the native byte-output capability (`outputEncoding`); an API or guest without it refuses before execution. This capability has only local release evidence here. |
|
|
129
|
+
| Runloop | Blueprints name Runtime image IDs/names; snapshots name Runtime snapshots. No provider blueprint builds, mounts, secret gateways, MCP grants, lifecycle hooks or ARM placement. `X_SMALL`/fractional CPU shapes are refused. Named shells use a resident Bash process. Interactive stdin in named shells is explicitly refused. `snapshotDisk` takes a blocking disk-only native snapshot; `snapshotDiskAsync` is refused, a memory snapshot is refused as a disk snapshot, and snapshot metadata beyond Runtime's label bounds is refused. `diskSnapshots` lists, updates, polls and deletes them. Devbox and snapshot lists return cursor pages that can be awaited or iterated across pages; the generated `APIPromise` wrapper and its response helpers are not reproduced. |
|
|
130
|
+
| CodeSandbox | No browser editor/Pitcher protocol, browser-session tokens, interpreters, live VM resizing, fork tier changes, read-only or global editor sessions, or private host-token emulation. Configured tasks run under a guest supervisor and setup steps under a guest runner, both started by the adapter and surviving client disconnects; a task's port must be configured with `task.preview.port`, because automatic task-to-port discovery is refused. Private host-only preview requests fail explicitly; native signed preview URLs remain available. Public port discovery lists registered previews, not all listening sockets. Default workspace is prepared at `/project/sandbox`. Command restart preserves the originating client's captured argv, environment and working directory; a command discovered by another client refuses restart because its private spawn recipe is unavailable. |
|
|
131
|
+
| Sprites | No control-mode WebSocket protocol, managed services, provider health/upgrade, port watchers, URL role policy, filesystem checkpoint restoration in place, or full network/privilege/resource policy surfaces. Checkpoint operations fail explicitly because native snapshots also include memory. Session handles use native process IDs, not tmux. The sprite URL maps port 8080. File bytes and process byte streams preserve binary data. |
|
|
132
|
+
| Freestyle | Provider catalog snapshot slugs are not Runtime snapshots and are refused. Firewall support is limited to an explicit empty rule set or the exact allow-public-outbound shape; arbitrary rule selectors, TLS policies and private networks are refused. No automatic-restart guarantee, retention scheduler, placement constraints, live resize, Linux-user switching, PTY namespace, public IPv6 or account-owned egress address emulation. Native snapshot retention is positive whole days. |
|
|
133
|
+
| Modal | CPU sandboxes only; different resource reservation/limit values, fractional CPU, GPU and foreign placement are refused. Named Apps group Runtime sandboxes; they do not deploy Functions. Registry authentication uses Runtime's registry configuration. No Functions/Cls, volumes/bucket mounts, GPU image steps, readiness probes, sidecars, directory mounts, filesystem-only images from snapshots, or snapshot restoration API. Entry-point completion stops the sandbox while the originating client is alive; the native lease remains the bound if that client disappears. A different client can reconnect using the saved entrypoint process ID. |
|
|
134
|
+
| Cloudflare | The conditional Worker entry supplies a Durable Object bridge and custom-hostname preview proxy; infrastructure configuration must still remove the vendor Container declaration and provide Runtime secrets. Custom preview routing is implemented but has no live public-hostname acceptance evidence. No isolated PID namespaces, interpreter contexts, bucket mounts, backup format, terminal WebSocket protocol, watchers/change versions, custom process IDs or provider cleanup-record semantics. Foreground named sessions use resident Bash; background processes inherit exported state/cwd but do not yet inherit every local variable/function/option. |
|
|
135
|
+
|
|
136
|
+
## Keeping compatibility current
|
|
137
|
+
|
|
138
|
+
`compatibility-lock.json` records the inspected versions and package integrity.
|
|
139
|
+
The repository's upstream check detects new releases and changed package contents.
|
|
140
|
+
A deprecated npm package or yanked Python release also requires review; a
|
|
141
|
+
registry failure cannot count as a pass. The daily workflow is source-controlled
|
|
142
|
+
but does not run until pushed to a repository with working GitHub Actions.
|
|
143
|
+
A changed pin is evidence to review, not permission to announce compatibility:
|
|
144
|
+
compare the published declarations, replay the relevant unchanged consumer,
|
|
145
|
+
exercise its failure paths, and update this coverage table with the same change.
|
package/E2B.md
CHANGED
|
@@ -22,7 +22,8 @@ from withruntime.e2b.code_interpreter import Sandbox # was: from e2b_code_inter
|
|
|
22
22
|
|
|
23
23
|
The mapping was written against `e2b` 2.51.0 and `@e2b/code-interpreter`
|
|
24
24
|
2.8.0 (Python: `e2b` 2.51.0, `e2b-code-interpreter` 2.10.0), checked
|
|
25
|
-
|
|
25
|
+
29 September 2026. The exact package releases and artifact hashes are kept in
|
|
26
|
+
`compatibility-lock.json`.
|
|
26
27
|
|
|
27
28
|
## Keys
|
|
28
29
|
|
|
@@ -58,14 +59,14 @@ machine. An E2B key (`e2b_...`) is never sent anywhere. If one is passed as
|
|
|
58
59
|
| `envs` | Given to every command and code run through this object. |
|
|
59
60
|
| `allowInternetAccess: false` | `network: { internet: false }`. |
|
|
60
61
|
| `lifecycle.onTimeout` | `onLeaseEnd`: `kill` is `stop`, `pause` is `pause`. |
|
|
61
|
-
| `commands.run(cmd, { cwd, envs, timeoutMs, onStdout, onStderr })` |
|
|
62
|
+
| `commands.run(cmd, { cwd, envs, timeoutMs, onStdout, onStderr })` | A native process with streamed output; output lost before it was read sets `truncated` and warns. The default command connection deadline is 60 s; `0` disables it. The sandbox lease still bounds the process. |
|
|
62
63
|
| Non-zero exit | Throws `CommandExitError` with `exitCode`, `stdout`, `stderr` and `error` (`exit status N`). A command killed by a signal has `exitCode` -1. |
|
|
63
|
-
| Command past its timeout |
|
|
64
|
+
| Command past its timeout | Disconnects with `TimeoutError` (Python: `TimeoutException`) without killing the command; reconnect by pid to keep reading. |
|
|
64
65
|
| `commands.run(cmd, { background: true })` | `spawn`. Returns a `CommandHandle` with `pid`, `wait()`, `kill()` (SIGKILL), `sendStdin`, `closeStdin`, `disconnect`, `stdout`, `stderr`, `exitCode`. |
|
|
65
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. |
|
|
66
67
|
| `files.read(path, { format })` | `files.read`. `text`, `bytes`, `blob` and `stream` (Python: `text`, `bytes`, `stream`). |
|
|
67
68
|
| `files.write(path, data)`, `write([...])`, `writeFiles` | `files.write`. Parent directories are made, and a file that exists is replaced. |
|
|
68
|
-
| `files.list(path, { depth })` | `files.list`, hidden files included. `owner` and `group`
|
|
69
|
+
| `files.list(path, { depth })` | `files.list`, hidden files included. `owner` and `group` come from native metadata, with `""` for older guests that omit them. |
|
|
69
70
|
| `files.makeDir`, `exists`, `getInfo`, `rename`, `remove` | `files.stat`, `mkdir`, `rename` (replacing a file that exists) and `remove` (recursive). A missing file throws `FileNotFoundError`. |
|
|
70
71
|
| Relative paths | Resolved against the home directory, `/workspace` on Runtime. |
|
|
71
72
|
| `/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. |
|
|
@@ -77,7 +78,7 @@ machine. An E2B key (`e2b_...`) is never sent anywhere. If one is passed as
|
|
|
77
78
|
| `Sandbox.list({ query: { metadata, state }, limit })` | `sandboxes.list` by labels and state, oldest first, with E2B's paginator (`hasNext`, `nextItems()`). |
|
|
78
79
|
| `fork`, `createSnapshot`, `deleteSnapshot` | Runtime's forks and snapshots. While Runtime has them switched off, they throw `NotSupportedError` with Runtime's own message. |
|
|
79
80
|
| `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. |
|
|
80
|
-
| `runCode(code, { language, context, onStdout, onStderr, onResult, onError, timeoutMs })` | Runtime's interpreter
|
|
81
|
+
| `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. |
|
|
81
82
|
| `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. |
|
|
82
83
|
| `createCodeContext`, `listCodeContexts`, `restartCodeContext`, `removeCodeContext` | Runtime's interpreter contexts. |
|
|
83
84
|
| `getMetrics({ start, end })`, `Sandbox.getMetrics(id)` | Runtime's measured CPU and memory, one entry per host reading (every minute by default). `diskUsed` is null: Runtime does not read disk use inside the sandbox. |
|
|
@@ -105,26 +106,35 @@ before anything happens. The error's `feature` names the gap and its
|
|
|
105
106
|
| `volumeMounts`, `Volume` | Runtime volumes: `runtime: { create: { volumes: [{ volumeId, path }] } }`. |
|
|
106
107
|
| `pty` | `sandbox.runtime.terminal(...)`. |
|
|
107
108
|
| `git` | `commands.run("git ...")`. E2B has deprecated its git module too. |
|
|
108
|
-
| `files.watchDir` | Poll with `files.list`. |
|
|
109
109
|
| File `metadata` | Keep it in a file beside the data. |
|
|
110
110
|
| `uploadUrl`, `downloadUrl` | `files.write` and `files.read`. |
|
|
111
111
|
| `Sandbox.list` by `template` or `startedAfter`, `order: "desc"`, or from a saved `nextToken` | Filter by metadata, and keep the paginator. |
|
|
112
|
-
| `runCode` in `bash`, `r`, `java` or `typescript` | `commands.run(...)`. |
|
|
113
112
|
| `runCode(code, { envs })` | A context made with them: `sandbox.runtime.interpreter.contexts.create({ env })`. |
|
|
114
113
|
| `domain`, `apiUrl`, `sandboxUrl`, `headers`, `proxy`, `debug` | Remove them. `RUNTIME_API_URL` sets Runtime's origin, and `HTTPS_PROXY` sets a proxy. |
|
|
115
114
|
|
|
115
|
+
Directory watches use Runtime's native watch stream. JavaScript uses
|
|
116
|
+
`files.watchDir(path, onEvent, options)`. Python's synchronous `watch_dir(path)`
|
|
117
|
+
returns a handle with `get_new_events()` and `stop()`; asynchronous
|
|
118
|
+
`watch_dir(path, on_event, on_exit=...)` delivers callbacks. Stop is safe inside
|
|
119
|
+
a callback. Stream failures and lost events are reported, never treated as a
|
|
120
|
+
successful empty watch. A positive watch timeout bounds the client subscription and stops its owned watch;
|
|
121
|
+
zero leaves the subscription unlimited. The sandbox lease still applies. Both languages refuse watching network mounts.
|
|
122
|
+
|
|
116
123
|
Some differences are not refusals, so code that depends on them should check:
|
|
117
124
|
|
|
118
125
|
- Sandbox-level `envs` live in the object that created the sandbox.
|
|
119
126
|
`Sandbox.connect(id)` from another process does not know them.
|
|
120
127
|
- Runtime's stock image is Ubuntu 24.04 with Python 3.12, Node.js 24 and Bun.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
build them into an image. Results never carry `chart`. A DataFrame arrives in
|
|
128
|
+
The current stock image includes NumPy, pandas and matplotlib; build an image
|
|
129
|
+
for additional dependencies. Results never carry `chart`. A DataFrame arrives in
|
|
124
130
|
`extra` under `application/vnd.runtime.table+json`, not in E2B's `data`.
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
- JavaScript file operations and command creation honor `requestTimeoutMs`.
|
|
132
|
+
Python file `request_timeout` bounds the request, including streamed reads. `retries`, `logger`, `secure` and `validateApiKey` are
|
|
133
|
+
accepted without changing the native transport settings.
|
|
134
|
+
- Interpreter deadlines follow the pinned packages: JavaScript defaults to
|
|
135
|
+
sixty seconds and Python to five minutes; zero disables the read deadline.
|
|
136
|
+
A client timeout detaches the reader without interrupting the cell. The
|
|
137
|
+
sandbox lease still applies.
|
|
128
138
|
|
|
129
139
|
## Tests
|
|
130
140
|
|
package/README.md
CHANGED
|
@@ -41,11 +41,14 @@ The sandbox object does the rest:
|
|
|
41
41
|
- `files` to read, write, list, glob, stat, move and remove, and to copy whole
|
|
42
42
|
directories with `upload` and `download`;
|
|
43
43
|
- `pause`, `wake`, `extend`, `fork` and `snapshot` (a paused sandbox also wakes
|
|
44
|
-
by itself on the next call), `update` for its name,
|
|
45
|
-
and persistence,
|
|
44
|
+
by itself on the next call), `update` for its name, environment, automatic
|
|
45
|
+
wake, idle pause and persistence, `keepAlive` to extend its lease while your
|
|
46
|
+
process runs, `switchImage` to move it to a new image keeping /workspace,
|
|
47
|
+
and `delete` to remove it for good;
|
|
46
48
|
- `interpreter`, `network`, `previews`, `desktop`, `mounts` (your S3, R2 or
|
|
47
|
-
Google Cloud Storage bucket as a folder), `
|
|
48
|
-
the MCP catalog, run in the
|
|
49
|
+
Google Cloud Storage bucket as a folder), `tailscale` (a paid sandbox on your
|
|
50
|
+
own tailnet), `metrics` and `mcp` (servers from the MCP catalog, run in the
|
|
51
|
+
sandbox) for the other products.
|
|
49
52
|
|
|
50
53
|
A sandbox pauses itself after 60 seconds with nothing happening in it, keeping
|
|
51
54
|
its memory and processes, and the next call wakes it, so an idle sandbox costs
|
|
@@ -54,7 +57,7 @@ no compute; `idlePauseSeconds` sets 10 to 86,400, or 0 for never.
|
|
|
54
57
|
`Sandbox.getOrCreate(name)` returns the sandbox with that name, woken if it is
|
|
55
58
|
paused, or creates it.
|
|
56
59
|
|
|
57
|
-
The client has `sandboxes`, `images`, `volumes`, `snapshots`, `secrets`,
|
|
60
|
+
The client has `sandboxes`, `images`, `volumes`, `snapshots`, `jobs`, `secrets`,
|
|
58
61
|
`limits`, `feedback` and `support`; `webhooks`, `events`, `otel` and `audit`
|
|
59
62
|
to watch the account; `domains`, `ports`, `addresses`, `tunnel` and `network`
|
|
60
63
|
to connect sandboxes to your own world (paid accounts); and `mcp`, `sso`,
|
package/README.src.md
CHANGED
|
@@ -43,11 +43,14 @@ The sandbox object does the rest:
|
|
|
43
43
|
- `files` to read, write, list, glob, stat, move and remove, and to copy whole
|
|
44
44
|
directories with `upload` and `download`;
|
|
45
45
|
- `pause`, `wake`, `extend`, `fork` and `snapshot` (a paused sandbox also wakes
|
|
46
|
-
by itself on the next call), `update` for its name,
|
|
47
|
-
and persistence,
|
|
46
|
+
by itself on the next call), `update` for its name, environment, automatic
|
|
47
|
+
wake, idle pause and persistence, `keepAlive` to extend its lease while your
|
|
48
|
+
process runs, `switchImage` to move it to a new image keeping /workspace,
|
|
49
|
+
and `delete` to remove it for good;
|
|
48
50
|
- `interpreter`, `network`, `previews`, `desktop`, `mounts` (your S3, R2 or
|
|
49
|
-
Google Cloud Storage bucket as a folder), `
|
|
50
|
-
the MCP catalog, run in the
|
|
51
|
+
Google Cloud Storage bucket as a folder), `tailscale` (a paid sandbox on your
|
|
52
|
+
own tailnet), `metrics` and `mcp` (servers from the MCP catalog, run in the
|
|
53
|
+
sandbox) for the other products.
|
|
51
54
|
|
|
52
55
|
A sandbox pauses itself after {{idle-pause}} with nothing happening in it, keeping
|
|
53
56
|
its memory and processes, and the next call wakes it, so an idle sandbox costs
|
|
@@ -56,7 +59,7 @@ no compute; `idlePauseSeconds` sets {{idle-pause-min}} to {{idle-pause-max}}, or
|
|
|
56
59
|
`Sandbox.getOrCreate(name)` returns the sandbox with that name, woken if it is
|
|
57
60
|
paused, or creates it.
|
|
58
61
|
|
|
59
|
-
The client has `sandboxes`, `images`, `volumes`, `snapshots`, `secrets`,
|
|
62
|
+
The client has `sandboxes`, `images`, `volumes`, `snapshots`, `jobs`, `secrets`,
|
|
60
63
|
`limits`, `feedback` and `support`; `webhooks`, `events`, `otel` and `audit`
|
|
61
64
|
to watch the account; `domains`, `ports`, `addresses`, `tunnel` and `network`
|
|
62
65
|
to connect sandboxes to your own world (paid accounts); and `mcp`, `sso`,
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"checkedAt": "2026-09-29",
|
|
4
|
+
"providers": [
|
|
5
|
+
{
|
|
6
|
+
"id": "e2b",
|
|
7
|
+
"status": "partial",
|
|
8
|
+
"upstreams": [
|
|
9
|
+
{
|
|
10
|
+
"registry": "npm",
|
|
11
|
+
"name": "e2b",
|
|
12
|
+
"version": "2.51.0",
|
|
13
|
+
"artifacts": {
|
|
14
|
+
"2.51.0": "sha512-P+50lx1nOYpgCFyE1xuz6JVN/TqJivMUiH7v+RW0CUSfb4+NCu8IkC5KruT2sNPgp6aexddQQ77+OZKGpZZJ+Q=="
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"registry": "npm",
|
|
19
|
+
"name": "@e2b/code-interpreter",
|
|
20
|
+
"version": "2.8.0",
|
|
21
|
+
"artifacts": {
|
|
22
|
+
"2.8.0": "sha512-tWFi8IJYV3V6jOVfQ8V5PkzockrYP+ndWB/jKiJvRATTmNAy8+S/7S+iSh2Lb2Hrul869G2adRiN2xW8peJTig=="
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"registry": "pypi",
|
|
27
|
+
"name": "e2b",
|
|
28
|
+
"version": "2.51.0",
|
|
29
|
+
"artifacts": {
|
|
30
|
+
"e2b-2.51.0-py3-none-any.whl": "sha256-951d0fd069f017e760b338a435bdb83589b4bfb9574fc5203a7f777e9cb994c2",
|
|
31
|
+
"e2b-2.51.0.tar.gz": "sha256-902ee861b30c8ec3e46e7f84db8c993f30695872c7b4490efaad1627ec6e08ba"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"registry": "pypi",
|
|
36
|
+
"name": "e2b-code-interpreter",
|
|
37
|
+
"version": "2.10.0",
|
|
38
|
+
"artifacts": {
|
|
39
|
+
"e2b_code_interpreter-2.10.0-py3-none-any.whl": "sha256-6ba776122086261875bc6033ef2dc42ac6b6e22cefdffdfd19d30e93bb09786f",
|
|
40
|
+
"e2b_code_interpreter-2.10.0.tar.gz": "sha256-57fb7f9b9ad99ebbdf407619786fdb84e31537c2fbc8358c394aa0f0cbc1af28"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "daytona",
|
|
47
|
+
"status": "partial",
|
|
48
|
+
"upstreams": [
|
|
49
|
+
{
|
|
50
|
+
"registry": "npm",
|
|
51
|
+
"name": "@daytona/sdk",
|
|
52
|
+
"version": "0.220.0",
|
|
53
|
+
"artifacts": {
|
|
54
|
+
"0.220.0": "sha512-PJio3vbDwRApzlsK6AGO7r4CHJcF9PI5DWuUW2yUnA2MVJSh/jotS0onKBv6boC5F+oboljTibUMxrwVPIrOlQ=="
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"registry": "pypi",
|
|
59
|
+
"name": "daytona",
|
|
60
|
+
"version": "0.220.0",
|
|
61
|
+
"artifacts": {
|
|
62
|
+
"daytona-0.220.0-py3-none-any.whl": "sha256-5f71299eaf3a446e6569ada69919fc49997c1b2c587845057394aab886f113c8",
|
|
63
|
+
"daytona-0.220.0.tar.gz": "sha256-eda82eac9b3601e757b1dbe3ec2d966b46a9e3038b69ce44a0d90e01dac8417a"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"registry": "npm",
|
|
68
|
+
"name": "@daytona/api-client",
|
|
69
|
+
"version": "0.220.0",
|
|
70
|
+
"artifacts": {
|
|
71
|
+
"0.220.0": "sha512-XaMEtiQCaIHc3T7y3HUqx1A5eWSnd+FJvhpSHDwP3Snu9Nnhy4t+K2LHBWgJQn9dGtWXsdOsbB9K0BqpmFJtyA=="
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"registry": "npm",
|
|
76
|
+
"name": "@daytona/toolbox-api-client",
|
|
77
|
+
"version": "0.220.0",
|
|
78
|
+
"artifacts": {
|
|
79
|
+
"0.220.0": "sha512-Kn94AOxhGQil0XygOOR26SaCkndE4dOtxYS0hLbqrTxcP3H1uq1HGFGSRkHFQNkaR8eL9QwFUPSMqd0Vr3A64A=="
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"registry": "npm",
|
|
84
|
+
"name": "@daytona/analytics-api-client",
|
|
85
|
+
"version": "0.220.0",
|
|
86
|
+
"artifacts": {
|
|
87
|
+
"0.220.0": "sha512-3BGYILzjo2aFTJhLd6XBXlNEQBSo9Zr2Nj31OdX9o50fMRVUwVydF6ekIGkPGSLwskz6b6xxg5BSS+f9dbrxCQ=="
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "vercel",
|
|
94
|
+
"status": "partial",
|
|
95
|
+
"upstreams": [
|
|
96
|
+
{
|
|
97
|
+
"registry": "npm",
|
|
98
|
+
"name": "@vercel/sandbox",
|
|
99
|
+
"version": "3.5.1",
|
|
100
|
+
"artifacts": {
|
|
101
|
+
"3.5.1": "sha512-VHItQtcv4FkSXET29b088p87MNPAIhRscF3ifrup2KkC8ix4hy4NpgCO9F3GI4yOsztgGtuV7bDx29Iufun2hQ=="
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"registry": "pypi",
|
|
106
|
+
"name": "vercel",
|
|
107
|
+
"version": "0.11.4",
|
|
108
|
+
"artifacts": {
|
|
109
|
+
"vercel-0.11.4-py3-none-any.whl": "sha256-3ba3a0de2276a2b3daf590263082f6a82850dc77b35cf68f86a1e5bc9e83b6f1",
|
|
110
|
+
"vercel-0.11.4.tar.gz": "sha256-80038906615bf4182787af8354bce71b57d9fd5471a35ebca457d34ab5f50b2e"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"registry": "pypi",
|
|
115
|
+
"name": "vercel-sandbox",
|
|
116
|
+
"version": "0.7.0",
|
|
117
|
+
"artifacts": {
|
|
118
|
+
"vercel_sandbox-0.7.0-py3-none-any.whl": "sha256-f7eb897a1a5092fe8c38319ce803033b1a9ced8f414564a43a668432f91ffcd9",
|
|
119
|
+
"vercel_sandbox-0.7.0.tar.gz": "sha256-07d703790d0141dc75e0962baf35d666a6961bc1de913749137267a2550c81e2"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "blaxel",
|
|
126
|
+
"status": "partial",
|
|
127
|
+
"upstreams": [
|
|
128
|
+
{
|
|
129
|
+
"registry": "npm",
|
|
130
|
+
"name": "@blaxel/core",
|
|
131
|
+
"version": "0.3.24",
|
|
132
|
+
"artifacts": {
|
|
133
|
+
"0.3.24": "sha512-zF1S7vx+mYHDbK9F4FQbdobz3N+YIlNqHCyOC7R7QpbQ4nP9laeCuQRaN1OTfJVZcRwFvFQ5Nx1lh0su+esd7g=="
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"registry": "pypi",
|
|
138
|
+
"name": "blaxel",
|
|
139
|
+
"version": "0.4.12",
|
|
140
|
+
"artifacts": {
|
|
141
|
+
"blaxel-0.4.12-py3-none-any.whl": "sha256-9ca08aa0c1c5aaac87055f684eae002365c55010eaa008d5dc36c552e153210a",
|
|
142
|
+
"blaxel-0.4.12.tar.gz": "sha256-58dc5c9aea5b21aa65538f811c7de0b24e8e7a411bdf64e374a295eb1b9cb15e"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "runloop",
|
|
149
|
+
"status": "partial",
|
|
150
|
+
"upstreams": [
|
|
151
|
+
{
|
|
152
|
+
"registry": "npm",
|
|
153
|
+
"name": "@runloop/api-client",
|
|
154
|
+
"version": "1.32.0",
|
|
155
|
+
"artifacts": {
|
|
156
|
+
"1.32.0": "sha512-aCNKjlGzLVEAFl8WA42LmgiYkdIkaocOlFK/cMGppijsM0AGS+1hkw/RxroQxyHlkIhjyRaqLv7m5ZNMGhks7Q=="
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"registry": "pypi",
|
|
161
|
+
"name": "runloop-api-client",
|
|
162
|
+
"version": "1.32.0",
|
|
163
|
+
"artifacts": {
|
|
164
|
+
"runloop_api_client-1.32.0-py3-none-any.whl": "sha256-23c36910de7423f73aef91d4a963abea80a6b2f5b2df5bb8e439d788d5486cc7",
|
|
165
|
+
"runloop_api_client-1.32.0.tar.gz": "sha256-1f2077fb5a99b5ef30dbc1d96d47c1ca1d3f77895b9e186d985e47365fe85634"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "codesandbox",
|
|
172
|
+
"status": "partial",
|
|
173
|
+
"upstreams": [
|
|
174
|
+
{
|
|
175
|
+
"registry": "npm",
|
|
176
|
+
"name": "@codesandbox/sdk",
|
|
177
|
+
"version": "2.4.2",
|
|
178
|
+
"artifacts": {
|
|
179
|
+
"2.4.2": "sha512-pwz/+xNPLiCEvIYLxk2VJwiAFuy28V3J6FuO+xIB5U3AV/EylHlm77Lsi/WNYeXoSljIlaLLU7IemAjw3ojNfg=="
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "sprites",
|
|
186
|
+
"status": "partial",
|
|
187
|
+
"upstreams": [
|
|
188
|
+
{
|
|
189
|
+
"registry": "npm",
|
|
190
|
+
"name": "@fly/sprites",
|
|
191
|
+
"version": "0.2.3",
|
|
192
|
+
"artifacts": {
|
|
193
|
+
"0.2.3": "sha512-LB3xmHpHLdVECTQej+Vyi/aFFTc/Otf8bZ8GwVe/Hhlx4kIFS0K+9O5B8ru8Llg+cEwvYmzyeV69vNZPpCt0fw=="
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"registry": "pypi",
|
|
198
|
+
"name": "sprites-py",
|
|
199
|
+
"version": "0.7.1",
|
|
200
|
+
"artifacts": {
|
|
201
|
+
"sprites_py-0.7.1-py3-none-any.whl": "sha256-23774f8111c9a4fbb7007f8e305677734eb7616bebb6c668c394788399ff38a8",
|
|
202
|
+
"sprites_py-0.7.1.tar.gz": "sha256-c45596f3994376eb25dd7c4f988b3a6893dd8218502bacd7eedf2b20888d8456"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"id": "freestyle",
|
|
209
|
+
"status": "partial",
|
|
210
|
+
"upstreams": [
|
|
211
|
+
{
|
|
212
|
+
"registry": "npm",
|
|
213
|
+
"name": "freestyle",
|
|
214
|
+
"version": "0.2.16",
|
|
215
|
+
"artifacts": {
|
|
216
|
+
"0.2.16": "sha512-8pC7lh/R2PDanbs9Noc1Q7YlPl8Be8hHaQA/rpwFmELrcLTUAuCuxpoZ1Xm+7fuxqhJqJzO83bTTeLcSUoJ9SA=="
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"id": "prime",
|
|
223
|
+
"status": "partial",
|
|
224
|
+
"upstreams": [
|
|
225
|
+
{
|
|
226
|
+
"registry": "pypi",
|
|
227
|
+
"name": "prime-sandboxes",
|
|
228
|
+
"version": "0.4.0",
|
|
229
|
+
"artifacts": {
|
|
230
|
+
"prime_sandboxes-0.4.0-py3-none-any.whl": "sha256-2a15263a30f3a3a27307c83701b92317af83ec8df0968e910100ccdb557cbb6b",
|
|
231
|
+
"prime_sandboxes-0.4.0.tar.gz": "sha256-a6934a5f5fce8342dbe9ade9816242e893ebf23b83a4fa5fda5b0ddbce651f27"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"id": "modal",
|
|
238
|
+
"status": "partial",
|
|
239
|
+
"upstreams": [
|
|
240
|
+
{
|
|
241
|
+
"registry": "npm",
|
|
242
|
+
"name": "modal",
|
|
243
|
+
"version": "0.11.0",
|
|
244
|
+
"artifacts": {
|
|
245
|
+
"0.11.0": "sha512-Kvy2nejPkice2FI82p5e8TJrFDy0BaSYZjJVmvnTnu51bOH9Ok7IRtp8NavBQqMuXhbpbj6gRULwxsjNkweF6A=="
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"registry": "pypi",
|
|
250
|
+
"name": "modal",
|
|
251
|
+
"version": "1.6.0",
|
|
252
|
+
"artifacts": {
|
|
253
|
+
"modal-1.6.0-py3-none-any.whl": "sha256-2f5981ba656570ad96379d29f0ddff876880708c84966024ce130e9e1794fa68",
|
|
254
|
+
"modal-1.6.0.tar.gz": "sha256-c5dd551b5e0a283f3c764476c0a4ebe5bdef1e4a69432fa27e1b1ad8ca5e0817"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "cloudflare",
|
|
261
|
+
"status": "partial",
|
|
262
|
+
"upstreams": [
|
|
263
|
+
{
|
|
264
|
+
"registry": "npm",
|
|
265
|
+
"name": "@cloudflare/sandbox",
|
|
266
|
+
"version": "0.12.10",
|
|
267
|
+
"artifacts": {
|
|
268
|
+
"0.12.10": "sha512-245s6xEdR1v0Jti0YYd8ORWcTG/f/ksjJfpubvnbky0KxFC/ZDOpbpNKdtyiRBYZqmJGtEncYW7Cwge47tDrpg=="
|
|
269
|
+
},
|
|
270
|
+
"unsupported": {
|
|
271
|
+
"version": "1.0.0",
|
|
272
|
+
"artifacts": {
|
|
273
|
+
"1.0.0": "sha512-+TZVuCey6OBDTvPLWisq4Ie7/R5Zy3zFyYOFCNRpdEIyQsKq3xwzpctonE43DfZ+wYZvvu6QYpR138PayDjF+A=="
|
|
274
|
+
},
|
|
275
|
+
"reason": "1.0 removes getSandbox, the Sandbox class, exec, processes, sessions and preview proxying and keeps only Files, S3Mount and DirectoryBackup for the caller's own Durable Object; withruntime/cloudflare implements the 0.x API"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
}
|
package/dist/ai-harness/index.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* token. The key comes from RUNTIME_API_KEY or this machine's `runtime login`.
|
|
20
20
|
* Needs `@ai-sdk/harness` 1.x beside this package. */
|
|
21
21
|
import { HarnessCapabilityUnsupportedError, HarnessSandboxAuthenticationError, } from "@ai-sdk/harness";
|
|
22
|
+
import { AI_HARNESS_COMMAND_TIMEOUT_MS } from "../api-defaults.js";
|
|
22
23
|
import { Runtime } from "../client.js";
|
|
23
24
|
import { AuthenticationError, NotFoundError, PermissionDeniedError, RuntimeError, } from "../errors.js";
|
|
24
25
|
export const PROVIDER_ID = "runtime-sandbox";
|
|
@@ -27,7 +28,6 @@ export const PREVIEW_TOKEN_HEADER = "x-runtime-preview-token";
|
|
|
27
28
|
const TOKEN_QUERY = "runtime_preview_token";
|
|
28
29
|
const SESSION_NAME_PREFIX = "ai-harness-";
|
|
29
30
|
const MAX_COMMAND_MS = 86_400_000;
|
|
30
|
-
const DEFAULT_COMMAND_MS = 3_600_000;
|
|
31
31
|
/** Exit codes for a command that ended without one, as coreutils `timeout` and SIGKILL give. */
|
|
32
32
|
const TIMED_OUT_EXIT = 124;
|
|
33
33
|
const KILLED_EXIT = 137;
|
|
@@ -161,7 +161,7 @@ export class RuntimeSandboxSession {
|
|
|
161
161
|
? {}
|
|
162
162
|
: { cwd: this.#path(options.workingDirectory) }),
|
|
163
163
|
...(Object.keys(env).length ? { env } : {}),
|
|
164
|
-
timeoutMs: Math.min(MAX_COMMAND_MS, options.timeoutMs ?? this.settings.commandTimeoutMs ??
|
|
164
|
+
timeoutMs: Math.min(MAX_COMMAND_MS, options.timeoutMs ?? this.settings.commandTimeoutMs ?? AI_HARNESS_COMMAND_TIMEOUT_MS),
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
167
|
/** Runs `command` under `bash -c` and returns once it exits, with all of
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** A server-side wait for a state (`GET /v1/sandboxes/{id}?waitFor=`). */
|
|
2
|
+
export declare const WAIT_FOR_TIMEOUT_SECONDS = 60;
|
|
3
|
+
/** A streamed exec's command limit when none is given: the API's longest. */
|
|
4
|
+
export declare const STREAMED_EXEC_TIMEOUT_MS = 86400000;
|
|
5
|
+
/** The lease keepAlive keeps ahead of now, and so the most it extends by. */
|
|
6
|
+
export declare const KEEP_ALIVE_MARGIN_SECONDS = 600;
|
|
7
|
+
/** A webhook watch runs until stopped. */
|
|
8
|
+
export declare const WEBHOOK_WATCH_TIMEOUT_MS = 0;
|
|
9
|
+
/** A job run's limit, and the time added to it for its sandbox to start. */
|
|
10
|
+
export declare const JOB_TIMEOUT_SECONDS = 1800;
|
|
11
|
+
export declare const JOB_START_SECONDS = 60;
|
|
12
|
+
/** A command the framework-free tools run without a timeout of its own. */
|
|
13
|
+
export declare const TOOL_EXEC_TIMEOUT_SECONDS = 300;
|
|
14
|
+
/** A command the AI SDK harness runs without a timeout of its own. */
|
|
15
|
+
export declare const AI_HARNESS_COMMAND_TIMEOUT_MS = 3600000;
|
|
16
|
+
/** A command the OpenAI Agents sandbox runs without a timeout of its own. */
|
|
17
|
+
export declare const OPENAI_AGENTS_EXEC_TIMEOUT_MS = 3600000;
|