@camstack/system 1.2.298 → 1.2.300

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 (55) hide show
  1. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  2. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  3. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/alerts/alerts.addon.js +1 -1
  6. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  7. package/dist/builtins/autotrack/index.js +1 -1
  8. package/dist/builtins/autotrack/index.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/camera-grid/index.js +1 -1
  12. package/dist/builtins/camera-grid/index.mjs +1 -1
  13. package/dist/builtins/console-logging/index.js +1 -1
  14. package/dist/builtins/console-logging/index.mjs +1 -1
  15. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  17. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  18. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  19. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  20. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  21. package/dist/builtins/hub-forwarder/index.js +1 -1
  22. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  23. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  24. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  25. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  26. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  27. package/dist/builtins/local-network/local-network.addon.js +1 -1
  28. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  29. package/dist/builtins/loki-logging/index.js +1 -1
  30. package/dist/builtins/loki-logging/index.mjs +1 -1
  31. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  32. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  33. package/dist/builtins/platform-probe/index.js +1 -1
  34. package/dist/builtins/platform-probe/index.mjs +1 -1
  35. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  36. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  37. package/dist/builtins/snapshot/index.js +1 -1
  38. package/dist/builtins/snapshot/index.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  40. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  41. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  42. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  43. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  44. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  45. package/dist/builtins/system-config/system-config.addon.js +1 -1
  46. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  47. package/dist/builtins/winston-logging/index.js +1 -1
  48. package/dist/builtins/winston-logging/index.mjs +1 -1
  49. package/dist/{dist-pTyVeilm.mjs → dist-Bo6_IXKD.mjs} +241 -6
  50. package/dist/{dist-BoZJWfY7.js → dist-Cqv528cH.js} +241 -6
  51. package/dist/index.js +1 -1
  52. package/dist/index.mjs +1 -1
  53. package/dist/{retired-settings-keys-Brx2hina.mjs → retired-settings-keys-BaOR7Z2z.mjs} +1 -1
  54. package/dist/{retired-settings-keys-DKipTkws.js → retired-settings-keys-Odqg6rBf.js} +1 -1
  55. package/package.json +1 -1
@@ -691,7 +691,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
691
691
  return EventCategory;
692
692
  }({});
693
693
  //#endregion
