@camstack/types 1.2.586 → 1.2.587
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/CHANGELOG.md +27 -0
- package/dist/addon.d.ts +2 -0
- package/dist/addon.js +21 -5
- package/dist/addon.mjs +18 -6
- package/dist/capabilities/camera-grid-layout.cap.d.ts +3 -5
- package/dist/capabilities/cap-method-absent.d.ts +19 -0
- package/dist/capabilities/device-manager.cap.d.ts +422 -0
- package/dist/capabilities/hero-layout.cap.d.ts +2 -2
- package/dist/capabilities/index.d.ts +9 -5
- package/dist/capabilities/network-link.cap.d.ts +10 -0
- package/dist/capabilities/power-source.cap.d.ts +20 -0
- package/dist/capabilities/recording-export.cap.d.ts +1 -0
- package/dist/capabilities/siren-duration.d.ts +45 -7
- package/dist/capabilities/siren.cap.d.ts +45 -2
- package/dist/capabilities/switch-settable.d.ts +15 -0
- package/dist/capabilities/switch.cap.d.ts +71 -0
- package/dist/capabilities/terminal-session.cap.d.ts +3 -60
- package/dist/capabilities/videoclips.cap.d.ts +3 -0
- package/dist/capabilities/workload.cap.d.ts +655 -0
- package/dist/client.js +58 -5
- package/dist/client.mjs +58 -5
- package/dist/{composed-stable-id-RvQIEpqg.mjs → composed-stable-id-BBL71oUQ.mjs} +20 -0
- package/dist/{composed-stable-id-C3NfRTj8.js → composed-stable-id-CVbyajE5.js} +20 -0
- package/dist/composition/engine-hosted-blocks.d.ts +131 -0
- package/dist/composition/helpers/index.d.ts +1 -1
- package/dist/composition/helpers/spec.d.ts +56 -2
- package/dist/composition/index.d.ts +1 -0
- package/dist/device/base-device.d.ts +29 -0
- package/dist/device/cap-vocabulary/declaration.d.ts +12 -1
- package/dist/device/cap-vocabulary/index.d.ts +4 -4
- package/dist/device/cap-vocabulary/resolve.d.ts +47 -1
- package/dist/device/cap-vocabulary/types.d.ts +26 -1
- package/dist/device/declare-identifiers.d.ts +58 -0
- package/dist/device/device-control-resolution.d.ts +1 -1
- package/dist/device/device-icon.d.ts +7 -0
- package/dist/device/device-identifiers.d.ts +190 -0
- package/dist/device/device-management.d.ts +10 -0
- package/dist/device/device-type.d.ts +22 -2
- package/dist/device/hero/build-hero-model.d.ts +15 -0
- package/dist/device/hero/hero-fragment.d.ts +11 -0
- package/dist/device/hero/hero-layout.d.ts +1 -0
- package/dist/device/hero/hero-look.d.ts +12 -0
- package/dist/device/hero/hero-model.d.ts +4 -4
- package/dist/device/hero/hero-scene.d.ts +7 -0
- package/dist/device/index.d.ts +5 -1
- package/dist/enums/event-category.d.ts +8 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-d9kiqCqC.js → event-category-CE_VCE2G.js} +8 -0
- package/dist/{event-category-Dhcd0TRH.mjs → event-category-Hwx_JSCU.mjs} +8 -0
- package/dist/generated/addon-api.d.ts +92 -14
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +3 -1
- package/dist/generated/cap-vocabulary.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/customize-catalog.d.ts +1 -1
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +4 -1
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +2 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/{implemented-methods-C7ScGvEz.js → implemented-methods-ChtdIofW.js} +128 -1
- package/dist/{implemented-methods-C5FMXLGP.mjs → implemented-methods-u7ddjc-_.mjs} +57 -2
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1979 -429
- package/dist/index.mjs +1923 -428
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-DwRtgB2i.js → sleep-CsZJsb8n.js} +692 -35
- package/dist/{sleep-Ch7Q7UtE.mjs → sleep-D6Pih0Qt.mjs} +669 -36
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -21276,6 +21276,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
21276
21276
|
* and the storage as branches of one bus. One read-only `energy-system` cap carries
|
|
21277
21277
|
* every value; the storage is a field of it, never the `battery` cap (#513, #522). */
|
|
21278
21278
|
DeviceType["EnergySystem"] = "energy-system";
|
|
21279
|
+
/** Something that RUNS on a machine, or the machine itself (#585): a VM, an app
|
|
21280
|
+
* container, an LXC, an app, or a host. The kind is the ROLE (D1033, D1056), never
|
|
21281
|
+
* a field; one `workload` cap carries the state, the controls and the resources. */
|
|
21282
|
+
DeviceType["Workload"] = "workload";
|
|
21279
21283
|
return DeviceType;
|
|
21280
21284
|
}({});
|
|
21281
21285
|
/**
|
|
@@ -21334,6 +21338,11 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
21334
21338
|
* `light` type: the provider owns the type, and a light implies brightness
|
|
21335
21339
|
* or colour this relay lacks. */
|
|
21336
21340
|
DeviceRole["SwitchLight"] = "switch-light";
|
|
21341
|
+
/** One port of a network switch that powers the device behind it (PoE): on /
|
|
21342
|
+
* off feeds or cuts that power. Its link is `network-link`, its draw
|
|
21343
|
+
* `power-meter`. Restarting the powered device through the port is that
|
|
21344
|
+
* device's `power-source` cap, never a reboot of the port. */
|
|
21345
|
+
DeviceRole["PoePort"] = "poe-port";
|
|
21337
21346
|
/** Air conditioner / split unit: cooling, fan speed, louvres. */
|
|
21338
21347
|
DeviceRole["ClimateAc"] = "climate-ac";
|
|
21339
21348
|
/** Room thermostat: a setpoint and a room temperature. The default. */
|
|
@@ -21414,6 +21423,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
21414
21423
|
/** Emits a pulse train (infrared or RF) on request — the `ir-transmitter`
|
|
21415
21424
|
* cap. A `DeviceType.Generic` device. */
|
|
21416
21425
|
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
21426
|
+
/** A virtual machine on a hypervisor. */
|
|
21427
|
+
DeviceRole["Vm"] = "vm";
|
|
21428
|
+
/** An application container (Docker, Podman). */
|
|
21429
|
+
DeviceRole["AppContainer"] = "app-container";
|
|
21430
|
+
/** A system container (LXC). */
|
|
21431
|
+
DeviceRole["Lxc"] = "lxc";
|
|
21432
|
+
/** An application or service running on a host. */
|
|
21433
|
+
DeviceRole["App"] = "app";
|
|
21434
|
+
/** A machine that runs workloads or is an appliance with its own OS: a
|
|
21435
|
+
* server, a hypervisor, a gateway console, a CCU. */
|
|
21436
|
+
DeviceRole["Host"] = "host";
|
|
21417
21437
|
return DeviceRole;
|
|
21418
21438
|
}({});
|
|
21419
21439
|
zod.z.enum(["new-session", "step-up"]);
|
|
@@ -26311,7 +26331,18 @@ DeviceType.Camera, method(zod.z.object({
|
|
|
26311
26331
|
* older than this field keeps working unchanged (D382 — an unstated
|
|
26312
26332
|
* ask is zero).
|
|
26313
26333
|
*/
|
|
26314
|
-
audio: ClipStreamAudioSchema.optional()
|
|
26334
|
+
audio: ClipStreamAudioSchema.optional(),
|
|
26335
|
+
/**
|
|
26336
|
+
* The operator's authorisation to wake a sleeping camera for this
|
|
26337
|
+
* dial — the same {@link ClipWakeSchema} the byte reads carry. Absent
|
|
26338
|
+
* — the default — means a sleeping standalone battery camera is
|
|
26339
|
+
* REFUSED by name before any URL is minted. A caller sets it only
|
|
26340
|
+
* when a viewer itself asked for the clip (the broker's `playClip`);
|
|
26341
|
+
* a prefetch, a reconcile or a retry never does. With it, the
|
|
26342
|
+
* provider wakes the camera and waits under a bound; a camera that
|
|
26343
|
+
* does not come up is refused `wake-timeout`, naming the wait.
|
|
26344
|
+
*/
|
|
26345
|
+
wake: ClipWakeSchema.optional()
|
|
26315
26346
|
}), ClipStreamDialSchema, {
|
|
26316
26347
|
kind: "query",
|
|
26317
26348
|
auth: "protected"
|
|
@@ -26576,7 +26607,8 @@ zod.z.enum([
|
|
|
26576
26607
|
"camera-refused",
|
|
26577
26608
|
"fetch-failed",
|
|
26578
26609
|
"too-large-to-transfer",
|
|
26579
|
-
"wake-expired"
|
|
26610
|
+
"wake-expired",
|
|
26611
|
+
"wake-timeout"
|
|
26580
26612
|
]);
|
|
26581
26613
|
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
26582
26614
|
var ExportDownloadSchema = zod.z.object({
|
|
@@ -27352,6 +27384,7 @@ var DEVICE_TYPE_ICON = {
|
|
|
27352
27384
|
[DeviceType.Climate]: "thermometer",
|
|
27353
27385
|
[DeviceType.HeatPump]: "flame",
|
|
27354
27386
|
[DeviceType.EnergySystem]: "solar-panel",
|
|
27387
|
+
[DeviceType.Workload]: "server",
|
|
27355
27388
|
[DeviceType.Button]: "circle-dot",
|
|
27356
27389
|
[DeviceType.EventEmitter]: "zap",
|
|
27357
27390
|
[DeviceType.Update]: "refresh-cw",
|
|
@@ -27406,6 +27439,7 @@ var DEVICE_ROLE_ICON = {
|
|
|
27406
27439
|
[DeviceRole.SwitchHeater]: "flame",
|
|
27407
27440
|
[DeviceRole.SwitchFan]: "fan",
|
|
27408
27441
|
[DeviceRole.SwitchLight]: "lightbulb",
|
|
27442
|
+
[DeviceRole.PoePort]: "ethernet-port",
|
|
27409
27443
|
[DeviceRole.ClimateAc]: "air-vent",
|
|
27410
27444
|
[DeviceRole.ClimateThermostat]: "thermometer",
|
|
27411
27445
|
[DeviceRole.ClimateFloor]: "waves",
|
|
@@ -27450,7 +27484,12 @@ var DEVICE_ROLE_ICON = {
|
|
|
27450
27484
|
[DeviceRole.MessagingNotifier]: "message-square",
|
|
27451
27485
|
[DeviceRole.EmailNotifier]: "mail",
|
|
27452
27486
|
[DeviceRole.GenericNotifier]: "bell",
|
|
27453
|
-
[DeviceRole.IrTransmitter]: "radio-tower"
|
|
27487
|
+
[DeviceRole.IrTransmitter]: "radio-tower",
|
|
27488
|
+
[DeviceRole.Vm]: "monitor",
|
|
27489
|
+
[DeviceRole.AppContainer]: "container",
|
|
27490
|
+
[DeviceRole.Lxc]: "box",
|
|
27491
|
+
[DeviceRole.App]: "app-window",
|
|
27492
|
+
[DeviceRole.Host]: "server"
|
|
27454
27493
|
};
|
|
27455
27494
|
var TYPE_VALUES = new Set(Object.values(DeviceType));
|
|
27456
27495
|
var ROLE_VALUES = new Set(Object.values(DeviceRole));
|
|
@@ -28078,6 +28117,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28078
28117
|
};
|
|
28079
28118
|
const sirenInterface = {
|
|
28080
28119
|
getOptions: (input, options) => dispatch("siren", "siren", "getOptions", "query", input, void 0, options),
|
|
28120
|
+
getPlayChoices: (input, options) => dispatch("siren", "siren", "getPlayChoices", "query", input, void 0, options),
|
|
28081
28121
|
trigger: (input, options) => dispatch("siren", "siren", "trigger", "mutation", input, void 0, options),
|
|
28082
28122
|
stop: (input, options) => dispatch("siren", "siren", "stop", "mutation", input, void 0, options),
|
|
28083
28123
|
getStatus: (input, options) => dispatch("siren", "siren", "getStatus", "query", input, void 0, options)
|
|
@@ -28104,6 +28144,8 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28104
28144
|
const streamSignalsInterface = { listSignals: (input, options) => dispatch("stream-signals", "streamSignals", "listSignals", "query", input, void 0, options) };
|
|
28105
28145
|
const switchInterface = {
|
|
28106
28146
|
setState: (input, options) => dispatch("switch", "switch", "setState", "mutation", input, void 0, options),
|
|
28147
|
+
getOptions: (input, options) => dispatch("switch", "switch", "getOptions", "query", input, void 0, options),
|
|
28148
|
+
powerCycle: (input, options) => dispatch("switch", "switch", "powerCycle", "mutation", input, void 0, options),
|
|
28107
28149
|
toggle: (input, options) => dispatch("switch", "switch", "toggle", "mutation", input, void 0, options),
|
|
28108
28150
|
getStatus: (input, options) => dispatch("switch", "switch", "getStatus", "query", input, void 0, options)
|
|
28109
28151
|
};
|
|
@@ -28167,6 +28209,16 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28167
28209
|
applyDownlinkProbe: (input, options) => dispatch("webrtc-session", "webrtcSession", "applyDownlinkProbe", "mutation", input, void 0, options),
|
|
28168
28210
|
getSessionDebug: (input, options) => dispatch("webrtc-session", "webrtcSession", "getSessionDebug", "query", input, void 0, options)
|
|
28169
28211
|
};
|
|
28212
|
+
const workloadInterface = {
|
|
28213
|
+
start: (input, options) => dispatch("workload", "workload", "start", "mutation", input, void 0, options),
|
|
28214
|
+
stop: (input, options) => dispatch("workload", "workload", "stop", "mutation", input, void 0, options),
|
|
28215
|
+
restart: (input, options) => dispatch("workload", "workload", "restart", "mutation", input, void 0, options),
|
|
28216
|
+
pause: (input, options) => dispatch("workload", "workload", "pause", "mutation", input, void 0, options),
|
|
28217
|
+
resume: (input, options) => dispatch("workload", "workload", "resume", "mutation", input, void 0, options),
|
|
28218
|
+
forceStop: (input, options) => dispatch("workload", "workload", "forceStop", "mutation", input, void 0, options),
|
|
28219
|
+
getOptions: (input, options) => dispatch("workload", "workload", "getOptions", "query", input, void 0, options),
|
|
28220
|
+
getStatus: (input, options) => dispatch("workload", "workload", "getStatus", "query", input, void 0, options)
|
|
28221
|
+
};
|
|
28170
28222
|
const zoneAnalyticsInterface = {
|
|
28171
28223
|
getCurrentSnapshot: (input, options) => dispatch("zone-analytics", "zoneAnalytics", "getCurrentSnapshot", "query", input, void 0, options),
|
|
28172
28224
|
getCurrentSnapshotBatch: (input, options) => dispatch("zone-analytics", "zoneAnalytics", "getCurrentSnapshotBatch", "query", input, void 0, options),
|
|
@@ -28228,6 +28280,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28228
28280
|
setRole: (input, options) => dispatchSystem("deviceManager", "setRole", "mutation", input, void 0, options),
|
|
28229
28281
|
applyInitialMeta: (input, options) => dispatchSystem("deviceManager", "applyInitialMeta", "mutation", input, void 0, options),
|
|
28230
28282
|
setMetadata: (input, options) => dispatchSystem("deviceManager", "setMetadata", "mutation", input, void 0, options),
|
|
28283
|
+
setIdentifiers: (input, options) => dispatchSystem("deviceManager", "setIdentifiers", "mutation", input, void 0, options),
|
|
28231
28284
|
setDisabled: (input, options) => dispatchSystem("deviceManager", "setDisabled", "mutation", input, void 0, options),
|
|
28232
28285
|
getDevice: (input, options) => dispatchSystem("deviceManager", "getDevice", "query", input, void 0, options),
|
|
28233
28286
|
getLinkedDevices: (input, options) => dispatchSystem("deviceManager", "getLinkedDevices", "query", input, void 0, options),
|
|
@@ -28441,6 +28494,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28441
28494
|
waterHeater: createSliceHandle(stateSource, binding.deviceId, "water-heater"),
|
|
28442
28495
|
weather: createSliceHandle(stateSource, binding.deviceId, "weather"),
|
|
28443
28496
|
weatherStation: createSliceHandle(stateSource, binding.deviceId, "weather-station"),
|
|
28497
|
+
workload: createSliceHandle(stateSource, binding.deviceId, "workload"),
|
|
28444
28498
|
zoneAnalytics: createSliceHandle(stateSource, binding.deviceId, "zone-analytics"),
|
|
28445
28499
|
zoneRules: createSliceHandle(stateSource, binding.deviceId, "zone-rules"),
|
|
28446
28500
|
zones: createSliceHandle(stateSource, binding.deviceId, "zones")
|
|
@@ -28550,6 +28604,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28550
28604
|
...bound("weather") ? { weather: weatherInterface } : {},
|
|
28551
28605
|
...bound("weather-station") ? { weatherStation: weatherStationInterface } : {},
|
|
28552
28606
|
...bound("webrtc-session") ? { webrtcSession: webrtcSessionInterface } : {},
|
|
28607
|
+
...bound("workload") ? { workload: workloadInterface } : {},
|
|
28553
28608
|
...bound("zone-analytics") ? { zoneAnalytics: zoneAnalyticsInterface } : {},
|
|
28554
28609
|
...bound("zone-rules") ? { zoneRules: zoneRulesInterface } : {},
|
|
28555
28610
|
...bound("zones") ? { zones: zonesInterface } : {},
|
|
@@ -30046,8 +30101,6 @@ function createSystemProxy(api) {
|
|
|
30046
30101
|
},
|
|
30047
30102
|
terminalSession: {
|
|
30048
30103
|
listProfiles: (input) => dispatch("terminalSession", "listProfiles", "query", input),
|
|
30049
|
-
listLegacyCameras: (input) => dispatch("terminalSession", "listLegacyCameras", "query", input),
|
|
30050
|
-
adoptLegacyMonitor: (input) => dispatch("terminalSession", "adoptLegacyMonitor", "mutation", input),
|
|
30051
30104
|
listSessions: (input) => dispatch("terminalSession", "listSessions", "query", input),
|
|
30052
30105
|
serverShellStatus: (input) => dispatch("terminalSession", "serverShellStatus", "query", input),
|
|
30053
30106
|
openSession: (input) => dispatch("terminalSession", "openSession", "mutation", input),
|
package/dist/client.mjs
CHANGED
|
@@ -21275,6 +21275,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
21275
21275
|
* and the storage as branches of one bus. One read-only `energy-system` cap carries
|
|
21276
21276
|
* every value; the storage is a field of it, never the `battery` cap (#513, #522). */
|
|
21277
21277
|
DeviceType["EnergySystem"] = "energy-system";
|
|
21278
|
+
/** Something that RUNS on a machine, or the machine itself (#585): a VM, an app
|
|
21279
|
+
* container, an LXC, an app, or a host. The kind is the ROLE (D1033, D1056), never
|
|
21280
|
+
* a field; one `workload` cap carries the state, the controls and the resources. */
|
|
21281
|
+
DeviceType["Workload"] = "workload";
|
|
21278
21282
|
return DeviceType;
|
|
21279
21283
|
}({});
|
|
21280
21284
|
/**
|
|
@@ -21333,6 +21337,11 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
21333
21337
|
* `light` type: the provider owns the type, and a light implies brightness
|
|
21334
21338
|
* or colour this relay lacks. */
|
|
21335
21339
|
DeviceRole["SwitchLight"] = "switch-light";
|
|
21340
|
+
/** One port of a network switch that powers the device behind it (PoE): on /
|
|
21341
|
+
* off feeds or cuts that power. Its link is `network-link`, its draw
|
|
21342
|
+
* `power-meter`. Restarting the powered device through the port is that
|
|
21343
|
+
* device's `power-source` cap, never a reboot of the port. */
|
|
21344
|
+
DeviceRole["PoePort"] = "poe-port";
|
|
21336
21345
|
/** Air conditioner / split unit: cooling, fan speed, louvres. */
|
|
21337
21346
|
DeviceRole["ClimateAc"] = "climate-ac";
|
|
21338
21347
|
/** Room thermostat: a setpoint and a room temperature. The default. */
|
|
@@ -21413,6 +21422,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
21413
21422
|
/** Emits a pulse train (infrared or RF) on request — the `ir-transmitter`
|
|
21414
21423
|
* cap. A `DeviceType.Generic` device. */
|
|
21415
21424
|
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
21425
|
+
/** A virtual machine on a hypervisor. */
|
|
21426
|
+
DeviceRole["Vm"] = "vm";
|
|
21427
|
+
/** An application container (Docker, Podman). */
|
|
21428
|
+
DeviceRole["AppContainer"] = "app-container";
|
|
21429
|
+
/** A system container (LXC). */
|
|
21430
|
+
DeviceRole["Lxc"] = "lxc";
|
|
21431
|
+
/** An application or service running on a host. */
|
|
21432
|
+
DeviceRole["App"] = "app";
|
|
21433
|
+
/** A machine that runs workloads or is an appliance with its own OS: a
|
|
21434
|
+
* server, a hypervisor, a gateway console, a CCU. */
|
|
21435
|
+
DeviceRole["Host"] = "host";
|
|
21416
21436
|
return DeviceRole;
|
|
21417
21437
|
}({});
|
|
21418
21438
|
z.enum(["new-session", "step-up"]);
|
|
@@ -26310,7 +26330,18 @@ DeviceType.Camera, method(z.object({
|
|
|
26310
26330
|
* older than this field keeps working unchanged (D382 — an unstated
|
|
26311
26331
|
* ask is zero).
|
|
26312
26332
|
*/
|
|
26313
|
-
audio: ClipStreamAudioSchema.optional()
|
|
26333
|
+
audio: ClipStreamAudioSchema.optional(),
|
|
26334
|
+
/**
|
|
26335
|
+
* The operator's authorisation to wake a sleeping camera for this
|
|
26336
|
+
* dial — the same {@link ClipWakeSchema} the byte reads carry. Absent
|
|
26337
|
+
* — the default — means a sleeping standalone battery camera is
|
|
26338
|
+
* REFUSED by name before any URL is minted. A caller sets it only
|
|
26339
|
+
* when a viewer itself asked for the clip (the broker's `playClip`);
|
|
26340
|
+
* a prefetch, a reconcile or a retry never does. With it, the
|
|
26341
|
+
* provider wakes the camera and waits under a bound; a camera that
|
|
26342
|
+
* does not come up is refused `wake-timeout`, naming the wait.
|
|
26343
|
+
*/
|
|
26344
|
+
wake: ClipWakeSchema.optional()
|
|
26314
26345
|
}), ClipStreamDialSchema, {
|
|
26315
26346
|
kind: "query",
|
|
26316
26347
|
auth: "protected"
|
|
@@ -26575,7 +26606,8 @@ z.enum([
|
|
|
26575
26606
|
"camera-refused",
|
|
26576
26607
|
"fetch-failed",
|
|
26577
26608
|
"too-large-to-transfer",
|
|
26578
|
-
"wake-expired"
|
|
26609
|
+
"wake-expired",
|
|
26610
|
+
"wake-timeout"
|
|
26579
26611
|
]);
|
|
26580
26612
|
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
26581
26613
|
var ExportDownloadSchema = z.object({
|
|
@@ -27351,6 +27383,7 @@ var DEVICE_TYPE_ICON = {
|
|
|
27351
27383
|
[DeviceType.Climate]: "thermometer",
|
|
27352
27384
|
[DeviceType.HeatPump]: "flame",
|
|
27353
27385
|
[DeviceType.EnergySystem]: "solar-panel",
|
|
27386
|
+
[DeviceType.Workload]: "server",
|
|
27354
27387
|
[DeviceType.Button]: "circle-dot",
|
|
27355
27388
|
[DeviceType.EventEmitter]: "zap",
|
|
27356
27389
|
[DeviceType.Update]: "refresh-cw",
|
|
@@ -27405,6 +27438,7 @@ var DEVICE_ROLE_ICON = {
|
|
|
27405
27438
|
[DeviceRole.SwitchHeater]: "flame",
|
|
27406
27439
|
[DeviceRole.SwitchFan]: "fan",
|
|
27407
27440
|
[DeviceRole.SwitchLight]: "lightbulb",
|
|
27441
|
+
[DeviceRole.PoePort]: "ethernet-port",
|
|
27408
27442
|
[DeviceRole.ClimateAc]: "air-vent",
|
|
27409
27443
|
[DeviceRole.ClimateThermostat]: "thermometer",
|
|
27410
27444
|
[DeviceRole.ClimateFloor]: "waves",
|
|
@@ -27449,7 +27483,12 @@ var DEVICE_ROLE_ICON = {
|
|
|
27449
27483
|
[DeviceRole.MessagingNotifier]: "message-square",
|
|
27450
27484
|
[DeviceRole.EmailNotifier]: "mail",
|
|
27451
27485
|
[DeviceRole.GenericNotifier]: "bell",
|
|
27452
|
-
[DeviceRole.IrTransmitter]: "radio-tower"
|
|
27486
|
+
[DeviceRole.IrTransmitter]: "radio-tower",
|
|
27487
|
+
[DeviceRole.Vm]: "monitor",
|
|
27488
|
+
[DeviceRole.AppContainer]: "container",
|
|
27489
|
+
[DeviceRole.Lxc]: "box",
|
|
27490
|
+
[DeviceRole.App]: "app-window",
|
|
27491
|
+
[DeviceRole.Host]: "server"
|
|
27453
27492
|
};
|
|
27454
27493
|
var TYPE_VALUES = new Set(Object.values(DeviceType));
|
|
27455
27494
|
var ROLE_VALUES = new Set(Object.values(DeviceRole));
|
|
@@ -28077,6 +28116,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28077
28116
|
};
|
|
28078
28117
|
const sirenInterface = {
|
|
28079
28118
|
getOptions: (input, options) => dispatch("siren", "siren", "getOptions", "query", input, void 0, options),
|
|
28119
|
+
getPlayChoices: (input, options) => dispatch("siren", "siren", "getPlayChoices", "query", input, void 0, options),
|
|
28080
28120
|
trigger: (input, options) => dispatch("siren", "siren", "trigger", "mutation", input, void 0, options),
|
|
28081
28121
|
stop: (input, options) => dispatch("siren", "siren", "stop", "mutation", input, void 0, options),
|
|
28082
28122
|
getStatus: (input, options) => dispatch("siren", "siren", "getStatus", "query", input, void 0, options)
|
|
@@ -28103,6 +28143,8 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28103
28143
|
const streamSignalsInterface = { listSignals: (input, options) => dispatch("stream-signals", "streamSignals", "listSignals", "query", input, void 0, options) };
|
|
28104
28144
|
const switchInterface = {
|
|
28105
28145
|
setState: (input, options) => dispatch("switch", "switch", "setState", "mutation", input, void 0, options),
|
|
28146
|
+
getOptions: (input, options) => dispatch("switch", "switch", "getOptions", "query", input, void 0, options),
|
|
28147
|
+
powerCycle: (input, options) => dispatch("switch", "switch", "powerCycle", "mutation", input, void 0, options),
|
|
28106
28148
|
toggle: (input, options) => dispatch("switch", "switch", "toggle", "mutation", input, void 0, options),
|
|
28107
28149
|
getStatus: (input, options) => dispatch("switch", "switch", "getStatus", "query", input, void 0, options)
|
|
28108
28150
|
};
|
|
@@ -28166,6 +28208,16 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28166
28208
|
applyDownlinkProbe: (input, options) => dispatch("webrtc-session", "webrtcSession", "applyDownlinkProbe", "mutation", input, void 0, options),
|
|
28167
28209
|
getSessionDebug: (input, options) => dispatch("webrtc-session", "webrtcSession", "getSessionDebug", "query", input, void 0, options)
|
|
28168
28210
|
};
|
|
28211
|
+
const workloadInterface = {
|
|
28212
|
+
start: (input, options) => dispatch("workload", "workload", "start", "mutation", input, void 0, options),
|
|
28213
|
+
stop: (input, options) => dispatch("workload", "workload", "stop", "mutation", input, void 0, options),
|
|
28214
|
+
restart: (input, options) => dispatch("workload", "workload", "restart", "mutation", input, void 0, options),
|
|
28215
|
+
pause: (input, options) => dispatch("workload", "workload", "pause", "mutation", input, void 0, options),
|
|
28216
|
+
resume: (input, options) => dispatch("workload", "workload", "resume", "mutation", input, void 0, options),
|
|
28217
|
+
forceStop: (input, options) => dispatch("workload", "workload", "forceStop", "mutation", input, void 0, options),
|
|
28218
|
+
getOptions: (input, options) => dispatch("workload", "workload", "getOptions", "query", input, void 0, options),
|
|
28219
|
+
getStatus: (input, options) => dispatch("workload", "workload", "getStatus", "query", input, void 0, options)
|
|
28220
|
+
};
|
|
28169
28221
|
const zoneAnalyticsInterface = {
|
|
28170
28222
|
getCurrentSnapshot: (input, options) => dispatch("zone-analytics", "zoneAnalytics", "getCurrentSnapshot", "query", input, void 0, options),
|
|
28171
28223
|
getCurrentSnapshotBatch: (input, options) => dispatch("zone-analytics", "zoneAnalytics", "getCurrentSnapshotBatch", "query", input, void 0, options),
|
|
@@ -28227,6 +28279,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28227
28279
|
setRole: (input, options) => dispatchSystem("deviceManager", "setRole", "mutation", input, void 0, options),
|
|
28228
28280
|
applyInitialMeta: (input, options) => dispatchSystem("deviceManager", "applyInitialMeta", "mutation", input, void 0, options),
|
|
28229
28281
|
setMetadata: (input, options) => dispatchSystem("deviceManager", "setMetadata", "mutation", input, void 0, options),
|
|
28282
|
+
setIdentifiers: (input, options) => dispatchSystem("deviceManager", "setIdentifiers", "mutation", input, void 0, options),
|
|
28230
28283
|
setDisabled: (input, options) => dispatchSystem("deviceManager", "setDisabled", "mutation", input, void 0, options),
|
|
28231
28284
|
getDevice: (input, options) => dispatchSystem("deviceManager", "getDevice", "query", input, void 0, options),
|
|
28232
28285
|
getLinkedDevices: (input, options) => dispatchSystem("deviceManager", "getLinkedDevices", "query", input, void 0, options),
|
|
@@ -28440,6 +28493,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28440
28493
|
waterHeater: createSliceHandle(stateSource, binding.deviceId, "water-heater"),
|
|
28441
28494
|
weather: createSliceHandle(stateSource, binding.deviceId, "weather"),
|
|
28442
28495
|
weatherStation: createSliceHandle(stateSource, binding.deviceId, "weather-station"),
|
|
28496
|
+
workload: createSliceHandle(stateSource, binding.deviceId, "workload"),
|
|
28443
28497
|
zoneAnalytics: createSliceHandle(stateSource, binding.deviceId, "zone-analytics"),
|
|
28444
28498
|
zoneRules: createSliceHandle(stateSource, binding.deviceId, "zone-rules"),
|
|
28445
28499
|
zones: createSliceHandle(stateSource, binding.deviceId, "zones")
|
|
@@ -28549,6 +28603,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
28549
28603
|
...bound("weather") ? { weather: weatherInterface } : {},
|
|
28550
28604
|
...bound("weather-station") ? { weatherStation: weatherStationInterface } : {},
|
|
28551
28605
|
...bound("webrtc-session") ? { webrtcSession: webrtcSessionInterface } : {},
|
|
28606
|
+
...bound("workload") ? { workload: workloadInterface } : {},
|
|
28552
28607
|
...bound("zone-analytics") ? { zoneAnalytics: zoneAnalyticsInterface } : {},
|
|
28553
28608
|
...bound("zone-rules") ? { zoneRules: zoneRulesInterface } : {},
|
|
28554
28609
|
...bound("zones") ? { zones: zonesInterface } : {},
|
|
@@ -30045,8 +30100,6 @@ function createSystemProxy(api) {
|
|
|
30045
30100
|
},
|
|
30046
30101
|
terminalSession: {
|
|
30047
30102
|
listProfiles: (input) => dispatch("terminalSession", "listProfiles", "query", input),
|
|
30048
|
-
listLegacyCameras: (input) => dispatch("terminalSession", "listLegacyCameras", "query", input),
|
|
30049
|
-
adoptLegacyMonitor: (input) => dispatch("terminalSession", "adoptLegacyMonitor", "mutation", input),
|
|
30050
30103
|
listSessions: (input) => dispatch("terminalSession", "listSessions", "query", input),
|
|
30051
30104
|
serverShellStatus: (input) => dispatch("terminalSession", "serverShellStatus", "query", input),
|
|
30052
30105
|
openSession: (input) => dispatch("terminalSession", "openSession", "mutation", input),
|
|
@@ -132,6 +132,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
132
132
|
* and the storage as branches of one bus. One read-only `energy-system` cap carries
|
|
133
133
|
* every value; the storage is a field of it, never the `battery` cap (#513, #522). */
|
|
134
134
|
DeviceType["EnergySystem"] = "energy-system";
|
|
135
|
+
/** Something that RUNS on a machine, or the machine itself (#585): a VM, an app
|
|
136
|
+
* container, an LXC, an app, or a host. The kind is the ROLE (D1033, D1056), never
|
|
137
|
+
* a field; one `workload` cap carries the state, the controls and the resources. */
|
|
138
|
+
DeviceType["Workload"] = "workload";
|
|
135
139
|
return DeviceType;
|
|
136
140
|
}({});
|
|
137
141
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -367,6 +371,11 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
367
371
|
* `light` type: the provider owns the type, and a light implies brightness
|
|
368
372
|
* or colour this relay lacks. */
|
|
369
373
|
DeviceRole["SwitchLight"] = "switch-light";
|
|
374
|
+
/** One port of a network switch that powers the device behind it (PoE): on /
|
|
375
|
+
* off feeds or cuts that power. Its link is `network-link`, its draw
|
|
376
|
+
* `power-meter`. Restarting the powered device through the port is that
|
|
377
|
+
* device's `power-source` cap, never a reboot of the port. */
|
|
378
|
+
DeviceRole["PoePort"] = "poe-port";
|
|
370
379
|
/** Air conditioner / split unit: cooling, fan speed, louvres. */
|
|
371
380
|
DeviceRole["ClimateAc"] = "climate-ac";
|
|
372
381
|
/** Room thermostat: a setpoint and a room temperature. The default. */
|
|
@@ -447,6 +456,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
447
456
|
/** Emits a pulse train (infrared or RF) on request — the `ir-transmitter`
|
|
448
457
|
* cap. A `DeviceType.Generic` device. */
|
|
449
458
|
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
459
|
+
/** A virtual machine on a hypervisor. */
|
|
460
|
+
DeviceRole["Vm"] = "vm";
|
|
461
|
+
/** An application container (Docker, Podman). */
|
|
462
|
+
DeviceRole["AppContainer"] = "app-container";
|
|
463
|
+
/** A system container (LXC). */
|
|
464
|
+
DeviceRole["Lxc"] = "lxc";
|
|
465
|
+
/** An application or service running on a host. */
|
|
466
|
+
DeviceRole["App"] = "app";
|
|
467
|
+
/** A machine that runs workloads or is an appliance with its own OS: a
|
|
468
|
+
* server, a hypervisor, a gateway console, a CCU. */
|
|
469
|
+
DeviceRole["Host"] = "host";
|
|
450
470
|
return DeviceRole;
|
|
451
471
|
}({});
|
|
452
472
|
//#endregion
|
|
@@ -132,6 +132,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
132
132
|
* and the storage as branches of one bus. One read-only `energy-system` cap carries
|
|
133
133
|
* every value; the storage is a field of it, never the `battery` cap (#513, #522). */
|
|
134
134
|
DeviceType["EnergySystem"] = "energy-system";
|
|
135
|
+
/** Something that RUNS on a machine, or the machine itself (#585): a VM, an app
|
|
136
|
+
* container, an LXC, an app, or a host. The kind is the ROLE (D1033, D1056), never
|
|
137
|
+
* a field; one `workload` cap carries the state, the controls and the resources. */
|
|
138
|
+
DeviceType["Workload"] = "workload";
|
|
135
139
|
return DeviceType;
|
|
136
140
|
}({});
|
|
137
141
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -367,6 +371,11 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
367
371
|
* `light` type: the provider owns the type, and a light implies brightness
|
|
368
372
|
* or colour this relay lacks. */
|
|
369
373
|
DeviceRole["SwitchLight"] = "switch-light";
|
|
374
|
+
/** One port of a network switch that powers the device behind it (PoE): on /
|
|
375
|
+
* off feeds or cuts that power. Its link is `network-link`, its draw
|
|
376
|
+
* `power-meter`. Restarting the powered device through the port is that
|
|
377
|
+
* device's `power-source` cap, never a reboot of the port. */
|
|
378
|
+
DeviceRole["PoePort"] = "poe-port";
|
|
370
379
|
/** Air conditioner / split unit: cooling, fan speed, louvres. */
|
|
371
380
|
DeviceRole["ClimateAc"] = "climate-ac";
|
|
372
381
|
/** Room thermostat: a setpoint and a room temperature. The default. */
|
|
@@ -447,6 +456,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
447
456
|
/** Emits a pulse train (infrared or RF) on request — the `ir-transmitter`
|
|
448
457
|
* cap. A `DeviceType.Generic` device. */
|
|
449
458
|
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
459
|
+
/** A virtual machine on a hypervisor. */
|
|
460
|
+
DeviceRole["Vm"] = "vm";
|
|
461
|
+
/** An application container (Docker, Podman). */
|
|
462
|
+
DeviceRole["AppContainer"] = "app-container";
|
|
463
|
+
/** A system container (LXC). */
|
|
464
|
+
DeviceRole["Lxc"] = "lxc";
|
|
465
|
+
/** An application or service running on a host. */
|
|
466
|
+
DeviceRole["App"] = "app";
|
|
467
|
+
/** A machine that runs workloads or is an appliance with its own OS: a
|
|
468
|
+
* server, a hypervisor, a gateway console, a CCU. */
|
|
469
|
+
DeviceRole["Host"] = "host";
|
|
450
470
|
return DeviceRole;
|
|
451
471
|
}({});
|
|
452
472
|
//#endregion
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Engine-hosted blocks (planning#580): a Camera grid or a Terminal camera is a
|
|
3
|
+
* core block whose camera row `(composer, composed-<blockId>)` the composer
|
|
4
|
+
* owns, and whose camera caps an ENGINE (the camera-grid builtin, the Terminal
|
|
5
|
+
* addon) serves as a cross-addon native on that row (D663). The engine keeps no
|
|
6
|
+
* list of its own (D3): every pass it reads the blocks (`listCompositions`) and
|
|
7
|
+
* the composer's rows, and hosts what both name.
|
|
8
|
+
*
|
|
9
|
+
* Three pieces, shared by both engines:
|
|
10
|
+
*
|
|
11
|
+
* - `selectEngineHostedBlocks` — the blocks of one helper kind whose row
|
|
12
|
+
* exists. `not-loaded` is UNTRUSTED, never an empty list (D315/D49).
|
|
13
|
+
* - `HostedWithdrawalGate` — a hosted block is withdrawn only after two
|
|
14
|
+
* consecutive trusted reads agree it is gone (D49).
|
|
15
|
+
* - `hostEngineDevice` — build the engine's device on the foreign row through
|
|
16
|
+
* `loadContext` (D677) and withdraw exactly the natives it registered.
|
|
17
|
+
* - `sweepLegacyEngineRows` — remove the camera rows the engine declared
|
|
18
|
+
* itself before its cameras were blocks (no migration: the operator
|
|
19
|
+
* recreates them as blocks).
|
|
20
|
+
*/
|
|
21
|
+
import type { CompositionListRead } from '../capabilities/core-blocks.cap.js';
|
|
22
|
+
import { type DeclaredDeviceRow, type DeclaredIntegrationRow } from '../device/declared-device.js';
|
|
23
|
+
import type { IScopedLogger } from '../interfaces/logging.js';
|
|
24
|
+
import type { DeviceConstructor, DeviceManagerApi } from '../device/device-context.js';
|
|
25
|
+
import type { IDevice } from '../device/device.js';
|
|
26
|
+
import type { Composition } from './composition.js';
|
|
27
|
+
import type { EngineHostedHelperKind, EngineHostedHelperSpec } from './helpers/spec.js';
|
|
28
|
+
/** A composer device row, as `deviceManager.listAll({ addonId: 'composer' })` lists it. */
|
|
29
|
+
export interface ComposerDeviceRow {
|
|
30
|
+
readonly id: number;
|
|
31
|
+
readonly stableId: string;
|
|
32
|
+
}
|
|
33
|
+
/** The spec of one engine-hosted helper kind. */
|
|
34
|
+
export type EngineHostedSpecOf<K extends EngineHostedHelperKind> = Extract<EngineHostedHelperSpec, {
|
|
35
|
+
readonly kind: K;
|
|
36
|
+
}>;
|
|
37
|
+
/** One block an engine serves, joined with the composer row that carries its camera. */
|
|
38
|
+
export interface EngineHostedBlock<S extends EngineHostedHelperSpec> {
|
|
39
|
+
readonly blockId: string;
|
|
40
|
+
readonly deviceId: number;
|
|
41
|
+
readonly stableId: string;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly enabled: boolean;
|
|
44
|
+
/** What `updateComposition` needs as `expectedUpdatedAt`. */
|
|
45
|
+
readonly updatedAt: number;
|
|
46
|
+
readonly composition: Composition;
|
|
47
|
+
readonly spec: S;
|
|
48
|
+
}
|
|
49
|
+
export type EngineHostedBlocksRead<S extends EngineHostedHelperSpec> = {
|
|
50
|
+
readonly kind: 'trusted';
|
|
51
|
+
readonly blocks: readonly EngineHostedBlock<S>[];
|
|
52
|
+
} | {
|
|
53
|
+
readonly kind: 'untrusted';
|
|
54
|
+
readonly reason: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* The blocks of `kind` whose composer row exists. A block whose row the
|
|
58
|
+
* composer has not declared yet is left out: nothing can be hosted on it until
|
|
59
|
+
* its next apply, and the next pass picks it up.
|
|
60
|
+
*/
|
|
61
|
+
export declare function selectEngineHostedBlocks<K extends EngineHostedHelperKind>(kind: K, compositions: CompositionListRead, composerRows: readonly ComposerDeviceRow[]): EngineHostedBlocksRead<EngineHostedSpecOf<K>>;
|
|
62
|
+
/**
|
|
63
|
+
* D49 for an engine's hosted set: a block missing from ONE trusted read is
|
|
64
|
+
* kept; a second consecutive trusted read that agrees withdraws it. An
|
|
65
|
+
* untrusted read is never fed here, so it neither counts nor resets.
|
|
66
|
+
*/
|
|
67
|
+
export declare class HostedWithdrawalGate {
|
|
68
|
+
private misses;
|
|
69
|
+
/**
|
|
70
|
+
* `hosted`: what the engine serves now; `present`: what this trusted read
|
|
71
|
+
* names. Returns the ids to withdraw now, and the ids kept on a first miss.
|
|
72
|
+
*/
|
|
73
|
+
judge(hosted: Iterable<string>, present: ReadonlySet<string>): {
|
|
74
|
+
readonly withdraw: readonly string[];
|
|
75
|
+
readonly held: readonly string[];
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/** A device an engine built on a row it does not own. */
|
|
79
|
+
export interface HostedEngineDevice<D extends IDevice> {
|
|
80
|
+
readonly device: D;
|
|
81
|
+
/** Run the device's own teardown, then unregister every native it registered. */
|
|
82
|
+
withdraw(): Promise<void>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Build `DeviceClass` on the composer's row `(stableId, id)`. The context is
|
|
86
|
+
* `loadContext` (D677: a caller that BUILDS a device hydrates its stored
|
|
87
|
+
* runtime state first); a kernel without it is refused by name rather than
|
|
88
|
+
* building on an empty state. The device is never `register`ed and its config
|
|
89
|
+
* never persisted: the row, its name and its lifetime are the composer's.
|
|
90
|
+
*/
|
|
91
|
+
export declare function hostEngineDevice<D extends IDevice>(devices: DeviceManagerApi, row: ComposerDeviceRow, config: Record<string, unknown>, DeviceClass: DeviceConstructor<D>): Promise<HostedEngineDevice<D>>;
|
|
92
|
+
/** What the legacy sweep reads and removes through. */
|
|
93
|
+
export interface LegacyEngineRowsPorts {
|
|
94
|
+
readonly logger: IScopedLogger;
|
|
95
|
+
/** The engine's BARE addon id: the owner of its old rows. */
|
|
96
|
+
readonly addonId: string;
|
|
97
|
+
readonly devices: DeviceManagerApi;
|
|
98
|
+
readonly localNodeId?: string | undefined;
|
|
99
|
+
/** The integration the old rows were declared under; `null` when there is none. */
|
|
100
|
+
readonly getIntegration: (addonId: string) => Promise<DeclaredIntegrationRow | null>;
|
|
101
|
+
/** Every row the addon owns (`deviceManager.listAll({ addonId })`). Fallible. */
|
|
102
|
+
readonly listAddonRows: (addonId: string) => Promise<readonly DeclaredDeviceRow[]>;
|
|
103
|
+
}
|
|
104
|
+
/** `none`: the addon never declared an integration. `drained`: no old row was left to remove. */
|
|
105
|
+
export type LegacyEngineSweep = {
|
|
106
|
+
readonly kind: 'none';
|
|
107
|
+
} | {
|
|
108
|
+
readonly kind: 'swept';
|
|
109
|
+
readonly removed: readonly number[];
|
|
110
|
+
readonly drained: boolean;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Whether an engine may stop sweeping: only once a pass found no old row left.
|
|
114
|
+
* `none` is not done — a registry that has not answered the integration yet
|
|
115
|
+
* reads as null too, and the sweep is one indexed read per pass.
|
|
116
|
+
*/
|
|
117
|
+
export declare function legacySweepDone(sweep: LegacyEngineSweep): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* The legacy rows, one bounded batch at a time: only the rows under the old
|
|
120
|
+
* integration, ordered by id, at most `DECLARED_DEVICE_SWEEP_LIMIT` — a large
|
|
121
|
+
* leftover set drains over passes instead of being refused whole by the
|
|
122
|
+
* sweep's own bound.
|
|
123
|
+
*/
|
|
124
|
+
export declare function legacyEngineRowsIndex(rows: readonly DeclaredDeviceRow[], integrationId: string): readonly DeclaredDeviceRow[];
|
|
125
|
+
/**
|
|
126
|
+
* Remove every camera row an engine declared itself before its cameras were
|
|
127
|
+
* blocks, unconditionally, through the declared sweep (`removeDevice` →
|
|
128
|
+
* tombstone, D865). No integration means nothing was ever declared, and
|
|
129
|
+
* nothing is minted to find out. A failed read throws: the caller retries.
|
|
130
|
+
*/
|
|
131
|
+
export declare function sweepLegacyEngineRows(ports: LegacyEngineRowsPorts, integrationName: string): Promise<LegacyEngineSweep>;
|
|
@@ -10,4 +10,4 @@ export { type HistoryValue, type IntegralScale, type SeriesBefore, type SeriesKi
|
|
|
10
10
|
export { type CalendarPeriod, type CalendarWindow, type HistoryRetention, type HistoryTier, type HistoryTierPlan, type OpenRange, type ResetPeriod, type RollingSpan, type RollingWindow, type StatisticWindow, CALENDAR_PERIODS, CalendarWindowSchema, DAY_MS, DEFAULT_HISTORY_RETENTION, historyRetentionFromSettings, HISTORY_FAST_MS, HISTORY_SLOW_MS, HISTORY_TIERS, HOUR_MS, MINUTE_MS, MIN_CUSTOM_MINUTES, RESET_PERIODS, ROLLING_SPANS, RollingWindowSchema, StatisticWindowSchema, integralCadenceMs, maxDurationMs, nextLocalMidnight, openReset, openStatistic, planResetTier, planStatisticTier, rollingDurationMs, statisticCadenceMs, } from './history-window.js';
|
|
11
11
|
export { type HelperMemberFact, helperSaveProblems, } from './save.js';
|
|
12
12
|
export { type SourcePick, type SourcePickAccept, type SourcePickFieldChoice, type SourcePickHistory, type SourcePickRequest, type MathSourceKind, sourcePickForHistory, sourcePickForMath, sourcePickAcceptsDevice, sourcePickForTemplate, } from './source-pick.js';
|
|
13
|
-
export { ACTIVE_CRITERIA, AGGREGATE_REDUCERS, ActiveCriterionSchema, AggregateReducerSchema, BINARY_AGGREGATES, GROUP_TEMPLATE_IDS, ARITHMETIC_OPS, ArithmeticHelperSpecSchema, DERIVATIVE_UNITS, DerivativeHelperSpecSchema, EXPRESSION_OUTPUTS, ExpressionHelperSpecSchema, ThresholdHelperSpecSchema, GroupHelperSpecSchema, GroupTemplateIdSchema, HelperMemberSchema, HelperSpecSchema, INTEGRAL_OUTPUTS, IntegralHelperSpecSchema, MAX_HELPER_MEMBERS, helperMembers, isHistoryHelper, NUMERIC_AGGREGATES, StatisticHelperSpecSchema, type ActiveCriterion, type AggregateReducer, type BinaryAggregate, type ArithmeticHelperSpec, type ArithmeticOp, type DerivativeHelperSpec, type DerivativeUnit, type ExpressionHelperSpec, type ExpressionInput, type ExpressionOutput, type ThresholdHelperSpec, type GroupHelperSpec, type GroupTemplateId, type HelperMember, type HelperSpec, type HistoryHelperSpec, type IntegralHelperSpec, type IntegralOutput, type NumericAggregate, type StatisticHelperSpec, type StatisticStat, } from './spec.js';
|
|
13
|
+
export { ACTIVE_CRITERIA, AGGREGATE_REDUCERS, ActiveCriterionSchema, AggregateReducerSchema, BINARY_AGGREGATES, GROUP_TEMPLATE_IDS, ARITHMETIC_OPS, ArithmeticHelperSpecSchema, DERIVATIVE_UNITS, DerivativeHelperSpecSchema, EXPRESSION_OUTPUTS, ExpressionHelperSpecSchema, ThresholdHelperSpecSchema, GroupHelperSpecSchema, GroupTemplateIdSchema, HelperMemberSchema, HelperSpecSchema, INTEGRAL_OUTPUTS, IntegralHelperSpecSchema, MAX_HELPER_MEMBERS, helperMembers, helperDeviceRefs, isEngineHostedHelper, isHistoryHelper, ENGINE_HOSTED_HELPER_KINDS, GRID_PROFILES, DEFAULT_GRID_FPS, DEFAULT_GRID_PROFILES, newGridHelperSpec, GridCellSpecSchema, GridHelperSpecSchema, MAX_GRID_CELLS, GridRectSchema, TerminalHelperSpecSchema, type EngineHostedHelperKind, type EngineHostedHelperSpec, type GridCellSpec, type GridHelperSpec, type GridProfile, type GridRect, type TerminalHelperSpec, NUMERIC_AGGREGATES, StatisticHelperSpecSchema, type ActiveCriterion, type AggregateReducer, type BinaryAggregate, type ArithmeticHelperSpec, type ArithmeticOp, type DerivativeHelperSpec, type DerivativeUnit, type ExpressionHelperSpec, type ExpressionInput, type ExpressionOutput, type ThresholdHelperSpec, type GroupHelperSpec, type GroupTemplateId, type HelperMember, type HelperSpec, type HistoryHelperSpec, type IntegralHelperSpec, type IntegralOutput, type NumericAggregate, type StatisticHelperSpec, type StatisticStat, } from './spec.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { STATISTIC_STATS } from './history-math.js';
|
|
7
7
|
import { type ResetPeriod, type RollingWindow, type StatisticWindow } from './history-window.js';
|
|
8
|
-
import { CompositionSourceRefSchema } from '../source-ref.js';
|
|
8
|
+
import { type CompositionSourceRef, CompositionSourceRefSchema } from '../source-ref.js';
|
|
9
9
|
/** A group may name more members than an expression call (the 16-arg cap). */
|
|
10
10
|
export declare const MAX_HELPER_MEMBERS: number;
|
|
11
11
|
export declare const GROUP_TEMPLATE_IDS: readonly ['temperature', 'humidity', 'pressure', 'illuminance', 'power', 'energy', 'battery', 'numeric', 'motion', 'contact', 'leak', 'smoke', 'occupancy', 'binary', 'switch', 'light', 'fan', 'cover', 'valve', 'lock', 'media-player', 'climate'];
|
|
@@ -98,10 +98,64 @@ export type DerivativeHelperSpec = {
|
|
|
98
98
|
readonly source: HelperMember;
|
|
99
99
|
};
|
|
100
100
|
export declare const DerivativeHelperSpecSchema: z.ZodType<DerivativeHelperSpec>;
|
|
101
|
-
|
|
101
|
+
/** The stream profiles a camera grid can publish. */
|
|
102
|
+
export declare const GRID_PROFILES: readonly ['high', 'mid', 'low'];
|
|
103
|
+
export type GridProfile = (typeof GRID_PROFILES)[number];
|
|
104
|
+
export declare const MAX_GRID_CELLS: number;
|
|
105
|
+
export type GridRect = {
|
|
106
|
+
readonly x: number;
|
|
107
|
+
readonly y: number;
|
|
108
|
+
readonly width: number;
|
|
109
|
+
readonly height: number;
|
|
110
|
+
};
|
|
111
|
+
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
112
|
+
export declare const GridRectSchema: z.ZodType<GridRect>;
|
|
113
|
+
/**
|
|
114
|
+
* One grid cell: a source camera (by its addon-facing identity, never a
|
|
115
|
+
* numeric id), the part of its picture taken, and where it lands on the canvas.
|
|
116
|
+
*/
|
|
117
|
+
export type GridCellSpec = {
|
|
118
|
+
readonly source: CompositionSourceRef;
|
|
119
|
+
readonly region: GridRect;
|
|
120
|
+
readonly cell: GridRect;
|
|
121
|
+
};
|
|
122
|
+
export declare const GridCellSpecSchema: z.ZodType<GridCellSpec>;
|
|
123
|
+
/**
|
|
124
|
+
* A camera grid (planning#580). The composer declares its camera
|
|
125
|
+
* (`composed-<blockId>`); the camera-grid engine serves the camera caps on it.
|
|
126
|
+
* No canvas size: it is derived from the cells and the sources.
|
|
127
|
+
*/
|
|
128
|
+
export type GridHelperSpec = {
|
|
129
|
+
readonly kind: 'grid';
|
|
130
|
+
readonly fps: number;
|
|
131
|
+
readonly publishedProfiles: readonly GridProfile[];
|
|
132
|
+
readonly cells: readonly GridCellSpec[];
|
|
133
|
+
};
|
|
134
|
+
export declare const GridHelperSpecSchema: z.ZodType<GridHelperSpec>;
|
|
135
|
+
/** A new grid: no cells yet, 10 fps, publishing the mid and low profiles. */
|
|
136
|
+
export declare const DEFAULT_GRID_FPS: number;
|
|
137
|
+
export declare const DEFAULT_GRID_PROFILES: readonly GridProfile[];
|
|
138
|
+
export declare function newGridHelperSpec(): GridHelperSpec;
|
|
139
|
+
/**
|
|
140
|
+
* A Terminal camera (planning#580): the camera of one Terminal, created on the
|
|
141
|
+
* Terminal page. The composer declares the camera; addon-terminal serves it.
|
|
142
|
+
*/
|
|
143
|
+
export type TerminalHelperSpec = {
|
|
144
|
+
readonly kind: 'terminal';
|
|
145
|
+
readonly terminalId: string;
|
|
146
|
+
};
|
|
147
|
+
export declare const TerminalHelperSpecSchema: z.ZodType<TerminalHelperSpec>;
|
|
148
|
+
export type HelperSpec = GroupHelperSpec | StatisticHelperSpec | IntegralHelperSpec | ThresholdHelperSpec | ArithmeticHelperSpec | ExpressionHelperSpec | DerivativeHelperSpec | GridHelperSpec | TerminalHelperSpec;
|
|
102
149
|
export declare const HelperSpecSchema: z.ZodType<HelperSpec>;
|
|
103
150
|
/** The kinds the composer runs from device history, on a schedule. */
|
|
104
151
|
export type HistoryHelperSpec = StatisticHelperSpec | IntegralHelperSpec | DerivativeHelperSpec;
|
|
105
152
|
export declare function isHistoryHelper(spec: HelperSpec): spec is HistoryHelperSpec;
|
|
106
153
|
/** Every member a helper reads. A group has many; the others have one. */
|
|
107
154
|
export declare function helperMembers(spec: HelperSpec): readonly HelperMember[];
|
|
155
|
+
/** The kinds whose camera an engine serves on the composer's row (planning#580). */
|
|
156
|
+
export declare const ENGINE_HOSTED_HELPER_KINDS: readonly ['grid', 'terminal'];
|
|
157
|
+
export type EngineHostedHelperKind = (typeof ENGINE_HOSTED_HELPER_KINDS)[number];
|
|
158
|
+
export type EngineHostedHelperSpec = GridHelperSpec | TerminalHelperSpec;
|
|
159
|
+
export declare function isEngineHostedHelper(spec: HelperSpec): spec is EngineHostedHelperSpec;
|
|
160
|
+
/** The devices a helper depends on without reading a field of them: a grid's cell sources. */
|
|
161
|
+
export declare function helperDeviceRefs(spec: HelperSpec): readonly CompositionSourceRef[];
|
|
@@ -6,6 +6,7 @@ export * from './composable-caps.js';
|
|
|
6
6
|
export * from './helpers/index.js';
|
|
7
7
|
export * from './actuator-running.js';
|
|
8
8
|
export * from './composition.js';
|
|
9
|
+
export * from './engine-hosted-blocks.js';
|
|
9
10
|
export * from './composition-events.js';
|
|
10
11
|
export * from './composition-graph.js';
|
|
11
12
|
export * from './composition-items.js';
|