@camstack/server 1.2.928 → 1.2.929

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 (237) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +10 -8
  3. package/system/dist/addon-id-CVg1_r5E.mjs +39 -0
  4. package/system/dist/addon-id-Di0lNJ89.js +50 -0
  5. package/system/dist/addon-pages.cap-Df9FQwN1.js +49 -0
  6. package/system/dist/addon-pages.cap-DksUlE8j.mjs +44 -0
  7. package/system/dist/addon-settings.cap-3-TIIMq_.mjs +592 -0
  8. package/system/dist/addon-settings.cap-DAiE0Nb0.js +651 -0
  9. package/system/dist/addon-utils.mjs +1 -1
  10. package/system/dist/addon-widgets.cap-C4jxflbF.js +200 -0
  11. package/system/dist/addon-widgets.cap-D9m48X78.mjs +183 -0
  12. package/system/dist/base-addon-DD5dIfcZ.js +4624 -0
  13. package/system/dist/base-addon-Md14i7pe.mjs +4505 -0
  14. package/system/dist/base-device-2sL1DMm1.js +1103 -0
  15. package/system/dist/base-device-IuM1AwXZ.mjs +1098 -0
  16. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +8 -6
  17. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +6 -4
  18. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +8 -6
  19. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +7 -5
  20. package/system/dist/builtins/alerts/alerts.addon.js +113 -56
  21. package/system/dist/builtins/alerts/alerts.addon.mjs +60 -3
  22. package/system/dist/builtins/autotrack/index.js +21 -17
  23. package/system/dist/builtins/autotrack/index.mjs +5 -1
  24. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +14 -11
  25. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +8 -5
  26. package/system/dist/builtins/calendars/calendars.addon.js +8 -6
  27. package/system/dist/builtins/calendars/calendars.addon.mjs +3 -1
  28. package/system/dist/builtins/camera-grid/index.js +615 -58
  29. package/system/dist/builtins/camera-grid/index.mjs +558 -1
  30. package/system/dist/builtins/composer/composer.addon.js +788 -209
  31. package/system/dist/builtins/composer/composer.addon.mjs +583 -4
  32. package/system/dist/builtins/console-logging/index.js +4 -3
  33. package/system/dist/builtins/console-logging/index.mjs +2 -1
  34. package/system/dist/builtins/core-blocks/core-blocks.addon.js +7887 -381
  35. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +7511 -5
  36. package/system/dist/builtins/core-notifier/core-notifier.addon.js +731 -21
  37. package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +711 -1
  38. package/system/dist/builtins/device-history/device-history.addon.js +110 -31
  39. package/system/dist/builtins/device-history/device-history.addon.mjs +81 -2
  40. package/system/dist/builtins/device-manager/device-manager.addon.js +12806 -227
  41. package/system/dist/builtins/device-manager/device-manager.addon.mjs +12583 -5
  42. package/system/dist/builtins/hub-forwarder/index.js +4 -3
  43. package/system/dist/builtins/hub-forwarder/index.mjs +2 -1
  44. package/system/dist/builtins/keychain/index.js +31 -28
  45. package/system/dist/builtins/keychain/index.mjs +7 -4
  46. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +15 -12
  47. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +4 -1
  48. package/system/dist/builtins/local-auth/local-auth.addon.js +140 -39
  49. package/system/dist/builtins/local-auth/local-auth.addon.mjs +106 -6
  50. package/system/dist/builtins/local-network/local-network.addon.js +43 -39
  51. package/system/dist/builtins/local-network/local-network.addon.mjs +7 -3
  52. package/system/dist/builtins/loki-logging/index.js +23 -17
  53. package/system/dist/builtins/loki-logging/index.mjs +7 -1
  54. package/system/dist/builtins/native-metrics/native-metrics.addon.js +156 -15
  55. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +151 -10
  56. package/system/dist/builtins/platform-probe/index.js +25 -23
  57. package/system/dist/builtins/platform-probe/index.mjs +12 -10
  58. package/system/dist/builtins/record-entries/index.js +9 -7
  59. package/system/dist/builtins/record-entries/index.mjs +3 -1
  60. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +4 -4
  61. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  62. package/system/dist/builtins/snapshot/index.js +97 -44
  63. package/system/dist/builtins/snapshot/index.mjs +54 -1
  64. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +5 -4
  65. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +21 -20
  66. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  67. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  68. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +87 -61
  69. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +29 -3
  70. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +81 -72
  71. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +10 -1
  72. package/system/dist/builtins/system-config/system-config.addon.js +17 -14
  73. package/system/dist/builtins/system-config/system-config.addon.mjs +118 -115
  74. package/system/dist/builtins/winston-logging/index.js +7 -5
  75. package/system/dist/builtins/winston-logging/index.mjs +3 -1
  76. package/system/dist/calendars.cap-CaFlShS9.js +155 -0
  77. package/system/dist/calendars.cap-_C4eD4fi.mjs +138 -0
  78. package/system/dist/camstack-error-DJ-TUAi1.js +23 -0
  79. package/system/dist/camstack-error-viZYfcj9.mjs +18 -0
  80. package/system/dist/cap-call-context-Bd76CbOW.js +95 -0
  81. package/system/dist/cap-call-context-DNwdgGSQ.mjs +78 -0
  82. package/system/dist/capability-definition-C2rJdVeX.mjs +177 -0
  83. package/system/dist/capability-definition-HCmTem8c.js +242 -0
  84. package/system/dist/{capture-engine-BcuwOSXv.js → capture-engine-DZ0LIUqA.js} +5 -4
  85. package/system/dist/{capture-engine-Bz7eXFjT.mjs → capture-engine-DiwbjoWp.mjs} +2 -1
  86. package/system/dist/command-origin-claim-Cief660O.js +35 -0
  87. package/system/dist/command-origin-claim-D1Wy7Qld.mjs +24 -0
  88. package/system/dist/composition-sources-Caqv7O7z.mjs +391 -0
  89. package/system/dist/composition-sources-CgnHjm8Q.js +408 -0
  90. package/system/dist/{constants-D2etJ02O.js → constants-Ba3FTIHl.js} +1 -1
  91. package/system/dist/constants-C860Y6U4.js +26 -0
  92. package/system/dist/{constants-BcUTQd1M.mjs → constants-DB4piTD5.mjs} +1 -1
  93. package/system/dist/constants-DCLpoF4L.mjs +21 -0
  94. package/system/dist/coral-accelerators-7o8hqvcN.js +564 -0
  95. package/system/dist/coral-accelerators-BKcXP59c.mjs +521 -0
  96. package/system/dist/core-blocks.cap-C6iKAZ-x.mjs +17986 -0
  97. package/system/dist/core-blocks.cap-LEMqVwxO.js +18705 -0
  98. package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
  99. package/system/dist/custom-actions-BFUSalC9.mjs +25 -0
  100. package/system/dist/custom-actions-D92NRi2c.js +36 -0
  101. package/system/dist/database-snapshot.cap-DF38e-0P.js +162 -0
  102. package/system/dist/database-snapshot.cap-dhrc9xnY.mjs +133 -0
  103. package/system/dist/declared-device-BWphj9WE.js +303 -0
  104. package/system/dist/declared-device-CKERA1Hi.mjs +286 -0
  105. package/system/dist/{device-ca-ExMN3xW3.mjs → device-ca-BLM6fccc.mjs} +2 -1
  106. package/system/dist/{device-ca-CU8zh9Pi.js → device-ca-C5kJE6mL.js} +7 -6
  107. package/system/dist/device-certificate-Cddm4Idn.mjs +91 -0
  108. package/system/dist/device-certificate-CguVACQO.js +162 -0
  109. package/system/dist/device-identifiers-BQg9EQi1.js +600 -0
  110. package/system/dist/device-identifiers-iSuQCKmK.mjs +529 -0
  111. package/system/dist/device-kind-BJ2pfsjw.mjs +78 -0
  112. package/system/dist/device-kind-CsSiv_YF.js +101 -0
  113. package/system/dist/device-manager.cap-2abwVLCM.js +2874 -0
  114. package/system/dist/device-manager.cap-CFZSPfUh.mjs +2749 -0
  115. package/system/dist/device-provider.cap-3Uvk6f5-.mjs +331 -0
  116. package/system/dist/device-provider.cap-D7TV2kVH.js +366 -0
  117. package/system/dist/{device-row-store-CeW_GWh9.mjs → device-row-store-YF3jtmkk.mjs} +4 -1
  118. package/system/dist/{device-row-store-BMIR-n3m.js → device-row-store-doTfMOqn.js} +12 -9
  119. package/system/dist/device-transitions.cap-B5w5PYU_.js +860 -0
  120. package/system/dist/device-transitions.cap-DojcwEuX.mjs +819 -0
  121. package/system/dist/device-type-CbQsnFdC.js +477 -0
  122. package/system/dist/device-type-DgEvK3ch.mjs +454 -0
  123. package/system/dist/entry-kind-D9MuVJCK.mjs +44 -0
  124. package/system/dist/entry-kind-cq90c--V.js +55 -0
  125. package/system/dist/error.cap-CSM_SRfR.mjs +3423 -0
  126. package/system/dist/error.cap-DBhgPeWK.js +3848 -0
  127. package/system/dist/file-host-worker.js +1 -1
  128. package/system/dist/file-host-worker.mjs +1 -1
  129. package/system/dist/history-catalog-BKRarIL_.js +831 -0
  130. package/system/dist/history-catalog-BwTeQ4Mr.mjs +802 -0
  131. package/system/dist/{hub-identity-Csxx2Q8k.js → hub-identity-BMdR3Mw9.js} +2 -2
  132. package/system/dist/{hub-identity-CYC1820R.mjs → hub-identity-DjMN9Ac2.mjs} +10 -10
  133. package/system/dist/{hub-mdns-ciao-By5577HM.js → hub-mdns-ciao--0v1TKME.js} +5 -5
  134. package/system/dist/{hub-mdns-ciao-CCDxM5qz.mjs → hub-mdns-ciao-DBrtHOcc.mjs} +2 -2
  135. package/system/dist/index.js +763 -151
  136. package/system/dist/index.mjs +832 -220
  137. package/system/dist/integration-instances.cap-Cl9O-k4h.mjs +538 -0
  138. package/system/dist/integration-instances.cap-dJIxg2_s.js +549 -0
  139. package/system/dist/keychain-admin.cap-Db_oFX4H.js +425 -0
  140. package/system/dist/keychain-admin.cap-GtM7gVGG.mjs +396 -0
  141. package/system/dist/l10n-Bu6aUvSY.mjs +10 -0
  142. package/system/dist/l10n-CGMvp7NF.js +15 -0
  143. package/system/dist/labels-DX5S8deC.js +81 -0
  144. package/system/dist/labels-DsBcU7md.mjs +64 -0
  145. package/system/dist/{legacy-integration-rows-door-CVwOo5aq.js → legacy-integration-rows-door-B1nzxxr5.js} +2 -2
  146. package/system/dist/{legacy-integration-rows-door-D9tQOUzh.mjs → legacy-integration-rows-door-nTvo_6jQ.mjs} +1 -1
  147. package/system/dist/log-destination.cap-CxZzAVaR.mjs +143 -0
  148. package/system/dist/log-destination.cap-DELPJkZ0.js +148 -0
  149. package/system/dist/low-power-sleep.cap-7lfVU41N.js +103 -0
  150. package/system/dist/low-power-sleep.cap-tGPmaZ_V.mjs +92 -0
  151. package/system/dist/mask-shape-Ci8Co9w0.mjs +57 -0
  152. package/system/dist/mask-shape-CmPA2fst.js +92 -0
  153. package/system/dist/metrics-provider.cap-BNmcHDkQ.mjs +405 -0
  154. package/system/dist/metrics-provider.cap-BcmQUt6l.js +410 -0
  155. package/system/dist/migration-BMjgkyG2.js +380 -0
  156. package/system/dist/migration-DRJAtdy7.mjs +321 -0
  157. package/system/dist/network-access.cap-B5TWLDCC.js +1099 -0
  158. package/system/dist/network-access.cap-BJnGbE6n.mjs +1004 -0
  159. package/system/dist/notification-rules.cap-B__YBgnG.js +3422 -0
  160. package/system/dist/notification-rules.cap-D9ArZlwx.mjs +3357 -0
  161. package/system/dist/ops-log-CB4pIdqi.mjs +64 -0
  162. package/system/dist/ops-log-pxt9176Z.js +81 -0
  163. package/system/dist/pinned-binary-BOhOSNff.js +28 -0
  164. package/system/dist/pinned-binary-CrIRAi4G.mjs +23 -0
  165. package/system/dist/platform-probe.cap-1WrMhWHx.js +250 -0
  166. package/system/dist/platform-probe.cap-BFeqFLtQ.mjs +233 -0
  167. package/system/dist/prefix-walk-B4b2-9aK.mjs +790 -0
  168. package/system/dist/prefix-walk-DC0ljmbB.js +843 -0
  169. package/system/dist/ptz-autotrack.cap-BW7w0zHD.js +229 -0
  170. package/system/dist/ptz-autotrack.cap-DT2GypXw.mjs +224 -0
  171. package/system/dist/quantity-D3g5SxsZ.mjs +114 -0
  172. package/system/dist/quantity-lY1KiTSZ.js +143 -0
  173. package/system/dist/raw-secret-migration-DxuBFtvi.js +50 -0
  174. package/system/dist/raw-secret-migration-iv88mLoc.mjs +39 -0
  175. package/system/dist/record-entries.cap-sMUhTvTU.mjs +75 -0
  176. package/system/dist/record-entries.cap-ti1C046R.js +80 -0
  177. package/system/dist/record-kind-DoBfYHCs.js +203 -0
  178. package/system/dist/record-kind-ub6NXqfh.mjs +162 -0
  179. package/system/dist/recording-archive.cap-7OrIn9e5.mjs +1299 -0
  180. package/system/dist/recording-archive.cap-D7bo-QSM.js +1328 -0
  181. package/system/dist/records.cap-ClcWV64i.js +329 -0
  182. package/system/dist/records.cap-CwLT2ByG.mjs +294 -0
  183. package/system/dist/relocate-CdVQAk-w.js +804 -0
  184. package/system/dist/relocate-CoZZTui1.mjs +661 -0
  185. package/system/dist/rename-composition-block-7WIICIDq.mjs +33525 -0
  186. package/system/dist/rename-composition-block-CcWLwVhG.js +34692 -0
  187. package/system/dist/{restore-archive-BJfyu0sG.mjs → restore-archive-CjAyKpgX.mjs} +96 -94
  188. package/system/dist/{restore-archive-CIFvqOze.js → restore-archive-CkTkv3Ss.js} +6 -4
  189. package/system/dist/scoped-settings-CylSSq_8.js +955 -0
  190. package/system/dist/scoped-settings-DVWUIP7Z.mjs +650 -0
  191. package/system/dist/server-name-BIhLuHvX.mjs +35 -0
  192. package/system/dist/server-name-OALNvpqC.js +52 -0
  193. package/system/dist/settings-store.cap-Ci4F2zul.mjs +569 -0
  194. package/system/dist/settings-store.cap-wlJhCspr.js +640 -0
  195. package/system/dist/snapshot.cap-3suPdBHV.js +250 -0
  196. package/system/dist/snapshot.cap-Bs8Oyaqh.mjs +245 -0
  197. package/system/dist/source-info-DGB7SdB_.mjs +190 -0
  198. package/system/dist/source-info-DtWf4k2j.js +225 -0
  199. package/system/dist/storage-admin.cap-BSv1NjKJ.mjs +883 -0
  200. package/system/dist/storage-admin.cap-he0OqvVM.js +906 -0
  201. package/system/dist/storage-location-CBT8GCD6.mjs +163 -0
  202. package/system/dist/storage-location-CTweDMZf.js +198 -0
  203. package/system/dist/storage-location-mode-B21UVRRX.mjs +167 -0
  204. package/system/dist/storage-location-mode-CS4sMzo-.js +232 -0
  205. package/system/dist/storage-migration.cap-CyyATY_p.js +330 -0
  206. package/system/dist/storage-migration.cap-D7QqGobp.mjs +313 -0
  207. package/system/dist/storage-occupancy.cap-2rmnS58Z.js +622 -0
  208. package/system/dist/storage-occupancy.cap-CqBztTl9.mjs +611 -0
  209. package/system/dist/storage-provider.cap-Bw0CfxVc.js +213 -0
  210. package/system/dist/storage-provider.cap-CMeck2w4.mjs +202 -0
  211. package/system/dist/stream-catalog.cap-Bp7SkgIf.mjs +6560 -0
  212. package/system/dist/stream-catalog.cap-D3uwePiA.js +6763 -0
  213. package/system/dist/streaming-shared-B8cXatuU.mjs +431 -0
  214. package/system/dist/streaming-shared-DQwFZOSi.js +526 -0
  215. package/system/dist/system-reasons-Be_k1W8g.js +25 -0
  216. package/system/dist/system-reasons-CYj4qwyS.mjs +20 -0
  217. package/system/dist/tag-BxLazvVb.js +2138 -0
  218. package/system/dist/tag-uZBAq6ox.mjs +2073 -0
  219. package/system/dist/user-management.cap-B9QDu8NE.js +825 -0
  220. package/system/dist/user-management.cap-DBIi77sB.mjs +766 -0
  221. package/system/dist/vector-store.cap-DnyfrYDn.js +330 -0
  222. package/system/dist/vector-store.cap-h2GHWQ1t.mjs +319 -0
  223. package/system/dist/{wal-maintenance-CTrCPzds.mjs → wal-maintenance-BG01rOn9.mjs} +0 -0
  224. package/system/dist/{wal-maintenance-dq7T3quB.js → wal-maintenance-DyrebYKF.js} +0 -0
  225. package/system/dist/zod-secret-DS7mj1bk.js +78 -0
  226. package/system/dist/zod-secret-zY4nM61M.mjs +73 -0
  227. package/system/package.json +1 -1
  228. package/system/dist/composition-sources-BI614LJx.mjs +0 -141
  229. package/system/dist/composition-sources-v_kkb8A9.js +0 -152
  230. package/system/dist/coral-accelerators-BSVsBVzt.js +0 -250
  231. package/system/dist/coral-accelerators-BW3OcrLD.mjs +0 -231
  232. package/system/dist/dist-BCHMSqzc.mjs +0 -143467
  233. package/system/dist/dist-BZfvhfS1.js +0 -146970
  234. package/system/dist/prefix-walk-DAOBSyH1.mjs +0 -88
  235. package/system/dist/prefix-walk-Dv6MLZlM.js +0 -99
  236. package/system/dist/rename-composition-block-C9HuBrKS.js +0 -112
  237. package/system/dist/rename-composition-block-DtaYmYAR.mjs +0 -101
