@camstack/types 1.2.586 → 1.2.588

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 (76) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/addon.d.ts +2 -0
  3. package/dist/addon.js +21 -5
  4. package/dist/addon.mjs +18 -6
  5. package/dist/capabilities/camera-grid-layout.cap.d.ts +3 -5
  6. package/dist/capabilities/cap-method-absent.d.ts +19 -0
  7. package/dist/capabilities/device-manager.cap.d.ts +464 -0
  8. package/dist/capabilities/hero-layout.cap.d.ts +2 -2
  9. package/dist/capabilities/index.d.ts +9 -5
  10. package/dist/capabilities/network-link.cap.d.ts +10 -0
  11. package/dist/capabilities/power-source.cap.d.ts +20 -0
  12. package/dist/capabilities/recording-export.cap.d.ts +1 -0
  13. package/dist/capabilities/siren-duration.d.ts +45 -7
  14. package/dist/capabilities/siren.cap.d.ts +45 -2
  15. package/dist/capabilities/switch-settable.d.ts +15 -0
  16. package/dist/capabilities/switch.cap.d.ts +71 -0
  17. package/dist/capabilities/terminal-session.cap.d.ts +3 -60
  18. package/dist/capabilities/videoclips.cap.d.ts +3 -0
  19. package/dist/capabilities/workload.cap.d.ts +655 -0
  20. package/dist/client.js +59 -5
  21. package/dist/client.mjs +59 -5
  22. package/dist/{composed-stable-id-RvQIEpqg.mjs → composed-stable-id-BBL71oUQ.mjs} +20 -0
  23. package/dist/{composed-stable-id-C3NfRTj8.js → composed-stable-id-CVbyajE5.js} +20 -0
  24. package/dist/composition/engine-hosted-blocks.d.ts +131 -0
  25. package/dist/composition/helpers/index.d.ts +1 -1
  26. package/dist/composition/helpers/spec.d.ts +56 -2
  27. package/dist/composition/index.d.ts +1 -0
  28. package/dist/device/base-device.d.ts +29 -0
  29. package/dist/device/cap-vocabulary/declaration.d.ts +12 -1
  30. package/dist/device/cap-vocabulary/index.d.ts +4 -4
  31. package/dist/device/cap-vocabulary/resolve.d.ts +47 -1
  32. package/dist/device/cap-vocabulary/types.d.ts +26 -1
  33. package/dist/device/declare-identifiers.d.ts +58 -0
  34. package/dist/device/device-control-resolution.d.ts +1 -1
  35. package/dist/device/device-icon.d.ts +7 -0
  36. package/dist/device/device-identifiers.d.ts +190 -0
  37. package/dist/device/device-identity-candidates.d.ts +124 -0
  38. package/dist/device/device-management.d.ts +10 -0
  39. package/dist/device/device-type.d.ts +22 -2
  40. package/dist/device/hero/build-hero-model.d.ts +15 -0
  41. package/dist/device/hero/hero-fragment.d.ts +11 -0
  42. package/dist/device/hero/hero-layout.d.ts +1 -0
  43. package/dist/device/hero/hero-look.d.ts +12 -0
  44. package/dist/device/hero/hero-model.d.ts +4 -4
  45. package/dist/device/hero/hero-scene.d.ts +7 -0
  46. package/dist/device/index.d.ts +7 -1
  47. package/dist/enums/event-category.d.ts +8 -0
  48. package/dist/enums.js +1 -1
  49. package/dist/enums.mjs +1 -1
  50. package/dist/{event-category-d9kiqCqC.js → event-category-CE_VCE2G.js} +8 -0
  51. package/dist/{event-category-Dhcd0TRH.mjs → event-category-Hwx_JSCU.mjs} +8 -0
  52. package/dist/generated/addon-api.d.ts +99 -14
  53. package/dist/generated/addon-cap-facts.d.ts +1 -1
  54. package/dist/generated/cap-status-types.d.ts +3 -1
  55. package/dist/generated/cap-vocabulary.d.ts +1 -1
  56. package/dist/generated/capability-router-map.d.ts +5 -2
  57. package/dist/generated/collection-array-methods.d.ts +1 -1
  58. package/dist/generated/customize-catalog.d.ts +1 -1
  59. package/dist/generated/device-local-state.d.ts +3 -0
  60. package/dist/generated/device-proxy.d.ts +4 -1
  61. package/dist/generated/device-scoped-caps.d.ts +1 -1
  62. package/dist/generated/history-catalog.d.ts +2 -2
  63. package/dist/generated/method-access-map.d.ts +1 -1
  64. package/dist/generated/method-device-selectors.d.ts +2 -2
  65. package/dist/generated/runtime-state-durability.d.ts +1 -1
  66. package/dist/generated/system-proxy.d.ts +2 -2
  67. package/dist/{implemented-methods-C7ScGvEz.js → implemented-methods-ChtdIofW.js} +128 -1
  68. package/dist/{implemented-methods-C5FMXLGP.mjs → implemented-methods-u7ddjc-_.mjs} +57 -2
  69. package/dist/index.d.ts +9 -3
  70. package/dist/index.js +2069 -429
  71. package/dist/index.mjs +2008 -428
  72. package/dist/node.js +2 -2
  73. package/dist/node.mjs +2 -2
  74. package/dist/{sleep-DwRtgB2i.js → sleep-CsZJsb8n.js} +692 -35
  75. package/dist/{sleep-Ch7Q7UtE.mjs → sleep-D6Pih0Qt.mjs} +669 -36
  76. package/package.json +1 -1
