@archildata/api-types 0.0.7 → 0.0.9

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 +183 -10
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -431,6 +431,53 @@ export interface paths {
431
431
  patch?: never;
432
432
  trace?: never;
433
433
  };
434
+ "/api/sandboxes/{sid}/pause": {
435
+ parameters: {
436
+ query?: never;
437
+ header?: never;
438
+ path?: never;
439
+ cookie?: never;
440
+ };
441
+ get?: never;
442
+ put?: never;
443
+ /**
444
+ * Pause a sandbox
445
+ * @description Snapshot the CPU & memory state, then stop the VM. The sandbox reports
446
+ * `pausing` until the snapshot commit marker is durable and the VM exits,
447
+ * then reports `paused`. Any in-flight execs are cancelled. A sandbox
448
+ * that is still `pending` must reach `running` before it can be paused.
449
+ * To restore the snapshot, call `/resume`.
450
+ */
451
+ post: operations["pauseSandbox"];
452
+ delete?: never;
453
+ options?: never;
454
+ head?: never;
455
+ patch?: never;
456
+ trace?: never;
457
+ };
458
+ "/api/sandboxes/{sid}/resume": {
459
+ parameters: {
460
+ query?: never;
461
+ header?: never;
462
+ path?: never;
463
+ cookie?: never;
464
+ };
465
+ get?: never;
466
+ put?: never;
467
+ /**
468
+ * Resume a sandbox
469
+ * @description Restores a paused sandbox's committed CPU and memory snapshot.
470
+ * Resuming a running sandbox or a pending resume is idempotent. Only a
471
+ * `paused` sandbox can begin a new resume; `stopped`, `exited`, `failed`,
472
+ * `stopping`, `pausing`, or a pending cold start returns 409.
473
+ */
474
+ post: operations["resumeSandbox"];
475
+ delete?: never;
476
+ options?: never;
477
+ head?: never;
478
+ patch?: never;
479
+ trace?: never;
480
+ };
434
481
  "/api/sandboxes/{sid}/start": {
435
482
  parameters: {
436
483
  query?: never;
@@ -441,10 +488,12 @@ export interface paths {
441
488
  get?: never;
442
489
  put?: never;
443
490
  /**
444
- * Start or restart a sandbox
445
- * @description Cold-boots the sandbox from its persisted configuration and disks. RAM
446
- * and process state are not restored. Starting a pending or running
447
- * sandbox is idempotent; a sandbox that is still stopping returns 409.
491
+ * Cold-start a sandbox
492
+ * @description Cold-boots from the persisted configuration and disks. If the sandbox
493
+ * was paused, its memory snapshot is consumed and discarded before the
494
+ * new VM runs; disk state remains. Starting a running sandbox or a pending
495
+ * cold start is idempotent. A sandbox that is stopping, pausing, or
496
+ * pending a resume returns 409.
448
497
  */
449
498
  post: operations["startSandbox"];
450
499
  delete?: never;
@@ -463,9 +512,11 @@ export interface paths {
463
512
  get?: never;
464
513
  put?: never;
465
514
  /**
466
- * Stop a sandbox
467
- * @description Shuts down the sandbox VM without taking a memory snapshot. The sandbox
468
- * identity, configuration, and disks remain available for a later start.
515
+ * Stop a sandbox without saving memory
516
+ * @description Shuts down the VM without creating a memory snapshot. When the sandbox
517
+ * is paused, this invalidates its committed snapshot and changes it to
518
+ * `stopped`. The sandbox's identity, configuration, and disk state remain
519
+ * available for a later cold start.
469
520
  */
470
521
  post: operations["stopSandbox"];
471
522
  delete?: never;
@@ -529,7 +580,7 @@ export interface components {
529
580
  };
530
581
  };
531
582
  /** @enum {string} */
532
- SandboxState: "pending" | "running" | "stopping" | "stopped" | "exited" | "failed";
583
+ SandboxState: "pending" | "running" | "pausing" | "paused" | "stopping" | "stopped" | "exited" | "failed";
533
584
  Sandbox: {
534
585
  /** Format: uuid */
535
586
  sandbox_id: string;
@@ -539,6 +590,13 @@ export interface components {
539
590
  /** @description Full lifetime budget applied independently to each powered-on session. */
540
591
  max_ttl_seconds: number;
541
592
  max_concurrent_execs: number;
593
+ /** @description OCI reference requested when the sandbox was created. */
594
+ base_image: string;
595
+ /**
596
+ * @description Sandbox CPU architecture.
597
+ * @enum {string}
598
+ */
599
+ platform?: "arm64" | "amd64";
542
600
  endpoints?: components["schemas"]["SandboxEndpoint"][];
543
601
  /** Format: date-time */
544
602
  created_at: string;
@@ -594,7 +652,7 @@ export interface components {
594
652
  mem_size_mib?: number;
595
653
  kernel?: string;
596
654
  /**
597
- * @description Base image for the sandbox root. Currently only `ubuntu:26.04` is supported.
655
+ * @description Public Linux OCI image reference. Docker shorthand and tags are accepted; the selected platform manifest is pinned at creation.
598
656
  * @default ubuntu:26.04
599
657
  */
600
658
  base_image: string;
@@ -1438,6 +1496,15 @@ export interface components {
1438
1496
  "application/json": components["schemas"]["ErrorResponse"];
1439
1497
  };
1440
1498
  };
1499
+ /** @description The lifecycle transition is temporarily blocked and can be retried */
1500
+ RetryableUnavailable: {
1501
+ headers: {
1502
+ [name: string]: unknown;
1503
+ };
1504
+ content: {
1505
+ "application/json": components["schemas"]["ErrorResponse"];
1506
+ };
1507
+ };
1441
1508
  };
1442
1509
  parameters: {
1443
1510
  /** @description Disk ID (format `dsk-{16 hex chars}`) */
@@ -2248,6 +2315,101 @@ export interface operations {
2248
2315
  500: components["responses"]["InternalError"];
2249
2316
  };
2250
2317
  };
2318
+ pauseSandbox: {
2319
+ parameters: {
2320
+ query?: never;
2321
+ header?: never;
2322
+ path: {
2323
+ /** @description Sandbox UUID */
2324
+ sid: components["parameters"]["SandboxId"];
2325
+ };
2326
+ cookie?: never;
2327
+ };
2328
+ requestBody?: never;
2329
+ responses: {
2330
+ /** @description The sandbox was already inactive */
2331
+ 200: {
2332
+ headers: {
2333
+ [name: string]: unknown;
2334
+ };
2335
+ content: {
2336
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2337
+ };
2338
+ };
2339
+ /** @description The sandbox pause is in progress */
2340
+ 202: {
2341
+ headers: {
2342
+ [name: string]: unknown;
2343
+ };
2344
+ content: {
2345
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2346
+ };
2347
+ };
2348
+ 400: components["responses"]["ValidationError"];
2349
+ 401: components["responses"]["Unauthorized"];
2350
+ 404: components["responses"]["NotFound"];
2351
+ /** @description The sandbox is still starting, or a plain stop is already in progress */
2352
+ 409: {
2353
+ headers: {
2354
+ [name: string]: unknown;
2355
+ };
2356
+ content: {
2357
+ "application/json": components["schemas"]["ErrorResponse"];
2358
+ };
2359
+ };
2360
+ 500: components["responses"]["InternalError"];
2361
+ 503: components["responses"]["RetryableUnavailable"];
2362
+ };
2363
+ };
2364
+ resumeSandbox: {
2365
+ parameters: {
2366
+ query?: {
2367
+ /** @description Hold the request for a completed start or exec result */
2368
+ wait?: components["parameters"]["Wait"];
2369
+ };
2370
+ header?: never;
2371
+ path: {
2372
+ /** @description Sandbox UUID */
2373
+ sid: components["parameters"]["SandboxId"];
2374
+ };
2375
+ cookie?: never;
2376
+ };
2377
+ requestBody?: never;
2378
+ responses: {
2379
+ /** @description The sandbox was already running */
2380
+ 200: {
2381
+ headers: {
2382
+ [name: string]: unknown;
2383
+ };
2384
+ content: {
2385
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2386
+ };
2387
+ };
2388
+ /** @description The sandbox resume is pending */
2389
+ 202: {
2390
+ headers: {
2391
+ [name: string]: unknown;
2392
+ };
2393
+ content: {
2394
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2395
+ };
2396
+ };
2397
+ 400: components["responses"]["ValidationError"];
2398
+ 401: components["responses"]["Unauthorized"];
2399
+ 404: components["responses"]["NotFound"];
2400
+ /** @description The sandbox is not paused, is shutting down, or a cold start is already in progress */
2401
+ 409: {
2402
+ headers: {
2403
+ [name: string]: unknown;
2404
+ };
2405
+ content: {
2406
+ "application/json": components["schemas"]["ErrorResponse"];
2407
+ };
2408
+ };
2409
+ 500: components["responses"]["InternalError"];
2410
+ 503: components["responses"]["RetryableUnavailable"];
2411
+ };
2412
+ };
2251
2413
  startSandbox: {
2252
2414
  parameters: {
2253
2415
  query?: {
@@ -2284,7 +2446,7 @@ export interface operations {
2284
2446
  400: components["responses"]["ValidationError"];
2285
2447
  401: components["responses"]["Unauthorized"];
2286
2448
  404: components["responses"]["NotFound"];
2287
- /** @description The previous VM is still stopping */
2449
+ /** @description The previous VM is stopping or pausing, or a resume is already in progress */
2288
2450
  409: {
2289
2451
  headers: {
2290
2452
  [name: string]: unknown;
@@ -2294,6 +2456,7 @@ export interface operations {
2294
2456
  };
2295
2457
  };
2296
2458
  500: components["responses"]["InternalError"];
2459
+ 503: components["responses"]["RetryableUnavailable"];
2297
2460
  };
2298
2461
  };
2299
2462
  stopSandbox: {
@@ -2329,7 +2492,17 @@ export interface operations {
2329
2492
  400: components["responses"]["ValidationError"];
2330
2493
  401: components["responses"]["Unauthorized"];
2331
2494
  404: components["responses"]["NotFound"];
2495
+ /** @description A pause is already in progress */
2496
+ 409: {
2497
+ headers: {
2498
+ [name: string]: unknown;
2499
+ };
2500
+ content: {
2501
+ "application/json": components["schemas"]["ErrorResponse"];
2502
+ };
2503
+ };
2332
2504
  500: components["responses"]["InternalError"];
2505
+ 503: components["responses"]["RetryableUnavailable"];
2333
2506
  };
2334
2507
  };
2335
2508
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",