@camstack/server 1.2.927 → 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 (235) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +11 -14
  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-widgets.cap-C4jxflbF.js +200 -0
  10. package/system/dist/addon-widgets.cap-D9m48X78.mjs +183 -0
  11. package/system/dist/base-addon-DD5dIfcZ.js +4624 -0
  12. package/system/dist/base-addon-Md14i7pe.mjs +4505 -0
  13. package/system/dist/base-device-2sL1DMm1.js +1103 -0
  14. package/system/dist/base-device-IuM1AwXZ.mjs +1098 -0
  15. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +8 -6
  16. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +3 -1
  17. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +8 -6
  18. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +3 -1
  19. package/system/dist/builtins/alerts/alerts.addon.js +113 -56
  20. package/system/dist/builtins/alerts/alerts.addon.mjs +58 -1
  21. package/system/dist/builtins/autotrack/index.js +21 -17
  22. package/system/dist/builtins/autotrack/index.mjs +5 -1
  23. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +14 -11
  24. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -2
  25. package/system/dist/builtins/calendars/calendars.addon.js +8 -6
  26. package/system/dist/builtins/calendars/calendars.addon.mjs +3 -1
  27. package/system/dist/builtins/camera-grid/index.js +615 -58
  28. package/system/dist/builtins/camera-grid/index.mjs +558 -1
  29. package/system/dist/builtins/composer/composer.addon.js +788 -209
  30. package/system/dist/builtins/composer/composer.addon.mjs +583 -4
  31. package/system/dist/builtins/console-logging/index.js +4 -3
  32. package/system/dist/builtins/console-logging/index.mjs +2 -1
  33. package/system/dist/builtins/core-blocks/core-blocks.addon.js +7887 -381
  34. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +7511 -5
  35. package/system/dist/builtins/core-notifier/core-notifier.addon.js +731 -21
  36. package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +711 -1
  37. package/system/dist/builtins/device-history/device-history.addon.js +110 -31
  38. package/system/dist/builtins/device-history/device-history.addon.mjs +81 -2
  39. package/system/dist/builtins/device-manager/device-manager.addon.js +12806 -227
  40. package/system/dist/builtins/device-manager/device-manager.addon.mjs +12583 -5
  41. package/system/dist/builtins/hub-forwarder/index.js +4 -3
  42. package/system/dist/builtins/hub-forwarder/index.mjs +2 -1
  43. package/system/dist/builtins/keychain/index.js +31 -28
  44. package/system/dist/builtins/keychain/index.mjs +7 -4
  45. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +15 -12
  46. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +4 -1
  47. package/system/dist/builtins/local-auth/local-auth.addon.js +140 -39
  48. package/system/dist/builtins/local-auth/local-auth.addon.mjs +103 -3
  49. package/system/dist/builtins/local-network/local-network.addon.js +43 -39
  50. package/system/dist/builtins/local-network/local-network.addon.mjs +7 -3
  51. package/system/dist/builtins/loki-logging/index.js +23 -17
  52. package/system/dist/builtins/loki-logging/index.mjs +7 -1
  53. package/system/dist/builtins/native-metrics/native-metrics.addon.js +156 -15
  54. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +142 -1
  55. package/system/dist/builtins/platform-probe/index.js +25 -23
  56. package/system/dist/builtins/platform-probe/index.mjs +4 -2
  57. package/system/dist/builtins/record-entries/index.js +9 -7
  58. package/system/dist/builtins/record-entries/index.mjs +3 -1
  59. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +4 -4
  60. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  61. package/system/dist/builtins/snapshot/index.js +97 -44
  62. package/system/dist/builtins/snapshot/index.mjs +54 -1
  63. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +5 -4
  64. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +2 -1
  65. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  66. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  67. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +87 -61
  68. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +29 -3
  69. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +81 -72
  70. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +10 -1
  71. package/system/dist/builtins/system-config/system-config.addon.js +17 -14
  72. package/system/dist/builtins/system-config/system-config.addon.mjs +6 -3
  73. package/system/dist/builtins/winston-logging/index.js +7 -5
  74. package/system/dist/builtins/winston-logging/index.mjs +3 -1
  75. package/system/dist/calendars.cap-CaFlShS9.js +155 -0
  76. package/system/dist/calendars.cap-_C4eD4fi.mjs +138 -0
  77. package/system/dist/camstack-error-DJ-TUAi1.js +23 -0
  78. package/system/dist/camstack-error-viZYfcj9.mjs +18 -0
  79. package/system/dist/cap-call-context-Bd76CbOW.js +95 -0
  80. package/system/dist/cap-call-context-DNwdgGSQ.mjs +78 -0
  81. package/system/dist/capability-definition-C2rJdVeX.mjs +177 -0
  82. package/system/dist/capability-definition-HCmTem8c.js +242 -0
  83. package/system/dist/{capture-engine-BcuwOSXv.js → capture-engine-DZ0LIUqA.js} +5 -4
  84. package/system/dist/{capture-engine-Bz7eXFjT.mjs → capture-engine-DiwbjoWp.mjs} +2 -1
  85. package/system/dist/command-origin-claim-Cief660O.js +35 -0
  86. package/system/dist/command-origin-claim-D1Wy7Qld.mjs +24 -0
  87. package/system/dist/composition-sources-Caqv7O7z.mjs +391 -0
  88. package/system/dist/composition-sources-CgnHjm8Q.js +408 -0
  89. package/system/dist/{constants-D2etJ02O.js → constants-Ba3FTIHl.js} +1 -1
  90. package/system/dist/constants-C860Y6U4.js +26 -0
  91. package/system/dist/{constants-BcUTQd1M.mjs → constants-DB4piTD5.mjs} +1 -1
  92. package/system/dist/constants-DCLpoF4L.mjs +21 -0
  93. package/system/dist/coral-accelerators-7o8hqvcN.js +564 -0
  94. package/system/dist/coral-accelerators-BKcXP59c.mjs +521 -0
  95. package/system/dist/core-blocks.cap-C6iKAZ-x.mjs +17986 -0
  96. package/system/dist/core-blocks.cap-LEMqVwxO.js +18705 -0
  97. package/system/dist/custom-actions-BFUSalC9.mjs +25 -0
  98. package/system/dist/custom-actions-D92NRi2c.js +36 -0
  99. package/system/dist/database-snapshot.cap-DF38e-0P.js +162 -0
  100. package/system/dist/database-snapshot.cap-dhrc9xnY.mjs +133 -0
  101. package/system/dist/declared-device-BWphj9WE.js +303 -0
  102. package/system/dist/declared-device-CKERA1Hi.mjs +286 -0
  103. package/system/dist/{device-ca-ExMN3xW3.mjs → device-ca-BLM6fccc.mjs} +2 -1
  104. package/system/dist/{device-ca-CU8zh9Pi.js → device-ca-C5kJE6mL.js} +7 -6
  105. package/system/dist/device-certificate-Cddm4Idn.mjs +91 -0
  106. package/system/dist/device-certificate-CguVACQO.js +162 -0
  107. package/system/dist/device-identifiers-BQg9EQi1.js +600 -0
  108. package/system/dist/device-identifiers-iSuQCKmK.mjs +529 -0
  109. package/system/dist/device-kind-BJ2pfsjw.mjs +78 -0
  110. package/system/dist/device-kind-CsSiv_YF.js +101 -0
  111. package/system/dist/device-manager.cap-2abwVLCM.js +2874 -0
  112. package/system/dist/device-manager.cap-CFZSPfUh.mjs +2749 -0
  113. package/system/dist/device-provider.cap-3Uvk6f5-.mjs +331 -0
  114. package/system/dist/device-provider.cap-D7TV2kVH.js +366 -0
  115. package/system/dist/{device-row-store-CeW_GWh9.mjs → device-row-store-YF3jtmkk.mjs} +4 -1
  116. package/system/dist/{device-row-store-BMIR-n3m.js → device-row-store-doTfMOqn.js} +12 -9
  117. package/system/dist/device-transitions.cap-B5w5PYU_.js +860 -0
  118. package/system/dist/device-transitions.cap-DojcwEuX.mjs +819 -0
  119. package/system/dist/device-type-CbQsnFdC.js +477 -0
  120. package/system/dist/device-type-DgEvK3ch.mjs +454 -0
  121. package/system/dist/entry-kind-D9MuVJCK.mjs +44 -0
  122. package/system/dist/entry-kind-cq90c--V.js +55 -0
  123. package/system/dist/error.cap-CSM_SRfR.mjs +3423 -0
  124. package/system/dist/error.cap-DBhgPeWK.js +3848 -0
  125. package/system/dist/file-host-worker.js +1 -1
  126. package/system/dist/file-host-worker.mjs +1 -1
  127. package/system/dist/history-catalog-BKRarIL_.js +831 -0
  128. package/system/dist/history-catalog-BwTeQ4Mr.mjs +802 -0
  129. package/system/dist/{hub-identity-Csxx2Q8k.js → hub-identity-BMdR3Mw9.js} +2 -2
  130. package/system/dist/{hub-identity-BBXzP6Ve.mjs → hub-identity-DjMN9Ac2.mjs} +1 -1
  131. package/system/dist/{hub-mdns-ciao-By5577HM.js → hub-mdns-ciao--0v1TKME.js} +5 -5
  132. package/system/dist/{hub-mdns-ciao-DG17NbGU.mjs → hub-mdns-ciao-DBrtHOcc.mjs} +2 -2
  133. package/system/dist/index.js +763 -151
  134. package/system/dist/index.mjs +624 -12
  135. package/system/dist/integration-instances.cap-Cl9O-k4h.mjs +538 -0
  136. package/system/dist/integration-instances.cap-dJIxg2_s.js +549 -0
  137. package/system/dist/keychain-admin.cap-Db_oFX4H.js +425 -0
  138. package/system/dist/keychain-admin.cap-GtM7gVGG.mjs +396 -0
  139. package/system/dist/l10n-Bu6aUvSY.mjs +10 -0
  140. package/system/dist/l10n-CGMvp7NF.js +15 -0
  141. package/system/dist/labels-DX5S8deC.js +81 -0
  142. package/system/dist/labels-DsBcU7md.mjs +64 -0
  143. package/system/dist/{legacy-integration-rows-door-CVwOo5aq.js → legacy-integration-rows-door-B1nzxxr5.js} +2 -2
  144. package/system/dist/{legacy-integration-rows-door-D9tQOUzh.mjs → legacy-integration-rows-door-nTvo_6jQ.mjs} +1 -1
  145. package/system/dist/log-destination.cap-CxZzAVaR.mjs +143 -0
  146. package/system/dist/log-destination.cap-DELPJkZ0.js +148 -0
  147. package/system/dist/low-power-sleep.cap-7lfVU41N.js +103 -0
  148. package/system/dist/low-power-sleep.cap-tGPmaZ_V.mjs +92 -0
  149. package/system/dist/mask-shape-Ci8Co9w0.mjs +57 -0
  150. package/system/dist/mask-shape-CmPA2fst.js +92 -0
  151. package/system/dist/metrics-provider.cap-BNmcHDkQ.mjs +405 -0
  152. package/system/dist/metrics-provider.cap-BcmQUt6l.js +410 -0
  153. package/system/dist/migration-BMjgkyG2.js +380 -0
  154. package/system/dist/migration-DRJAtdy7.mjs +321 -0
  155. package/system/dist/network-access.cap-B5TWLDCC.js +1099 -0
  156. package/system/dist/network-access.cap-BJnGbE6n.mjs +1004 -0
  157. package/system/dist/notification-rules.cap-B__YBgnG.js +3422 -0
  158. package/system/dist/notification-rules.cap-D9ArZlwx.mjs +3357 -0
  159. package/system/dist/ops-log-CB4pIdqi.mjs +64 -0
  160. package/system/dist/ops-log-pxt9176Z.js +81 -0
  161. package/system/dist/pinned-binary-BOhOSNff.js +28 -0
  162. package/system/dist/pinned-binary-CrIRAi4G.mjs +23 -0
  163. package/system/dist/platform-probe.cap-1WrMhWHx.js +250 -0
  164. package/system/dist/platform-probe.cap-BFeqFLtQ.mjs +233 -0
  165. package/system/dist/prefix-walk-B4b2-9aK.mjs +790 -0
  166. package/system/dist/prefix-walk-DC0ljmbB.js +843 -0
  167. package/system/dist/ptz-autotrack.cap-BW7w0zHD.js +229 -0
  168. package/system/dist/ptz-autotrack.cap-DT2GypXw.mjs +224 -0
  169. package/system/dist/quantity-D3g5SxsZ.mjs +114 -0
  170. package/system/dist/quantity-lY1KiTSZ.js +143 -0
  171. package/system/dist/raw-secret-migration-DxuBFtvi.js +50 -0
  172. package/system/dist/raw-secret-migration-iv88mLoc.mjs +39 -0
  173. package/system/dist/record-entries.cap-sMUhTvTU.mjs +75 -0
  174. package/system/dist/record-entries.cap-ti1C046R.js +80 -0
  175. package/system/dist/record-kind-DoBfYHCs.js +203 -0
  176. package/system/dist/record-kind-ub6NXqfh.mjs +162 -0
  177. package/system/dist/recording-archive.cap-7OrIn9e5.mjs +1299 -0
  178. package/system/dist/recording-archive.cap-D7bo-QSM.js +1328 -0
  179. package/system/dist/records.cap-ClcWV64i.js +329 -0
  180. package/system/dist/records.cap-CwLT2ByG.mjs +294 -0
  181. package/system/dist/relocate-CdVQAk-w.js +804 -0
  182. package/system/dist/relocate-CoZZTui1.mjs +661 -0
  183. package/system/dist/rename-composition-block-7WIICIDq.mjs +33525 -0
  184. package/system/dist/rename-composition-block-CcWLwVhG.js +34692 -0
  185. package/system/dist/{restore-archive-kwtBd00M.mjs → restore-archive-CjAyKpgX.mjs} +3 -1
  186. package/system/dist/{restore-archive-CIFvqOze.js → restore-archive-CkTkv3Ss.js} +6 -4
  187. package/system/dist/scoped-settings-CylSSq_8.js +955 -0
  188. package/system/dist/scoped-settings-DVWUIP7Z.mjs +650 -0
  189. package/system/dist/server-name-BIhLuHvX.mjs +35 -0
  190. package/system/dist/server-name-OALNvpqC.js +52 -0
  191. package/system/dist/settings-store.cap-Ci4F2zul.mjs +569 -0
  192. package/system/dist/settings-store.cap-wlJhCspr.js +640 -0
  193. package/system/dist/snapshot.cap-3suPdBHV.js +250 -0
  194. package/system/dist/snapshot.cap-Bs8Oyaqh.mjs +245 -0
  195. package/system/dist/source-info-DGB7SdB_.mjs +190 -0
  196. package/system/dist/source-info-DtWf4k2j.js +225 -0
  197. package/system/dist/storage-admin.cap-BSv1NjKJ.mjs +883 -0
  198. package/system/dist/storage-admin.cap-he0OqvVM.js +906 -0
  199. package/system/dist/storage-location-CBT8GCD6.mjs +163 -0
  200. package/system/dist/storage-location-CTweDMZf.js +198 -0
  201. package/system/dist/storage-location-mode-B21UVRRX.mjs +167 -0
  202. package/system/dist/storage-location-mode-CS4sMzo-.js +232 -0
  203. package/system/dist/storage-migration.cap-CyyATY_p.js +330 -0
  204. package/system/dist/storage-migration.cap-D7QqGobp.mjs +313 -0
  205. package/system/dist/storage-occupancy.cap-2rmnS58Z.js +622 -0
  206. package/system/dist/storage-occupancy.cap-CqBztTl9.mjs +611 -0
  207. package/system/dist/storage-provider.cap-Bw0CfxVc.js +213 -0
  208. package/system/dist/storage-provider.cap-CMeck2w4.mjs +202 -0
  209. package/system/dist/stream-catalog.cap-Bp7SkgIf.mjs +6560 -0
  210. package/system/dist/stream-catalog.cap-D3uwePiA.js +6763 -0
  211. package/system/dist/streaming-shared-B8cXatuU.mjs +431 -0
  212. package/system/dist/streaming-shared-DQwFZOSi.js +526 -0
  213. package/system/dist/system-reasons-Be_k1W8g.js +25 -0
  214. package/system/dist/system-reasons-CYj4qwyS.mjs +20 -0
  215. package/system/dist/tag-BxLazvVb.js +2138 -0
  216. package/system/dist/tag-uZBAq6ox.mjs +2073 -0
  217. package/system/dist/user-management.cap-B9QDu8NE.js +825 -0
  218. package/system/dist/user-management.cap-DBIi77sB.mjs +766 -0
  219. package/system/dist/vector-store.cap-DnyfrYDn.js +330 -0
  220. package/system/dist/vector-store.cap-h2GHWQ1t.mjs +319 -0
  221. package/system/dist/{wal-maintenance-CTrCPzds.mjs → wal-maintenance-BG01rOn9.mjs} +0 -0
  222. package/system/dist/{wal-maintenance-dq7T3quB.js → wal-maintenance-DyrebYKF.js} +0 -0
  223. package/system/dist/zod-secret-DS7mj1bk.js +78 -0
  224. package/system/dist/zod-secret-zY4nM61M.mjs +73 -0
  225. package/system/package.json +1 -1
  226. package/system/dist/composition-sources-BI614LJx.mjs +0 -141
  227. package/system/dist/composition-sources-v_kkb8A9.js +0 -152
  228. package/system/dist/coral-accelerators-BSVsBVzt.js +0 -250
  229. package/system/dist/coral-accelerators-DBlgWB8k.mjs +0 -231
  230. package/system/dist/dist-BCHMSqzc.mjs +0 -143467
  231. package/system/dist/dist-BZfvhfS1.js +0 -146970
  232. package/system/dist/prefix-walk-DAOBSyH1.mjs +0 -88
  233. package/system/dist/prefix-walk-Dv6MLZlM.js +0 -99
  234. package/system/dist/rename-composition-block-C9HuBrKS.js +0 -112
  235. package/system/dist/rename-composition-block-DtaYmYAR.mjs +0 -101
