@camstack/system 1.2.299 → 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-BoYDYdae.mjs → dist-Bo6_IXKD.mjs} +131 -2
  50. package/dist/{dist-B_U69lgJ.js → dist-Cqv528cH.js} +131 -2
  51. package/dist/index.js +1 -1
  52. package/dist/index.mjs +1 -1
  53. package/dist/{retired-settings-keys-CffDz4qX.mjs → retired-settings-keys-BaOR7Z2z.mjs} +1 -1
  54. package/dist/{retired-settings-keys-CVUkMN5T.js → retired-settings-keys-Odqg6rBf.js} +1 -1
  55. package/package.json +1 -1
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, L as addonPagesCapability, dn as errMsg, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, L as addonPagesCapability, dn as errMsg, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, dn as errMsg, pn as BaseAddon, z as addonWidgetsCapability } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, dn as errMsg, pn as BaseAddon, z as addonWidgetsCapability } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  //#region src/builtins/alerts/prune-policy.ts
8
8
  /**
9
9
  * Ids older than `cutoffMs`, oldest first.
@@ -1,4 +1,4 @@
1
- import { B as alertsCapability, Bn as EventCategory, En as createEvent, dn as errMsg, n as AlertSchema, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { B as alertsCapability, Bn as EventCategory, En as createEvent, dn as errMsg, n as AlertSchema, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  //#region src/builtins/alerts/prune-policy.ts
3
3
  /**
4
4
  * Ids older than `cutoffMs`, oldest first.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  //#region src/builtins/autotrack/autotrack-config.ts
8
8
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
9
9
  deadZoneFraction: .5,
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, Mn as isEvent, U as bareAddonId, Ut as ptzAutotrackCapability, dn as errMsg, g as FIRST_LEVEL_MACRO_CLASSES, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, Mn as isEvent, U as bareAddonId, Ut as ptzAutotrackCapability, dn as errMsg, g as FIRST_LEVEL_MACRO_CLASSES, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  //#region src/builtins/autotrack/autotrack-config.ts
3
3
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
4
4
  deadZoneFraction: .5,
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let buffer = require("buffer");
9
9
  let node_fs_promises = require("node:fs/promises");
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, H as backupCapability, Nt as mayWriteToLocation, pn as BaseAddon, rn as storageOccupancyCapability } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, H as backupCapability, Nt as mayWriteToLocation, pn as BaseAddon, rn as storageOccupancyCapability } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { randomBytes, randomUUID } from "node:crypto";
3
3
  import { Buffer as Buffer$1 } from "buffer";
4
4
  import * as fsp from "node:fs/promises";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  let zod = require("zod");
8
8
  let _camstack_types_node = require("@camstack/types/node");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { An as hydrateSchema, Bn as EventCategory, En as createEvent, It as motionCapability, K as cameraGridLayoutCapability, Q as declarationOwnerNodeId, S as MOTION_CLOSE_AFTER_MS, _n as DeviceFeature, an as streamCatalogCapability, dn as errMsg, en as snapshotCapability, fn as buildFfmpegArgs, i as BaseDevice, m as DeclaredDevices, p as DERIVED_CAMERA_SILENCED_CAP_NAMES, pn as BaseAddon, yn as DeviceType } from "../../dist-BoYDYdae.mjs";
1
+ import { An as hydrateSchema, Bn as EventCategory, En as createEvent, It as motionCapability, K as cameraGridLayoutCapability, Q as declarationOwnerNodeId, S as MOTION_CLOSE_AFTER_MS, _n as DeviceFeature, an as streamCatalogCapability, dn as errMsg, en as snapshotCapability, fn as buildFfmpegArgs, i as BaseDevice, m as DeclaredDevices, p as DERIVED_CAMERA_SILENCED_CAP_NAMES, pn as BaseAddon, yn as DeviceType } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { z } from "zod";
3
3
  import { FfmpegProcess } from "@camstack/types/node";
4
4
  import { join } from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/console-logging/console-destination.ts
9
9
  var LEVEL_RANK = {
@@ -1,4 +1,4 @@
1
- import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/console-logging/console-destination.ts
4
4
  var LEVEL_RANK = {
@@ -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-B_U69lgJ.js");
3
+ const require_dist = require("../../dist-Cqv528cH.js");
4
4
  let node_crypto = require("node:crypto");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -1,4 +1,4 @@
1
- import { J as coreBlockAddonId, X as coreBlocksCapability, Y as coreBlockIdFromAddonId, c as CORE_BLOCKS_ADDON_ID, dn as errMsg, l as CORE_BLOCK_ADDON_PREFIX, m as DeclaredDevices, pn as BaseAddon, u as CoreBlockSchema } from "../../dist-BoYDYdae.mjs";
1
+ import { J as coreBlockAddonId, X as coreBlocksCapability, Y as coreBlockIdFromAddonId, c as CORE_BLOCKS_ADDON_ID, dn as errMsg, l as CORE_BLOCK_ADDON_PREFIX, m as DeclaredDevices, pn as BaseAddon, u as CoreBlockSchema } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as fs from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-CVUkMN5T.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-Odqg6rBf.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
10
10
  //#region src/builtins/device-manager/adoption-job-engine.ts
@@ -1,5 +1,5 @@
1
- import { $t as siteZoneKey, A as STREAM_PROFILE_META, Bn as EventCategory, Bt as parseStreamParamsFormPatch, G as buildStreamParamsConfigSchema, Jt as runtimeStatePolicyFor, Lt as normalizeUnit, Ot as locationIconKey, Sn as WELL_KNOWN_TAB_MAP, _n as DeviceFeature, d as DAY_NAMES, dn as errMsg, h as DeviceStatusSchema, jn as isDeviceConfigCap, mt as formatMinutes, nt as deviceStateCapability, o as CAMERA_SWITCH_ORDER, ot as enumerateItemArrayFields, pn as BaseAddon, rt as deviceStatusCapability, s as CAP_NAMES_WITH_STATUS, st as enumerateSchemaFields, t as ALL_CAPABILITY_DEFINITIONS, tt as deviceManagerCapability, ut as expandContainer, vn as DeviceRole, wt as legacyAutoLinkIds, x as MINUTES_PER_DAY, y as LocationIconIdSchema, yn as DeviceType, zn as sleep$1 } from "../../dist-BoYDYdae.mjs";
2
- import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-CffDz4qX.mjs";
1
+ import { $t as siteZoneKey, A as STREAM_PROFILE_META, Bn as EventCategory, Bt as parseStreamParamsFormPatch, G as buildStreamParamsConfigSchema, Jt as runtimeStatePolicyFor, Lt as normalizeUnit, Ot as locationIconKey, Sn as WELL_KNOWN_TAB_MAP, _n as DeviceFeature, d as DAY_NAMES, dn as errMsg, h as DeviceStatusSchema, jn as isDeviceConfigCap, mt as formatMinutes, nt as deviceStateCapability, o as CAMERA_SWITCH_ORDER, ot as enumerateItemArrayFields, pn as BaseAddon, rt as deviceStatusCapability, s as CAP_NAMES_WITH_STATUS, st as enumerateSchemaFields, t as ALL_CAPABILITY_DEFINITIONS, tt as deviceManagerCapability, ut as expandContainer, vn as DeviceRole, wt as legacyAutoLinkIds, x as MINUTES_PER_DAY, y as LocationIconIdSchema, yn as DeviceType, zn as sleep$1 } from "../../dist-Bo6_IXKD.mjs";
2
+ import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-BaOR7Z2z.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { canonicalDeviceFingerprint } from "@camstack/types/node";
5
5
  //#region src/builtins/device-manager/adoption-job-engine.ts
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  //#region src/builtins/doorbell/trigger-engine.ts
8
8
  /**
9
9
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, D as SOURCE_CAPS, En as createEvent, O as SOURCE_DEVICE_TYPES, U as bareAddonId, bt as isSameAddonId, ct as evaluateSensorEdge, dn as errMsg, it as doorbellCapability, pn as BaseAddon, xt as isSourceCap, yn as DeviceType } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, D as SOURCE_CAPS, En as createEvent, O as SOURCE_DEVICE_TYPES, U as bareAddonId, bt as isSameAddonId, ct as evaluateSensorEdge, dn as errMsg, it as doorbellCapability, pn as BaseAddon, xt as isSourceCap, yn as DeviceType } from "../../dist-Bo6_IXKD.mjs";
2
2
  //#region src/builtins/doorbell/trigger-engine.ts
3
3
  /**
4
4
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
9
9
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,4 +1,4 @@
1
- import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
4
4
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-B_U69lgJ.js");
3
+ const require_dist = require("../../dist-Cqv528cH.js");
4
4
  //#region src/builtins/liveness-monitor/liveness-checks.ts
5
5
  var NO_DEVICES = "liveness:no-devices";
6
6
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, C as RECORDING_SOURCE_CAMSTACK_ADDON, E as RecordingStatusSchema, En as createEvent, dn as errMsg, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, C as RECORDING_SOURCE_CAMSTACK_ADDON, E as RecordingStatusSchema, En as createEvent, dn as errMsg, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  //#region src/builtins/liveness-monitor/liveness-checks.ts
3
3
  var NO_DEVICES = "liveness:no-devices";
4
4
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  node_crypto = require_chunk.__toESM(node_crypto);
9
9
  let crypto$1 = require("crypto");
@@ -1,5 +1,5 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { I as UserRecordSchema, V as authProviderCapability, j as ScopedTokenSchema, pn as BaseAddon, r as ApiKeyRecordSchema, sn as userManagementCapability } from "../../dist-BoYDYdae.mjs";
2
+ import { I as UserRecordSchema, V as authProviderCapability, j as ScopedTokenSchema, pn as BaseAddon, r as ApiKeyRecordSchema, sn as userManagementCapability } from "../../dist-Bo6_IXKD.mjs";
3
3
  import * as crypto$2 from "node:crypto";
4
4
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
5
5
  import nodeCrypto from "crypto";
@@ -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-B_U69lgJ.js");
3
+ const require_dist = require("../../dist-Cqv528cH.js");
4
4
  const require_tls = require("../../tls-D_wUeOTD.js");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, Dt as localNetworkCapability, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, Dt as localNetworkCapability, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, i as writeExtraSans, l as reissueTlsLeaf, n as readTlsAccessStatus, o as validateUploadedTls, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, y as applyLanHttp } from "../../tls-IM-v7JV4.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  //#region src/builtins/loki-logging/loki-payload.ts
8
8
  /**
9
9
  * Loki rejects a label name that is not a valid Prometheus label
@@ -1,4 +1,4 @@
1
- import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  //#region src/builtins/loki-logging/loki-payload.ts
3
3
  /**
4
4
  * Loki rejects a label name that is not a valid Prometheus label
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  let node_fs_promises = require("node:fs/promises");
8
8
  let node_fs = require("node:fs");
9
9
  node_fs = require_chunk.__toESM(node_fs);
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, En as createEvent, Gt as resolveBucketMs, Pt as metricsProviderCapability, Wt as reducePoints, dn as errMsg, pn as BaseAddon, pt as foldSnapshotByFunction } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, En as createEvent, Gt as resolveBucketMs, Pt as metricsProviderCapability, Wt as reducePoints, dn as errMsg, pn as BaseAddon, pt as foldSnapshotByFunction } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { access, readFile, readdir } from "node:fs/promises";
3
3
  import * as fs from "node:fs";
4
4
  import { constants, readFileSync } from "node:fs";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_chunk.__toESM(node_fs);
9
9
  let node_child_process = require("node:child_process");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Bn as EventCategory, On as emitReadiness, Vt as platformProbeCapability, Zt as scoreRuntimes, at as enumerateInferenceDevices, dn as errMsg, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
2
+ import { Bn as EventCategory, On as emitReadiness, Vt as platformProbeCapability, Zt as scoreRuntimes, at as enumerateInferenceDevices, dn as errMsg, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
3
3
  import * as fs from "node:fs";
4
4
  import { execFile } from "node:child_process";
5
5
  import * as os from "node:os";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
8
8
  /**
9
9
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  const require_snapshot_courtesy = require("../../snapshot-courtesy-Cqs7GkOV.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, Nn as nodePin, U as bareAddonId, W as batteryCapability, _n as DeviceFeature, a as BatteryStatusSchema, dn as errMsg, en as snapshotCapability, et as deriveBatteryPresence, on as streamQualityLabel, pn as BaseAddon, yn as DeviceType } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, Nn as nodePin, U as bareAddonId, W as batteryCapability, _n as DeviceFeature, a as BatteryStatusSchema, dn as errMsg, en as snapshotCapability, et as deriveBatteryPresence, on as streamQualityLabel, pn as BaseAddon, yn as DeviceType } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CZPvteq2.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { ft as filesystemBrowseCapability, in as storageProviderCapability, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { ft as filesystemBrowseCapability, in as storageProviderCapability, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  const require_hub_cap_forward = require("../../hub-cap-forward-DmHNjbB0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Bn as EventCategory, F as StorageMigrationJobSchema, Ft as modeMayWrite, Kt as resolveLocationMode, M as StorageCleanupJobSchema, Mt as mayReadLocation, N as StorageLocationModeSchema, Nt as mayWriteToLocation, P as StorageLocationTypeSchema, Pn as parseJsonObject, Qt as settingsStoreCapability, Tt as legacyModeOf, ht as gbToBytes, lt as evictionPolicyOfLocation, nn as storageMigrationCapability, pn as BaseAddon, q as collectSecretConfigKeys, tn as storageCapability, un as withLocationMode, v as LegacyStorageLocationDefaultSchema, vt as isLocationEnabled, w as REDACTED_SECRET } from "../../dist-BoYDYdae.mjs";
1
+ import { Bn as EventCategory, F as StorageMigrationJobSchema, Ft as modeMayWrite, Kt as resolveLocationMode, M as StorageCleanupJobSchema, Mt as mayReadLocation, N as StorageLocationModeSchema, Nt as mayWriteToLocation, P as StorageLocationTypeSchema, Pn as parseJsonObject, Qt as settingsStoreCapability, Tt as legacyModeOf, ht as gbToBytes, lt as evictionPolicyOfLocation, nn as storageMigrationCapability, pn as BaseAddon, q as collectSecretConfigKeys, tn as storageCapability, un as withLocationMode, v as LegacyStorageLocationDefaultSchema, vt as isLocationEnabled, w as REDACTED_SECRET } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { t as HUB_CAP_FWD_ACTION } from "../../hub-cap-forward-BdT320dq.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  //#region src/builtins/system-config/system-config.addon.ts
8
8
  /**
9
9
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -1,4 +1,4 @@
1
- import { An as hydrateSchema, dn as errMsg, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { An as hydrateSchema, dn as errMsg, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  //#region src/builtins/system-config/system-config.addon.ts
3
3
  /**
4
4
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-B_U69lgJ.js");
6
+ const require_dist = require("../../dist-Cqv528cH.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-BoYDYdae.mjs";
1
+ import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-Bo6_IXKD.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";
@@ -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 = 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 = z.enum(["raised", "cleared"]);
17084
17094
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
17085
17095
  var NcZoneConditionSchema = z.object({
17086
17096
  ids: z.array(z.string().min(1)).min(1),
@@ -17270,6 +17280,20 @@ var NcConditionsSchema = z.object({
17270
17280
  scene: NcSceneConditionSchema.optional(),
17271
17281
  /** Device scope — absent = all devices. */