@@ -0,0 +1,655 @@
1
+ import { z } from 'zod';
2
+ import { type InferProvider } from './capability-definition.js';
3
+ import { DeviceRole, DeviceType } from '../device/device-type.js';
4
+ import { EventCategory } from '../enums/event-category.js';
5
+ /**
6
+ * Workload (#585, D1056): ONE capability for everything that runs on a machine
7
+ * and for the machine itself — a VM, an app container, an LXC, an app, a host.
8
+ *
9
+ * There is no `kind` field: the device ROLE is the only discriminator. It picks
10
+ * the wording and icons (`vocabulary.overrides.byRole`) and `deviceRoles` keeps
11
+ * the cap on `workload` devices that carry one of the five roles.
12
+ *
13
+ * What a device can do is declared by its provider through `getOptions`, probed,
14
+ * never assumed: a Docker container has no force stop, a host may offer only a
15
+ * restart. The derived UI shows only what is declared ({@link deriveWorkloadControls}).
16
+ *
17
+ * A value the provider did not report is `null`, never `0` / `false` (D393);
18
+ * `state: null` is unknown, never stopped.
19
+ */
20
+ /** The lifecycle of a workload. `crashed` = stopped without a request. */
21
+ export declare const WORKLOAD_STATES: readonly ['running', 'paused', 'stopped', 'starting', 'stopping', 'crashed'];
22
+ export declare const WorkloadStateSchema: z.ZodEnum<{
23
+ crashed: "crashed";
24
+ paused: "paused";
25
+ running: "running";
26
+ starting: "starting";
27
+ stopped: "stopped";
28
+ stopping: "stopping";
29
+ }>;
30
+ export type WorkloadState = z.infer<typeof WorkloadStateSchema>;
31
+ /** The five kinds of workload, as roles of the `workload` device type (D1033). */
32
+ export declare const WORKLOAD_ROLES: readonly [DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host];
33
+ /**
34
+ * What the workload uses. Every value is `null` when not reported (D393). A host
35
+ * fills `load1` and `temperature`; its uptime is `since` while it runs.
36
+ */
37
+ export declare const WorkloadResourcesSchema: z.ZodObject<{
38
+ cpuPercent: z.ZodNullable<z.ZodNumber>;
39
+ memoryUsedBytes: z.ZodNullable<z.ZodNumber>;
40
+ memoryPercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
41
+ memoryLimitBytes: z.ZodNullable<z.ZodNumber>;
42
+ vcpus: z.ZodNullable<z.ZodNumber>;
43
+ diskUsedBytes: z.ZodNullable<z.ZodNumber>;
44
+ diskTotalBytes: z.ZodNullable<z.ZodNumber>;
45
+ netRxKbps: z.ZodNullable<z.ZodNumber>;
46
+ netTxKbps: z.ZodNullable<z.ZodNumber>;
47
+ load1: z.ZodNullable<z.ZodNumber>;
48
+ temperature: z.ZodNullable<z.ZodNumber>;
49
+ }, z.core.$strip>;
50
+ export type WorkloadResources = z.infer<typeof WorkloadResourcesSchema>;
51
+ export declare const WorkloadPortProtocolSchema: z.ZodEnum<{
52
+ tcp: "tcp";
53
+ udp: "udp";
54
+ }>;
55
+ export type WorkloadPortProtocol = z.infer<typeof WorkloadPortProtocolSchema>;
56
+ /** One published port: the workload's own port and where the host exposes it. */
57
+ export declare const WorkloadPortSchema: z.ZodObject<{
58
+ port: z.ZodNumber;
59
+ hostPort: z.ZodNullable<z.ZodNumber>;
60
+ hostIp: z.ZodNullable<z.ZodString>;
61
+ protocol: z.ZodEnum<{
62
+ tcp: "tcp";
63
+ udp: "udp";
64
+ }>;
65
+ }, z.core.$strip>;
66
+ export type WorkloadPort = z.infer<typeof WorkloadPortSchema>;
67
+ export declare const WorkloadStatusSchema: z.ZodObject<{
68
+ state: z.ZodNullable<z.ZodEnum<{
69
+ crashed: "crashed";
70
+ paused: "paused";
71
+ running: "running";
72
+ starting: "starting";
73
+ stopped: "stopped";
74
+ stopping: "stopping";
75
+ }>>;
76
+ since: z.ZodNullable<z.ZodNumber>;
77
+ hostDeviceId: z.ZodNullable<z.ZodNumber>;
78
+ image: z.ZodNullable<z.ZodString>;
79
+ os: z.ZodNullable<z.ZodString>;
80
+ version: z.ZodNullable<z.ZodString>;
81
+ autostart: z.ZodNullable<z.ZodBoolean>;
82
+ resources: z.ZodObject<{
83
+ cpuPercent: z.ZodNullable<z.ZodNumber>;
84
+ memoryUsedBytes: z.ZodNullable<z.ZodNumber>;
85
+ memoryPercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
86
+ memoryLimitBytes: z.ZodNullable<z.ZodNumber>;
87
+ vcpus: z.ZodNullable<z.ZodNumber>;
88
+ diskUsedBytes: z.ZodNullable<z.ZodNumber>;
89
+ diskTotalBytes: z.ZodNullable<z.ZodNumber>;
90
+ netRxKbps: z.ZodNullable<z.ZodNumber>;
91
+ netTxKbps: z.ZodNullable<z.ZodNumber>;
92
+ load1: z.ZodNullable<z.ZodNumber>;
93
+ temperature: z.ZodNullable<z.ZodNumber>;
94
+ }, z.core.$strip>;
95
+ ports: z.ZodArray<z.ZodObject<{
96
+ port: z.ZodNumber;
97
+ hostPort: z.ZodNullable<z.ZodNumber>;
98
+ hostIp: z.ZodNullable<z.ZodString>;
99
+ protocol: z.ZodEnum<{
100
+ tcp: "tcp";
101
+ udp: "udp";
102
+ }>;
103
+ }, z.core.$strip>>;
104
+ addresses: z.ZodArray<z.ZodString>;
105
+ updateAvailable: z.ZodNullable<z.ZodBoolean>;
106
+ lastFetchedAt: z.ZodNumber;
107
+ }, z.core.$strip>;
108
+ export type WorkloadStatus = z.infer<typeof WorkloadStatusSchema>;
109
+ /**
110
+ * What this device can do, probed by its provider (D14 honesty): a flag is
111
+ * `true` only when the platform really serves it for THIS device.
112
+ */
113
+ export declare const WorkloadOptionsSchema: z.ZodObject<{
114
+ supportsStart: z.ZodBoolean;
115
+ supportsStop: z.ZodBoolean;
116
+ supportsRestart: z.ZodBoolean;
117
+ supportsPause: z.ZodBoolean;
118
+ supportsForceStop: z.ZodBoolean;
119
+ hasResources: z.ZodBoolean;
120
+ hasPorts: z.ZodBoolean;
121
+ hasAddresses: z.ZodBoolean;
122
+ hasAutostart: z.ZodBoolean;
123
+ hasUpdateCheck: z.ZodBoolean;
124
+ }, z.core.$strip>;
125
+ export type WorkloadOptions = z.infer<typeof WorkloadOptionsSchema>;
126
+ declare const WorkloadTransitionEventDataSchema: z.ZodObject<{
127
+ deviceId: z.ZodNumber;
128
+ state: z.ZodEnum<{
129
+ crashed: "crashed";
130
+ paused: "paused";
131
+ running: "running";
132
+ starting: "starting";
133
+ stopped: "stopped";
134
+ stopping: "stopping";
135
+ }>;
136
+ previous: z.ZodEnum<{
137
+ crashed: "crashed";
138
+ paused: "paused";
139
+ running: "running";
140
+ starting: "starting";
141
+ stopped: "stopped";
142
+ stopping: "stopping";
143
+ }>;
144
+ since: z.ZodNullable<z.ZodNumber>;
145
+ }, z.core.$strip>;
146
+ export type WorkloadTransitionEventData = z.infer<typeof WorkloadTransitionEventDataSchema>;
147
+ export declare const WORKLOAD_ACTIONS: readonly ['start', 'stop', 'restart', 'pause', 'resume', 'forceStop'];
148
+ export type WorkloadAction = (typeof WORKLOAD_ACTIONS)[number];
149
+ /** One control the UI draws: declared by `getOptions`, enabled by the state. */
150
+ export interface WorkloadControl {
151
+ readonly action: WorkloadAction;
152
+ readonly enabled: boolean;
153
+ }
154
+ /** Which read-only sections the UI draws. */
155
+ export interface WorkloadSections {
156
+ readonly resources: boolean;
157
+ readonly ports: boolean;
158
+ readonly addresses: boolean;
159
+ readonly autostart: boolean;
160
+ readonly update: boolean;
161
+ }
162
+ export interface WorkloadControls {
163
+ readonly controls: readonly WorkloadControl[];
164
+ readonly sections: WorkloadSections;
165
+ }
166
+ /**
167
+ * The controls and sections of a workload, derived from what its provider
168
+ * declared and the state it is in. An undeclared feature is absent — never a
169
+ * disabled button that could never work.
170
+ */
171
+ export declare function deriveWorkloadControls(options: WorkloadOptions, state: WorkloadState | null): WorkloadControls;
172
+ /** The settled states a transition is judged between; `starting` / `stopping`
173
+ * are on the way and never the "previous" of an event. */
174
+ export type WorkloadSettledState = Exclude<WorkloadState, 'starting' | 'stopping'>;
175
+ export type WorkloadTransitionKind = 'started' | 'stopped' | 'crashed' | 'recovered';
176
+ export declare function isWorkloadSettled(state: WorkloadState): state is WorkloadSettledState;
177
+ /**
178
+ * The event a move from the last SETTLED state to `next` raises, or null.
179
+ * A first sight (`previous` undefined) raises nothing: it is not a change.
180
+ * Unknown (`next` null) raises nothing and is not remembered.
181
+ */
182
+ export declare function workloadTransition(previous: WorkloadSettledState | undefined, next: WorkloadState | null): WorkloadTransitionKind | null;
183
+ /** The bus category of each transition. */
184
+ export declare const WORKLOAD_TRANSITION_CATEGORY: Readonly<Record<WorkloadTransitionKind, EventCategory>>;
185
+ export declare const workloadCapability: {
186
+ readonly name: 'workload';
187
+ readonly scope: 'device';
188
+ readonly deviceNative: true;
189
+ readonly mode: 'singleton';
190
+ readonly deviceTypes: readonly [DeviceType.Workload];
191
+ readonly deviceRoles: {
192
+ readonly workload: readonly [DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host];
193
+ };
194
+ /**
195
+ * On / off is the state (#462): stopped or crashed is off, anything else on.
196
+ * The owner registers `switch` through `registerPowerSwitch`; there is no
197
+ * second on/off state. A device whose provider serves no start / stop gets no
198
+ * switch.
199
+ */
200
+ readonly power: {
201
+ readonly kind: 'methods';
202
+ readonly field: 'state';
203
+ readonly offValues: readonly ["stopped", "crashed"];
204
+ readonly on: 'start';
205
+ readonly off: 'stop';
206
+ };
207
+ readonly methods: {
208
+ readonly start: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
209
+ deviceId: z.ZodNumber;
210
+ }, z.core.$strip>, z.ZodVoid, "mutation"> & {
211
+ readonly providerOptional: true;
212
+ };
213
+ readonly stop: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
214
+ deviceId: z.ZodNumber;
215
+ }, z.core.$strip>, z.ZodVoid, "mutation"> & {
216
+ readonly providerOptional: true;
217
+ };
218
+ readonly restart: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
219
+ deviceId: z.ZodNumber;
220
+ }, z.core.$strip>, z.ZodVoid, "mutation"> & {
221
+ readonly providerOptional: true;
222
+ };
223
+ readonly pause: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
224
+ deviceId: z.ZodNumber;
225
+ }, z.core.$strip>, z.ZodVoid, "mutation"> & {
226
+ readonly providerOptional: true;
227
+ };
228
+ readonly resume: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
229
+ deviceId: z.ZodNumber;
230
+ }, z.core.$strip>, z.ZodVoid, "mutation"> & {
231
+ readonly providerOptional: true;
232
+ };
233
+ readonly forceStop: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
234
+ deviceId: z.ZodNumber;
235
+ }, z.core.$strip>, z.ZodVoid, "mutation"> & {
236
+ readonly providerOptional: true;
237
+ };
238
+ /** What THIS device can do, probed — the UI is derived from it. */
239
+ readonly getOptions: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
240
+ deviceId: z.ZodNumber;
241
+ }, z.core.$strip>, z.ZodObject<{
242
+ supportsStart: z.ZodBoolean;
243
+ supportsStop: z.ZodBoolean;
244
+ supportsRestart: z.ZodBoolean;
245
+ supportsPause: z.ZodBoolean;
246
+ supportsForceStop: z.ZodBoolean;
247
+ hasResources: z.ZodBoolean;
248
+ hasPorts: z.ZodBoolean;
249
+ hasAddresses: z.ZodBoolean;
250
+ hasAutostart: z.ZodBoolean;
251
+ hasUpdateCheck: z.ZodBoolean;
252
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
253
+ };
254
+ readonly events: {
255
+ readonly onStarted: {
256
+ readonly data: z.ZodObject<{
257
+ deviceId: z.ZodNumber;
258
+ state: z.ZodEnum<{
259
+ crashed: "crashed";
260
+ paused: "paused";
261
+ running: "running";
262
+ starting: "starting";
263
+ stopped: "stopped";
264
+ stopping: "stopping";
265
+ }>;
266
+ previous: z.ZodEnum<{
267
+ crashed: "crashed";
268
+ paused: "paused";
269
+ running: "running";
270
+ starting: "starting";
271
+ stopped: "stopped";
272
+ stopping: "stopping";
273
+ }>;
274
+ since: z.ZodNullable<z.ZodNumber>;
275
+ }, z.core.$strip>;
276
+ readonly trigger: {
277
+ readonly category: EventCategory.WorkloadStarted;
278
+ readonly label: import("../index.js").VocabL10n;
279
+ readonly phrase: import("../index.js").VocabL10n;
280
+ readonly icon: 'play';
281
+ };
282
+ };
283
+ readonly onStopped: {
284
+ readonly data: z.ZodObject<{
285
+ deviceId: z.ZodNumber;
286
+ state: z.ZodEnum<{
287
+ crashed: "crashed";
288
+ paused: "paused";
289
+ running: "running";
290
+ starting: "starting";
291
+ stopped: "stopped";
292
+ stopping: "stopping";
293
+ }>;
294
+ previous: z.ZodEnum<{
295
+ crashed: "crashed";
296
+ paused: "paused";
297
+ running: "running";
298
+ starting: "starting";
299
+ stopped: "stopped";
300
+ stopping: "stopping";
301
+ }>;
302
+ since: z.ZodNullable<z.ZodNumber>;
303
+ }, z.core.$strip>;
304
+ readonly trigger: {
305
+ readonly category: EventCategory.WorkloadStopped;
306
+ readonly label: import("../index.js").VocabL10n;
307
+ readonly phrase: import("../index.js").VocabL10n;
308
+ readonly icon: 'square';
309
+ };
310
+ };
311
+ readonly onCrashed: {
312
+ readonly data: z.ZodObject<{
313
+ deviceId: z.ZodNumber;
314
+ state: z.ZodEnum<{
315
+ crashed: "crashed";
316
+ paused: "paused";
317
+ running: "running";
318
+ starting: "starting";
319
+ stopped: "stopped";
320
+ stopping: "stopping";
321
+ }>;
322
+ previous: z.ZodEnum<{
323
+ crashed: "crashed";
324
+ paused: "paused";
325
+ running: "running";
326
+ starting: "starting";
327
+ stopped: "stopped";
328
+ stopping: "stopping";
329
+ }>;
330
+ since: z.ZodNullable<z.ZodNumber>;
331
+ }, z.core.$strip>;
332
+ readonly trigger: {
333
+ readonly category: EventCategory.WorkloadCrashed;
334
+ readonly label: import("../index.js").VocabL10n;
335
+ readonly phrase: import("../index.js").VocabL10n;
336
+ readonly icon: 'triangle-alert';
337
+ };
338
+ };
339
+ readonly onRecovered: {
340
+ readonly data: z.ZodObject<{
341
+ deviceId: z.ZodNumber;
342
+ state: z.ZodEnum<{
343
+ crashed: "crashed";
344
+ paused: "paused";
345
+ running: "running";
346
+ starting: "starting";
347
+ stopped: "stopped";
348
+ stopping: "stopping";
349
+ }>;
350
+ previous: z.ZodEnum<{
351
+ crashed: "crashed";
352
+ paused: "paused";
353
+ running: "running";
354
+ starting: "starting";
355
+ stopped: "stopped";
356
+ stopping: "stopping";
357
+ }>;
358
+ since: z.ZodNullable<z.ZodNumber>;
359
+ }, z.core.$strip>;
360
+ readonly trigger: {
361
+ readonly category: EventCategory.WorkloadRecovered;
362
+ readonly label: import("../index.js").VocabL10n;
363
+ readonly phrase: import("../index.js").VocabL10n;
364
+ readonly icon: 'heart-pulse';
365
+ };
366
+ };
367
+ };
368
+ readonly status: {
369
+ readonly schema: z.ZodObject<{
370
+ state: z.ZodNullable<z.ZodEnum<{
371
+ crashed: "crashed";
372
+ paused: "paused";
373
+ running: "running";
374
+ starting: "starting";
375
+ stopped: "stopped";
376
+ stopping: "stopping";
377
+ }>>;
378
+ since: z.ZodNullable<z.ZodNumber>;
379
+ hostDeviceId: z.ZodNullable<z.ZodNumber>;
380
+ image: z.ZodNullable<z.ZodString>;
381
+ os: z.ZodNullable<z.ZodString>;
382
+ version: z.ZodNullable<z.ZodString>;
383
+ autostart: z.ZodNullable<z.ZodBoolean>;
384
+ resources: z.ZodObject<{
385
+ cpuPercent: z.ZodNullable<z.ZodNumber>;
386
+ memoryUsedBytes: z.ZodNullable<z.ZodNumber>;
387
+ memoryPercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
388
+ memoryLimitBytes: z.ZodNullable<z.ZodNumber>;
389
+ vcpus: z.ZodNullable<z.ZodNumber>;
390
+ diskUsedBytes: z.ZodNullable<z.ZodNumber>;
391
+ diskTotalBytes: z.ZodNullable<z.ZodNumber>;
392
+ netRxKbps: z.ZodNullable<z.ZodNumber>;
393
+ netTxKbps: z.ZodNullable<z.ZodNumber>;
394
+ load1: z.ZodNullable<z.ZodNumber>;
395
+ temperature: z.ZodNullable<z.ZodNumber>;
396
+ }, z.core.$strip>;
397
+ ports: z.ZodArray<z.ZodObject<{
398
+ port: z.ZodNumber;
399
+ hostPort: z.ZodNullable<z.ZodNumber>;
400
+ hostIp: z.ZodNullable<z.ZodString>;
401
+ protocol: z.ZodEnum<{
402
+ tcp: "tcp";
403
+ udp: "udp";
404
+ }>;
405
+ }, z.core.$strip>>;
406
+ addresses: z.ZodArray<z.ZodString>;
407
+ updateAvailable: z.ZodNullable<z.ZodBoolean>;
408
+ lastFetchedAt: z.ZodNumber;
409
+ }, z.core.$strip>;
410
+ readonly kind: 'poll';
411
+ };
412
+ readonly runtimeState: z.ZodObject<{
413
+ state: z.ZodNullable<z.ZodEnum<{
414
+ crashed: "crashed";
415
+ paused: "paused";
416
+ running: "running";
417
+ starting: "starting";
418
+ stopped: "stopped";
419
+ stopping: "stopping";
420
+ }>>;
421
+ since: z.ZodNullable<z.ZodNumber>;
422
+ hostDeviceId: z.ZodNullable<z.ZodNumber>;
423
+ image: z.ZodNullable<z.ZodString>;
424
+ os: z.ZodNullable<z.ZodString>;
425
+ version: z.ZodNullable<z.ZodString>;
426
+ autostart: z.ZodNullable<z.ZodBoolean>;
427
+ resources: z.ZodObject<{
428
+ cpuPercent: z.ZodNullable<z.ZodNumber>;
429
+ memoryUsedBytes: z.ZodNullable<z.ZodNumber>;
430
+ memoryPercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
431
+ memoryLimitBytes: z.ZodNullable<z.ZodNumber>;
432
+ vcpus: z.ZodNullable<z.ZodNumber>;
433
+ diskUsedBytes: z.ZodNullable<z.ZodNumber>;
434
+ diskTotalBytes: z.ZodNullable<z.ZodNumber>;
435
+ netRxKbps: z.ZodNullable<z.ZodNumber>;
436
+ netTxKbps: z.ZodNullable<z.ZodNumber>;
437
+ load1: z.ZodNullable<z.ZodNumber>;
438
+ temperature: z.ZodNullable<z.ZodNumber>;
439
+ }, z.core.$strip>;
440
+ ports: z.ZodArray<z.ZodObject<{
441
+ port: z.ZodNumber;
442
+ hostPort: z.ZodNullable<z.ZodNumber>;
443
+ hostIp: z.ZodNullable<z.ZodString>;
444
+ protocol: z.ZodEnum<{
445
+ tcp: "tcp";
446
+ udp: "udp";
447
+ }>;
448
+ }, z.core.$strip>>;
449
+ addresses: z.ZodArray<z.ZodString>;
450
+ updateAvailable: z.ZodNullable<z.ZodBoolean>;
451
+ lastFetchedAt: z.ZodNumber;
452
+ }, z.core.$strip>;
453
+ /**
454
+ * Runtime-state durability: **session** — the provider answers on its next
455
+ * poll; the series are recorded, so a restart that clears the slice loses
456
+ * nothing a reader needs. The events are judged from the first state seen.
457
+ */
458
+ readonly durability: 'session';
459
+ /**
460
+ * History (D850): the state as an enum, CPU / memory / network as gauges, so
461
+ * the charts need no per-metric child device.
462
+ */
463
+ readonly history: {
464
+ readonly primary: 'resources.cpuPercent';
465
+ readonly priority: 40;
466
+ readonly fields: {
467
+ readonly state: {
468
+ readonly kind: 'enum';
469
+ };
470
+ readonly 'resources.cpuPercent': {
471
+ readonly kind: 'gauge';
472
+ readonly unit: '%';
473
+ readonly deadband: 2;
474
+ readonly displayName: 'CPU';
475
+ };
476
+ readonly 'resources.memoryUsedBytes': {
477
+ readonly kind: 'gauge';
478
+ readonly unit: 'bytes';
479
+ readonly displayName: 'Memory used';
480
+ };
481
+ readonly 'resources.memoryPercent': {
482
+ readonly kind: 'gauge';
483
+ readonly unit: '%';
484
+ readonly deadband: 2;
485
+ readonly displayName: 'Memory';
486
+ };
487
+ readonly 'resources.netRxKbps': {
488
+ readonly group: 'network';
489
+ readonly kind: 'gauge';
490
+ readonly unit: 'kbps';
491
+ readonly displayName: 'Network received';
492
+ };
493
+ readonly 'resources.netTxKbps': {
494
+ readonly group: 'network';
495
+ readonly kind: 'gauge';
496
+ readonly unit: 'kbps';
497
+ readonly displayName: 'Network sent';
498
+ };
499
+ };
500
+ };
501
+ readonly volatileStateFields: readonly ["lastFetchedAt"];
502
+ readonly vocabulary: {
503
+ readonly noun: import("../index.js").VocabL10n;
504
+ readonly order: 2400;
505
+ readonly state: readonly [{
506
+ readonly kind: 'enum';
507
+ readonly field: 'state';
508
+ readonly label: import("../index.js").VocabL10n;
509
+ readonly values: readonly [{
510
+ readonly value: 'running';
511
+ readonly label: import("../index.js").VocabL10n;
512
+ readonly phrase: import("../index.js").VocabL10n;
513
+ }, {
514
+ readonly value: 'paused';
515
+ readonly label: import("../index.js").VocabL10n;
516
+ }, {
517
+ readonly value: 'stopped';
518
+ readonly label: import("../index.js").VocabL10n;
519
+ readonly phrase: import("../index.js").VocabL10n;
520
+ }, {
521
+ readonly value: 'starting';
522
+ readonly label: import("../index.js").VocabL10n;
523
+ }, {
524
+ readonly value: 'stopping';
525
+ readonly label: import("../index.js").VocabL10n;
526
+ }, {
527
+ readonly value: 'crashed';
528
+ readonly label: import("../index.js").VocabL10n;
529
+ readonly phrase: import("../index.js").VocabL10n;
530
+ }];
531
+ readonly icon: 'activity';
532
+ }, {
533
+ readonly kind: 'numeric';
534
+ readonly field: 'resources.cpuPercent';
535
+ readonly quantity: import("../index.js").VocabL10n;
536
+ readonly label: import("../index.js").VocabL10n;
537
+ readonly unit: '%';
538
+ readonly icon: 'cpu';
539
+ }, {
540
+ readonly kind: 'numeric';
541
+ readonly field: 'resources.memoryPercent';
542
+ readonly quantity: import("../index.js").VocabL10n;
543
+ readonly label: import("../index.js").VocabL10n;
544
+ readonly unit: '%';
545
+ readonly icon: 'memory-stick';
546
+ }, {
547
+ readonly kind: 'numeric';
548
+ readonly field: 'resources.temperature';
549
+ readonly quantity: import("../index.js").VocabL10n;
550
+ readonly label: import("../index.js").VocabL10n;
551
+ readonly unit: '°C';
552
+ readonly icon: 'thermometer';
553
+ }];
554
+ readonly overrides: {
555
+ readonly byRole: {
556
+ readonly vm: {
557
+ readonly actions: {
558
+ readonly 'workload.start': {
559
+ readonly icon: 'monitor';
560
+ };
561
+ };
562
+ readonly state: {
563
+ readonly state: {
564
+ readonly icon: 'monitor';
565
+ };
566
+ };
567
+ };
568
+ readonly "app-container": {
569
+ readonly actions: {
570
+ readonly 'workload.start': {
571
+ readonly icon: 'container';
572
+ };
573
+ };
574
+ readonly state: {
575
+ readonly state: {
576
+ readonly icon: 'container';
577
+ };
578
+ };
579
+ };
580
+ readonly lxc: {
581
+ readonly actions: {
582
+ readonly 'workload.start': {
583
+ readonly icon: 'box';
584
+ };
585
+ };
586
+ readonly state: {
587
+ readonly state: {
588
+ readonly icon: 'box';
589
+ };
590
+ };
591
+ };
592
+ readonly app: {
593
+ readonly actions: {
594
+ readonly 'workload.start': {
595
+ readonly icon: 'app-window';
596
+ };
597
+ };
598
+ readonly state: {
599
+ readonly state: {
600
+ readonly icon: 'app-window';
601
+ };
602
+ };
603
+ };
604
+ readonly host: {
605
+ readonly actions: {
606
+ readonly 'workload.start': {
607
+ readonly label: import("../index.js").VocabL10n;
608
+ readonly phrase: import("../index.js").VocabL10n;
609
+ readonly icon: 'power';
610
+ };
611
+ readonly 'workload.stop': {
612
+ readonly label: import("../index.js").VocabL10n;
613
+ readonly phrase: import("../index.js").VocabL10n;
614
+ readonly icon: 'power-off';
615
+ };
616
+ readonly 'workload.restart': {
617
+ readonly label: import("../index.js").VocabL10n;
618
+ readonly phrase: import("../index.js").VocabL10n;
619
+ readonly icon: 'refresh-cw';
620
+ };
621
+ };
622
+ readonly state: {
623
+ readonly state: {
624
+ readonly icon: 'server';
625
+ };
626
+ };
627
+ readonly events: {
628
+ readonly onStarted: {
629
+ readonly label: import("../index.js").VocabL10n;
630
+ readonly phrase: import("../index.js").VocabL10n;
631
+ readonly icon: 'server';
632
+ };
633
+ readonly onStopped: {
634
+ readonly label: import("../index.js").VocabL10n;
635
+ readonly phrase: import("../index.js").VocabL10n;
636
+ readonly icon: 'server-off';
637
+ };
638
+ readonly onCrashed: {
639
+ readonly label: import("../index.js").VocabL10n;
640
+ readonly phrase: import("../index.js").VocabL10n;
641
+ readonly icon: 'server-crash';
642
+ };
643
+ readonly onRecovered: {
644
+ readonly label: import("../index.js").VocabL10n;
645
+ readonly phrase: import("../index.js").VocabL10n;
646
+ readonly icon: 'server';
647
+ };
648
+ };
649
+ };
650
+ };
651
+ };
652
+ };
653
+ };
654
+ export type IWorkloadProvider = InferProvider<typeof workloadCapability>;
655
+ export {};