@pablofdezr/microvm 0.1.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,1557 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/sandboxes": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /** List sandboxes */
14
+ get: operations["listSandboxes"];
15
+ put?: never;
16
+ /**
17
+ * Create a sandbox
18
+ * @description Boots a microVM and waits for it to answer. Returns once the sandbox is
19
+ * ready to run commands.
20
+ *
21
+ * Fails with `capacity_error` when the node has no room. That is
22
+ * deliberate: a sandbox is a reservation, so the caller is told
23
+ * immediately rather than left waiting. If you would rather wait, submit a
24
+ * task.
25
+ */
26
+ post: operations["createSandbox"];
27
+ delete?: never;
28
+ options?: never;
29
+ head?: never;
30
+ patch?: never;
31
+ trace?: never;
32
+ };
33
+ "/sandboxes/{sandbox}": {
34
+ parameters: {
35
+ query?: never;
36
+ header?: never;
37
+ path: {
38
+ sandbox: components["parameters"]["SandboxId"];
39
+ };
40
+ cookie?: never;
41
+ };
42
+ /**
43
+ * Retrieve a sandbox
44
+ * @description Returns the sandbox with live metering.
45
+ */
46
+ get: operations["retrieveSandbox"];
47
+ put?: never;
48
+ post?: never;
49
+ /**
50
+ * Delete a sandbox
51
+ * @description Kills the VM and releases everything it held.
52
+ *
53
+ * Returns the sandbox with its final metering. Those numbers are sampled
54
+ * before the kill and cannot be obtained afterwards: the cgroup that holds
55
+ * them dies with the VM, so this reply is the only record of what the
56
+ * sandbox cost.
57
+ */
58
+ delete: operations["deleteSandbox"];
59
+ options?: never;
60
+ head?: never;
61
+ patch?: never;
62
+ trace?: never;
63
+ };
64
+ "/sandboxes/{sandbox}/executions": {
65
+ parameters: {
66
+ query?: never;
67
+ header?: never;
68
+ path: {
69
+ sandbox: components["parameters"]["SandboxId"];
70
+ };
71
+ cookie?: never;
72
+ };
73
+ /** List a sandbox's executions */
74
+ get: operations["listExecutions"];
75
+ put?: never;
76
+ /**
77
+ * Run a command
78
+ * @description Starts a command and returns immediately with the execution. It does not
79
+ * wait for the command to finish.
80
+ *
81
+ * To follow the output, stream the execution; to collect it afterwards,
82
+ * retrieve it. Output is buffered on the host either way, so nothing is
83
+ * lost between starting the command and connecting to its stream.
84
+ */
85
+ post: operations["createExecution"];
86
+ delete?: never;
87
+ options?: never;
88
+ head?: never;
89
+ patch?: never;
90
+ trace?: never;
91
+ };
92
+ "/sandboxes/{sandbox}/executions/{execution}": {
93
+ parameters: {
94
+ query?: never;
95
+ header?: never;
96
+ path: {
97
+ sandbox: components["parameters"]["SandboxId"];
98
+ execution: components["parameters"]["ExecutionId"];
99
+ };
100
+ cookie?: never;
101
+ };
102
+ /**
103
+ * Retrieve an execution
104
+ * @description Returns the execution and everything it printed.
105
+ *
106
+ * This works after the sandbox is gone. Output is buffered on the host
107
+ * precisely because the moment you most need it -- a timeout, a TTL, the
108
+ * OOM killer -- is the moment a guest-side buffer would die with the VM.
109
+ */
110
+ get: operations["retrieveExecution"];
111
+ put?: never;
112
+ post?: never;
113
+ delete?: never;
114
+ options?: never;
115
+ head?: never;
116
+ patch?: never;
117
+ trace?: never;
118
+ };
119
+ "/sandboxes/{sandbox}/executions/{execution}/stream": {
120
+ parameters: {
121
+ query?: never;
122
+ header?: never;
123
+ path: {
124
+ sandbox: components["parameters"]["SandboxId"];
125
+ execution: components["parameters"]["ExecutionId"];
126
+ };
127
+ cookie?: never;
128
+ };
129
+ /**
130
+ * Stream an execution's output
131
+ * @description Server-sent events, one per output chunk, as the process produces them.
132
+ * The stream ends with an `exit` or `error` event.
133
+ *
134
+ * The stream replays from the start of the execution, so connecting late
135
+ * loses nothing and a dropped connection can simply reconnect. This is why
136
+ * starting a command and streaming it are separate calls: a single call
137
+ * that did both would make the output unrecoverable the moment the
138
+ * connection broke.
139
+ *
140
+ * SSE rather than WebSockets because the traffic is one-directional: there
141
+ * is no upgrade, no ping/pong, and it survives any proxy that speaks HTTP.
142
+ */
143
+ get: operations["streamExecution"];
144
+ put?: never;
145
+ post?: never;
146
+ delete?: never;
147
+ options?: never;
148
+ head?: never;
149
+ patch?: never;
150
+ trace?: never;
151
+ };
152
+ "/sandboxes/{sandbox}/executions/{execution}/cancel": {
153
+ parameters: {
154
+ query?: never;
155
+ header?: never;
156
+ path: {
157
+ sandbox: components["parameters"]["SandboxId"];
158
+ execution: components["parameters"]["ExecutionId"];
159
+ };
160
+ cookie?: never;
161
+ };
162
+ get?: never;
163
+ put?: never;
164
+ /**
165
+ * Cancel an execution
166
+ * @description Signals the process. The signal reaches the whole process group, so a
167
+ * program that spawned children does not leave them running.
168
+ *
169
+ * Defaults to SIGKILL. Hostile code is not owed a chance to clean up, and
170
+ * a graceful signal it can ignore is a way to outlive its own cancel.
171
+ */
172
+ post: operations["cancelExecution"];
173
+ delete?: never;
174
+ options?: never;
175
+ head?: never;
176
+ patch?: never;
177
+ trace?: never;
178
+ };
179
+ "/sandboxes/{sandbox}/files": {
180
+ parameters: {
181
+ query?: never;
182
+ header?: never;
183
+ path: {
184
+ sandbox: components["parameters"]["SandboxId"];
185
+ };
186
+ cookie?: never;
187
+ };
188
+ /**
189
+ * Download a file
190
+ * @description The path is a query parameter rather than part of the route because a
191
+ * file path contains slashes, and encoding them into a path segment would
192
+ * make every caller escape their own paths to name a file.
193
+ */
194
+ get: operations["retrieveFile"];
195
+ put?: never;
196
+ /**
197
+ * Upload a file
198
+ * @description Writes a file into the sandbox, creating parent directories.
199
+ */
200
+ post: operations["createFile"];
201
+ delete?: never;
202
+ options?: never;
203
+ head?: never;
204
+ patch?: never;
205
+ trace?: never;
206
+ };
207
+ "/tasks": {
208
+ parameters: {
209
+ query?: never;
210
+ header?: never;
211
+ path?: never;
212
+ cookie?: never;
213
+ };
214
+ get?: never;
215
+ put?: never;
216
+ /**
217
+ * Submit a task
218
+ * @description Queues work for the fleet. Unlike creating a sandbox, this never fails
219
+ * for capacity: the task waits for a slot on any node.
220
+ *
221
+ * The queue is the source of truth. No node is told what to run; each
222
+ * pulls when it has a free slot, which is why adding the three-hundredth
223
+ * node needs no coordination and losing one needs no detection.
224
+ */
225
+ post: operations["createTask"];
226
+ delete?: never;
227
+ options?: never;
228
+ head?: never;
229
+ patch?: never;
230
+ trace?: never;
231
+ };
232
+ "/tasks/{task}": {
233
+ parameters: {
234
+ query?: never;
235
+ header?: never;
236
+ path: {
237
+ task: components["parameters"]["TaskId"];
238
+ };
239
+ cookie?: never;
240
+ };
241
+ /** Retrieve a task */
242
+ get: operations["retrieveTask"];
243
+ put?: never;
244
+ post?: never;
245
+ delete?: never;
246
+ options?: never;
247
+ head?: never;
248
+ patch?: never;
249
+ trace?: never;
250
+ };
251
+ "/queue": {
252
+ parameters: {
253
+ query?: never;
254
+ header?: never;
255
+ path?: never;
256
+ cookie?: never;
257
+ };
258
+ /**
259
+ * Retrieve the queue
260
+ * @description The queue's depth, plus this node's slots.
261
+ *
262
+ * `pending`, `leased`, `done` and `failed` describe the whole fleet's
263
+ * queue. `slots` and `busy` describe *this node only*: no node knows the
264
+ * fleet's capacity, and none needs to, which is exactly what lets a node
265
+ * be added without telling anything else it exists.
266
+ */
267
+ get: operations["retrieveQueue"];
268
+ put?: never;
269
+ post?: never;
270
+ delete?: never;
271
+ options?: never;
272
+ head?: never;
273
+ patch?: never;
274
+ trace?: never;
275
+ };
276
+ "/images": {
277
+ parameters: {
278
+ query?: never;
279
+ header?: never;
280
+ path?: never;
281
+ cookie?: never;
282
+ };
283
+ /**
284
+ * List images
285
+ * @description The language runtimes this node can boot.
286
+ */
287
+ get: operations["listImages"];
288
+ put?: never;
289
+ post?: never;
290
+ delete?: never;
291
+ options?: never;
292
+ head?: never;
293
+ patch?: never;
294
+ trace?: never;
295
+ };
296
+ "/tenants": {
297
+ parameters: {
298
+ query?: never;
299
+ header?: never;
300
+ path?: never;
301
+ cookie?: never;
302
+ };
303
+ /**
304
+ * List tenant policies
305
+ * @description Every tenant with a storage policy set. **Admin only.** A tenant with no
306
+ * policy is unlimited and does not appear here.
307
+ */
308
+ get: operations["listTenants"];
309
+ put?: never;
310
+ post?: never;
311
+ delete?: never;
312
+ options?: never;
313
+ head?: never;
314
+ patch?: never;
315
+ trace?: never;
316
+ };
317
+ "/tenants/{tenant}": {
318
+ parameters: {
319
+ query?: never;
320
+ header?: never;
321
+ path: {
322
+ /** @description The tenant namespace, e.g. from a sandbox's `storage.namespace`. */
323
+ tenant: string;
324
+ };
325
+ cookie?: never;
326
+ };
327
+ /**
328
+ * Retrieve a tenant's policy and usage
329
+ * @description A tenant's cap, policy, and how much of the cap is used right now.
330
+ * **Admin only.** The usage is read from the object store, so it is the
331
+ * real total, not an estimate.
332
+ */
333
+ get: operations["retrieveTenant"];
334
+ /**
335
+ * Set a tenant's storage policy
336
+ * @description Set the storage cap and full-policy for a tenant. **Admin only.** This is
337
+ * the one thing an admin key can do that a normal key cannot, and it is
338
+ * powerful: `evict` deletes a tenant's oldest data to make room, so setting
339
+ * it is a decision to allow that deletion.
340
+ */
341
+ put: operations["updateTenant"];
342
+ post?: never;
343
+ delete?: never;
344
+ options?: never;
345
+ head?: never;
346
+ patch?: never;
347
+ trace?: never;
348
+ };
349
+ "/health": {
350
+ parameters: {
351
+ query?: never;
352
+ header?: never;
353
+ path?: never;
354
+ cookie?: never;
355
+ };
356
+ /**
357
+ * Health check
358
+ * @description Liveness. The one route that needs no credentials.
359
+ */
360
+ get: operations["retrieveHealth"];
361
+ put?: never;
362
+ post?: never;
363
+ delete?: never;
364
+ options?: never;
365
+ head?: never;
366
+ patch?: never;
367
+ trace?: never;
368
+ };
369
+ }
370
+ export type webhooks = Record<string, never>;
371
+ export interface components {
372
+ schemas: {
373
+ /** @description The body of every non-2xx reply. */
374
+ ErrorEnvelope: {
375
+ error: components["schemas"]["Error"];
376
+ };
377
+ Error: {
378
+ type: components["schemas"]["ErrorType"];
379
+ /**
380
+ * @description A stable, machine-readable identifier. Switch on this. The message is
381
+ * for humans and may be reworded at any time.
382
+ * @example sandbox_not_found
383
+ */
384
+ code: string;
385
+ /**
386
+ * @description A human-readable explanation. Never parse it.
387
+ * @example No such sandbox: sb_01JZ8QK3M4N5P6R7S8T9V0W1X2
388
+ */
389
+ message: string;
390
+ /**
391
+ * @description Which request field was at fault, when one was.
392
+ * @example image
393
+ */
394
+ param?: string;
395
+ /** @description Quote this when reporting a problem. */
396
+ request_id?: string;
397
+ };
398
+ /**
399
+ * @description The class of error, which determines what a client should *do*:
400
+ *
401
+ * - `invalid_request_error` — the request is wrong. Retrying it unchanged
402
+ * will fail identically.
403
+ * - `authentication_error` — the token is missing or wrong.
404
+ * - `capacity_error` — no room right now. Retrying later may work; a task
405
+ * would not have failed at all.
406
+ * - `idempotency_error` — an Idempotency-Key was reused with a different
407
+ * body.
408
+ * - `api_error` — our fault. Safe to retry with the same Idempotency-Key.
409
+ * @enum {string}
410
+ */
411
+ ErrorType: "invalid_request_error" | "authentication_error" | "capacity_error" | "idempotency_error" | "api_error";
412
+ ListEnvelope: {
413
+ /** @enum {string} */
414
+ object: "list";
415
+ /** @description The endpoint this list came from. */
416
+ url: string;
417
+ /**
418
+ * @description Whether more objects exist past this page. Page on with
419
+ * `starting_after` set to the last ID in `data`.
420
+ */
421
+ has_more: boolean;
422
+ data: Record<string, never>[];
423
+ };
424
+ /** @enum {string} */
425
+ SandboxState: "running" | "stopped";
426
+ /**
427
+ * @description Why a sandbox stopped. `stopped` means you asked; the rest happened to
428
+ * it, and only `failed` means something went wrong.
429
+ * @enum {string}
430
+ */
431
+ SandboxStopReason: "stopped" | "expired" | "idle" | "failed";
432
+ Sandbox: {
433
+ /** @example sb_01JZ8QK3M4N5P6R7S8T9V0W1X2 */
434
+ id: string;
435
+ /** @enum {string} */
436
+ object: "sandbox";
437
+ /** @example python */
438
+ image: string;
439
+ state: components["schemas"]["SandboxState"];
440
+ /** @description Set once the sandbox is stopped. */
441
+ stop_reason?: components["schemas"]["SandboxStopReason"];
442
+ /** Format: date-time */
443
+ created: string;
444
+ /**
445
+ * Format: date-time
446
+ * @description When the TTL kills it, whatever it is doing.
447
+ */
448
+ expires: string;
449
+ /** Format: date-time */
450
+ stopped?: string | null;
451
+ vcpus?: number;
452
+ mem_mib?: number;
453
+ /** @description Whether filtered egress is on. */
454
+ network?: boolean;
455
+ /**
456
+ * @description Where this sandbox's files persist, when the node has object storage
457
+ * configured. Absent when it does not.
458
+ */
459
+ storage?: components["schemas"]["SandboxStorage"];
460
+ stats: components["schemas"]["Stats"];
461
+ };
462
+ /**
463
+ * @description A sandbox's view of object storage. Files written here outlive the
464
+ * sandbox and are reachable by every sandbox in the same `namespace`, which
465
+ * is how state is carried from one run to the next.
466
+ */
467
+ SandboxStorage: {
468
+ /**
469
+ * @description The tenant your files live under, derived from your API key. It is
470
+ * yours and stable: write a file today, read it from another sandbox
471
+ * tomorrow. You cannot choose it — that is what stops one tenant from
472
+ * naming another's.
473
+ * @example t_9f86d081884c7d659a2feaa0c55ad015
474
+ */
475
+ namespace: string;
476
+ /** @description Whether this sandbox may write, or only read. */
477
+ read_only: boolean;
478
+ /**
479
+ * @description Where storage is mounted inside the guest, e.g. `/mnt/storage`. This
480
+ * is a directory in your own sandbox, not a namespace, so choosing it
481
+ * reaches nobody else's files. Defaults to `/mnt/storage`.
482
+ * @example /mnt/storage
483
+ */
484
+ mount_path?: string;
485
+ /**
486
+ * Format: int64
487
+ * @description Your tenant's total storage cap in bytes, or 0 for unlimited. This is
488
+ * the limit your writes are measured against; it is set by an admin.
489
+ */
490
+ max_bytes?: number;
491
+ /** @description What a write does when the cap is reached. Absent when there is no cap. */
492
+ policy?: components["schemas"]["TenantFullPolicy"];
493
+ };
494
+ SandboxList: components["schemas"]["ListEnvelope"] & {
495
+ data?: components["schemas"]["Sandbox"][];
496
+ };
497
+ /**
498
+ * @description What a sandbox has consumed. Cumulative since boot, so a biller must
499
+ * diff two samples: booting alone costs a couple of CPU-seconds, and
500
+ * cumulative idle is meaningless for a sandbox's first seconds.
501
+ */
502
+ Stats: {
503
+ /**
504
+ * @description CPU actually burned. **This is the billable number.** A sandbox
505
+ * blocked on I/O bills nearly nothing: three seconds asleep costs
506
+ * about 15ms of this.
507
+ */
508
+ active_cpu_ms: number;
509
+ /** @description How long the sandbox has existed. */
510
+ wall_ms: number;
511
+ /**
512
+ * @description `wall_ms` minus `active_cpu_ms`: existing but doing nothing. Zero
513
+ * when a multi-vCPU sandbox burns more CPU than wall-clock.
514
+ */
515
+ idle_ms: number;
516
+ memory_current_bytes: number;
517
+ /** @description The high-water mark, which is what a memory limit must be sized against. */
518
+ memory_peak_bytes: number;
519
+ };
520
+ SandboxCreateParams: {
521
+ /**
522
+ * @description The language image.
523
+ * @example python
524
+ */
525
+ image: string;
526
+ /** @default 1 */
527
+ vcpus?: number;
528
+ /** @default 256 */
529
+ mem_mib?: number;
530
+ /**
531
+ * Format: double
532
+ * @description A hard CPU ceiling; may be fractional. 0.5 means half a core, enforced.
533
+ * @example 0.5
534
+ */
535
+ cpu_cores?: number;
536
+ disk_mib?: number;
537
+ /**
538
+ * @description Caps bandwidth both ways, in bytes per second. Worth setting even
539
+ * when CPU is capped: a sandbox pinned to a quarter core can still
540
+ * saturate the host's uplink, and the first you hear of it is the
541
+ * abuse complaint.
542
+ */
543
+ network_bps?: number;
544
+ disk_bps?: number;
545
+ disk_iops?: number;
546
+ /**
547
+ * @description Filtered egress. The public internet is reachable; every private
548
+ * range, link-local and the cloud metadata endpoint are not.
549
+ * @default false
550
+ */
551
+ network?: boolean;
552
+ /**
553
+ * @description Injected into every execution in this sandbox. An execution's own
554
+ * env wins where they overlap.
555
+ *
556
+ * Write-only. These usually carry credentials, so they are never
557
+ * logged and no endpoint returns them. They are applied by the host on
558
+ * each execution rather than written into the guest's filesystem,
559
+ * where anything inside could read them long after the command that
560
+ * needed them.
561
+ */
562
+ env?: {
563
+ [key: string]: string;
564
+ };
565
+ /**
566
+ * @description Maximum lifetime. The sandbox is killed when it elapses.
567
+ * @default 900
568
+ */
569
+ ttl_seconds?: number;
570
+ /**
571
+ * @description Reclaim after this long with nothing running. Negative disables it.
572
+ * @default 120
573
+ */
574
+ idle_seconds?: number;
575
+ /**
576
+ * @description Options for this sandbox's storage mount. The namespace is never set
577
+ * here — it comes from your API key. Only the read/write posture is
578
+ * yours to choose, and only to tighten.
579
+ */
580
+ storage?: components["schemas"]["SandboxStorageParams"];
581
+ };
582
+ /** @description What a create request may say about storage, which is very little. */
583
+ SandboxStorageParams: {
584
+ /**
585
+ * @description Mount storage read-only for this sandbox even if the key could write.
586
+ * It can only tighten: a read-only key stays read-only whatever you set
587
+ * here. Useful for a run that should read shared state but never touch it.
588
+ */
589
+ read_only?: boolean;
590
+ /**
591
+ * @description Where to mount storage inside the guest. An absolute, clean path using
592
+ * only letters, digits and `_-./`; it names a directory in your own
593
+ * sandbox and cannot reach another tenant's files. Defaults to
594
+ * `/mnt/storage`.
595
+ * @example /data
596
+ */
597
+ mount_path?: string;
598
+ };
599
+ /**
600
+ * @description What a write does when a tenant is at its cap.
601
+ *
602
+ * - `preserve` — reject the write and keep what is stored. For data that
603
+ * matters more than the next write: an audit trail, a paid-for dataset.
604
+ * - `evict` — delete the oldest objects until the write fits. For a cache
605
+ * or scratch space, where the newest data is the point. It deletes data,
606
+ * irreversibly, which is why it is never the default.
607
+ * @enum {string}
608
+ */
609
+ TenantFullPolicy: "preserve" | "evict";
610
+ Tenant: {
611
+ /** @enum {string} */
612
+ object: "tenant";
613
+ /**
614
+ * @description The tenant namespace this policy applies to.
615
+ * @example t_9f86d081884c7d659a2feaa0c55ad015
616
+ */
617
+ id: string;
618
+ /**
619
+ * Format: int64
620
+ * @description The tenant's total storage cap, in bytes. 0 means unlimited.
621
+ */
622
+ max_bytes: number;
623
+ policy: components["schemas"]["TenantFullPolicy"];
624
+ /**
625
+ * Format: int64
626
+ * @description Bytes currently stored, read from the object store on retrieve. Absent
627
+ * on the reply to an update, which does not stop to scan the bucket.
628
+ */
629
+ usage_bytes?: number;
630
+ };
631
+ TenantList: components["schemas"]["ListEnvelope"] & {
632
+ data?: components["schemas"]["Tenant"][];
633
+ };
634
+ TenantUpdateParams: {
635
+ /**
636
+ * Format: int64
637
+ * @description The tenant's total storage cap, in bytes. 0 means unlimited.
638
+ * @example 1073741824
639
+ */
640
+ max_bytes: number;
641
+ policy: components["schemas"]["TenantFullPolicy"];
642
+ };
643
+ /**
644
+ * @description Outcomes that all look like failure but are not, and a caller must tell
645
+ * apart:
646
+ *
647
+ * - `running` — still going.
648
+ * - `exited` — your code ran to completion. `exit_code` is its own verdict.
649
+ * - `timed_out` — it exceeded its timeout and we killed it.
650
+ * - `canceled` — you cancelled it.
651
+ * - `vanished` — **we took the VM away.** Your code did not fail.
652
+ * - `failed` — the command could never start, e.g. no such binary.
653
+ * @enum {string}
654
+ */
655
+ ExecutionStatus: "running" | "exited" | "timed_out" | "canceled" | "vanished" | "failed";
656
+ Execution: {
657
+ /** @example exe_01JZ8QK3M4N5P6R7S8T9V0W1X2 */
658
+ id: string;
659
+ /** @enum {string} */
660
+ object: "execution";
661
+ /** @example sb_01JZ8QK3M4N5P6R7S8T9V0W1X2 */
662
+ sandbox: string;
663
+ /** @example python3 */
664
+ cmd: string;
665
+ args?: string[];
666
+ status: components["schemas"]["ExecutionStatus"];
667
+ exit_code?: number | null;
668
+ /**
669
+ * @description The signal that killed it, if one did.
670
+ * @example SIGKILL
671
+ */
672
+ signal?: string | null;
673
+ /** @description Why the command could never start. Set only when status is `failed`. */
674
+ error?: string;
675
+ stdout: string;
676
+ stderr: string;
677
+ /**
678
+ * @description Output exceeded the retention cap and the oldest bytes were dropped.
679
+ * The *tail* is kept, because that is where a traceback is. Never
680
+ * silently truncated: a partial log that looks complete is worse than
681
+ * no log.
682
+ */
683
+ stdout_truncated?: boolean;
684
+ stderr_truncated?: boolean;
685
+ /** Format: date-time */
686
+ created: string;
687
+ /** Format: date-time */
688
+ finished?: string | null;
689
+ duration_ms?: number;
690
+ };
691
+ ExecutionList: components["schemas"]["ListEnvelope"] & {
692
+ data?: components["schemas"]["Execution"][];
693
+ };
694
+ ExecutionCreateParams: {
695
+ /** @example python3 */
696
+ cmd: string;
697
+ /**
698
+ * @example [
699
+ * "main.py"
700
+ * ]
701
+ */
702
+ args?: string[];
703
+ /** @description Merged over the sandbox's env; these win. Write-only. */
704
+ env?: {
705
+ [key: string]: string;
706
+ };
707
+ cwd?: string;
708
+ /**
709
+ * Format: byte
710
+ * @description Written to the process, then closed.
711
+ */
712
+ stdin?: string;
713
+ /**
714
+ * @description Kills the process group when exceeded.
715
+ * @default 300
716
+ */
717
+ timeout_seconds?: number;
718
+ };
719
+ ExecutionCancelParams: {
720
+ /**
721
+ * @description The signal to send. It reaches the whole process group.
722
+ * @default SIGKILL
723
+ * @example SIGKILL
724
+ */
725
+ signal?: string;
726
+ };
727
+ File: {
728
+ /** @enum {string} */
729
+ object: "file";
730
+ /** @example /app/main.py */
731
+ path: string;
732
+ size_bytes: number;
733
+ };
734
+ FileCreateParams: {
735
+ /**
736
+ * @description Absolute path inside the sandbox. Parent directories are created.
737
+ * @example /app/main.py
738
+ */
739
+ path: string;
740
+ /**
741
+ * Format: byte
742
+ * @description The file's bytes, base64 encoded so binary survives the trip.
743
+ */
744
+ content: string;
745
+ };
746
+ /**
747
+ * @description - `pending` — waiting for a slot anywhere in the fleet.
748
+ * - `running` — a node holds it.
749
+ * - `done` — it ran. `exit_code` is your code's own verdict, and a
750
+ * non-zero one is still `done`.
751
+ * - `failed` — **our** failure: no node could run it, after its attempts
752
+ * ran out.
753
+ * @enum {string}
754
+ */
755
+ TaskStatus: "pending" | "running" | "done" | "failed";
756
+ Task: {
757
+ /** @example tsk_01JZ8QK3M4N5P6R7S8T9V0W1X2 */
758
+ id: string;
759
+ /** @enum {string} */
760
+ object: "task";
761
+ status: components["schemas"]["TaskStatus"];
762
+ exit_code?: number | null;
763
+ stdout?: string;
764
+ stderr?: string;
765
+ /**
766
+ * @description An infrastructure failure. Distinct from a non-zero exit, which is
767
+ * the caller's own code and not a failure of ours.
768
+ */
769
+ error?: string;
770
+ /**
771
+ * @description How many tries it took. Retries are for nodes dying, not for code
772
+ * failing: a task whose process exits non-zero is never retried, or a
773
+ * caller's bug would be run repeatedly and billed for each attempt.
774
+ */
775
+ attempts?: number;
776
+ /** Format: date-time */
777
+ created?: string;
778
+ /** Format: date-time */
779
+ started?: string | null;
780
+ /** Format: date-time */
781
+ finished?: string | null;
782
+ active_cpu_ms?: number;
783
+ memory_peak_bytes?: number;
784
+ };
785
+ TaskCreateParams: {
786
+ /** @example python */
787
+ image: string;
788
+ /** @example python3 */
789
+ cmd: string;
790
+ args?: string[];
791
+ /** @description Write-only. */
792
+ env?: {
793
+ [key: string]: string;
794
+ };
795
+ /**
796
+ * @description Written into the sandbox before the command runs, keyed by path.
797
+ * @example {
798
+ * "/app/main.py": "cHJpbnQoImhpIik="
799
+ * }
800
+ */
801
+ files?: {
802
+ [key: string]: string;
803
+ };
804
+ /** @default 300 */
805
+ timeout_seconds?: number;
806
+ /** @default false */
807
+ network?: boolean;
808
+ /** @default 1 */
809
+ vcpus?: number;
810
+ /** @default 256 */
811
+ mem_mib?: number;
812
+ /** Format: double */
813
+ cpu_cores?: number;
814
+ /**
815
+ * @description Scheduling priority, 0 to 10. Higher runs first; equal priorities are
816
+ * FIFO, which is the guarantee callers actually reason about. It orders
817
+ * the queue within what a node can fit: among the tasks a node has room
818
+ * for, the highest priority is taken first, so a high-priority task that
819
+ * does not fit yields to a lower one that does rather than blocking it.
820
+ * @default 0
821
+ */
822
+ priority?: number;
823
+ /**
824
+ * @description How many times a node may try this before it is failed for good. Two
825
+ * means one retry: enough to survive a node dying, few enough that a
826
+ * task which reliably kills its worker cannot cycle the fleet forever.
827
+ * @default 2
828
+ */
829
+ max_attempts?: number;
830
+ };
831
+ Queue: {
832
+ /** @enum {string} */
833
+ object: "queue";
834
+ pending: number;
835
+ /** @description Held by a worker somewhere in the fleet. */
836
+ leased: number;
837
+ done: number;
838
+ failed: number;
839
+ /**
840
+ * @description How long the head of the queue has waited. This is the number that
841
+ * says whether the fleet is big enough.
842
+ */
843
+ oldest_pending_ms: number;
844
+ /** @description This node's slots. Not the fleet's. */
845
+ slots: number;
846
+ /** @description This node's slots currently running something. */
847
+ busy: number;
848
+ };
849
+ Image: {
850
+ /** @enum {string} */
851
+ object: "image";
852
+ /** @example python */
853
+ id: string;
854
+ /** @example python */
855
+ language: string;
856
+ /** @example arm64 */
857
+ arch?: string;
858
+ size_bytes?: number;
859
+ };
860
+ ImageList: components["schemas"]["ListEnvelope"] & {
861
+ data?: components["schemas"]["Image"][];
862
+ };
863
+ Health: {
864
+ /** @enum {string} */
865
+ object: "health";
866
+ ok: boolean;
867
+ version: string;
868
+ };
869
+ /** @description One event in an execution's stream, sent as an SSE data payload. */
870
+ Frame: {
871
+ /** @enum {string} */
872
+ object: "frame";
873
+ /** @enum {string} */
874
+ type: "started" | "stdout" | "stderr" | "exit" | "error";
875
+ /**
876
+ * Format: byte
877
+ * @description The chunk, base64 so binary output survives the trip.
878
+ */
879
+ data?: string;
880
+ pid?: number;
881
+ exit_code?: number | null;
882
+ signal?: string;
883
+ timed_out?: boolean;
884
+ message?: string;
885
+ };
886
+ };
887
+ responses: {
888
+ /** @description The request is malformed or contradicts itself. */
889
+ InvalidRequest: {
890
+ headers: {
891
+ [name: string]: unknown;
892
+ };
893
+ content: {
894
+ "application/json": components["schemas"]["ErrorEnvelope"];
895
+ };
896
+ };
897
+ /** @description The token is missing or wrong. */
898
+ Unauthorized: {
899
+ headers: {
900
+ [name: string]: unknown;
901
+ };
902
+ content: {
903
+ "application/json": components["schemas"]["ErrorEnvelope"];
904
+ };
905
+ };
906
+ /**
907
+ * @description The token is valid but lacks the power for this. Distinct from 401 on
908
+ * purpose: 401 means "log in", 403 means "you are logged in and still may
909
+ * not". Setting a tenant policy needs an admin key.
910
+ */
911
+ Forbidden: {
912
+ headers: {
913
+ [name: string]: unknown;
914
+ };
915
+ content: {
916
+ "application/json": components["schemas"]["ErrorEnvelope"];
917
+ };
918
+ };
919
+ /** @description No such object. */
920
+ NotFound: {
921
+ headers: {
922
+ [name: string]: unknown;
923
+ };
924
+ content: {
925
+ "application/json": components["schemas"]["ErrorEnvelope"];
926
+ };
927
+ };
928
+ /** @description The object already exists, or is in a state that forbids this. */
929
+ Conflict: {
930
+ headers: {
931
+ [name: string]: unknown;
932
+ };
933
+ content: {
934
+ "application/json": components["schemas"]["ErrorEnvelope"];
935
+ };
936
+ };
937
+ /** @description This node has no free slot. Retry, or submit a task instead. */
938
+ CapacityExhausted: {
939
+ headers: {
940
+ [name: string]: unknown;
941
+ };
942
+ content: {
943
+ "application/json": components["schemas"]["ErrorEnvelope"];
944
+ };
945
+ };
946
+ /**
947
+ * @description The queue could not be reached, so nothing is known about the task. This
948
+ * is deliberately not a 404: "we cannot ask" and "it does not exist" call
949
+ * for opposite reactions from a client, and reporting the first as the
950
+ * second would have a caller give up on work that is running fine.
951
+ */
952
+ QueueUnreachable: {
953
+ headers: {
954
+ [name: string]: unknown;
955
+ };
956
+ content: {
957
+ "application/json": components["schemas"]["ErrorEnvelope"];
958
+ };
959
+ };
960
+ /** @description Something failed on our side. */
961
+ ApiError: {
962
+ headers: {
963
+ [name: string]: unknown;
964
+ };
965
+ content: {
966
+ "application/json": components["schemas"]["ErrorEnvelope"];
967
+ };
968
+ };
969
+ };
970
+ parameters: {
971
+ SandboxId: string;
972
+ ExecutionId: string;
973
+ TaskId: string;
974
+ /** @description How many objects to return, 1–100. */
975
+ Limit: number;
976
+ /**
977
+ * @description A cursor. Returns the page of objects immediately after this ID, which
978
+ * is the ID of the last object on the previous page.
979
+ */
980
+ StartingAfter: string;
981
+ /**
982
+ * @description A cursor, for paging backwards. Returns the page immediately before this
983
+ * ID, which is the ID of the first object on the current page.
984
+ */
985
+ EndingBefore: string;
986
+ /**
987
+ * @description Makes a retry safe. A request that never got its reply -- a timeout, a
988
+ * dropped connection -- cannot be known to have failed, so the only sane
989
+ * move is to retry it; without a key, that retry runs the work twice.
990
+ *
991
+ * The first request with a given key is executed and its reply recorded.
992
+ * Any later request with the same key replays that reply, without doing
993
+ * the work again. Keys are held for 24 hours and are scoped to the token.
994
+ *
995
+ * Reusing a key with a *different* request body is an `idempotency_error`:
996
+ * it means the client believes it is retrying something it is not.
997
+ */
998
+ IdempotencyKey: string;
999
+ };
1000
+ requestBodies: never;
1001
+ headers: never;
1002
+ pathItems: never;
1003
+ }
1004
+ export type $defs = Record<string, never>;
1005
+ export interface operations {
1006
+ listSandboxes: {
1007
+ parameters: {
1008
+ query?: {
1009
+ /** @description How many objects to return, 1–100. */
1010
+ limit?: components["parameters"]["Limit"];
1011
+ /**
1012
+ * @description A cursor. Returns the page of objects immediately after this ID, which
1013
+ * is the ID of the last object on the previous page.
1014
+ */
1015
+ starting_after?: components["parameters"]["StartingAfter"];
1016
+ /**
1017
+ * @description A cursor, for paging backwards. Returns the page immediately before this
1018
+ * ID, which is the ID of the first object on the current page.
1019
+ */
1020
+ ending_before?: components["parameters"]["EndingBefore"];
1021
+ /** @description Only sandboxes in this state. */
1022
+ state?: components["schemas"]["SandboxState"];
1023
+ };
1024
+ header?: never;
1025
+ path?: never;
1026
+ cookie?: never;
1027
+ };
1028
+ requestBody?: never;
1029
+ responses: {
1030
+ /** @description A page of sandboxes, newest first. */
1031
+ 200: {
1032
+ headers: {
1033
+ [name: string]: unknown;
1034
+ };
1035
+ content: {
1036
+ "application/json": components["schemas"]["SandboxList"];
1037
+ };
1038
+ };
1039
+ 401: components["responses"]["Unauthorized"];
1040
+ };
1041
+ };
1042
+ createSandbox: {
1043
+ parameters: {
1044
+ query?: never;
1045
+ header?: {
1046
+ /**
1047
+ * @description Makes a retry safe. A request that never got its reply -- a timeout, a
1048
+ * dropped connection -- cannot be known to have failed, so the only sane
1049
+ * move is to retry it; without a key, that retry runs the work twice.
1050
+ *
1051
+ * The first request with a given key is executed and its reply recorded.
1052
+ * Any later request with the same key replays that reply, without doing
1053
+ * the work again. Keys are held for 24 hours and are scoped to the token.
1054
+ *
1055
+ * Reusing a key with a *different* request body is an `idempotency_error`:
1056
+ * it means the client believes it is retrying something it is not.
1057
+ */
1058
+ "Idempotency-Key"?: components["parameters"]["IdempotencyKey"];
1059
+ };
1060
+ path?: never;
1061
+ cookie?: never;
1062
+ };
1063
+ requestBody: {
1064
+ content: {
1065
+ "application/json": components["schemas"]["SandboxCreateParams"];
1066
+ };
1067
+ };
1068
+ responses: {
1069
+ /** @description The sandbox is running and ready. */
1070
+ 201: {
1071
+ headers: {
1072
+ [name: string]: unknown;
1073
+ };
1074
+ content: {
1075
+ "application/json": components["schemas"]["Sandbox"];
1076
+ };
1077
+ };
1078
+ 400: components["responses"]["InvalidRequest"];
1079
+ 401: components["responses"]["Unauthorized"];
1080
+ 409: components["responses"]["Conflict"];
1081
+ 429: components["responses"]["CapacityExhausted"];
1082
+ 500: components["responses"]["ApiError"];
1083
+ };
1084
+ };
1085
+ retrieveSandbox: {
1086
+ parameters: {
1087
+ query?: never;
1088
+ header?: never;
1089
+ path: {
1090
+ sandbox: components["parameters"]["SandboxId"];
1091
+ };
1092
+ cookie?: never;
1093
+ };
1094
+ requestBody?: never;
1095
+ responses: {
1096
+ /** @description The sandbox. */
1097
+ 200: {
1098
+ headers: {
1099
+ [name: string]: unknown;
1100
+ };
1101
+ content: {
1102
+ "application/json": components["schemas"]["Sandbox"];
1103
+ };
1104
+ };
1105
+ 401: components["responses"]["Unauthorized"];
1106
+ 404: components["responses"]["NotFound"];
1107
+ };
1108
+ };
1109
+ deleteSandbox: {
1110
+ parameters: {
1111
+ query?: never;
1112
+ header?: never;
1113
+ path: {
1114
+ sandbox: components["parameters"]["SandboxId"];
1115
+ };
1116
+ cookie?: never;
1117
+ };
1118
+ requestBody?: never;
1119
+ responses: {
1120
+ /** @description The sandbox, stopped, with its final cost. */
1121
+ 200: {
1122
+ headers: {
1123
+ [name: string]: unknown;
1124
+ };
1125
+ content: {
1126
+ "application/json": components["schemas"]["Sandbox"];
1127
+ };
1128
+ };
1129
+ 401: components["responses"]["Unauthorized"];
1130
+ 404: components["responses"]["NotFound"];
1131
+ };
1132
+ };
1133
+ listExecutions: {
1134
+ parameters: {
1135
+ query?: {
1136
+ /** @description How many objects to return, 1–100. */
1137
+ limit?: components["parameters"]["Limit"];
1138
+ /**
1139
+ * @description A cursor. Returns the page of objects immediately after this ID, which
1140
+ * is the ID of the last object on the previous page.
1141
+ */
1142
+ starting_after?: components["parameters"]["StartingAfter"];
1143
+ /**
1144
+ * @description A cursor, for paging backwards. Returns the page immediately before this
1145
+ * ID, which is the ID of the first object on the current page.
1146
+ */
1147
+ ending_before?: components["parameters"]["EndingBefore"];
1148
+ };
1149
+ header?: never;
1150
+ path: {
1151
+ sandbox: components["parameters"]["SandboxId"];
1152
+ };
1153
+ cookie?: never;
1154
+ };
1155
+ requestBody?: never;
1156
+ responses: {
1157
+ /** @description A page of executions, newest first. */
1158
+ 200: {
1159
+ headers: {
1160
+ [name: string]: unknown;
1161
+ };
1162
+ content: {
1163
+ "application/json": components["schemas"]["ExecutionList"];
1164
+ };
1165
+ };
1166
+ 401: components["responses"]["Unauthorized"];
1167
+ 404: components["responses"]["NotFound"];
1168
+ };
1169
+ };
1170
+ createExecution: {
1171
+ parameters: {
1172
+ query?: never;
1173
+ header?: {
1174
+ /**
1175
+ * @description Makes a retry safe. A request that never got its reply -- a timeout, a
1176
+ * dropped connection -- cannot be known to have failed, so the only sane
1177
+ * move is to retry it; without a key, that retry runs the work twice.
1178
+ *
1179
+ * The first request with a given key is executed and its reply recorded.
1180
+ * Any later request with the same key replays that reply, without doing
1181
+ * the work again. Keys are held for 24 hours and are scoped to the token.
1182
+ *
1183
+ * Reusing a key with a *different* request body is an `idempotency_error`:
1184
+ * it means the client believes it is retrying something it is not.
1185
+ */
1186
+ "Idempotency-Key"?: components["parameters"]["IdempotencyKey"];
1187
+ };
1188
+ path: {
1189
+ sandbox: components["parameters"]["SandboxId"];
1190
+ };
1191
+ cookie?: never;
1192
+ };
1193
+ requestBody: {
1194
+ content: {
1195
+ "application/json": components["schemas"]["ExecutionCreateParams"];
1196
+ };
1197
+ };
1198
+ responses: {
1199
+ /** @description The command is running. */
1200
+ 201: {
1201
+ headers: {
1202
+ [name: string]: unknown;
1203
+ };
1204
+ content: {
1205
+ "application/json": components["schemas"]["Execution"];
1206
+ };
1207
+ };
1208
+ 400: components["responses"]["InvalidRequest"];
1209
+ 401: components["responses"]["Unauthorized"];
1210
+ 404: components["responses"]["NotFound"];
1211
+ 409: components["responses"]["Conflict"];
1212
+ };
1213
+ };
1214
+ retrieveExecution: {
1215
+ parameters: {
1216
+ query?: never;
1217
+ header?: never;
1218
+ path: {
1219
+ sandbox: components["parameters"]["SandboxId"];
1220
+ execution: components["parameters"]["ExecutionId"];
1221
+ };
1222
+ cookie?: never;
1223
+ };
1224
+ requestBody?: never;
1225
+ responses: {
1226
+ /** @description The execution. */
1227
+ 200: {
1228
+ headers: {
1229
+ [name: string]: unknown;
1230
+ };
1231
+ content: {
1232
+ "application/json": components["schemas"]["Execution"];
1233
+ };
1234
+ };
1235
+ 401: components["responses"]["Unauthorized"];
1236
+ 404: components["responses"]["NotFound"];
1237
+ };
1238
+ };
1239
+ streamExecution: {
1240
+ parameters: {
1241
+ query?: never;
1242
+ header?: never;
1243
+ path: {
1244
+ sandbox: components["parameters"]["SandboxId"];
1245
+ execution: components["parameters"]["ExecutionId"];
1246
+ };
1247
+ cookie?: never;
1248
+ };
1249
+ requestBody?: never;
1250
+ responses: {
1251
+ /** @description A stream of frames. */
1252
+ 200: {
1253
+ headers: {
1254
+ [name: string]: unknown;
1255
+ };
1256
+ content: {
1257
+ "text/event-stream": components["schemas"]["Frame"];
1258
+ };
1259
+ };
1260
+ 401: components["responses"]["Unauthorized"];
1261
+ 404: components["responses"]["NotFound"];
1262
+ };
1263
+ };
1264
+ cancelExecution: {
1265
+ parameters: {
1266
+ query?: never;
1267
+ header?: never;
1268
+ path: {
1269
+ sandbox: components["parameters"]["SandboxId"];
1270
+ execution: components["parameters"]["ExecutionId"];
1271
+ };
1272
+ cookie?: never;
1273
+ };
1274
+ requestBody?: {
1275
+ content: {
1276
+ "application/json": components["schemas"]["ExecutionCancelParams"];
1277
+ };
1278
+ };
1279
+ responses: {
1280
+ /** @description The execution. */
1281
+ 200: {
1282
+ headers: {
1283
+ [name: string]: unknown;
1284
+ };
1285
+ content: {
1286
+ "application/json": components["schemas"]["Execution"];
1287
+ };
1288
+ };
1289
+ 401: components["responses"]["Unauthorized"];
1290
+ 404: components["responses"]["NotFound"];
1291
+ };
1292
+ };
1293
+ retrieveFile: {
1294
+ parameters: {
1295
+ query: {
1296
+ /** @description Absolute path inside the sandbox. */
1297
+ path: string;
1298
+ };
1299
+ header?: never;
1300
+ path: {
1301
+ sandbox: components["parameters"]["SandboxId"];
1302
+ };
1303
+ cookie?: never;
1304
+ };
1305
+ requestBody?: never;
1306
+ responses: {
1307
+ /** @description The file's contents. */
1308
+ 200: {
1309
+ headers: {
1310
+ [name: string]: unknown;
1311
+ };
1312
+ content: {
1313
+ "application/octet-stream": string;
1314
+ };
1315
+ };
1316
+ 401: components["responses"]["Unauthorized"];
1317
+ 404: components["responses"]["NotFound"];
1318
+ };
1319
+ };
1320
+ createFile: {
1321
+ parameters: {
1322
+ query?: never;
1323
+ header?: never;
1324
+ path: {
1325
+ sandbox: components["parameters"]["SandboxId"];
1326
+ };
1327
+ cookie?: never;
1328
+ };
1329
+ requestBody: {
1330
+ content: {
1331
+ "application/json": components["schemas"]["FileCreateParams"];
1332
+ };
1333
+ };
1334
+ responses: {
1335
+ /** @description The file was written. */
1336
+ 201: {
1337
+ headers: {
1338
+ [name: string]: unknown;
1339
+ };
1340
+ content: {
1341
+ "application/json": components["schemas"]["File"];
1342
+ };
1343
+ };
1344
+ 400: components["responses"]["InvalidRequest"];
1345
+ 401: components["responses"]["Unauthorized"];
1346
+ 404: components["responses"]["NotFound"];
1347
+ };
1348
+ };
1349
+ createTask: {
1350
+ parameters: {
1351
+ query?: never;
1352
+ header?: {
1353
+ /**
1354
+ * @description Makes a retry safe. A request that never got its reply -- a timeout, a
1355
+ * dropped connection -- cannot be known to have failed, so the only sane
1356
+ * move is to retry it; without a key, that retry runs the work twice.
1357
+ *
1358
+ * The first request with a given key is executed and its reply recorded.
1359
+ * Any later request with the same key replays that reply, without doing
1360
+ * the work again. Keys are held for 24 hours and are scoped to the token.
1361
+ *
1362
+ * Reusing a key with a *different* request body is an `idempotency_error`:
1363
+ * it means the client believes it is retrying something it is not.
1364
+ */
1365
+ "Idempotency-Key"?: components["parameters"]["IdempotencyKey"];
1366
+ };
1367
+ path?: never;
1368
+ cookie?: never;
1369
+ };
1370
+ requestBody: {
1371
+ content: {
1372
+ "application/json": components["schemas"]["TaskCreateParams"];
1373
+ };
1374
+ };
1375
+ responses: {
1376
+ /** @description The task is queued. */
1377
+ 202: {
1378
+ headers: {
1379
+ [name: string]: unknown;
1380
+ };
1381
+ content: {
1382
+ "application/json": components["schemas"]["Task"];
1383
+ };
1384
+ };
1385
+ 400: components["responses"]["InvalidRequest"];
1386
+ 401: components["responses"]["Unauthorized"];
1387
+ 409: components["responses"]["Conflict"];
1388
+ 503: components["responses"]["QueueUnreachable"];
1389
+ };
1390
+ };
1391
+ retrieveTask: {
1392
+ parameters: {
1393
+ query?: never;
1394
+ header?: never;
1395
+ path: {
1396
+ task: components["parameters"]["TaskId"];
1397
+ };
1398
+ cookie?: never;
1399
+ };
1400
+ requestBody?: never;
1401
+ responses: {
1402
+ /** @description The task, with its result once it has one. */
1403
+ 200: {
1404
+ headers: {
1405
+ [name: string]: unknown;
1406
+ };
1407
+ content: {
1408
+ "application/json": components["schemas"]["Task"];
1409
+ };
1410
+ };
1411
+ 401: components["responses"]["Unauthorized"];
1412
+ 404: components["responses"]["NotFound"];
1413
+ 503: components["responses"]["QueueUnreachable"];
1414
+ };
1415
+ };
1416
+ retrieveQueue: {
1417
+ parameters: {
1418
+ query?: never;
1419
+ header?: never;
1420
+ path?: never;
1421
+ cookie?: never;
1422
+ };
1423
+ requestBody?: never;
1424
+ responses: {
1425
+ /** @description The queue. */
1426
+ 200: {
1427
+ headers: {
1428
+ [name: string]: unknown;
1429
+ };
1430
+ content: {
1431
+ "application/json": components["schemas"]["Queue"];
1432
+ };
1433
+ };
1434
+ 401: components["responses"]["Unauthorized"];
1435
+ 503: components["responses"]["QueueUnreachable"];
1436
+ };
1437
+ };
1438
+ listImages: {
1439
+ parameters: {
1440
+ query?: never;
1441
+ header?: never;
1442
+ path?: never;
1443
+ cookie?: never;
1444
+ };
1445
+ requestBody?: never;
1446
+ responses: {
1447
+ /** @description The images. */
1448
+ 200: {
1449
+ headers: {
1450
+ [name: string]: unknown;
1451
+ };
1452
+ content: {
1453
+ "application/json": components["schemas"]["ImageList"];
1454
+ };
1455
+ };
1456
+ 401: components["responses"]["Unauthorized"];
1457
+ };
1458
+ };
1459
+ listTenants: {
1460
+ parameters: {
1461
+ query?: never;
1462
+ header?: never;
1463
+ path?: never;
1464
+ cookie?: never;
1465
+ };
1466
+ requestBody?: never;
1467
+ responses: {
1468
+ /** @description The configured tenants. */
1469
+ 200: {
1470
+ headers: {
1471
+ [name: string]: unknown;
1472
+ };
1473
+ content: {
1474
+ "application/json": components["schemas"]["TenantList"];
1475
+ };
1476
+ };
1477
+ 401: components["responses"]["Unauthorized"];
1478
+ 403: components["responses"]["Forbidden"];
1479
+ };
1480
+ };
1481
+ retrieveTenant: {
1482
+ parameters: {
1483
+ query?: never;
1484
+ header?: never;
1485
+ path: {
1486
+ /** @description The tenant namespace, e.g. from a sandbox's `storage.namespace`. */
1487
+ tenant: string;
1488
+ };
1489
+ cookie?: never;
1490
+ };
1491
+ requestBody?: never;
1492
+ responses: {
1493
+ /** @description The tenant. */
1494
+ 200: {
1495
+ headers: {
1496
+ [name: string]: unknown;
1497
+ };
1498
+ content: {
1499
+ "application/json": components["schemas"]["Tenant"];
1500
+ };
1501
+ };
1502
+ 401: components["responses"]["Unauthorized"];
1503
+ 403: components["responses"]["Forbidden"];
1504
+ 404: components["responses"]["NotFound"];
1505
+ };
1506
+ };
1507
+ updateTenant: {
1508
+ parameters: {
1509
+ query?: never;
1510
+ header?: never;
1511
+ path: {
1512
+ /** @description The tenant namespace, e.g. from a sandbox's `storage.namespace`. */
1513
+ tenant: string;
1514
+ };
1515
+ cookie?: never;
1516
+ };
1517
+ requestBody: {
1518
+ content: {
1519
+ "application/json": components["schemas"]["TenantUpdateParams"];
1520
+ };
1521
+ };
1522
+ responses: {
1523
+ /** @description The updated tenant. */
1524
+ 200: {
1525
+ headers: {
1526
+ [name: string]: unknown;
1527
+ };
1528
+ content: {
1529
+ "application/json": components["schemas"]["Tenant"];
1530
+ };
1531
+ };
1532
+ 400: components["responses"]["InvalidRequest"];
1533
+ 401: components["responses"]["Unauthorized"];
1534
+ 403: components["responses"]["Forbidden"];
1535
+ };
1536
+ };
1537
+ retrieveHealth: {
1538
+ parameters: {
1539
+ query?: never;
1540
+ header?: never;
1541
+ path?: never;
1542
+ cookie?: never;
1543
+ };
1544
+ requestBody?: never;
1545
+ responses: {
1546
+ /** @description The daemon is up. */
1547
+ 200: {
1548
+ headers: {
1549
+ [name: string]: unknown;
1550
+ };
1551
+ content: {
1552
+ "application/json": components["schemas"]["Health"];
1553
+ };
1554
+ };
1555
+ };
1556
+ };
1557
+ }