694
- //#region ../types/dist/sleep-D_4W7xuQ.mjs
694
+ //#region ../types/dist/sleep-DU7mu4wb.mjs
695
695
  /**
696
696
  * The audio chunk plane's byte format, and the ONE expansion from a coded
697
697
  * window to float samples (D455).
@@ -17081,6 +17081,16 @@ var NcCrossingSchema = zod.z.enum([
17081
17081
  "exit",
17082
17082
  "any"
17083
17083
  ]);
17084
+ /**
17085
+ * Which edge of a BOOLEAN sensor fires a device-event rule (D640).
17086
+ * - `raised` — the sensor went high: water detected, smoke, open, tampered.
17087
+ * - `cleared` — it went back: dry, clear, closed.
17088
+ * - absent — both edges, which is what every rule authored before this did.
17089
+ *
17090
+ * There is no third member for "both": absence already says it, and a value
17091
+ * that means the same as absence is a second way to write one rule.
17092
+ */
17093
+ var NcSensorTransitionSchema = zod.z.enum(["raised", "cleared"]);
17084
17094
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
17085
17095
  var NcZoneConditionSchema = zod.z.object({
17086
17096
  ids: zod.z.array(zod.z.string().min(1)).min(1),
@@ -17270,6 +17280,20 @@ var NcConditionsSchema = zod.z.object({
17270
17280
  scene: NcSceneConditionSchema.optional(),
17271
17281
  /** Device scope — absent = all devices. */
17272
17282
  devices: zod.z.array(zod.z.number()).optional(),
17283
+ /**
17284
+ * Device EXCLUSION (D641) — "every device except these". Judged on the SAME
17285
+ * subject ids {@link devices} is judged on (the camera, the sensor that
17286
+ * fired, a linked set's sensor and row cameras), so a sensor fanned out per
17287
+ * linked camera is excluded exactly where an include would have tested it.
17288
+ * `min(1)`: an empty exclusion excludes nothing and is written as absent.
17289
+ *
17290
+ * Not for `system-event` rules — those carry their own
17291
+ * `systemEvent.excludeDeviceIds` (D636), and the hub refuses this key there.
17292
+ * Editors present the two lists as ONE field (All | Only these | All except
17293
+ * these); the engine evaluates each independently, so a legacy rule
17294
+ * carrying both still means "these, minus those".
17295
+ */
17296
+ devicesExclude: zod.z.array(zod.z.number()).min(1).optional(),
17273
17297
  /** Detector class names (any overlap with the record's class set). */
17274
17298
  classes: zod.z.array(zod.z.string().min(1)).optional(),
17275
17299
  /** Veto classes — any overlap fails the rule. */
@@ -17403,6 +17427,16 @@ var NcConditionsSchema = zod.z.object({
17403
17427
  */
17404
17428
  sensorKinds: zod.z.array(zod.z.string().min(1)).optional(),
17405
17429
  /**
17430
+ * DEVICE-EVENT only (D640). Fire on one edge of a boolean sensor —
17431
+ * {@link NcSensorTransitionSchema}. Which field of the slice means "raised"
17432
+ * is `@camstack/types` → `notification/sensor-raised.ts`. A reading the
17433
+ * engine cannot place (a kind with no raise, an unreadable slice) PASSES:
17434
+ * the condition fails open towards notifying, never towards silence. Editors
17435
+ * offer it only when every chosen {@link sensorKinds} member has a raise
17436
+ * (`sensorTransitionOffered`), and the hub refuses it on any other delivery.
17437
+ */
17438
+ sensorTransition: NcSensorTransitionSchema.optional(),
17439
+ /**
17406
17440
  * PACKAGE-EVENT only. Which package phase fires the rule — `delivered`
17407
17441
  * (a parked parcel appeared), `picked-up` (it departed), or `both`. Fails
17408
17442
  * when the subject's phase does not match (a subject always carries a phase
@@ -17902,9 +17936,29 @@ var NcTestResultSchema = zod.z.object({
17902
17936
  className: zod.z.string().optional(),
17903
17937
  label: zod.z.string().optional()
17904
17938
  });
17905
- /** The five rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts`
17906
- * is the same union; the template-vars spec pins the two together. */
17939
+ /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
17940
+ * same union; the template-vars spec pins the two together. `mixed` is DERIVED
17941
+ * (a stored system rule whose kinds span families, D637) and never authored. */
17907
17942
  var NcRuleKindSchema = zod.z.enum([
17943
+ "detection",
17944
+ "sensor",
17945
+ "occupancy",
17946
+ "sound",
17947
+ "device-events",
17948
+ "system",
17949
+ "alarm",
17950
+ "mixed"
17951
+ ]);
17952
+ /**
17953
+ * The kinds a SERVED template-variable descriptor may name: the five that
17954
+ * existed before D637, frozen. `getTemplateCatalog` ships `kinds` to every
17955
+ * installed viewer, and a viewer at `@camstack/types` 1.2.25x parses them with a
17956
+ * strict five-member enum — one `device-events` in one descriptor fails the
17957
+ * whole catalog parse. So the WIRE says `system`, and the MATCH widens it:
17958
+ * `templateVarKindApplies` reads a `system` descriptor as applying to every
17959
+ * system rule kind (`device-events`, `system`, `alarm`, `mixed`).
17960
+ */
17961
+ var NcTemplateVarKindSchema = zod.z.enum([
17908
17962
  "detection",
17909
17963
  "sensor",
17910
17964
  "occupancy",
@@ -17942,7 +17996,7 @@ var NcTemplateVarGroupSchema = zod.z.enum([
17942
17996
  *
17943
17997
  * `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
17944
17998
  * it has a value; absent = no restriction on that axis. `systemEventKinds` is
17945
- * read only for a `system` rule. `dynamic` declares a FAMILY of names
17999
+ * read only for a system-event rule (any family, or `mixed`). `dynamic` declares a FAMILY of names
17946
18000
  * (`count_<class>`): the descriptor's `name` is the example member.
17947
18001
  */
17948
18002
  var NcTemplateVarDescriptorSchema = zod.z.object({
@@ -17953,7 +18007,7 @@ var NcTemplateVarDescriptorSchema = zod.z.object({
17953
18007
  group: NcTemplateVarGroupSchema,
17954
18008
  families: zod.z.array(NcTemplateFamilySchema).min(1),
17955
18009
  fields: zod.z.array(NcTemplateFieldSchema).optional(),
17956
- kinds: zod.z.array(NcRuleKindSchema).optional(),
18010
+ kinds: zod.z.array(NcTemplateVarKindSchema).optional(),
17957
18011
  deliveries: zod.z.array(NcDeliverySchema).optional(),
17958
18012
  systemEventKinds: zod.z.array(NcSystemEventKindSchema).optional(),
17959
18013
  dynamic: zod.z.object({
@@ -18003,6 +18057,7 @@ var NcConditionDescriptorSchema = zod.z.object({
18003
18057
  /** Editor widget the UI renders — never hardcode per-condition forms. */
18004
18058
  valueType: zod.z.enum([
18005
18059
  "deviceIdList",
18060
+ "deviceIdExcludeList",
18006
18061
  "stringList",
18007
18062
  "number01",
18008
18063
  "number",
@@ -18013,6 +18068,7 @@ var NcConditionDescriptorSchema = zod.z.object({
18013
18068
  "plateMatcher",
18014
18069
  "packagePhase",
18015
18070
  "crossingSelect",
18071
+ "sensorTransition",
18016
18072
  "polygonDraw",
18017
18073
  "occupancy",
18018
18074
  "audio",
@@ -18163,6 +18219,39 @@ var NcHistoryFilterSchema = zod.z.object({
18163
18219
  limit: zod.z.number().int().min(1).max(500).default(100)
18164
18220
  });
18165
18221
  /**
18222
+ * The newest delivery row of ONE rule — the "Last run" of a rules table.
18223
+ *
18224
+ * A projection of the same outbox rows `getHistory` returns, so it records
18225
+ * DELIVERIES only: a throttled or unmatched evaluation never produced a row
18226
+ * and is not a run here. When one fire reached several targets (several rows
18227
+ * at the same `lastAt`), `status` is the least successful of them
18228
+ * (`dead` > `pending` > `sent`): "the last run delivered" must be true for
18229
+ * every target it names.
18230
+ */
18231
+ var NcRuleLastRunSchema = zod.z.object({
18232
+ ruleId: zod.z.string(),
18233
+ /** Fire time of the newest row (`createdAt`, epoch ms). */
18234
+ lastAt: zod.z.number(),
18235
+ status: NcHistoryStatusSchema,
18236
+ /** The camera/device of that row (a digest row files under its first camera). */
18237
+ deviceId: zod.z.number()
18238
+ });
18239
+ /**
18240
+ * Every rule's last run, in one answer.
18241
+ *
18242
+ * A rule ABSENT from `runs` produced no delivery inside `horizonMs` — how far
18243
+ * back this answer looked, in ms before the hub's now. It is the outbox prune
18244
+ * window (7 days by default, operator-configurable), NARROWED when the read hit
18245
+ * its row bound: the answer never claims a window it did not read. `null` means
18246
+ * the operator keeps the outbox forever AND the read reached its end, so absent
18247
+ * means "never on record". A UI derives its "not in the last N days" from this
18248
+ * value, never from a constant — and only when the call ANSWERED (D315).
18249
+ */
18250
+ var NcRuleLastRunsSchema = zod.z.object({
18251
+ runs: zod.z.array(NcRuleLastRunSchema),
18252
+ horizonMs: zod.z.number().nonnegative().nullable()
18253
+ });
18254
+ /**
18166
18255
  * What a snooze covers. Broader scopes win when several overlap, so one window
18167
18256
  * leaves ONE digest rather than a rule snooze and a whole-feed snooze both
18168
18257
  * summarising the same silence.
@@ -18348,6 +18437,14 @@ var NcAlarmModeCoverageSchema = zod.z.object({
18348
18437
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
18349
18438
  deviceIds: zod.z.array(zod.z.number().int()),
18350
18439
  /**
18440
+ * D641: the ids NOT covered although `allDevices` is true — every unscoped
18441
+ * covering rule EXCLUDES them (`conditions.devicesExclude`) and no named rule
18442
+ * covers them. Always `[]` when `allDevices` is false. Excluded by the rules,
18443
+ * which is not the same as skipped by a switch: never in `skippedDevices`.
18444
+ * Defaulted so an answer computed before this field parses as "none".
18445
+ */
18446
+ allDevicesExcept: zod.z.array(zod.z.number().int()).default([]),
18447
+ /**
18351
18448
  * Devices this mode NAMES but cannot actually arm, each with the switch that
18352
18449
  * excludes it.
18353
18450
  *
@@ -18571,6 +18668,15 @@ var notificationRulesCapability = {
18571
18668
  */
18572
18669
  getHistory: method(zod.z.object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), zod.z.object({ entries: zod.z.array(NcHistoryEntrySchema) }), { auth: "admin" }),
18573
18670
  /**
18671
+ * The newest delivery of every rule, in ONE bounded read of the outbox —
18672
+ * the "Last run" column. Never a `getHistory` per rule. A rule with no
18673
+ * delivery inside `horizonMs` is absent from `runs`; see
18674
+ * {@link NcRuleLastRunsSchema} for what absent means. A store that cannot
18675
+ * answer FAILS the call rather than answering "nothing ran". Admin-only,
18676
+ * like `getHistory`, of which it is a projection.
18677
+ */
18678
+ getRuleLastRuns: method(zod.z.object({}), NcRuleLastRunsSchema, { auth: "admin" }),
18679
+ /**
18574
18680
  * Mint a fresh, externally-reachable URL for one artefact a history row
18575
18681
  * named in {@link NcHistoryEntrySchema.shape.artifactIds} — the SAME
18576
18682
  * signed-link mechanism the dispatcher uses to attach media to an
@@ -24549,7 +24655,11 @@ function buildDescriptor(capName, kind) {
24549
24655
  icon: legacyIcon(t.iconId)
24550
24656
  };
24551
24657
  }
24552
- Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
24658
+ /**
24659
+ * Sensor / control cap name → static event-kind descriptor. A linked device
24660
+ * contributes one entry per bound cap present in this map.
24661
+ */
24662
+ var EVENT_KIND_BY_CAP = Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
24553
24663
  /**
24554
24664
  * server-management — per-NODE singleton capability for a node's ROOT
24555
24665
  * package lifecycle (runtime-updatable node packages).
@@ -33740,6 +33850,35 @@ var RenameNodeResultSchema = zod.z.object({
33740
33850
  name: zod.z.string()
33741
33851
  });
33742
33852
  /**
33853
+ * One row of the CHEAP node list (D637): what a node picker needs and nothing
33854
+ * else. Read from the hub's in-memory registry plus the durable node history.
33855
+ * No per-node RPC, unlike `topology`, which walks the whole cluster (32–51 s).
33856
+ */
33857
+ var NodeDirectoryEntrySchema = zod.z.object({
33858
+ id: zod.z.string(),
33859
+ name: zod.z.string(),
33860
+ isHub: zod.z.boolean(),
33861
+ isOnline: zod.z.boolean()
33862
+ });
33863
+ /**
33864
+ * The cheap node list. A consumer's rule for a STORED node id (a rule's
33865
+ * `nodeIds`) that is missing from `nodes`, whatever `complete` says: render it
33866
+ * as a removable chip labelled unknown, never drop it (D49). Even a complete
33867
+ * list omits a node that joined and left between two history captures, so a
33868
+ * missing id means "not known to the hub", never "removed". Only the operator
33869
+ * removes it.
33870
+ *
33871
+ * `complete` changes only the WORDING: `false` = no history read has ever
33872
+ * answered, so the list may be missing offline nodes the hub does know (D315).
33873
+ *
33874
+ * `name` is the history row's name (≤ 30 s behind a rename), or the id when
33875
+ * the history has none.
33876
+ */
33877
+ var NodeDirectorySchema = zod.z.object({
33878
+ nodes: zod.z.array(NodeDirectoryEntrySchema).readonly(),
33879
+ complete: zod.z.boolean()
33880
+ });
33881
+ /**
33743
33882
  * `nodes` is a **hub-centric** cluster-management cap: the hub hosts
33744
33883
  * the single provider and every per-node method (`getNodeAddons`,
33745
33884
  * `restartProcess`, `restartNode`, `undeployAddon`, …) takes `nodeId`
@@ -33758,6 +33897,12 @@ var nodesCapability = {
33758
33897
  nodeIdMode: "data",
33759
33898
  methods: {
33760
33899
  topology: method(zod.z.void(), zod.z.array(TopologyNodeSchema).readonly(), { auth: "admin" }),
33900
+ /**
33901
+ * The cheap node list for pickers (D637): the hub's in-memory registry plus
33902
+ * the durable node history, no per-node RPC. `complete: false` when the
33903
+ * history could not be read.
33904
+ */
33905
+ directory: method(zod.z.void(), NodeDirectorySchema, { auth: "admin" }),
33761
33906
  deployAddon: method(NodeAddonInputSchema, SuccessSchema, {
33762
33907
  kind: "mutation",
33763
33908
  auth: "admin"
@@ -46937,6 +47082,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
46937
47082
  addonId: null,
46938
47083
  access: "create"
46939
47084
  },
47085
+ "nodes.directory": {
47086
+ capName: "nodes",
47087
+ capScope: "system",
47088
+ addonId: null,
47089
+ access: "view"
47090
+ },
46940
47091
  "nodes.executeQuery": {
46941
47092
  capName: "nodes",
46942
47093
  capScope: "system",
@@ -47105,6 +47256,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
47105
47256
  addonId: null,
47106
47257
  access: "view"
47107
47258
  },
47259
+ "notificationRules.getRuleLastRuns": {
47260
+ capName: "notification-rules",
47261
+ capScope: "system",
47262
+ addonId: null,
47263
+ access: "view"
47264
+ },
47108
47265
  "notificationRules.getTemplateCatalog": {
47109
47266
  capName: "notification-rules",
47110
47267
  capScope: "system",
@@ -53001,7 +53158,85 @@ var NC_AUDIO_DEFAULTS = {
53001
53158
  samplingSeconds: 10
53002
53159
  };
53003
53160
  new Set(["devices", "classes"]);
53161
+ /** Every filter, for the callers that must cover all four (guards, tests). */
53162
+ var NC_SYSTEM_EVENT_FILTER_KEYS = [
53163
+ "deviceIds",
53164
+ "deviceTypes",
53165
+ "nodeIds",
53166
+ "packageNames"
53167
+ ];
53168
+ new Map(Object.entries({
53169
+ "device-online": "device-events",
53170
+ "device-offline": "device-events",
53171
+ "device-disabled": "device-events",
53172
+ "device-enabled": "device-events",
53173
+ "device-battery-low": "device-events",
53174
+ "device-battery-normal": "device-events",
53175
+ "device-consumable-low": "device-events",
53176
+ "device-consumable-normal": "device-events",
53177
+ "stream-online": "device-events",
53178
+ "stream-offline": "device-events",
53179
+ "detection-blind": "device-events",
53180
+ "node-online": "system",
53181
+ "node-offline": "system",
53182
+ "node-inference-unavailable": "system",
53183
+ "addon-crash-loop": "system",
53184
+ "addon-update-available": "system",
53185
+ "addon-updated": "system",
53186
+ "server-update-available": "system",
53187
+ "server-updated": "system",
53188
+ "wrapper-update-available": "system",
53189
+ "backup-completed": "system",
53190
+ "export-completed": "system",
53191
+ "alarm-triggered": "alarm",
53192
+ "alarm-armed": "alarm",
53193
+ "alarm-disarmed": "alarm",
53194
+ "alarm-arming": "alarm",
53195
+ "alarm-arm-refused": "alarm",
53196
+ "alarm-pending": "alarm",
53197
+ "alarm-rearmed": "alarm",
53198
+ "alarm-sensor-bypass": "alarm",
53199
+ "alarm-check-failed": "alarm",
53200
+ "camera-online": null,
53201
+ "camera-offline": null,
53202
+ "camera-disabled": null,
53203
+ "camera-enabled": null
53204
+ }));
53205
+ [...NC_SYSTEM_EVENT_FILTER_KEYS];
53004
53206
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
53207
+ /**
53208
+ * WHICH WAY A BOOLEAN SENSOR MOVED — read off the one slice a sensor event
53209
+ * persists (D640 "a sensor rule fires on the raise, the clear, or both").
53210
+ *
53211
+ * A device-event rule over a flood sensor notified on BOTH edges: water
53212
+ * detected, and back to dry. `NcConditions.sensorTransition` lets the rule
53213
+ * name one edge; this file answers, for one `SensorEvent`, which edge it is.
53214
+ *
53215
+ * NOT A SECOND TABLE. The "which boolean of this cap counts as HIGH" question
53216
+ * already has one answer, `SOURCE_CAP_ACTIVE_FIELD`
53217
+ * (`catalogs/sensor-active-state.ts`, the doorbell's and the recorder's edge
53218
+ * table), and a sensor event names its kind, not its cap. So the table here is
53219
+ * DERIVED: event kind → cap (`EVENT_KIND_BY_CAP`) → that cap's active field.
53220
+ * Only kinds whose taxonomy category is `sensor` take part — a switch has an
53221
+ * `on` boolean too, but "it triggers / it clears" is not a sentence about a
53222
+ * light, and offering it there would be a knob with a misleading label.
53223
+ * `presence` is a WORD (`home` / `not_home` / a zone), not a boolean, and is
53224
+ * absent from the source table, so it is absent here.
53225
+ *
53226
+ * `undefined` = never guessed: a kind with no raise (a doorbell press, a
53227
+ * button, a cover), or a slice whose field is missing or not a boolean. The
53228
+ * engine then does NOT filter — a flood alert must not go silent because one
53229
+ * read came back unreadable (the same stance as the alarm's `sensorEdgeOf`).
53230
+ *
53231
+ * Pure, RN-safe: the viewer imports the support rule from here.
53232
+ */
53233
+ /** Event kind → the boolean field of its cap slice that means "raised". */
53234
+ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.entries(EVENT_KIND_BY_CAP).flatMap(([capName, descriptor]) => {
53235
+ const field = SOURCE_CAP_ACTIVE_FIELD[capName];
53236
+ if (field === void 0 || descriptor.category !== "sensor") return [];
53237
+ return [[descriptor.kind, field]];
53238
+ })));
53239
+ Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
53005
53240
  var RULE_BODY_ONLY = ["body"];
53006
53241
  var RULE_TEXT = ["title", "body"];
53007
53242
  var BATTERY = ["device-battery-low", "device-battery-normal"];
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-BoZJWfY7.js");
3
+ const require_dist = require("./dist-Cqv528cH.js");
4
4
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
5
5
  require("./builtins/alerts/index.js");
6
6
  const require_formatter = require("./formatter-DqAKDlvN.js");
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
2
- import { At as logLevelAtMost, Bn as EventCategory$1, Cn as asJsonObject$1, Ct as kebabToCamel, Dn as emitDownForOwnedCaps, En as createEvent, Et as lifecycleJobSchema, Fn as parseJsonUnknown, Ht as procedureAuthKey, In as readinessKey, Ln as resolveCapMount, Pn as parseJsonObject, R as addonSettingsCapability, Rn as scopeKey, Rt as objectInputDeclaresAddonId, St as isVoidInput, T as RUNTIME_DEFAULTS, Tn as asString$1, Xt as scopesAllowDeviceCap, Yt as scopesAllowAddon, _ as LOG_LEVEL_RANK, _t as isCollectionArrayMethod, b as METHOD_ACCESS_MAP, bn as ReadinessRegistry, dn as errMsg$1, dt as extractNestedAddonId, gn as DEVICE_STATUS_METHOD, gt as isArrayOutputSchema, hn as DEVICE_SETTINGS_CONTRIBUTION_METHODS, jt as looseSchema, kn as expandCapMethods, mn as DATAPLANE_SECRET_HEADER$1, qt as resolveMethodAuth, t as ALL_CAPABILITY_DEFINITIONS, wn as asNumber, xn as ReadinessTimeoutError, yt as isObjectInput, zt as objectInputDeclaresRequiredDeviceId } from "./dist-pTyVeilm.mjs";
2
+ import { At as logLevelAtMost, Bn as EventCategory$1, Cn as asJsonObject$1, Ct as kebabToCamel, Dn as emitDownForOwnedCaps, En as createEvent, Et as lifecycleJobSchema, Fn as parseJsonUnknown, Ht as procedureAuthKey, In as readinessKey, Ln as resolveCapMount, Pn as parseJsonObject, R as addonSettingsCapability, Rn as scopeKey, Rt as objectInputDeclaresAddonId, St as isVoidInput, T as RUNTIME_DEFAULTS, Tn as asString$1, Xt as scopesAllowDeviceCap, Yt as scopesAllowAddon, _ as LOG_LEVEL_RANK, _t as isCollectionArrayMethod, b as METHOD_ACCESS_MAP, bn as ReadinessRegistry, dn as errMsg$1, dt as extractNestedAddonId, gn as DEVICE_STATUS_METHOD, gt as isArrayOutputSchema, hn as DEVICE_SETTINGS_CONTRIBUTION_METHODS, jt as looseSchema, kn as expandCapMethods, mn as DATAPLANE_SECRET_HEADER$1, qt as resolveMethodAuth, t as ALL_CAPABILITY_DEFINITIONS, wn as asNumber, xn as ReadinessTimeoutError, yt as isObjectInput, zt as objectInputDeclaresRequiredDeviceId } from "./dist-Bo6_IXKD.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
@@ -1,4 +1,4 @@
1
- import { Cn as asJsonObject } from "./dist-pTyVeilm.mjs";
1
+ import { Cn as asJsonObject } from "./dist-Bo6_IXKD.mjs";
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BoZJWfY7.js");
1
+ const require_dist = require("./dist-Cqv528cH.js");
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.298",
3
+ "version": "1.2.300",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",