withruntime 0.11.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/BLAXEL.md +3 -3
  2. package/COMPATIBILITY.md +74 -9
  3. package/DAYTONA.md +33 -5
  4. package/E2B.md +137 -48
  5. package/README.md +11 -9
  6. package/README.src.md +11 -9
  7. package/VERCEL.md +43 -5
  8. package/compatibility-lock.json +58 -49
  9. package/dist/billing-cli.d.ts +1 -1
  10. package/dist/billing-cli.js +77 -1
  11. package/dist/blaxel/errors.d.ts +14 -0
  12. package/dist/blaxel/errors.js +33 -4
  13. package/dist/blaxel/index.d.ts +2 -2
  14. package/dist/blaxel/index.js +4 -4
  15. package/dist/blaxel/interpreter.d.ts +2 -5
  16. package/dist/blaxel/sandbox.d.ts +15 -7
  17. package/dist/blaxel/sandbox.js +64 -9
  18. package/dist/blaxel/snapshot.d.ts +4 -0
  19. package/dist/blaxel/snapshot.js +4 -0
  20. package/dist/cli/logs.d.ts +21 -0
  21. package/dist/cli/logs.js +188 -0
  22. package/dist/cli/logs.test.d.ts +1 -0
  23. package/dist/cli/logs.test.js +272 -0
  24. package/dist/cli-extras.d.ts +3 -3
  25. package/dist/cli-extras.js +17 -12
  26. package/dist/cli-words.d.ts +10 -1
  27. package/dist/cli-words.js +18 -0
  28. package/dist/cli.d.ts +6 -2
  29. package/dist/cli.js +468 -219
  30. package/dist/client.d.ts +13 -63
  31. package/dist/client.js +35 -124
  32. package/dist/cloudflare/errors.d.ts +143 -0
  33. package/dist/cloudflare/errors.js +167 -0
  34. package/dist/cloudflare/index.d.ts +175 -6
  35. package/dist/cloudflare/index.js +416 -26
  36. package/dist/cloudflare/interpreter.d.ts +119 -0
  37. package/dist/cloudflare/interpreter.js +223 -0
  38. package/dist/cloudflare/streams.d.ts +38 -0
  39. package/dist/cloudflare/streams.js +145 -0
  40. package/dist/cloudflare/watch.d.ts +9 -0
  41. package/dist/cloudflare/watch.js +24 -0
  42. package/dist/codesandbox/index.d.ts +216 -28
  43. package/dist/codesandbox/index.js +478 -78
  44. package/dist/compat/core.d.ts +18 -0
  45. package/dist/compat/core.js +29 -0
  46. package/dist/compat/files.d.ts +1 -0
  47. package/dist/compat/files.js +25 -5
  48. package/dist/daytona/computer-use.d.ts +13 -4
  49. package/dist/daytona/computer-use.js +66 -8
  50. package/dist/daytona/daytona.d.ts +7 -2
  51. package/dist/daytona/daytona.js +31 -5
  52. package/dist/daytona/errors.d.ts +11 -0
  53. package/dist/daytona/errors.js +18 -0
  54. package/dist/daytona/filesystem.js +2 -1
  55. package/dist/daytona/image.d.ts +13 -9
  56. package/dist/daytona/image.js +18 -12
  57. package/dist/daytona/index.d.ts +1 -1
  58. package/dist/daytona/sandbox.d.ts +9 -3
  59. package/dist/daytona/sandbox.js +17 -3
  60. package/dist/domains/index.d.ts +9 -0
  61. package/dist/domains/index.js +10 -0
  62. package/dist/e2b/client.d.ts +15 -2
  63. package/dist/e2b/client.js +61 -7
  64. package/dist/e2b/commands.d.ts +4 -1
  65. package/dist/e2b/commands.js +17 -7
  66. package/dist/e2b/errors.d.ts +43 -2
  67. package/dist/e2b/errors.js +78 -6
  68. package/dist/e2b/filesystem.d.ts +1 -1
  69. package/dist/e2b/filesystem.js +82 -16
  70. package/dist/e2b/index.d.ts +3 -3
  71. package/dist/e2b/index.js +2 -2
  72. package/dist/e2b/sandbox.d.ts +50 -35
  73. package/dist/e2b/sandbox.js +228 -185
  74. package/dist/e2b/unsupported.d.ts +19 -0
  75. package/dist/e2b/unsupported.js +22 -1
  76. package/dist/e2b/users.d.ts +9 -0
  77. package/dist/e2b/users.js +22 -0
  78. package/dist/errors.d.ts +14 -5
  79. package/dist/errors.js +28 -14
  80. package/dist/freestyle/index.d.ts +285 -37
  81. package/dist/freestyle/index.js +656 -144
  82. package/dist/identity.d.ts +3 -0
  83. package/dist/identity.js +27 -0
  84. package/dist/images/index.d.ts +9 -0
  85. package/dist/images/index.js +10 -0
  86. package/dist/index.d.ts +1 -0
  87. package/dist/ips/index.d.ts +9 -0
  88. package/dist/ips/index.js +10 -0
  89. package/dist/jobs/index.d.ts +9 -0
  90. package/dist/jobs/index.js +10 -0
  91. package/dist/keys.js +2 -0
  92. package/dist/login.js +2 -0
  93. package/dist/machine.d.ts +189 -0
  94. package/dist/machine.js +521 -0
  95. package/dist/mcp.js +1 -1
  96. package/dist/modal/index.d.ts +339 -61
  97. package/dist/modal/index.js +781 -121
  98. package/dist/network-cli.d.ts +3 -1
  99. package/dist/network-cli.js +78 -36
  100. package/dist/networks/index.d.ts +11 -0
  101. package/dist/networks/index.js +10 -0
  102. package/dist/openai-agents/index.d.ts +1 -1
  103. package/dist/openai-agents/index.js +1 -1
  104. package/dist/ports/index.d.ts +9 -0
  105. package/dist/ports/index.js +10 -0
  106. package/dist/product-names.d.ts +52 -0
  107. package/dist/product-names.js +164 -0
  108. package/dist/product-renames.d.ts +103 -0
  109. package/dist/product-renames.js +189 -0
  110. package/dist/products/apps.d.ts +176 -0
  111. package/dist/products/apps.js +165 -0
  112. package/dist/products/billing.d.ts +41 -0
  113. package/dist/products/billing.js +13 -0
  114. package/dist/products/browser.d.ts +10 -0
  115. package/dist/products/browsers.d.ts +71 -0
  116. package/dist/products/browsers.js +102 -0
  117. package/dist/products/builds.d.ts +126 -0
  118. package/dist/products/builds.js +221 -0
  119. package/dist/products/index.d.ts +3 -16
  120. package/dist/products/index.js +3 -14
  121. package/dist/products/jobs.d.ts +19 -3
  122. package/dist/products/jobs.js +28 -12
  123. package/dist/products/limits.d.ts +4 -10
  124. package/dist/products/logs.d.ts +245 -0
  125. package/dist/products/logs.js +274 -0
  126. package/dist/products/logs.test.d.ts +1 -0
  127. package/dist/products/logs.test.js +343 -0
  128. package/dist/products/network-products.d.ts +38 -7
  129. package/dist/products/network-products.js +31 -18
  130. package/dist/products/network.d.ts +1 -1
  131. package/dist/products/observability.d.ts +3 -2
  132. package/dist/products/private-network.js +1 -1
  133. package/dist/products/queues.d.ts +149 -0
  134. package/dist/products/queues.js +213 -0
  135. package/dist/products/referrals.d.ts +21 -7
  136. package/dist/products/referrals.js +3 -3
  137. package/dist/products/secrets.d.ts +8 -4
  138. package/dist/products/secrets.js +39 -18
  139. package/dist/products/signed-requests.d.ts +21 -0
  140. package/dist/products/signed-requests.js +11 -0
  141. package/dist/products/streams.d.ts +73 -0
  142. package/dist/products/streams.js +17 -0
  143. package/dist/products/switching.d.ts +37 -10
  144. package/dist/products/switching.js +4 -3
  145. package/dist/products/volumes.d.ts +3 -0
  146. package/dist/record-cli.d.ts +23 -0
  147. package/dist/record-cli.js +308 -0
  148. package/dist/renamed-products.d.ts +38 -0
  149. package/dist/renamed-products.js +34 -0
  150. package/dist/runloop/index.d.ts +9 -2
  151. package/dist/runloop/index.js +29 -8
  152. package/dist/runloop/sdk.d.ts +131 -0
  153. package/dist/runloop/sdk.js +167 -0
  154. package/dist/sandbox.d.ts +10 -94
  155. package/dist/sandbox.js +22 -371
  156. package/dist/sandboxes/index.d.ts +11 -0
  157. package/dist/sandboxes/index.js +12 -0
  158. package/dist/snapshots/index.d.ts +9 -0
  159. package/dist/snapshots/index.js +11 -0
  160. package/dist/snapshots.d.ts +7 -4
  161. package/dist/sprites/index.d.ts +343 -31
  162. package/dist/sprites/index.js +866 -84
  163. package/dist/ssh.d.ts +1 -1
  164. package/dist/ssh.js +11 -11
  165. package/dist/terminal.d.ts +24 -0
  166. package/dist/terminal.js +32 -0
  167. package/dist/transport.d.ts +18 -2
  168. package/dist/transport.js +61 -6
  169. package/dist/tunnel.js +1 -1
  170. package/dist/types.d.ts +116 -8
  171. package/dist/vercel/sandbox.d.ts +1 -2
  172. package/dist/vercel/sandbox.js +6 -5
  173. package/dist/vercel/snapshot.js +10 -2
  174. package/dist/volumes/index.d.ts +9 -0
  175. package/dist/volumes/index.js +10 -0
  176. package/package.json +48 -2
