@camstack/types 1.2.418 → 1.2.420

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 (46) hide show
  1. package/dist/addon.js +2 -2
  2. package/dist/addon.mjs +2 -2
  3. package/dist/capabilities/addons.cap.d.ts +67 -1
  4. package/dist/capabilities/color.cap.d.ts +1 -0
  5. package/dist/capabilities/composer.cap.d.ts +3 -0
  6. package/dist/capabilities/core-blocks.cap.d.ts +21 -0
  7. package/dist/capabilities/group-commands.cap.d.ts +49 -0
  8. package/dist/capabilities/group-status.cap.d.ts +1 -1
  9. package/dist/capabilities/index.d.ts +4 -2
  10. package/dist/capabilities/notification-rules.cap.d.ts +46 -0
  11. package/dist/capabilities/osd-manager.cap.d.ts +12 -0
  12. package/dist/client.d.ts +1 -1
  13. package/dist/client.js +191 -5
  14. package/dist/client.mjs +191 -6
  15. package/dist/composition/composition.d.ts +1 -0
  16. package/dist/composition/helpers/actuator.d.ts +58 -0
  17. package/dist/composition/helpers/catalog.d.ts +7 -2
  18. package/dist/composition/helpers/index.d.ts +2 -1
  19. package/dist/composition/helpers/spec.d.ts +6 -1
  20. package/dist/{composition-B85l9j1M.mjs → composition-OhpuespA.mjs} +10 -3
  21. package/dist/{composition-OJKOJJD-.js → composition-re1aezX9.js} +21 -2
  22. package/dist/device/cap-vocabulary/entries/sensors.d.ts +1 -1
  23. package/dist/enums/event-category.d.ts +8 -0
  24. package/dist/enums.js +1 -1
  25. package/dist/enums.mjs +1 -1
  26. package/dist/{event-category-DXZ3f9Q5.js → event-category-Ave2VSxY.js} +8 -0
  27. package/dist/{event-category-DHXxB8t9.mjs → event-category-CT-hz5Rb.mjs} +8 -0
  28. package/dist/generated/addon-api.d.ts +21 -0
  29. package/dist/generated/cap-status-types.d.ts +3 -1
  30. package/dist/generated/capability-router-map.d.ts +5 -2
  31. package/dist/generated/device-local-state.d.ts +3 -0
  32. package/dist/generated/device-proxy.d.ts +3 -0
  33. package/dist/generated/device-scoped-caps.d.ts +1 -1
  34. package/dist/generated/history-catalog.d.ts +1 -1
  35. package/dist/generated/method-access-map.d.ts +1 -1
  36. package/dist/generated/method-device-selectors.d.ts +1 -1
  37. package/dist/generated/runtime-state-durability.d.ts +1 -1
  38. package/dist/generated/system-proxy.d.ts +1 -1
  39. package/dist/index.js +341 -19
  40. package/dist/index.mjs +328 -20
  41. package/dist/interfaces/event-bus.d.ts +15 -0
  42. package/dist/node.js +1 -1
  43. package/dist/node.mjs +1 -1
  44. package/dist/{sleep-7Gw3GJ4n.js → sleep-YJ6FVsUu.js} +8 -2
  45. package/dist/{sleep-B81gwQuR.mjs → sleep-bykKrTgu.mjs} +8 -2
  46. package/package.json +1 -1
