@infrapilot-jur/sdk 0.4.2 → 0.5.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.
package/dist/index.d.cts CHANGED
@@ -363,7 +363,7 @@ interface paths {
363
363
  cookie?: never;
364
364
  };
365
365
  /**
366
- * Get local node identity (admin only)
366
+ * Get local node identity (any authenticated principal)
367
367
  * @description Returns the persistent node id, display name, hostname, mode, and version.
368
368
  */
369
369
  get: operations["getNode"];
@@ -387,7 +387,7 @@ interface paths {
387
387
  cookie?: never;
388
388
  };
389
389
  /**
390
- * Discover local node capabilities (admin only)
390
+ * Discover local node capabilities (any authenticated principal)
391
391
  * @description Read-only probe of local OS features and tooling.
392
392
  * Presence of a binary or device is not proof the feature is operational.
393
393
  */
@@ -408,7 +408,7 @@ interface paths {
408
408
  cookie?: never;
409
409
  };
410
410
  /**
411
- * Get an on-demand local resource snapshot (admin only)
411
+ * Get an on-demand local resource snapshot (admin or viewer)
412
412
  * @description Collects CPU, memory, swap, load, local disk, and host information.
413
413
  * The snapshot is collected synchronously and is not persisted. Memory
414
414
  * `available_bytes` is the memory estimated available to applications;
@@ -433,7 +433,7 @@ interface paths {
433
433
  cookie?: never;
434
434
  };
435
435
  /**
436
- * Get a bounded local process snapshot (admin only)
436
+ * Get a bounded local process snapshot (admin or viewer)
437
437
  * @description Returns process metadata and resource usage collected on demand. The
438
438
  * response is limited to 100 processes by default and may be requested
439
439
  * with a limit between 1 and 500. Arguments, environment, executable
@@ -628,6 +628,45 @@ interface paths {
628
628
  patch?: never;
629
629
  trace?: never;
630
630
  };
631
+ "/api/v1/node/kvm/{uuid}/metrics": {
632
+ parameters: {
633
+ query?: never;
634
+ header?: never;
635
+ path?: never;
636
+ cookie?: never;
637
+ };
638
+ /**
639
+ * Get an on-demand aggregated KVM live metrics sample
640
+ * @description Returns one `KvmDomainMetrics` sample for the domain (LM1 engine via
641
+ * `GetDomainMetrics`). Reuses the existing CPU/memory/disks/network collectors
642
+ * and shared rate caches; concurrent callers for the same UUID share a single
643
+ * in-flight collect (`singleflight`). Requires `kvm:read`.
644
+ *
645
+ * `collected_at` is the wall time when this metrics sample was assembled
646
+ * (not refreshed when serving concurrent singleflight waiters after the
647
+ * producer finishes). `sample_interval_ns` is the effective wall interval
648
+ * between successive metrics samples for this UUID (null on first/invalid).
649
+ *
650
+ * Subsystem rates (CPU %, disk B/s, NIC B/s) use each collector's own sample
651
+ * baselines and intervals — they are not recomputed from `sample_interval_ns`.
652
+ * Collectors run sequentially; the sample is not an atomic snapshot of all
653
+ * subsystems at one libvirt instant.
654
+ *
655
+ * Unavailable rates are null (never fabricated as 0). Observed zero activity
656
+ * is reported as 0. Partial collector failures appear in `warnings` while
657
+ * successful components remain present. Total failures use platform error
658
+ * mapping (400/404/502). No privileged operation audit is emitted for this
659
+ * read path.
660
+ */
661
+ get: operations["kvmDomainMetrics"];
662
+ put?: never;
663
+ post?: never;
664
+ delete?: never;
665
+ options?: never;
666
+ head?: never;
667
+ patch?: never;
668
+ trace?: never;
669
+ };
631
670
  "/api/v1/node/kvm/{uuid}/start": {
632
671
  parameters: {
633
672
  query?: never;
@@ -641,7 +680,9 @@ interface paths {
641
680
  * Start a libvirt domain
642
681
  * @description Starts a defined domain (`DomainCreate`) looked up by UUID. Requires
643
682
  * `kvm:power` for client keys; Authelia viewers are denied. Admins always
644
- * allowed.
683
+ * allowed. Inspect `outcome` (`accepted`/`completed`); 504 `KVM_INDETERMINATE`
684
+ * means the result could not be confirmed after a possible send — re-read state,
685
+ * do not blindly retry.
645
686
  */
646
687
  post: operations["startNodeKvmDomain"];
647
688
  delete?: never;
@@ -662,6 +703,9 @@ interface paths {
662
703
  /**
663
704
  * Gracefully stop a libvirt domain
664
705
  * @description Requests ACPI shutdown (`DomainShutdown`) by UUID. Requires `kvm:power`.
706
+ * A 200 means libvirt accepted the request (or the domain was already shutoff/shutdown);
707
+ * it does not wait for the guest to finish powering off. Inspect `outcome`/`state`
708
+ * and re-read the domain. There is no separate `/shutdown` endpoint.
665
709
  */
666
710
  post: operations["stopNodeKvmDomain"];
667
711
  delete?: never;
@@ -682,6 +726,7 @@ interface paths {
682
726
  /**
683
727
  * Reboot a libvirt domain
684
728
  * @description Requests reboot (`DomainReboot`) by UUID. Requires `kvm:power`.
729
+ * A 200 means libvirt accepted the request; inspect `outcome` and re-read state.
685
730
  */
686
731
  post: operations["rebootNodeKvmDomain"];
687
732
  delete?: never;
@@ -690,6 +735,95 @@ interface paths {
690
735
  patch?: never;
691
736
  trace?: never;
692
737
  };
738
+ "/api/v1/node/kvm/{uuid}/force-stop": {
739
+ parameters: {
740
+ query?: never;
741
+ header?: never;
742
+ path?: never;
743
+ cookie?: never;
744
+ };
745
+ get?: never;
746
+ put?: never;
747
+ /**
748
+ * Force-stop a libvirt domain
749
+ * @description Abruptly terminates the domain process (`DomainDestroy`) by UUID while
750
+ * preserving the domain definition and disks. This is not domain deletion.
751
+ * Risk: unsaved guest data loss and possible guest filesystem corruption.
752
+ * Requires `kvm:power:destructive` (does not imply `kvm:power`; audited as
753
+ * `node.kvm.force-stop`). A 200 with `outcome=accepted` means libvirt
754
+ * accepted the destroy request.
755
+ */
756
+ post: operations["forceStopNodeKvmDomain"];
757
+ delete?: never;
758
+ options?: never;
759
+ head?: never;
760
+ patch?: never;
761
+ trace?: never;
762
+ };
763
+ "/api/v1/node/kvm/{uuid}/pause": {
764
+ parameters: {
765
+ query?: never;
766
+ header?: never;
767
+ path?: never;
768
+ cookie?: never;
769
+ };
770
+ get?: never;
771
+ put?: never;
772
+ /**
773
+ * Pause a libvirt domain
774
+ * @description Suspends vCPU execution (`DomainSuspend`). Not shutdown, managed save, or
775
+ * host suspend. Requires `kvm:power`.
776
+ */
777
+ post: operations["pauseNodeKvmDomain"];
778
+ delete?: never;
779
+ options?: never;
780
+ head?: never;
781
+ patch?: never;
782
+ trace?: never;
783
+ };
784
+ "/api/v1/node/kvm/{uuid}/resume": {
785
+ parameters: {
786
+ query?: never;
787
+ header?: never;
788
+ path?: never;
789
+ cookie?: never;
790
+ };
791
+ get?: never;
792
+ put?: never;
793
+ /**
794
+ * Resume a paused libvirt domain
795
+ * @description Resumes a paused domain (`DomainResume`). Not a substitute for start.
796
+ * Requires `kvm:power`.
797
+ */
798
+ post: operations["resumeNodeKvmDomain"];
799
+ delete?: never;
800
+ options?: never;
801
+ head?: never;
802
+ patch?: never;
803
+ trace?: never;
804
+ };
805
+ "/api/v1/node/kvm/{uuid}/reset": {
806
+ parameters: {
807
+ query?: never;
808
+ header?: never;
809
+ path?: never;
810
+ cookie?: never;
811
+ };
812
+ get?: never;
813
+ put?: never;
814
+ /**
815
+ * Hard-reset a libvirt domain
816
+ * @description Abrupt CPU reset (`DomainReset`). Distinct from graceful reboot.
817
+ * Risk: unsaved guest data loss. Requires `kvm:power:destructive` (does not
818
+ * imply `kvm:power`; audited as `node.kvm.reset`).
819
+ */
820
+ post: operations["resetNodeKvmDomain"];
821
+ delete?: never;
822
+ options?: never;
823
+ head?: never;
824
+ patch?: never;
825
+ trace?: never;
826
+ };
693
827
  "/api/v1/auth/me": {
694
828
  parameters: {
695
829
  query?: never;
@@ -1098,8 +1232,12 @@ interface components {
1098
1232
  next_cursor?: string;
1099
1233
  limit: number;
1100
1234
  };
1101
- /** @enum {string} */
1102
- ClientScope: "domains:read" | "domains:write" | "domains:delete" | "domains:health" | "domains:preview" | "kvm:read" | "kvm:power";
1235
+ /**
1236
+ * @description Issued API key scopes (exact match). `kvm:power` covers start/stop/reboot/pause/resume.
1237
+ * `kvm:power:destructive` covers force-stop and reset only; it is independent of `kvm:power`.
1238
+ * @enum {string}
1239
+ */
1240
+ ClientScope: "domains:read" | "domains:write" | "domains:delete" | "domains:health" | "domains:preview" | "kvm:read" | "kvm:power" | "kvm:power:destructive";
1103
1241
  Client: {
1104
1242
  id: string;
1105
1243
  name: string;
@@ -1207,8 +1345,12 @@ interface components {
1207
1345
  type: "admin" | "viewer" | "client";
1208
1346
  username?: string;
1209
1347
  groups?: string[];
1210
- /** @enum {string} */
1211
- auth_method?: "authelia" | "api_key";
1348
+ /**
1349
+ * @description How the principal was established. `bootstrap` is the INFRAPILOT_API_KEY break-glass
1350
+ * admin bearer; `api_key` is a persisted infra_live_* client key; `authelia` is Forward Auth.
1351
+ * @enum {string}
1352
+ */
1353
+ auth_method?: "authelia" | "api_key" | "bootstrap";
1212
1354
  client_id?: string;
1213
1355
  key_id?: string;
1214
1356
  scopes?: components["schemas"]["ClientScope"][];
@@ -1426,8 +1568,12 @@ interface components {
1426
1568
  * @enum {string|null}
1427
1569
  */
1428
1570
  memory_used_source?: "guest" | "rss" | "estimated" | null;
1429
- /** @description Power actions allowed by domain state and caller authorization (kvm:power). */
1430
- allowed_actions: ("start" | "stop" | "reboot")[];
1571
+ /**
1572
+ * @description Power actions suggested for the observed domain state and the caller's scopes.
1573
+ * Conventional actions require `kvm:power`; force-stop/reset require
1574
+ * `kvm:power:destructive`. Hint only — revalidated on execute.
1575
+ */
1576
+ allowed_actions: ("start" | "stop" | "reboot" | "force-stop" | "pause" | "resume" | "reset")[];
1431
1577
  warnings: components["schemas"]["ResourceWarning"][];
1432
1578
  };
1433
1579
  NodeKvmVCPUStat: {
@@ -1586,6 +1732,9 @@ interface components {
1586
1732
  /** @description Server-side rate from samples (≥1s, ≤120s TTL). Null when unavailable. */
1587
1733
  rx_bytes_per_sec?: number | null;
1588
1734
  tx_bytes_per_sec?: number | null;
1735
+ /** @description Server-side RX packet rate. Null when unavailable — never fabricated as 0. */
1736
+ rx_packets_per_sec?: number | null;
1737
+ tx_packets_per_sec?: number | null;
1589
1738
  };
1590
1739
  NodeKvmDomainNetwork: {
1591
1740
  node_id: string;
@@ -1604,6 +1753,104 @@ interface components {
1604
1753
  cores?: number | null;
1605
1754
  threads?: number | null;
1606
1755
  };
1756
+ /** @description On-demand aggregated live sample (LM1). Rate fields are null when a valid delta is unavailable. Disk `devices[].source` image paths are omitted. */
1757
+ NodeKvmDomainMetrics: {
1758
+ node_id: string;
1759
+ /**
1760
+ * Format: date-time
1761
+ * @description Wall time when this metrics sample was assembled.
1762
+ */
1763
+ collected_at: string;
1764
+ /** Format: uuid */
1765
+ uuid: string;
1766
+ name: string;
1767
+ state: string;
1768
+ /**
1769
+ * Format: int64
1770
+ * @description Effective wall interval between successive GetDomainMetrics samples for this UUID (≥1s, ≤120s). Null on first sample or invalid interval. Not the denominator used for subsystem rate math.
1771
+ */
1772
+ sample_interval_ns?: number | null;
1773
+ cpu: components["schemas"]["NodeKvmMetricsCPU"];
1774
+ memory: components["schemas"]["NodeKvmMetricsMemory"];
1775
+ disk: components["schemas"]["NodeKvmMetricsDisk"];
1776
+ network: components["schemas"]["NodeKvmMetricsNetwork"];
1777
+ availability: components["schemas"]["NodeKvmMetricsAvailability"];
1778
+ warnings: components["schemas"]["ResourceWarning"][];
1779
+ };
1780
+ NodeKvmMetricsCPU: {
1781
+ vcpus?: number | null;
1782
+ /**
1783
+ * Format: int64
1784
+ * @description Cumulative CPU time (ns). Prefer server-side usage_percent over browser deltas.
1785
+ */
1786
+ cpu_time_ns?: number | null;
1787
+ /** @description Normalized VM capacity utilization 0–100: delta_cpu_time_ns / (delta_wall_ns × vcpus) × 100. */
1788
+ usage_percent?: number | null;
1789
+ /** @description Per-vCPU utilization when DomainGetVcpus times are available; null entries when unknown. */
1790
+ vcpu_usage_percent: (number | null)[];
1791
+ };
1792
+ NodeKvmMetricsMemory: {
1793
+ /** Format: int64 */
1794
+ assigned_bytes?: number | null;
1795
+ /** Format: int64 */
1796
+ used_bytes?: number | null;
1797
+ /** Format: int64 */
1798
+ available_bytes?: number | null;
1799
+ /**
1800
+ * Format: int64
1801
+ * @description Host-side QEMU RSS — not guest memory usage.
1802
+ */
1803
+ rss_bytes?: number | null;
1804
+ used_percent?: number | null;
1805
+ /** @enum {string|null} */
1806
+ memory_used_source?: "guest" | "estimated" | "rss" | null;
1807
+ };
1808
+ NodeKvmMetricsDisk: {
1809
+ devices: components["schemas"]["NodeKvmDisk"][];
1810
+ /** Format: int64 */
1811
+ read_bytes_total?: number | null;
1812
+ /** Format: int64 */
1813
+ write_bytes_total?: number | null;
1814
+ /** Format: int64 */
1815
+ read_ops_total?: number | null;
1816
+ /** Format: int64 */
1817
+ write_ops_total?: number | null;
1818
+ read_bytes_per_sec_total?: number | null;
1819
+ write_bytes_per_sec_total?: number | null;
1820
+ read_iops_total?: number | null;
1821
+ write_iops_total?: number | null;
1822
+ };
1823
+ /** @description RX/TX follow libvirt DomainInterfaceStats (host view of the guest NIC / tap). Totals sum devices with present values only. */
1824
+ NodeKvmMetricsNetwork: {
1825
+ interfaces: components["schemas"]["NodeKvmNIC"][];
1826
+ /** Format: int64 */
1827
+ rx_bytes_total?: number | null;
1828
+ /** Format: int64 */
1829
+ tx_bytes_total?: number | null;
1830
+ /** Format: int64 */
1831
+ rx_packets_total?: number | null;
1832
+ /** Format: int64 */
1833
+ tx_packets_total?: number | null;
1834
+ rx_bytes_per_sec_total?: number | null;
1835
+ tx_bytes_per_sec_total?: number | null;
1836
+ rx_packets_per_sec_total?: number | null;
1837
+ tx_packets_per_sec_total?: number | null;
1838
+ /** Format: int64 */
1839
+ rx_errors_total?: number | null;
1840
+ /** Format: int64 */
1841
+ tx_errors_total?: number | null;
1842
+ /** Format: int64 */
1843
+ rx_drops_total?: number | null;
1844
+ /** Format: int64 */
1845
+ tx_drops_total?: number | null;
1846
+ };
1847
+ NodeKvmMetricsAvailability: {
1848
+ domain_active: boolean;
1849
+ cpu_rates: boolean;
1850
+ memory_used: boolean;
1851
+ disk_rates: boolean;
1852
+ network_rates: boolean;
1853
+ };
1607
1854
  NodeKvmDomainConfig: {
1608
1855
  node_id: string;
1609
1856
  /** Format: date-time */
@@ -1640,8 +1887,17 @@ interface components {
1640
1887
  /** @description Domain name at the time of the action (UX). */
1641
1888
  name: string;
1642
1889
  /** @enum {string} */
1643
- action: "start" | "stop" | "reboot";
1890
+ action: "start" | "stop" | "reboot" | "force-stop" | "pause" | "resume" | "reset";
1644
1891
  state: string;
1892
+ /**
1893
+ * @description accepted = libvirt accepted the mutation (guest may still be transitioning);
1894
+ * completed = idempotent/no-op because state already matched intent;
1895
+ * indeterminate = confirmation unavailable (typically returned as HTTP 504).
1896
+ * @enum {string}
1897
+ */
1898
+ outcome?: "accepted" | "completed" | "indeterminate";
1899
+ /** @description True when the operation was accepted or completed without error. */
1900
+ accepted?: boolean;
1645
1901
  };
1646
1902
  NodeKvmDomain: {
1647
1903
  name: string;
@@ -1672,6 +1928,14 @@ interface components {
1672
1928
  * @enum {string|null}
1673
1929
  */
1674
1930
  memory_used_source?: "guest" | "rss" | "estimated" | null;
1931
+ /**
1932
+ * @description Power actions suggested for the observed domain state and the caller's scopes
1933
+ * (same authority as domain detail). Conventional actions require `kvm:power`;
1934
+ * force-stop/reset require `kvm:power:destructive`. Hint only — revalidated on
1935
+ * execute. Computed during inventory collect from DomainGetInfo state (no per-VM
1936
+ * extra HTTP/libvirt round-trips).
1937
+ */
1938
+ allowed_actions: ("start" | "stop" | "reboot" | "force-stop" | "pause" | "resume" | "reset")[];
1675
1939
  };
1676
1940
  NodeKvm: {
1677
1941
  node_id: string;
@@ -1778,6 +2042,18 @@ interface components {
1778
2042
  "application/json": components["schemas"]["Error"];
1779
2043
  };
1780
2044
  };
2045
+ /**
2046
+ * @description Operation timed out or result is indeterminate after a possible mutation send
2047
+ * (e.g. KVM_INDETERMINATE). Re-read resource state; do not auto-retry mutations.
2048
+ */
2049
+ GatewayTimeout: {
2050
+ headers: {
2051
+ [name: string]: unknown;
2052
+ };
2053
+ content: {
2054
+ "application/json": components["schemas"]["Error"];
2055
+ };
2056
+ };
1781
2057
  };
1782
2058
  parameters: {
1783
2059
  /** @description Stable libvirt domain UUID (not the temporary numeric domain id). */
@@ -1826,7 +2102,7 @@ interface operations {
1826
2102
  /**
1827
2103
  * @example {
1828
2104
  * "status": "ok",
1829
- * "version": "0.2.16"
2105
+ * "version": "0.2.18"
1830
2106
  * }
1831
2107
  */
1832
2108
  "application/json": components["schemas"]["Health"];
@@ -2832,6 +3108,34 @@ interface operations {
2832
3108
  502: components["responses"]["BadGateway"];
2833
3109
  };
2834
3110
  };
3111
+ kvmDomainMetrics: {
3112
+ parameters: {
3113
+ query?: never;
3114
+ header?: never;
3115
+ path: {
3116
+ /** @description Stable libvirt domain UUID (not the temporary numeric domain id). */
3117
+ uuid: components["parameters"]["KvmDomainUUID"];
3118
+ };
3119
+ cookie?: never;
3120
+ };
3121
+ requestBody?: never;
3122
+ responses: {
3123
+ /** @description Aggregated live metrics sample */
3124
+ 200: {
3125
+ headers: {
3126
+ [name: string]: unknown;
3127
+ };
3128
+ content: {
3129
+ "application/json": components["schemas"]["NodeKvmDomainMetrics"];
3130
+ };
3131
+ };
3132
+ 400: components["responses"]["BadRequest"];
3133
+ 401: components["responses"]["Unauthorized"];
3134
+ 403: components["responses"]["Forbidden"];
3135
+ 404: components["responses"]["NotFound"];
3136
+ 502: components["responses"]["BadGateway"];
3137
+ };
3138
+ };
2835
3139
  startNodeKvmDomain: {
2836
3140
  parameters: {
2837
3141
  query?: never;
@@ -2857,7 +3161,9 @@ interface operations {
2857
3161
  401: components["responses"]["Unauthorized"];
2858
3162
  403: components["responses"]["Forbidden"];
2859
3163
  404: components["responses"]["NotFound"];
3164
+ 409: components["responses"]["Conflict"];
2860
3165
  502: components["responses"]["BadGateway"];
3166
+ 504: components["responses"]["GatewayTimeout"];
2861
3167
  };
2862
3168
  };
2863
3169
  stopNodeKvmDomain: {
@@ -2885,7 +3191,9 @@ interface operations {
2885
3191
  401: components["responses"]["Unauthorized"];
2886
3192
  403: components["responses"]["Forbidden"];
2887
3193
  404: components["responses"]["NotFound"];
3194
+ 409: components["responses"]["Conflict"];
2888
3195
  502: components["responses"]["BadGateway"];
3196
+ 504: components["responses"]["GatewayTimeout"];
2889
3197
  };
2890
3198
  };
2891
3199
  rebootNodeKvmDomain: {
@@ -2913,7 +3221,129 @@ interface operations {
2913
3221
  401: components["responses"]["Unauthorized"];
2914
3222
  403: components["responses"]["Forbidden"];
2915
3223
  404: components["responses"]["NotFound"];
3224
+ 409: components["responses"]["Conflict"];
3225
+ 502: components["responses"]["BadGateway"];
3226
+ 504: components["responses"]["GatewayTimeout"];
3227
+ };
3228
+ };
3229
+ forceStopNodeKvmDomain: {
3230
+ parameters: {
3231
+ query?: never;
3232
+ header?: never;
3233
+ path: {
3234
+ /** @description Stable libvirt domain UUID (not the temporary numeric domain id). */
3235
+ uuid: components["parameters"]["KvmDomainUUID"];
3236
+ };
3237
+ cookie?: never;
3238
+ };
3239
+ requestBody?: never;
3240
+ responses: {
3241
+ /** @description Power action result */
3242
+ 200: {
3243
+ headers: {
3244
+ [name: string]: unknown;
3245
+ };
3246
+ content: {
3247
+ "application/json": components["schemas"]["NodeKvmPowerResult"];
3248
+ };
3249
+ };
3250
+ 400: components["responses"]["BadRequest"];
3251
+ 401: components["responses"]["Unauthorized"];
3252
+ 403: components["responses"]["Forbidden"];
3253
+ 404: components["responses"]["NotFound"];
3254
+ 409: components["responses"]["Conflict"];
2916
3255
  502: components["responses"]["BadGateway"];
3256
+ 504: components["responses"]["GatewayTimeout"];
3257
+ };
3258
+ };
3259
+ pauseNodeKvmDomain: {
3260
+ parameters: {
3261
+ query?: never;
3262
+ header?: never;
3263
+ path: {
3264
+ /** @description Stable libvirt domain UUID (not the temporary numeric domain id). */
3265
+ uuid: components["parameters"]["KvmDomainUUID"];
3266
+ };
3267
+ cookie?: never;
3268
+ };
3269
+ requestBody?: never;
3270
+ responses: {
3271
+ /** @description Power action result */
3272
+ 200: {
3273
+ headers: {
3274
+ [name: string]: unknown;
3275
+ };
3276
+ content: {
3277
+ "application/json": components["schemas"]["NodeKvmPowerResult"];
3278
+ };
3279
+ };
3280
+ 400: components["responses"]["BadRequest"];
3281
+ 401: components["responses"]["Unauthorized"];
3282
+ 403: components["responses"]["Forbidden"];
3283
+ 404: components["responses"]["NotFound"];
3284
+ 409: components["responses"]["Conflict"];
3285
+ 502: components["responses"]["BadGateway"];
3286
+ 504: components["responses"]["GatewayTimeout"];
3287
+ };
3288
+ };
3289
+ resumeNodeKvmDomain: {
3290
+ parameters: {
3291
+ query?: never;
3292
+ header?: never;
3293
+ path: {
3294
+ /** @description Stable libvirt domain UUID (not the temporary numeric domain id). */
3295
+ uuid: components["parameters"]["KvmDomainUUID"];
3296
+ };
3297
+ cookie?: never;
3298
+ };
3299
+ requestBody?: never;
3300
+ responses: {
3301
+ /** @description Power action result */
3302
+ 200: {
3303
+ headers: {
3304
+ [name: string]: unknown;
3305
+ };
3306
+ content: {
3307
+ "application/json": components["schemas"]["NodeKvmPowerResult"];
3308
+ };
3309
+ };
3310
+ 400: components["responses"]["BadRequest"];
3311
+ 401: components["responses"]["Unauthorized"];
3312
+ 403: components["responses"]["Forbidden"];
3313
+ 404: components["responses"]["NotFound"];
3314
+ 409: components["responses"]["Conflict"];
3315
+ 502: components["responses"]["BadGateway"];
3316
+ 504: components["responses"]["GatewayTimeout"];
3317
+ };
3318
+ };
3319
+ resetNodeKvmDomain: {
3320
+ parameters: {
3321
+ query?: never;
3322
+ header?: never;
3323
+ path: {
3324
+ /** @description Stable libvirt domain UUID (not the temporary numeric domain id). */
3325
+ uuid: components["parameters"]["KvmDomainUUID"];
3326
+ };
3327
+ cookie?: never;
3328
+ };
3329
+ requestBody?: never;
3330
+ responses: {
3331
+ /** @description Power action result */
3332
+ 200: {
3333
+ headers: {
3334
+ [name: string]: unknown;
3335
+ };
3336
+ content: {
3337
+ "application/json": components["schemas"]["NodeKvmPowerResult"];
3338
+ };
3339
+ };
3340
+ 400: components["responses"]["BadRequest"];
3341
+ 401: components["responses"]["Unauthorized"];
3342
+ 403: components["responses"]["Forbidden"];
3343
+ 404: components["responses"]["NotFound"];
3344
+ 409: components["responses"]["Conflict"];
3345
+ 502: components["responses"]["BadGateway"];
3346
+ 504: components["responses"]["GatewayTimeout"];
2917
3347
  };
2918
3348
  };
2919
3349
  getAuthMe: {
@@ -3636,12 +4066,24 @@ declare class DomainsResource {
3636
4066
  type NodeKvmDomain = components["schemas"]["NodeKvmDomain"];
3637
4067
  type NodeKvm = components["schemas"]["NodeKvm"];
3638
4068
  type NodeKvmPowerResult = components["schemas"]["NodeKvmPowerResult"];
4069
+ /** Observed domain power action names from OpenAPI `allowed_actions` / power `action`. */
4070
+ type NodeKvmAllowedAction = NonNullable<components["schemas"]["NodeKvmDomainDetail"]["allowed_actions"]>[number];
4071
+ /** Backend outcome for a power mutation (`accepted` | `completed` | `indeterminate`). */
4072
+ type NodeKvmPowerOutcome = NonNullable<NodeKvmPowerResult["outcome"]>;
3639
4073
  type NodeKvmDomainDetail = components["schemas"]["NodeKvmDomainDetail"];
3640
4074
  type NodeKvmDomainCPU = components["schemas"]["NodeKvmDomainCPU"];
3641
4075
  type NodeKvmDomainMemory = components["schemas"]["NodeKvmDomainMemory"];
3642
4076
  type NodeKvmDomainDisks = components["schemas"]["NodeKvmDomainDisks"];
3643
4077
  type NodeKvmDomainNetwork = components["schemas"]["NodeKvmDomainNetwork"];
3644
4078
  type NodeKvmDomainConfig = components["schemas"]["NodeKvmDomainConfig"];
4079
+ type NodeKvmDomainMetrics = components["schemas"]["NodeKvmDomainMetrics"];
4080
+ type NodeKvmMetricsCPU = components["schemas"]["NodeKvmMetricsCPU"];
4081
+ type NodeKvmMetricsMemory = components["schemas"]["NodeKvmMetricsMemory"];
4082
+ type NodeKvmMetricsDisk = components["schemas"]["NodeKvmMetricsDisk"];
4083
+ type NodeKvmMetricsNetwork = components["schemas"]["NodeKvmMetricsNetwork"];
4084
+ type NodeKvmMetricsAvailability = components["schemas"]["NodeKvmMetricsAvailability"];
4085
+ type NodeKvmDisk = components["schemas"]["NodeKvmDisk"];
4086
+ type NodeKvmNIC = components["schemas"]["NodeKvmNIC"];
3645
4087
  /**
3646
4088
  * Nested KVM/libvirt surface under `infra.node.kvm`.
3647
4089
  */
@@ -3656,9 +4098,52 @@ declare class NodeKvmResource {
3656
4098
  disks(uuid: string, ctx?: RequestContext): Promise<NodeKvmDomainDisks>;
3657
4099
  network(uuid: string, ctx?: RequestContext): Promise<NodeKvmDomainNetwork>;
3658
4100
  config(uuid: string, ctx?: RequestContext): Promise<NodeKvmDomainConfig>;
4101
+ /**
4102
+ * On-demand aggregated live metrics sample (`kvmDomainMetrics`).
4103
+ * Requires `kvm:read`. Pass `ctx.signal` / `ctx.timeoutMs` for Panel cancellation.
4104
+ * Does not poll, retry, or recompute server-side rates.
4105
+ */
4106
+ metrics(uuid: string, ctx?: RequestContext): Promise<NodeKvmDomainMetrics>;
4107
+ /**
4108
+ * Start a defined domain (`DomainCreate`). Requires `kvm:power`.
4109
+ * A successful response means libvirt accepted the request (see `outcome`);
4110
+ * it does not fabricate guest readiness. No automatic retries.
4111
+ */
3659
4112
  start(uuid: string, ctx?: RequestContext): Promise<NodeKvmPowerResult>;
4113
+ /**
4114
+ * Request graceful ACPI shutdown (`DomainShutdown`). Requires `kvm:power`.
4115
+ * Does not guarantee immediate shutoff — inspect `outcome`/`state` and re-read.
4116
+ * There is no `shutdown()` helper; use `stop`. No automatic retries.
4117
+ */
3660
4118
  stop(uuid: string, ctx?: RequestContext): Promise<NodeKvmPowerResult>;
4119
+ /**
4120
+ * Request reboot (`DomainReboot`). Requires `kvm:power`.
4121
+ * Acceptance ≠ guest finished rebooting. No automatic retries.
4122
+ */
3661
4123
  reboot(uuid: string, ctx?: RequestContext): Promise<NodeKvmPowerResult>;
4124
+ /**
4125
+ * Abruptly terminate the domain process (`DomainDestroy`) — not domain deletion.
4126
+ * Preserves definition and disks. Risk: unsaved guest data / filesystem corruption.
4127
+ * HTTP path uses `force-stop`; this method is `forceStop`. Requires `kvm:power:destructive`.
4128
+ * No fallback to `stop`. No automatic retries.
4129
+ */
4130
+ forceStop(uuid: string, ctx?: RequestContext): Promise<NodeKvmPowerResult>;
4131
+ /**
4132
+ * Suspend vCPU execution (`DomainSuspend`). Not shutdown or managed save.
4133
+ * Requires `kvm:power`. No automatic retries.
4134
+ */
4135
+ pause(uuid: string, ctx?: RequestContext): Promise<NodeKvmPowerResult>;
4136
+ /**
4137
+ * Resume a paused domain (`DomainResume`). Not a substitute for `start`.
4138
+ * Requires `kvm:power`. No automatic retries.
4139
+ */
4140
+ resume(uuid: string, ctx?: RequestContext): Promise<NodeKvmPowerResult>;
4141
+ /**
4142
+ * Abrupt CPU reset (`DomainReset`). Distinct from graceful `reboot`.
4143
+ * Risk: unsaved guest data loss. Requires `kvm:power:destructive`.
4144
+ * No fallback to `reboot`. No automatic retries.
4145
+ */
4146
+ reset(uuid: string, ctx?: RequestContext): Promise<NodeKvmPowerResult>;
3662
4147
  }
3663
4148
 
3664
4149
  type NodeIdentity = components["schemas"]["NodeIdentity"];
@@ -3797,7 +4282,7 @@ declare class InfraPilotTransportError extends InfraPilotError {
3797
4282
  }
3798
4283
 
3799
4284
  declare const openapiSourcePath = "../../services/domains/docs/openapi.yaml";
3800
- declare const openapiSha256 = "e0f63388d34fecd9bb8546ed8c265512e7be27d4f4da4a768c98653c0820c2b9";
3801
- declare const generatedAt = "2026-12-02T14:05:39.741Z";
4285
+ declare const openapiSha256 = "08a921bdaa0214b92f54bb88d6e535fd343e9b0915197c572290ea797de47ac7";
4286
+ declare const generatedAt = "08a921bdaa0214b92f54bb88d6e535fd343e9b0915197c572290ea797de47ac7";
3802
4287
 
3803
- export { type APIKeyCreateInput, type APIKeyCreated, type APIKeyListResponse, type APIKeyPublic, type APIKeyResponse, type APIKeyRotated, type APIKeyUpdateInput, type AuthErrorCode, AuthErrorCodes, type AuthMeResponse, type AuthMode, type BackupListResponse, type BackupRestoreResponse, type CaddyStatusResponse, type CapabilityStatus, type Client, type ClientCreateInput, type ClientListResponse, type ClientResponse, type ClientScope, type ClientUpdateInput, type CredentialsMode, type DetailedHealth, type Domain, type DomainConfigResponse, type DomainCreateInput, type DomainDeleteResponse, type DomainListResponse, type DomainMutationResponse, type DomainProbeResponse, type DomainResponse, type DomainUpdateInput, type Health, InfraPilot, InfraPilotError, type InfraPilotErrorBody, InfraPilotHttpError, type InfraPilotOptions, InfraPilotTransportError, type ListAPIKeysParams, type ListCaddyLogsParams, type ListClientsParams, type ListOperationsParams, type ListProcessesParams, type LogPage, type NodeCapabilitiesReport, type NodeCapability, type NodeIdentity, type NodeKvm, type NodeKvmDomain, type NodeKvmDomainCPU, type NodeKvmDomainConfig, type NodeKvmDomainDetail, type NodeKvmDomainDisks, type NodeKvmDomainMemory, type NodeKvmDomainNetwork, type NodeKvmPowerResult, NodeKvmResource, type NodeNetwork, type NodeNetworkAddress, type NodeNetworkInterface, type NodeProcess, type NodeProcesses, type NodeResources, type NodeResponse, type NodeService, type NodeServices, type NodeUpdateInput, type OperationsPage, type PreviewCreateRequest, type PreviewDeleteRequest, type PreviewRequest, type PreviewResponse, type PreviewUpdateRequest, type Principal, type RequestContext, type ResourceWarning, type components, generatedAt, openapiSha256, openapiSourcePath, type operations, type paths };
4288
+ export { type APIKeyCreateInput, type APIKeyCreated, type APIKeyListResponse, type APIKeyPublic, type APIKeyResponse, type APIKeyRotated, type APIKeyUpdateInput, type AuthErrorCode, AuthErrorCodes, type AuthMeResponse, type AuthMode, type BackupListResponse, type BackupRestoreResponse, type CaddyStatusResponse, type CapabilityStatus, type Client, type ClientCreateInput, type ClientListResponse, type ClientResponse, type ClientScope, type ClientUpdateInput, type CredentialsMode, type DetailedHealth, type Domain, type DomainConfigResponse, type DomainCreateInput, type DomainDeleteResponse, type DomainListResponse, type DomainMutationResponse, type DomainProbeResponse, type DomainResponse, type DomainUpdateInput, type Health, InfraPilot, InfraPilotError, type InfraPilotErrorBody, InfraPilotHttpError, type InfraPilotOptions, InfraPilotTransportError, type ListAPIKeysParams, type ListCaddyLogsParams, type ListClientsParams, type ListOperationsParams, type ListProcessesParams, type LogPage, type NodeCapabilitiesReport, type NodeCapability, type NodeIdentity, type NodeKvm, type NodeKvmAllowedAction, type NodeKvmDisk, type NodeKvmDomain, type NodeKvmDomainCPU, type NodeKvmDomainConfig, type NodeKvmDomainDetail, type NodeKvmDomainDisks, type NodeKvmDomainMemory, type NodeKvmDomainMetrics, type NodeKvmDomainNetwork, type NodeKvmMetricsAvailability, type NodeKvmMetricsCPU, type NodeKvmMetricsDisk, type NodeKvmMetricsMemory, type NodeKvmMetricsNetwork, type NodeKvmNIC, type NodeKvmPowerOutcome, type NodeKvmPowerResult, NodeKvmResource, type NodeNetwork, type NodeNetworkAddress, type NodeNetworkInterface, type NodeProcess, type NodeProcesses, type NodeResources, type NodeResponse, type NodeService, type NodeServices, type NodeUpdateInput, type OperationsPage, type PreviewCreateRequest, type PreviewDeleteRequest, type PreviewRequest, type PreviewResponse, type PreviewUpdateRequest, type Principal, type RequestContext, type ResourceWarning, type components, generatedAt, openapiSha256, openapiSourcePath, type operations, type paths };