@camstack/types 0.1.14 → 0.1.16

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 (467) hide show
  1. package/dist/addon/base-addon.d.ts +262 -0
  2. package/dist/addon/base-addon.d.ts.map +1 -0
  3. package/dist/auth-records-BDg37fy9.mjs +8297 -0
  4. package/dist/auth-records-BDg37fy9.mjs.map +1 -0
  5. package/dist/auth-records-D5ZNaUos.js +8296 -0
  6. package/dist/auth-records-D5ZNaUos.js.map +1 -0
  7. package/dist/capabilities/accessories.cap.d.ts +42 -0
  8. package/dist/capabilities/accessories.cap.d.ts.map +1 -0
  9. package/dist/capabilities/addon-pages-source.cap.d.ts +41 -0
  10. package/dist/capabilities/addon-pages-source.cap.d.ts.map +1 -0
  11. package/dist/capabilities/addon-pages.cap.d.ts +36 -0
  12. package/dist/capabilities/addon-pages.cap.d.ts.map +1 -0
  13. package/dist/capabilities/addon-routes.cap.d.ts +22 -0
  14. package/dist/capabilities/addon-routes.cap.d.ts.map +1 -0
  15. package/dist/capabilities/addon-settings.cap.d.ts +170 -0
  16. package/dist/capabilities/addon-settings.cap.d.ts.map +1 -0
  17. package/dist/capabilities/addon-widgets-source.cap.d.ts +103 -0
  18. package/dist/capabilities/addon-widgets-source.cap.d.ts.map +1 -0
  19. package/dist/capabilities/addon-widgets.cap.d.ts +98 -0
  20. package/dist/capabilities/addon-widgets.cap.d.ts.map +1 -0
  21. package/dist/capabilities/addons.cap.d.ts +356 -0
  22. package/dist/capabilities/addons.cap.d.ts.map +1 -0
  23. package/dist/capabilities/admin-ui.cap.d.ts +14 -0
  24. package/dist/capabilities/admin-ui.cap.d.ts.map +1 -0
  25. package/dist/capabilities/advanced-notifier.cap.d.ts +60 -0
  26. package/dist/capabilities/advanced-notifier.cap.d.ts.map +1 -0
  27. package/dist/capabilities/alerts.cap.d.ts +164 -0
  28. package/dist/capabilities/alerts.cap.d.ts.map +1 -0
  29. package/dist/capabilities/audio-analysis.cap.d.ts +46 -0
  30. package/dist/capabilities/audio-analysis.cap.d.ts.map +1 -0
  31. package/dist/capabilities/audio-analyzer.cap.d.ts +148 -0
  32. package/dist/capabilities/audio-analyzer.cap.d.ts.map +1 -0
  33. package/dist/capabilities/audio-codec.cap.d.ts +202 -0
  34. package/dist/capabilities/audio-codec.cap.d.ts.map +1 -0
  35. package/dist/capabilities/audio-metrics.cap.d.ts +174 -0
  36. package/dist/capabilities/audio-metrics.cap.d.ts.map +1 -0
  37. package/dist/capabilities/auth-provider.cap.d.ts +49 -0
  38. package/dist/capabilities/auth-provider.cap.d.ts.map +1 -0
  39. package/dist/capabilities/authentication.cap.d.ts +83 -0
  40. package/dist/capabilities/authentication.cap.d.ts.map +1 -0
  41. package/dist/capabilities/backup.cap.d.ts +269 -0
  42. package/dist/capabilities/backup.cap.d.ts.map +1 -0
  43. package/dist/capabilities/battery.cap.d.ts +85 -0
  44. package/dist/capabilities/battery.cap.d.ts.map +1 -0
  45. package/dist/capabilities/brightness.cap.d.ts +64 -0
  46. package/dist/capabilities/brightness.cap.d.ts.map +1 -0
  47. package/dist/capabilities/camera-credentials.cap.d.ts +102 -0
  48. package/dist/capabilities/camera-credentials.cap.d.ts.map +1 -0
  49. package/dist/capabilities/camera-streams.cap.d.ts +214 -0
  50. package/dist/capabilities/camera-streams.cap.d.ts.map +1 -0
  51. package/dist/capabilities/capability-definition.d.ts +474 -0
  52. package/dist/capabilities/capability-definition.d.ts.map +1 -0
  53. package/dist/capabilities/custom-actions.d.ts +47 -0
  54. package/dist/capabilities/custom-actions.d.ts.map +1 -0
  55. package/dist/capabilities/decoder.cap.d.ts +173 -0
  56. package/dist/capabilities/decoder.cap.d.ts.map +1 -0
  57. package/dist/capabilities/detection-pipeline.cap.d.ts +34 -0
  58. package/dist/capabilities/detection-pipeline.cap.d.ts.map +1 -0
  59. package/dist/capabilities/device-discovery.cap.d.ts +247 -0
  60. package/dist/capabilities/device-discovery.cap.d.ts.map +1 -0
  61. package/dist/capabilities/device-manager.cap.d.ts +709 -0
  62. package/dist/capabilities/device-manager.cap.d.ts.map +1 -0
  63. package/dist/capabilities/device-ops.cap.d.ts +87 -0
  64. package/dist/capabilities/device-ops.cap.d.ts.map +1 -0
  65. package/dist/capabilities/device-provider.cap.d.ts +151 -0
  66. package/dist/capabilities/device-provider.cap.d.ts.map +1 -0
  67. package/dist/capabilities/device-state.cap.d.ts +97 -0
  68. package/dist/capabilities/device-state.cap.d.ts.map +1 -0
  69. package/dist/capabilities/device-status.cap.d.ts +54 -0
  70. package/dist/capabilities/device-status.cap.d.ts.map +1 -0
  71. package/dist/capabilities/doorbell.cap.d.ts +62 -0
  72. package/dist/capabilities/doorbell.cap.d.ts.map +1 -0
  73. package/dist/capabilities/embedding-encoder.cap.d.ts +41 -0
  74. package/dist/capabilities/embedding-encoder.cap.d.ts.map +1 -0
  75. package/dist/capabilities/events.cap.d.ts +48 -0
  76. package/dist/capabilities/events.cap.d.ts.map +1 -0
  77. package/dist/capabilities/feature-probe.cap.d.ts +79 -0
  78. package/dist/capabilities/feature-probe.cap.d.ts.map +1 -0
  79. package/dist/capabilities/index.d.ts +191 -0
  80. package/dist/capabilities/index.d.ts.map +1 -0
  81. package/dist/capabilities/integrations.cap.d.ts +182 -0
  82. package/dist/capabilities/integrations.cap.d.ts.map +1 -0
  83. package/dist/capabilities/intercom.cap.d.ts +108 -0
  84. package/dist/capabilities/intercom.cap.d.ts.map +1 -0
  85. package/dist/capabilities/local-network.cap.d.ts +216 -0
  86. package/dist/capabilities/local-network.cap.d.ts.map +1 -0
  87. package/dist/capabilities/log-destination.cap.d.ts +70 -0
  88. package/dist/capabilities/log-destination.cap.d.ts.map +1 -0
  89. package/dist/capabilities/mesh-network.cap.d.ts +160 -0
  90. package/dist/capabilities/mesh-network.cap.d.ts.map +1 -0
  91. package/dist/capabilities/mesh-orchestrator.cap.d.ts +96 -0
  92. package/dist/capabilities/mesh-orchestrator.cap.d.ts.map +1 -0
  93. package/dist/capabilities/metrics-provider.cap.d.ts +522 -0
  94. package/dist/capabilities/metrics-provider.cap.d.ts.map +1 -0
  95. package/dist/capabilities/motion-detection.cap.d.ts +107 -0
  96. package/dist/capabilities/motion-detection.cap.d.ts.map +1 -0
  97. package/dist/capabilities/motion-trigger.cap.d.ts +78 -0
  98. package/dist/capabilities/motion-trigger.cap.d.ts.map +1 -0
  99. package/dist/capabilities/motion.cap.d.ts +122 -0
  100. package/dist/capabilities/motion.cap.d.ts.map +1 -0
  101. package/dist/capabilities/native-object-detection.cap.d.ts +127 -0
  102. package/dist/capabilities/native-object-detection.cap.d.ts.map +1 -0
  103. package/dist/capabilities/network-access.cap.d.ts +67 -0
  104. package/dist/capabilities/network-access.cap.d.ts.map +1 -0
  105. package/dist/capabilities/network-quality.cap.d.ts +95 -0
  106. package/dist/capabilities/network-quality.cap.d.ts.map +1 -0
  107. package/dist/capabilities/nodes.cap.d.ts +200 -0
  108. package/dist/capabilities/nodes.cap.d.ts.map +1 -0
  109. package/dist/capabilities/notification-output.cap.d.ts +44 -0
  110. package/dist/capabilities/notification-output.cap.d.ts.map +1 -0
  111. package/dist/capabilities/osd.cap.d.ts +236 -0
  112. package/dist/capabilities/osd.cap.d.ts.map +1 -0
  113. package/dist/capabilities/pipeline-analytics.cap.d.ts +501 -0
  114. package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -0
  115. package/dist/capabilities/pipeline-executor.cap.d.ts +922 -0
  116. package/dist/capabilities/pipeline-executor.cap.d.ts.map +1 -0
  117. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +793 -0
  118. package/dist/capabilities/pipeline-orchestrator.cap.d.ts.map +1 -0
  119. package/dist/capabilities/pipeline-runner.cap.d.ts +393 -0
  120. package/dist/capabilities/pipeline-runner.cap.d.ts.map +1 -0
  121. package/dist/capabilities/platform-probe.cap.d.ts +168 -0
  122. package/dist/capabilities/platform-probe.cap.d.ts.map +1 -0
  123. package/dist/capabilities/ptz-autotrack.cap.d.ts +188 -0
  124. package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -0
  125. package/dist/capabilities/ptz.cap.d.ts +80 -0
  126. package/dist/capabilities/ptz.cap.d.ts.map +1 -0
  127. package/dist/capabilities/reboot.cap.d.ts +32 -0
  128. package/dist/capabilities/reboot.cap.d.ts.map +1 -0
  129. package/dist/capabilities/recording-engine.cap.d.ts +477 -0
  130. package/dist/capabilities/recording-engine.cap.d.ts.map +1 -0
  131. package/dist/capabilities/recording.cap.d.ts +43 -0
  132. package/dist/capabilities/recording.cap.d.ts.map +1 -0
  133. package/dist/capabilities/remote-access.cap.d.ts +103 -0
  134. package/dist/capabilities/remote-access.cap.d.ts.map +1 -0
  135. package/dist/capabilities/restreamer.cap.d.ts +51 -0
  136. package/dist/capabilities/restreamer.cap.d.ts.map +1 -0
  137. package/dist/capabilities/schemas/detection-shared.d.ts +63 -0
  138. package/dist/capabilities/schemas/detection-shared.d.ts.map +1 -0
  139. package/dist/capabilities/schemas/orchestrator-metrics.d.ts +44 -0
  140. package/dist/capabilities/schemas/orchestrator-metrics.d.ts.map +1 -0
  141. package/dist/capabilities/schemas/streaming-shared.d.ts +177 -0
  142. package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -0
  143. package/dist/capabilities/schemas/zone-rule.d.ts +74 -0
  144. package/dist/capabilities/schemas/zone-rule.d.ts.map +1 -0
  145. package/dist/capabilities/settings-store.cap.d.ts +198 -0
  146. package/dist/capabilities/settings-store.cap.d.ts.map +1 -0
  147. package/dist/capabilities/snapshot-provider.cap.d.ts +40 -0
  148. package/dist/capabilities/snapshot-provider.cap.d.ts.map +1 -0
  149. package/dist/capabilities/snapshot.cap.d.ts +78 -0
  150. package/dist/capabilities/snapshot.cap.d.ts.map +1 -0
  151. package/dist/capabilities/storage-provider.cap.d.ts +432 -0
  152. package/dist/capabilities/storage-provider.cap.d.ts.map +1 -0
  153. package/dist/capabilities/storage.cap.d.ts +367 -0
  154. package/dist/capabilities/storage.cap.d.ts.map +1 -0
  155. package/dist/capabilities/stream-broker.cap.d.ts +416 -0
  156. package/dist/capabilities/stream-broker.cap.d.ts.map +1 -0
  157. package/dist/capabilities/streaming-engine.cap.d.ts +58 -0
  158. package/dist/capabilities/streaming-engine.cap.d.ts.map +1 -0
  159. package/dist/capabilities/switch.cap.d.ts +66 -0
  160. package/dist/capabilities/switch.cap.d.ts.map +1 -0
  161. package/dist/capabilities/system.cap.d.ts +86 -0
  162. package/dist/capabilities/system.cap.d.ts.map +1 -0
  163. package/dist/capabilities/toast.cap.d.ts +56 -0
  164. package/dist/capabilities/toast.cap.d.ts.map +1 -0
  165. package/dist/capabilities/turn-orchestrator.cap.d.ts +74 -0
  166. package/dist/capabilities/turn-orchestrator.cap.d.ts.map +1 -0
  167. package/dist/capabilities/turn-provider.cap.d.ts +43 -0
  168. package/dist/capabilities/turn-provider.cap.d.ts.map +1 -0
  169. package/dist/capabilities/user-management.cap.d.ts +378 -0
  170. package/dist/capabilities/user-management.cap.d.ts.map +1 -0
  171. package/dist/capabilities/webrtc-session.cap.d.ts +181 -0
  172. package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -0
  173. package/dist/capabilities/webrtc.cap.d.ts +72 -0
  174. package/dist/capabilities/webrtc.cap.d.ts.map +1 -0
  175. package/dist/capabilities/zone-analytics.cap.d.ts +213 -0
  176. package/dist/capabilities/zone-analytics.cap.d.ts.map +1 -0
  177. package/dist/capabilities/zone-rules.cap.d.ts +129 -0
  178. package/dist/capabilities/zone-rules.cap.d.ts.map +1 -0
  179. package/dist/capabilities/zones.cap.d.ts +151 -0
  180. package/dist/capabilities/zones.cap.d.ts.map +1 -0
  181. package/dist/catalogs/audio-classmap.d.ts +16 -0
  182. package/dist/catalogs/audio-classmap.d.ts.map +1 -0
  183. package/dist/catalogs/coco-classmap.d.ts.map +1 -1
  184. package/dist/constants.d.ts +50 -0
  185. package/dist/constants.d.ts.map +1 -1
  186. package/dist/deps/binary-downloader.d.ts +41 -0
  187. package/dist/deps/binary-downloader.d.ts.map +1 -0
  188. package/dist/deps/ffmpeg-downloader.d.ts +13 -0
  189. package/dist/deps/ffmpeg-downloader.d.ts.map +1 -0
  190. package/dist/deps/index.d.ts +4 -0
  191. package/dist/deps/index.d.ts.map +1 -0
  192. package/dist/deps/python-downloader.d.ts +34 -0
  193. package/dist/deps/python-downloader.d.ts.map +1 -0
  194. package/dist/device/accessory.d.ts +62 -0
  195. package/dist/device/accessory.d.ts.map +1 -0
  196. package/dist/device/base-device-provider.d.ts +178 -0
  197. package/dist/device/base-device-provider.d.ts.map +1 -0
  198. package/dist/device/base-device.d.ts +287 -0
  199. package/dist/device/base-device.d.ts.map +1 -0
  200. package/dist/device/camera-device.d.ts +49 -0
  201. package/dist/device/camera-device.d.ts.map +1 -0
  202. package/dist/device/device-binding.d.ts +23 -0
  203. package/dist/device/device-binding.d.ts.map +1 -0
  204. package/dist/device/device-config.d.ts +65 -0
  205. package/dist/device/device-config.d.ts.map +1 -0
  206. package/dist/device/device-context.d.ts +256 -0
  207. package/dist/device/device-context.d.ts.map +1 -0
  208. package/dist/device/device-management.d.ts +118 -0
  209. package/dist/device/device-management.d.ts.map +1 -0
  210. package/dist/device/device-profile.d.ts +161 -0
  211. package/dist/device/device-profile.d.ts.map +1 -0
  212. package/dist/device/device-runtime-state.d.ts +124 -0
  213. package/dist/device/device-runtime-state.d.ts.map +1 -0
  214. package/dist/device/device-state-handle.d.ts +161 -0
  215. package/dist/device/device-state-handle.d.ts.map +1 -0
  216. package/dist/device/device-type.d.ts +68 -0
  217. package/dist/device/device-type.d.ts.map +1 -0
  218. package/dist/device/device.d.ts +87 -0
  219. package/dist/device/device.d.ts.map +1 -0
  220. package/dist/device/features.d.ts +29 -0
  221. package/dist/device/features.d.ts.map +1 -0
  222. package/dist/device/index.d.ts +20 -0
  223. package/dist/device/index.d.ts.map +1 -0
  224. package/dist/device/runtime-state-helpers.d.ts +69 -0
  225. package/dist/device/runtime-state-helpers.d.ts.map +1 -0
  226. package/dist/device/system-mirror.d.ts +318 -0
  227. package/dist/device/system-mirror.d.ts.map +1 -0
  228. package/dist/device/zod-to-config-ui.d.ts +23 -0
  229. package/dist/device/zod-to-config-ui.d.ts.map +1 -0
  230. package/dist/disposer-chain.d.ts +32 -0
  231. package/dist/disposer-chain.d.ts.map +1 -0
  232. package/dist/enums/event-category.d.ts +361 -0
  233. package/dist/enums/event-category.d.ts.map +1 -0
  234. package/dist/enums/event-source-type.d.ts +8 -0
  235. package/dist/enums/event-source-type.d.ts.map +1 -0
  236. package/dist/enums/index.d.ts +3 -0
  237. package/dist/enums/index.d.ts.map +1 -0
  238. package/dist/generated/addon-api.d.ts +14604 -3217
  239. package/dist/generated/addon-api.d.ts.map +1 -1
  240. package/dist/generated/cap-status-types.d.ts +51 -0
  241. package/dist/generated/cap-status-types.d.ts.map +1 -0
  242. package/dist/generated/capability-router-map.d.ts +278 -0
  243. package/dist/generated/capability-router-map.d.ts.map +1 -0
  244. package/dist/generated/device-local-state.d.ts +82 -0
  245. package/dist/generated/device-local-state.d.ts.map +1 -0
  246. package/dist/generated/device-proxy.d.ts +146 -0
  247. package/dist/generated/device-proxy.d.ts.map +1 -0
  248. package/dist/generated/system-proxy.d.ts +92 -0
  249. package/dist/generated/system-proxy.d.ts.map +1 -0
  250. package/dist/helpers/bind-addon-actions.d.ts +19 -0
  251. package/dist/helpers/bind-addon-actions.d.ts.map +1 -0
  252. package/dist/index.d.ts +91 -22
  253. package/dist/index.d.ts.map +1 -1
  254. package/dist/index.js +4843 -477
  255. package/dist/index.js.map +1 -1
  256. package/dist/index.mjs +4832 -415
  257. package/dist/index.mjs.map +1 -1
  258. package/dist/interfaces/addon.d.ts +760 -132
  259. package/dist/interfaces/addon.d.ts.map +1 -1
  260. package/dist/interfaces/advanced-notifier.d.ts +3 -2
  261. package/dist/interfaces/advanced-notifier.d.ts.map +1 -1
  262. package/dist/interfaces/agent-protocol.d.ts +17 -173
  263. package/dist/interfaces/agent-protocol.d.ts.map +1 -1
  264. package/dist/interfaces/agent.d.ts +61 -0
  265. package/dist/interfaces/agent.d.ts.map +1 -1
  266. package/dist/interfaces/alerts.d.ts +14 -0
  267. package/dist/interfaces/alerts.d.ts.map +1 -0
  268. package/dist/interfaces/analysis-persistence.d.ts +37 -19
  269. package/dist/interfaces/analysis-persistence.d.ts.map +1 -1
  270. package/dist/interfaces/analysis.d.ts +33 -4
  271. package/dist/interfaces/analysis.d.ts.map +1 -1
  272. package/dist/interfaces/api-responses.d.ts +124 -0
  273. package/dist/interfaces/api-responses.d.ts.map +1 -0
  274. package/dist/interfaces/api-shared.d.ts +5 -79
  275. package/dist/interfaces/api-shared.d.ts.map +1 -1
  276. package/dist/interfaces/audio-analyzer.d.ts +49 -0
  277. package/dist/interfaces/audio-analyzer.d.ts.map +1 -0
  278. package/dist/interfaces/audio-codec.d.ts +123 -0
  279. package/dist/interfaces/audio-codec.d.ts.map +1 -0
  280. package/dist/interfaces/audio-inference-engine.d.ts +19 -0
  281. package/dist/interfaces/audio-inference-engine.d.ts.map +1 -0
  282. package/dist/interfaces/auth-provider.d.ts.map +1 -1
  283. package/dist/interfaces/auth.d.ts +4 -25
  284. package/dist/interfaces/auth.d.ts.map +1 -1
  285. package/dist/interfaces/camera-pipeline.d.ts +7 -20
  286. package/dist/interfaces/camera-pipeline.d.ts.map +1 -1
  287. package/dist/interfaces/capability.d.ts +171 -24
  288. package/dist/interfaces/capability.d.ts.map +1 -1
  289. package/dist/interfaces/config-ui.d.ts +746 -24
  290. package/dist/interfaces/config-ui.d.ts.map +1 -1
  291. package/dist/interfaces/context.d.ts +9 -4
  292. package/dist/interfaces/context.d.ts.map +1 -1
  293. package/dist/interfaces/decoder.d.ts +38 -3
  294. package/dist/interfaces/decoder.d.ts.map +1 -1
  295. package/dist/interfaces/detection-addon.d.ts +6 -6
  296. package/dist/interfaces/detection-addon.d.ts.map +1 -1
  297. package/dist/interfaces/device-capabilities/camera.d.ts +95 -18
  298. package/dist/interfaces/device-capabilities/camera.d.ts.map +1 -1
  299. package/dist/interfaces/device-capabilities/index.d.ts +0 -13
  300. package/dist/interfaces/device-capabilities/index.d.ts.map +1 -1
  301. package/dist/interfaces/device-provider.d.ts +18 -16
  302. package/dist/interfaces/device-provider.d.ts.map +1 -1
  303. package/dist/interfaces/device.d.ts +4 -21
  304. package/dist/interfaces/device.d.ts.map +1 -1
  305. package/dist/interfaces/embedding-encoder.d.ts +19 -0
  306. package/dist/interfaces/embedding-encoder.d.ts.map +1 -0
  307. package/dist/interfaces/engine-slots.d.ts +10 -0
  308. package/dist/interfaces/engine-slots.d.ts.map +1 -0
  309. package/dist/interfaces/event-bus.d.ts +710 -26
  310. package/dist/interfaces/event-bus.d.ts.map +1 -1
  311. package/dist/interfaces/inference-capabilities.d.ts +0 -17
  312. package/dist/interfaces/inference-capabilities.d.ts.map +1 -1
  313. package/dist/interfaces/inference-engine.d.ts +30 -10
  314. package/dist/interfaces/inference-engine.d.ts.map +1 -1
  315. package/dist/interfaces/integration-registry.d.ts +20 -20
  316. package/dist/interfaces/integration-registry.d.ts.map +1 -1
  317. package/dist/interfaces/kernel-abstractions.d.ts +83 -0
  318. package/dist/interfaces/kernel-abstractions.d.ts.map +1 -0
  319. package/dist/interfaces/logging.d.ts +89 -8
  320. package/dist/interfaces/logging.d.ts.map +1 -1
  321. package/dist/interfaces/metrics-provider.d.ts +17 -0
  322. package/dist/interfaces/metrics-provider.d.ts.map +1 -0
  323. package/dist/interfaces/network-quality.d.ts +4 -4
  324. package/dist/interfaces/network.d.ts +0 -16
  325. package/dist/interfaces/network.d.ts.map +1 -1
  326. package/dist/interfaces/notification.d.ts +1 -1
  327. package/dist/interfaces/pipeline-executor-capability.d.ts +200 -0
  328. package/dist/interfaces/pipeline-executor-capability.d.ts.map +1 -0
  329. package/dist/interfaces/pipeline-orchestrator-capability.d.ts +165 -0
  330. package/dist/interfaces/pipeline-orchestrator-capability.d.ts.map +1 -0
  331. package/dist/interfaces/pipeline-runner-capability.d.ts +147 -0
  332. package/dist/interfaces/pipeline-runner-capability.d.ts.map +1 -0
  333. package/dist/interfaces/pipeline-runner.d.ts +18 -2
  334. package/dist/interfaces/pipeline-runner.d.ts.map +1 -1
  335. package/dist/interfaces/platform.d.ts +1 -1
  336. package/dist/interfaces/platform.d.ts.map +1 -1
  337. package/dist/interfaces/queryable.d.ts +26 -0
  338. package/dist/interfaces/queryable.d.ts.map +1 -0
  339. package/dist/interfaces/raw-tensor-engine.d.ts +16 -0
  340. package/dist/interfaces/raw-tensor-engine.d.ts.map +1 -0
  341. package/dist/interfaces/readiness.d.ts +101 -0
  342. package/dist/interfaces/readiness.d.ts.map +1 -0
  343. package/dist/interfaces/repl.d.ts +1 -1
  344. package/dist/interfaces/restreamer.d.ts +3 -3
  345. package/dist/interfaces/scoped-token.d.ts +1 -21
  346. package/dist/interfaces/scoped-token.d.ts.map +1 -1
  347. package/dist/interfaces/server-analysis.d.ts +30 -87
  348. package/dist/interfaces/server-analysis.d.ts.map +1 -1
  349. package/dist/interfaces/storage-location.d.ts +120 -0
  350. package/dist/interfaces/storage-location.d.ts.map +1 -0
  351. package/dist/interfaces/storage.d.ts +124 -50
  352. package/dist/interfaces/storage.d.ts.map +1 -1
  353. package/dist/interfaces/stream-broker.d.ts +285 -17
  354. package/dist/interfaces/stream-broker.d.ts.map +1 -1
  355. package/dist/interfaces/webrtc-provider.d.ts +24 -0
  356. package/dist/interfaces/webrtc-provider.d.ts.map +1 -1
  357. package/dist/node.d.ts +6 -0
  358. package/dist/node.d.ts.map +1 -0
  359. package/dist/node.js +481 -0
  360. package/dist/node.js.map +1 -0
  361. package/dist/node.mjs +443 -0
  362. package/dist/node.mjs.map +1 -0
  363. package/dist/readiness/index.d.ts +3 -0
  364. package/dist/readiness/index.d.ts.map +1 -0
  365. package/dist/readiness/readiness-registry.d.ts +183 -0
  366. package/dist/readiness/readiness-registry.d.ts.map +1 -0
  367. package/dist/schemas/auth-records.d.ts +81 -0
  368. package/dist/schemas/auth-records.d.ts.map +1 -0
  369. package/dist/storage/filesystem-storage-provider.d.ts +37 -0
  370. package/dist/storage/filesystem-storage-provider.d.ts.map +1 -0
  371. package/dist/types/agent-pipeline-settings.d.ts +94 -0
  372. package/dist/types/agent-pipeline-settings.d.ts.map +1 -0
  373. package/dist/types/camera-pipeline.d.ts +58 -0
  374. package/dist/types/camera-pipeline.d.ts.map +1 -0
  375. package/dist/types/detection.d.ts +195 -38
  376. package/dist/types/detection.d.ts.map +1 -1
  377. package/dist/types/device-type.d.ts +4 -0
  378. package/dist/types/device-type.d.ts.map +1 -1
  379. package/dist/types/engine-output.d.ts +24 -0
  380. package/dist/types/engine-output.d.ts.map +1 -0
  381. package/dist/types/io.d.ts +57 -3
  382. package/dist/types/io.d.ts.map +1 -1
  383. package/dist/types/models.d.ts +3 -1
  384. package/dist/types/models.d.ts.map +1 -1
  385. package/dist/types/pipeline-schema.d.ts +15 -72
  386. package/dist/types/pipeline-schema.d.ts.map +1 -1
  387. package/dist/types/pipeline-step.d.ts +201 -0
  388. package/dist/types/pipeline-step.d.ts.map +1 -0
  389. package/dist/types/pipeline.d.ts +24 -1
  390. package/dist/types/pipeline.d.ts.map +1 -1
  391. package/dist/utils/element-config-store.d.ts +29 -0
  392. package/dist/utils/element-config-store.d.ts.map +1 -0
  393. package/dist/utils/err-msg.d.ts +7 -0
  394. package/dist/utils/err-msg.d.ts.map +1 -0
  395. package/dist/utils/json-safe.d.ts +33 -0
  396. package/dist/utils/json-safe.d.ts.map +1 -0
  397. package/dist/utils/mask-url.d.ts +10 -0
  398. package/dist/utils/mask-url.d.ts.map +1 -0
  399. package/dist/utils/ring-buffer.d.ts +16 -0
  400. package/dist/utils/ring-buffer.d.ts.map +1 -0
  401. package/dist/utils/run-inference-step.d.ts +26 -0
  402. package/dist/utils/run-inference-step.d.ts.map +1 -0
  403. package/dist/utils/runtime-mapping.d.ts +88 -0
  404. package/dist/utils/runtime-mapping.d.ts.map +1 -0
  405. package/dist/utils/zone-rule-eval.d.ts +47 -0
  406. package/dist/utils/zone-rule-eval.d.ts.map +1 -0
  407. package/package.json +11 -2
  408. package/dist/__tests__/addon-capability-provider.test.d.ts +0 -2
  409. package/dist/__tests__/addon-capability-provider.test.d.ts.map +0 -1
  410. package/dist/__tests__/addon-declaration.test.d.ts +0 -2
  411. package/dist/__tests__/addon-declaration.test.d.ts.map +0 -1
  412. package/dist/__tests__/capability.test.d.ts +0 -2
  413. package/dist/__tests__/capability.test.d.ts.map +0 -1
  414. package/dist/interfaces/addon-i18n.d.ts +0 -41
  415. package/dist/interfaces/addon-i18n.d.ts.map +0 -1
  416. package/dist/interfaces/classifier.d.ts +0 -8
  417. package/dist/interfaces/classifier.d.ts.map +0 -1
  418. package/dist/interfaces/cropper.d.ts +0 -8
  419. package/dist/interfaces/cropper.d.ts.map +0 -1
  420. package/dist/interfaces/detector.d.ts +0 -8
  421. package/dist/interfaces/detector.d.ts.map +0 -1
  422. package/dist/interfaces/device-capabilities/accessory.d.ts +0 -14
  423. package/dist/interfaces/device-capabilities/accessory.d.ts.map +0 -1
  424. package/dist/interfaces/device-capabilities/audio-detector.d.ts +0 -12
  425. package/dist/interfaces/device-capabilities/audio-detector.d.ts.map +0 -1
  426. package/dist/interfaces/device-capabilities/doorbell.d.ts +0 -10
  427. package/dist/interfaces/device-capabilities/doorbell.d.ts.map +0 -1
  428. package/dist/interfaces/device-capabilities/events.d.ts +0 -47
  429. package/dist/interfaces/device-capabilities/events.d.ts.map +0 -1
  430. package/dist/interfaces/device-capabilities/motion-sensor.d.ts +0 -7
  431. package/dist/interfaces/device-capabilities/motion-sensor.d.ts.map +0 -1
  432. package/dist/interfaces/device-capabilities/native-detection.d.ts +0 -14
  433. package/dist/interfaces/device-capabilities/native-detection.d.ts.map +0 -1
  434. package/dist/interfaces/device-capabilities/object-detector.d.ts +0 -59
  435. package/dist/interfaces/device-capabilities/object-detector.d.ts.map +0 -1
  436. package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts +0 -29
  437. package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts.map +0 -1
  438. package/dist/interfaces/device-capabilities/recording.d.ts +0 -18
  439. package/dist/interfaces/device-capabilities/recording.d.ts.map +0 -1
  440. package/dist/interfaces/device-capabilities/siren.d.ts +0 -8
  441. package/dist/interfaces/device-capabilities/siren.d.ts.map +0 -1
  442. package/dist/interfaces/device-capabilities/status-light.d.ts +0 -7
  443. package/dist/interfaces/device-capabilities/status-light.d.ts.map +0 -1
  444. package/dist/interfaces/device-capabilities/switch.d.ts +0 -8
  445. package/dist/interfaces/device-capabilities/switch.d.ts.map +0 -1
  446. package/dist/interfaces/device-capabilities/two-way-audio.d.ts +0 -8
  447. package/dist/interfaces/device-capabilities/two-way-audio.d.ts.map +0 -1
  448. package/dist/interfaces/device-capability.d.ts +0 -14
  449. package/dist/interfaces/device-capability.d.ts.map +0 -1
  450. package/dist/interfaces/model-catalog.d.ts +0 -25
  451. package/dist/interfaces/model-catalog.d.ts.map +0 -1
  452. package/dist/interfaces/refiner.d.ts +0 -8
  453. package/dist/interfaces/refiner.d.ts.map +0 -1
  454. package/dist/interfaces/repositories.d.ts +0 -20
  455. package/dist/interfaces/repositories.d.ts.map +0 -1
  456. package/dist/interfaces/scene-intelligence.d.ts +0 -21
  457. package/dist/interfaces/scene-intelligence.d.ts.map +0 -1
  458. package/dist/interfaces/storage-backend.d.ts +0 -27
  459. package/dist/interfaces/storage-backend.d.ts.map +0 -1
  460. package/dist/interfaces/worker-protocol.d.ts +0 -110
  461. package/dist/interfaces/worker-protocol.d.ts.map +0 -1
  462. package/dist/schemas/system-settings-schemas.d.ts +0 -27
  463. package/dist/schemas/system-settings-schemas.d.ts.map +0 -1
  464. package/dist/types/benchmark.d.ts +0 -112
  465. package/dist/types/benchmark.d.ts.map +0 -1
  466. package/dist/types/zones.d.ts +0 -48
  467. package/dist/types/zones.d.ts.map +0 -1