package/dist/client.mjs CHANGED
@@ -22677,6 +22677,8 @@ var NcSystemEventKindSchema = z.enum([
22677
22677
  "detection-blind",
22678
22678
  "motion-noisy",
22679
22679
  "motion-calm",
22680
+ "package-llm-silent",
22681
+ "package-llm-answered",
22680
22682
  "recording-stalled",
22681
22683
  "recording-healthy",
22682
22684
  "recording-degraded",
@@ -26233,6 +26235,162 @@ method(z.object({
26233
26235
  auth: "protected"
26234
26236
  });
26235
26237
  //#endregion
26238
+ //#region src/device/container-primary-child.ts
26239
+ /**
26240
+ * WHICH child a container stands for — one definition, for every consumer.
26241
+ *
26242
+ * A CONTAINER device has no controllable surface of its own: it groups entity
26243
+ * children (a Gree air-conditioner grouping a climate child plus light, x-fan
26244
+ * and health switches). Everything that has to show or act on a container has
26245
+ * to answer the same question — which child IS the container — and until now
26246
+ * three places answered it separately:
26247
+ *
26248
+ * - `ui-library/device-controls/primary-child.ts` (admin-ui rendering)
26249
+ * - `addon-provider-homeassistant` PARENT_TYPE_PRIORITY (adoption)
26250
+ * - the viewer's own `container-primary.ts` (linked-devices panel)
26251
+ *
26252
+ * Each carried the same list and a comment asking the others to stay in sync.
26253
+ * This is that list, in the one package all of them already depend on.
26254
+ *
26255
+ * `ui-library` and the server's linked-devices expansion IMPORT it. Two
26256
+ * consumers cannot, and keep a checked copy instead: the viewer resolves
26257
+ * `@camstack/types` from its own `node_modules` (an installed release, where a
26258
+ * newly added export simply is not there), and the Home Assistant provider
26259
+ * expresses the same precedence over the `DeviceType` enum because it answers
26260
+ * a different question from the same ordering. `scripts/check-container-
26261
+ * priority-in-sync.ts` fails the build when either drifts — the comment that
26262
+ * used to ask for this could not.
26263
+ *
26264
+ * The rule has two halves and the ORDER matters: an operator's explicit pick
26265
+ * wins outright, and only in its absence does type priority decide. The pick is
26266
+ * keyed on the child's re-sync-stable `entityId`, not its numeric id, so it
26267
+ * survives a re-sync that reallocates ids.
26268
+ */
26269
+ /**
26270
+ * Type priority, most→least "primary". An actuator (climate / lock / cover / …)
26271
+ * outranks a bare `switch` so a container's defining child wins over its
26272
+ * auxiliary switches. Unknown or absent types sort after every entry.
26273
+ *
26274
+ * NB: `siren` deliberately sits BELOW `switch` — it is a switch-family
26275
+ * actuator, and a camera's siren must not out-rank the thing the container is.
26276
+ *
26277
+ * These strings are matched against a child's `DeviceType` VALUE, so they must
26278
+ * equal the enum's string values.
26279
+ */
26280
+ var CONTAINER_CHILD_PRIORITY = [
26281
+ "media-player",
26282
+ "alarm-panel",
26283
+ "thermostat",
26284
+ "climate",
26285
+ "humidifier",
26286
+ "water-heater",
26287
+ "lock",
26288
+ "cover",
26289
+ "valve",
26290
+ "fan",
26291
+ "vacuum",
26292
+ "lawn-mower",
26293
+ "dishwasher",
26294
+ "light",
26295
+ "switch",
26296
+ "siren",
26297
+ "button",
26298
+ "control",
26299
+ "notifier",
26300
+ "script",
26301
+ "automation",
26302
+ "update",
26303
+ "presence",
26304
+ "weather",
26305
+ "image",
26306
+ "sensor"
26307
+ ];
26308
+ /**
26309
+ * Roles that say what a container IS, most→least defining. Consulted BEFORE
26310
+ * type priority, because `DeviceType` cannot tell them apart: Home Assistant
26311
+ * maps a door contact, a battery level, a temperature reading and a "last seen"
26312
+ * timestamp all to `DeviceType.Sensor`. Measured on container 4127 — children
26313
+ * `battery-sensor`, `temperature-sensor`, `datetime-sensor`, `contact-sensor`
26314
+ * and a role-less `button` — the type list ranked `button` above `sensor` and
26315
+ * the container stood for its "Identifica" button instead of the door contact
26316
+ * it is named after.
26317
+ *
26318
+ * Only STATE-DEFINING roles belong here. A diagnostic reading (battery,
26319
+ * temperature, humidity, signal, last-seen) is never what a container is, so
26320
+ * they are deliberately absent and fall through to type priority.
26321
+ */
26322
+ var CONTAINER_CHILD_ROLE_PRIORITY = [
26323
+ "contact-sensor",
26324
+ "motion-sensor",
26325
+ "occupancy-sensor",
26326
+ "smoke-sensor",
26327
+ "co-sensor",
26328
+ "gas-sensor",
26329
+ "leak-sensor",
26330
+ "vibration-sensor",
26331
+ "tamper-sensor",
26332
+ "sound-sensor"
26333
+ ];
26334
+ /**
26335
+ * NOT in the list, deliberately: `binary-sensor` and `binary-helper`. They are
26336
+ * GENERIC — they say "this reports a boolean", not what the container is — and
26337
+ * ranking them above type priority is a live regression, not a hypothetical:
26338
+ * container 1837 holds a real `lock` (features `['lock-open']`) alongside a
26339
+ * child named "Actuator" whose only role is `binary-sensor`, and the generic
26340
+ * role beat the lock. A role earns a place here by naming a SUBJECT (a contact,
26341
+ * a leak, smoke), never by naming a datatype.
26342
+ */
26343
+ function roleRank(role) {
26344
+ if (role === void 0) return CONTAINER_CHILD_ROLE_PRIORITY.length;
26345
+ const i = CONTAINER_CHILD_ROLE_PRIORITY.indexOf(role);
26346
+ return i === -1 ? CONTAINER_CHILD_ROLE_PRIORITY.length : i;
26347
+ }
26348
+ function rank(type) {
26349
+ const i = CONTAINER_CHILD_PRIORITY.indexOf(type);
26350
+ return i === -1 ? CONTAINER_CHILD_PRIORITY.length : i;
26351
+ }
26352
+ /**
26353
+ * The child a container stands for: the operator's pick when it still exists,
26354
+ * else the highest-priority type. `null` for a childless container — a caller
26355
+ * must decide what an empty container means for it, rather than being handed a
26356
+ * child that is not there.
26357
+ */
26358
+ /**
26359
+ * Two names for the same thing, compared the way an integration writes them.
26360
+ *
26361
+ * An exact case-insensitive match was not enough, and the failure was total
26362
+ * rather than marginal. An ESPHome shutter arrives as a container named
26363
+ * `Tapparella-Kitchen` whose children include the COVER, named `Tapparella
26364
+ * kitchen`, and a device-presence entity carrying the slug verbatim,
26365
+ * `tapparella-kitchen`. The slug matched the container exactly and the cover
26366
+ * did not, so the namesake tie-break handed the container to a connectivity
26367
+ * indicator — and the viewer's accessory panel, which correctly shows only
26368
+ * children with an actuating control, then rendered NOTHING. The operator saw
26369
+ * no shutters at all on kitchen, studio and both porch cameras (2026-09-22).
26370
+ *
26371
+ * `Markise` was the control case that proved the mechanism: there the cover
26372
+ * really is called exactly like its container, so it won and appeared.
26373
+ *
26374
+ * Separators are therefore normalised — `-`, `_` and whitespace are the same
26375
+ * character for this comparison, and runs of them collapse. The two candidates
26376
+ * then tie on the namesake and the decision falls through to `rank(type)`,
26377
+ * where `cover` is eighth and a `presence` entity is not listed at all. The
26378
+ * criterion keeps doing its job for a container whose child IS the namesake;
26379
+ * it stops being decided by which integration used a hyphen.
26380
+ */
26381
+ function sameName(childName, containerName) {
26382
+ const flatten = (v) => v.toLowerCase().replace(/[-_\s]+/g, " ").trim();
26383
+ return flatten(childName) === flatten(containerName);
26384
+ }
26385
+ function resolveContainerPrimaryChild(children, overrideEntityId, containerName) {
26386
+ if (overrideEntityId !== void 0 && overrideEntityId !== null) {
26387
+ const picked = children.find((c) => c.stableId === overrideEntityId) ?? children.find((c) => c.entityId !== void 0 && c.entityId === overrideEntityId);
26388
+ if (picked !== void 0) return picked;
26389
+ }
26390
+ const namesake = (c) => containerName !== void 0 && containerName.length > 0 && c.name !== void 0 && sameName(c.name, containerName) ? 0 : 1;
26391
+ return [...children].toSorted((a, b) => roleRank(a.role) - roleRank(b.role) || namesake(a) - namesake(b) || rank(a.type) - rank(b.type))[0] ?? null;
26392
+ }
26393
+ //#endregion
26236
26394
  //#region src/device/device-state-handle.ts
26237
26395
  var DEVICE_STATE_EVENT_CATEGORY = "device.state-changed";
26238
26396
  /**
@@ -26667,6 +26825,7 @@ function createDeviceProxy(api, binding, opts) {
26667
26825
  const featureProbeInterface = { getStatus: (input) => dispatch("feature-probe", "featureProbe", "getStatus", "query", input) };
26668
26826
  const floodInterface = { getStatus: (input) => dispatch("flood", "flood", "getStatus", "query", input) };
26669
26827
  const gasInterface = { getStatus: (input) => dispatch("gas", "gas", "getStatus", "query", input) };
26828
+ const groupCommandsInterface = { getStatus: (input) => dispatch("group-commands", "groupCommands", "getStatus", "query", input) };
26670
26829
  const groupStatusInterface = { getStatus: (input) => dispatch("group-status", "groupStatus", "getStatus", "query", input) };
26671
26830
  const heatingValveInterface = { getStatus: (input) => dispatch("heating-valve", "heatingValve", "getStatus", "query", input) };
26672
26831
  const humidifierInterface = {
@@ -27222,6 +27381,7 @@ function createDeviceProxy(api, binding, opts) {
27222
27381
  featureProbe: createSliceHandle(stateSource, binding.deviceId, "feature-probe"),
27223
27382
  flood: createSliceHandle(stateSource, binding.deviceId, "flood"),
27224
27383
  gas: createSliceHandle(stateSource, binding.deviceId, "gas"),
27384
+ groupCommands: createSliceHandle(stateSource, binding.deviceId, "group-commands"),
27225
27385
  groupStatus: createSliceHandle(stateSource, binding.deviceId, "group-status"),
27226
27386
  heatingValve: createSliceHandle(stateSource, binding.deviceId, "heating-valve"),
27227
27387
  humidifier: createSliceHandle(stateSource, binding.deviceId, "humidifier"),
@@ -27306,6 +27466,7 @@ function createDeviceProxy(api, binding, opts) {
27306
27466
  ...bound("feature-probe") ? { featureProbe: featureProbeInterface } : {},
27307
27467
  ...bound("flood") ? { flood: floodInterface } : {},
27308
27468
  ...bound("gas") ? { gas: gasInterface } : {},
27469
+ ...bound("group-commands") ? { groupCommands: groupCommandsInterface } : {},
27309
27470
  ...bound("group-status") ? { groupStatus: groupStatusInterface } : {},
27310
27471
  ...bound("heating-valve") ? { heatingValve: heatingValveInterface } : {},
27311
27472
  ...bound("humidifier") ? { humidifier: humidifierInterface } : {},
@@ -28085,6 +28246,7 @@ function createSystemProxy(api) {
28085
28246
  listCapabilityProviders: (input) => dispatch("addons", "listCapabilityProviders", "query", input),
28086
28247
  setCapabilityProviderEnabled: (input) => dispatch("addons", "setCapabilityProviderEnabled", "mutation", input),
28087
28248
  getVersions: (input) => dispatch("addons", "getVersions", "query", input),
28249
+ getPackageDocs: (input) => dispatch("addons", "getPackageDocs", "query", input),
28088
28250
  restartAddon: (input) => dispatch("addons", "restartAddon", "mutation", input),
28089
28251
  retryLoad: (input) => dispatch("addons", "retryLoad", "mutation", input),
28090
28252
  getAutoUpdateSettings: (input) => dispatch("addons", "getAutoUpdateSettings", "query", input),
@@ -29172,8 +29334,8 @@ var NC_SYSTEM_EVENT_FILTER_KEYS = [
29172
29334
  function systemEventFilterApplies(kind, filter) {
29173
29335
  if (LEGACY_KINDS_WITHOUT_FILTERS.has(kind)) return false;
29174
29336
  switch (filter) {
29175
- case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("recording-") || kind === "alarm-triggered";
29176
- case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind" || kind.startsWith("motion-");
29337
+ case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("package-llm-") || kind.startsWith("recording-") || kind === "alarm-triggered";
29338
+ case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("package-llm-");
29177
29339
  case "nodeIds": return kind.startsWith("node-") || kind === "addon-crash-loop" || kind === "addon-update-available" || kind === "addon-updated" || kind === "server-update-available" || kind === "wrapper-update-available" || kind === "server-updated" || kind.startsWith("storage-location-") || kind.startsWith("alert-");
29178
29340
  case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "node-updating" || kind === "server-updated";
29179
29341
  case "consumableLowPercent": return NC_CONSUMABLE_SYSTEM_EVENT_KINDS.includes(kind);
@@ -29230,6 +29392,8 @@ var NC_SYSTEM_EVENT_FAMILY = {
29230
29392
  "detection-blind": "device-events",
29231
29393
  "motion-noisy": "device-events",
29232
29394
  "motion-calm": "device-events",
29395
+ "package-llm-silent": "device-events",
29396
+ "package-llm-answered": "device-events",
29233
29397
  "recording-stalled": "device-events",
29234
29398
  "recording-healthy": "device-events",
29235
29399
  "recording-degraded": "device-events",
@@ -29331,6 +29495,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
29331
29495
  label: "Motion without a subject",
29332
29496
  kinds: ["motion-noisy", "motion-calm"]
29333
29497
  },
29498
+ {
29499
+ id: "package-llm",
29500
+ family: "device-events",
29501
+ label: "Package confirm",
29502
+ kinds: ["package-llm-silent", "package-llm-answered"]
29503
+ },
29334
29504
  {
29335
29505
  id: "recording",
29336
29506
  family: "device-events",
@@ -30328,6 +30498,8 @@ var DEVICE_EVENTS = [
30328
30498
  "detection-blind",
30329
30499
  "motion-noisy",
30330
30500
  "motion-calm",
30501
+ "package-llm-silent",
30502
+ "package-llm-answered",
30331
30503
  "recording-stalled",
30332
30504
  "recording-healthy",
30333
30505
  "recording-degraded",
@@ -30931,7 +31103,8 @@ var NC_TEMPLATE_VARS = [
30931
31103
  systemEventKinds: [
30932
31104
  "recording-degraded",
30933
31105
  ...DEVICE_ATTENTION,
30934
- ...ALERT_EPISODE
31106
+ ...ALERT_EPISODE,
31107
+ "package-llm-silent"
30935
31108
  ]
30936
31109
  },
30937
31110
  {
@@ -31024,7 +31197,8 @@ var NC_TEMPLATE_VARS = [
31024
31197
  systemEventKinds: [
31025
31198
  "storage-location-low",
31026
31199
  "storage-location-critical",
31027
- "storage-location-ok"
31200
+ "storage-location-ok",
31201
+ "package-llm-silent"
31028
31202
  ]
31029
31203
  },
31030
31204
  {
@@ -31435,7 +31609,9 @@ var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
31435
31609
  "device-attention-required",
31436
31610
  "device-attention-resolved",
31437
31611
  "rule-broken",
31438
- "rule-repaired"
31612
+ "rule-repaired",
31613
+ "package-llm-silent",
31614
+ "package-llm-answered"
31439
31615
  ];
31440
31616
  /**
31441
31617
  * Is this descriptor held back from the SERVED catalog as a whole (D647)?
@@ -31548,6 +31724,15 @@ var NC_SYSTEM_EVENT_CLASS_SPECS = [
31548
31724
  snapshotLabel: "Cameras with constant motion now",
31549
31725
  snapshotSection: null
31550
31726
  },
31727
+ {
31728
+ id: "package-llm-confirm",
31729
+ family: "device-events",
31730
+ label: "Package confirm (not answering / answering again)",
31731
+ bad: ["package-llm-silent"],
31732
+ recovery: ["package-llm-answered"],
31733
+ snapshotLabel: "Cameras whose package confirm is not answering",
31734
+ snapshotSection: null
31735
+ },
31551
31736
  {
31552
31737
  id: "recording-health",
31553
31738
  family: "device-events",
@@ -32208,4 +32393,4 @@ var TimelapseRuleSchema = TimelapseRuleInputSchema.extend({
32208
32393
  updatedAt: z.number()
32209
32394
  });
32210
32395
  //#endregion
32211
- export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CamProfileSchema, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFINITIVE_DEVICE_REFUSALS, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, ICON_CATEGORIES, ICON_ENTRIES, ICON_KEYS, ICON_VIEWER_MODULES, IconKeySchema, LOCATION_ICON_FALLBACK, MACRO_LABELS, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CAMERA_SCOPE_CAP_NAME, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SYSTEM_EVENT_CLASS_SPECS, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NcAlarmConfigSchema, NcAlarmSensorsSchema, NcAlarmSettingsPatchSchema, NcHistoryEntrySchema, NcRuleLastRunsSchema, NodeDirectorySchema, RECORDING_EXPORT_MAX_READ_BYTES, RETRAIN_REVIEW_ADJUSTED_IOU, RETRAIN_REVIEW_MATCH_IOU, RETRAIN_REVIEW_STATUSES, RETRAIN_REVISION_CONFLICT, SystemMirror, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleSchema, YAMNET_TO_MACRO, alarmDeviceBlocksArming, alarmDeviceSecureOnArm, alarmPatchLanded, buildDeviceEnrollmentLink, buildDeviceSignatureMessage, buildSubjectPath, bundledCamstack, canonicalIconKey, classifyRetrainReview, conditionVisibleForKind, createSystemProxy, deviceRefusalFromMessage, droppedConditionsForKind, expandSystemEventClasses, iconCategoryLabel, iconEntry, iconsInCategory, isDefinitiveDeviceRefusal, isDrawableSubjectPath, isHeldBackTemplateVar, isIconKey, isSystemRuleKind, kindsForDiscriminator, knownValues, locationIconKey, nodePickerItems, packagePickerItems, paintHex, paletteResultSchema, parseDeviceEnrollmentLink, parseRetrainRevisionConflict, pickerForCondition, pickerForRuleClasses, projectSubjectPath, resolveIconKey, resolveModeDelays, retrainBoxIou, retrainRevisionConflictMessage, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, searchIcons, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, subjectPathSampleFromBox, subjectPathSvgPoints, summarizeReview, systemEventClassKinds, systemEventClassesFor, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, withSystemEventClasses };
32396
+ export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CamProfileSchema, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFINITIVE_DEVICE_REFUSALS, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, ICON_CATEGORIES, ICON_ENTRIES, ICON_KEYS, ICON_VIEWER_MODULES, IconKeySchema, LOCATION_ICON_FALLBACK, MACRO_LABELS, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CAMERA_SCOPE_CAP_NAME, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SYSTEM_EVENT_CLASS_SPECS, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NcAlarmConfigSchema, NcAlarmSensorsSchema, NcAlarmSettingsPatchSchema, NcHistoryEntrySchema, NcRuleLastRunsSchema, NodeDirectorySchema, RECORDING_EXPORT_MAX_READ_BYTES, RETRAIN_REVIEW_ADJUSTED_IOU, RETRAIN_REVIEW_MATCH_IOU, RETRAIN_REVIEW_STATUSES, RETRAIN_REVISION_CONFLICT, SystemMirror, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleSchema, YAMNET_TO_MACRO, alarmDeviceBlocksArming, alarmDeviceSecureOnArm, alarmPatchLanded, buildDeviceEnrollmentLink, buildDeviceSignatureMessage, buildSubjectPath, bundledCamstack, canonicalIconKey, classifyRetrainReview, conditionVisibleForKind, createSystemProxy, deviceRefusalFromMessage, droppedConditionsForKind, expandSystemEventClasses, iconCategoryLabel, iconEntry, iconsInCategory, isDefinitiveDeviceRefusal, isDrawableSubjectPath, isHeldBackTemplateVar, isIconKey, isSystemRuleKind, kindsForDiscriminator, knownValues, locationIconKey, nodePickerItems, packagePickerItems, paintHex, paletteResultSchema, parseDeviceEnrollmentLink, parseRetrainRevisionConflict, pickerForCondition, pickerForRuleClasses, projectSubjectPath, resolveContainerPrimaryChild, resolveIconKey, resolveModeDelays, retrainBoxIou, retrainRevisionConflictMessage, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, searchIcons, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, subjectPathSampleFromBox, subjectPathSvgPoints, summarizeReview, systemEventClassKinds, systemEventClassesFor, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, withSystemEventClasses };
@@ -775,6 +775,7 @@ export declare const CompositionSchema: z.ZodObject<{
775
775
  templateId: typeof import("./index.js").GroupTemplateIdSchema;
776
776
  aggregate: typeof import("./index.js").AggregateReducerSchema;
777
777
  members: z.ZodArray<typeof import("./index.js").HelperMemberSchema>;
778
+ active: z.ZodOptional<typeof import("./index.js").ActiveCriterionSchema>;
778
779
  }, z.core.$strip>], "kind">>;
779
780
  }, z.core.$strip>;
780
781
  export type Composition = z.infer<typeof CompositionSchema>;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Actuator groups (D944 phase 1b). The active boolean is the binary reducer
3
+ * with unknown members left out. A command is one call per member that binds
4
+ * the cap, including members that are offline. One failure does not cancel
5
+ * the others.
6
+ */
7
+ import { DeviceFeature } from '../../device/device-type.js';
8
+ import type { ActiveCriterion, BinaryAggregate } from './spec.js';
9
+ /** Caps a light group may expose, in display order. Switch is the active state. */
10
+ export declare const LIGHT_SHARED_CAPS: readonly ['switch', 'brightness', 'color'];
11
+ export type LightSharedCap = (typeof LIGHT_SHARED_CAPS)[number];
12
+ /** How many member calls run at once. The rest wait; none are dropped. */
13
+ export declare const FAN_OUT_CONCURRENCY: number;
14
+ export interface FanOutMember {
15
+ readonly deviceId: number;
16
+ readonly caps: readonly string[];
17
+ /** Offline members are still commanded — they may wake. Not a reason to skip. */
18
+ readonly online: boolean;
19
+ }
20
+ export interface FanOutCall {
21
+ readonly deviceId: number;
22
+ readonly cap: string;
23
+ readonly method: string;
24
+ readonly args: Readonly<Record<string, unknown>>;
25
+ }
26
+ export interface FanOutOk {
27
+ readonly deviceId: number;
28
+ readonly ok: true;
29
+ }
30
+ export interface FanOutFailed {
31
+ readonly deviceId: number;
32
+ readonly ok: false;
33
+ readonly error: string;
34
+ }
35
+ export type FanOutMemberResult = FanOutOk | FanOutFailed;
36
+ /** `at-least-one` is any included member on; `all` is every included member on. */
37
+ export declare function reducerForActive(active: ActiveCriterion): BinaryAggregate;
38
+ export declare function activeForReducer(reducer: BinaryAggregate): ActiveCriterion;
39
+ /**
40
+ * Caps every member binds, from {@link LIGHT_SHARED_CAPS}. An empty member
41
+ * list shares nothing. A member that lacks colour drops colour from the group.
42
+ */
43
+ export declare function sharedLightCaps(memberCaps: readonly (readonly string[])[]): readonly string[];
44
+ /**
45
+ * Colour modes every member advertises. Offline does not remove a mode:
46
+ * the caller passes device features, not liveness. No members → no mode.
47
+ */
48
+ export declare function sharedColorModes(memberFeatures: readonly (readonly string[])[]): readonly DeviceFeature[];
49
+ /**
50
+ * One call per member that binds `cap`. Offline members stay in the list.
51
+ * A member without the cap is not called — the command cannot reach it.
52
+ */
53
+ export declare function fanOutTargets(members: readonly FanOutMember[], cap: string, method: string, args: Readonly<Record<string, unknown>>): readonly FanOutCall[];
54
+ /**
55
+ * Run every call. A throw is that member's result; the other calls still run.
56
+ * At most {@link FAN_OUT_CONCURRENCY} are in flight.
57
+ */
58
+ export declare function runFanOut(calls: readonly FanOutCall[], invoke: (call: FanOutCall) => Promise<void>): Promise<readonly FanOutMemberResult[]>;
@@ -16,14 +16,19 @@ export interface HelperCompanion {
16
16
  }
17
17
  export interface GroupTemplate {
18
18
  readonly id: GroupTemplateId;
19
- readonly family: 'numeric' | 'binary';
19
+ readonly family: 'numeric' | 'binary' | 'actuator';
20
20
  readonly summary: string;
21
21
  readonly deviceType: DeviceType;
22
- readonly role: DeviceRole;
22
+ readonly role: DeviceRole | undefined;
23
23
  /** Members are this one device type. */
24
24
  readonly memberDeviceType: DeviceType;
25
25
  readonly outputCap: string;
26
26
  readonly outputField: string;
27
+ /**
28
+ * Methods the composer fans out. Empty for a reading. A free composition
29
+ * still cannot serve these caps (`has-commands`).
30
+ */
31
+ readonly commandCaps: readonly string[];
27
32
  /** Quantity of the output reading. `device` is chosen per numeric sensor. */
28
33
  readonly quantity: ReadingQuantity;
29
34
  readonly baseUnit: string | undefined;
@@ -1,6 +1,7 @@
1
+ export { FAN_OUT_CONCURRENCY, LIGHT_SHARED_CAPS, type FanOutCall, type FanOutFailed, type FanOutMember, type FanOutMemberResult, type FanOutOk, type LightSharedCap, activeForReducer, fanOutTargets, reducerForActive, runFanOut, sharedColorModes, sharedLightCaps, } from './actuator.js';
1
2
  export { type AggregateCounts, type AggregateEmpty, type AggregateOutcome, type AggregatePublish, type AggregateReadResult, type AggregateUnavailable, type AggregateValue, type EvaluateAggregateInput, evaluateAggregate, } from './aggregate.js';
2
3
  export { type GroupTemplate, type HelperAccept, type HelperCompanion, GROUP_TEMPLATES, groupTemplate, } from './catalog.js';
3
4
  export { type HelperCompileResult, type HelperCompiled, type HelperRefused, compileHelper, sameHelperBody, templateDeviceType, } from './compile.js';
4
5
  export { type HelperMemberFact, helperSaveProblems, } from './save.js';
5
6
  export { type SourcePick, type SourcePickAccept, type SourcePickHistory, type SourcePickRequest, sourcePickForTemplate, } from './source-pick.js';
6
- export { AGGREGATE_REDUCERS, AggregateReducerSchema, BINARY_AGGREGATES, GROUP_TEMPLATE_IDS, GroupHelperSpecSchema, GroupTemplateIdSchema, HelperMemberSchema, HelperSpecSchema, MAX_HELPER_MEMBERS, NUMERIC_AGGREGATES, type AggregateReducer, type BinaryAggregate, type GroupHelperSpec, type GroupTemplateId, type HelperMember, type HelperSpec, type NumericAggregate, } from './spec.js';
7
+ export { ACTIVE_CRITERIA, AGGREGATE_REDUCERS, ActiveCriterionSchema, AggregateReducerSchema, BINARY_AGGREGATES, GROUP_TEMPLATE_IDS, GroupHelperSpecSchema, GroupTemplateIdSchema, HelperMemberSchema, HelperSpecSchema, MAX_HELPER_MEMBERS, NUMERIC_AGGREGATES, type ActiveCriterion, type AggregateReducer, type BinaryAggregate, type GroupHelperSpec, type GroupTemplateId, type HelperMember, type HelperSpec, type NumericAggregate, } from './spec.js';
@@ -6,16 +6,20 @@ import { z } from 'zod';
6
6
  import { CompositionSourceRefSchema } from '../source-ref.js';
7
7
  /** A group may name more members than an expression call (the 16-arg cap). */
8
8
  export declare const MAX_HELPER_MEMBERS: number;
9
- export declare const GROUP_TEMPLATE_IDS: readonly ['temperature', 'humidity', 'pressure', 'illuminance', 'power', 'energy', 'battery', 'numeric', 'motion', 'contact', 'leak', 'smoke', 'occupancy', 'binary'];
9
+ export declare const GROUP_TEMPLATE_IDS: readonly ['temperature', 'humidity', 'pressure', 'illuminance', 'power', 'energy', 'battery', 'numeric', 'motion', 'contact', 'leak', 'smoke', 'occupancy', 'binary', 'switch', 'light'];
10
10
  export type GroupTemplateId = (typeof GROUP_TEMPLATE_IDS)[number];
11
11
  export declare const NUMERIC_AGGREGATES: readonly ['mean', 'median', 'min', 'max', 'sum'];
12
12
  export type NumericAggregate = (typeof NUMERIC_AGGREGATES)[number];
13
13
  export declare const BINARY_AGGREGATES: readonly ['any', 'all'];
14
14
  export type BinaryAggregate = (typeof BINARY_AGGREGATES)[number];
15
+ /** How an actuator group decides it is on. Unknown members never count as off. */
16
+ export declare const ACTIVE_CRITERIA: readonly ['at-least-one', 'all'];
17
+ export type ActiveCriterion = (typeof ACTIVE_CRITERIA)[number];
15
18
  export declare const AGGREGATE_REDUCERS: readonly ['mean', 'median', 'min', 'max', 'sum', 'any', 'all'];
16
19
  export type AggregateReducer = (typeof AGGREGATE_REDUCERS)[number];
17
20
  export declare const GroupTemplateIdSchema: z.ZodType<GroupTemplateId>;
18
21
  export declare const AggregateReducerSchema: z.ZodType<AggregateReducer>;
22
+ export declare const ActiveCriterionSchema: z.ZodType<ActiveCriterion>;
19
23
  /** One member. The field is stored so occupancy can name motion or binary. */
20
24
  export declare const HelperMemberSchema: z.ZodObject<{
21
25
  source: typeof CompositionSourceRefSchema;
@@ -32,6 +36,7 @@ export declare const GroupHelperSpecSchema: z.ZodObject<{
32
36
  templateId: typeof GroupTemplateIdSchema;
33
37
  aggregate: typeof AggregateReducerSchema;
34
38
  members: z.ZodArray<typeof HelperMemberSchema>;
39
+ active: z.ZodOptional<typeof ActiveCriterionSchema>;
35
40
  }>;
36
41
  export type GroupHelperSpec = z.infer<typeof GroupHelperSpecSchema>;
37
42
  export declare const HelperSpecSchema: z.ZodDiscriminatedUnion<[typeof GroupHelperSpecSchema], 'kind'>;
@@ -2193,7 +2193,9 @@ var GROUP_TEMPLATE_IDS = [
2193
2193
  "leak",
2194
2194
  "smoke",
2195
2195
  "occupancy",
2196
- "binary"
2196
+ "binary",
2197
+ "switch",
2198
+ "light"
2197
2199
  ];
2198
2200
  var NUMERIC_AGGREGATES = [
2199
2201
  "mean",
@@ -2203,6 +2205,8 @@ var NUMERIC_AGGREGATES = [
2203
2205
  "sum"
2204
2206
  ];
2205
2207
  var BINARY_AGGREGATES = ["any", "all"];
2208
+ /** How an actuator group decides it is on. Unknown members never count as off. */
2209
+ var ACTIVE_CRITERIA = ["at-least-one", "all"];
2206
2210
  var AGGREGATE_REDUCERS = [
2207
2211
  "mean",
2208
2212
  "median",
@@ -2214,6 +2218,7 @@ var AGGREGATE_REDUCERS = [
2214
2218
  ];
2215
2219
  var GroupTemplateIdSchema = z.enum(GROUP_TEMPLATE_IDS);
2216
2220
  var AggregateReducerSchema = z.enum(AGGREGATE_REDUCERS);
2221
+ var ActiveCriterionSchema = z.enum(ACTIVE_CRITERIA);
2217
2222
  /** One member. The field is stored so occupancy can name motion or binary. */
2218
2223
  var HelperMemberSchema = z.object({
2219
2224
  source: CompositionSourceRefSchema,
@@ -2228,7 +2233,9 @@ var GroupHelperSpecSchema = z.object({
2228
2233
  kind: z.literal("group"),
2229
2234
  templateId: GroupTemplateIdSchema,
2230
2235
  aggregate: AggregateReducerSchema,
2231
- members: z.array(HelperMemberSchema).min(1).max(64)
2236
+ members: z.array(HelperMemberSchema).min(1).max(64),
2237
+ /** Actuator groups only. Readings leave this unset. */
2238
+ active: ActiveCriterionSchema.optional()
2232
2239
  });
2233
2240
  var HelperSpecSchema = z.discriminatedUnion("kind", [GroupHelperSpecSchema]);
2234
2241
  //#endregion
@@ -2490,4 +2497,4 @@ function featureSources(feature) {
2490
2497
  return featureFieldEntries(feature).map((e) => e.source);
2491
2498
  }
2492
2499
  //#endregion
2493
- export { evaluateStatefulExpressionCall as $, compositionFeatureEnabled as A, evaluateSensorLevelEdge as At, BINARY_AGGREGATES as B, canonicalHash as Bt, CompositionTargetSchema as C, ExpressionParseError as Ct, MAX_COMPOSITION_ITEMS as D, SOURCE_CAP_CHANGED_AT_FIELD as Dt, MAX_COMPOSITION_FIELDS_PER_FEATURE as E, SOURCE_CAP_ACTIVE_FIELD as Et, featureFieldEntries as F, chooseFfmpegBinary as Ft, HelperSpecSchema as G, buildFfmpegArgs as Gt, GroupHelperSpecSchema as H, AUDIO_PRESETS as Ht, featureSources as I, ffmpegBinaryName as It, CompositionSourceRefSchema as J, invocationFromEncodeProfile as Jt, MAX_HELPER_MEMBERS as K, buildInputArgs as Kt, fieldReads as L, FFMPEG_RELEASE as Lt, compositionReadKey as M, sliceActiveValue as Mt, compositionSliceKey as N, sliceChangedAt as Nt, composedDeviceRef as O, SOURCE_DEVICE_TYPES as Ot, compositionSourceKey as P, FFMPEG_PATH_ENV as Pt, evaluateExpressionSource as Q, resolveStreamMaps as Qt, AGGREGATE_REDUCERS as R, getFfmpegArtifact as Rt, CompositionSchema as S, ExpressionEvalError as St, MAX_COMPOSITION_FEATURES as T, SOURCE_CAPS as Tt, GroupTemplateIdSchema as U, audioPlanFromEncodeProfile as Ut, GROUP_TEMPLATE_IDS as V, Fmp4BoxSplitter as Vt, HelperMemberSchema as W, buildAudioArgs as Wt, cloneStatefulExpressionMemory as X, logBannerArgs as Xt, EXPRESSION_INJECTED_NOW as Y, isSoftwareDecode as Yt, createStatefulExpressionMemory as Z, pickVideoEncoder as Zt, CompositionFromSourceSchema as _, EXPRESSION_BUILTIN_NAMES as _t, CUSTOMIZATION_BLOCK_NAME_PREFIX as a, compileExpressionSafe as at, CompositionNewTargetSchema as b, evaluateRose as bt, CompositionCodeSourceSchema as c, EXPRESSION_COMPILE_CACHE_CAPACITY as ct, CompositionExpressionSourceSchema as d, MAX_EXPRESSION_BINDINGS as dt, toExpressionValue as et, CompositionFeatureSchema as f, MAX_EXPRESSION_CALL_ARGS as ft, CompositionForwardCommandSchema as g, EXPRESSION_BUILTINS as gt, CompositionFieldsFeatureSchema as h, RESERVED_BINDING_NAMES as ht, COMPOSITION_ITEM_KEY_RE as i, compileExpression as it, compositionItemFieldPath as j, isSourceCap as jt, composedDeviceStableId as k, evaluateSensorEdge as kt, CompositionCommandTargetSchema as l, EXPRESSION_IDENTIFIER_RE as lt, CompositionFieldSourceSchema as m, MAX_EXPRESSION_SOURCE_LENGTH as mt, COMPOSER_ADDON_ID as n, createExpressionScope as nt, CompositionAggregateSourceSchema as o, parseExpression as ot, CompositionFieldReadSchema as p, MAX_EXPRESSION_EVAL_STEPS as pt, NUMERIC_AGGREGATES as q, buildVideoArgs as qt, COMPOSITION_ITEM_ARRAY_PATH as r, evaluateAst as rt, CompositionBindingSchema as s, tokenize as st, COMPOSED_DEVICE_STABLE_ID_PREFIX as t, validateExpressionSource as tt, CompositionExistingTargetSchema as u, MAX_EXPRESSION_AST_NODES as ut, CompositionItemEntrySchema as v, disarmRoseMemory as vt, MAX_COMPOSITION_CODE_LENGTH as w, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as wt, CompositionPassthroughFeatureSchema as x, isStatefulBuiltin as xt, CompositionLiteralBindingSchema as y, evaluateCount as yt, AggregateReducerSchema as z, getFfmpegDownloadUrl as zt };
2500
+ export { createStatefulExpressionMemory as $, pickVideoEncoder as $t, compositionFeatureEnabled as A, SOURCE_DEVICE_TYPES as At, ActiveCriterionSchema as B, getFfmpegArtifact as Bt, CompositionTargetSchema as C, isStatefulBuiltin as Ct, MAX_COMPOSITION_ITEMS as D, SOURCE_CAPS as Dt, MAX_COMPOSITION_FIELDS_PER_FEATURE as E, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as Et, featureFieldEntries as F, sliceChangedAt as Ft, GroupTemplateIdSchema as G, audioPlanFromEncodeProfile as Gt, BINARY_AGGREGATES as H, canonicalHash as Ht, featureSources as I, FFMPEG_PATH_ENV as It, MAX_HELPER_MEMBERS as J, buildInputArgs as Jt, HelperMemberSchema as K, buildAudioArgs as Kt, fieldReads as L, chooseFfmpegBinary as Lt, compositionReadKey as M, evaluateSensorLevelEdge as Mt, compositionSliceKey as N, isSourceCap as Nt, composedDeviceRef as O, SOURCE_CAP_ACTIVE_FIELD as Ot, compositionSourceKey as P, sliceActiveValue as Pt, cloneStatefulExpressionMemory as Q, logBannerArgs as Qt, ACTIVE_CRITERIA as R, ffmpegBinaryName as Rt, CompositionSchema as S, evaluateRose as St, MAX_COMPOSITION_FEATURES as T, ExpressionParseError as Tt, GROUP_TEMPLATE_IDS as U, Fmp4BoxSplitter as Ut, AggregateReducerSchema as V, getFfmpegDownloadUrl as Vt, GroupHelperSpecSchema as W, AUDIO_PRESETS as Wt, CompositionSourceRefSchema as X, invocationFromEncodeProfile as Xt, NUMERIC_AGGREGATES as Y, buildVideoArgs as Yt, EXPRESSION_INJECTED_NOW as Z, isSoftwareDecode as Zt, CompositionFromSourceSchema as _, RESERVED_BINDING_NAMES as _t, CUSTOMIZATION_BLOCK_NAME_PREFIX as a, evaluateAst as at, CompositionNewTargetSchema as b, disarmRoseMemory as bt, CompositionCodeSourceSchema as c, parseExpression as ct, CompositionExpressionSourceSchema as d, EXPRESSION_IDENTIFIER_RE as dt, resolveStreamMaps as en, evaluateExpressionSource as et, CompositionFeatureSchema as f, MAX_EXPRESSION_AST_NODES as ft, CompositionForwardCommandSchema as g, MAX_EXPRESSION_SOURCE_LENGTH as gt, CompositionFieldsFeatureSchema as h, MAX_EXPRESSION_EVAL_STEPS as ht, COMPOSITION_ITEM_KEY_RE as i, createExpressionScope as it, compositionItemFieldPath as j, evaluateSensorEdge as jt, composedDeviceStableId as k, SOURCE_CAP_CHANGED_AT_FIELD as kt, CompositionCommandTargetSchema as l, tokenize as lt, CompositionFieldSourceSchema as m, MAX_EXPRESSION_CALL_ARGS as mt, COMPOSER_ADDON_ID as n, toExpressionValue as nt, CompositionAggregateSourceSchema as o, compileExpression as ot, CompositionFieldReadSchema as p, MAX_EXPRESSION_BINDINGS as pt, HelperSpecSchema as q, buildFfmpegArgs as qt, COMPOSITION_ITEM_ARRAY_PATH as r, validateExpressionSource as rt, CompositionBindingSchema as s, compileExpressionSafe as st, COMPOSED_DEVICE_STABLE_ID_PREFIX as t, evaluateStatefulExpressionCall as tt, CompositionExistingTargetSchema as u, EXPRESSION_COMPILE_CACHE_CAPACITY as ut, CompositionItemEntrySchema as v, EXPRESSION_BUILTINS as vt, MAX_COMPOSITION_CODE_LENGTH as w, ExpressionEvalError as wt, CompositionPassthroughFeatureSchema as x, evaluateCount as xt, CompositionLiteralBindingSchema as y, EXPRESSION_BUILTIN_NAMES as yt, AGGREGATE_REDUCERS as z, FFMPEG_RELEASE as zt };
@@ -2193,7 +2193,9 @@ var GROUP_TEMPLATE_IDS = [
2193
2193
  "leak",
2194
2194
  "smoke",
2195
2195
  "occupancy",
2196
- "binary"
2196
+ "binary",
2197
+ "switch",
2198
+ "light"
2197
2199
  ];
2198
2200
  var NUMERIC_AGGREGATES = [
2199
2201
  "mean",
@@ -2203,6 +2205,8 @@ var NUMERIC_AGGREGATES = [
2203
2205
  "sum"
2204
2206
  ];
2205
2207
  var BINARY_AGGREGATES = ["any", "all"];
2208
+ /** How an actuator group decides it is on. Unknown members never count as off. */
2209
+ var ACTIVE_CRITERIA = ["at-least-one", "all"];
2206
2210
  var AGGREGATE_REDUCERS = [
2207
2211
  "mean",
2208
2212
  "median",
@@ -2214,6 +2218,7 @@ var AGGREGATE_REDUCERS = [
2214
2218
  ];
2215
2219
  var GroupTemplateIdSchema = zod.z.enum(GROUP_TEMPLATE_IDS);
2216
2220
  var AggregateReducerSchema = zod.z.enum(AGGREGATE_REDUCERS);
2221
+ var ActiveCriterionSchema = zod.z.enum(ACTIVE_CRITERIA);
2217
2222
  /** One member. The field is stored so occupancy can name motion or binary. */
2218
2223
  var HelperMemberSchema = zod.z.object({
2219
2224
  source: CompositionSourceRefSchema,
@@ -2228,7 +2233,9 @@ var GroupHelperSpecSchema = zod.z.object({
2228
2233
  kind: zod.z.literal("group"),
2229
2234
  templateId: GroupTemplateIdSchema,
2230
2235
  aggregate: AggregateReducerSchema,
2231
- members: zod.z.array(HelperMemberSchema).min(1).max(64)
2236
+ members: zod.z.array(HelperMemberSchema).min(1).max(64),
2237
+ /** Actuator groups only. Readings leave this unset. */
2238
+ active: ActiveCriterionSchema.optional()
2232
2239
  });
2233
2240
  var HelperSpecSchema = zod.z.discriminatedUnion("kind", [GroupHelperSpecSchema]);
2234
2241
  //#endregion
@@ -2490,6 +2497,12 @@ function featureSources(feature) {
2490
2497
  return featureFieldEntries(feature).map((e) => e.source);
2491
2498
  }
2492
2499
  //#endregion
2500
+ Object.defineProperty(exports, "ACTIVE_CRITERIA", {
2501
+ enumerable: true,
2502
+ get: function() {
2503
+ return ACTIVE_CRITERIA;
2504
+ }
2505
+ });
2493
2506
  Object.defineProperty(exports, "AGGREGATE_REDUCERS", {
2494
2507
  enumerable: true,
2495
2508
  get: function() {
@@ -2502,6 +2515,12 @@ Object.defineProperty(exports, "AUDIO_PRESETS", {
2502
2515
  return AUDIO_PRESETS;
2503
2516
  }
2504
2517
  });
2518
+ Object.defineProperty(exports, "ActiveCriterionSchema", {
2519
+ enumerable: true,
2520
+ get: function() {
2521
+ return ActiveCriterionSchema;
2522
+ }
2523
+ });
2505
2524
  Object.defineProperty(exports, "AggregateReducerSchema", {
2506
2525
  enumerable: true,
2507
2526
  get: function() {
@@ -1,5 +1,5 @@
1
1
  import type { CapVocabularySlice } from '../types.js';
2
- type SensorCap = 'air-quality-sensor' | 'ambient-light-sensor' | 'binary' | 'carbon-monoxide' | 'connectivity' | 'contact' | 'enum-sensor' | 'flood' | 'gas' | 'group-status' | 'humidity-sensor' | 'motion' | 'numeric-sensor' | 'power-meter' | 'presence' | 'pressure-sensor' | 'smoke' | 'tamper' | 'temperature-sensor' | 'vibration' | 'weather' | 'battery' | 'network-link' | 'device-status' | 'doorbell' | 'event-emitter';
2
+ type SensorCap = 'air-quality-sensor' | 'ambient-light-sensor' | 'binary' | 'carbon-monoxide' | 'connectivity' | 'contact' | 'enum-sensor' | 'flood' | 'gas' | 'group-commands' | 'group-status' | 'humidity-sensor' | 'motion' | 'numeric-sensor' | 'power-meter' | 'presence' | 'pressure-sensor' | 'smoke' | 'tamper' | 'temperature-sensor' | 'vibration' | 'weather' | 'battery' | 'network-link' | 'device-status' | 'doorbell' | 'event-emitter';
3
3
  /** The sensor family of the vocabulary. */
4
4
  export declare const SENSOR_CAP_VOCABULARY: CapVocabularySlice<SensorCap>;
5
5
  export {};
@@ -322,6 +322,14 @@ export declare enum EventCategory {
322
322
  PipelineMotionNoisy = "pipeline.motion-noisy",
323
323
  /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
324
324
  PipelineMotionCalm = "pipeline.motion-calm",
325
+ /**
326
+ * A camera's package LLM confirm has failed closed three times in a row
327
+ * (D931, 2026-10-26). One edge per camera until
328
+ * {@link PipelinePackageLlmAnswered}.
329
+ */
330
+ PipelinePackageLlmSilent = "pipeline.package-llm-silent",
331
+ /** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
332
+ PipelinePackageLlmAnswered = "pipeline.package-llm-answered",
325
333
  /**
326
334
  * Per-camera pipeline config was mutated by the orchestrator
327
335
  * (a settings change via `setAgentInferenceDevices` /
package/dist/enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-DXZ3f9Q5.js");
2
+ const require_event_category = require("./event-category-Ave2VSxY.js");
3
3
  //#region src/enums/event-source-type.ts
4
4
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
5
5
  EventSourceType["Addon"] = "addon";
package/dist/enums.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-DHXxB8t9.mjs";
1
+ import { t as EventCategory } from "./event-category-CT-hz5Rb.mjs";
2
2
  //#region src/enums/event-source-type.ts
3
3
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
4
4
  EventSourceType["Addon"] = "addon";
@@ -324,6 +324,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
324
324
  /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
325
325
  EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
326
326
  /**
327
+ * A camera's package LLM confirm has failed closed three times in a row
328
+ * (D931, 2026-10-26). One edge per camera until
329
+ * {@link PipelinePackageLlmAnswered}.
330
+ */
331
+ EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
332
+ /** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
333
+ EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
334
+ /**
327
335
  * Per-camera pipeline config was mutated by the orchestrator
328
336
  * (a settings change via `setAgentInferenceDevices` /
329
337
  * `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
@@ -324,6 +324,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
324
324
  /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
325
325
  EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
326
326
  /**
327
+ * A camera's package LLM confirm has failed closed three times in a row
328
+ * (D931, 2026-10-26). One edge per camera until
329
+ * {@link PipelinePackageLlmAnswered}.
330
+ */
331
+ EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
332
+ /** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
333
+ EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
334
+ /**
327
335
  * Per-camera pipeline config was mutated by the orchestrator
328
336
  * (a settings change via `setAgentInferenceDevices` /
329
337
  * `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator