@camstack/system 1.2.308 → 1.2.309

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 (77) 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/composer/composed-device.d.ts +26 -0
  14. package/dist/builtins/composer/composer.addon.d.ts +12 -0
  15. package/dist/builtins/composer/composer.addon.js +1682 -0
  16. package/dist/builtins/composer/composer.addon.mjs +1677 -0
  17. package/dist/builtins/composer/composer.d.ts +103 -0
  18. package/dist/builtins/composer/composition-declarations.d.ts +53 -0
  19. package/dist/builtins/composer/composition-runtime.d.ts +88 -0
  20. package/dist/builtins/composer/deadline-timer.d.ts +18 -0
  21. package/dist/builtins/composer/index.d.ts +1 -0
  22. package/dist/builtins/composer/index.js +8 -0
  23. package/dist/builtins/composer/index.mjs +2 -0
  24. package/dist/builtins/composer/source-tracker.d.ts +78 -0
  25. package/dist/builtins/console-logging/index.js +1 -1
  26. package/dist/builtins/console-logging/index.mjs +1 -1
  27. package/dist/builtins/core-blocks/block-supervisor.d.ts +32 -1
  28. package/dist/builtins/core-blocks/blocks-integration.d.ts +5 -0
  29. package/dist/builtins/core-blocks/composition-api.d.ts +25 -0
  30. package/dist/builtins/core-blocks/composition-sources.d.ts +10 -0
  31. package/dist/builtins/core-blocks/core-block-store.d.ts +34 -2
  32. package/dist/builtins/core-blocks/core-blocks.addon.d.ts +6 -0
  33. package/dist/builtins/core-blocks/core-blocks.addon.js +504 -11
  34. package/dist/builtins/core-blocks/core-blocks.addon.mjs +504 -11
  35. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  36. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  37. package/dist/builtins/doorbell/virtual-doorbell.addon.js +10 -31
  38. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +9 -30
  39. package/dist/builtins/hub-forwarder/index.js +1 -1
  40. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  41. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  42. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  43. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  44. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  45. package/dist/builtins/local-network/local-network.addon.js +1 -1
  46. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  47. package/dist/builtins/loki-logging/index.js +1 -1
  48. package/dist/builtins/loki-logging/index.mjs +1 -1
  49. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  50. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  51. package/dist/builtins/platform-probe/index.js +1 -1
  52. package/dist/builtins/platform-probe/index.mjs +1 -1
  53. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  54. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  55. package/dist/builtins/shared/device-state-changed.d.ts +17 -0
  56. package/dist/builtins/snapshot/index.js +1 -1
  57. package/dist/builtins/snapshot/index.mjs +1 -1
  58. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  59. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  60. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  61. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  62. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  63. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  64. package/dist/builtins/system-config/system-config.addon.js +1 -1
  65. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  66. package/dist/builtins/winston-logging/index.js +1 -1
  67. package/dist/builtins/winston-logging/index.mjs +1 -1
  68. package/dist/device-state-changed-Bk7cvTnz.js +31 -0
  69. package/dist/device-state-changed-DoBbkyEI.mjs +20 -0
  70. package/dist/{dist-DygWCI8k.mjs → dist-BEuQPDk_.mjs} +1286 -79
  71. package/dist/{dist-DGhk7Tay.js → dist-BhO9eYKO.js} +1375 -78
  72. package/dist/index.d.ts +1 -0
  73. package/dist/index.js +4 -1
  74. package/dist/index.mjs +4 -2
  75. package/dist/{retired-settings-keys-z02aqTy7.mjs → retired-settings-keys-CQvG6B-Q.mjs} +1 -1
  76. package/dist/{retired-settings-keys-IZ9MH0GO.js → retired-settings-keys-DHgnJqS3.js} +1 -1
  77. package/package.json +20 -1
@@ -3,7 +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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.js");
7
+ const require_device_state_changed = require("../../device-state-changed-Bk7cvTnz.js");
7
8
  //#region src/builtins/doorbell/trigger-engine.ts
8
9
  /**
9
10
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -241,7 +242,7 @@ function entriesBindWrapper(entries, capName, ownAddonId) {
241
242
  function summariseEntries(entries) {
242
243
  return entries.map((entry) => `${entry.capName}:${entry.kind}:${entry.providerAddonId}`);
243
244
  }
244
- function isRecord$2(value) {
245
+ function isRecord$1(value) {
245
246
  return typeof value === "object" && value !== null && !Array.isArray(value);
246
247
  }
247
248
  /**
@@ -257,13 +258,13 @@ function isRecord$2(value) {
257
258
  * from an empty snapshot, whereas a genuine unbind leaves the key present.
258
259
  */