@@ -0,0 +1,151 @@
1
+ import { z } from 'zod';
2
+ import { type InferProvider } from './capability-definition.js';
3
+ import { DeviceType } from '../device/device-type.js';
4
+ /**
5
+ * Zone — pure geometry + identity. NO filtering behaviour.
6
+ *
7
+ * Zones describe **where** in the frame the operator wants to flag
8
+ * something; consumer-owned {@link ZoneRule} arrays describe **how**
9
+ * each pipeline stage uses them. Splitting the two means a single
10
+ * polygon "Driveway" can simultaneously back a motion-exclude rule,
11
+ * a detection-include rule on `['car']`, and an occupancy aggregate
12
+ * — without three duplicated polygons.
13
+ *
14
+ * Owned by the orchestrator addon (provider) and mirrored into the
15
+ * `zones` device-state slice on every mutation. Consumers
16
+ * (motion-wasm, pipeline-executor, analytics, admin UI) read either
17
+ * via `api.zones.listZones` (one-shot) or via `dev.state.zones` (live
18
+ * mirror with `onChanged`).
19
+ *
20
+ * Coordinates are normalised fractions of the frame (0–1) so zones
21
+ * survive resolution changes and stream profile switches.
22
+ *
23
+ * `kind` discriminates between full polygons (closed regions used
24
+ * for intrusion / occupancy filters) and tripwires (open 2-point
25
+ * line segments used for cross events). Onboard / firmware-reported
26
+ * zones (Reolink, ONVIF) are out of scope for now — see the deferred
27
+ * task list.
28
+ */
29
+ export declare const ZoneKindEnum: z.ZodEnum<{
30
+ polygon: "polygon";
31
+ tripwire: "tripwire";
32
+ }>;
33
+ export type ZoneKind = z.infer<typeof ZoneKindEnum>;
34
+ /** Polygon vertex in fraction-of-frame coordinates (0–1). */
35
+ export declare const PolygonPointSchema: z.ZodObject<{
36
+ x: z.ZodNumber;
37
+ y: z.ZodNumber;
38
+ }, z.core.$strip>;
39
+ export type PolygonPoint = z.infer<typeof PolygonPointSchema>;
40
+ /** A camera detection zone — pure geometry/identity. */
41
+ export declare const ZoneSchema: z.ZodObject<{
42
+ id: z.ZodString;
43
+ name: z.ZodString;
44
+ kind: z.ZodDefault<z.ZodEnum<{
45
+ polygon: "polygon";
46
+ tripwire: "tripwire";
47
+ }>>;
48
+ polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
49
+ x: z.ZodNumber;
50
+ y: z.ZodNumber;
51
+ }, z.core.$strip>>>;
52
+ color: z.ZodDefault<z.ZodString>;
53
+ }, z.core.$strip>;
54
+ export type Zone = z.infer<typeof ZoneSchema>;
55
+ /**
56
+ * Zones capability — per-camera CRUD over polygon detection zones.
57
+ *
58
+ * Provider lives in `addon-pipeline-orchestrator` (hub-only). Persists
59
+ * to per-device settings and mirrors into the `zones` device-state
60
+ * slice on every mutation, so downstream consumers can subscribe via
61
+ * `dev.state.zones.onChanged`.
62
+ *
63
+ * The cap surface only handles geometry + identity; filtering
64
+ * behaviour (per-class, include/exclude, threshold) lives in the
65
+ * consumer addons' rule arrays — see `ZoneRuleSchema` exported from
66
+ * `capabilities/schemas/zone-rule.js`.
67
+ */
68
+ export declare const zonesCapability: {
69
+ readonly name: "zones";
70
+ readonly scope: "device";
71
+ readonly mode: "singleton";
72
+ readonly deviceTypes: readonly [DeviceType.Camera];
73
+ readonly methods: {
74
+ readonly listZones: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
75
+ deviceId: z.ZodNumber;
76
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
77
+ id: z.ZodString;
78
+ name: z.ZodString;
79
+ kind: z.ZodDefault<z.ZodEnum<{
80
+ polygon: "polygon";
81
+ tripwire: "tripwire";
82
+ }>>;
83
+ polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
84
+ x: z.ZodNumber;
85
+ y: z.ZodNumber;
86
+ }, z.core.$strip>>>;
87
+ color: z.ZodDefault<z.ZodString>;
88
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
89
+ readonly addZone: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
90
+ deviceId: z.ZodNumber;
91
+ zone: z.ZodObject<{
92
+ id: z.ZodString;
93
+ name: z.ZodString;
94
+ kind: z.ZodDefault<z.ZodEnum<{
95
+ polygon: "polygon";
96
+ tripwire: "tripwire";
97
+ }>>;
98
+ polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
99
+ x: z.ZodNumber;
100
+ y: z.ZodNumber;
101
+ }, z.core.$strip>>>;
102
+ color: z.ZodDefault<z.ZodString>;
103
+ }, z.core.$strip>;
104
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
105
+ readonly removeZone: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
106
+ deviceId: z.ZodNumber;
107
+ zoneId: z.ZodString;
108
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
109
+ readonly updateZone: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
110
+ deviceId: z.ZodNumber;
111
+ zone: z.ZodObject<{
112
+ id: z.ZodString;
113
+ name: z.ZodString;
114
+ kind: z.ZodDefault<z.ZodEnum<{
115
+ polygon: "polygon";
116
+ tripwire: "tripwire";
117
+ }>>;
118
+ polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
119
+ x: z.ZodNumber;
120
+ y: z.ZodNumber;
121
+ }, z.core.$strip>>>;
122
+ color: z.ZodDefault<z.ZodString>;
123
+ }, z.core.$strip>;
124
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
125
+ };
126
+ /**
127
+ * Runtime-state slice — the live zone catalogue mirrored by the
128
+ * orchestrator on every CRUD mutation. Consumers read via
129
+ * `device.state.zones.value` / `.watch(...)` without round-tripping
130
+ * the cap, and the codegen DeviceProxy auto-wires the reactive
131
+ * handle. Slice shape is `{ zones: Zone[] }` so future extensions
132
+ * (e.g. zone groupings) can sit alongside the polygon list.
133
+ */
134
+ readonly runtimeState: z.ZodObject<{
135
+ zones: z.ZodReadonly<z.ZodArray<z.ZodObject<{
136
+ id: z.ZodString;
137
+ name: z.ZodString;
138
+ kind: z.ZodDefault<z.ZodEnum<{
139
+ polygon: "polygon";
140
+ tripwire: "tripwire";
141
+ }>>;
142
+ polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
143
+ x: z.ZodNumber;
144
+ y: z.ZodNumber;
145
+ }, z.core.$strip>>>;
146
+ color: z.ZodDefault<z.ZodString>;
147
+ }, z.core.$strip>>>;
148
+ }, z.core.$strip>;
149
+ };
150
+ export type IZonesProvider = InferProvider<typeof zonesCapability>;
151
+ //# sourceMappingURL=zones.cap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zones.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/zones.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY;;;EAAkC,CAAA;AAC3D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAEnD,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,wDAAwD;AACxD,eAAO,MAAM,UAAU;;;;;;;;;;;;iBAQrB,CAAA;AACF,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAE7C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0B1B;;;;;;;OAOG;;;;;;;;;;;;;;;;CAIoC,CAAA;AAEzC,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC,OAAO,eAAe,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Audio classification macro classes — maps 521 YAMNet labels into ~25 actionable categories.
3
+ * Same pattern as COCO_TO_MACRO for video detection.
4
+ *
5
+ * Each macro class aggregates related fine-grained labels so the user
6
+ * sees a manageable set of event types in settings, timelines, and notifications.
7
+ */
8
+ import type { LabelDefinition, ClassMapDefinition } from '../types/labels.js';
9
+ export declare const AUDIO_MACRO_LABELS: readonly LabelDefinition[];
10
+ export declare const YAMNET_TO_MACRO: ClassMapDefinition;
11
+ export declare const APPLE_SA_TO_MACRO: ClassMapDefinition;
12
+ /** Map a raw audio label (YAMNet or Apple SoundAnalysis) to its macro class. Returns null if unmapped. */
13
+ export declare function mapAudioLabelToMacro(label: string): string | null;
14
+ /** Get all macro class IDs */
15
+ export declare function getAudioMacroClassIds(): readonly string[];
16
+ //# sourceMappingURL=audio-classmap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio-classmap.d.ts","sourceRoot":"","sources":["../../src/catalogs/audio-classmap.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAM7E,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EA0B/C,CAAA;AAMV,eAAO,MAAM,eAAe,EAAE,kBA6N7B,CAAA;AAOD,eAAO,MAAM,iBAAiB,EAAE,kBA+B/B,CAAA;AAcD,0GAA0G;AAC1G,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEjE;AAED,8BAA8B;AAC9B,wBAAgB,qBAAqB,IAAI,SAAS,MAAM,EAAE,CAEzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"coco-classmap.d.ts","sourceRoot":"","sources":["../../src/catalogs/coco-classmap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE7E,eAAO,MAAM,cAAc,EAAE,SAAS,eAAe,EAiF3C,CAAA;AAEV,eAAO,MAAM,YAAY,EAAE,SAAS,eAAe,EAIzC,CAAA;AAEV,eAAO,MAAM,aAAa,EAAE,kBAuB3B,CAAA"}
1
+ {"version":3,"file":"coco-classmap.d.ts","sourceRoot":"","sources":["../../src/catalogs/coco-classmap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE7E,eAAO,MAAM,cAAc,EAAE,SAAS,eAAe,EAiF3C,CAAA;AAEV,eAAO,MAAM,YAAY,EAAE,SAAS,eAAe,EAIzC,CAAA;AAEV,eAAO,MAAM,aAAa,EAAE,kBA8B3B,CAAA"}
@@ -1,3 +1,53 @@
1
1
  export declare const HF_REPO = "camstack/camstack-models";
2
2
  export declare const HF_BASE_URL = "https://huggingface.co/camstack/camstack-models/resolve/main";
3
+ /**
4
+ * Shape of {@link RUNTIME_DEFAULTS}. Every key/value is typed explicitly so
5
+ * consumers (ConfigManager.raw, feature accessors, settings-store seeder)
6
+ * can read fields without `as` casts.
7
+ *
8
+ * Iteration via `Object.entries` still yields `[string, RuntimeDefaultsShape[keyof RuntimeDefaultsShape]]`
9
+ * which is assignable to `[string, unknown]` — no change for consumers that
10
+ * only need the iteration behaviour.
11
+ */
12
+ export interface RuntimeDefaultsProvider {
13
+ id: string;
14
+ type: string;
15
+ name: string;
16
+ }
17
+ export interface RuntimeDefaultsShape {
18
+ /** Index signature for dynamic string-path lookups (e.g. ConfigManager.get).
19
+ * Explicit keys below override this with their precise types. */
20
+ [key: string]: unknown;
21
+ 'features.streaming': boolean;
22
+ 'features.notifications': boolean;
23
+ 'features.objectDetection': boolean;
24
+ 'features.remoteAccess': boolean;
25
+ 'features.agentCluster': boolean;
26
+ 'features.smartHome': boolean;
27
+ 'features.recordings': boolean;
28
+ 'features.backup': boolean;
29
+ 'features.repl': boolean;
30
+ 'retention.detectionEventsDays': number;
31
+ 'retention.audioLevelsDays': number;
32
+ 'logging.level': string;
33
+ 'logging.retentionDays': number;
34
+ 'eventBus.ringBufferSize': number;
35
+ 'storage.provider': string;
36
+ 'storage.locations': Record<string, string>;
37
+ 'providers': RuntimeDefaultsProvider[];
38
+ 'recording.segmentDurationSeconds': number;
39
+ 'recording.defaultRetentionDays': number;
40
+ 'ffmpeg.binaryPath': string;
41
+ 'ffmpeg.hwAccel': string;
42
+ 'ffmpeg.threadCount': number;
43
+ 'auth.tokenExpiry': string;
44
+ }
45
+ /**
46
+ * Runtime defaults -- used by ConfigManager.get() for backward compatibility
47
+ * until Plan B wires all runtime settings to the system_settings SQL table.
48
+ *
49
+ * Moved from @camstack/kernel/config-schema to @camstack/types so that
50
+ * @camstack/core can reference it without a cross-package kernel import.
51
+ */
52
+ export declare const RUNTIME_DEFAULTS: RuntimeDefaultsShape;
3
53
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,6BAA6B,CAAA;AACjD,eAAO,MAAM,WAAW,iEAAmD,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,6BAA6B,CAAA;AACjD,eAAO,MAAM,WAAW,iEAAmD,CAAA;AAE3E;;;;;;;;GAQG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC;sEACkE;IAClE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,wBAAwB,EAAE,OAAO,CAAA;IACjC,0BAA0B,EAAE,OAAO,CAAA;IACnC,uBAAuB,EAAE,OAAO,CAAA;IAChC,uBAAuB,EAAE,OAAO,CAAA;IAChC,oBAAoB,EAAE,OAAO,CAAA;IAC7B,qBAAqB,EAAE,OAAO,CAAA;IAC9B,iBAAiB,EAAE,OAAO,CAAA;IAC1B,eAAe,EAAE,OAAO,CAAA;IACxB,+BAA+B,EAAE,MAAM,CAAA;IACvC,2BAA2B,EAAE,MAAM,CAAA;IACnC,eAAe,EAAE,MAAM,CAAA;IACvB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,yBAAyB,EAAE,MAAM,CAAA;IACjC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC3C,WAAW,EAAE,uBAAuB,EAAE,CAAA;IACtC,kCAAkC,EAAE,MAAM,CAAA;IAC1C,gCAAgC,EAAE,MAAM,CAAA;IACxC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,gBAAgB,EAAE,MAAM,CAAA;IACxB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,oBAuC9B,CAAA"}
@@ -0,0 +1,41 @@
1
+ import type { IScopedLogger } from '../index.js';
2
+ export interface PlatformInfo {
3
+ readonly platform: NodeJS.Platform;
4
+ readonly arch: NodeJS.Architecture;
5
+ }
6
+ export declare function getPlatformInfo(): PlatformInfo;
7
+ export declare function buildBinaryPath(dataDir: string, name: string, platform?: string): string;
8
+ /** Check if a binary exists in PATH */
9
+ export declare function findInPath(name: string): string | null;
10
+ export interface DownloadOptions {
11
+ readonly name: string;
12
+ readonly url: string;
13
+ readonly targetDir: string;
14
+ readonly targetName: string;
15
+ readonly logger: IScopedLogger;
16
+ readonly isArchive?: boolean;
17
+ readonly archiveFormat?: 'zip' | 'tar.gz' | 'tar.xz';
18
+ /** Relative path within archive to the binary (e.g., 'ffmpeg-6.1/bin/ffmpeg') */
19
+ readonly archiveInnerPath?: string;
20
+ }
21
+ /**
22
+ * Download a binary to the target directory.
23
+ * Handles archives (zip, tar.gz, tar.xz) and raw binaries.
24
+ */
25
+ export declare function downloadBinary(opts: DownloadOptions): Promise<string>;
26
+ /**
27
+ * Ensure a binary is available. Checks:
28
+ * 1. Target path (already downloaded)
29
+ * 2. System PATH
30
+ * 3. Download from URL
31
+ */
32
+ export declare function ensureBinary(opts: {
33
+ readonly name: string;
34
+ readonly targetDir: string;
35
+ readonly downloadUrl: string;
36
+ readonly logger: IScopedLogger;
37
+ readonly isArchive?: boolean;
38
+ readonly archiveFormat?: 'zip' | 'tar.gz' | 'tar.xz';
39
+ readonly archiveInnerPath?: string;
40
+ }): Promise<string>;
41
+ //# sourceMappingURL=binary-downloader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binary-downloader.d.ts","sourceRoot":"","sources":["../../src/deps/binary-downloader.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,YAAY,CAAA;CACnC;AAED,wBAAgB,eAAe,IAAI,YAAY,CAK9C;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAGxF;AAED,uCAAuC;AACvC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOtD;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACpD,iFAAiF;IACjF,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACnC;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA8D3E;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACpD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACnC,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BlB"}
@@ -0,0 +1,13 @@
1
+ import type { IScopedLogger } from '../index.js';
2
+ export declare function getFfmpegDownloadUrl(platform: string, arch: string): string;
3
+ export declare function getFfmpegArchiveInfo(platform: string): {
4
+ isArchive: boolean;
5
+ archiveFormat: 'zip' | 'tar.gz' | 'tar.xz';
6
+ archiveInnerPath: string;
7
+ };
8
+ /**
9
+ * Ensure ffmpeg binary is available.
10
+ * Checks: deps dir → system PATH → download.
11
+ */
12
+ export declare function ensureFfmpeg(dataDir: string, logger: IScopedLogger): Promise<string>;
13
+ //# sourceMappingURL=ffmpeg-downloader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ffmpeg-downloader.d.ts","sourceRoot":"","sources":["../../src/deps/ffmpeg-downloader.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAKhD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAmB3E;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG;IACtD,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAC1C,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAiBA;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAc1F"}
@@ -0,0 +1,4 @@
1
+ export { ensureBinary, downloadBinary, findInPath, getPlatformInfo, buildBinaryPath } from './binary-downloader.js';
2
+ export { ensureFfmpeg, getFfmpegDownloadUrl } from './ffmpeg-downloader.js';
3
+ export { ensurePython, installPythonPackages, installPythonRequirements, getPythonDownloadUrl, PYTHON_VERSION, } from './python-downloader.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACnH,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC3E,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,GACf,MAAM,wBAAwB,CAAA"}
@@ -0,0 +1,34 @@
1
+ import type { IScopedLogger } from '../index.js';
2
+ export declare const PYTHON_VERSION = "3.12.12";
3
+ export declare function getPythonDownloadUrl(platform: string, arch: string): string;
4
+ /**
5
+ * Ensure the embedded portable Python is available.
6
+ *
7
+ * ALWAYS returns the path to the embedded interpreter under
8
+ * `<dataDir>/deps/python/bin/python3` — downloads it on first call
9
+ * and reuses it thereafter. The system PATH is intentionally NOT
10
+ * consulted: addons rely on `installPythonRequirements()` to manage
11
+ * deps inside the embedded site-packages, and a system interpreter
12
+ * (different version, missing modules) silently breaks that contract.
13
+ *
14
+ * Returns null only if the download/extract step fails.
15
+ */
16
+ export declare function ensurePython(dataDir: string, logger: IScopedLogger): Promise<string | null>;
17
+ /**
18
+ * Install Python packages into the portable Python environment.
19
+ */
20
+ export declare function installPythonPackages(pythonPath: string, packages: readonly string[], logger: IScopedLogger): Promise<void>;
21
+ /**
22
+ * Install a pip requirements file into the embedded Python.
23
+ *
24
+ * Idempotent: keyed on (requirements file basename + sha256 of its
25
+ * contents). The marker is written under
26
+ * `<python-install-dir>/.requirements-installed/` so it lives and
27
+ * dies with the python install — re-downloading python wipes both
28
+ * the site-packages and the markers, forcing a fresh re-install.
29
+ *
30
+ * The marker is updated only after `pip install` succeeds. A failed
31
+ * install never writes a marker, so the next call retries.
32
+ */
33
+ export declare function installPythonRequirements(pythonPath: string, requirementsFile: string, logger: IScopedLogger): Promise<void>;
34
+ //# sourceMappingURL=python-downloader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"python-downloader.d.ts","sourceRoot":"","sources":["../../src/deps/python-downloader.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,eAAO,MAAM,cAAc,YAAY,CAAA;AAGvC,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAe3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAsHjG;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,IAAI,CAAC,CAcf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,MAAM,EAClB,gBAAgB,EAAE,MAAM,EACxB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,IAAI,CAAC,CAwCf"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Accessory device helpers — shared across drivers.
3
+ *
4
+ * Many vendor-specific drivers register accessory child devices on
5
+ * top of a parent (Reolink: siren / floodlight / PIR / autotrack /
6
+ * chime; ONVIF: relay outputs; future: Tapo Hub child devices). Each
7
+ * driver picks the right `DeviceType` + `DeviceRole` explicitly when
8
+ * spawning, builds a name derived from the parent, and produces a
9
+ * stableId tied to the parent so boot-restore can reconstruct the
10
+ * relationship.
11
+ *
12
+ * Centralised `(kind → DeviceType)` mapping was dropped on purpose:
13
+ * drivers may reasonably disagree on the right type for an accessory
14
+ * (a Reolink PIR exposes a switch on/off + sensitivity, while a hypothetical
15
+ * read-only motion-only sensor might be `DeviceType.Sensor`). Forcing
16
+ * one canonical mapping was over-prescriptive and added a layer of
17
+ * indirection without saving meaningful code at call sites — the
18
+ * driver knows its own hardware best.
19
+ */
20
+ import { DeviceRole } from './device-type.js';
21
+ /**
22
+ * Subset of `DeviceRole` values that drivers register as child
23
+ * accessories of a parent device. Sourced verbatim from `DeviceRole`
24
+ * — `AccessoryKind` is the alias drivers use when building accessory
25
+ * children, so the call site reads as
26
+ * `accessoryStableId(parent, AccessoryKind.Siren)` rather than
27
+ * `accessoryStableId(parent, DeviceRole.Siren)` (which would imply
28
+ * any role works, including non-accessory ones like Doorbell).
29
+ */
30
+ export declare const AccessoryKind: {
31
+ readonly Siren: DeviceRole.Siren;
32
+ readonly Floodlight: DeviceRole.Floodlight;
33
+ readonly Spotlight: DeviceRole.Spotlight;
34
+ readonly PirSensor: DeviceRole.PirSensor;
35
+ readonly Chime: DeviceRole.Chime;
36
+ readonly Autotrack: DeviceRole.Autotrack;
37
+ readonly Nightvision: DeviceRole.Nightvision;
38
+ readonly PrivacyMask: DeviceRole.PrivacyMask;
39
+ };
40
+ export type AccessoryKindValue = typeof AccessoryKind[keyof typeof AccessoryKind];
41
+ /**
42
+ * Default English label for each accessory kind. Drivers append this
43
+ * to the parent's name — e.g. `"Living Room Siren"` for a camera named
44
+ * `"Living Room"`. Localisation lives in the UI layer; the driver only
45
+ * has to surface a stable English name.
46
+ */
47
+ export declare const ACCESSORY_LABEL: Record<AccessoryKindValue, string>;
48
+ /**
49
+ * Canonical stableId for an accessory child. Format: `${parent}:${role}`
50
+ * for single-instance accessories; drivers that need multiple instances
51
+ * of the same kind (e.g. wireless chimes) pass an extra `index` token
52
+ * which the helper appends as `:${index}`.
53
+ *
54
+ * The stableId is the persistence key the device-manager uses to
55
+ * resolve `(addonId, stableId) → numeric id` across reboots, so it
56
+ * MUST be stable across runs. Using the parent's stableId + the role
57
+ * meets this — a driver can re-create children deterministically as
58
+ * long as the parent's stableId is also stable (which the platform
59
+ * already guarantees).
60
+ */
61
+ export declare function accessoryStableId(parentStableId: string, kind: AccessoryKindValue, index?: number): string;
62
+ //# sourceMappingURL=accessory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessory.d.ts","sourceRoot":"","sources":["../../src/device/accessory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;;;;;;;;;CAShB,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAAG,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;AAEjF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAS9D,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,kBAAkB,EACxB,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAGR"}
@@ -0,0 +1,178 @@
1
+ import type { ProviderRegistration, ConfigUISchema, SavedDevice, IDevice } from '../index.js';
2
+ import { BaseAddon } from '../addon/base-addon.js';
3
+ import { DeviceType } from './device-type.js';
4
+ import type { CreateDeviceSpec } from './device-management.js';
5
+ import type { DeviceConstructor } from './device-context.js';
6
+ export interface DiscoveryCandidate {
7
+ readonly stableId: string;
8
+ readonly type: DeviceType;
9
+ readonly suggestedName: string;
10
+ readonly prefilledConfig: Record<string, unknown>;
11
+ }
12
+ export interface DeviceSummary {
13
+ readonly id: number;
14
+ readonly stableId: string;
15
+ readonly addonId: string;
16
+ readonly type: string;
17
+ readonly name: string;
18
+ readonly parentDeviceId: number | null;
19
+ readonly online: boolean;
20
+ readonly features: readonly string[];
21
+ readonly config: Record<string, unknown>;
22
+ }
23
+ export interface ProviderStatus {
24
+ readonly connected: boolean;
25
+ readonly deviceCount: number;
26
+ readonly error?: string;
27
+ }
28
+ export interface FieldProbeResult {
29
+ readonly status: 'ok' | 'error';
30
+ readonly labels?: readonly string[];
31
+ readonly error?: string;
32
+ /**
33
+ * Optional values the provider suggests applying to other form fields
34
+ * after a successful probe. The form-builder merges these into the
35
+ * working snapshot ONLY for fields the operator hasn't filled yet,
36
+ * never overwriting user input. Typical use: a host-probe that
37
+ * autodetects the camera model and proposes it as the device `name`.
38
+ */
39
+ readonly suggestedValues?: Readonly<Record<string, unknown>>;
40
+ }
41
+ /**
42
+ * Convert an IDevice to the flat DeviceSummary shape expected by the
43
+ * device-provider cap router. Shared across all providers.
44
+ */
45
+ export declare function toDeviceSummary(device: IDevice, addonId: string): DeviceSummary;
46
+ /**
47
+ * Base class for device-provider addons (rtsp, onvif, frigate).
48
+ *
49
+ * Provides default implementations for the common device-provider cap
50
+ * methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
51
+ * `supportsManualCreation`, `toDeviceSummary`). Subclasses override the
52
+ * methods that differ per provider.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * class RtspProvider extends BaseDeviceProvider {
57
+ * protected readonly addonId = 'provider-rtsp'
58
+ * protected readonly providerName = 'RTSP'
59
+ *
60
+ * protected async onCreateDevice(input) { ... }
61
+ * protected async onGetCreationSchema(type) { ... }
62
+ * protected async onRestoreDevices(saved) { ... }
63
+ * }
64
+ * ```
65
+ */
66
+ export declare abstract class BaseDeviceProvider<TConfig extends object = Record<string, unknown>> extends BaseAddon<TConfig> {
67
+ /** Addon ID used in DeviceSummary. Must match package.json id. */
68
+ protected abstract readonly addonId: string;
69
+ /** Human-readable provider name for log messages. */
70
+ protected abstract readonly providerName: string;
71
+ protected onInitialize(): Promise<ProviderRegistration[]>;
72
+ protected onShutdown(): Promise<void>;
73
+ start(): Promise<void>;
74
+ stop(): Promise<void>;
75
+ getStatus(): Promise<ProviderStatus>;
76
+ getDevices(): Promise<ReadonlyArray<{
77
+ id: string;
78
+ name: string;
79
+ type: string;
80
+ }>>;
81
+ supportsDiscovery(): Promise<boolean>;
82
+ discoverDevices(): Promise<readonly DiscoveryCandidate[]>;
83
+ adoptDiscoveredDevice(_input: {
84
+ candidate: DiscoveryCandidate;
85
+ }): Promise<DeviceSummary>;
86
+ supportsManualCreation(): Promise<boolean>;
87
+ getChildCreationSchema(input: {
88
+ type: DeviceType;
89
+ }): Promise<ConfigUISchema | null>;
90
+ /**
91
+ * Default kernel-orchestrated `createDevice` implementation. The
92
+ * subclass's `onCreateDevice` returns a declarative
93
+ * `CreateDeviceSpec` (`{meta, config}`) — this method handles
94
+ * stableId generation, class lookup, kernel.devices.create
95
+ * dispatch, and DeviceSummary mapping. Subclasses should NOT
96
+ * override this method; override `onCreateDevice` and
97
+ * `deviceClasses` instead.
98
+ */
99
+ createDevice(input: {
100
+ type: DeviceType;
101
+ config: Record<string, unknown>;
102
+ }): Promise<DeviceSummary>;
103
+ /**
104
+ * Generate a stableId for a newly-created device. Default uses the
105
+ * `${addonId}-${Date.now()}` pattern as a unique-but-opaque
106
+ * fallback; any provider that has access to durable hardware
107
+ * identity (UID, MAC, serial) should override and derive from it
108
+ * so re-adding the same physical device reuses its persisted row.
109
+ *
110
+ * `config` is the parsed CreateDeviceSpec.config the subclass
111
+ * returned from `onCreateDevice` — the override has access to
112
+ * every operator-supplied + autodetect-resolved field. Optional
113
+ * for back-compat: existing overrides that take only `type`
114
+ * keep working unchanged.
115
+ */
116
+ protected generateStableId(_type: DeviceType, _config?: Record<string, unknown>): string;
117
+ testCreationField(_input: {
118
+ type: DeviceType;
119
+ key: string;
120
+ value: unknown;
121
+ formValues?: Record<string, unknown>;
122
+ }): Promise<FieldProbeResult>;
123
+ restoreDevices(savedDevices: readonly SavedDevice[]): Promise<void>;
124
+ /**
125
+ * Concrete device classes this provider can spawn, keyed by
126
+ * `DeviceType`. Used by:
127
+ * - `createDevice` to look up the class for the type the operator
128
+ * selected in the Add-Device modal
129
+ * - the default `onRestoreDevices` to instantiate persisted rows
130
+ * based on their `type` field
131
+ *
132
+ * Required for the declarative create + restore flow. Providers
133
+ * that need custom-arg constructors (accessory child devices) wire
134
+ * those up via `BaseDevice.getAccessoryChildren()` instead — the
135
+ * top-level type → class map only handles parent devices.
136
+ */
137
+ protected abstract readonly deviceClasses: Partial<Record<DeviceType, DeviceConstructor<IDevice>>>;
138
+ /** Return the creation form schema for a given device type, or null if unsupported. */
139
+ protected abstract onGetCreationSchema(type: DeviceType): Promise<ConfigUISchema | null>;
140
+ /**
141
+ * Build the create spec from operator-supplied form values. Returns
142
+ * `{meta, config}` — kernel handles allocateId, persist, instantiate,
143
+ * register, and accessory auto-spawn. Provider's only job is to:
144
+ * - validate / probe the input
145
+ * - emit the meta (`type`, `name`, optional `location`)
146
+ * - emit the `config` blob the device class will self-hydrate
147
+ */
148
+ protected abstract onCreateDevice(type: DeviceType, config: Record<string, unknown>): Promise<CreateDeviceSpec>;
149
+ /**
150
+ * Restore devices from persisted state. Two-pass:
151
+ *
152
+ * 1. **Top-level pass** — invokes `kernel.devices.create()` for every
153
+ * `parentDeviceId === null` row using the `deviceClasses` map.
154
+ * The kernel's register flow handles `getAccessoryChildren()` for
155
+ * each parent (siren / floodlight / PIR / etc).
156
+ *
157
+ * 2. **Hub-adopted children pass** — for rows with
158
+ * `parentDeviceId !== null` whose `type` IS in `deviceClasses`
159
+ * (e.g. Reolink hub-adopted cameras under an NVR), spawn them
160
+ * explicitly with the persisted `parentDeviceId`. These are
161
+ * NOT accessory children — they're first-class adopted devices
162
+ * that just happen to have a parent. Without this pass, every
163
+ * server restart would lose hub-adopted cameras (their type is
164
+ * in `deviceClasses` but parent's `getAccessoryChildren` doesn't
165
+ * spawn them — that callback is only for purpose-built
166
+ * accessory roles).
167
+ *
168
+ * Rows whose `type` is NOT in `deviceClasses` are skipped — those
169
+ * are accessory children (siren/light/sensor) that the kernel's
170
+ * accessory-spawn flow handles via the parent's
171
+ * `getAccessoryChildren()`. Override only when the default doesn't
172
+ * fit.
173
+ */
174
+ protected onRestoreDevices(savedDevices: readonly SavedDevice[]): Promise<void>;
175
+ /** Convert an IDevice to the flat DeviceSummary for the cap router. */
176
+ protected toSummary(device: IDevice): DeviceSummary;
177
+ }
178
+ //# sourceMappingURL=base-device-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-device-provider.d.ts","sourceRoot":"","sources":["../../src/device/base-device-provider.ts"],"names":[],"mappings":"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"}