@camstack/system 1.2.295 → 1.2.297

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 (57) 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-bindings-store.d.ts +12 -0
  18. package/dist/builtins/device-manager/device-manager.addon.d.ts +2 -0
  19. package/dist/builtins/device-manager/device-manager.addon.js +10 -2
  20. package/dist/builtins/device-manager/device-manager.addon.mjs +10 -2
  21. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  22. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  23. package/dist/builtins/hub-forwarder/index.js +1 -1
  24. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  25. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  26. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  27. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  28. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  29. package/dist/builtins/local-network/local-network.addon.js +1 -1
  30. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  31. package/dist/builtins/loki-logging/index.js +1 -1
  32. package/dist/builtins/loki-logging/index.mjs +1 -1
  33. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  34. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  35. package/dist/builtins/platform-probe/index.js +1 -1
  36. package/dist/builtins/platform-probe/index.mjs +1 -1
  37. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  38. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  39. package/dist/builtins/snapshot/index.js +1 -1
  40. package/dist/builtins/snapshot/index.mjs +1 -1
  41. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  42. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  43. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  44. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  45. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  46. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  47. package/dist/builtins/system-config/system-config.addon.js +1 -1
  48. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  49. package/dist/builtins/winston-logging/index.js +1 -1
  50. package/dist/builtins/winston-logging/index.mjs +1 -1
  51. package/dist/{dist-C-fXee7n.js → dist-DaqbC6N5.js} +113 -3
  52. package/dist/{dist-D1_rTUOS.mjs → dist-O_Cf9RQm.mjs} +113 -3
  53. package/dist/index.js +1 -1
  54. package/dist/index.mjs +1 -1
  55. package/dist/{retired-settings-keys-jivjXc-s.mjs → retired-settings-keys-DCcJa0nH.mjs} +1 -1
  56. package/dist/{retired-settings-keys-BJbgHvQf.js → retired-settings-keys-_jB8F9wE.js} +1 -1
  57. 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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { Bn as EventCategory, L as addonPagesCapability, dn as errMsg, pn as BaseAddon } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { Bn as EventCategory, dn as errMsg, pn as BaseAddon, z as addonWidgetsCapability } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { B as alertsCapability, Bn as EventCategory, En as createEvent, dn as errMsg, n as AlertSchema, pn as BaseAddon } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { Bn as EventCategory, H as backupCapability, Nt as mayWriteToLocation, pn as BaseAddon, rn as storageOccupancyCapability } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
3
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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";
@@ -235,6 +235,18 @@ export declare function getAllBindings(deps: BindingsDeps): Promise<Array<{
235
235
  deviceId: number;
236
236
  entries: DeviceBindingEntry[];
237
237
  }>>;
238
+ /**
239
+ * The ids of every device bound to at least one of `capNames`, ascending.
240
+ *
241
+ * Built on {@link getAllBindings} so the routing rules (native, wrapped,
242
+ * remote) are the ones `getBindings` applies — a second resolver is how the
243
+ * two would drift. Only ids leave: the whole point is that a caller asking
244
+ * "which devices are openings" does not receive 1 000 binding maps (D636).
245
+ */
246
+ export interface ListDeviceIdsByCapsInput {
247
+ readonly capNames: readonly string[];
248
+ }
249
+ export declare function listDeviceIdsByCaps(deps: BindingsDeps, input: ListDeviceIdsByCapsInput): Promise<number[]>;
238
250
  /**
239
251
  * Resolve a numeric deviceId to a stableId via persisted meta.
240
252
  * Used only by the device-identity section of the device-details
@@ -1,5 +1,6 @@
1
1
  import { DeviceBindingEntry, BaseAddon, ProviderRegistration } from '@camstack/types';
2
2
  import { mergeAggregates } from './device-aggregation-merge.js';
3
+ import { ListDeviceIdsByCapsInput } from './device-bindings-store.js';
3
4
  import { ContributionShape } from './device-meta-types.js';
4
5
  export { mergeAggregates };
5
6
  export declare class DeviceManagerAddon extends BaseAddon {
@@ -123,6 +124,7 @@ export declare class DeviceManagerAddon extends BaseAddon {
123
124
  deviceId: number;
124
125
  entries: DeviceBindingEntry[];
125
126
  }>>;
127
+ listDeviceIdsByCaps(input: ListDeviceIdsByCapsInput): Promise<number[]>;
126
128
  /** Build the dependency context the extracted aggregation functions consume. */