@@ -0,0 +1,651 @@
1
+ const require_scoped_settings = require("./scoped-settings-CylSSq_8.js");
2
+ const require_capability_definition = require("./capability-definition-HCmTem8c.js");
3
+ const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
4
+ const require_tag = require("./tag-BxLazvVb.js");
5
+ let zod = require("zod");
6
+ //#region ../types/dist/esm/device/location-icon.mjs
7
+ /**
8
+ * One (location, icon) assignment as it travels.
9
+ *
10
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
11
+ * operator's casing. The registry matches labels trimmed + case-insensitively
12
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13
+ * case-only rename (`kitchen` → `Kitchen`) is a real edit this repo supports; a
14
+ * map keyed on the displayed casing would orphan its entry on exactly that
15
+ * edit. Consumers join by keying their own label through `locationIconKey`.
16
+ */
17
+ var LocationIconAssignmentSchema = /* @__PURE__ */ zod.z.object({
18
+ locationKey: /* @__PURE__ */ zod.z.string(),
19
+ icon: require_tag.IconKeySchema
20
+ });
21
+ /**
22
+ * The join key for a location label: trimmed, lower-cased. The ONE place this
23
+ * derivation lives — a caller that re-spells it is a rename away from an
24
+ * orphaned icon.
25
+ */
26
+ function locationIconKey(label) {
27
+ return label.trim().toLowerCase();
28
+ }
29
+ /**
30
+ * One (location, description) assignment as it travels.
31
+ *
32
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
33
+ * reason: this lived for a while in the post-analysis addon's own settings,
34
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
35
+ * the Locations page carried the icon and silently orphaned the description —
36
+ * two authorities for one thing, joined by two different rules. Now both hang
37
+ * off the location itself, on `locationIconKey`.
38
+ */
39
+ var LocationDescriptionAssignmentSchema = /* @__PURE__ */ zod.z.object({
40
+ locationKey: /* @__PURE__ */ zod.z.string(),
41
+ description: /* @__PURE__ */ zod.z.string()
42
+ });
43
+ //#endregion
44
+ //#region ../types/dist/esm/units/unit-table.mjs
45
+ /**
46
+ * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
47
+ * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
48
+ * `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
49
+ * decimals). K derives from `°C = K − 273.15`.
50
+ */
51
+ var UNIT_TABLE = {
52
+ "°C": {
53
+ dimension: "temperature",
54
+ factor: 1,
55
+ offset: 0
56
+ },
57
+ "°F": {
58
+ dimension: "temperature",
59
+ factor: 5 / 9,
60
+ offset: -160 / 9
61
+ },
62
+ K: {
63
+ dimension: "temperature",
64
+ factor: 1,
65
+ offset: -273.15
66
+ },
67
+ hPa: {
68
+ dimension: "pressure",
69
+ factor: 1,
70
+ offset: 0
71
+ },
72
+ kPa: {
73
+ dimension: "pressure",
74
+ factor: 10,
75
+ offset: 0
76
+ },
77
+ Pa: {
78
+ dimension: "pressure",
79
+ factor: .01,
80
+ offset: 0
81
+ },
82
+ mbar: {
83
+ dimension: "pressure",
84
+ factor: 1,
85
+ offset: 0
86
+ },
87
+ bar: {
88
+ dimension: "pressure",
89
+ factor: 1e3,
90
+ offset: 0
91
+ },
92
+ inHg: {
93
+ dimension: "pressure",
94
+ factor: 33.8639,
95
+ offset: 0
96
+ },
97
+ mmHg: {
98
+ dimension: "pressure",
99
+ factor: 1.33322,
100
+ offset: 0
101
+ },
102
+ psi: {
103
+ dimension: "pressure",
104
+ factor: 68.9476,
105
+ offset: 0
106
+ },
107
+ "m/s": {
108
+ dimension: "speed",
109
+ factor: 1,
110
+ offset: 0
111
+ },
112
+ "km/h": {
113
+ dimension: "speed",
114
+ factor: 1 / 3.6,
115
+ offset: 0
116
+ },
117
+ mph: {
118
+ dimension: "speed",
119
+ factor: .44704,
120
+ offset: 0
121
+ },
122
+ kn: {
123
+ dimension: "speed",
124
+ factor: .514444,
125
+ offset: 0
126
+ },
127
+ "mm/h": {
128
+ dimension: "precipitation-rate",
129
+ factor: 1,
130
+ offset: 0
131
+ },
132
+ "in/h": {
133
+ dimension: "precipitation-rate",
134
+ factor: 25.4,
135
+ offset: 0
136
+ },
137
+ m: {
138
+ dimension: "length",
139
+ factor: 1,
140
+ offset: 0
141
+ },
142
+ mm: {
143
+ dimension: "length",
144
+ factor: .001,
145
+ offset: 0
146
+ },
147
+ cm: {
148
+ dimension: "length",
149
+ factor: .01,
150
+ offset: 0
151
+ },
152
+ km: {
153
+ dimension: "length",
154
+ factor: 1e3,
155
+ offset: 0
156
+ },
157
+ in: {
158
+ dimension: "length",
159
+ factor: .0254,
160
+ offset: 0
161
+ },
162
+ ft: {
163
+ dimension: "length",
164
+ factor: .3048,
165
+ offset: 0
166
+ },
167
+ mi: {
168
+ dimension: "length",
169
+ factor: 1609.344,
170
+ offset: 0
171
+ },
172
+ "m²": {
173
+ dimension: "area",
174
+ factor: 1,
175
+ offset: 0
176
+ },
177
+ lx: {
178
+ dimension: "illuminance",
179
+ factor: 1,
180
+ offset: 0
181
+ },
182
+ "W/m²": {
183
+ dimension: "irradiance",
184
+ factor: 1,
185
+ offset: 0
186
+ },
187
+ W: {
188
+ dimension: "power",
189
+ factor: 1,
190
+ offset: 0
191
+ },
192
+ kW: {
193
+ dimension: "power",
194
+ factor: 1e3,
195
+ offset: 0
196
+ },
197
+ VA: {
198
+ dimension: "apparent-power",
199
+ factor: 1,
200
+ offset: 0
201
+ },
202
+ Wh: {
203
+ dimension: "energy",
204
+ factor: 1,
205
+ offset: 0
206
+ },
207
+ kWh: {
208
+ dimension: "energy",
209
+ factor: 1e3,
210
+ offset: 0
211
+ },
212
+ MWh: {
213
+ dimension: "energy",
214
+ factor: 1e6,
215
+ offset: 0
216
+ },
217
+ V: {
218
+ dimension: "voltage",
219
+ factor: 1,
220
+ offset: 0
221
+ },
222
+ mV: {
223
+ dimension: "voltage",
224
+ factor: .001,
225
+ offset: 0
226
+ },
227
+ A: {
228
+ dimension: "current",
229
+ factor: 1,
230
+ offset: 0
231
+ },
232
+ mA: {
233
+ dimension: "current",
234
+ factor: .001,
235
+ offset: 0
236
+ },
237
+ ppm: {
238
+ dimension: "concentration-volume",
239
+ factor: 1,
240
+ offset: 0
241
+ },
242
+ ppb: {
243
+ dimension: "concentration-volume",
244
+ factor: .001,
245
+ offset: 0
246
+ },
247
+ "µg/m³": {
248
+ dimension: "concentration-mass",
249
+ factor: 1,
250
+ offset: 0
251
+ },
252
+ "mg/m³": {
253
+ dimension: "concentration-mass",
254
+ factor: 1e3,
255
+ offset: 0
256
+ },
257
+ kg: {
258
+ dimension: "mass",
259
+ factor: 1,
260
+ offset: 0
261
+ },
262
+ g: {
263
+ dimension: "mass",
264
+ factor: .001,
265
+ offset: 0
266
+ },
267
+ lb: {
268
+ dimension: "mass",
269
+ factor: .453592,
270
+ offset: 0
271
+ },
272
+ oz: {
273
+ dimension: "mass",
274
+ factor: .0283495,
275
+ offset: 0
276
+ },
277
+ "%": {
278
+ dimension: "percentage",
279
+ factor: 1,
280
+ offset: 0
281
+ },
282
+ L: {
283
+ dimension: "volume",
284
+ factor: 1,
285
+ offset: 0
286
+ },
287
+ mL: {
288
+ dimension: "volume",
289
+ factor: .001,
290
+ offset: 0
291
+ },
292
+ gal: {
293
+ dimension: "volume",
294
+ factor: 3.785411784,
295
+ offset: 0
296
+ },
297
+ s: {
298
+ dimension: "duration",
299
+ factor: 1,
300
+ offset: 0
301
+ },
302
+ ms: {
303
+ dimension: "duration",
304
+ factor: .001,
305
+ offset: 0
306
+ },
307
+ min: {
308
+ dimension: "duration",
309
+ factor: 60,
310
+ offset: 0
311
+ },
312
+ h: {
313
+ dimension: "duration",
314
+ factor: 3600,
315
+ offset: 0
316
+ },
317
+ d: {
318
+ dimension: "duration",
319
+ factor: 86400,
320
+ offset: 0
321
+ },
322
+ B: {
323
+ dimension: "information",
324
+ factor: 1,
325
+ offset: 0
326
+ },
327
+ KiB: {
328
+ dimension: "information",
329
+ factor: 1024,
330
+ offset: 0
331
+ },
332
+ MiB: {
333
+ dimension: "information",
334
+ factor: 1024 ** 2,
335
+ offset: 0
336
+ },
337
+ GiB: {
338
+ dimension: "information",
339
+ factor: 1024 ** 3,
340
+ offset: 0
341
+ },
342
+ TiB: {
343
+ dimension: "information",
344
+ factor: 1024 ** 4,
345
+ offset: 0
346
+ },
347
+ kB: {
348
+ dimension: "information",
349
+ factor: 1e3,
350
+ offset: 0
351
+ },
352
+ MB: {
353
+ dimension: "information",
354
+ factor: 1e6,
355
+ offset: 0
356
+ },
357
+ GB: {
358
+ dimension: "information",
359
+ factor: 1e9,
360
+ offset: 0
361
+ },
362
+ "°": {
363
+ dimension: "angle",
364
+ factor: 1,
365
+ offset: 0
366
+ },
367
+ dBFS: {
368
+ dimension: "sound-level",
369
+ factor: 1,
370
+ offset: 0
371
+ },
372
+ dBm: {
373
+ dimension: "signal-level",
374
+ factor: 1,
375
+ offset: 0
376
+ },
377
+ dB: {
378
+ dimension: "signal-ratio",
379
+ factor: 1,
380
+ offset: 0
381
+ },
382
+ Hz: {
383
+ dimension: "frequency",
384
+ factor: 1,
385
+ offset: 0
386
+ },
387
+ kHz: {
388
+ dimension: "frequency",
389
+ factor: 1e3,
390
+ offset: 0
391
+ },
392
+ mired: {
393
+ dimension: "colour-temperature",
394
+ factor: 1,
395
+ offset: 0
396
+ },
397
+ kbps: {
398
+ dimension: "bitrate",
399
+ factor: 1,
400
+ offset: 0
401
+ },
402
+ Mbps: {
403
+ dimension: "bitrate",
404
+ factor: 1e3,
405
+ offset: 0
406
+ },
407
+ fps: {
408
+ dimension: "rate",
409
+ factor: 1,
410
+ offset: 0
411
+ }
412
+ };
413
+ //#endregion
414
+ //#region ../types/dist/esm/units/convert.mjs
415
+ /** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
416
+ function specFor(unit) {
417
+ return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
418
+ }
419
+ /** The dimension a unit belongs to, or `undefined` for an unknown unit. */
420
+ function unitDimension(unit) {
421
+ return specFor(unit)?.dimension;
422
+ }
423
+ /** Value in `spec`'s unit → its dimension's canonical unit. */
424
+ function toCanonical(value, spec) {
425
+ return value * spec.factor + spec.offset;
426
+ }
427
+ /** Canonical-unit value → the unit described by `spec`. */
428
+ function fromCanonical(canonical, spec) {
429
+ return (canonical - spec.offset) / spec.factor;
430
+ }
431
+ /**
432
+ * Graceful variant for the render path: returns the converted value, or
433
+ * `undefined` when the conversion is refused (unknown unit / cross-dimension).
434
+ * Never throws — a render caller falls back to the raw value + source unit.
435
+ */
436
+ function tryConvertUnit(value, from, to) {
437
+ if (from === to) return value;
438
+ const fromSpec = specFor(from);
439
+ if (!fromSpec) return void 0;
440
+ const toSpec = specFor(to);
441
+ if (!toSpec) return void 0;
442
+ if (fromSpec.dimension !== toSpec.dimension) return void 0;
443
+ return fromCanonical(toCanonical(value, fromSpec), toSpec);
444
+ }
445
+ function unitsForDimension(dimension) {
446
+ const out = [];
447
+ for (const [unit, spec] of Object.entries(UNIT_TABLE)) if (spec.dimension === dimension) out.push(unit);
448
+ return out;
449
+ }
450
+ //#endregion
451
+ //#region ../types/dist/esm/capabilities/addon-settings.cap.mjs
452
+ var ConfigTabDeclarationSchema = /* @__PURE__ */ zod.z.object({
453
+ id: /* @__PURE__ */ zod.z.string(),
454
+ label: /* @__PURE__ */ zod.z.string(),
455
+ icon: /* @__PURE__ */ zod.z.string(),
456
+ order: /* @__PURE__ */ zod.z.number().optional()
457
+ });
458
+ var ConfigSectionWithValuesSchema = /* @__PURE__ */ zod.z.object({
459
+ id: /* @__PURE__ */ zod.z.string(),
460
+ title: /* @__PURE__ */ zod.z.string(),
461
+ titleKey: /* @__PURE__ */ zod.z.string().optional(),
462
+ description: /* @__PURE__ */ zod.z.string().optional(),
463
+ descriptionKey: /* @__PURE__ */ zod.z.string().optional(),
464
+ style: /* @__PURE__ */ zod.z.enum(["card", "accordion"]).optional(),
465
+ defaultCollapsed: /* @__PURE__ */ zod.z.boolean().optional(),
466
+ columns: /* @__PURE__ */ zod.z.union([
467
+ /* @__PURE__ */ zod.z.literal(1),
468
+ /* @__PURE__ */ zod.z.literal(2),
469
+ /* @__PURE__ */ zod.z.literal(3),
470
+ /* @__PURE__ */ zod.z.literal(4)
471
+ ]).optional(),
472
+ tab: /* @__PURE__ */ zod.z.string().optional(),
473
+ location: /* @__PURE__ */ zod.z.enum([
474
+ "settings",
475
+ "top-tab",
476
+ "hero"
477
+ ]).optional(),
478
+ order: /* @__PURE__ */ zod.z.number().optional(),
479
+ fields: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.any())
480
+ });
481
+ var SettingsSchemaWithValuesSchema = /* @__PURE__ */ zod.z.object({
482
+ tabs: /* @__PURE__ */ zod.z.array(ConfigTabDeclarationSchema).optional(),
483
+ sections: /* @__PURE__ */ zod.z.array(ConfigSectionWithValuesSchema)
484
+ });
485
+ /** Patch object — keys are field names, values are the new field values. */
486
+ var SettingsPatchSchema = /* @__PURE__ */ zod.z.record(/* @__PURE__ */ zod.z.string(), /* @__PURE__ */ zod.z.unknown());
487
+ /** The scope of a scoped-settings call (D986): where the capability declared the values. */
488
+ var ScopedSettingsScopeSchema = /* @__PURE__ */ zod.z.enum(require_scoped_settings.SCOPED_SETTINGS_SCOPES);
489
+ /** One scoped schema an addon serves: its capability, scope and section ids. */
490
+ var ScopedSettingsDeclarationSchema = /* @__PURE__ */ zod.z.object({
491
+ cap: /* @__PURE__ */ zod.z.string(),
492
+ scope: ScopedSettingsScopeSchema,
493
+ sectionIds: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string())
494
+ });
495
+ /** Standard success response for update operations. */
496
+ var SettingsUpdateResultSchema = /* @__PURE__ */ zod.z.object({ success: /* @__PURE__ */ zod.z.literal(true) });
497
+ /**
498
+ * addon-settings — singleton gateway for three-level addon settings.
499
+ *
500
+ * Works like `device-manager`: a single hub-side provider that resolves
501
+ * `addonId` to the target addon and delegates the call. For hub-local
502
+ * addons the call is direct; for remote agents it proxies via the
503
+ * per-addon Moleculer service.
504
+ *
505
+ * Replaces the `$addonHost` Moleculer service. Transport transparency
506
+ * is handled by the provider implementation — callers (admin UI, other
507
+ * addons via `ctx.api`) never know which node hosts the target addon.
508
+ *
509
+ * Three levels:
510
+ * - **addon**: addon-scoped settings (installation config, API keys, …)
511
+ * - **global**: settings applied to all devices by default
512
+ * - **device**: per-device overrides
513
+ *
514
+ * Optional `nodeId` allows explicit node targeting. When absent the
515
+ * provider resolves the addon's host node automatically.
516
+ */
517
+ /**
518
+ * `addon-settings` is a **hub-centric** cap: the hub hosts the single
519
+ * provider, and `nodeId` in the input is data for the hub provider's
520
+ * internal dispatcher, not a routing hint for the cap-router. See
521
+ * `CapabilityDefinition.nodeIdMode` for the contract.
522
+ */
523
+ var addonSettingsCapability = {
524
+ name: "addon-settings",
525
+ scope: "system",
526
+ mode: "singleton",
527
+ nodeIdMode: "data",
528
+ methods: {
529
+ getScopedSettings: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
530
+ addonId: /* @__PURE__ */ zod.z.string(),
531
+ cap: /* @__PURE__ */ zod.z.string(),
532
+ scope: ScopedSettingsScopeSchema,
533
+ nodeId: /* @__PURE__ */ zod.z.string().optional()
534
+ }), /* @__PURE__ */ SettingsSchemaWithValuesSchema.nullable()),
535
+ listScopedSettings: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
536
+ addonId: /* @__PURE__ */ zod.z.string(),
537
+ nodeId: /* @__PURE__ */ zod.z.string().optional()
538
+ }), /* @__PURE__ */ zod.z.array(ScopedSettingsDeclarationSchema).nullable()),
539
+ updateScopedSettings: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
540
+ addonId: /* @__PURE__ */ zod.z.string(),
541
+ cap: /* @__PURE__ */ zod.z.string(),
542
+ scope: ScopedSettingsScopeSchema,
543
+ nodeId: /* @__PURE__ */ zod.z.string().optional(),
544
+ patch: SettingsPatchSchema
545
+ }), SettingsUpdateResultSchema, {
546
+ kind: "mutation",
547
+ auth: "admin"
548
+ }),
549
+ readScopedValues: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
550
+ addonId: /* @__PURE__ */ zod.z.string(),
551
+ cap: /* @__PURE__ */ zod.z.string(),
552
+ scope: ScopedSettingsScopeSchema,
553
+ nodeId: /* @__PURE__ */ zod.z.string().optional()
554
+ }), /* @__PURE__ */ zod.z.record(/* @__PURE__ */ zod.z.string(), /* @__PURE__ */ zod.z.unknown()).nullable()),
555
+ getDeclaredSettingsKeys: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
556
+ addonId: /* @__PURE__ */ zod.z.string(),
557
+ nodeId: /* @__PURE__ */ zod.z.string().optional()
558
+ }), /* @__PURE__ */ zod.z.object({ keys: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()) }).nullable(), { auth: "admin" }),
559
+ unsetStoredSettingsKeys: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
560
+ addonId: /* @__PURE__ */ zod.z.string(),
561
+ nodeId: /* @__PURE__ */ zod.z.string().optional(),
562
+ keys: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string())
563
+ }), /* @__PURE__ */ zod.z.object({
564
+ removed: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()),
565
+ refused: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.object({
566
+ key: /* @__PURE__ */ zod.z.string(),
567
+ reason: /* @__PURE__ */ zod.z.string()
568
+ })),
569
+ secretsCleared: /* @__PURE__ */ zod.z.number()
570
+ }), {
571
+ kind: "mutation",
572
+ auth: "admin"
573
+ }),
574
+ getDeviceSettings: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
575
+ addonId: /* @__PURE__ */ zod.z.string(),
576
+ deviceId: /* @__PURE__ */ zod.z.number(),
577
+ nodeId: /* @__PURE__ */ zod.z.string().optional()
578
+ }), /* @__PURE__ */ SettingsSchemaWithValuesSchema.nullable()),
579
+ updateDeviceSettings: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({
580
+ addonId: /* @__PURE__ */ zod.z.string(),
581
+ deviceId: /* @__PURE__ */ zod.z.number(),
582
+ nodeId: /* @__PURE__ */ zod.z.string().optional(),
583
+ patch: SettingsPatchSchema
584
+ }), SettingsUpdateResultSchema, {
585
+ kind: "mutation",
586
+ auth: "admin"
587
+ })
588
+ },
589
+ vocabulary: { notOperatorFacing: require_system_reasons.NOT_A_DEVICE.ADDON_ADMIN }
590
+ };
591
+ //#endregion
592
+ Object.defineProperty(exports, "LocationDescriptionAssignmentSchema", {
593
+ enumerable: true,
594
+ get: function() {
595
+ return LocationDescriptionAssignmentSchema;
596
+ }
597
+ });
598
+ Object.defineProperty(exports, "LocationIconAssignmentSchema", {
599
+ enumerable: true,
600
+ get: function() {
601
+ return LocationIconAssignmentSchema;
602
+ }
603
+ });
604
+ Object.defineProperty(exports, "SettingsPatchSchema", {
605
+ enumerable: true,
606
+ get: function() {
607
+ return SettingsPatchSchema;
608
+ }
609
+ });
610
+ Object.defineProperty(exports, "SettingsSchemaWithValuesSchema", {
611
+ enumerable: true,
612
+ get: function() {
613
+ return SettingsSchemaWithValuesSchema;
614
+ }
615
+ });
616
+ Object.defineProperty(exports, "SettingsUpdateResultSchema", {
617
+ enumerable: true,
618
+ get: function() {
619
+ return SettingsUpdateResultSchema;
620
+ }
621
+ });
622
+ Object.defineProperty(exports, "addonSettingsCapability", {
623
+ enumerable: true,
624
+ get: function() {
625
+ return addonSettingsCapability;
626
+ }
627
+ });
628
+ Object.defineProperty(exports, "locationIconKey", {
629
+ enumerable: true,
630
+ get: function() {
631
+ return locationIconKey;
632
+ }
633
+ });
634
+ Object.defineProperty(exports, "tryConvertUnit", {
635
+ enumerable: true,
636
+ get: function() {
637
+ return tryConvertUnit;
638
+ }
639
+ });
640
+ Object.defineProperty(exports, "unitDimension", {
641
+ enumerable: true,
642
+ get: function() {
643
+ return unitDimension;
644
+ }
645
+ });
646
+ Object.defineProperty(exports, "unitsForDimension", {
647
+ enumerable: true,
648
+ get: function() {
649
+ return unitsForDimension;
650
+ }
651
+ });
@@ -1,4 +1,4 @@
1
1
  import { n as readCurrentCommandOrigin } from "./cap-call-scope-Bic6Ekfw.mjs";
2
- import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-N7flBDwT.mjs";
2
+ import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-B9zFBNVa.mjs";
3
3
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg, t as COURTESY_DEFAULT_WIDTH } from "./snapshot-courtesy-CyFs1M3I.mjs";
4
4
  export { COURTESY_DEFAULT_WIDTH, CustomActionRegistry, ModelDownloadHttpError, ModelDownloadService, STALL_REPORT_MS, STALL_TICK_MS, adoptModelRevisions, attributeStall, collectModelFiles, contentTypeFor, courtesyCacheKey, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloadHttpError, isModelDownloaded, parseRangeHeader, readCurrentCommandOrigin, renderCourtesyJpeg, renderCourtesyOverlayJpeg, resolveFormatRevision, startEventLoopStallMonitor };