@archildata/api-types 0.0.8 → 0.0.10

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 +175 -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;
@@ -599,7 +650,6 @@ export interface components {
599
650
  CreateSandboxRequest: {
600
651
  vcpu_count?: number;
601
652
  mem_size_mib?: number;
602
- kernel?: string;
603
653
  /**
604
654
  * @description Public Linux OCI image reference. Docker shorthand and tags are accepted; the selected platform manifest is pinned at creation.
605
655
  * @default ubuntu:26.04
@@ -1445,6 +1495,15 @@ export interface components {
1445
1495
  "application/json": components["schemas"]["ErrorResponse"];
1446
1496
  };
1447
1497
  };
1498
+ /** @description The lifecycle transition is temporarily blocked and can be retried */
1499
+ RetryableUnavailable: {
1500
+ headers: {
1501
+ [name: string]: unknown;
1502
+ };
1503
+ content: {
1504
+ "application/json": components["schemas"]["ErrorResponse"];
1505
+ };
1506
+ };
1448
1507
  };
1449
1508
  parameters: {
1450
1509
  /** @description Disk ID (format `dsk-{16 hex chars}`) */
@@ -2255,6 +2314,101 @@ export interface operations {
2255
2314
  500: components["responses"]["InternalError"];
2256
2315
  };
2257
2316
  };
2317
+ pauseSandbox: {
2318
+ parameters: {
2319
+ query?: never;
2320
+ header?: never;
2321
+ path: {
2322
+ /** @description Sandbox UUID */
2323
+ sid: components["parameters"]["SandboxId"];
2324
+ };
2325
+ cookie?: never;
2326
+ };
2327
+ requestBody?: never;
2328
+ responses: {
2329
+ /** @description The sandbox was already inactive */
2330
+ 200: {
2331
+ headers: {
2332
+ [name: string]: unknown;
2333
+ };
2334
+ content: {
2335
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2336
+ };
2337
+ };
2338
+ /** @description The sandbox pause is in progress */
2339
+ 202: {
2340
+ headers: {
2341
+ [name: string]: unknown;
2342
+ };
2343
+ content: {
2344
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2345
+ };
2346
+ };
2347
+ 400: components["responses"]["ValidationError"];
2348
+ 401: components["responses"]["Unauthorized"];
2349
+ 404: components["responses"]["NotFound"];
2350
+ /** @description The sandbox is still starting, or a plain stop is already in progress */
2351
+ 409: {
2352
+ headers: {
2353
+ [name: string]: unknown;
2354
+ };
2355
+ content: {
2356
+ "application/json": components["schemas"]["ErrorResponse"];
2357
+ };
2358
+ };
2359
+ 500: components["responses"]["InternalError"];
2360
+ 503: components["responses"]["RetryableUnavailable"];
2361
+ };
2362
+ };
2363
+ resumeSandbox: {
2364
+ parameters: {
2365
+ query?: {
2366
+ /** @description Hold the request for a completed start or exec result */
2367
+ wait?: components["parameters"]["Wait"];
2368
+ };
2369
+ header?: never;
2370
+ path: {
2371
+ /** @description Sandbox UUID */
2372
+ sid: components["parameters"]["SandboxId"];
2373
+ };
2374
+ cookie?: never;
2375
+ };
2376
+ requestBody?: never;
2377
+ responses: {
2378
+ /** @description The sandbox was already running */
2379
+ 200: {
2380
+ headers: {
2381
+ [name: string]: unknown;
2382
+ };
2383
+ content: {
2384
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2385
+ };
2386
+ };
2387
+ /** @description The sandbox resume is pending */
2388
+ 202: {
2389
+ headers: {
2390
+ [name: string]: unknown;
2391
+ };
2392
+ content: {
2393
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2394
+ };
2395
+ };
2396
+ 400: components["responses"]["ValidationError"];
2397
+ 401: components["responses"]["Unauthorized"];
2398
+ 404: components["responses"]["NotFound"];
2399
+ /** @description The sandbox is not paused, is shutting down, or a cold start is already in progress */
2400
+ 409: {
2401
+ headers: {
2402
+ [name: string]: unknown;
2403
+ };
2404
+ content: {
2405
+ "application/json": components["schemas"]["ErrorResponse"];
2406
+ };
2407
+ };
2408
+ 500: components["responses"]["InternalError"];
2409
+ 503: components["responses"]["RetryableUnavailable"];
2410
+ };
2411
+ };
2258
2412
  startSandbox: {
2259
2413
  parameters: {
2260
2414
  query?: {
@@ -2291,7 +2445,7 @@ export interface operations {
2291
2445
  400: components["responses"]["ValidationError"];
2292
2446
  401: components["responses"]["Unauthorized"];
2293
2447
  404: components["responses"]["NotFound"];
2294
- /** @description The previous VM is still stopping */
2448
+ /** @description The previous VM is stopping or pausing, or a resume is already in progress */
2295
2449
  409: {
2296
2450
  headers: {
2297
2451
  [name: string]: unknown;
@@ -2301,6 +2455,7 @@ export interface operations {
2301
2455
  };
2302
2456
  };
2303
2457
  500: components["responses"]["InternalError"];
2458
+ 503: components["responses"]["RetryableUnavailable"];
2304
2459
  };
2305
2460
  };
2306
2461
  stopSandbox: {
@@ -2336,7 +2491,17 @@ export interface operations {
2336
2491
  400: components["responses"]["ValidationError"];
2337
2492
  401: components["responses"]["Unauthorized"];
2338
2493
  404: components["responses"]["NotFound"];
2494
+ /** @description A pause is already in progress */
2495
+ 409: {
2496
+ headers: {
2497
+ [name: string]: unknown;
2498
+ };
2499
+ content: {
2500
+ "application/json": components["schemas"]["ErrorResponse"];
2501
+ };
2502
+ };
2339
2503
  500: components["responses"]["InternalError"];
2504
+ 503: components["responses"]["RetryableUnavailable"];
2340
2505
  };
2341
2506
  };
2342
2507
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",