127
129
  private get aggregationDeps();
128
130
  getDeviceAggregate(deviceId: number, kind: 'settings' | 'live'): Promise<ContributionShape | null>;
@@ -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-C-fXee7n.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-BJbgHvQf.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-_jB8F9wE.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
@@ -988,6 +988,10 @@ async function getAllBindings(deps) {
988
988
  for (const deviceId of [...ids].sort((a, b) => a - b)) out.push(await resolveBindingsForDevice(deps, deviceId, rowById.get(deviceId) ?? null, pass));
989
989
  return out;
990
990
  }
991
+ async function listDeviceIdsByCaps(deps, input) {
992
+ const wanted = new Set(input.capNames);
993
+ return (await getAllBindings(deps)).filter((row) => row.entries.some((entry) => wanted.has(entry.capName))).map((row) => row.deviceId);
994
+ }
991
995
  /**
992
996
  * Resolve a numeric deviceId to a stableId via persisted meta.
993
997
  * Used only by the device-identity section of the device-details
@@ -7759,6 +7763,9 @@ var DeviceManagerAddon = class extends require_dist.BaseAddon {
7759
7763
  async getAllBindings() {
7760
7764
  return getAllBindings(this.bindingsDeps);
7761
7765
  }
7766
+ async listDeviceIdsByCaps(input) {
7767
+ return listDeviceIdsByCaps(this.bindingsDeps, input);
7768
+ }
7762
7769
  /** Build the dependency context the extracted aggregation functions consume. */
