withruntime 0.10.0 → 0.11.1
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 +7 -8
- package/DAYTONA.md +40 -35
- package/E2B.md +70 -57
- package/README.md +3 -3
- package/README.src.md +3 -3
- package/VERCEL.md +23 -20
- package/compatibility-lock.json +63 -84
- package/dist/api-defaults.d.ts +1 -1
- package/dist/api-defaults.js +1 -1
- package/dist/blaxel/lookup.d.ts +2 -1
- package/dist/blaxel/lookup.js +2 -1
- package/dist/blaxel/sandbox.d.ts +7 -5
- package/dist/blaxel/sandbox.js +15 -10
- package/dist/cli.js +112 -17
- package/dist/client.d.ts +17 -1
- package/dist/client.js +46 -3
- package/dist/compat/files.js +5 -1
- package/dist/compat/lease.d.ts +37 -0
- package/dist/compat/lease.js +93 -0
- package/dist/credentials.d.ts +9 -0
- package/dist/credentials.js +26 -4
- package/dist/daytona/computer-use.d.ts +162 -0
- package/dist/daytona/computer-use.js +324 -0
- package/dist/daytona/context.d.ts +10 -0
- package/dist/daytona/context.js +24 -0
- package/dist/daytona/daytona.d.ts +20 -0
- package/dist/daytona/daytona.js +150 -26
- package/dist/daytona/filesystem.js +8 -0
- package/dist/daytona/index.d.ts +2 -26
- package/dist/daytona/index.js +2 -7
- package/dist/daytona/process.d.ts +63 -6
- package/dist/daytona/process.js +224 -23
- package/dist/daytona/sandbox.d.ts +25 -6
- package/dist/daytona/sandbox.js +60 -27
- package/dist/e2b/client.d.ts +5 -0
- package/dist/e2b/client.js +5 -1
- package/dist/e2b/commands.d.ts +15 -6
- package/dist/e2b/commands.js +83 -18
- package/dist/e2b/errors.d.ts +7 -0
- package/dist/e2b/errors.js +20 -0
- package/dist/e2b/filesystem.d.ts +2 -1
- package/dist/e2b/filesystem.js +43 -6
- package/dist/e2b/index.d.ts +2 -2
- package/dist/e2b/index.js +1 -1
- package/dist/e2b/pty.js +6 -3
- package/dist/e2b/sandbox.d.ts +20 -6
- package/dist/e2b/sandbox.js +207 -31
- package/dist/e2b/users.d.ts +30 -0
- package/dist/e2b/users.js +185 -0
- package/dist/errors.d.ts +6 -0
- package/dist/errors.js +6 -0
- package/dist/identity.js +2 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/mcp.d.ts +2 -1
- package/dist/mcp.js +6 -1
- package/dist/modal/index.js +6 -2
- package/dist/network-cli.js +33 -5
- package/dist/products/browser.d.ts +61 -0
- package/dist/products/browser.js +27 -0
- package/dist/products/desktop.d.ts +4 -3
- package/dist/products/desktop.js +7 -32
- package/dist/products/images.d.ts +3 -1
- package/dist/products/images.js +14 -2
- package/dist/products/index.d.ts +2 -0
- package/dist/products/index.js +2 -0
- package/dist/products/jobs.d.ts +7 -5
- package/dist/products/jobs.js +7 -3
- package/dist/products/mcp.d.ts +5 -1
- package/dist/products/mcp.js +29 -8
- package/dist/products/network-products.d.ts +8 -1
- package/dist/products/network-products.js +4 -1
- package/dist/products/observability.d.ts +1 -1
- package/dist/products/private-network.d.ts +22 -0
- package/dist/products/private-network.js +10 -0
- package/dist/products/secrets.d.ts +2 -2
- package/dist/runloop/index.js +6 -2
- package/dist/sandbox.d.ts +44 -14
- package/dist/sandbox.js +162 -48
- package/dist/tar.d.ts +2 -0
- package/dist/tar.js +74 -16
- package/dist/transport.d.ts +33 -7
- package/dist/transport.js +171 -36
- package/dist/types.d.ts +59 -11
- package/dist/vercel/filesystem.js +3 -1
- package/dist/vercel/index.d.ts +1 -7
- package/dist/vercel/index.js +1 -3
- package/dist/vercel/sandbox-user.d.ts +70 -0
- package/dist/vercel/sandbox-user.js +206 -0
- package/dist/vercel/sandbox.d.ts +57 -15
- package/dist/vercel/sandbox.js +219 -47
- package/dist/wait.d.ts +12 -0
- package/dist/wait.js +47 -0
- package/package.json +1 -1
package/compatibility-lock.json
CHANGED
|
@@ -9,32 +9,9 @@
|
|
|
9
9
|
{
|
|
10
10
|
"registry": "npm",
|
|
11
11
|
"name": "e2b",
|
|
12
|
-
"version": "2.
|
|
12
|
+
"version": "2.52.0",
|
|
13
13
|
"artifacts": {
|
|
14
|
-
"2.
|
|
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
|
-
}
|
|
14
|
+
"2.52.0": "sha512-TmUZlAvQq8BbguodpA+BBdawR/x5uILMQtHcLkdaLUqevsDjDdh46IYYU8ZRYKsQ4OhWr4xhsFIPSg1kgf+O0w=="
|
|
38
15
|
}
|
|
39
16
|
},
|
|
40
17
|
{
|
|
@@ -48,72 +25,19 @@
|
|
|
48
25
|
{
|
|
49
26
|
"registry": "pypi",
|
|
50
27
|
"name": "e2b",
|
|
51
|
-
"version": "2.
|
|
28
|
+
"version": "2.52.0",
|
|
52
29
|
"artifacts": {
|
|
53
|
-
"e2b-2.
|
|
54
|
-
"e2b-2.
|
|
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
|
-
}
|
|
30
|
+
"e2b-2.52.0-py3-none-any.whl": "sha256-6f4b5084b09986db43e99c7405bae6b14dc56984a69bbb1dc0687f1c71515cfb",
|
|
31
|
+
"e2b-2.52.0.tar.gz": "sha256-58c0042609513799341d4c1837e2581a4a5e73d3d62c9f1c57495c5e23eedee2"
|
|
83
32
|
}
|
|
84
33
|
},
|
|
85
34
|
{
|
|
86
35
|
"registry": "pypi",
|
|
87
36
|
"name": "e2b-code-interpreter",
|
|
88
|
-
"version": "2.10.
|
|
37
|
+
"version": "2.10.1",
|
|
89
38
|
"artifacts": {
|
|
90
|
-
"e2b_code_interpreter-2.10.
|
|
91
|
-
"e2b_code_interpreter-2.10.
|
|
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
|
-
}
|
|
39
|
+
"e2b_code_interpreter-2.10.1-py3-none-any.whl": "sha256-f4c9732699ee4b1c289acedac8bff66fccecc6ab374bf0b4ef88d5ad063e333d",
|
|
40
|
+
"e2b_code_interpreter-2.10.1.tar.gz": "sha256-94e504667788c6cbb175e5deaf1f68e8df474b670343fe1d72e2496b49d5a666"
|
|
117
41
|
}
|
|
118
42
|
}
|
|
119
43
|
]
|
|
@@ -305,6 +229,34 @@
|
|
|
305
229
|
"artifacts": {
|
|
306
230
|
"prime_sandboxes-0.4.1-py3-none-any.whl": "sha256-1a1bb96afacc66d690815be82c0b7af180ea141421b7d180b4a0adbada4f38f0",
|
|
307
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
|
+
}
|
|
308
260
|
}
|
|
309
261
|
}
|
|
310
262
|
]
|
|
@@ -328,6 +280,33 @@
|
|
|
328
280
|
"artifacts": {
|
|
329
281
|
"modal-1.6.0-py3-none-any.whl": "sha256-2f5981ba656570ad96379d29f0ddff876880708c84966024ce130e9e1794fa68",
|
|
330
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
|
+
}
|
|
331
310
|
}
|
|
332
311
|
}
|
|
333
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/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
|
};
|
package/dist/blaxel/sandbox.js
CHANGED
|
@@ -71,10 +71,12 @@ export function durationMs(value) {
|
|
|
71
71
|
total += Number(count) * unit[letter];
|
|
72
72
|
return total;
|
|
73
73
|
}
|
|
74
|
-
/** The
|
|
75
|
-
* lifecycle: never deleted before Blaxel would delete it. A fixed
|
|
76
|
-
* within the hour is a
|
|
77
|
-
*
|
|
74
|
+
/** The time limit and the paused retention that honour Blaxel's TTL, expiry
|
|
75
|
+
* and lifecycle: never deleted before Blaxel would delete it. A fixed
|
|
76
|
+
* deadline within the hour is a time limit that ends the sandbox; past that
|
|
77
|
+
* there is none, so it runs while it works and pauses when idle (0300), and
|
|
78
|
+
* a paused sandbox is kept that many days, rounded up; none keeps it 365
|
|
79
|
+
* days. */
|
|
78
80
|
export function lifetimeOf(asked) {
|
|
79
81
|
const now = Date.now();
|
|
80
82
|
const fixed = [];
|
|
@@ -110,7 +112,7 @@ export function lifetimeOf(asked) {
|
|
|
110
112
|
: KEEP_DAYS;
|
|
111
113
|
return soonest <= LEASE_SECONDS * 1000
|
|
112
114
|
? { timeoutSeconds: Math.max(60, Math.ceil(soonest / 1000)), onLeaseEnd: "stop", days }
|
|
113
|
-
: {
|
|
115
|
+
: { onLeaseEnd: "pause", days };
|
|
114
116
|
}
|
|
115
117
|
/** Blaxel's network settings as Runtime's rules: allowed and forbidden
|
|
116
118
|
* domains, from the network itself or from its proxy (Blaxel's current
|
|
@@ -402,9 +404,10 @@ export class SandboxInstance {
|
|
|
402
404
|
}
|
|
403
405
|
// ---- the live sandbox ---------------------------------------------------
|
|
404
406
|
/** The sandbox, ready for a call. A paused one wakes by itself on the call
|
|
405
|
-
* (autoWake); one made without autoWake is woken here. A
|
|
406
|
-
*
|
|
407
|
-
*
|
|
407
|
+
* (autoWake); one made without autoWake is woken here. A time limit
|
|
408
|
+
* nearing its end (an hour, on a sandbox made before 0300) is renewed in
|
|
409
|
+
* the background, so a sandbox in use is not paused by it; one with no
|
|
410
|
+
* time limit renews itself. */
|
|
408
411
|
async #live() {
|
|
409
412
|
if (this.#deleted)
|
|
410
413
|
throw responseError(404, `Sandbox ${this.name} was deleted.`);
|
|
@@ -414,6 +417,8 @@ export class SandboxInstance {
|
|
|
414
417
|
await this.#wake();
|
|
415
418
|
else if (state === "running" &&
|
|
416
419
|
rt.info.onLeaseEnd === "pause" &&
|
|
420
|
+
// One with no time limit renews itself (0300).
|
|
421
|
+
rt.info.endsAt !== null &&
|
|
417
422
|
!this.#renewing &&
|
|
418
423
|
Date.parse(rt.info.expiresAt) - Date.now() < RENEW_BELOW_MS)
|
|
419
424
|
this.#renewing = rt
|
|
@@ -461,7 +466,7 @@ export class SandboxInstance {
|
|
|
461
466
|
labels: { ...labels, [IDLE_PAUSE]: labels[IDLE_PAUSE] ?? String(current ?? 0) },
|
|
462
467
|
}))
|
|
463
468
|
: undefined,
|
|
464
|
-
rt.info.onLeaseEnd === "pause" && need >= 1
|
|
469
|
+
rt.info.onLeaseEnd === "pause" && rt.info.endsAt !== null && need >= 1
|
|
465
470
|
? rt.extend(Math.ceil(need)).catch(() => undefined)
|
|
466
471
|
: undefined,
|
|
467
472
|
]);
|
|
@@ -545,7 +550,7 @@ export class SandboxInstance {
|
|
|
545
550
|
vcpu: Math.min(MAX_VCPU, Math.max(1, Math.round(memory / MEMORY_PER_VCPU))),
|
|
546
551
|
memoryMiB: memory,
|
|
547
552
|
...STANDBY,
|
|
548
|
-
timeoutSeconds: lifetime.timeoutSeconds,
|
|
553
|
+
...(lifetime.timeoutSeconds === undefined ? {} : { timeoutSeconds: lifetime.timeoutSeconds }),
|
|
549
554
|
onLeaseEnd: lifetime.onLeaseEnd,
|
|
550
555
|
...(config.name ? { name: config.name } : {}),
|
|
551
556
|
labels,
|
package/dist/cli.js
CHANGED
|
@@ -88,7 +88,7 @@ Observability
|
|
|
88
88
|
Events and metrics to an OpenTelemetry endpoint
|
|
89
89
|
|
|
90
90
|
Products
|
|
91
|
-
sandbox Linux microVMs: exec, shell, files, code, previews, network, desktop
|
|
91
|
+
sandbox Linux microVMs: exec, shell, files, code, previews, network, desktop, browser
|
|
92
92
|
snapshot Saved sandboxes, disk and memory, to start or fork from
|
|
93
93
|
image Custom images from a Dockerfile, any public or private image, or a package list
|
|
94
94
|
volume Persistent disks to attach to sandboxes
|
|
@@ -97,7 +97,7 @@ Products
|
|
|
97
97
|
port A public TCP port to a sandbox: databases, game servers
|
|
98
98
|
address A dedicated outbound address, for allow-lists
|
|
99
99
|
tunnel A WireGuard tunnel from your own network into your sandboxes
|
|
100
|
-
network Account-wide network settings:
|
|
100
|
+
network Account-wide network settings: your own proxy, sandboxes reaching each other by name
|
|
101
101
|
Each has its own help: \`runtime sandbox help\`, \`runtime image help\`...
|
|
102
102
|
|
|
103
103
|
Every command takes --json. Keys: RUNTIME_API_KEY, or the connection from \`runtime login\`.
|
|
@@ -131,15 +131,19 @@ const SANDBOX_HELP = `runtime sandbox <command>
|
|
|
131
131
|
cat <id> <path> Print a file
|
|
132
132
|
files <id> [path] [--depth 1] [--glob '**/*.py']
|
|
133
133
|
stop <id> | pause <id> | wake <id> | restart <id>
|
|
134
|
+
stop --label k=v [--label k=v]... Stop every live sandbox with all those labels
|
|
134
135
|
rm <id> Delete it for good: stops it, deletes its disk and
|
|
135
136
|
paused memory, revokes its previews; snapshots stay
|
|
136
137
|
switch-image <id> <image> --keep-workspace Move it to another image, keeping /workspace (your home),
|
|
137
138
|
volumes, env and previews; processes restart, the rest of
|
|
138
139
|
its disk is lost (snapshot it first to keep everything)
|
|
139
|
-
|
|
140
|
+
resize <id> [--vcpu 2] [--memory 4096] --restart
|
|
141
|
+
Change its size by a restart: the whole disk stays,
|
|
142
|
+
programs stop (snapshot it first to keep memory)
|
|
143
|
+
extend <id> <seconds> Move a time limit on (one with none needs nothing)
|
|
140
144
|
update <id> [--name n] [--label k=v]... [--env K=V]... [--unset-env K]... [--idle-pause <seconds>] [--auto-wake on|off]
|
|
141
145
|
[--persistent on|off] [--max-total-cost <usd>|none]
|
|
142
|
-
Change its settings; persistent keeps it running
|
|
146
|
+
Change its settings; persistent keeps it running until stopped
|
|
143
147
|
snapshot <id> [--name n] [--retention days] Keep its whole machine; prints the snapshot id
|
|
144
148
|
mount <id> <s3|r2|gcs>://<bucket>[/prefix] <path> [--secret NAME] [--region r]
|
|
145
149
|
[--endpoint https://...] [--account-id id] [--read-only]
|
|
@@ -180,6 +184,8 @@ const SANDBOX_HELP = `runtime sandbox <command>
|
|
|
180
184
|
| type <text> | press <keys> | windows
|
|
181
185
|
desktop <id> record start [--fps 10] [--max-seconds 1800] [--max-mib 512] | record stop <recId>
|
|
182
186
|
| record ls | record fetch <recId> [file.mp4] | record rm <recId>
|
|
187
|
+
browser <id> start [--headed] [--width 1280] [--height 800] | get | stop
|
|
188
|
+
Chromium for CDP agents: prints its cdpUrl
|
|
183
189
|
|
|
184
190
|
Examples
|
|
185
191
|
id=$(runtime sandbox create)
|
|
@@ -410,6 +416,7 @@ const SANDBOX_VERBS = [
|
|
|
410
416
|
"rm",
|
|
411
417
|
"delete",
|
|
412
418
|
"switch-image",
|
|
419
|
+
"resize",
|
|
413
420
|
"pause",
|
|
414
421
|
"wake",
|
|
415
422
|
"restart",
|
|
@@ -437,6 +444,7 @@ const SANDBOX_VERBS = [
|
|
|
437
444
|
"session",
|
|
438
445
|
"network",
|
|
439
446
|
"desktop",
|
|
447
|
+
"browser",
|
|
440
448
|
"metrics",
|
|
441
449
|
"watch",
|
|
442
450
|
"mcp",
|
|
@@ -509,8 +517,18 @@ function describe(info) {
|
|
|
509
517
|
],
|
|
510
518
|
["funding", info.funding],
|
|
511
519
|
["region", info.region],
|
|
512
|
-
|
|
513
|
-
|
|
520
|
+
// A sandbox with no time limit runs while it works (0300): endsAt is
|
|
521
|
+
// null. An older server sends no endsAt; its expiresAt was the end.
|
|
522
|
+
["time limit", info.timeoutSeconds ? `${info.timeoutSeconds} s` : "none"],
|
|
523
|
+
[
|
|
524
|
+
"ends",
|
|
525
|
+
info.endsAt === null
|
|
526
|
+
? info.state === "running"
|
|
527
|
+
? "when idle, stopped or out of credit"
|
|
528
|
+
: "-"
|
|
529
|
+
: (info.endsAt ?? info.expiresAt ?? "-"),
|
|
530
|
+
],
|
|
531
|
+
["at its end", info.onLeaseEnd ?? "-"],
|
|
514
532
|
// Why a sandbox is no longer running (troubleshooting.md, "A sandbox
|
|
515
533
|
// stopped on its own"); `get` left both out until 30 September 2026.
|
|
516
534
|
...(info.pausedAt ? [["paused at", info.pausedAt]] : []),
|
|
@@ -1063,10 +1081,18 @@ export function usageCsv(u) {
|
|
|
1063
1081
|
.join(","));
|
|
1064
1082
|
return [head.join(","), ...rows].join("\n");
|
|
1065
1083
|
}
|
|
1084
|
+
/** Milliseconds as hours, to a tenth: "8,731.2". */
|
|
1085
|
+
const hours = (ms) => (ms / 3_600_000).toLocaleString("en-US", { maximumFractionDigits: 1 });
|
|
1066
1086
|
/** The free trial's time left, as `runtime usage` and `runtime limits` say it. */
|
|
1067
1087
|
function trialLeft(trial) {
|
|
1068
|
-
|
|
1069
|
-
|
|
1088
|
+
return `${hours(trial.availableMs)} of ${hours(trial.totalMs)} hours left`;
|
|
1089
|
+
}
|
|
1090
|
+
/** A pilot's sandbox hours left, as `runtime usage` says them. */
|
|
1091
|
+
function pilotLeft(pilot) {
|
|
1092
|
+
const left = `${hours(pilot.leftMs)} of ${pilot.hours.toLocaleString("en-US")} left`;
|
|
1093
|
+
return pilot.leftMs > 0
|
|
1094
|
+
? `${left}; new pilot sandboxes until ${pilot.endsAt.slice(0, 16).replace("T", " ")} UTC`
|
|
1095
|
+
: "This pilot's sandbox hours are used.";
|
|
1070
1096
|
}
|
|
1071
1097
|
function usageSummary(u) {
|
|
1072
1098
|
const micros = (value) => typeof value === "string" || typeof value === "number" || typeof value === "bigint"
|
|
@@ -1080,15 +1106,17 @@ function usageSummary(u) {
|
|
|
1080
1106
|
// its own line, so "spent" reads as what was used.
|
|
1081
1107
|
["used", dollars(micros(u.spent) - takenBack)],
|
|
1082
1108
|
...(takenBack > 0n ? [["returned by refunds and disputes", dollars(takenBack)]] : []),
|
|
1083
|
-
//
|
|
1084
|
-
//
|
|
1085
|
-
//
|
|
1086
|
-
["
|
|
1109
|
+
// What running sandboxes and the hour ahead of stored snapshots, images
|
|
1110
|
+
// and volumes are about to use, so an account with nothing running can
|
|
1111
|
+
// still show some. Said without "held": no guide teaches holds.
|
|
1112
|
+
["set aside for running sandboxes and this hour's storage", dollars(micros(u.held))],
|
|
1087
1113
|
];
|
|
1088
1114
|
if (micros(u.expired) > 0n)
|
|
1089
1115
|
rows.push(["expired or taken back", dollars(micros(u.expired))]);
|
|
1090
1116
|
if (u.trial)
|
|
1091
1117
|
rows.push(["free trial", trialLeft(u.trial)]);
|
|
1118
|
+
if (u.pilot)
|
|
1119
|
+
rows.push(["pilot sandbox hours", pilotLeft(u.pilot)]);
|
|
1092
1120
|
if (u.outbound) {
|
|
1093
1121
|
const gib = (bytes) => `${(bytes / 1_073_741_824).toLocaleString("en-US", { maximumFractionDigits: 1 })} GiB`;
|
|
1094
1122
|
const left = Math.max(0, u.outbound.allowanceBytes - u.outbound.freeBytes);
|
|
@@ -1466,11 +1494,13 @@ async function sandbox(argv, env, out) {
|
|
|
1466
1494
|
s.state,
|
|
1467
1495
|
`${s.info.vcpu}/${s.info.memoryMiB}`,
|
|
1468
1496
|
s.info.funding,
|
|
1469
|
-
s
|
|
1497
|
+
// When it stops or pauses by itself (0381): its time limit's end, or
|
|
1498
|
+
// "-" when it never will. An older server sends no endsAt.
|
|
1499
|
+
(s.info.endsAt === undefined ? s.info.expiresAt : s.info.endsAt) ?? "-",
|
|
1470
1500
|
]);
|
|
1471
1501
|
print([
|
|
1472
1502
|
rows.length
|
|
1473
|
-
? table([["ID", "NAME", "STATE", "CPU/MIB", "FUNDING", "
|
|
1503
|
+
? table([["ID", "NAME", "STATE", "CPU/MIB", "FUNDING", "ENDS"], ...rows])
|
|
1474
1504
|
: stopped
|
|
1475
1505
|
? "No live sandboxes."
|
|
1476
1506
|
: "No sandboxes. Create one: runtime sandbox create",
|
|
@@ -1495,6 +1525,21 @@ async function sandbox(argv, env, out) {
|
|
|
1495
1525
|
print(describe(sbx.info), sbx.info);
|
|
1496
1526
|
return 0;
|
|
1497
1527
|
}
|
|
1528
|
+
case "resize": {
|
|
1529
|
+
const args = parse(rest, ["restart"], ["vcpu", "memory"]);
|
|
1530
|
+
const sbx = await use(need(args.positional[0], `a sandbox, e.g. ${me} sandbox resize <id> --memory 4096 --restart`));
|
|
1531
|
+
const size = {
|
|
1532
|
+
...(integer(args, "vcpu") !== undefined ? { vcpu: integer(args, "vcpu") } : {}),
|
|
1533
|
+
...(integer(args, "memory") !== undefined ? { memoryMiB: integer(args, "memory") } : {}),
|
|
1534
|
+
};
|
|
1535
|
+
if (size.vcpu === undefined && size.memoryMiB === undefined)
|
|
1536
|
+
throw usage(`Name a new size, e.g. ${me} sandbox resize ${sbx.id} --memory 4096 --restart`);
|
|
1537
|
+
if (!args.flags.has("restart"))
|
|
1538
|
+
throw usage(`A resize restarts it: its whole disk stays and its programs stop. Add --restart to say so, or snapshot it first (${me} sandbox snapshot ${sbx.id}) to keep its memory too.`);
|
|
1539
|
+
await sbx.resize(size, { restart: true });
|
|
1540
|
+
print(describe(sbx.info), sbx.info);
|
|
1541
|
+
return 0;
|
|
1542
|
+
}
|
|
1498
1543
|
case "rm":
|
|
1499
1544
|
case "delete": {
|
|
1500
1545
|
const sbx = await use(need(rest[0], `a sandbox, e.g. ${me} sandbox rm <id>`));
|
|
@@ -1506,6 +1551,23 @@ async function sandbox(argv, env, out) {
|
|
|
1506
1551
|
case "pause":
|
|
1507
1552
|
case "wake":
|
|
1508
1553
|
case "restart": {
|
|
1554
|
+
if (verb === "stop" && rest.some((word) => /^--label(=|$)/.test(word))) {
|
|
1555
|
+
const args = parse(rest, [], ["label"]);
|
|
1556
|
+
if (args.positional.length)
|
|
1557
|
+
throw usage("Give a sandbox id or --label, not both.");
|
|
1558
|
+
const { stopped, failed } = await runtime.sandboxes.stopAll({
|
|
1559
|
+
labels: pairs(args, "label"),
|
|
1560
|
+
});
|
|
1561
|
+
const said = (error) => (error instanceof Error ? error.message : String(error));
|
|
1562
|
+
print([
|
|
1563
|
+
stopped.length || failed.length
|
|
1564
|
+
? `${stopped.length} stopped${failed.length ? `, ${failed.length} failed` : ""}.`
|
|
1565
|
+
: "No live sandbox has those labels.",
|
|
1566
|
+
...stopped.map((id) => `${id} stopped`),
|
|
1567
|
+
...failed.map((f) => `${f.id} failed: ${said(f.error)}`),
|
|
1568
|
+
].join("\n"), { stopped, failed: failed.map((f) => ({ id: f.id, error: said(f.error) })) });
|
|
1569
|
+
return failed.length ? 1 : 0;
|
|
1570
|
+
}
|
|
1509
1571
|
const sbx = await get(rest[0]);
|
|
1510
1572
|
await sbx[verb]();
|
|
1511
1573
|
print(`${sbx.id} ${sbx.state}`, sbx.info);
|
|
@@ -1664,7 +1726,9 @@ async function sandbox(argv, env, out) {
|
|
|
1664
1726
|
const sbx = await get(rest[0]);
|
|
1665
1727
|
const seconds = Number(need(rest[1], "seconds, e.g. runtime sandbox extend <id> 600"));
|
|
1666
1728
|
await sbx.extend(seconds);
|
|
1667
|
-
print(
|
|
1729
|
+
print(sbx.info.endsAt === null
|
|
1730
|
+
? `${sbx.id} has no time limit: it runs while it works, so nothing was extended`
|
|
1731
|
+
: `${sbx.id} now ends at ${sbx.info.endsAt ?? sbx.info.expiresAt}`, sbx.info);
|
|
1668
1732
|
return 0;
|
|
1669
1733
|
}
|
|
1670
1734
|
case "exec": {
|
|
@@ -1893,6 +1957,8 @@ async function sandbox(argv, env, out) {
|
|
|
1893
1957
|
}
|
|
1894
1958
|
case "desktop":
|
|
1895
1959
|
return desktop(await use(rest[0]), rest.slice(1), out);
|
|
1960
|
+
case "browser":
|
|
1961
|
+
return browser(await use(rest[0]), rest.slice(1), out);
|
|
1896
1962
|
case "watch":
|
|
1897
1963
|
return (await import("./cli-extras.js")).watchCommand(await use(rest[0]), rest.slice(1), out, kit);
|
|
1898
1964
|
case "mcp":
|
|
@@ -2227,6 +2293,35 @@ async function desktop(sbx, argv, out) {
|
|
|
2227
2293
|
}
|
|
2228
2294
|
throw usage(`${me} sandbox desktop <id> start|stop|screenshot|open|click|type|press|windows|record`);
|
|
2229
2295
|
}
|
|
2296
|
+
async function browser(sbx, argv, out) {
|
|
2297
|
+
const [action, ...rest] = argv;
|
|
2298
|
+
const print = (human, value) => out.write(out.json ? JSON.stringify(value) : human);
|
|
2299
|
+
switch (action) {
|
|
2300
|
+
case "start": {
|
|
2301
|
+
const args = parse(rest, ["headed"], ["width", "height"]);
|
|
2302
|
+
const started = await sbx.browser.start({
|
|
2303
|
+
...(args.flags.has("headed") ? { headless: false } : {}),
|
|
2304
|
+
...(integer(args, "width") !== undefined ? { width: integer(args, "width") } : {}),
|
|
2305
|
+
...(integer(args, "height") !== undefined ? { height: integer(args, "height") } : {}),
|
|
2306
|
+
});
|
|
2307
|
+
print(`${started.version}${started.headless ? "" : `, on the desktop: ${started.streamUrl}`}\n` +
|
|
2308
|
+
`CDP: ${started.cdpUrl}\n(private; it expires ${started.expiresAt ?? "never"})`, started);
|
|
2309
|
+
return 0;
|
|
2310
|
+
}
|
|
2311
|
+
case "get":
|
|
2312
|
+
case undefined: {
|
|
2313
|
+
const state = await sbx.browser.get();
|
|
2314
|
+
print(state.running ? `${state.version}\nCDP: ${state.cdpUrl}` : "No browser running.", state);
|
|
2315
|
+
return 0;
|
|
2316
|
+
}
|
|
2317
|
+
case "stop": {
|
|
2318
|
+
const stopped = await sbx.browser.stop();
|
|
2319
|
+
print(stopped.stopped ? "Browser stopped." : "No browser was running.", stopped);
|
|
2320
|
+
return 0;
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
throw usage(`${me} sandbox browser <id> start [--headed]|get|stop`);
|
|
2324
|
+
}
|
|
2230
2325
|
const KEYS_HELP = `runtime keys <command>
|
|
2231
2326
|
|
|
2232
2327
|
create [--name <name>] [--read-only] [--daily-limit <usd>] [--account-wide]
|
|
@@ -2712,8 +2807,8 @@ read = readSecret) {
|
|
|
2712
2807
|
}
|
|
2713
2808
|
const JOB_HELP = `runtime job <command>
|
|
2714
2809
|
|
|
2715
|
-
A job runs a command in a fresh sandbox, once or on a schedule. Each run
|
|
2716
|
-
|
|
2810
|
+
A job runs a command in a fresh sandbox, once or on a schedule. Each run spends
|
|
2811
|
+
the free trial's hours first, then credit at the sandbox rates.
|
|
2717
2812
|
|
|
2718
2813
|
create <name> (--cron "<min hour day month weekday>" [--timezone Europe/Berlin] | --at <time|now>)
|
|
2719
2814
|
[--vcpu 2] [--memory 4096] [--disk 4096] [--cpu shared|reserved] [--cpu-floor <thousandths>]
|
package/dist/client.d.ts
CHANGED
|
@@ -16,7 +16,11 @@ export type RuntimeOptions = {
|
|
|
16
16
|
timeoutMs?: number;
|
|
17
17
|
/** Retries of transport failures, 429, 502, 503 and 504. Default 4. */
|
|
18
18
|
maxRetries?: number;
|
|
19
|
-
/**
|
|
19
|
+
/** Connections held at once, calls and streams (a command's output, a
|
|
20
|
+
* download) together; more wait their turn, first come first served, and
|
|
21
|
+
* reuse them. Default 48: one address may hold 64 connections to the API
|
|
22
|
+
* before it has used a valid key. 8 are kept for calls whatever the
|
|
23
|
+
* streams hold. */
|
|
20
24
|
maxConnections?: number;
|
|
21
25
|
/** How long `sandboxes.create` keeps retrying, with the same key and input,
|
|
22
26
|
* when the trial's slots, the account's quota or the region is full
|
|
@@ -118,6 +122,18 @@ export declare class Sandboxes {
|
|
|
118
122
|
name?: string;
|
|
119
123
|
limit?: number;
|
|
120
124
|
}, options?: RequestOptions): Promise<Page<Sandbox>>;
|
|
125
|
+
/** Stops every live sandbox whose labels all match, eight at a time, and
|
|
126
|
+
* says which stopped and which failed; one failure does not stop the rest.
|
|
127
|
+
* Needs at least one label, so stopping everything is never one call. */
|
|
128
|
+
stopAll(filter: {
|
|
129
|
+
labels: Record<string, string>;
|
|
130
|
+
}, options?: RequestOptions): Promise<{
|
|
131
|
+
stopped: string[];
|
|
132
|
+
failed: {
|
|
133
|
+
id: string;
|
|
134
|
+
error: unknown;
|
|
135
|
+
}[];
|
|
136
|
+
}>;
|
|
121
137
|
}
|
|
122
138
|
export declare class FeedbackApi {
|
|
123
139
|
private readonly t;
|