@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
@@ -1,9 +1,5 @@
1
- /**
2
- * All location types that storage providers can serve.
3
- * Each type maps to a logical category of files.
4
- * A storage provider declares which location types it supports.
5
- */
6
- export type StorageLocationType = 'recordings-high' | 'recordings-low' | 'recordings-clips' | 'event-images' | 'models' | 'addons-data' | 'cache' | 'logs';
1
+ export type { StorageLocationType } from './storage-location.js';
2
+ import type { StorageLocationType } from './storage-location.js';
7
3
  /** All location types as an array (for iteration) */
8
4
  export declare const STORAGE_LOCATION_TYPES: readonly StorageLocationType[];
9
5
  /** Default subdirectory names for filesystem storage */
@@ -13,60 +9,128 @@ export declare const DEFAULT_LOCATION_SUBDIRS: Readonly<Record<StorageLocationTy
13
9
  * Multiple providers can coexist (local filesystem, NAS, S3, etc.).
14
10
  * Each addon/system setting selects which provider to use per location type.
15
11
  */
12
+ export interface StorageResolveInput {
13
+ readonly location: StorageLocationType;
14
+ readonly relativePath: string;
15
+ }
16
+ export interface StorageWriteInput {
17
+ readonly location: StorageLocationType;
18
+ readonly relativePath: string;
19
+ readonly data: Buffer | NodeJS.ReadableStream;
20
+ }
21
+ export interface StorageReadInput {
22
+ readonly location: StorageLocationType;
23
+ readonly relativePath: string;
24
+ }
25
+ export interface StorageExistsInput {
26
+ readonly location: StorageLocationType;
27
+ readonly relativePath: string;
28
+ }
29
+ export interface StorageListInput {
30
+ readonly location: StorageLocationType;
31
+ readonly prefix?: string;
32
+ }
33
+ export interface StorageDeleteInput {
34
+ readonly location: StorageLocationType;
35
+ readonly relativePath: string;
36
+ }
37
+ export interface StorageAvailableSpaceInput {
38
+ readonly location: StorageLocationType;
39
+ }
16
40
  export interface IStorageProvider {
17
- /** Unique provider ID (e.g., 'local', 'nas-synology', 's3-aws') */
18
41
  readonly id: string;
19
- /** Human-readable name (e.g., 'Local Filesystem', 'Synology NAS') */
20
42
  readonly name: string;
21
- /** Which location types this provider serves */
22
43
  readonly supportedLocations: readonly StorageLocationType[];
23
- /** Resolve an absolute path/URL for a file within a location */
24
- resolve(location: StorageLocationType, relativePath: string): string;
25
- /** Write file data */
26
- write(location: StorageLocationType, relativePath: string, data: Buffer | NodeJS.ReadableStream): Promise<void>;
27
- /** Read file data */
28
- read(location: StorageLocationType, relativePath: string): Promise<Buffer>;
29
- /** Check if a file exists */
30
- exists(location: StorageLocationType, relativePath: string): Promise<boolean>;
31
- /** List files/directories under a prefix within a location */
32
- list(location: StorageLocationType, prefix?: string): Promise<readonly string[]>;
33
- /** Delete a file */
34
- delete(location: StorageLocationType, relativePath: string): Promise<void>;
35
- /** Get available space in bytes, null if unknown (e.g., S3) */
36
- getAvailableSpace(location: StorageLocationType): Promise<number | null>;
37
- /** Lifecycle */
38
- initialize(): Promise<void>;
39
- shutdown(): Promise<void>;
44
+ resolve(input: StorageResolveInput): string;
45
+ write(input: StorageWriteInput): Promise<void>;
46
+ read(input: StorageReadInput): Promise<Buffer>;
47
+ exists(input: StorageExistsInput): Promise<boolean>;
48
+ list(input: StorageListInput): Promise<readonly string[]>;
49
+ delete(input: StorageDeleteInput): Promise<void>;
50
+ getAvailableSpace(input: StorageAvailableSpaceInput): Promise<number | null>;
40
51
  }