7763
7770
  get aggregationDeps() {
7764
7771
  return {
@@ -7983,6 +7990,7 @@ var DeviceManagerAddon = class extends require_dist.BaseAddon {
7983
7990
  getAllBindings: async () => {
7984
7991
  return this.getAllBindings();
7985
7992
  },
7993
+ listDeviceIdsByCaps: (input) => this.listDeviceIdsByCaps({ capNames: input.capNames }),
7986
7994
  setWrapperActive: async (input) => {
7987
7995
  return this.setWrapperActive({
7988
7996
  deviceId: input.deviceId,
@@ -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-D1_rTUOS.mjs";
2
- import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-jivjXc-s.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-O_Cf9RQm.mjs";
2
+ import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-DCcJa0nH.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
@@ -983,6 +983,10 @@ async function getAllBindings(deps) {
983
983
  for (const deviceId of [...ids].sort((a, b) => a - b)) out.push(await resolveBindingsForDevice(deps, deviceId, rowById.get(deviceId) ?? null, pass));
984
984
  return out;
985
985
  }
986
+ async function listDeviceIdsByCaps(deps, input) {
987
+ const wanted = new Set(input.capNames);
988
+ return (await getAllBindings(deps)).filter((row) => row.entries.some((entry) => wanted.has(entry.capName))).map((row) => row.deviceId);
989
+ }
986
990
  /**
987
991
  * Resolve a numeric deviceId to a stableId via persisted meta.
988
992
  * Used only by the device-identity section of the device-details
@@ -7754,6 +7758,9 @@ var DeviceManagerAddon = class extends BaseAddon {
7754
7758
  async getAllBindings() {
7755
7759
  return getAllBindings(this.bindingsDeps);
7756
7760
  }
7761
+ async listDeviceIdsByCaps(input) {
7762
+ return listDeviceIdsByCaps(this.bindingsDeps, input);
7763
+ }
7757
7764
  /** Build the dependency context the extracted aggregation functions consume. */
7758
7765
  get aggregationDeps() {
7759
7766
  return {
@@ -7978,6 +7985,7 @@ var DeviceManagerAddon = class extends BaseAddon {
7978
7985
  getAllBindings: async () => {
7979
7986
  return this.getAllBindings();
7980
7987
  },
7988
+ listDeviceIdsByCaps: (input) => this.listDeviceIdsByCaps({ capNames: input.capNames }),
7981
7989
  setWrapperActive: async (input) => {
7982
7990
  return this.setWrapperActive({
7983
7991
  deviceId: input.deviceId,
@@ -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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
3
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
2
+ import { I as UserRecordSchema, V as authProviderCapability, j as ScopedTokenSchema, pn as BaseAddon, r as ApiKeyRecordSchema, sn as userManagementCapability } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
3
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { Bn as EventCategory, Dt as localNetworkCapability, pn as BaseAddon } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { Bn as EventCategory, pn as BaseAddon } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { ft as filesystemBrowseCapability, in as storageProviderCapability, pn as BaseAddon } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { An as hydrateSchema, dn as errMsg, pn as BaseAddon } from "../../dist-O_Cf9RQm.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-C-fXee7n.js");
6
+ const require_dist = require("../../dist-DaqbC6N5.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-D1_rTUOS.mjs";
1
+ import { kt as logDestinationCapability, pn as BaseAddon } from "../../dist-O_Cf9RQm.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";
@@ -13380,6 +13380,23 @@ var deviceManagerCapability = {
13380
13380
  */
13381
13381
  getAllBindings: method(zod.z.object({}), zod.z.array(DeviceBindingsForDeviceSchema)),
13382
13382
  /**
13383
+ * The ids of every device bound to AT LEAST ONE of `capNames` — ids only,
13384
+ * ascending (D636).
13385
+ *
13386
+ * The targeted form of "which devices are openings / carry a battery":
13387
+ * before it, the alarm's household scan and the battery section's picker
13388
+ * read the whole fleet (~433 KB slim) and then `getBindingsBatch` over
13389
+ * ~900 ids in five calls. Same resolver as `getBindings` (so a WRAPPED
13390
+ * binding counts exactly as the routing does), walked server-side like
13391
+ * `getAllBindings`; only the matching ids cross the wire. Names are the
13392
+ * caller's to resolve with the targeted `listAll({ deviceIds })`.
13393
+ *
13394
+ * Tier: `protected`, like its siblings `getBindings` / `getBindingsBatch` /
13395
+ * `getAllBindings` — which devices carry a cap is routing metadata every
13396
+ * signed-in client already reads, and it reveals nothing those do not.
13397
+ */
13398
+ listDeviceIdsByCaps: method(zod.z.object({ capNames: zod.z.array(zod.z.string().min(1)).min(1).max(16) }), zod.z.array(zod.z.number())),
13399
+ /**
13383
13400
  * Activate (or deactivate) a wrapper addon for a (device, cap) pair — the
13384
13401
  * per-camera function switch's ONE authority (D62).
13385
13402
  *
@@ -16797,6 +16814,19 @@ var NcSystemEventConditionSchema = zod.z.object({
16797
16814
  * does not carry) matches no `deviceTypes` list.
16798
16815
  */
16799
16816
  deviceTypes: zod.z.array(zod.z.string().min(1)).min(1).optional(),
16817
+ /**
16818
+ * Devices this rule NEVER speaks about, whatever else matched. Scoped to the
16819
+ * same kind family as `deviceIds` (`systemEventFilterApplies(kind,
16820
+ * 'deviceIds')`) and applied AFTER it: include first, then exclude. A
16821
+ * consumable subject (`consumable:<id>:<key>`) is excluded by its device id.
16822
+ *
16823
+ * It never fails closed: a subject that carries no device id is not in the
16824
+ * list, so it is not excluded. "Every battery except the one thermometer that
16825
+ * reads 0 % forever" is the question this answers — expressed as an include
16826
+ * list it would have to name every other battery device, and every device
16827
+ * adopted later would be silently left out (D636).
16828
+ */
16829
+ excludeDeviceIds: zod.z.array(zod.z.number().int()).min(1).optional(),
16800
16830
  nodeIds: zod.z.array(zod.z.string().min(1)).min(1).optional(),
16801
16831
  packageNames: zod.z.array(zod.z.string().min(1)).min(1).optional()
16802
16832
  });
@@ -27369,7 +27399,67 @@ var WebrtcLadderDecisionSchema = zod.z.object({
27369
27399
  serverSending: zod.z.boolean().nullable(),
27370
27400
  /** Epoch ms. The overlay prints its age; a decision from 40 minutes ago
27371
27401
  * must not read like one from this second. */
27372
- at: zod.z.number()
27402
+ at: zod.z.number(),
27403
+ /** The broker's own cause when it is finer than `cause` can carry, e.g.
27404
+ * `trial-revert` (reported as `stall`/`loss` for older consumers). Optional:
27405
+ * an older server strips it instead of rejecting the answer. */
27406
+ causeDetail: zod.z.string().optional()
27407
+ });
27408
+ var WebrtcClimbHoldSchema = zod.z.object({
27409
+ /** `stall-building` — the client receives ≪ what is sent; `delivery` — the
27410
+ * current rung is not landing whole; `no-evidence` — no receiver feedback;
27411
+ * `warming` — healthy, accumulating the streak; `cooldown` — too soon after
27412
+ * a change; `capacity` — a MEASURED probe below the next rung's bar;
27413
+ * `try-unclean` — no capacity evidence, and the path is not clean enough to
27414
+ * try; `try-backoff` — a try reverted, waiting out its backoff; `trial` —
27415
+ * this rung IS a try, reverting if it does not land; `suspended` —
27416
+ * recorded playback on the track. */
27417
+ code: zod.z.string(),
27418
+ /** The rung a climb would go to. */
27419
+ nextTier: CamProfileSchema,
27420
+ /** Bytes received ÷ bytes sent over the delivery window (≥ one GOP). */
27421
+ deliveryRatio: zod.z.number().nullable(),
27422
+ deliveryWindowMs: zod.z.number().nullable(),
27423
+ /** The ratio a climb requires. */
27424
+ climbDeliveryRatio: zod.z.number(),
27425
+ /** The receiver's bandwidth estimate (REMB), kbps. Capped by what is sent. */
27426
+ capacityKbps: zod.z.number().nullable(),
27427
+ /** The viewer's downlink probe for this session, kbps. */
27428
+ probeKbps: zod.z.number().nullable(),
27429
+ /** The next rung's measured bitrate, kbps. */
27430
+ nextTierKbps: zod.z.number().nullable(),
27431
+ capacityMargin: zod.z.number(),
27432
+ /** The capacity a climb to `nextTier` needs, kbps (bitrate × margin, or the
27433
+ * client ladder threshold when the rung has measured nothing). */
27434
+ neededKbps: zod.z.number().nullable(),
27435
+ /** For `try-unclean`: which clean-path condition failed (a `WebrtcTryBlocker`,
27436
+ * carried as a string for the same reason as `code`). */
27437
+ tryBlockedBy: zod.z.string().nullable(),
27438
+ /** The delivery ratio and the loss ratio a try requires / must stay under.
27439
+ * Optional, like every field added to this schema after it first shipped:
27440
+ * the router validates output, so a REQUIRED new field makes a newer server
27441
+ * reject an older broker's whole answer (review m1). */
27442
+ tryDeliveryRatio: zod.z.number().optional(),
27443
+ tryMaxLossRatio: zod.z.number().optional(),
27444
+ /** For `try-backoff`: time until the next try, ms. */
27445
+ retryInMs: zod.z.number().nullable(),
27446
+ /** The last try that reverted in this viewer session. */
27447
+ lastRevert: zod.z.object({
27448
+ tier: CamProfileSchema,
27449
+ deliveryRatio: zod.z.number().nullable(),
27450
+ stalled: zod.z.boolean(),
27451
+ at: zod.z.number()
27452
+ }).nullable(),
27453
+ /** For `trial`: how long this rung has been on trial, and for how long it must hold. */
27454
+ trialForMs: zod.z.number().nullable(),
27455
+ trialMs: zod.z.number().nullable(),
27456
+ healthyForMs: zod.z.number().nullable(),
27457
+ requiredHealthyMs: zod.z.number().nullable(),
27458
+ /** Epoch ms this hold's code began. */
27459
+ since: zod.z.number(),
27460
+ /** The same one-line account the broker logs, e.g.
27461
+ * `held: delivery 0.97 over 4.0s ok, REMB 480 kbps < mid 1800 kbps × 1.2`. */
27462
+ summary: zod.z.string()
27373
27463
  });
27374
27464
  /** Per-tier count of MEASURED downgrades this viewer session has suffered. */
27375
27465
  var WebrtcTierFailureSchema = zod.z.object({
@@ -27433,7 +27523,12 @@ var WebrtcSessionDebugSchema = zod.z.object({
27433
27523
  tierFailures: zod.z.array(WebrtcTierFailureSchema),
27434
27524
  /** Successful promotions in this viewer session (drives the progressive
27435
27525
  * healthy timer). Null when no ladder is running. */
27436
- upgradeCount: zod.z.number().nullable()
27526
+ upgradeCount: zod.z.number().nullable(),
27527
+ /** Why the ladder is not climbing right now. Null when no ladder runs, it
27528
+ * is at the top rung, or it just moved. Optional because this output is
27529
+ * validated by the router: a server carrying this schema must still accept
27530
+ * the answer of a stream-broker deployed before the field existed. */
27531
+ climbHold: WebrtcClimbHoldSchema.nullable().optional()
27437
27532
  });
27438
27533
  /**
27439
27534
  * WebRTC session — device-scoped facade over the system `webrtc` cap.
@@ -33385,6 +33480,11 @@ var ClientNetworkStatsSchema = zod.z.object({
33385
33480
  jitterMs: zod.z.number(),
33386
33481
  estimatedBandwidthKbps: zod.z.number(),
33387
33482
  packetLossPercent: zod.z.number().min(0).max(100),
33483
+ /** The viewer's latest `/adaptive-probe` reading, Mbps — whatever it read
33484
+ * (D635 I4). Absent when it never probed or the probe failed (unknown). */
33485
+ downlinkMbps: zod.z.number().optional(),
33486
+ /** Age of that reading when this report was sent, ms. */
33487
+ downlinkAgeMs: zod.z.number().optional(),
33388
33488
  lastUpdated: zod.z.number()
33389
33489
  });
33390
33490
  var DeviceNetworkStatsSchema = zod.z.object({
@@ -33404,7 +33504,11 @@ var networkQualityCapability = {
33404
33504
  rttMs: zod.z.number().min(0).max(6e4),
33405
33505
  jitterMs: zod.z.number().min(0).max(1e4),
33406
33506
  estimatedBandwidthKbps: zod.z.number().min(0).max(1e6),
33407
- packetLossPercent: zod.z.number().min(0).max(100)
33507
+ packetLossPercent: zod.z.number().min(0).max(100),
33508
+ /** Latest downlink probe, Mbps, whatever it read; absent = never / failed. */
33509
+ downlinkMbps: zod.z.number().min(0).max(1e5).optional(),
33510
+ /** Age of that probe when this report is sent, ms. */
33511
+ downlinkAgeMs: zod.z.number().min(0).max(864e5).optional()
33408
33512
  }), zod.z.void(), { kind: "mutation" })
33409
33513
  },
33410
33514
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
@@ -45063,6 +45167,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
45063
45167
  addonId: null,
45064
45168
  access: "view"
45065
45169
  },
45170
+ "deviceManager.listDeviceIdsByCaps": {
45171
+ capName: "device-manager",
45172
+ capScope: "system",
45173
+ addonId: null,
45174
+ access: "view"
45175
+ },
45066
45176
  "deviceManager.listLocationDescriptions": {
45067
45177
  capName: "device-manager",
45068
45178
  capScope: "system",
@@ -13380,6 +13380,23 @@ var deviceManagerCapability = {
13380
13380
  */
13381
13381
  getAllBindings: method(z.object({}), z.array(DeviceBindingsForDeviceSchema)),
13382
13382
  /**
13383
+ * The ids of every device bound to AT LEAST ONE of `capNames` — ids only,
13384
+ * ascending (D636).
13385
+ *
13386
+ * The targeted form of "which devices are openings / carry a battery":
13387
+ * before it, the alarm's household scan and the battery section's picker
13388
+ * read the whole fleet (~433 KB slim) and then `getBindingsBatch` over
13389
+ * ~900 ids in five calls. Same resolver as `getBindings` (so a WRAPPED
13390
+ * binding counts exactly as the routing does), walked server-side like
13391
+ * `getAllBindings`; only the matching ids cross the wire. Names are the
13392
+ * caller's to resolve with the targeted `listAll({ deviceIds })`.
13393
+ *
13394
+ * Tier: `protected`, like its siblings `getBindings` / `getBindingsBatch` /
13395
+ * `getAllBindings` — which devices carry a cap is routing metadata every
13396
+ * signed-in client already reads, and it reveals nothing those do not.
13397
+ */
13398
+ listDeviceIdsByCaps: method(z.object({ capNames: z.array(z.string().min(1)).min(1).max(16) }), z.array(z.number())),
13399
+ /**
13383
13400
  * Activate (or deactivate) a wrapper addon for a (device, cap) pair — the
13384
13401
  * per-camera function switch's ONE authority (D62).
13385
13402
  *
@@ -16797,6 +16814,19 @@ var NcSystemEventConditionSchema = z.object({
16797
16814
  * does not carry) matches no `deviceTypes` list.
16798
16815
  */
16799
16816
  deviceTypes: z.array(z.string().min(1)).min(1).optional(),
16817
+ /**
16818
+ * Devices this rule NEVER speaks about, whatever else matched. Scoped to the
16819
+ * same kind family as `deviceIds` (`systemEventFilterApplies(kind,
16820
+ * 'deviceIds')`) and applied AFTER it: include first, then exclude. A
16821
+ * consumable subject (`consumable:<id>:<key>`) is excluded by its device id.
16822
+ *
16823
+ * It never fails closed: a subject that carries no device id is not in the
16824
+ * list, so it is not excluded. "Every battery except the one thermometer that
16825
+ * reads 0 % forever" is the question this answers — expressed as an include
16826
+ * list it would have to name every other battery device, and every device
16827
+ * adopted later would be silently left out (D636).
16828
+ */
16829
+ excludeDeviceIds: z.array(z.number().int()).min(1).optional(),
16800
16830
  nodeIds: z.array(z.string().min(1)).min(1).optional(),
16801
16831
  packageNames: z.array(z.string().min(1)).min(1).optional()
16802
16832
  });
@@ -27369,7 +27399,67 @@ var WebrtcLadderDecisionSchema = z.object({
27369
27399
  serverSending: z.boolean().nullable(),
27370
27400
  /** Epoch ms. The overlay prints its age; a decision from 40 minutes ago
27371
27401
  * must not read like one from this second. */
27372
- at: z.number()
27402
+ at: z.number(),
27403
+ /** The broker's own cause when it is finer than `cause` can carry, e.g.
27404
+ * `trial-revert` (reported as `stall`/`loss` for older consumers). Optional:
27405
+ * an older server strips it instead of rejecting the answer. */
27406
+ causeDetail: z.string().optional()
27407
+ });
27408
+ var WebrtcClimbHoldSchema = z.object({
27409
+ /** `stall-building` — the client receives ≪ what is sent; `delivery` — the
27410
+ * current rung is not landing whole; `no-evidence` — no receiver feedback;
27411
+ * `warming` — healthy, accumulating the streak; `cooldown` — too soon after
27412
+ * a change; `capacity` — a MEASURED probe below the next rung's bar;
27413
+ * `try-unclean` — no capacity evidence, and the path is not clean enough to
27414
+ * try; `try-backoff` — a try reverted, waiting out its backoff; `trial` —
27415
+ * this rung IS a try, reverting if it does not land; `suspended` —
27416
+ * recorded playback on the track. */
27417
+ code: z.string(),
27418
+ /** The rung a climb would go to. */
27419
+ nextTier: CamProfileSchema,
27420
+ /** Bytes received ÷ bytes sent over the delivery window (≥ one GOP). */
27421
+ deliveryRatio: z.number().nullable(),
27422
+ deliveryWindowMs: z.number().nullable(),
27423
+ /** The ratio a climb requires. */
27424
+ climbDeliveryRatio: z.number(),
27425
+ /** The receiver's bandwidth estimate (REMB), kbps. Capped by what is sent. */
27426
+ capacityKbps: z.number().nullable(),
27427
+ /** The viewer's downlink probe for this session, kbps. */
27428
+ probeKbps: z.number().nullable(),
27429
+ /** The next rung's measured bitrate, kbps. */
27430
+ nextTierKbps: z.number().nullable(),
27431
+ capacityMargin: z.number(),
27432
+ /** The capacity a climb to `nextTier` needs, kbps (bitrate × margin, or the
27433
+ * client ladder threshold when the rung has measured nothing). */
27434
+ neededKbps: z.number().nullable(),
27435
+ /** For `try-unclean`: which clean-path condition failed (a `WebrtcTryBlocker`,
27436
+ * carried as a string for the same reason as `code`). */
27437
+ tryBlockedBy: z.string().nullable(),
27438
+ /** The delivery ratio and the loss ratio a try requires / must stay under.
27439
+ * Optional, like every field added to this schema after it first shipped:
27440
+ * the router validates output, so a REQUIRED new field makes a newer server
27441
+ * reject an older broker's whole answer (review m1). */
27442
+ tryDeliveryRatio: z.number().optional(),
27443
+ tryMaxLossRatio: z.number().optional(),
27444
+ /** For `try-backoff`: time until the next try, ms. */
27445
+ retryInMs: z.number().nullable(),
27446
+ /** The last try that reverted in this viewer session. */
27447
+ lastRevert: z.object({
27448
+ tier: CamProfileSchema,
27449
+ deliveryRatio: z.number().nullable(),
27450
+ stalled: z.boolean(),
27451
+ at: z.number()
27452
+ }).nullable(),
27453
+ /** For `trial`: how long this rung has been on trial, and for how long it must hold. */
27454
+ trialForMs: z.number().nullable(),
27455
+ trialMs: z.number().nullable(),
27456
+ healthyForMs: z.number().nullable(),
27457
+ requiredHealthyMs: z.number().nullable(),
27458
+ /** Epoch ms this hold's code began. */
27459
+ since: z.number(),
27460
+ /** The same one-line account the broker logs, e.g.
27461
+ * `held: delivery 0.97 over 4.0s ok, REMB 480 kbps < mid 1800 kbps × 1.2`. */
27462
+ summary: z.string()
27373
27463
  });
27374
27464
  /** Per-tier count of MEASURED downgrades this viewer session has suffered. */
27375
27465
  var WebrtcTierFailureSchema = z.object({
@@ -27433,7 +27523,12 @@ var WebrtcSessionDebugSchema = z.object({
27433
27523
  tierFailures: z.array(WebrtcTierFailureSchema),
27434
27524
  /** Successful promotions in this viewer session (drives the progressive
27435
27525
  * healthy timer). Null when no ladder is running. */
27436
- upgradeCount: z.number().nullable()
27526
+ upgradeCount: z.number().nullable(),
27527
+ /** Why the ladder is not climbing right now. Null when no ladder runs, it
27528
+ * is at the top rung, or it just moved. Optional because this output is
27529
+ * validated by the router: a server carrying this schema must still accept
27530
+ * the answer of a stream-broker deployed before the field existed. */
27531
+ climbHold: WebrtcClimbHoldSchema.nullable().optional()
27437
27532
  });
27438
27533
  /**
27439
27534
  * WebRTC session — device-scoped facade over the system `webrtc` cap.
@@ -33385,6 +33480,11 @@ var ClientNetworkStatsSchema = z.object({
33385
33480
  jitterMs: z.number(),
33386
33481
  estimatedBandwidthKbps: z.number(),
33387
33482
  packetLossPercent: z.number().min(0).max(100),
33483
+ /** The viewer's latest `/adaptive-probe` reading, Mbps — whatever it read
33484
+ * (D635 I4). Absent when it never probed or the probe failed (unknown). */
33485
+ downlinkMbps: z.number().optional(),
33486
+ /** Age of that reading when this report was sent, ms. */
33487
+ downlinkAgeMs: z.number().optional(),
33388
33488
  lastUpdated: z.number()
33389
33489
  });
33390
33490
  var DeviceNetworkStatsSchema = z.object({
@@ -33404,7 +33504,11 @@ var networkQualityCapability = {
33404
33504
  rttMs: z.number().min(0).max(6e4),
33405
33505
  jitterMs: z.number().min(0).max(1e4),
33406
33506
  estimatedBandwidthKbps: z.number().min(0).max(1e6),
33407
- packetLossPercent: z.number().min(0).max(100)
33507
+ packetLossPercent: z.number().min(0).max(100),
33508
+ /** Latest downlink probe, Mbps, whatever it read; absent = never / failed. */
33509
+ downlinkMbps: z.number().min(0).max(1e5).optional(),
33510
+ /** Age of that probe when this report is sent, ms. */
33511
+ downlinkAgeMs: z.number().min(0).max(864e5).optional()
33408
33512
  }), z.void(), { kind: "mutation" })
33409
33513
  },
33410
33514
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
@@ -45063,6 +45167,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
45063
45167
  addonId: null,
45064
45168
  access: "view"
45065
45169
  },
45170
+ "deviceManager.listDeviceIdsByCaps": {
45171
+ capName: "device-manager",
45172
+ capScope: "system",
45173
+ addonId: null,
45174
+ access: "view"
45175
+ },
45066
45176
  "deviceManager.listLocationDescriptions": {
45067
45177
  capName: "device-manager",
45068
45178
  capScope: "system",
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-C-fXee7n.js");
3
+ const require_dist = require("./dist-DaqbC6N5.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-D1_rTUOS.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-O_Cf9RQm.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-D1_rTUOS.mjs";
1
+ import { Cn as asJsonObject } from "./dist-O_Cf9RQm.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-C-fXee7n.js");
1
+ const require_dist = require("./dist-DaqbC6N5.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.295",
3
+ "version": "1.2.297",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",