259
260
  function readDurableWrapperBinding(record, deviceId, capName, ownAddonId) {
260
- if (!isRecord$2(record)) return "unreadable";
261
+ if (!isRecord$1(record)) return "unreadable";
261
262
  const deviceBindings = record["deviceBindings"];
262
- if (!isRecord$2(deviceBindings)) return "unreadable";
263
+ if (!isRecord$1(deviceBindings)) return "unreadable";
263
264
  const perDevice = deviceBindings[String(deviceId)];
264
- if (!isRecord$2(perDevice)) return "unbound";
265
+ if (!isRecord$1(perDevice)) return "unbound";
265
266
  const activation = perDevice[capName];
266
- if (!isRecord$2(activation)) return "unbound";
267
+ if (!isRecord$1(activation)) return "unbound";
267
268
  const wrapperAddonId = activation["wrapperAddonId"];
268
269
  if (typeof wrapperAddonId !== "string") return "unbound";
269
270
  return require_dist.isSameAddonId(wrapperAddonId, ownAddonId) ? "bound" : "unbound";
@@ -318,7 +319,7 @@ var KEY_SOURCES = "doorbellSources";
318
319
  var LEGACY_KEY_SOURCE = "doorbellSourceDeviceId";
319
320
  var LEGACY_KEY_TRIGGER = "doorbellTrigger";
320
321
  var LEGACY_KEY_EVENT_TYPE = "doorbellEventType";
321
- function isRecord$1(value) {
322
+ function isRecord(value) {
322
323
  return typeof value === "object" && value !== null && !Array.isArray(value);
323
324
  }
324
325
  /** Coerce a persisted / form-supplied id (number or numeric string) to a
@@ -336,7 +337,7 @@ function collectSources(items) {
336
337
  const out = [];
337
338
  const seen = /* @__PURE__ */ new Set();
338
339
  for (const item of items) {
339
- const id = isRecord$1(item) ? coerceDeviceId(item["deviceId"]) : coerceDeviceId(item);
340
+ const id = isRecord(item) ? coerceDeviceId(item["deviceId"]) : coerceDeviceId(item);
340
341
  if (id !== null && !seen.has(id)) {
341
342
  seen.add(id);
342
343
  out.push({ deviceId: id });
@@ -588,28 +589,6 @@ function createDoorbellExtensionProvider(deps) {
588
589
  * derived from it plus the capability registry.
589
590
  */
590
591
  var DEVICE_MANAGER_ADDON_ID = "device-manager";
591
- /** Structural narrowing helper for untrusted bus payloads. */
592
- function isRecord(value) {
593
- return typeof value === "object" && value !== null && !Array.isArray(value);
594
- }
595
- /**
596
- * Cast-free narrowing of the untyped `device.state-changed` payload
597
- * (the category is not part of the typed EventCatalog — subscribers
598
- * validate at the boundary).
599
- */
600
- function parseDeviceStateChanged(data) {
601
- if (!isRecord(data)) return null;
602
- const deviceId = data["deviceId"];
603
- const capName = data["capName"];
604
- const slice = data["slice"];
605
- if (typeof deviceId !== "number" || typeof capName !== "string") return null;
606
- if (!isRecord(slice)) return null;
607
- return {
608
- deviceId,
609
- capName,
610
- slice
611
- };
612
- }
613
592
  /** Narrow a raw `doorbell` runtime-state slice to counters (defaults on absence). */
614
593
  function parseDoorbellSlice(slice) {
615
594
  const lastPressedAtRaw = slice?.["lastPressedAt"];
@@ -671,7 +650,7 @@ var VirtualDoorbellAddon = class extends require_dist.BaseAddon {
671
650
  this.engine = new DoorbellTriggerEngine({ debounceMs: this.config.debounceMs });
672
651
  this.ctx.logger.info("Virtual doorbell wrapper initialized");
673
652
  this.subscribe({ category: require_dist.EventCategory.DeviceStateChanged }, (event) => {
674
- const data = parseDeviceStateChanged(event.data);
653
+ const data = require_device_state_changed.parseDeviceStateChanged(event.data);
675
654
  if (!data) return;
676
655
  this.handleStateChanged(data);
677
656
  });
@@ -1,4 +1,5 @@
1
- import { Ct as isSourceCap, D as SOURCE_CAPS, H as bareAddonId, Sn as DeviceType, St as isSameAddonId, Un as EventCategory, X as createDeviceExtensionProvider, et as defineExtensionSlotProvider, gn as BaseAddon, kn as createEvent, mn as errMsg, nt as deviceExtensionCapability, ot as doorbellCapability, ut as evaluateSensorEdge } from "../../dist-DygWCI8k.mjs";
1
+ import { Ft as isSourceCap, Ln as DeviceType, Pt as isSameAddonId, St as evaluateSensorEdge, W as bareAddonId, Wn as createEvent, _t as doorbellCapability, dt as defineExtensionSlotProvider, ir as EventCategory, jn as BaseAddon, k as SOURCE_CAPS, kn as errMsg, pt as deviceExtensionCapability, st as createDeviceExtensionProvider } from "../../dist-BEuQPDk_.mjs";
2
+ import { n as parseDeviceStateChanged } from "../../device-state-changed-DoBbkyEI.mjs";
2
3
  //#region src/builtins/doorbell/trigger-engine.ts
3
4
  /**
4
5
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -236,7 +237,7 @@ function entriesBindWrapper(entries, capName, ownAddonId) {
236
237
  function summariseEntries(entries) {
237
238
  return entries.map((entry) => `${entry.capName}:${entry.kind}:${entry.providerAddonId}`);
238
239
  }
239
- function isRecord$2(value) {
240
+ function isRecord$1(value) {
240
241
  return typeof value === "object" && value !== null && !Array.isArray(value);
241
242
  }
242
243
  /**
@@ -252,13 +253,13 @@ function isRecord$2(value) {
252
253
  * from an empty snapshot, whereas a genuine unbind leaves the key present.
253
254
  */
254
255
  function readDurableWrapperBinding(record, deviceId, capName, ownAddonId) {
255
- if (!isRecord$2(record)) return "unreadable";
256
+ if (!isRecord$1(record)) return "unreadable";
256
257
  const deviceBindings = record["deviceBindings"];
257
- if (!isRecord$2(deviceBindings)) return "unreadable";
258
+ if (!isRecord$1(deviceBindings)) return "unreadable";
258
259
  const perDevice = deviceBindings[String(deviceId)];
259
- if (!isRecord$2(perDevice)) return "unbound";
260
+ if (!isRecord$1(perDevice)) return "unbound";
260
261
  const activation = perDevice[capName];
261
- if (!isRecord$2(activation)) return "unbound";
262
+ if (!isRecord$1(activation)) return "unbound";
262
263
  const wrapperAddonId = activation["wrapperAddonId"];
263
264
  if (typeof wrapperAddonId !== "string") return "unbound";
264
265
  return isSameAddonId(wrapperAddonId, ownAddonId) ? "bound" : "unbound";
@@ -313,7 +314,7 @@ var KEY_SOURCES = "doorbellSources";
313
314
  var LEGACY_KEY_SOURCE = "doorbellSourceDeviceId";
314
315
  var LEGACY_KEY_TRIGGER = "doorbellTrigger";
315
316
  var LEGACY_KEY_EVENT_TYPE = "doorbellEventType";
316
- function isRecord$1(value) {
317
+ function isRecord(value) {
317
318
  return typeof value === "object" && value !== null && !Array.isArray(value);
318
319
  }
319
320
  /** Coerce a persisted / form-supplied id (number or numeric string) to a
@@ -331,7 +332,7 @@ function collectSources(items) {
331
332
  const out = [];
332
333
  const seen = /* @__PURE__ */ new Set();
333
334
  for (const item of items) {
334
- const id = isRecord$1(item) ? coerceDeviceId(item["deviceId"]) : coerceDeviceId(item);
335
+ const id = isRecord(item) ? coerceDeviceId(item["deviceId"]) : coerceDeviceId(item);
335
336
  if (id !== null && !seen.has(id)) {
336
337
  seen.add(id);
337
338
  out.push({ deviceId: id });
@@ -583,28 +584,6 @@ function createDoorbellExtensionProvider(deps) {
583
584
  * derived from it plus the capability registry.
584
585
  */
585
586
  var DEVICE_MANAGER_ADDON_ID = "device-manager";
586
- /** Structural narrowing helper for untrusted bus payloads. */
587
- function isRecord(value) {
588
- return typeof value === "object" && value !== null && !Array.isArray(value);
589
- }
590
- /**
591
- * Cast-free narrowing of the untyped `device.state-changed` payload
592
- * (the category is not part of the typed EventCatalog — subscribers
593
- * validate at the boundary).
594
- */
595
- function parseDeviceStateChanged(data) {
596
- if (!isRecord(data)) return null;
597
- const deviceId = data["deviceId"];
598
- const capName = data["capName"];
599
- const slice = data["slice"];
600
- if (typeof deviceId !== "number" || typeof capName !== "string") return null;
601
- if (!isRecord(slice)) return null;
602
- return {
603
- deviceId,
604
- capName,
605
- slice
606
- };
607
- }
608
587
  /** Narrow a raw `doorbell` runtime-state slice to counters (defaults on absence). */
609
588
  function parseDoorbellSlice(slice) {
610
589
  const lastPressedAtRaw = slice?.["lastPressedAt"];
@@ -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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { gn as BaseAddon, jt as logDestinationCapability } from "../../dist-DygWCI8k.mjs";
1
+ import { Ut as logDestinationCapability, jn as BaseAddon } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
3
+ const require_dist = require("../../dist-BhO9eYKO.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 { C as RECORDING_SOURCE_CAMSTACK_ADDON, E as RecordingStatusSchema, Un as EventCategory, gn as BaseAddon, kn as createEvent, mn as errMsg } from "../../dist-DygWCI8k.mjs";
1
+ import { O as RecordingStatusSchema, T as RECORDING_SOURCE_CAMSTACK_ADDON, Wn as createEvent, ir as EventCategory, jn as BaseAddon, kn as errMsg } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { A as ScopedTokenSchema, B as authProviderCapability, F as UserRecordSchema, gn as BaseAddon, ln as userManagementCapability, r as ApiKeyRecordSchema } from "../../dist-DygWCI8k.mjs";
2
+ import { Cn as userManagementCapability, H as authProviderCapability, L as UserRecordSchema, M as ScopedTokenSchema, jn as BaseAddon, r as ApiKeyRecordSchema } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
3
+ const require_dist = require("../../dist-BhO9eYKO.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 { Un as EventCategory, gn as BaseAddon, kt as localNetworkCapability } from "../../dist-DygWCI8k.mjs";
1
+ import { Vt as localNetworkCapability, ir as EventCategory, jn as BaseAddon } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { gn as BaseAddon, jt as logDestinationCapability } from "../../dist-DygWCI8k.mjs";
1
+ import { Ut as logDestinationCapability, jn as BaseAddon } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { It as metricsProviderCapability, Kt as reducePoints, Un as EventCategory, gn as BaseAddon, ht as foldSnapshotByFunction, kn as createEvent, mn as errMsg, qt as resolveBucketMs } from "../../dist-DygWCI8k.mjs";
1
+ import { Dt as foldSnapshotByFunction, Jt as metricsProviderCapability, Wn as createEvent, an as reducePoints, ir as EventCategory, jn as BaseAddon, kn as errMsg, on as resolveBucketMs } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { $t as scoreRuntimes, Un as EventCategory, Ut as platformProbeCapability, gn as BaseAddon, jn as emitReadiness, mn as errMsg, st as enumerateInferenceDevices } from "../../dist-DygWCI8k.mjs";
2
+ import { Kn as emitReadiness, fn as scoreRuntimes, ir as EventCategory, jn as BaseAddon, kn as errMsg, nn as platformProbeCapability, vt as enumerateInferenceDevices } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { Un as EventCategory, gn as BaseAddon } from "../../dist-DygWCI8k.mjs";
1
+ import { ir as EventCategory, jn as BaseAddon } from "../../dist-BEuQPDk_.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The ONE cast-free narrowing of the `device.state-changed` payload. The
3
+ * category is not part of the typed `EventCatalog` — every subscriber validates
4
+ * at the boundary, and until D659 two of them (virtual-doorbell, composer)
5
+ * carried a verbatim copy each. Shared by the builtins, like
6
+ * `./settle-sources.ts`; addons never import each other, and both consumers
7
+ * live in this package.
8
+ */
9
+ /** Narrowed payload of a `DeviceStateChanged` bus event. */
10
+ export interface DeviceStateChangedData {
11
+ readonly deviceId: number;
12
+ readonly capName: string;
13
+ readonly slice: Readonly<Record<string, unknown>>;
14
+ }
15
+ /** Structural narrowing helper for untrusted bus payloads. */
16
+ export declare function isRecord(value: unknown): value is Readonly<Record<string, unknown>>;
17
+ export declare function parseDeviceStateChanged(data: unknown): DeviceStateChangedData | null;
@@ -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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { H as bareAddonId, In as nodePin, Sn as DeviceType, U as batteryCapability, Un as EventCategory, a as BatteryStatusSchema, bn as DeviceFeature, cn as streamQualityLabel, gn as BaseAddon, mn as errMsg, nn as snapshotCapability, tt as deriveBatteryPresence } from "../../dist-DygWCI8k.mjs";
1
+ import { Fn as DeviceFeature, G as batteryCapability, Ln as DeviceType, W as bareAddonId, Zn as nodePin, a as BatteryStatusSchema, ft as deriveBatteryPresence, hn as snapshotCapability, ir as EventCategory, jn as BaseAddon, kn as errMsg, xn as streamQualityLabel } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { gn as BaseAddon, mt as filesystemBrowseCapability, on as storageProviderCapability } from "../../dist-DygWCI8k.mjs";
1
+ import { Et as filesystemBrowseCapability, jn as BaseAddon, yn as storageProviderCapability } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { Dt as legacyModeOf, Ft as mayWriteToLocation, Jt as resolveLocationMode, K as collectSecretConfigKeys, Ln as parseJsonObject, Lt as modeMayWrite, M as StorageLocationModeSchema, N as StorageLocationTypeSchema, P as StorageMigrationJobSchema, Pt as mayReadLocation, Un as EventCategory, _t as gbToBytes, bt as isLocationEnabled, dt as evictionPolicyOfLocation, en as settingsStoreCapability, gn as BaseAddon, in as storageMigrationCapability, j as StorageCleanupJobSchema, pn as withLocationMode, rn as storageCapability, v as LegacyStorageLocationDefaultSchema, w as REDACTED_SECRET } from "../../dist-DygWCI8k.mjs";
1
+ import { Ct as evictionPolicyOfLocation, E as REDACTED_SECRET, F as StorageLocationTypeSchema, I as StorageMigrationJobSchema, Kt as mayReadLocation, Mt as isLocationEnabled, N as StorageCleanupJobSchema, On as withLocationMode, P as StorageLocationModeSchema, Qn as parseJsonObject, Y as collectSecretConfigKeys, Yt as modeMayWrite, _n as storageMigrationCapability, b as LegacyStorageLocationDefaultSchema, gn as storageCapability, ir as EventCategory, jn as BaseAddon, kt as gbToBytes, pn as settingsStoreCapability, qt as mayWriteToLocation, sn as resolveLocationMode, zt as legacyModeOf } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { Nn as hydrateSchema, gn as BaseAddon, mn as errMsg } from "../../dist-DygWCI8k.mjs";
1
+ import { Jn as hydrateSchema, jn as BaseAddon, kn as errMsg } from "../../dist-BEuQPDk_.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-DGhk7Tay.js");
6
+ const require_dist = require("../../dist-BhO9eYKO.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 { gn as BaseAddon, jt as logDestinationCapability } from "../../dist-DygWCI8k.mjs";
1
+ import { Ut as logDestinationCapability, jn as BaseAddon } from "../../dist-BEuQPDk_.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";
@@ -0,0 +1,31 @@
1
+ //#region src/builtins/shared/device-state-changed.ts
2
+ /** Structural narrowing helper for untrusted bus payloads. */
3
+ function isRecord(value) {
4
+ return typeof value === "object" && value !== null && !Array.isArray(value);
5
+ }
6
+ function parseDeviceStateChanged(data) {
7
+ if (!isRecord(data)) return null;
8
+ const deviceId = data["deviceId"];
9
+ const capName = data["capName"];
10
+ const slice = data["slice"];
11
+ if (typeof deviceId !== "number" || typeof capName !== "string") return null;
12
+ if (!isRecord(slice)) return null;
13
+ return {
14
+ deviceId,
15
+ capName,
16
+ slice
17
+ };
18
+ }
19
+ //#endregion
20
+ Object.defineProperty(exports, "isRecord", {
21
+ enumerable: true,
22
+ get: function() {
23
+ return isRecord;
24
+ }
25
+ });
26
+ Object.defineProperty(exports, "parseDeviceStateChanged", {
27
+ enumerable: true,
28
+ get: function() {
29
+ return parseDeviceStateChanged;
30
+ }
31
+ });
@@ -0,0 +1,20 @@
1
+ //#region src/builtins/shared/device-state-changed.ts
2
+ /** Structural narrowing helper for untrusted bus payloads. */
3
+ function isRecord(value) {
4
+ return typeof value === "object" && value !== null && !Array.isArray(value);
5
+ }
6
+ function parseDeviceStateChanged(data) {
7
+ if (!isRecord(data)) return null;
8
+ const deviceId = data["deviceId"];
9
+ const capName = data["capName"];
10
+ const slice = data["slice"];
11
+ if (typeof deviceId !== "number" || typeof capName !== "string") return null;
12
+ if (!isRecord(slice)) return null;
13
+ return {
14
+ deviceId,
15
+ capName,
16
+ slice
17
+ };
18
+ }
19
+ //#endregion
20
+ export { parseDeviceStateChanged as n, isRecord as t };