17272
17282
  devices: z.array(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: z.array(z.number()).min(1).optional(),
17273
17297
  /** Detector class names (any overlap with the record's class set). */
17274
17298
  classes: z.array(z.string().min(1)).optional(),
17275
17299
  /** Veto classes — any overlap fails the rule. */
@@ -17403,6 +17427,16 @@ var NcConditionsSchema = z.object({
17403
17427
  */
17404
17428
  sensorKinds: z.array(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
@@ -18023,6 +18057,7 @@ var NcConditionDescriptorSchema = z.object({
18023
18057
  /** Editor widget the UI renders — never hardcode per-condition forms. */
18024
18058
  valueType: z.enum([
18025
18059
  "deviceIdList",
18060
+ "deviceIdExcludeList",
18026
18061
  "stringList",
18027
18062
  "number01",
18028
18063
  "number",
@@ -18033,6 +18068,7 @@ var NcConditionDescriptorSchema = z.object({
18033
18068
  "plateMatcher",
18034
18069
  "packagePhase",
18035
18070
  "crossingSelect",
18071
+ "sensorTransition",
18036
18072
  "polygonDraw",
18037
18073
  "occupancy",
18038
18074
  "audio",
@@ -18183,6 +18219,39 @@ var NcHistoryFilterSchema = z.object({
18183
18219
  limit: z.number().int().min(1).max(500).default(100)
18184
18220
  });
18185
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 = z.object({
18232
+ ruleId: z.string(),
18233
+ /** Fire time of the newest row (`createdAt`, epoch ms). */
18234
+ lastAt: z.number(),
18235
+ status: NcHistoryStatusSchema,
18236
+ /** The camera/device of that row (a digest row files under its first camera). */
18237
+ deviceId: 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 = z.object({
18251
+ runs: z.array(NcRuleLastRunSchema),
18252
+ horizonMs: z.number().nonnegative().nullable()
18253
+ });
18254
+ /**
18186
18255
  * What a snooze covers. Broader scopes win when several overlap, so one window
18187
18256
  * leaves ONE digest rather than a rule snooze and a whole-feed snooze both
18188
18257
  * summarising the same silence.
@@ -18368,6 +18437,14 @@ var NcAlarmModeCoverageSchema = z.object({
18368
18437
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
18369
18438
  deviceIds: z.array(z.number().int()),
18370
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: z.array(z.number().int()).default([]),
18447
+ /**
18371
18448
  * Devices this mode NAMES but cannot actually arm, each with the switch that
18372
18449
  * excludes it.
18373
18450
  *
@@ -18591,6 +18668,15 @@ var notificationRulesCapability = {
18591
18668
  */
18592
18669
  getHistory: method(z.object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), z.object({ entries: z.array(NcHistoryEntrySchema) }), { auth: "admin" }),
18593
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(z.object({}), NcRuleLastRunsSchema, { auth: "admin" }),
18679
+ /**
18594
18680
  * Mint a fresh, externally-reachable URL for one artefact a history row
18595
18681
  * named in {@link NcHistoryEntrySchema.shape.artifactIds} — the SAME
18596
18682
  * signed-link mechanism the dispatcher uses to attach media to an
@@ -24569,7 +24655,11 @@ function buildDescriptor(capName, kind) {
24569
24655
  icon: legacyIcon(t.iconId)
24570
24656
  };
24571
24657
  }
24572
- 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)])));
24573
24663
  /**
24574
24664
  * server-management — per-NODE singleton capability for a node's ROOT
24575
24665
  * package lifecycle (runtime-updatable node packages).
@@ -47166,6 +47256,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
47166
47256
  addonId: null,
47167
47257
  access: "view"
47168
47258
  },
47259
+ "notificationRules.getRuleLastRuns": {
47260
+ capName: "notification-rules",
47261
+ capScope: "system",
47262
+ addonId: null,
47263
+ access: "view"
47264
+ },
47169
47265
  "notificationRules.getTemplateCatalog": {
47170
47266
  capName: "notification-rules",
47171
47267
  capScope: "system",
@@ -53108,6 +53204,39 @@ new Map(Object.entries({
53108
53204
  }));
53109
53205
  [...NC_SYSTEM_EVENT_FILTER_KEYS];
53110
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));
53111
53240
  var RULE_BODY_ONLY = ["body"];
53112
53241
  var RULE_TEXT = ["title", "body"];
53113
53242
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -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
@@ -18023,6 +18057,7 @@ var NcConditionDescriptorSchema = zod.z.object({
18023
18057
  /** Editor widget the UI renders — never hardcode per-condition forms. */
18024
18058
  valueType: zod.z.enum([
18025
18059
  "deviceIdList",
18060
+ "deviceIdExcludeList",
18026
18061
  "stringList",
18027
18062
  "number01",
18028
18063
  "number",
@@ -18033,6 +18068,7 @@ var NcConditionDescriptorSchema = zod.z.object({
18033
18068
  "plateMatcher",
18034
18069
  "packagePhase",
18035
18070
  "crossingSelect",
18071
+ "sensorTransition",
18036
18072
  "polygonDraw",
18037
18073
  "occupancy",
18038
18074
  "audio",
@@ -18183,6 +18219,39 @@ var NcHistoryFilterSchema = zod.z.object({
18183
18219
  limit: zod.z.number().int().min(1).max(500).default(100)
18184
18220
  });
18185
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
+ /**
18186
18255
  * What a snooze covers. Broader scopes win when several overlap, so one window
18187
18256
  * leaves ONE digest rather than a rule snooze and a whole-feed snooze both
18188
18257
  * summarising the same silence.
@@ -18368,6 +18437,14 @@ var NcAlarmModeCoverageSchema = zod.z.object({
18368
18437
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
18369
18438
  deviceIds: zod.z.array(zod.z.number().int()),
18370
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
+ /**
18371
18448
  * Devices this mode NAMES but cannot actually arm, each with the switch that
18372
18449
  * excludes it.
18373
18450
  *
@@ -18591,6 +18668,15 @@ var notificationRulesCapability = {
18591
18668
  */
18592
18669
  getHistory: method(zod.z.object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), zod.z.object({ entries: zod.z.array(NcHistoryEntrySchema) }), { auth: "admin" }),
18593
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
+ /**
18594
18680
  * Mint a fresh, externally-reachable URL for one artefact a history row
18595
18681
  * named in {@link NcHistoryEntrySchema.shape.artifactIds} — the SAME
18596
18682
  * signed-link mechanism the dispatcher uses to attach media to an
@@ -24569,7 +24655,11 @@ function buildDescriptor(capName, kind) {
24569
24655
  icon: legacyIcon(t.iconId)
24570
24656
  };
24571
24657
  }
24572
- 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)])));
24573
24663
  /**
24574
24664
  * server-management — per-NODE singleton capability for a node's ROOT
24575
24665
  * package lifecycle (runtime-updatable node packages).
@@ -47166,6 +47256,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
47166
47256
  addonId: null,
47167
47257
  access: "view"
47168
47258
  },
47259
+ "notificationRules.getRuleLastRuns": {
47260
+ capName: "notification-rules",
47261
+ capScope: "system",
47262
+ addonId: null,
47263
+ access: "view"
47264
+ },
47169
47265
  "notificationRules.getTemplateCatalog": {
47170
47266
  capName: "notification-rules",
47171
47267
  capScope: "system",
@@ -53108,6 +53204,39 @@ new Map(Object.entries({
53108
53204
  }));
53109
53205
  [...NC_SYSTEM_EVENT_FILTER_KEYS];
53110
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));
53111
53240
  var RULE_BODY_ONLY = ["body"];
53112
53241
  var RULE_TEXT = ["title", "body"];
53113
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-B_U69lgJ.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-BoYDYdae.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-BoYDYdae.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-B_U69lgJ.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.299",
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",