41
52
  /**
42
53
  * All named collections that the settings backend manages.
43
54
  * Each collection maps to a logical table/bucket in the backend.
44
55
  */
45
- export type SettingsCollection = 'system-settings' | 'addon-settings' | 'provider-settings' | 'device-settings' | 'detection-events' | 'audio-levels' | 'track-trails' | 'recording-segments' | 'recording-thumbnails' | 'recording-policies' | 'recording-storage-config' | 'recording-cleanup-queue' | 'known-faces';
56
+ export type SettingsCollection = 'system-settings' | 'addon-settings' | 'provider-settings' | 'device-settings' | 'detection-events' | 'audio-levels' | 'track-trails' | 'recording-segments' | 'recording-thumbnails' | 'recording-policies' | 'recording-storage-config' | 'recording-cleanup-queue' | 'known-faces' | (string & {});
57
+ export interface SettingsGetInput {
58
+ readonly namespace?: string;
59
+ readonly collection: SettingsCollection;
60
+ readonly key: string;
61
+ }
62
+ export interface SettingsSetInput {
63
+ readonly namespace?: string;
64
+ readonly collection: SettingsCollection;
65
+ readonly key: string;
66
+ readonly value: unknown;
67
+ }
68
+ export interface SettingsQueryInput {
69
+ readonly namespace?: string;
70
+ readonly collection: SettingsCollection;
71
+ readonly filter?: QueryFilter;
72
+ }
73
+ export interface SettingsInsertInput<T extends object = Record<string, unknown>> {
74
+ readonly namespace?: string;
75
+ readonly collection: SettingsCollection;
76
+ readonly record: SettingsRecord<T>;
77
+ }
78
+ export interface SettingsUpdateInput {
79
+ readonly namespace?: string;
80
+ readonly collection: SettingsCollection;
81
+ readonly id: string;
82
+ readonly data: Record<string, unknown>;
83
+ }
84
+ export interface SettingsDeleteInput {
85
+ readonly namespace?: string;
86
+ readonly collection: SettingsCollection;
87
+ readonly key: string;
88
+ }
89
+ export interface SettingsCountInput {
90
+ readonly namespace?: string;
91
+ readonly collection: SettingsCollection;
92
+ readonly filter?: QueryFilter;
93
+ }
94
+ export interface SettingsIsEmptyInput {
95
+ readonly namespace?: string;
96
+ readonly collection: SettingsCollection;
97
+ }
46
98
  /**
47
99
  * Settings backend — persistent key-value and document storage.
48
100
  * Default implementation: SQLite. Can be replaced by Postgres, etc.
101
+ * All methods use object-arg signatures for extensibility.
49
102
  */
