@archildata/api-types 0.0.13 → 0.0.15

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 (2) hide show
  1. package/index.d.ts +155 -7
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -382,7 +382,7 @@ export interface paths {
382
382
  post?: never;
383
383
  /**
384
384
  * Delete a sandbox
385
- * @description Permanently deletes a stopped, exited, or failed sandbox.
385
+ * @description Permanently deletes a stopped, exited, or failed sandbox and its backing disk. A sandbox with child forks cannot be deleted until those children are deleted, starting with the deepest ones.
386
386
  */
387
387
  delete: operations["deleteSandbox"];
388
388
  options?: never;
@@ -390,6 +390,35 @@ export interface paths {
390
390
  patch?: never;
391
391
  trace?: never;
392
392
  };
393
+ "/api/sandboxes/{sid}/connections": {
394
+ parameters: {
395
+ query?: never;
396
+ header?: never;
397
+ path?: never;
398
+ cookie?: never;
399
+ };
400
+ get?: never;
401
+ put?: never;
402
+ /**
403
+ * Create a direct sandbox connection
404
+ * @description Returns a short-lived WebSocket URL for an interactive shell in a
405
+ * running sandbox. Connecting starts `/bin/sh` with a PTY. The connection
406
+ * has no stored history or reconnect support.
407
+ *
408
+ * The URL contains a signed token that expires at `expires_at`. An open
409
+ * WebSocket can remain connected after the token expires. Clients send
410
+ * input as `{"type":"input","data":"..."}` and terminal size changes as
411
+ * `{"type":"resize","rows":24,"cols":80}`. The server returns terminal
412
+ * output as text frames. Closing the WebSocket ends the shell. Pausing or
413
+ * stopping the sandbox also closes the connection.
414
+ */
415
+ post: operations["createSandboxConnection"];
416
+ delete?: never;
417
+ options?: never;
418
+ head?: never;
419
+ patch?: never;
420
+ trace?: never;
421
+ };
393
422
  "/api/sandboxes/{sid}/execs": {
394
423
  parameters: {
395
424
  query?: never;
@@ -480,6 +509,31 @@ export interface paths {
480
509
  patch?: never;
481
510
  trace?: never;
482
511
  };
512
+ "/api/sandboxes/{sid}/fork": {
513
+ parameters: {
514
+ query?: never;
515
+ header?: never;
516
+ path?: never;
517
+ cookie?: never;
518
+ };
519
+ get?: never;
520
+ put?: never;
521
+ /**
522
+ * Fork a sandbox
523
+ * @description Checkpoints a running source sandbox and creates an isolated writable
524
+ * disk branch. Forks from running or paused sources resume from the
525
+ * source's CPU, memory, and disk state. Forks from stopped sources
526
+ * cold-boot from the saved disk checkpoint. A running source is
527
+ * resumed after its checkpoint; paused and stopped sources remain
528
+ * inactive. Forked sandboxes may themselves be forked.
529
+ */
530
+ post: operations["forkSandbox"];
531
+ delete?: never;
532
+ options?: never;
533
+ head?: never;
534
+ patch?: never;
535
+ trace?: never;
536
+ };
483
537
  "/api/sandboxes/{sid}/resume": {
484
538
  parameters: {
485
539
  query?: never;
@@ -537,11 +591,11 @@ export interface paths {
537
591
  get?: never;
538
592
  put?: never;
539
593
  /**
540
- * Stop a sandbox without saving memory
541
- * @description Shuts down the VM without creating a memory snapshot. When the sandbox
542
- * is paused, this invalidates its committed snapshot and changes it to
543
- * `stopped`. The sandbox's identity, configuration, and disk state remain
544
- * available for a later cold start.
594
+ * Stop a sandbox
595
+ * @description Gracefully shuts down the guest, then checkpoints its disk before
596
+ * entering `stopped`. The sandbox and any forks from it cold-boot from
597
+ * disk state. Stopping a paused sandbox reuses its existing disk
598
+ * checkpoint. In-flight execs receive the guest shutdown signal.
545
599
  */
546
600
  post: operations["stopSandbox"];
547
601
  delete?: never;
@@ -644,6 +698,17 @@ export interface components {
644
698
  port: number;
645
699
  hostname: string;
646
700
  };
701
+ SandboxConnection: {
702
+ /** Format: uri */
703
+ url: string;
704
+ /** Format: date-time */
705
+ expires_at: string;
706
+ };
707
+ ApiResponse_SandboxConnection: {
708
+ /** @example true */
709
+ success: boolean;
710
+ data: components["schemas"]["SandboxConnection"];
711
+ };
647
712
  SandboxPortMapping: {
648
713
  container_port: number;
649
714
  /** @enum {string} */
@@ -693,6 +758,10 @@ export interface components {
693
758
  max_ttl_seconds?: number;
694
759
  max_concurrent_execs?: number;
695
760
  };
761
+ ForkSandboxRequest: {
762
+ /** @description Name for the fork. A random word-list name is generated when omitted. */
763
+ name?: string;
764
+ };
696
765
  SandboxExecRequest: {
697
766
  /** @description Shell command, run via `/bin/sh -c` */
698
767
  command: string;
@@ -2291,7 +2360,42 @@ export interface operations {
2291
2360
  };
2292
2361
  401: components["responses"]["Unauthorized"];
2293
2362
  404: components["responses"]["NotFound"];
2294
- /** @description The sandbox must be stopped, exited, or failed before it can be deleted */
2363
+ /** @description The sandbox must be stopped, exited, or failed and have no child forks. The error includes the number of child disks and up to 10 disk IDs that must be deleted first. */
2364
+ 409: {
2365
+ headers: {
2366
+ [name: string]: unknown;
2367
+ };
2368
+ content: {
2369
+ "application/json": components["schemas"]["ErrorResponse"];
2370
+ };
2371
+ };
2372
+ 500: components["responses"]["InternalError"];
2373
+ };
2374
+ };
2375
+ createSandboxConnection: {
2376
+ parameters: {
2377
+ query?: never;
2378
+ header?: never;
2379
+ path: {
2380
+ /** @description Sandbox UUID */
2381
+ sid: components["parameters"]["SandboxId"];
2382
+ };
2383
+ cookie?: never;
2384
+ };
2385
+ requestBody?: never;
2386
+ responses: {
2387
+ /** @description A short-lived direct connection URL */
2388
+ 200: {
2389
+ headers: {
2390
+ [name: string]: unknown;
2391
+ };
2392
+ content: {
2393
+ "application/json": components["schemas"]["ApiResponse_SandboxConnection"];
2394
+ };
2395
+ };
2396
+ 401: components["responses"]["Unauthorized"];
2397
+ 404: components["responses"]["NotFound"];
2398
+ /** @description The sandbox is not running */
2295
2399
  409: {
2296
2400
  headers: {
2297
2401
  [name: string]: unknown;
@@ -2483,6 +2587,50 @@ export interface operations {
2483
2587
  503: components["responses"]["RetryableUnavailable"];
2484
2588
  };
2485
2589
  };
2590
+ forkSandbox: {
2591
+ parameters: {
2592
+ query?: {
2593
+ /** @description Hold the request for a completed start or exec result */
2594
+ wait?: components["parameters"]["Wait"];
2595
+ };
2596
+ header?: never;
2597
+ path: {
2598
+ /** @description Sandbox UUID */
2599
+ sid: components["parameters"]["SandboxId"];
2600
+ };
2601
+ cookie?: never;
2602
+ };
2603
+ requestBody?: {
2604
+ content: {
2605
+ "application/json": components["schemas"]["ForkSandboxRequest"];
2606
+ };
2607
+ };
2608
+ responses: {
2609
+ /** @description The fork was created and its start is pending */
2610
+ 202: {
2611
+ headers: {
2612
+ [name: string]: unknown;
2613
+ };
2614
+ content: {
2615
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2616
+ };
2617
+ };
2618
+ 400: components["responses"]["ValidationError"];
2619
+ 401: components["responses"]["Unauthorized"];
2620
+ 404: components["responses"]["NotFound"];
2621
+ /** @description The source cannot be paused or its fork checkpoint is unavailable */
2622
+ 409: {
2623
+ headers: {
2624
+ [name: string]: unknown;
2625
+ };
2626
+ content: {
2627
+ "application/json": components["schemas"]["ErrorResponse"];
2628
+ };
2629
+ };
2630
+ 500: components["responses"]["InternalError"];
2631
+ 503: components["responses"]["RetryableUnavailable"];
2632
+ };
2633
+ };
2486
2634
  resumeSandbox: {
2487
2635
  parameters: {
2488
2636
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",