@@ -3,11 +3,14 @@ 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-BZfvhfS1.js");
6
+ const require_base_addon = require("../../base-addon-DD5dIfcZ.js");
7
+ const require_scoped_settings = require("../../scoped-settings-CylSSq_8.js");
8
+ const require_server_name = require("../../server-name-OALNvpqC.js");
9
+ const require_custom_actions = require("../../custom-actions-D92NRi2c.js");
7
10
  const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
8
11
  const require_x509_es = require("../../x509.es-WtnRNyYS.js");
9
- const require_hub_identity = require("../../hub-identity-Csxx2Q8k.js");
10
- const require_constants$8 = require("../../constants-D2etJ02O.js");
12
+ const require_hub_identity = require("../../hub-identity-BMdR3Mw9.js");
13
+ const require_constants$8 = require("../../constants-Ba3FTIHl.js");
11
14
  const require_src$1 = require("../../src-CnAqG6EF.js");
12
15
  let zod = require("zod");
13
16
  let node_crypto = require("node:crypto");
@@ -88940,11 +88943,11 @@ var BootstrapFormSchema = zod.z.custom((value) => typeof value === "object" && v
88940
88943
  /** Field key → new value. Only the keys the operator changed. */
88941
88944
  var BootstrapFormPatchSchema = zod.z.record(zod.z.string(), zod.z.unknown());
88942
88945
  var BootstrapFormSaveInputSchema = zod.z.object({ patch: BootstrapFormPatchSchema });
88943
- var bootstrapFormActions = require_dist.defineCustomActions({
88946
+ var bootstrapFormActions = require_custom_actions.defineCustomActions({
88944
88947
  /** The hydrated bootstrap form. A section that cannot be read fails the call. */
88945
- getBootstrapForm: require_dist.customAction(zod.z.object({}), BootstrapFormSchema, { kind: "query" }),
88948
+ getBootstrapForm: require_custom_actions.customAction(zod.z.object({}), BootstrapFormSchema, { kind: "query" }),
88946
88949
  /** Validate and write the patch; a refused patch writes nothing. */
88947
- saveBootstrapForm: require_dist.customAction(BootstrapFormSaveInputSchema, zod.z.object({ success: zod.z.literal(true) }), {
88950
+ saveBootstrapForm: require_custom_actions.customAction(BootstrapFormSaveInputSchema, zod.z.object({ success: zod.z.literal(true) }), {
88948
88951
  kind: "mutation",
88949
88952
  auth: "admin"
88950
88953
  })
@@ -88968,9 +88971,9 @@ var mintAgentUiUnlockOutputSchema = zod.z.object({
88968
88971
  nodeId: zod.z.string().min(1),
88969
88972
  dashboardUrl: zod.z.string().url().optional()
88970
88973
  });
88971
- var systemConfigMeshActions = require_dist.defineCustomActions({
88974
+ var systemConfigMeshActions = require_custom_actions.defineCustomActions({
88972
88975
  /** Hub admin → short-lived ticket the agent redeems for a tab session (D821). */
88973
- mintAgentUiUnlockTicket: require_dist.customAction(mintAgentUiUnlockInputSchema, mintAgentUiUnlockOutputSchema, {
88976
+ mintAgentUiUnlockTicket: require_custom_actions.customAction(mintAgentUiUnlockInputSchema, mintAgentUiUnlockOutputSchema, {
88974
88977
  kind: "mutation",
88975
88978
  auth: "admin"
88976
88979
  }) });
@@ -89062,7 +89065,7 @@ var CIDR_LIST_KEYS = new Set(["trustedProxies", "trustedNetworks"]);
89062
89065
  var CORS_ORIGIN_KEY = "corsOrigins";
89063
89066
  /** The section id of the cluster form — System → Cluster renders only this one. */
89064
89067
  var SYSTEM_CONFIG_CLUSTER_SECTION_ID = "system-config-cluster";
89065
- var SystemConfigAddon = class extends require_dist.BaseAddon {
89068
+ var SystemConfigAddon = class extends require_base_addon.BaseAddon {
89066
89069
  id = "system-config";
89067
89070
  meshCaKeeper = null;
89068
89071
  meshReapTimer = null;
@@ -89386,7 +89389,7 @@ var SystemConfigAddon = class extends require_dist.BaseAddon {
89386
89389
  /** The hydrated bootstrap form (`getBootstrapForm`). A section that cannot be read fails the call. */
89387
89390
  async getBootstrapForm() {
89388
89391
  const schema = this.buildBootstrapSchema();
89389
- if (!this.ctx.settings) return require_dist.hydrateSchema(schema, {});
89392
+ if (!this.ctx.settings) return require_base_addon.hydrateSchema(schema, {});
89390
89393
  const sectionNames = Object.keys(SECTION_TITLES);
89391
89394
  const merged = {};
89392
89395
  for (const section of sectionNames) try {
@@ -89395,11 +89398,11 @@ var SystemConfigAddon = class extends require_dist.BaseAddon {
89395
89398
  } catch (err) {
89396
89399
  this.ctx.logger.warn("system-config: a settings section could not be read", { meta: {
89397
89400
  section,
89398
- error: require_dist.errMsg(err)
89401
+ error: require_scoped_settings.errMsg(err)
89399
89402
  } });
89400
89403
  throw err;
89401
89404
  }
89402
- return require_dist.hydrateSchema(schema, merged, { inlineSecretsAsViews: true });
89405
+ return require_base_addon.hydrateSchema(schema, merged, { inlineSecretsAsViews: true });
89403
89406
  }
89404
89407
  /**
89405
89408
  * The value to store for a `name` in a save, or `undefined` for "leave the row
@@ -89416,7 +89419,7 @@ var SystemConfigAddon = class extends require_dist.BaseAddon {
89416
89419
  const current = (await this.ctx.settings.getSection("server"))[SERVER_NAME_FIELD];
89417
89420
  return typeof current === "string" && current !== "" ? "" : void 0;
89418
89421
  }
89419
- const parsed = require_dist.ServerNameSchema.safeParse(value);
89422
+ const parsed = require_server_name.ServerNameSchema.safeParse(value);
89420
89423
  if (!parsed.success) throw new Error(parsed.error.issues[0]?.message ?? "The server name is not valid");
89421
89424
  return parsed.data;
89422
89425
  }
@@ -89480,7 +89483,7 @@ var SystemConfigAddon = class extends require_dist.BaseAddon {
89480
89483
  };
89481
89484
  /** This machine's hostname without its domain: what an unnamed hub is called. */
89482
89485
  function hostnameWithoutDomain() {
89483
- return require_dist.shortHostname(node_os.default.hostname());
89486
+ return require_server_name.shortHostname(node_os.default.hostname());
89484
89487
  }
89485
89488
  function parseMintUnlockInput(input) {
89486
89489
  if (input === null || typeof input !== "object") throw new Error("system-config: mintAgentUiUnlockTicket requires { nodeId }");
@@ -1,9 +1,12 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Cn as ServerNameSchema, Fl as customAction, Hu as errMsg, Lc as BaseAddon, Ll as defineCustomActions, Xl as hydrateSchema, fs as shortHostname } from "../../dist-BCHMSqzc.mjs";
2
+ import { _ as hydrateSchema, t as BaseAddon } from "../../base-addon-Md14i7pe.mjs";
3
+ import { Z as errMsg } from "../../scoped-settings-DVWUIP7Z.mjs";
4
+ import { n as ServerNameSchema, r as shortHostname } from "../../server-name-BIhLuHvX.mjs";
5
+ import { n as defineCustomActions, t as customAction } from "../../custom-actions-BFUSalC9.mjs";
3
6
  import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
4
7
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
5
- import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-BBXzP6Ve.mjs";
6
- import { a as MESH_CA_KEY_REF, c as MESH_LEAF_NOT_AFTER, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-BcUTQd1M.mjs";
8
+ import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-DjMN9Ac2.mjs";
9
+ import { a as MESH_CA_KEY_REF, c as MESH_LEAF_NOT_AFTER, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-DB4piTD5.mjs";
7
10
  import { t as require_src } from "../../src-hG4grMU4.mjs";
8
11
  import { z } from "zod";
9
12
  import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
@@ -3,7 +3,9 @@ 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-BZfvhfS1.js");
6
+ const require_base_addon = require("../../base-addon-DD5dIfcZ.js");
7
+ const require_migration = require("../../migration-BMjgkyG2.js");
8
+ const require_log_destination_cap = require("../../log-destination.cap-DELPJkZ0.js");
7
9
  const require_formatter = require("../../formatter-xbxeV4GD.js");
8
10
  const require_log_file_read_protocol = require("../../log-file-read-protocol-DSV_vQRb.js");
9
11
  let node_path = require("node:path");
@@ -50,7 +52,7 @@ async function planNodeFields(addonId, keys, ports) {
50
52
  op: "setKeys",
51
53
  scope: ADDON_SETTINGS_TABLE,
52
54
  values: sets,
53
- precondition: require_dist.preconditionOf(Object.fromEntries(ids.map((id) => [id, null])))
55
+ precondition: require_migration.preconditionOf(Object.fromEntries(ids.map((id) => [id, null])))
54
56
  }] };
55
57
  }
56
58
  /**
@@ -343,7 +345,7 @@ var WinstonDestination = class {
343
345
  * Its settings are node settings (D986): each node writes its own files, so the level and the
344
346
  * retention are rows `<key>@<nodeId>`, drawn under Cluster → NodeDetail → Settings.
345
347
  */
346
- var WinstonLoggingAddon = class extends require_dist.BaseAddon {
348
+ var WinstonLoggingAddon = class extends require_base_addon.BaseAddon {
347
349
  destination = null;
348
350
  constructor() {
349
351
  super({
@@ -356,7 +358,7 @@ var WinstonLoggingAddon = class extends require_dist.BaseAddon {
356
358
  * the config so this boot opens its files with the node values.
357
359
  */
358
360
  async migrateNodeFields() {
359
- if ((await this.runMigrations(require_dist.defineAddonMigrations(ADDON_MIGRATIONS, {
361
+ if ((await this.runMigrations(require_base_addon.defineAddonMigrations(ADDON_MIGRATIONS, {
360
362
  readStored: (keys) => readRawKeys((key) => this.readStoredGlobalKey(key), "winston-logging", keys),
361
363
  nodeIds: () => clusterNodeIds(() => this.ctx.api.nodes.directory.query(), this.ctx.kernel.localNodeId)
362
364
  }))).applied.length > 0) await this.resolveConfig();
@@ -372,7 +374,7 @@ var WinstonLoggingAddon = class extends require_dist.BaseAddon {
372
374
  if (this.ctx.kernel.localNodeId === "hub") this.destination.startBackgroundIndexing();
373
375
  this.ctx.logger.info("Winston logging initialized");
374
376
  return [{
375
- capability: require_dist.logDestinationCapability,
377
+ capability: require_log_destination_cap.logDestinationCapability,
376
378
  provider: this.destination
377
379
  }];
378
380
  }
@@ -1,4 +1,6 @@
1
- import { Il as defineAddonMigrations, Lc as BaseAddon, uo as preconditionOf, wa as logDestinationCapability } from "../../dist-BCHMSqzc.mjs";
1
+ import { f as defineAddonMigrations, t as BaseAddon } from "../../base-addon-Md14i7pe.mjs";
2
+ import { u as preconditionOf } from "../../migration-DRJAtdy7.mjs";
3
+ import { t as logDestinationCapability } from "../../log-destination.cap-CxZzAVaR.mjs";
2
4
  import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
3
5
  import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-hTaAsYlX.mjs";
4
6
  import { createRequire } from "node:module";
@@ -0,0 +1,155 @@
1
+ const require_capability_definition = require("./capability-definition-HCmTem8c.js");
2
+ const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
3
+ let zod = require("zod");
4
+ //#region ../types/dist/esm/capabilities/calendar-source.cap.mjs
5
+ /**
6
+ * `calendar-source` — collection cap exposing per-provider calendars and
7
+ * their events. Every addon that contributes calendars (Home Assistant,
8
+ * a future Google Calendar addon, …) registers a provider here. The hub
9
+ * singleton `calendars` walks the collection and merges the answers.
10
+ *
11
+ * Mirrors `addon-pages-source`: the public listing is a different shape
12
+ * (source-stamped ids) and lives on the aggregator.
13
+ */
14
+ var CalendarSourceKindSchema = /* @__PURE__ */ zod.z.enum(["ha", "addon"]);
15
+ var CalendarInfoSchema = /* @__PURE__ */ zod.z.object({
16
+ /** Provider-local id (e.g. HA `calendar.family`). The aggregator prefixes. */
17
+ id: /* @__PURE__ */ zod.z.string().min(1),
18
+ name: /* @__PURE__ */ zod.z.string().min(1),
19
+ source: CalendarSourceKindSchema,
20
+ enabled: /* @__PURE__ */ zod.z.boolean(),
21
+ /**
22
+ * The `integration-instances` record that owns this calendar (the record the switch writes).
23
+ * Every source stamps it from the record it read the calendar from, so a consumer joins on
24
+ * it instead of rebuilding an id from form values. Optional on the wire so a source addon
25
+ * that predates the field still lists its calendars: such a row simply has no switch.
26
+ */
27
+ instanceId: /* @__PURE__ */ zod.z.string().min(1).optional()
28
+ });
29
+ /**
30
+ * Time contract of {@link CalendarEvent}.
31
+ *
32
+ * - Timed event: `startMs` / `endMs` are real instants; `endMs` is exclusive.
33
+ * - All-day event (`allDay: true`): the event is a run of calendar DATES, not
34
+ * instants. `startMs` is UTC midnight of the first date and `endMs` is UTC
35
+ * midnight of the day AFTER the last date (RFC 5545 exclusive DTEND), so a
36
+ * one-day event spans exactly 24 h. Every provider produces that and no
37
+ * consumer may read the instants in a local timezone: use
38
+ * {@link calendarEventLocalSpan}. Reading UTC midnight as local time put an
39
+ * all-day event on the following day for any viewer ahead of UTC.
40
+ */
41
+ var CalendarEventSchema = /* @__PURE__ */ zod.z.object({
42
+ id: /* @__PURE__ */ zod.z.string().min(1),
43
+ calendarId: /* @__PURE__ */ zod.z.string().min(1),
44
+ title: /* @__PURE__ */ zod.z.string(),
45
+ startMs: /* @__PURE__ */ zod.z.number().int(),
46
+ endMs: /* @__PURE__ */ zod.z.number().int(),
47
+ allDay: /* @__PURE__ */ zod.z.boolean().optional(),
48
+ description: /* @__PURE__ */ zod.z.string().optional(),
49
+ location: /* @__PURE__ */ zod.z.string().optional()
50
+ });
51
+ var CalendarListEventsInputSchema = /* @__PURE__ */ zod.z.object({
52
+ calendarIds: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string().min(1)).max(64).optional(),
53
+ startMs: /* @__PURE__ */ zod.z.number().int(),
54
+ endMs: /* @__PURE__ */ zod.z.number().int()
55
+ });
56
+ var calendarSourceCapability = {
57
+ name: "calendar-source",
58
+ scope: "system",
59
+ mode: "collection",
60
+ internal: true,
61
+ providerKind: "calendar",
62
+ methods: {
63
+ listCalendars: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.void(), /* @__PURE__ */ zod.z.array(CalendarInfoSchema).readonly(), { auth: "admin" }),
64
+ listEvents: /* @__PURE__ */ require_capability_definition.method(CalendarListEventsInputSchema, /* @__PURE__ */ zod.z.array(CalendarEventSchema).readonly(), { auth: "admin" })
65
+ },
66
+ vocabulary: { notOperatorFacing: require_system_reasons.NOT_A_DEVICE.INTERNAL }
67
+ };
68
+ //#endregion
69
+ //#region ../types/dist/esm/capabilities/calendars.cap.mjs
70
+ /**
71
+ * `calendars` — system-scoped singleton. Public surface admin-ui and the
72
+ * notification-center calendar-events producer consume.
73
+ *
74
+ * Walks every `calendar-source` provider, stamps each calendar with a
75
+ * cluster-stable id (`<sourceAddonId>:<localId>`) and the providing
76
+ * addon's id, and fans `listEvents` out the same way.
77
+ *
78
+ * Per-user colour / visibility preferences live here (not on each source):
79
+ * the system assigns a stable default colour from the calendar id; an
80
+ * operator may override colour or hide a calendar via
81
+ * {@link calendarsCapability.methods.setCalendarPreference}.
82
+ */
83
+ /** `#RRGGBB` — the only colour form the UI and the palette emit. */
84
+ var CalendarColorSchema = /* @__PURE__ */ zod.z.string().regex(/^#[0-9A-Fa-f]{6}$/, "expected #RRGGBB");
85
+ var CalendarEntrySchema = /* @__PURE__ */ CalendarInfoSchema.extend({
86
+ /** Cluster-stable id: `<providerAddonId>:<localId>`. */
87
+ id: /* @__PURE__ */ zod.z.string().min(1),
88
+ /** The addon that registered the calendar-source provider. */
89
+ providerAddonId: /* @__PURE__ */ zod.z.string().min(1).optional(),
90
+ /** Deterministic system colour for this calendar id. */
91
+ defaultColor: CalendarColorSchema,
92
+ /**
93
+ * Colour to paint in the UI. Equals {@link defaultColor} until the
94
+ * caller overlays their preference (admin-ui merges `getPreferences`).
95
+ */
96
+ color: CalendarColorSchema,
97
+ /**
98
+ * Whether the UI should show this calendar. Defaults to `true`; the
99
+ * caller overlays `getPreferences` for a per-user hide.
100
+ */
101
+ visible: /* @__PURE__ */ zod.z.boolean()
102
+ });
103
+ var CalendarPreferenceEntrySchema = /* @__PURE__ */ zod.z.object({
104
+ visible: /* @__PURE__ */ zod.z.boolean().optional(),
105
+ /** Absent or cleared → fall back to the system {@link CalendarEntry.defaultColor}. */
106
+ color: /* @__PURE__ */ CalendarColorSchema.optional()
107
+ });
108
+ var CalendarPreferencesSchema = /* @__PURE__ */ zod.z.object({ calendars: /* @__PURE__ */ zod.z.record(/* @__PURE__ */ zod.z.string(), CalendarPreferenceEntrySchema) });
109
+ var CalendarSetPreferenceInputSchema = /* @__PURE__ */ zod.z.object({
110
+ calendarId: /* @__PURE__ */ zod.z.string().min(1),
111
+ visible: /* @__PURE__ */ zod.z.boolean().optional(),
112
+ /**
113
+ * Set a custom colour, or `null` to clear the override (back to
114
+ * {@link CalendarEntry.defaultColor}). Omit to leave colour unchanged.
115
+ */
116
+ color: /* @__PURE__ */ CalendarColorSchema.nullable().optional()
117
+ });
118
+ var calendarsCapability = {
119
+ name: "calendars",
120
+ scope: "system",
121
+ mode: "singleton",
122
+ methods: {
123
+ listCalendars: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.void(), /* @__PURE__ */ zod.z.array(CalendarEntrySchema).readonly(), { auth: "admin" }),
124
+ listEvents: /* @__PURE__ */ require_capability_definition.method(CalendarListEventsInputSchema, /* @__PURE__ */ zod.z.array(CalendarEventSchema).readonly(), { auth: "admin" }),
125
+ getPreferences: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({}), CalendarPreferencesSchema, {
126
+ auth: "admin",
127
+ caller: "required"
128
+ }),
129
+ setCalendarPreference: /* @__PURE__ */ require_capability_definition.method(CalendarSetPreferenceInputSchema, CalendarPreferencesSchema, {
130
+ auth: "admin",
131
+ kind: "mutation",
132
+ caller: "required"
133
+ })
134
+ },
135
+ vocabulary: { notOperatorFacing: "calendars feed schedules and conditions, not device actions" }
136
+ };
137
+ //#endregion
138
+ Object.defineProperty(exports, "CalendarPreferencesSchema", {
139
+ enumerable: true,
140
+ get: function() {
141
+ return CalendarPreferencesSchema;
142
+ }
143
+ });
144
+ Object.defineProperty(exports, "calendarSourceCapability", {
145
+ enumerable: true,
146
+ get: function() {
147
+ return calendarSourceCapability;
148
+ }
149
+ });
150
+ Object.defineProperty(exports, "calendarsCapability", {
151
+ enumerable: true,
152
+ get: function() {
153
+ return calendarsCapability;
154
+ }
155
+ });
@@ -0,0 +1,138 @@
1
+ import { c as method } from "./capability-definition-C2rJdVeX.mjs";
2
+ import { t as NOT_A_DEVICE } from "./system-reasons-CYj4qwyS.mjs";
3
+ import { z } from "zod";
4
+ //#region ../types/dist/esm/capabilities/calendar-source.cap.mjs
5
+ /**
6
+ * `calendar-source` — collection cap exposing per-provider calendars and
7
+ * their events. Every addon that contributes calendars (Home Assistant,
8
+ * a future Google Calendar addon, …) registers a provider here. The hub
9
+ * singleton `calendars` walks the collection and merges the answers.
10
+ *
11
+ * Mirrors `addon-pages-source`: the public listing is a different shape
12
+ * (source-stamped ids) and lives on the aggregator.
13
+ */
14
+ var CalendarSourceKindSchema = /* @__PURE__ */ z.enum(["ha", "addon"]);
15
+ var CalendarInfoSchema = /* @__PURE__ */ z.object({
16
+ /** Provider-local id (e.g. HA `calendar.family`). The aggregator prefixes. */
17
+ id: /* @__PURE__ */ z.string().min(1),
18
+ name: /* @__PURE__ */ z.string().min(1),
19
+ source: CalendarSourceKindSchema,
20
+ enabled: /* @__PURE__ */ z.boolean(),
21
+ /**
22
+ * The `integration-instances` record that owns this calendar (the record the switch writes).
23
+ * Every source stamps it from the record it read the calendar from, so a consumer joins on
24
+ * it instead of rebuilding an id from form values. Optional on the wire so a source addon
25
+ * that predates the field still lists its calendars: such a row simply has no switch.
26
+ */
27
+ instanceId: /* @__PURE__ */ z.string().min(1).optional()
28
+ });
29
+ /**
30
+ * Time contract of {@link CalendarEvent}.
31
+ *
32
+ * - Timed event: `startMs` / `endMs` are real instants; `endMs` is exclusive.
33
+ * - All-day event (`allDay: true`): the event is a run of calendar DATES, not
34
+ * instants. `startMs` is UTC midnight of the first date and `endMs` is UTC
35
+ * midnight of the day AFTER the last date (RFC 5545 exclusive DTEND), so a
36
+ * one-day event spans exactly 24 h. Every provider produces that and no
37
+ * consumer may read the instants in a local timezone: use
38
+ * {@link calendarEventLocalSpan}. Reading UTC midnight as local time put an
39
+ * all-day event on the following day for any viewer ahead of UTC.
40
+ */
41
+ var CalendarEventSchema = /* @__PURE__ */ z.object({
42
+ id: /* @__PURE__ */ z.string().min(1),
43
+ calendarId: /* @__PURE__ */ z.string().min(1),
44
+ title: /* @__PURE__ */ z.string(),
45
+ startMs: /* @__PURE__ */ z.number().int(),
46
+ endMs: /* @__PURE__ */ z.number().int(),
47
+ allDay: /* @__PURE__ */ z.boolean().optional(),
48
+ description: /* @__PURE__ */ z.string().optional(),
49
+ location: /* @__PURE__ */ z.string().optional()
50
+ });
51
+ var CalendarListEventsInputSchema = /* @__PURE__ */ z.object({
52
+ calendarIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string().min(1)).max(64).optional(),
53
+ startMs: /* @__PURE__ */ z.number().int(),
54
+ endMs: /* @__PURE__ */ z.number().int()
55
+ });
56
+ var calendarSourceCapability = {
57
+ name: "calendar-source",
58
+ scope: "system",
59
+ mode: "collection",
60
+ internal: true,
61
+ providerKind: "calendar",
62
+ methods: {
63
+ listCalendars: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.array(CalendarInfoSchema).readonly(), { auth: "admin" }),
64
+ listEvents: /* @__PURE__ */ method(CalendarListEventsInputSchema, /* @__PURE__ */ z.array(CalendarEventSchema).readonly(), { auth: "admin" })
65
+ },
66
+ vocabulary: { notOperatorFacing: NOT_A_DEVICE.INTERNAL }
67
+ };
68
+ //#endregion
69
+ //#region ../types/dist/esm/capabilities/calendars.cap.mjs
70
+ /**
71
+ * `calendars` — system-scoped singleton. Public surface admin-ui and the
72
+ * notification-center calendar-events producer consume.
73
+ *
74
+ * Walks every `calendar-source` provider, stamps each calendar with a
75
+ * cluster-stable id (`<sourceAddonId>:<localId>`) and the providing
76
+ * addon's id, and fans `listEvents` out the same way.
77
+ *
78
+ * Per-user colour / visibility preferences live here (not on each source):
79
+ * the system assigns a stable default colour from the calendar id; an
80
+ * operator may override colour or hide a calendar via
81
+ * {@link calendarsCapability.methods.setCalendarPreference}.
82
+ */
83
+ /** `#RRGGBB` — the only colour form the UI and the palette emit. */
84
+ var CalendarColorSchema = /* @__PURE__ */ z.string().regex(/^#[0-9A-Fa-f]{6}$/, "expected #RRGGBB");
85
+ var CalendarEntrySchema = /* @__PURE__ */ CalendarInfoSchema.extend({
86
+ /** Cluster-stable id: `<providerAddonId>:<localId>`. */
87
+ id: /* @__PURE__ */ z.string().min(1),
88
+ /** The addon that registered the calendar-source provider. */
89
+ providerAddonId: /* @__PURE__ */ z.string().min(1).optional(),
90
+ /** Deterministic system colour for this calendar id. */
91
+ defaultColor: CalendarColorSchema,
92
+ /**
93
+ * Colour to paint in the UI. Equals {@link defaultColor} until the
94
+ * caller overlays their preference (admin-ui merges `getPreferences`).
95
+ */
96
+ color: CalendarColorSchema,
97
+ /**
98
+ * Whether the UI should show this calendar. Defaults to `true`; the
99
+ * caller overlays `getPreferences` for a per-user hide.
100
+ */
101
+ visible: /* @__PURE__ */ z.boolean()
102
+ });
103
+ var CalendarPreferenceEntrySchema = /* @__PURE__ */ z.object({
104
+ visible: /* @__PURE__ */ z.boolean().optional(),
105
+ /** Absent or cleared → fall back to the system {@link CalendarEntry.defaultColor}. */
106
+ color: /* @__PURE__ */ CalendarColorSchema.optional()
107
+ });
108
+ var CalendarPreferencesSchema = /* @__PURE__ */ z.object({ calendars: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), CalendarPreferenceEntrySchema) });
109
+ var CalendarSetPreferenceInputSchema = /* @__PURE__ */ z.object({
110
+ calendarId: /* @__PURE__ */ z.string().min(1),
111
+ visible: /* @__PURE__ */ z.boolean().optional(),
112
+ /**
113
+ * Set a custom colour, or `null` to clear the override (back to
114
+ * {@link CalendarEntry.defaultColor}). Omit to leave colour unchanged.
115
+ */
116
+ color: /* @__PURE__ */ CalendarColorSchema.nullable().optional()
117
+ });
118
+ var calendarsCapability = {
119
+ name: "calendars",
120
+ scope: "system",
121
+ mode: "singleton",
122
+ methods: {
123
+ listCalendars: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.array(CalendarEntrySchema).readonly(), { auth: "admin" }),
124
+ listEvents: /* @__PURE__ */ method(CalendarListEventsInputSchema, /* @__PURE__ */ z.array(CalendarEventSchema).readonly(), { auth: "admin" }),
125
+ getPreferences: /* @__PURE__ */ method(/* @__PURE__ */ z.object({}), CalendarPreferencesSchema, {
126
+ auth: "admin",
127
+ caller: "required"
128
+ }),
129
+ setCalendarPreference: /* @__PURE__ */ method(CalendarSetPreferenceInputSchema, CalendarPreferencesSchema, {
130
+ auth: "admin",
131
+ kind: "mutation",
132
+ caller: "required"
133
+ })
134
+ },
135
+ vocabulary: { notOperatorFacing: "calendars feed schedules and conditions, not device actions" }
136
+ };
137
+ //#endregion
138
+ export { calendarsCapability as n, calendarSourceCapability as r, CalendarPreferencesSchema as t };
@@ -0,0 +1,23 @@
1
+ require("zod");
2
+ //#region ../types/dist/esm/i18n/camstack-error.mjs
3
+ var CamstackError = class extends Error {
4
+ i18nCode;
5
+ i18nParams;
6
+ constructor(code, params, englishMessage) {
7
+ super(englishMessage);
8
+ this.name = "CamstackError";
9
+ this.i18nCode = code;
10
+ this.i18nParams = params;
11
+ }
12
+ };
13
+ /** `throw userError('device.not-found', { id }, 'Device 12 not found')` */
14
+ function userError(code, params, englishFallback) {
15
+ return new CamstackError(code, params, englishFallback);
16
+ }
17
+ //#endregion
18
+ Object.defineProperty(exports, "userError", {
19
+ enumerable: true,
20
+ get: function() {
21
+ return userError;
22
+ }
23
+ });
@@ -0,0 +1,18 @@
1
+ import "zod";
2
+ //#region ../types/dist/esm/i18n/camstack-error.mjs
3
+ var CamstackError = class extends Error {
4
+ i18nCode;
5
+ i18nParams;
6
+ constructor(code, params, englishMessage) {
7
+ super(englishMessage);
8
+ this.name = "CamstackError";
9
+ this.i18nCode = code;
10
+ this.i18nParams = params;
11
+ }
12
+ };
13
+ /** `throw userError('device.not-found', { id }, 'Device 12 not found')` */
14
+ function userError(code, params, englishFallback) {
15
+ return new CamstackError(code, params, englishFallback);
16
+ }
17
+ //#endregion
18
+ export { userError as t };
@@ -0,0 +1,95 @@
1
+ //#region ../types/dist/esm/cap-call-context.mjs
2
+ /**
3
+ * Per-call node pinning for `ctx.api` capability calls.
4
+ *
5
+ * A capability call normally resolves to its DEFAULT provider — a `singleton`
6
+ * cap resolves to the hub, a device-scoped cap to the device's owning node. To
7
+ * query a SPECIFIC node's provider instead (e.g. a remote agent's own
8
+ * in-process `platform-probe` hardware, which the hub cannot probe), pin the
9
+ * call to that node.
10
+ *
11
+ * The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
12
+ * method args), so capability method signatures stay `nodeId`-free — node
13
+ * targeting is a property of the CALL, not of the method. The transport lifts
14
+ * it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
15
+ * and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
16
+ * which classifies a pinned agent node as `agent-child-forward`
17
+ * (`$agent-cap-fwd.forward` → the agent's in-process provider).
18
+ *
19
+ * Usage at a call site:
20
+ *
21
+ * await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
22
+ */
23
+ /** tRPC `op.context` key carrying a per-call node pin. */
24
+ var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
25
+ /**
26
+ * Build the tRPC request options that pin a single capability call to `nodeId`.
27
+ * Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
28
+ *
29
+ * ## The id is normalised here, and it has to be
30
+ *
31
+ * A forked addon reads its own node from `ctx.kernel.localNodeId`, and inside a
32
+ * worker that value is a RUNNER id — `hub/export-hap`, not `hub`. Routing
33
+ * compares a pin against real node ids, so such a pin matches nothing and the
34
+ * call fails with `no provider registered for cap "…"`. The local-first
35
+ * resolver already guarded against this (`localNodeId.split('/')[0]`), which
36
+ * made the hazard invisible: unpinned calls worked, and only an explicit pin —
37
+ * the thing you reach for when you specifically need THIS node — silently
38
+ * addressed a node that does not exist.
39
+ *
40
+ * Cost of it being missing: `addon-export-hap` pinned `decoder.getInfo` to its
41
+ * own node to read the host's hardware-decode backend. It never once answered,
42
+ * so every HomeKit egress transcode decoded in SOFTWARE — including 4K H.265 —
43
+ * while D67's whole premise was that the decoder addon is the authority on
44
+ * hardware. The warn said `decoding in SOFTWARE` and read as "this node has no
45
+ * hardware", which was false.
46
+ *
47
+ * Normalising in the ONE constructor fixes every caller at once, which is why
48
+ * it is here and not at the call sites.
49
+ */
50
+ function nodePin(nodeId) {
51
+ return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: toNodeId(nodeId) } };
52
+ }
53
+ /**
54
+ * A runner id is `<nodeId>/<addonId>`; a node id has no slash. Taking the head
55
+ * is idempotent, so passing an already-clean id costs nothing.
56
+ */
57
+ function toNodeId(idOrRunnerId) {
58
+ const head = idOrRunnerId.split("/")[0];
59
+ return head === void 0 || head.length === 0 ? idOrRunnerId : head;
60
+ }
61
+ /** tRPC `op.context` key carrying a per-call command origin claim (D1022). */
62
+ var CAP_COMMAND_ORIGIN_CONTEXT_KEY = "__camstackCommandOrigin";
63
+ /**
64
+ * Build the tRPC request options that state WHY a device command is being issued
65
+ * (an action run, a scheduler). Pass as the second argument to `.mutate(input, …)`;
66
+ * `base` (a {@link nodePin}) is kept, so both ride in one context.
67
+ *
68
+ * It is a claim about the call, never about the caller: the transport stamps WHO
69
+ * the caller is (the addon id) and the audit records the claim as detail only.
70
+ */
71
+ function commandOrigin(claim, base) {
72
+ return { context: {
73
+ ...base?.context ?? {},
74
+ [CAP_COMMAND_ORIGIN_CONTEXT_KEY]: claim
75
+ } };
76
+ }
77
+ //#endregion
78
+ Object.defineProperty(exports, "commandOrigin", {
79
+ enumerable: true,
80
+ get: function() {
81
+ return commandOrigin;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "nodePin", {
85
+ enumerable: true,
86
+ get: function() {
87
+ return nodePin;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "toNodeId", {
91
+ enumerable: true,
92
+ get: function() {
93
+ return toNodeId;
94
+ }
95
+ });