package/README.md CHANGED
@@ -26,12 +26,14 @@ console.log(result.exitCode, result.stdout);
26
26
  ```
27
27
 
28
28
  `Sandbox.create()` needs no arguments and returns once the sandbox is running;
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 free
31
- trial while it lasts (100 free hours, up to eight sandboxes running at once), 2 vCPU, 4 GiB of
29
+ `await using` deletes it when the block ends (Node 24, Bun or TypeScript; on
30
+ Node 22 call `await sbx.delete()`), and `keep: true` stops it instead, keeping
31
+ its disk. With no arguments you get the
32
+ included usage, 100 hours of a 2 vCPU, 4 GB sandbox every month with no card (up to
33
+ eight sandboxes running at once without credit), 2 vCPU, 4 GiB of
32
34
  memory and a 4 GiB disk. The current default image includes NumPy, pandas and
33
35
  matplotlib; see the [sandbox environment](https://withruntime.com/docs/sandbox-environment).
34
- The trial's hours are spent first, then prepaid credit, with nothing to
36
+ The included usage is spent first, then prepaid credit, with nothing to
35
37
  choose; `funding` is accepted and ignored.
36
38
 
37
39
  The sandbox object does the rest:
@@ -40,7 +42,7 @@ The sandbox object does the rest:
40
42
  work, with `cwd`, `env` (the place for secrets), `stdin` and `timeoutMs`;
41
43
  - `terminal()` for an interactive terminal over a WebSocket;
42
44
  - `forwardPort(5432)` to reach any TCP port in the sandbox from this machine, and
43
- `tunnel()` for single connections and SSH logins (`runtime sandbox ssh` uses it);
45
+ `tunnel()` for single connections and SSH logins (`runtime sandboxes ssh` uses it);
44
46
  - `files` to read, write, list, glob, stat, move and remove, and to copy whole
45
47
  directories with `upload` and `download`;
46
48
  - `pause`, `wake`, `extend`, `fork` and `snapshot` (a paused sandbox also wakes
@@ -160,14 +162,14 @@ https://withruntime.com/docs/frameworks.
160
162
 
161
163
  ```bash no-run
162
164
  printf '%s\n' 'print(sum([125, 250, 375]))' > invoice.py
163
- npx withruntime sandbox run -- python3 - < invoice.py # connects on first use
164
- npx withruntime sandbox create
165
+ npx withruntime sandboxes run -- python3 - < invoice.py # connects on first use
166
+ npx withruntime sandboxes create
165
167
  npx withruntime help
166
168
  ```
167
169
 
168
170
  Installed with `npm i -g withruntime`, the command is `runtime`:
169
- `runtime sandbox exec <id> -- ls`, `runtime sandbox shell <id>`,
170
- `runtime image build --pip pandas`, and `--json` on every command.
171
+ `runtime sandboxes exec <id> -- ls`, `runtime sandboxes shell <id>`,
172
+ `runtime images build --pip pandas`, and `--json` on every command.
171
173
 
172
174
  ## MCP
173
175
 
package/README.src.md CHANGED
@@ -28,12 +28,14 @@ console.log(result.exitCode, result.stdout);
28
28
  ```
29
29
 
30
30
  `Sandbox.create()` needs no arguments and returns once the sandbox is running;
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 free
33
- trial while it lasts ({{trial-hours}} free hours, up to {{trial-sandboxes}} sandboxes running at once), 2 vCPU, 4 GiB of
31
+ `await using` deletes it when the block ends (Node 24, Bun or TypeScript; on
32
+ Node 22 call `await sbx.delete()`), and `keep: true` stops it instead, keeping
33
+ its disk. With no arguments you get the
34
+ included usage, {{included-machine}} every month with no card (up to
35
+ {{trial-sandboxes}} sandboxes running at once without credit), 2 vCPU, 4 GiB of
34
36
  memory and a 4 GiB disk. The current default image includes NumPy, pandas and