50
103
  export interface ISettingsBackend {
51
104
  /** Get a single value by key from a collection */
52
- get(collection: SettingsCollection, key: string): Promise<unknown>;
105
+ get(input: SettingsGetInput): Promise<unknown>;
53
106
  /** Set a value by key in a collection (upsert) */
54
- set(collection: SettingsCollection, key: string, value: unknown): Promise<void>;
107
+ set(input: SettingsSetInput): Promise<void>;
55
108
  /** Get all entries matching an optional filter */
56
- query(collection: SettingsCollection, filter?: QueryFilter): Promise<readonly SettingsRecord[]>;
109
+ query<T extends object = Record<string, unknown>>(input: SettingsQueryInput): Promise<readonly SettingsRecord<T>[]>;
57
110
  /** Insert a new record */
58
- insert(collection: SettingsCollection, record: SettingsRecord): Promise<void>;
111
+ insert<T extends object = Record<string, unknown>>(input: SettingsInsertInput<T>): Promise<void>;
59
112
  /** Update an existing record by ID */
60
- update(collection: SettingsCollection, id: string, data: Record<string, unknown>): Promise<void>;
113
+ update(input: SettingsUpdateInput): Promise<void>;
61
114
  /** Delete a record by key/ID */
62
- delete(collection: SettingsCollection, key: string): Promise<void>;
115
+ delete(input: SettingsDeleteInput): Promise<void>;
63
116
  /** Count entries in a collection */
64
- count(collection: SettingsCollection, filter?: QueryFilter): Promise<number>;
117
+ count(input: SettingsCountInput): Promise<number>;
65
118
  /** Check if a collection is empty (used for first-boot detection) */
66
- isEmpty(collection: SettingsCollection): Promise<boolean>;
67
- /** Lifecycle */
68
- initialize(): Promise<void>;
69
- shutdown(): Promise<void>;
119
+ isEmpty(input: SettingsIsEmptyInput): Promise<boolean>;
120
+ /**
121
+ * Declare a typed (SQL-backed) collection. After declaration, the
122
+ * standard `insert` / `update` / `delete` / `query` methods route to
123
+ * typed columns for this collection instead of the JSON-blob default.
124
+ * Idempotent — re-declaring the same shape is a no-op. Backends
125
+ * without typed-table support should implement this as a no-op so
126
+ * the cap contract stays uniform.
127
+ */
128
+ declareCollection(input: {
129
+ namespace?: string;
130
+ collection: string;
131
+ columns: readonly import('../capabilities/settings-store.cap.js').CollectionColumn[];
132
+ indexes?: readonly import('../capabilities/settings-store.cap.js').CollectionIndex[];
133
+ }): Promise<void>;
70
134
  /** Ensure a structured table exists (CREATE TABLE IF NOT EXISTS) */
71
135
  ensureTable?(table: string, schema: TableSchema): Promise<void>;
72
136
  /** Insert a row into a structured table */
@@ -82,9 +146,9 @@ export interface ISettingsBackend {
82
146
  /** Count rows matching a filter */
83
147
  tableCount?(table: string, filter?: Record<string, unknown>): Promise<number>;
84
148
  }
85
- export interface SettingsRecord {
149
+ export interface SettingsRecord<T extends object = Record<string, unknown>> {
86
150
  readonly id: string;
87
- readonly data: Record<string, unknown>;
151
+ readonly data: T;
88
152
  }
89
153
  export interface QueryFilter {
90
154
  where?: Record<string, unknown>;
@@ -181,19 +245,21 @@ export interface EmbeddingFilter {
181
245
  /** Filter by device */
182
246
  readonly deviceId?: string;
183
247
  }
184
- /** @deprecated Use StorageLocationType instead */
185
- export type StorageLocationName = StorageLocationType | 'data' | 'media' | 'recordings' | 'config' | 'events' | 'addon';
186
- /** @deprecated Use IStorageProvider instead */
187
- export interface StorageConfig {
188
- locations: Record<string, string>;
189
- }
190
- /** @deprecated Use SettingsRecord instead */
248
+ /**
249
+ * A document record in collection-based storage.
250
+ * Used by IStructuredStorage and ElementConfigStore.
251
+ * New code should prefer ISettingsBackend + SettingsRecord.
252
+ */
191
253
  export interface StorageRecord {
192
254
  collection: string;
193
255
  id: string;
194
256
  data: Record<string, unknown>;
195
257
  }
196
- /** @deprecated Use ISettingsBackend instead */
258
+ /**
259
+ * Collection-based document storage (query, insert, update, delete).
260
+ * Used by ElementConfigStore and StorageManager shim layer.
261
+ * New code should prefer ISettingsBackend.
262
+ */
197
263
  export interface IStructuredStorage {
198
264
  query(collection: string, filter?: QueryFilter): Promise<readonly StorageRecord[]>;
199
265
  insert(record: StorageRecord): Promise<StorageRecord>;
@@ -201,7 +267,11 @@ export interface IStructuredStorage {
201
267
  delete(collection: string, id: string): Promise<void>;
202
268
  count(collection: string, filter?: QueryFilter): Promise<number>;
203
269
  }
204
- /** @deprecated Use IStorageProvider.read/write instead */
270
+ /**
271
+ * File-based storage operations.
272
+ * Used by StorageManager and addons for media/model files.
273
+ * New code should prefer IStorageProvider.
274
+ */
205
275
  export interface IFileStorage {
206
276
  readFile(path: string): Promise<Buffer>;
207
277
  writeFile(path: string, data: Buffer): Promise<void>;
@@ -210,7 +280,11 @@ export interface IFileStorage {
210
280
  getFileUrl(path: string): Promise<string>;
211
281
  exists(path: string): Promise<boolean>;
212
282
  }
213
- /** @deprecated Use IStorageProvider instead */
283
+ /**
284
+ * Combined storage location with optional structured + file storage.
285
+ * Used by StorageManager.getLocation() and ElementConfigStore.
286
+ * New code should prefer IStorageProvider + ISettingsBackend.
287
+ */
214
288
  export interface IStorageLocation {
215
289
  structured?: IStructuredStorage;
216
290
  files?: IFileStorage;
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/interfaces/storage.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAA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U,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrD,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CACjE;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACvC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAA;IACtD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACzC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,kBAAkB,CAAA;IAC/B,KAAK,CAAC,EAAE,YAAY,CAAA;CACrB"}
@@ -1,10 +1,72 @@
1
+ import { z } from 'zod';
2
+ import type { FrameFormat } from '../types/io.js';
3
+ export declare const DecoderStatsSchema: z.ZodObject<{
4
+ inputFps: z.ZodNumber;
5
+ outputFps: z.ZodNumber;
6
+ avgDecodeTimeMs: z.ZodNumber;
7
+ droppedFrames: z.ZodNumber;
8
+ }, z.core.$strip>;
9
+ export declare const DecoderSessionConfigSchema: z.ZodObject<{
10
+ codec: z.ZodString;
11
+ maxFps: z.ZodDefault<z.ZodNumber>;
12
+ outputFormat: z.ZodDefault<z.ZodEnum<{
13
+ jpeg: "jpeg";
14
+ rgb: "rgb";
15
+ bgr: "bgr";
16
+ yuv420: "yuv420";
17
+ gray: "gray";
18
+ }>>;
19
+ scale: z.ZodDefault<z.ZodNumber>;
20
+ width: z.ZodOptional<z.ZodNumber>;
21
+ height: z.ZodOptional<z.ZodNumber>;
22
+ deviceId: z.ZodOptional<z.ZodNumber>;
23
+ tag: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>;
1
25
  export type Unsubscribe = () => void;
26
+ /**
27
+ * Discriminator for `StreamSource.type`. Values that the broker
28
+ * understands today:
29
+ *
30
+ * - `'rtsp'` — pull mode. Broker connects to a `rtsp://` URL,
31
+ * demuxes RTP, exposes raw RTP via `onVideoRtp`.
32
+ * - `'rtmp'` — pull mode. Broker connects to a `rtmp://` URL,
33
+ * demuxes flv into AnnexB packets. No source RTP
34
+ * available (RTMP carries no RTP), so the WebRTC
35
+ * path falls back to AnnexB → writeVideoNals.
36
+ * Reserved — implementation pending.
37
+ * - `'push'` — push mode. Provider addon delivers AnnexB packets
38
+ * via `pushEncodedPacket()` (Reolink Baichuan,
39
+ * Frigate event streams, etc.).
40
+ * - `'push-rtp'` — push mode with raw RTP packets. Provider addon
41
+ * delivers source RTP via `pushVideoRtp()` AND
42
+ * AnnexB-equivalents via `pushEncodedPacket()` so
43
+ * downstream consumers (decoder, restreamer) keep
44
+ * working. Lets the WebRTC path use the H.265
45
+ * repacketizer for push-mode H.265 streams. Reserved
46
+ * — implementation pending.
47
+ * - `'placeholder'` — silent black-image placeholder reader.
48
+ *
49
+ * String type instead of a literal union so addons remain free to
50
+ * add new source types — the broker's switch statement falls through
51
+ * to "data is pushed externally" for unknown values.
52
+ */
53
+ export type StreamSourceType = 'rtsp' | 'rtmp' | 'push' | 'push-rtp' | 'rfc4571' | 'placeholder' | (string & {});
2
54
  export interface StreamSource {
3
- readonly type: string;
55
+ readonly type: StreamSourceType;
56
+ /** Stream URL — required for pull-based sources (rtsp, rtmp). Not used for push sources. */
4
57
  readonly url: string;
5
58
  readonly videoCodec?: string;
6
59
  readonly audioCodec?: string;
7
60
  readonly metadata?: Readonly<Record<string, unknown>>;
61
+ /**
62
+ * Push-source flag — when true, a stall in the input stream is
63
+ * treated as a valid suspension (battery cameras intentionally go
64
+ * silent between motion events) rather than an error. The broker
65
+ * stops emitting the black-image placeholder and pauses the watchdog
66
+ * until the next packet arrives. Default: false (legacy behaviour —
67
+ * stall is an error).
68
+ */
69
+ readonly allowStall?: boolean;
8
70
  }
9
71
  export interface StreamSourceOption {
10
72
  readonly id: string;
@@ -23,12 +85,40 @@ export interface EncodedPacket {
23
85
  readonly dts: number;
24
86
  readonly keyframe: boolean;
25
87
  readonly codec: string;
88
+ /**
89
+ * `true` when the packet was synthesized by the broker's placeholder
90
+ * pump (state-aware "RECONNECTING" / "SLEEPING" / etc. keyframes
91
+ * pushed at 1Hz while no real RTP is flowing). Consumers that
92
+ * accumulate per-stream codec state (sticky SPS/PPS, decoder config)
93
+ * MUST treat these as throwaway: the placeholder is a different
94
+ * resolution and parameter set than the live camera, so caching its
95
+ * SPS/PPS and prepending them to real keyframes silently corrupts
96
+ * the decoder state and freezes the WebRTC viewer on the last
97
+ * placeholder until the consumer is re-created. Absent on packets
98
+ * produced from real source data.
99
+ */
100
+ readonly isPlaceholder?: boolean;
101
+ }
102
+ /**
103
+ * Audio metadata declared by push-source providers before they emit the
104
+ * first audio `EncodedPacket`. Mirrors the slice of an SDP audio track
105
+ * the broker actually consumes — `codec` is canonical lowercase
106
+ * ('aac' | 'opus' | 'pcmu' | 'pcma' | ...).
107
+ *
108
+ * `extraData` carries codec-specific config bytes (e.g. AAC
109
+ * AudioSpecificConfig) when the codec needs them at decoder-init time.
110
+ */
111
+ export interface PushAudioInfo {
112
+ readonly codec: string;
113
+ readonly sampleRate: number;
114
+ readonly channels: number;
115
+ readonly extraData?: Uint8Array;
26
116
  }
27
117
  export interface DecodedFrame {
28
118
  readonly data: Buffer;
29
119
  readonly width: number;
30
120
  readonly height: number;
31
- readonly format: 'jpeg' | 'rgb' | 'yuv420';
121
+ readonly format: FrameFormat;
32
122
  readonly timestamp: number;
33
123
  }
34
124
  export interface DecodedAudioChunk {
@@ -39,8 +129,20 @@ export interface DecodedAudioChunk {
39
129
  }
40
130
  export interface DecodeOptions {
41
131
  readonly maxFps?: number;
42
- readonly format?: 'jpeg' | 'rgb' | 'yuv420';
132
+ readonly format?: FrameFormat;
43
133
  readonly scale?: number;
134
+ /**
135
+ * Caller identity tag (Phase 10). Surfaced by `listClients` so
136
+ * operators can tell who's holding the broker open. Short and stable:
137
+ * `motion`, `detection`, `snapshot`, `webrtc:<sessionId>`,
138
+ * `benchmark`. Missing tag → recorded as `'unknown'` with a broker-
139
+ * side warn log.
140
+ */
141
+ readonly tag?: string;
142
+ }
143
+ export interface AudioSubscribeOptions {
144
+ /** Caller identity tag. See DecodeOptions.tag. */
145
+ readonly tag?: string;
44
146
  }
45
147
  export type BrokerStatus = 'idle' | 'connecting' | 'streaming' | 'error' | 'stopped';
46
148
  export interface BrokerStats {
@@ -50,43 +152,209 @@ export interface BrokerStats {
50
152
  readonly encodedSubscribers: number;
51
153
  readonly decodedSubscribers: number;
52
154
  readonly uptimeMs: number;
155
+ /** Measured bitrate in kbps (averaged over 2s window) */
156
+ readonly bitrateKbps: number;
157
+ /** Time between last two keyframes in ms (IDR interval) */
158
+ readonly idrIntervalMs: number;
159
+ /** Detected video codec (h264, h265) */
160
+ readonly codec?: string;
161
+ /** Total bytes received since broker start */
162
+ readonly totalBytes: number;
163
+ /** Total encoded packets received since broker start */
164
+ readonly packetCount: number;
165
+ /** Number of connected RTSP restream clients */
166
+ readonly rtspClients: number;
167
+ /** Number of connected TCP pipe clients */
168
+ readonly pipeClients: number;
169
+ /** Pre-buffer configured duration in seconds */
170
+ readonly preBufferSec: number;
171
+ /** Pre-buffer actual buffered duration in ms */
172
+ readonly preBufferMs: number;
173
+ /** Pre-buffer packet count */
174
+ readonly preBufferPackets: number;
175
+ /**
176
+ * Moleculer node id of the decoder provider currently servicing this
177
+ * stream's decoded subscribers. `null` until the deferred decoder is
178
+ * created (no decoded clients yet, or codec not detected).
179
+ */
180
+ readonly decoderNodeId: string | null;
181
+ /**
182
+ * Detected audio track parameters from the RTSP DESCRIBE / SDP. Null
183
+ * when the stream has no audio track or the broker is still in cold
184
+ * start. `supported` reflects whether the local native + ffmpeg-based
185
+ * decoder pipeline can produce PCM chunks for downstream consumers
186
+ * (audio-analyzer). When `false`, the codec is detected but skipped.
187
+ */
188
+ readonly audio?: {
189
+ readonly codec: string;
190
+ readonly sampleRate: number;
191
+ readonly channels: number;
192
+ readonly supported: boolean;
193
+ } | null;
53
194
  }
54
195
  export interface IStreamBroker {
55
196
  readonly deviceId: string;
56
197
  readonly status: BrokerStatus;
198
+ readonly suspended: boolean;
57
199
  start(source: StreamSource): Promise<void>;
58
200
  stop(): Promise<void>;
201
+ /**
202
+ * Push an encoded packet into the broker from an external source.
203
+ *
204
+ * Used by camera provider addons that deliver media data directly
205
+ * (e.g. Reolink Baichuan protocol, Frigate event streams) instead
206
+ * of exposing an RTSP URL for the broker to pull from.
207
+ *
208
+ * The broker fans out the packet to all consumers: pre-buffer, RTSP
209
+ * restreamer, TCP pipe, decoder sessions, and encoded subscribers.
210
+ */
211
+ pushEncodedPacket(packet: EncodedPacket): void;
212
+ /**
213
+ * Push-source audio metadata. Push providers (Reolink Baichuan,
214
+ * Frigate, etc.) call this BEFORE the first audio EncodedPacket so
215
+ * the broker can wire the audio-codec capability — RTSP sources get
216
+ * the same data from the SDP audio track. Repeat calls update the
217
+ * declared codec; calling with `null` retracts (broker tears down
218
+ * any audio decode session).
219
+ *
220
+ * Typical Reolink Baichuan audio: AAC-LC 16 kHz mono. Cameras that
221
+ * push G.711 should still call this so the broker can bypass the
222
+ * codec cap for the supported native codecs.
223
+ */
224
+ pushAudioInfo?(info: PushAudioInfo | null): void;
225
+ /**
226
+ * Push a raw video RTP packet from an external source (used by
227
+ * `'push-rtp'`-typed sources, e.g. Reolink Baichuan adapter that
228
+ * synthesizes RTP from its packetizer-friendly access units). The
229
+ * broker fans out to `onVideoRtp` subscribers, including the
230
+ * WebRTC server's H.265 repacketizer path.
231
+ *
232
+ * Sources that don't carry per-packet RTP MAY ignore this entirely
233
+ * and call only `pushEncodedPacket`. Implementations are free to
234
+ * be a no-op when no RTP subscribers exist.
235
+ */
236
+ pushVideoRtp?(rtpData: Buffer): void;
59
237
  onEncodedData(callback: (packet: EncodedPacket) => void): Unsubscribe;
238
+ /**
239
+ * Subscribe to source video RTP packets (raw on-wire bytes, before
240
+ * depacketization). Used by the WebRTC server's H.265 path to feed
241
+ * a packet-level repacketizer that preserves the original RTP header
242
+ * layout — Chrome's HEVC depacketizer is sensitive to it.
243
+ *
244
+ * Sources that don't have an underlying RTP wire (e.g. Frigate event
245
+ * streams that call `pushEncodedPacket`) MAY register zero callbacks
246
+ * and emit nothing.
247
+ */
248
+ onVideoRtp(callback: (rtpData: Buffer) => void): Unsubscribe;
249
+ /**
250
+ * Codec parameter sets harvested from the camera's SDP (sprop-vps /
251
+ * sprop-sps / sprop-pps). Cameras like Reolink high-profile streams
252
+ * publish VPS/SPS/PPS only via SDP — Chrome's HEVC decoder needs them
253
+ * to initialise. Returns null when the broker hasn't connected yet
254
+ * or the camera ships param sets in-band.
255
+ */
256
+ getSdpParameterSets(): ReadonlyArray<Buffer> | null;
257
+ /**
258
+ * Subscribe to SDP-derived VPS/SPS/PPS deliveries. Fires once
259
+ * synchronously if the broker already has them (late-subscriber
260
+ * shape), and again every time `onVideoTrack` repopulates them on a
261
+ * reader rebuild. Used by the WebRTC server's H.265 path so a
262
+ * session created during the wake-up window — when
263
+ * `getSdpParameterSets()` still returns null — can seed its
264
+ * `H265Repacketizer` once the camera's first RTP+SDP arrive.
265
+ */
266
+ onSdpParameterSets(callback: (ps: ReadonlyArray<Buffer>) => void): Unsubscribe;
267
+ /**
268
+ * Source type as configured at `start()` — see `StreamSourceType`
269
+ * for the supported values. `null` before `start()` resolves.
270
+ */
271
+ getSourceType(): StreamSourceType | null;
272
+ /**
273
+ * True when the broker can emit source RTP packets via
274
+ * `onVideoRtp` — i.e. the source is RTSP (pull) or push-rtp.
275
+ * RTMP and bare push (AnnexB-only) sources return false.
276
+ * Routing decisions in the WebRTC server (e.g. "use the H.265
277
+ * repacketizer") should consult this rather than string-comparing
278
+ * the source type.
279
+ */
280
+ isRtpSource(): boolean;
281
+ /**
282
+ * Subscribe to decoded frames. Phase 10 added `options.tag` — a short
283
+ * caller-identity string (`motion`, `detection`, `snapshot`,
284
+ * `webrtc:<sessionId>`, `benchmark`) used by `listClients` so
285
+ * operators can see who is holding the broker open. Omitted tag
286
+ * yields a `'unknown'` entry with a warn log — not silently accepted.
287
+ */
60
288
  onDecodedFrame(callback: (frame: DecodedFrame) => void, options?: DecodeOptions): Unsubscribe;
61
- onDecodedAudioChunk(callback: (chunk: DecodedAudioChunk) => void): Unsubscribe;
289
+ /** Subscribe to decoded audio chunks. `options.tag` mirrors `onDecodedFrame`. */
290
+ onDecodedAudioChunk(callback: (chunk: DecodedAudioChunk) => void, options?: AudioSubscribeOptions): Unsubscribe;
62
291
  getStats(): BrokerStats;
63
292
  getLocalStreamUrl(): string;
293
+ /** Get the pre-buffer: recent encoded packets starting from last keyframe. */
294
+ getPreBuffer(): readonly EncodedPacket[];
295
+ /** Set the pre-buffer duration in seconds (0 to disable, max 30). */
296
+ setPreBufferDuration(seconds: number): void;
297
+ /** Get the current pre-buffer duration in seconds. */
298
+ getPreBufferDuration(): number;
299
+ setPreBufferEnabled(enabled: boolean): void;
64
300
  }
65
301
  /**
66
302
  * Manager for stream brokers — the server interacts with this interface,
67
303
  * while the concrete implementation lives in the addon-stream-broker package.
68
304
  */
69
- export interface IStreamBrokerManager {
70
- createBroker(brokerId: string, source: StreamSource): Promise<IStreamBroker>;
71
- getBroker(brokerId: string): IStreamBroker | undefined;
72
- destroyBroker(brokerId: string): Promise<void>;
73
- destroyBrokersForDevice(deviceId: string): Promise<void>;
74
- listBrokers(): readonly IStreamBroker[];
75
- destroyAll(): Promise<void>;
76
- setRestreamers(restreamers: readonly unknown[]): void;
77
- getRestreamers(): readonly unknown[];
305
+ /** Per-broker RTSP restream entry (absorbed from the former rtsp-restream capability). */
306
+ export interface RtspRestreamEntry {
307
+ readonly brokerId: string;
308
+ readonly url: string;
309
+ readonly mutedUrl: string;
310
+ readonly enabled: boolean;
78
311
  }
79
- export type CameraPriority = 'always-on' | 'default';
80
- export type CameraPhase = 'watching' | 'active';
312
+ /** Flat cap-shaped broker record returned by `listBrokers()`. */
313
+ export interface BrokerListEntry {
314
+ readonly brokerId: string;
315
+ readonly status: string;
316
+ readonly inputFps: number;
317
+ readonly decodeFps: number;
318
+ readonly encodedSubscribers: number;
319
+ readonly decodedSubscribers: number;
320
+ readonly uptimeMs: number;
321
+ readonly bitrateKbps: number;
322
+ readonly idrIntervalMs: number;
323
+ readonly codec?: string;
324
+ readonly totalBytes: number;
325
+ readonly packetCount: number;
326
+ readonly rtspClients: number;
327
+ readonly pipeClients: number;
328
+ readonly preBufferSec: number;
329
+ readonly preBufferMs: number;
330
+ readonly preBufferPackets: number;
331
+ }
332
+ /**
333
+ * Phase the runner's per-camera state machine occupies. `'idle'` is the
334
+ * `detectionMode === 'disabled'` resting state — runner registered the
335
+ * camera but never subscribed to detection frames. The other 4 are the
336
+ * historical motion-gated states; their transitions are now driven by
337
+ * `detectionMode` ('always-on' starts in 'active', 'on-motion' starts
338
+ * in 'watching').
339
+ */
340
+ export type CameraPhase = 'idle' | 'watching' | 'active' | 'paused' | 'load-shed';
81
341
  export interface CameraDetectionConfig {
82
342
  readonly enabled: boolean;
83
- readonly priority: CameraPriority;
84
- readonly pipeline: import('../types/pipeline.js').PipelineConfig;
343
+ readonly pipelineEnabled: boolean;
344
+ /** Motion sources that activate this camera's pipeline. At least one. */
345
+ readonly motionSources: import('./pipeline-orchestrator-capability.js').OrchestrationMotionSources;
85
346
  readonly motionStreamId: string;
86
347
  readonly detectionStreamId: string;
87
348
  readonly motionFps: number;
88
349
  readonly detectionFps: number;
89
350
  readonly motionCooldownMs: number;
90
351
  readonly audioStreamId?: string;
352
+ /**
353
+ * Operator-facing scheduling modes. Forwarded to `RunnerCameraConfig`;
354
+ * the runner uses these to gate its substream subscribers + phase
355
+ * machine. See `PipelinePhaseMode` for the semantics.
356
+ */
357
+ readonly detectionMode: import('../device/device-profile.js').PipelinePhaseMode;
358
+ readonly audioMode: import('../device/device-profile.js').PipelinePhaseMode;
91
359
  }
92
360
  //# sourceMappingURL=stream-broker.d.ts.map