@sandboxrouter/sdk 0.17.0 → 0.19.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.
@@ -0,0 +1,15 @@
1
+ import { type Provider, type ProviderSandbox, type SandboxSpec } from "../types.js";
2
+ export declare class RunCloudProvider implements Provider {
3
+ private apiKey;
4
+ private baseUrl;
5
+ readonly id: "runcloud";
6
+ constructor(apiKey?: string | undefined, baseUrl?: string);
7
+ configured(): boolean;
8
+ /** @internal */
9
+ api<T>(method: string, path: string, json?: unknown, timeoutMs?: number): Promise<{
10
+ status: number;
11
+ body: T;
12
+ }>;
13
+ create(spec: SandboxSpec): Promise<ProviderSandbox>;
14
+ connect(nativeId: string): Promise<ProviderSandbox>;
15
+ }
@@ -0,0 +1,238 @@
1
+ import { ProviderError } from "../types.js";
2
+ import { DEFAULT_EXEC_TIMEOUT_S, killedByTimeout, timeoutError, toBytes } from "../util.js";
3
+ /**
4
+ * Run Cloud Linux sandboxes over plain REST. Firecracker microVMs, billed per second on the reserved
5
+ * CPU and memory; CPU and memory used above the reservation bill at the same rates.
6
+ *
7
+ * https://api.run.cloud, Authorization: Bearer <RUN_CLOUD_API_KEY>:
8
+ * POST /run-cloud/sandboxes {image, cpu, cpuLimit, memory, timeoutSeconds, onTimeout, tags, wait:false}
9
+ * -> {id, state, last_error, ...} cpu is the vCPU reservation, cpuLimit
10
+ * the vCPUs it may burst to, memory MiB
11
+ * GET /run-cloud/sandboxes/:id -> {id, state, last_error, ...}
12
+ * POST /run-cloud/sandboxes/:id/exec {cmd:[argv], cwd, env, timeout_seconds}
13
+ * -> {exit_code, stdout, stderr}; a command past its timeout has its
14
+ * whole process group killed (exit_code -1)
15
+ * POST /run-cloud/sandboxes/:id/fs {op:"read", path, offset, length}
16
+ * -> {content (base64), eof, next_offset, size} or {error}
17
+ * POST /run-cloud/sandboxes/:id/fs {op:"write", path, offset, content (base64), truncate}
18
+ * -> {next_offset} or {error}; parent directories are created
19
+ * POST /run-cloud/sandboxes/:id/pause, POST /run-cloud/sandboxes/:id/resume {wait:false}
20
+ * (202 while the sandbox moves to a host with room; repeat until running)
21
+ * POST /run-cloud/sandboxes/:id/tunnels {port} -> {url, expiresAt, ...}
22
+ * DELETE /run-cloud/sandboxes/:id
23
+ * States: pending, starting, building_image (first start from a new image), running, paused, stopped,
24
+ * archived, interrupted, destroying, destroyed. The API boots in the background and ends a boot that has
25
+ * not finished after 10 minutes. Live output streams only over a WebSocket (/exec/stream), which needs an
26
+ * Authorization header that Node's built-in WebSocket cannot send, so this adapter uses the buffered /exec.
27
+ * Docs: https://docs.run.cloud/sandboxes, https://docs.run.cloud/sandboxes/run-sandbox
28
+ */
29
+ const ID = "runcloud";
30
+ const DEFAULT_IMAGE = "runcloud/agent-base";
31
+ const START_TIMEOUT_MS = 10 * 60_000;
32
+ const POLL_MS = 500;
33
+ /** The guest's own file chunk size. */
34
+ const FILE_CHUNK = 512 * 1024;
35
+ const STARTING = new Set(["pending", "starting", "building_image"]);
36
+ const RESUMABLE = new Set(["paused", "stopped", "archived"]);
37
+ const GONE = new Set(["destroying", "destroyed"]);
38
+ export class RunCloudProvider {
39
+ apiKey;
40
+ baseUrl;
41
+ id = ID;
42
+ constructor(apiKey = process.env.RUN_CLOUD_API_KEY, baseUrl = (process.env.RUN_CLOUD_API_URL ?? "https://api.run.cloud").replace(/\/+$/, "")) {
43
+ this.apiKey = apiKey;
44
+ this.baseUrl = baseUrl;
45
+ }
46
+ configured() {
47
+ return !!this.apiKey;
48
+ }
49
+ /** @internal */
50
+ async api(method, path, json, timeoutMs = 60_000) {
51
+ if (!this.apiKey)
52
+ throw new ProviderError(ID, "RUN_CLOUD_API_KEY is not set");
53
+ const res = await fetch(`${this.baseUrl}${path}`, {
54
+ method,
55
+ headers: { Authorization: `Bearer ${this.apiKey}`, ...(json !== undefined ? { "Content-Type": "application/json" } : {}) },
56
+ body: json !== undefined ? JSON.stringify(json) : undefined,
57
+ signal: AbortSignal.timeout(timeoutMs),
58
+ });
59
+ const text = await res.text();
60
+ if (!res.ok) {
61
+ let detail = text.slice(0, 300);
62
+ try {
63
+ const j = JSON.parse(text);
64
+ const msg = j?.detail ?? j?.message ?? j?.error;
65
+ if (typeof msg === "string")
66
+ detail = j?.code ? `${j.code}: ${msg}` : msg;
67
+ }
68
+ catch {
69
+ /* plain-text body */
70
+ }
71
+ throw new ProviderError(ID, `${method} ${path.split("?")[0]} -> ${res.status} ${detail}`, res.status);
72
+ }
73
+ return { status: res.status, body: (text ? JSON.parse(text) : {}) };
74
+ }
75
+ async create(spec) {
76
+ // Run Cloud bills the larger of the reserved CPU and the CPU used, and `cpuLimit` lets a sandbox burst
77
+ // above its reservation to the full size. With cpuUtilization below 1, only that share is reserved
78
+ // (at least 1/8 vCPU, the platform default), so CPU is billed about as used.
79
+ const vcpu = spec.vcpu ?? 2;
80
+ const share = Math.min(1, spec.cpuUtilization ?? 1);
81
+ const reserved = share < 1 ? Math.min(vcpu, Math.max(0.125, Math.round(vcpu * share * 1000) / 1000)) : vcpu;
82
+ const { body } = await this.api("POST", "/run-cloud/sandboxes", {
83
+ image: spec.image?.runcloud ?? DEFAULT_IMAGE,
84
+ cpu: reserved,
85
+ ...(reserved < vcpu ? { cpuLimit: vcpu } : {}),
86
+ memory: Math.round((spec.memoryGb ?? 4) * 1024),
87
+ // A hard lifetime: destroy at the end instead of parking a resumable snapshot.
88
+ timeoutSeconds: Math.max(60, Math.round((spec.timeoutMinutes ?? 30) * 60)),
89
+ onTimeout: "destroy",
90
+ ...(spec.metadata && Object.keys(spec.metadata).length ? { tags: spec.metadata } : {}),
91
+ wait: false,
92
+ });
93
+ if (!body.id)
94
+ throw new ProviderError(ID, "create returned no sandbox id");
95
+ const box = new RunCloudBox(this, body.id, spec.env ?? {});
96
+ try {
97
+ await box.waitRunning(false);
98
+ }
99
+ catch (err) {
100
+ await box.kill().catch(() => { });
101
+ throw err;
102
+ }
103
+ return box;
104
+ }
105
+ async connect(nativeId) {
106
+ const box = new RunCloudBox(this, nativeId, {});
107
+ await box.waitRunning(true);
108
+ return box;
109
+ }
110
+ }
111
+ class RunCloudBox {
112
+ p;
113
+ nativeId;
114
+ env;
115
+ tunnels = new Map();
116
+ constructor(p, nativeId, env) {
117
+ this.p = p;
118
+ this.nativeId = nativeId;
119
+ this.env = env;
120
+ }
121
+ get path() {
122
+ return `/run-cloud/sandboxes/${encodeURIComponent(this.nativeId)}`;
123
+ }
124
+ /** Poll until the sandbox runs; with `resume`, wake a paused or stopped one on the way. */
125
+ async waitRunning(resume) {
126
+ const deadline = Date.now() + START_TIMEOUT_MS;
127
+ for (;;) {
128
+ const { body: s } = await this.p.api("GET", this.path);
129
+ const state = s.state ?? "";
130
+ if (state === "running")
131
+ return;
132
+ if (GONE.has(state))
133
+ throw new ProviderError(ID, `sandbox ${this.nativeId} is ${state}`, 404);
134
+ if (resume && RESUMABLE.has(state)) {
135
+ await this.p.api("POST", `${this.path}/resume`, { wait: false });
136
+ }
137
+ else if (!STARTING.has(state)) {
138
+ const why = s.last_error ?? "";
139
+ // No room on the fleet: a capacity error, so the router tries the next provider.
140
+ const status = /no host with capacity/i.test(why) ? 409 : 502;
141
+ throw new ProviderError(ID, `sandbox ${this.nativeId} is ${state || "in an unknown state"}${why ? `: ${why}` : ""}`, status);
142
+ }
143
+ if (Date.now() > deadline)
144
+ throw new ProviderError(ID, `sandbox ${this.nativeId} not running after ${START_TIMEOUT_MS / 1000}s (${state})`, 504);
145
+ await sleep(POLL_MS);
146
+ }
147
+ }
148
+ async exec(cmd, opts = {}) {
149
+ const secs = opts.timeoutSeconds ?? DEFAULT_EXEC_TIMEOUT_S;
150
+ const env = { ...this.env, ...opts.env };
151
+ const t0 = Date.now();
152
+ let r;
153
+ try {
154
+ ({ body: r } = await this.p.api("POST", `${this.path}/exec`, {
155
+ cmd: ["/bin/sh", "-c", cmd],
156
+ ...(opts.cwd ? { cwd: opts.cwd } : {}),
157
+ ...(Object.keys(env).length ? { env } : {}),
158
+ timeout_seconds: secs,
159
+ },
160
+ // The guest kills the command at `secs`; this only bounds a request that never answers.
161
+ secs * 1000 + 30_000));
162
+ }
163
+ catch (err) {
164
+ if (err?.name === "TimeoutError")
165
+ throw timeoutError(ID, secs);
166
+ throw err;
167
+ }
168
+ const durationMs = Date.now() - t0;
169
+ if (typeof r.exit_code !== "number")
170
+ throw new ProviderError(ID, "exec returned no exit code");
171
+ if (killedByTimeout(r.exit_code, durationMs, secs))
172
+ throw timeoutError(ID, secs);
173
+ const stdout = r.stdout ?? "";
174
+ const stderr = r.stderr ?? "";
175
+ if (stdout)
176
+ opts.onStdout?.(stdout);
177
+ if (stderr)
178
+ opts.onStderr?.(stderr);
179
+ return { exitCode: r.exit_code, stdout, stderr, durationMs };
180
+ }
181
+ async fs(req) {
182
+ const { body } = await this.p.api("POST", `${this.path}/fs`, req, 120_000);
183
+ if (body.error) {
184
+ const missing = /no such file|not found|ENOENT/i.test(body.error);
185
+ throw new ProviderError(ID, `${req.op} ${req.path}: ${body.error}`, missing ? 404 : undefined);
186
+ }
187
+ return body;
188
+ }
189
+ async writeFile(path, content) {
190
+ const bytes = toBytes(content);
191
+ for (let offset = 0; offset === 0 || offset < bytes.byteLength; offset += FILE_CHUNK) {
192
+ const chunk = bytes.subarray(offset, offset + FILE_CHUNK);
193
+ const r = await this.fs({ op: "write", path, offset, content: Buffer.from(chunk).toString("base64"), truncate: offset === 0 });
194
+ if (chunk.byteLength > 0 && r.next_offset !== offset + chunk.byteLength) {
195
+ throw new ProviderError(ID, `write ${path}: chunk at ${offset} was not acknowledged`);
196
+ }
197
+ }
198
+ }
199
+ async readFile(path) {
200
+ const parts = [];
201
+ for (let offset = 0;;) {
202
+ const r = await this.fs({ op: "read", path, offset, length: FILE_CHUNK });
203
+ const chunk = Buffer.from(r.content ?? "", "base64");
204
+ parts.push(chunk);
205
+ offset += chunk.byteLength;
206
+ if (r.eof || chunk.byteLength === 0 || (r.size !== undefined && offset >= r.size))
207
+ break;
208
+ }
209
+ return new Uint8Array(Buffer.concat(parts));
210
+ }
211
+ /** A public tunnel to the port. Tunnels expire, so a new one is opened once the last is near its end. */
212
+ async url(port) {
213
+ const cached = this.tunnels.get(port);
214
+ if (cached && cached.expiresAt - Date.now() > 60_000)
215
+ return cached.url;
216
+ const { body } = await this.p.api("POST", `${this.path}/tunnels`, { port });
217
+ if (!body.url)
218
+ throw new ProviderError(ID, `tunnel for port ${port} returned no url`);
219
+ const expiresAt = body.expiresAt ? Date.parse(body.expiresAt) : NaN;
220
+ this.tunnels.set(port, { url: body.url, expiresAt: Number.isNaN(expiresAt) ? 0 : expiresAt });
221
+ return body.url;
222
+ }
223
+ async pause() {
224
+ await this.p.api("POST", `${this.path}/pause`, {});
225
+ }
226
+ async kill() {
227
+ try {
228
+ await this.p.api("DELETE", this.path);
229
+ }
230
+ catch (err) {
231
+ if (err.status !== 404)
232
+ throw err;
233
+ }
234
+ }
235
+ }
236
+ function sleep(ms) {
237
+ return new Promise((r) => setTimeout(r, ms));
238
+ }
package/dist/published.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export const PUBLISHED = {
2
2
  "schema": 1,
3
- "dataThrough": "2026-11-18T22:34:03.877Z",
3
+ "dataThrough": "2026-11-28T18:53:43.434Z",
4
4
  "conditionalStartFees": {
5
5
  "boat": {
6
6
  "minUsd": 0.03,
@@ -44,12 +44,12 @@ export const PUBLISHED = {
44
44
  "name": "Novita AI Agent Sandbox",
45
45
  "size": {
46
46
  "vcpu": 2,
47
- "memoryGb": 4
47
+ "memoryGb": 1
48
48
  },
49
49
  "medianCreateMs": 298,
50
50
  "successRate": 1,
51
51
  "runs": 100,
52
- "hourlyUsd": 0.11664,
52
+ "hourlyUsd": 0.08208,
53
53
  "measuredAt": "2026-11-17T16:19:15.367Z"
54
54
  },
55
55
  "sprites": {
@@ -150,6 +150,19 @@ export const PUBLISHED = {
150
150
  "hourlyUsd": 0.2168,
151
151
  "measuredAt": "2026-11-17T16:19:15.367Z"
152
152
  },
153
+ "morph": {
154
+ "name": "Morph Cloud",
155
+ "size": {
156
+ "vcpu": 2,
157
+ "memoryGb": 4
158
+ },
159
+ "medianCreateMs": 966,
160
+ "medianReadyMs": 1502,
161
+ "successRate": 1,
162
+ "runs": 5,
163
+ "hourlyUsd": 0.1,
164
+ "measuredAt": "2026-11-28T15:05:23.053Z"
165
+ },
153
166
  "maritime": {
154
167
  "name": "Maritime",
155
168
  "size": {
@@ -175,19 +188,6 @@ export const PUBLISHED = {
175
188
  "hourlyUsd": 0.1656,
176
189
  "measuredAt": "2026-11-18T22:34:03.877Z"
177
190
  },
178
- "morph": {
179
- "name": "Morph Cloud",
180
- "size": {
181
- "vcpu": 2,
182
- "memoryGb": 4
183
- },
184
- "medianCreateMs": 1236,
185
- "medianReadyMs": 1967,
186
- "successRate": 1,
187
- "runs": 3,
188
- "hourlyUsd": 0.1,
189
- "measuredAt": "2026-11-18T17:57:59.751Z"
190
- },
191
191
  "boat": {
192
192
  "name": "Boat",
193
193
  "size": {
@@ -264,15 +264,15 @@ export const PUBLISHED = {
264
264
  "northflank": {
265
265
  "name": "Northflank",
266
266
  "size": {
267
- "vcpu": 0.2,
268
- "memoryGb": 0.5
267
+ "vcpu": 2,
268
+ "memoryGb": 4
269
269
  },
270
- "medianCreateMs": 7789,
271
- "medianReadyMs": 8191,
270
+ "medianCreateMs": 5519,
271
+ "medianReadyMs": 5811,
272
272
  "successRate": 1,
273
- "runs": 3,
274
- "hourlyUsd": 0.0074990000000000005,
275
- "measuredAt": "2026-11-18T17:51:44.834Z"
273
+ "runs": 5,
274
+ "hourlyUsd": 0.06666,
275
+ "measuredAt": "2026-11-28T15:05:23.053Z"
276
276
  }
277
277
  },
278
278
  "jobs": {
@@ -1739,6 +1739,239 @@ export const PUBLISHED = {
1739
1739
  "limited": 0,
1740
1740
  "measuredAt": "2026-11-17T23:53:49.019Z"
1741
1741
  }
1742
+ },
1743
+ "assistant": {
1744
+ "agent37": {
1745
+ "name": "Agent37",
1746
+ "size": {
1747
+ "vcpu": 2,
1748
+ "memoryGb": 4
1749
+ },
1750
+ "createMs": 1194,
1751
+ "taskMs": 68610,
1752
+ "taskUsd": 0.000325375,
1753
+ "reusedUsd": 0.000233531,
1754
+ "successRate": 1,
1755
+ "runs": 3,
1756
+ "ok": 3,
1757
+ "minimumSeconds": 60,
1758
+ "note": "files go through shell commands on this provider",
1759
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1760
+ },
1761
+ "agentcore": {
1762
+ "name": "Amazon Bedrock AgentCore Code Interpreter",
1763
+ "size": {
1764
+ "vcpu": 2,
1765
+ "memoryGb": 4
1766
+ },
1767
+ "createMs": 1420,
1768
+ "taskMs": 30484,
1769
+ "taskUsd": 0.001174394,
1770
+ "reusedUsd": 0.001160648,
1771
+ "successRate": 1,
1772
+ "runs": 3,
1773
+ "ok": 3,
1774
+ "note": "files go through shell commands on this provider",
1775
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1776
+ },
1777
+ "boat": {
1778
+ "name": "Boat",
1779
+ "size": {
1780
+ "vcpu": 2,
1781
+ "memoryGb": 4
1782
+ },
1783
+ "createMs": 1593,
1784
+ "taskMs": 4969,
1785
+ "taskUsd": 0.000335,
1786
+ "reusedUsd": 0.00032536,
1787
+ "successRate": 1,
1788
+ "runs": 3,
1789
+ "ok": 3,
1790
+ "note": "files go through shell commands on this provider",
1791
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1792
+ },
1793
+ "cloudflare": {
1794
+ "name": "Cloudflare Sandbox",
1795
+ "size": {
1796
+ "vcpu": 2,
1797
+ "memoryGb": 4
1798
+ },
1799
+ "createMs": 509,
1800
+ "taskMs": 3017,
1801
+ "taskUsd": 0.0013036,
1802
+ "reusedUsd": 0.001285,
1803
+ "successRate": 1,
1804
+ "runs": 3,
1805
+ "ok": 3,
1806
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1807
+ },
1808
+ "daytona": {
1809
+ "name": "Daytona",
1810
+ "size": {
1811
+ "vcpu": 1,
1812
+ "memoryGb": 1
1813
+ },
1814
+ "createMs": 383,
1815
+ "taskMs": 4137,
1816
+ "taskUsd": 0.0012025,
1817
+ "reusedUsd": 0.001188329,
1818
+ "successRate": 1,
1819
+ "runs": 3,
1820
+ "ok": 3,
1821
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1822
+ },
1823
+ "e2b": {
1824
+ "name": "E2B",
1825
+ "size": {
1826
+ "vcpu": 2,
1827
+ "memoryGb": 0.5
1828
+ },
1829
+ "createMs": 376,
1830
+ "taskMs": 8178,
1831
+ "taskUsd": 0.0021175,
1832
+ "reusedUsd": 0.002069039,
1833
+ "successRate": 1,
1834
+ "runs": 3,
1835
+ "ok": 3,
1836
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1837
+ },
1838
+ "freestyle": {
1839
+ "name": "Freestyle",
1840
+ "size": {
1841
+ "vcpu": 2,
1842
+ "memoryGb": 4
1843
+ },
1844
+ "createMs": 1933,
1845
+ "taskMs": 10034,
1846
+ "taskUsd": 0.002709517,
1847
+ "reusedUsd": 0.002607334,
1848
+ "successRate": 1,
1849
+ "runs": 3,
1850
+ "ok": 3,
1851
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1852
+ },
1853
+ "lambda": {
1854
+ "name": "AWS Lambda MicroVMs",
1855
+ "size": {
1856
+ "vcpu": 2,
1857
+ "memoryGb": 4
1858
+ },
1859
+ "createMs": 3473,
1860
+ "taskMs": 6617,
1861
+ "taskUsd": 0.004973948,
1862
+ "reusedUsd": 0.004701081,
1863
+ "successRate": 1,
1864
+ "runs": 3,
1865
+ "ok": 3,
1866
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1867
+ },
1868
+ "maritime": {
1869
+ "name": "Maritime",
1870
+ "size": {
1871
+ "vcpu": 2,
1872
+ "memoryGb": 4
1873
+ },
1874
+ "createMs": 2697,
1875
+ "taskMs": 5898,
1876
+ "taskUsd": 0.00044,
1877
+ "reusedUsd": 0.000403749,
1878
+ "successRate": 1,
1879
+ "runs": 3,
1880
+ "ok": 3,
1881
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1882
+ },
1883
+ "modal": {
1884
+ "name": "Modal",
1885
+ "size": {
1886
+ "vcpu": 2,
1887
+ "memoryGb": 4
1888
+ },
1889
+ "createMs": 452,
1890
+ "taskMs": 8159,
1891
+ "taskUsd": 0.002180104,
1892
+ "reusedUsd": 0.002161416,
1893
+ "successRate": 1,
1894
+ "runs": 3,
1895
+ "ok": 3,
1896
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1897
+ },
1898
+ "novita": {
1899
+ "name": "Novita AI Agent Sandbox",
1900
+ "size": {
1901
+ "vcpu": 2,
1902
+ "memoryGb": 1
1903
+ },
1904
+ "createMs": 314,
1905
+ "taskMs": 8961,
1906
+ "taskUsd": 0.001596,
1907
+ "reusedUsd": 0.001583848,
1908
+ "successRate": 1,
1909
+ "runs": 3,
1910
+ "ok": 3,
1911
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1912
+ },
1913
+ "openscale": {
1914
+ "name": "OpenScale Sandboxes",
1915
+ "size": {
1916
+ "vcpu": 2,
1917
+ "memoryGb": 1
1918
+ },
1919
+ "createMs": 342,
1920
+ "taskMs": 13239,
1921
+ "taskUsd": 0.000291667,
1922
+ "reusedUsd": 0.000285985,
1923
+ "successRate": 1,
1924
+ "runs": 3,
1925
+ "ok": 3,
1926
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1927
+ },
1928
+ "sail": {
1929
+ "name": "Sailboxes (Sail Research)",
1930
+ "size": {
1931
+ "vcpu": 2,
1932
+ "memoryGb": 4
1933
+ },
1934
+ "createMs": 741,
1935
+ "taskMs": 14952,
1936
+ "taskUsd": 0.010688639,
1937
+ "reusedUsd": 0.000681092,
1938
+ "successRate": 1,
1939
+ "runs": 3,
1940
+ "ok": 3,
1941
+ "perSandboxUsd": 0.01,
1942
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1943
+ },
1944
+ "tensorlake": {
1945
+ "name": "Tensorlake",
1946
+ "size": {
1947
+ "vcpu": 2,
1948
+ "memoryGb": 4
1949
+ },
1950
+ "createMs": 2996,
1951
+ "taskMs": 13025,
1952
+ "taskUsd": 0.001881717,
1953
+ "reusedUsd": 0.001788722,
1954
+ "successRate": 1,
1955
+ "runs": 3,
1956
+ "ok": 3,
1957
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1958
+ },
1959
+ "vercel": {
1960
+ "name": "Vercel Sandbox",
1961
+ "size": {
1962
+ "vcpu": 2,
1963
+ "memoryGb": 4
1964
+ },
1965
+ "createMs": 274,
1966
+ "taskMs": 6833,
1967
+ "taskUsd": 0.001672178,
1968
+ "reusedUsd": 0.001637322,
1969
+ "successRate": 1,
1970
+ "runs": 3,
1971
+ "ok": 3,
1972
+ "minimumSeconds": 60,
1973
+ "measuredAt": "2026-11-28T18:53:43.434Z"
1974
+ }
1742
1975
  }
1743
1976
  },
1744
1977
  "load": [
@@ -1813,7 +2046,7 @@ export const PUBLISHED = {
1813
2046
  "limited": 0,
1814
2047
  "size": {
1815
2048
  "vcpu": 2,
1816
- "memoryGb": 4
2049
+ "memoryGb": 1
1817
2050
  },
1818
2051
  "p50Ms": 1655,
1819
2052
  "p99Ms": 3157,
@@ -2048,7 +2281,7 @@ export const PUBLISHED = {
2048
2281
  "limited": 0,
2049
2282
  "size": {
2050
2283
  "vcpu": 2,
2051
- "memoryGb": 4
2284
+ "memoryGb": 1
2052
2285
  },
2053
2286
  "p50Ms": 2079,
2054
2287
  "p99Ms": 2671,
@@ -1,5 +1,5 @@
1
1
  /** A job the benchmarks measure. "start" is only starting a sandbox and running one command. */
2
- export type RecJob = "start" | "short" | "long" | "python" | "download" | "agent" | "repo";
2
+ export type RecJob = "start" | "short" | "long" | "python" | "download" | "agent" | "repo" | "assistant";
3
3
  /** What to rank by: lowest cost, shortest time, or both together ("value"). */
4
4
  export type RecPriority = "cost" | "speed" | "value";
5
5
  type BenchmarkSize = {
@@ -35,6 +35,8 @@ export interface PublishedJob {
35
35
  minimumSeconds?: number;
36
36
  /** Fee per sandbox started. */
37
37
  perSandboxUsd?: number;
38
+ /** Something about how this number was measured that a reader should know. */
39
+ note?: string;
38
40
  measuredAt: string;
39
41
  }
40
42
  export interface PublishedLoadRow {
package/dist/recommend.js CHANGED
@@ -9,6 +9,7 @@ const LOAD_JOB = {
9
9
  download: "start",
10
10
  agent: "agents",
11
11
  repo: "start",
12
+ assistant: "start",
12
13
  };
13
14
  const mid = (xs) => {
14
15
  const s = [...xs].sort((a, b) => a - b);
@@ -51,6 +52,8 @@ export function recommend(data, opts = {}) {
51
52
  notes.push(`$${j.perSandboxUsd} per sandbox started`);
52
53
  if (j.limited)
53
54
  notes.push(`${j.limited} reported limit refusals`);
55
+ if (j.note)
56
+ notes.push(j.note);
54
57
  raw.push({
55
58
  provider: id,
56
59
  name: j.name,