35
37
  matplotlib; see the [sandbox environment](https://withruntime.com/docs/sandbox-environment).
36
- The trial's hours are spent first, then prepaid credit, with nothing to
38
+ The included usage is spent first, then prepaid credit, with nothing to
37
39
  choose; `funding` is accepted and ignored.
38
40
 
39
41
  The sandbox object does the rest:
@@ -42,7 +44,7 @@ The sandbox object does the rest:
42
44
  work, with `cwd`, `env` (the place for secrets), `stdin` and `timeoutMs`;
43
45
  - `terminal()` for an interactive terminal over a WebSocket;
44
46
  - `forwardPort(5432)` to reach any TCP port in the sandbox from this machine, and
45
- `tunnel()` for single connections and SSH logins (`runtime sandbox ssh` uses it);
47
+ `tunnel()` for single connections and SSH logins (`runtime sandboxes ssh` uses it);
46
48
  - `files` to read, write, list, glob, stat, move and remove, and to copy whole
47
49
  directories with `upload` and `download`;
48
50
  - `pause`, `wake`, `extend`, `fork` and `snapshot` (a paused sandbox also wakes
@@ -162,14 +164,14 @@ https://withruntime.com/docs/frameworks.
162
164
 
163
165
  ```bash no-run
164
166
  printf '%s\n' 'print(sum([125, 250, 375]))' > invoice.py
165
- npx withruntime sandbox run -- python3 - < invoice.py # connects on first use
166
- npx withruntime sandbox create
167
+ npx withruntime sandboxes run -- python3 - < invoice.py # connects on first use
168
+ npx withruntime sandboxes create
167
169
  npx withruntime help
168
170
  ```
169
171
 
170
172
  Installed with `npm i -g withruntime`, the command is `runtime`:
171
- `runtime sandbox exec <id> -- ls`, `runtime sandbox shell <id>`,
172
- `runtime image build --pip pandas`, and `--json` on every command.
173
+ `runtime sandboxes exec <id> -- ls`, `runtime sandboxes shell <id>`,
174
+ `runtime images build --pip pandas`, and `--json` on every command.
173
175
 
174
176
  ## MCP
175
177
 
package/VERCEL.md CHANGED
@@ -16,9 +16,11 @@ from withruntime.vercel import sandbox # was: from vercel import sandbox
16
16
  from withruntime.vercel.sandbox import sync as sandbox # was: from vercel.sandbox import sync as sandbox
17
17
  ```
18
18
 
19
- The mapping was written against `@vercel/sandbox` 3.5.1 and `vercel-sandbox`
20
- 0.7.0 on PyPI (the `vercel.sandbox` module of `vercel` 0.11.4), checked
21
- 30 September 2026.
19
+ The JavaScript mapping was checked against `@vercel/sandbox` 3.6.1 on
20
+ 8 October 2026. Python was checked against `vercel-sandbox` 0.9.0 on PyPI
21
+ (the `vercel.sandbox` module of `vercel` 0.11.6) on 7 October 2026.
22
+ 0.9.0 adds `get_drive`, which raises `NotSupportedError` like
23
+ the other Drive calls; `vercel` 0.11.6 only raises its `vercel-sandbox` floor.
22
24
 
23
25
  ## Keys
24
26
 
@@ -90,13 +92,13 @@ Each of these throws `NotSupportedError` before anything happens. Its
90
92
 
91
93
  | Vercel Sandbox | Use instead |
92
94
  | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
93
- | An `image` with no Runtime image of that name | Build it: `npx withruntime image build --dockerfile Dockerfile --name <image>`. |
95
+ | An `image` with no Runtime image of that name | Build it: `npx withruntime images build --dockerfile Dockerfile --name <image>`. |
94
96
  | Drives (`mounts`), `networkId` | Runtime volumes through `withruntime: { create: { volumes } }`; network rules. |
95
97
  | A region outside the US, `failoverRegions` | Runtime runs in one US region. |
96
98
  | Network rules that transform or forward requests | Allow the domain and store the credential as a Runtime secret for it: the sandbox sees a placeholder. |
97
99
  | A `timeout` earlier than the current lease's end | Stop the sandbox when you are done with it. |
98
100
  | Sessions (`currentSession`, `listSessions`) | A Runtime sandbox is its own session. |
99
- | `openInteractive` | `sandbox.withruntime.terminal(...)` or `npx withruntime sandbox shell <id>`. |
101
+ | `openInteractive` (Python: `open_interactive`) | `sandbox.withruntime.terminal(...)` or `npx withruntime sandboxes shell <id>`. |
100
102
  | `update` of tags, resources, persistence or region | Create a new sandbox with them. |
101
103
  | Overrides on `Sandbox.fork` | Fork, then change what Runtime can change. |
102
104
  | `delete({ deleteOrphanSnapshots: true })`, `Snapshot.tree` | Delete snapshots one by one; `Snapshot.list`. |
@@ -123,6 +125,42 @@ Some differences are not refusals:
123
125
  Vercel's `universal` has Python 3.14.
124
126
  - A git source is cloned into the working directory itself.
125
127
 
128
+ ## JavaScript qualification, 8 October 2026
129
+
130
+ Reviewed the exact published npm tarballs for `@vercel/sandbox` 3.5.1 → 3.6.1.
131
+ Both tarballs matched their registry SHA-512 integrities; the 3.6.1 value in
132
+ `compatibility-lock.json` came from `npm view @vercel/sandbox@3.6.1 dist.integrity`.
133
+ No downloaded package code was installed or executed.
134
+
135
+ The distribution diff changes 31 files, representing five TypeScript source
136
+ files in the source maps: `drive.ts`, `version.ts`, `api-client.ts`,
137
+ `base-client.ts` and `validators.ts`. CommonJS and ES-module source-map
138
+ contents match. The changes and their dispositions:
139
+
140
+ | Upstream change | Drop-in disposition |
141
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
142
+ | `Drive.get({ name, signal?, token?, teamId?, projectId?, fetch? })` retrieves an existing drive without creating one. Internally it sends GET to the encoded drive-name path with `projectId` in the query. | Already refused by the `Drive` export before credentials or requests, with `NotSupportedError` naming `runtime.volumes` and `withruntime: { create: { volumes } }`. |
143
+ | `drive.fork({ name, signal? })` creates a drive inheriting data, maximum size and region. Its POST uses the source drive name, `projectId` query and `{ name }` body. | All Drive construction and retrieval remain refused, so no unsupported Drive instance can reach this call. Use Runtime volumes; no Vercel Drive fork is claimed. |
144
+ | `drive.parentDriveId` and `drive.rootDriveId`, optional strings, expose ancestry. Drive response validation now retains those fields, including list/get/create/fork/update responses. | The same Drive refusal applies. No ancestry or Vercel drive metadata is fabricated. |
145
+ | Streaming `runCommand` disables retry of the command POST. After receiving its command id, a cut, early EOF or incomplete final JSON record recovers logs and then waits for the same command. | Mapped through native Runtime process ids and byte cursors: no command is restarted after its id arrives. Initial Runtime transport retries use the same idempotency key. Attached commands now throw `StreamError` with `output_truncated` when recovery reports missing bytes, as detached commands already do. |
146
+ | `Command.logs()` reconnects interrupted log bodies up to twice, waiting 200 ms then 400 ms, skipping previously delivered stdout/stderr characters separately. | Mapped through Runtime's byte cursor across both streams. Runtime follows stream slices and connection cuts; repeated empty streams stop after four reads, and continuous failures have a five-minute recovery budget. These are Runtime's recovery limits, not Vercel's retry timing. |
147
+ | `getCommand`, including waiting for completion, retries failures while reading the response body, up to twice. Parsing can consume the already-read body. | Native Runtime JSON reads already retry through the complete body, with the client's `maxRetries` (four by default). Completion comes from the native process output's exit event rather than Vercel's command-wait endpoint. |
148
+ | Stream parsing now preserves UTF-8 across chunks, classifies connection cuts and incomplete final JSON, closes readers and propagates cancellation or application errors without recovery. | Runtime already uses a persistent `TextDecoderStream`, closes its readers and resumes at the byte cursor after a cut or partial record. Permanent structured API errors and cancellation are not replayed. Runtime also retries parse failures as stream cuts; it does not expose Vercel's private `ConnectionError`. |
149
+ | Sandbox/snapshot declarations reorder existing status union members; the package and internal version advance. | No status values, package exports, dependencies or other caller signatures change. No adapter change needed. |
150
+
151
+ `tests/vercel-3-6.test.ts` exercises the real Runtime transport with controlled
152
+ HTTP responses: attached and detached recovery, stdout/stderr ordering, one-byte
153
+ UTF-8 chunks, incomplete JSON, no command replay, bounded empty-stream failure,
154
+ permanent errors, Drive lookup refusal and missing-output refusal. Before the
155
+ adapter change, both missing-output cases resolved successfully instead of
156
+ throwing. These tests do not prove live-host recovery, isolation, performance
157
+ superiority or full Vercel compatibility; the provider remains `partial`.
158
+
159
+ `tests/compat/reference.bun.lock` has no Vercel entry. The consumer declaration
160
+ check in `tests/compat/check-consumers.ts` reads the main compatibility lock and
161
+ requires the extracted upstream version to match it; neither needs a separate
162
+ Vercel version edit. The separate oracle was not run for this source review.
163
+
126
164
  ## Tests
127
165
 
128
166
  `bun run test` in `packages/cloud-sdk` runs the unit tests of both languages
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "checkedAt": "2026-09-29",
3
+ "checkedAt": "2026-10-11",
4
4
  "providers": [
5
5
  {
6
6
  "id": "e2b",
@@ -9,35 +9,35 @@
9
9
  {
10
10
  "registry": "npm",
11
11
  "name": "e2b",
12
- "version": "2.52.0",
12
+ "version": "2.55.0",
13
13
  "artifacts": {
14
- "2.52.0": "sha512-TmUZlAvQq8BbguodpA+BBdawR/x5uILMQtHcLkdaLUqevsDjDdh46IYYU8ZRYKsQ4OhWr4xhsFIPSg1kgf+O0w=="
14
+ "2.55.0": "sha512-viC7GLHMPqzilndlKgNXWN0ebMV8fpbI1IfDlPd+GHuNcJIcUCXKyr5HAxjcC5sDMym3rrbyUyUQ+zQVAU9oGA=="
15
15
  }
16
16
  },
17
17
  {
18
18
  "registry": "npm",
19
19
  "name": "@e2b/code-interpreter",
20
- "version": "2.8.0",
20
+ "version": "2.8.3",
21
21
  "artifacts": {
22
- "2.8.0": "sha512-tWFi8IJYV3V6jOVfQ8V5PkzockrYP+ndWB/jKiJvRATTmNAy8+S/7S+iSh2Lb2Hrul869G2adRiN2xW8peJTig=="
22
+ "2.8.3": "sha512-xrSwGtyEoYFZJTtOI8UzYzsNmi4SL/fsH4jxRjJYJDtIHYHLD+sFR6gxGYs5xRYLGxi56ptVMTayX/26ZzJlEA=="
23
23
  }
24
24
  },
25
25
  {
26
26
  "registry": "pypi",
27
27
  "name": "e2b",
28
- "version": "2.52.0",
28
+ "version": "2.55.1",
29
29
  "artifacts": {
30
- "e2b-2.52.0-py3-none-any.whl": "sha256-6f4b5084b09986db43e99c7405bae6b14dc56984a69bbb1dc0687f1c71515cfb",
31
- "e2b-2.52.0.tar.gz": "sha256-58c0042609513799341d4c1837e2581a4a5e73d3d62c9f1c57495c5e23eedee2"
30
+ "e2b-2.55.1-py3-none-any.whl": "sha256-30aec382a7cac5401e0aa0efb156422459f586101809c3e9f34a6fcf797097db",
31
+ "e2b-2.55.1.tar.gz": "sha256-5255f9a01dc484c343f750d13d3a9c857ef3511222a240572ddce2563dd301d9"
32
32
  }
33
33
  },
34
34
  {
35
35
  "registry": "pypi",
36
36
  "name": "e2b-code-interpreter",
37
- "version": "2.10.1",
37
+ "version": "2.10.5",
38
38
  "artifacts": {
39
- "e2b_code_interpreter-2.10.1-py3-none-any.whl": "sha256-f4c9732699ee4b1c289acedac8bff66fccecc6ab374bf0b4ef88d5ad063e333d",
40
- "e2b_code_interpreter-2.10.1.tar.gz": "sha256-94e504667788c6cbb175e5deaf1f68e8df474b670343fe1d72e2496b49d5a666"
39
+ "e2b_code_interpreter-2.10.5-py3-none-any.whl": "sha256-ac98cd29335ae4f035b70a4eb5f6ca89dc5728d48de79cfb7d90a08d57a652b5",
40
+ "e2b_code_interpreter-2.10.5.tar.gz": "sha256-ea478929289d0f9936e236cf9e36b914f4df7ef58ca2e5b1e851c1f3b13bf5ca"
41
41
  }
42
42
  }
43
43
  ]
@@ -49,42 +49,42 @@
49
49
  {
50
50
  "registry": "npm",
51
51
  "name": "@daytona/sdk",
52
- "version": "0.220.0",
52
+ "version": "0.223.1",
53
53
  "artifacts": {
54
- "0.220.0": "sha512-PJio3vbDwRApzlsK6AGO7r4CHJcF9PI5DWuUW2yUnA2MVJSh/jotS0onKBv6boC5F+oboljTibUMxrwVPIrOlQ=="
54
+ "0.223.1": "sha512-Ja6bacvUBuODjKcWGczZn6k9w+7veIces4k2tdizPUndj3pjgnHrphq/TbdIvJfKtz91yQ+S4mKoKaeuKQLc7g=="
55
55
  }
56
56
  },
57
57
  {
58
58
  "registry": "pypi",
59
59
  "name": "daytona",
60
- "version": "0.220.0",
60
+ "version": "0.223.1",
61
61
  "artifacts": {
62
- "daytona-0.220.0-py3-none-any.whl": "sha256-5f71299eaf3a446e6569ada69919fc49997c1b2c587845057394aab886f113c8",
63
- "daytona-0.220.0.tar.gz": "sha256-eda82eac9b3601e757b1dbe3ec2d966b46a9e3038b69ce44a0d90e01dac8417a"
62
+ "daytona-0.223.1-py3-none-any.whl": "sha256-768564fbbe45a91eb0ba6e5e0f36a743e17cc14b7a3a2108aae931ae820a15c1",
63
+ "daytona-0.223.1.tar.gz": "sha256-72a4a7a795f44aa678daad52d74bd69d11eeacd894f310895a313200ea8fec1f"
64
64
  }
65
65
  },
66
66
  {
67
67
  "registry": "npm",
68
68
  "name": "@daytona/api-client",
69
- "version": "0.220.0",
69
+ "version": "0.223.1",
70
70
  "artifacts": {
71
- "0.220.0": "sha512-XaMEtiQCaIHc3T7y3HUqx1A5eWSnd+FJvhpSHDwP3Snu9Nnhy4t+K2LHBWgJQn9dGtWXsdOsbB9K0BqpmFJtyA=="
71
+ "0.223.1": "sha512-p/NaCr3NbKUKPwqDBJBHHvToUMqh7QIyHT5rENzJYSrs9RCMfsifbtTpe0nHyOokfZhIceHWFcOtT2JwJYmSKQ=="
72
72
  }
73
73
  },
74
74
  {
75
75
  "registry": "npm",
76
76
  "name": "@daytona/toolbox-api-client",
77
- "version": "0.220.0",
77
+ "version": "0.223.1",
78
78
  "artifacts": {
79
- "0.220.0": "sha512-Kn94AOxhGQil0XygOOR26SaCkndE4dOtxYS0hLbqrTxcP3H1uq1HGFGSRkHFQNkaR8eL9QwFUPSMqd0Vr3A64A=="
79
+ "0.223.1": "sha512-Sl91T6kLIfilU5njZWGzU8KAeHtOfv6pw6iPO1JmX8UhjqfriOy6exPyCxSiBpmyZsQy0eL80IecdbTZPvnmcQ=="
80
80
  }
81
81
  },
82
82
  {
83
83
  "registry": "npm",
84
84
  "name": "@daytona/analytics-api-client",
85
- "version": "0.220.0",
85
+ "version": "0.223.1",
86
86
  "artifacts": {
87
- "0.220.0": "sha512-3BGYILzjo2aFTJhLd6XBXlNEQBSo9Zr2Nj31OdX9o50fMRVUwVydF6ekIGkPGSLwskz6b6xxg5BSS+f9dbrxCQ=="
87
+ "0.223.1": "sha512-LntjeNKKHpjzpCwgGbfYRvQ733b7SLfGpeM5ZTA12YK82YfvssGPDRkfo7xi88ndsbYteE+L9TpqYx3aH3WncA=="
88
88
  }
89
89
  }
90
90
  ]
@@ -96,27 +96,27 @@
96
96
  {
97
97
  "registry": "npm",
98
98
  "name": "@vercel/sandbox",
99
- "version": "3.5.1",
99
+ "version": "3.6.1",
100
100
  "artifacts": {
101
- "3.5.1": "sha512-VHItQtcv4FkSXET29b088p87MNPAIhRscF3ifrup2KkC8ix4hy4NpgCO9F3GI4yOsztgGtuV7bDx29Iufun2hQ=="
101
+ "3.6.1": "sha512-U6dwyadp2SmW/M96W2Bb3UjIql6TOOYwu9McUIwob209pj0A3ks/wKrMv7lCE7INx50J5zOpqLhMOnFa+Yodlg=="
102
102
  }
103
103
  },
104
104
  {
105
105
  "registry": "pypi",
106
106
  "name": "vercel",
107
- "version": "0.11.4",
107
+ "version": "0.11.6",
108
108
  "artifacts": {
109
- "vercel-0.11.4-py3-none-any.whl": "sha256-3ba3a0de2276a2b3daf590263082f6a82850dc77b35cf68f86a1e5bc9e83b6f1",
110
- "vercel-0.11.4.tar.gz": "sha256-80038906615bf4182787af8354bce71b57d9fd5471a35ebca457d34ab5f50b2e"
109
+ "vercel-0.11.6-py3-none-any.whl": "sha256-3dfad0bfc6a6ba380246acec7346ed89020247e16e4294d88f3d9a296d2d5f43",
110
+ "vercel-0.11.6.tar.gz": "sha256-af96132f898e0bc8421e5ae16a0d16fd973aaebaf3f0852d3ffef076af7a22ed"
111
111
  }
112
112
  },
113
113
  {
114
114
  "registry": "pypi",
115
115
  "name": "vercel-sandbox",
116
- "version": "0.7.0",
116
+ "version": "0.9.0",
117
117
  "artifacts": {
118
- "vercel_sandbox-0.7.0-py3-none-any.whl": "sha256-f7eb897a1a5092fe8c38319ce803033b1a9ced8f414564a43a668432f91ffcd9",
119
- "vercel_sandbox-0.7.0.tar.gz": "sha256-07d703790d0141dc75e0962baf35d666a6961bc1de913749137267a2550c81e2"
118
+ "vercel_sandbox-0.9.0-py3-none-any.whl": "sha256-eebc4ecd430ff3845f4f5a36c18d7ba80405f459533bb0d206caed9b2a3ed5ab",
119
+ "vercel_sandbox-0.9.0.tar.gz": "sha256-5b75e3aead43f9b9dea6c74d5fabdf5539b874c6d9e65cb6570ee0ac077848fb"
120
120
  }
121
121
  }
122
122
  ]
@@ -151,18 +151,18 @@
151
151
  {
152
152
  "registry": "npm",
153
153
  "name": "@runloop/api-client",
154
- "version": "1.32.0",
154
+ "version": "2.0.0",
155
155
  "artifacts": {
156
- "1.32.0": "sha512-aCNKjlGzLVEAFl8WA42LmgiYkdIkaocOlFK/cMGppijsM0AGS+1hkw/RxroQxyHlkIhjyRaqLv7m5ZNMGhks7Q=="
156
+ "2.0.0": "sha512-1npSvS5rVTUrNbtjGYoMXOb7r4OL7XhRJGPo1buu1iED5rxOXzU7+nDT0Spe+TFwDz9PL+X5frikTEYJ312PEA=="
157
157
  }
158
158
  },
159
159
  {
160
160
  "registry": "pypi",
161
161
  "name": "runloop-api-client",
162
- "version": "1.32.0",
162
+ "version": "2.0.0",
163
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"
164
+ "runloop_api_client-2.0.0-py3-none-any.whl": "sha256-85e22da5b7cc67dc6c4c126523800976794677ee42fa2c36ef9dd7be099f009a",
165
+ "runloop_api_client-2.0.0.tar.gz": "sha256-9ac246ac8003e87d616857e54965cc4b526d2fa4a815016583d74f3d2c59e390"
166
166
  }
167
167
  }
168
168
  ]
@@ -196,10 +196,10 @@
196
196
  {
197
197
  "registry": "pypi",
198
198
  "name": "sprites-py",
199
- "version": "0.7.1",
199
+ "version": "0.7.2",
200
200
  "artifacts": {
201
- "sprites_py-0.7.1-py3-none-any.whl": "sha256-23774f8111c9a4fbb7007f8e305677734eb7616bebb6c668c394788399ff38a8",
202
- "sprites_py-0.7.1.tar.gz": "sha256-c45596f3994376eb25dd7c4f988b3a6893dd8218502bacd7eedf2b20888d8456"
201
+ "sprites_py-0.7.2-py3-none-any.whl": "sha256-b9015928cf2cab8c99f31f7fa245b088f9f26f37ce047721bcdf9c63e1f2f502",
202
+ "sprites_py-0.7.2.tar.gz": "sha256-bebc5aec3c1a2a7a5090b8a1efd4b0cb2ed2c10baf72c8b85ea050d59c054c8c"
203
203
  }
204
204
  }
205
205
  ]
@@ -211,9 +211,9 @@
211
211
  {
212
212
  "registry": "npm",
213
213
  "name": "freestyle",
214
- "version": "0.2.16",
214
+ "version": "0.2.17",
215
215
  "artifacts": {
216
- "0.2.16": "sha512-8pC7lh/R2PDanbs9Noc1Q7YlPl8Be8hHaQA/rpwFmELrcLTUAuCuxpoZ1Xm+7fuxqhJqJzO83bTTeLcSUoJ9SA=="
216
+ "0.2.17": "sha512-SQRRJAP+y56/nIDwmqJG5Y5IqqKYAmABqv/gjyzANy0wUe3cqnV1iD14nU9lQAYWtQ5UCl+lnE38nXZFKO0J9Q=="
217
217
  }
218
218
  }
219
219
  ]
@@ -231,31 +231,40 @@
231
231
  "prime_sandboxes-0.4.1.tar.gz": "sha256-53f7577dc9070e3b8e30db360f9e3cce3bcc35f8765b26f24f64dbc3c7763b06"
232
232
  },
233
233
  "latestReview": {
234
- "version": "0.4.2",
234
+ "version": "0.4.3",
235
235
  "artifacts": {
236
- "prime_sandboxes-0.4.2-py3-none-any.whl": "sha256-ed59f001c7575339d6c903166c5468f783eda0997586ec6476fd8b35f65746f9",
237
- "prime_sandboxes-0.4.2.tar.gz": "sha256-4990a724cac0a662fde6e12e7eccfee092a78679cc568653b8ef52008dfa28e4"
236
+ "prime_sandboxes-0.4.3-py3-none-any.whl": "sha256-dd26007838c25b5d38a8b7af0514c07027b783406c0ea5b9fcf0eb74a45139bd",
237
+ "prime_sandboxes-0.4.3.tar.gz": "sha256-a2169182f74307485c73f897e224c978eba3276133ddb40715be4d346594c487"
238
238
  },
239
- "reviewedAt": "2026-10-02",
239
+ "reviewedAt": "2026-10-08",
240
240
  "disposition": "held-for-sdk-qualification",
241
241
  "evidence": {
242
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",
243
+ "https://pypi.org/pypi/prime-sandboxes/0.4.3/json",
244
+ "https://files.pythonhosted.org/packages/d8/1b/01e02c9d2346956f5ed77d269f836905a017ad796a4b4c719debd8942dc4/prime_sandboxes-0.4.3.tar.gz",
245
+ "https://files.pythonhosted.org/packages/e1/5f/d0b5cd1dabdb6e5cb1ab5d84c8ba9a96e2a9a0be8913ec9db9177c9645fb/prime_sandboxes-0.4.3-py3-none-any.whl",
246
246
  "https://github.com/PrimeIntellect-ai/prime/tree/main/packages/prime-sandboxes"
247
247
  ],
248
248
  "artifactSha256": {
249
- "prime_sandboxes-0.4.2-py3-none-any.whl": "ed59f001c7575339d6c903166c5468f783eda0997586ec6476fd8b35f65746f9",
250
- "prime_sandboxes-0.4.2.tar.gz": "4990a724cac0a662fde6e12e7eccfee092a78679cc568653b8ef52008dfa28e4"
249
+ "prime_sandboxes-0.4.3-py3-none-any.whl": "dd26007838c25b5d38a8b7af0514c07027b783406c0ea5b9fcf0eb74a45139bd",
250
+ "prime_sandboxes-0.4.3.tar.gz": "a2169182f74307485c73f897e224c978eba3276133ddb40715be4d346594c487"
251
251
  },
252
252
  "changes": [
253
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
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
255
  "CreateSandboxRequest.docker_image becomes Optional (None when restoring from a checkpoint) and disk_size_gb's default 5.0 becomes None.",
256
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
+ "Source diff of the 0.4.2 and 0.4.3 sdists, downloaded and hashed on the Mac, nothing installed or run; the wheel's package source matched the sdist's: __init__, core/client.py, models.py, sandbox.py and tests/test_checkpoints.py changed.",
258
+ "Adds checkpoint deletion: delete_checkpoint (DELETE /sandbox/checkpoints/{id}, 409 while pending or the active tip) and delete_sandbox_checkpoints (DELETE /sandbox/{id}/checkpoints) on the sync and async clients, with DeleteSandboxCheckpointsResponse and CheckpointDeleteError (NOT_FOUND or CONFLICT) models exported.",
259
+ "The core client returns {} for an HTTP 204 instead of parsing an empty body.",
257
260
  "No existing method was removed or renamed. Installed consumer qualification against withruntime/prime is not run; the supported pin stays 0.4.1."
258
261
  ]
262
+ },
263
+ "between": {
264
+ "0.4.2": {
265
+ "prime_sandboxes-0.4.2-py3-none-any.whl": "sha256-ed59f001c7575339d6c903166c5468f783eda0997586ec6476fd8b35f65746f9",
266
+ "prime_sandboxes-0.4.2.tar.gz": "sha256-4990a724cac0a662fde6e12e7eccfee092a78679cc568653b8ef52008dfa28e4"
267
+ }
259
268
  }
260
269
  }
261
270
  }
@@ -9,7 +9,7 @@ type Args = {
9
9
  positional: string[];
10
10
  flags: Map<string, string[]>;
11
11
  };
12
- export declare const BILLING_HELP = "runtime billing <command>\n\n topup <usd> [--wait] Buy credit with stablecoins (USDC on Base, Solana or Tempo).\n Prints an address per network and the exact amount to send.\n Send exactly that, from any wallet, before the time shown.\n --wait keeps checking until the credit lands.\n status <id> [--wait] Whether a top-up's payment has arrived\n\n No account yet? An agent can open one with a wallet alone:\n topup <usd> --new-account --accept-terms [--wait]\n Opens an account and its first top-up. Prints a claim code,\n shown once. --wait saves the key here once the money lands.\n claim <code> [--wait] Exchange a paid account's claim code for its key, saved here\n\n $10 to $10,000 a top-up; $500 in an account's first week. By card:\n https://withruntime.com/account/billing\n";
12
+ export declare const BILLING_HELP = "runtime billing <command>\n\n topup <usd> [--wait] Buy credit with stablecoins (USDC on Base, Solana or Tempo).\n Prints an address per network and the exact amount to send.\n Send exactly that, from any wallet, before the time shown.\n --wait keeps checking until the credit lands.\n status <id> [--wait] Whether a top-up's payment has arrived\n\n auto-top-up Show auto top-up: the card is charged when credit runs low\n auto-top-up on [--below <usd>] [--amount <usd>] [--monthly <usd>]\n Charge <amount> plus tax when credit falls below <below>,\n at most <monthly> a month: $10, $20 and $500 unless given,\n or as last set. At least $10, $20 and $100. 5% more as\n credit each time, and 200 sandboxes at once while on.\n A person saves the card at\n https://withruntime.com/account/billing\n auto-top-up off Turn it off. Running sandboxes are never stopped.\n\n No account yet? An agent can open one with a wallet alone:\n topup <usd> --new-account --accept-terms [--wait]\n Opens an account and its first top-up. Prints a claim code,\n shown once. --wait saves the key here once the money lands.\n claim <code> [--wait] Exchange a paid account's claim code for its key, saved here\n\n $10 to $10,000 a top-up; $500 in an account's first week. By card:\n https://withruntime.com/account/billing\n";
13
13
  /** Wallet-account commands need no key, and the claim saves the one they get. */
14
14
  export type WalletDeps = {
15
15
  open: typeof openWalletAccount;
@@ -8,6 +8,16 @@ export const BILLING_HELP = `runtime billing <command>
8
8
  --wait keeps checking until the credit lands.
9
9
  status <id> [--wait] Whether a top-up's payment has arrived
10
10
 
11
+ auto-top-up Show auto top-up: the card is charged when credit runs low
12
+ auto-top-up on [--below <usd>] [--amount <usd>] [--monthly <usd>]
13
+ Charge <amount> plus tax when credit falls below <below>,
14
+ at most <monthly> a month: $10, $20 and $500 unless given,
15
+ or as last set. At least $10, $20 and $100. 5% more as
16
+ credit each time, and 200 sandboxes at once while on.
17
+ A person saves the card at
18
+ https://withruntime.com/account/billing
19
+ auto-top-up off Turn it off. Running sandboxes are never stopped.
20
+
11
21
  No account yet? An agent can open one with a wallet alone:
12
22
  topup <usd> --new-account --accept-terms [--wait]
13
23
  Opens an account and its first top-up. Prints a claim code,
@@ -43,7 +53,7 @@ function describe(topup) {
43
53
  lines.push("", ...(topup.payBy ? [`Send before ${topup.payBy}.`] : []), "A different amount, token or network cannot be matched or returned automatically.", `The credit lands a few minutes after the transfer: \`${me} billing status ${topup.purchaseId}\`.`);
44
54
  return lines.join("\n");
45
55
  }
46
- const FLAGS = new Set(["wait", "new-account", "accept-terms"]);
56
+ const FLAGS = new Set(["wait", "new-account", "accept-terms", "below", "amount", "monthly"]);
47
57
  export async function billingCommand(argv, args, out, client, sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)), wallet) {
48
58
  const [verb, value] = args.positional;
49
59
  const has = (name) => args.flags.get(name)?.at(-1) === "true";
@@ -60,6 +70,11 @@ export async function billingCommand(argv, args, out, client, sleep = (ms) => ne
60
70
  throw usage("Wallet accounts are not available here.");
61
71
  return walletCommand(verb, value, has("accept-terms"), wait, out, sleep, wallet);
62
72
  }
73
+ if (verb === "auto-top-up")
74
+ return autoTopUpCommand(value, args, out, client);
75
+ for (const name of ["below", "amount", "monthly"])
76
+ if (args.flags.has(name))
77
+ throw usage(`--${name} is for \`billing auto-top-up on\`.`);
63
78
  const api = (await client()).billing;
64
79
  let topup;
65
80
  if (verb === "topup") {
@@ -95,6 +110,67 @@ export async function billingCommand(argv, args, out, client, sleep = (ms) => ne
95
110
  }
96
111
  return topup.status === "paid" ? 0 : 1;
97
112
  }
113
+ const OFF_REASONS = {
114
+ declined: "the bank declined the last charge",
115
+ authentication_required: "the bank asked its holder to confirm the last charge",
116
+ card_removed: "the card was removed",
117
+ no_address: "Stripe had no billing address to work out tax",
118
+ blocked: "a payment on this account is under review",
119
+ failed: "the last charge did not go through",
120
+ };
121
+ function describeAuto(auto) {
122
+ const figures = auto.below !== null && auto.amount !== null && auto.monthlyLimit !== null
123
+ ? `adds $${auto.amount} when credit falls below $${auto.below}, up to $${auto.monthlyLimit} a month`
124
+ : null;
125
+ const lines = [
126
+ auto.enabled
127
+ ? `Auto top-up is on: it ${figures}. $${auto.thisMonth} added this month.`
128
+ : auto.waitingForCard
129
+ ? `Auto top-up turns on once a card is saved: it will ${figures}.`
130
+ : auto.offReason
131
+ ? `Auto top-up is off: ${OFF_REASONS[auto.offReason]}.`
132
+ : "Auto top-up is off.",
133
+ ];
134
+ if (auto.saveCardAt)
135
+ lines.push(`A person saves the card at ${auto.saveCardAt}`);
136
+ return lines.join("\n");
137
+ }
138
+ /** `billing auto-top-up [on|off]`. */
139
+ async function autoTopUpCommand(verb, args, out, client) {
140
+ const flag = (name) => args.flags.get(name)?.at(-1);
141
+ const api = (await client()).billing.autoTopUp;
142
+ const options = { idempotencyKey: crypto.randomUUID() };
143
+ let auto;
144
+ if (!verb || verb === "show")
145
+ auto = await api.get();
146
+ else if (verb === "off")
147
+ auto = await api.off(options);
148
+ else if (verb === "on") {
149
+ // A figure not given keeps the one saved, or takes its default.
150
+ const figure = (name) => {
151
+ const value = flag(name);
152
+ if (value === undefined)
153
+ return undefined;
154
+ const usd = Number(value.replace(/^\$/, ""));
155
+ if (!value || !Number.isFinite(usd) || usd <= 0)
156
+ throw usage(`Give --${name} in dollars, such as --${name} 20.`);
157
+ return usd;
158
+ };
159
+ const below = figure("below");
160
+ const amount = figure("amount");
161
+ const monthlyLimit = figure("monthly");
162
+ auto = await api.set({
163
+ enabled: true,
164
+ ...(below === undefined ? {} : { below }),
165
+ ...(amount === undefined ? {} : { amount }),
166
+ ...(monthlyLimit === undefined ? {} : { monthlyLimit }),
167
+ }, options);
168
+ }
169
+ else
170
+ throw usage(`Unknown auto-top-up command ${verb}: show, on or off.`);
171
+ out.write(out.json ? JSON.stringify(auto) : describeAuto(auto));
172
+ return 0;
173
+ }
98
174
  function dollarsOf(value) {
99
175
  const usd = Number(value?.replace(/^\$/, ""));
100
176
  if (!value || !Number.isFinite(usd) || usd <= 0)
@@ -35,6 +35,20 @@ export declare class NotSupportedError extends Error {
35
35
  readonly alternative: string;
36
36
  constructor(feature: string, alternative: string, message?: string);
37
37
  }
38
+ /** Thrown by SandboxInstance.create / createIfNotExists when the sandbox was
39
+ * not running within the `timeout` asked for. The sandbox is deleted first,
40
+ * so its name is free and the creation can simply be started over, as on
41
+ * Blaxel. */
42
+ export declare class SandboxCreationTimeoutError extends Error {
43
+ readonly sandboxName: string | undefined;
44
+ readonly timeout: number | undefined;
45
+ readonly code = "CREATION_TIMEOUT";
46
+ readonly status = 408;
47
+ readonly data: unknown;
48
+ constructor(sandboxName: string | undefined, timeout: number | undefined, data: unknown);
49
+ }
50
+ /** True when `err` is a sandbox creation timeout (408 CREATION_TIMEOUT). */
51
+ export declare function isCreationTimeoutError(err: unknown): err is SandboxCreationTimeoutError;
38
52
  /** A ResponseError of this status and message, made here rather than by
39
53
  * Runtime: a process or preview that is not there, a wait that ran out. */
40
54
  export declare function responseError(status: number, message: string): ResponseError;
@@ -72,6 +72,35 @@ export class NotSupportedError extends Error {
72
72
  this.alternative = alternative;
73
73
  }
74
74
  }
75
+ /** Thrown by SandboxInstance.create / createIfNotExists when the sandbox was
76
+ * not running within the `timeout` asked for. The sandbox is deleted first,
77
+ * so its name is free and the creation can simply be started over, as on
78
+ * Blaxel. */
79
+ export class SandboxCreationTimeoutError extends Error {
80
+ sandboxName;
81
+ timeout;
82
+ code = "CREATION_TIMEOUT";
83
+ status = 408;
84
+ data;
85
+ constructor(sandboxName, timeout, data) {
86
+ const detail = typeof data === "object" &&
87
+ data !== null &&
88
+ typeof data.message === "string"
89
+ ? data.message
90
+ : undefined;
91
+ const target = sandboxName ? `Sandbox ${sandboxName}` : "Sandbox";
92
+ const deadline = timeout !== undefined ? ` within ${timeout}s` : " within the creation deadline";
93
+ super(`${target} was not ready${deadline}; the creation was cancelled.${detail ? ` ${detail}` : ""}`);
94
+ this.name = "SandboxCreationTimeoutError";
95
+ this.sandboxName = sandboxName;
96
+ this.timeout = timeout;
97
+ this.data = data;
98
+ }
99
+ }
100
+ /** True when `err` is a sandbox creation timeout (408 CREATION_TIMEOUT). */
101
+ export function isCreationTimeoutError(err) {
102
+ return err instanceof SandboxCreationTimeoutError;
103
+ }
75
104
  /** A ResponseError of this status and message, made here rather than by
76
105
  * Runtime: a process or preview that is not there, a wait that ran out. */
77
106
  export function responseError(status, message) {
@@ -94,15 +123,15 @@ const BLAXEL_HINTS = {
94
123
  cwd_not_found: "Make the directory with sandbox.fs.mkdir(path), or pass an existing workingDir to sandbox.process.exec.",
95
124
  sandbox_paused: "Call sandbox.unarchive(), then try again.",
96
125
  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
- trial_busy: "The trial's sandboxes are all in use: delete one you no longer need (sandbox.delete()) or archive it (sandbox.archive()), then try again. Moving to paid credit is the account owner's decision.",
98
- public_preview_not_allowed: "On the trial, share the port privately: sandbox.previews.create({ metadata: { name }, spec: { port, public: false } }) and a token from preview.tokens.create(expiresAt) on a server supporting absolute preview deadlines. A public preview needs a paid sandbox, which is the account owner's decision.",
126
+ 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.",
127
+ 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
128
  busy: AGAIN,
100
129
  guest_busy: AGAIN,
101
130
  rate_limited: AGAIN,
102
131
  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
132
  };
104
133
  /** A trial create over the trial's size, in Blaxel's field. */
105
- const TRIAL_CAP = "A trial sandbox has at most 4096 MB of memory (2 vCPUs); pass memory 4096 or add credit.";
134
+ const TRIAL_CAP = "Without credit, a sandbox has at most 4096 MB of memory (2 vCPUs); pass memory 4096 or add credit.";
106
135
  /** A Runtime SDK error as Blaxel's: ResponseError (SandboxGatewayError for a
107
136
  * 502, 503 or 504), NotSupportedError for a product Runtime has switched off,
108
137
  * CredentialsError when there is no Runtime key. Anything else passes through
@@ -118,7 +147,7 @@ export function translate(error) {
118
147
  return new NotSupportedError(error.code.replace(/_unavailable$/, ""), error.hint ?? "", error.message);
119
148
  if (error.status < 200 || error.status > 599)
120
149
  return error;
121
- const trialCap = error.code === "invalid_trial";
150
+ const trialCap = error.code === "no_credit_size_limit";
122
151
  const hint = trialCap ? undefined : (BLAXEL_HINTS[error.code] ?? error.hint);
123
152
  const message = [
124
153
  trialCap ? TRIAL_CAP : error.message,