@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,101 @@
1
+ /**
2
+ * Consumer-facing interface for the kernel-owned readiness registry.
3
+ *
4
+ * Implemented by `ReadinessRegistry` under
5
+ * `@camstack/types/readiness/readiness-registry.ts`. Exposed here as a
6
+ * narrow interface so `AddonContext.kernel.readinessRegistry` can be
7
+ * typed without pulling the full registry module into the addon
8
+ * interface file (avoids import cycles).
9
+ *
10
+ * Addons emit via the standalone `emitReadiness(bus, ...)` helper —
11
+ * they don't need a registry handle for that. The registry is
12
+ * purely a consumer primitive: `awaitReady` for one-shot waits and
13
+ * `onReadyState` for long-lived observers.
14
+ */
15
+ import type { ReadinessScope, ReadinessState } from './event-bus.js';
16
+ export interface IReadinessTransition {
17
+ readonly capName: string;
18
+ readonly scope: ReadinessScope;
19
+ readonly state: ReadinessState;
20
+ readonly epoch: number;
21
+ readonly generation: string;
22
+ readonly sourceNodeId: string;
23
+ readonly ts: number;
24
+ readonly durationInPrevState: number;
25
+ }
26
+ export interface IReadinessRegistryRecord {
27
+ readonly capName: string;
28
+ readonly scope: ReadinessScope;
29
+ readonly state: ReadinessState;
30
+ readonly generation: string;
31
+ readonly epoch: number;
32
+ readonly lastChange: number;
33
+ /**
34
+ * Node that emitted the latest transition. Needed for `agent.offline`
35
+ * demux of `device`-scoped caps. For `node`-scoped caps this matches
36
+ * `scope.nodeId`.
37
+ */
38
+ readonly sourceNodeId: string;
39
+ }
40
+ export interface IAwaitReadyOptions {
41
+ readonly timeoutMs?: number;
42
+ readonly signal?: AbortSignal;
43
+ }
44
+ export type IReadinessHandler = (transition: IReadinessTransition) => void;
45
+ export interface IReadinessRegistry<TCapName extends string = string> {
46
+ /** Current snapshot for a `(capName, scope)` pair, or `null` if never seen. */
47
+ get(capName: TCapName, scope: ReadinessScope): IReadinessRegistryRecord | null;
48
+ /**
49
+ * One-shot: resolves when the cap is `ready`. Reads the snapshot
50
+ * first — if already ready, resolves on next tick. Rejects with
51
+ * `ReadinessTimeoutError` after `timeoutMs` (default 30_000) or
52
+ * with the AbortSignal's reason on cancel.
53
+ */
54
+ awaitReady(capName: TCapName, scope: ReadinessScope, opts?: IAwaitReadyOptions): Promise<void>;
55
+ /**
56
+ * Observable: every transition (starting/ready/down) dispatches to
57
+ * `handler`. On subscribe the current state (if known) replays
58
+ * asynchronously as the initial transition. Returns unsubscribe.
59
+ */
60
+ onReadyState(capName: TCapName, scope: ReadinessScope, handler: IReadinessHandler): () => void;
61
+ /**
62
+ * Hydrate the snapshot from an authoritative source (typically the
63
+ * hub's `$readiness.getSnapshot` action). Entries already present
64
+ * locally are skipped — live deltas always take precedence over the
65
+ * snapshot. For each newly added entry a one-shot transition is
66
+ * dispatched to matching subscriptions so pending `awaitReady`
67
+ * callers unblock without waiting for a fresh delta.
68
+ */
69
+ hydrate(records: readonly IReadinessRegistryRecord[]): void;
70
+ /**
71
+ * Serializable snapshot for cross-process transport. Returned as an
72
+ * array (MsgPack-friendly) rather than the internal Map.
73
+ */
74
+ getSnapshotForTransport(): readonly IReadinessRegistryRecord[];
75
+ }
76
+ /**
77
+ * A stable, cached reference to a capability that tracks readiness state.
78
+ * Obtained via `ctx.useCapability()` or `ctx.acquireCapability()`.
79
+ *
80
+ * The generic `T` is a phantom type documenting the expected provider interface.
81
+ */
82
+ export interface ICapabilityHandle<T = unknown> {
83
+ readonly capName: string;
84
+ readonly scope: ReadinessScope;
85
+ readonly isReady: boolean;
86
+ /**
87
+ * Block until the capability is ready, or throw `CapabilityUnavailableError`
88
+ * on timeout.
89
+ */
90
+ awaitReady(timeoutMs?: number): Promise<void>;
91
+ /**
92
+ * Execute `fn` with readiness gating. Blocks until ready, then calls `fn`.
93
+ * Preferred over `awaitReady() + fn()` because it re-gates after a
94
+ * down→ready cycle that may occur between the await and the call.
95
+ */
96
+ call<R>(fn: () => Promise<R>, timeoutMs?: number): Promise<R>;
97
+ /** Unsubscribe from ReadinessRegistry. Called by AddonContextImpl on shutdown. */
98
+ dispose(): void;
99
+ readonly _provider: T;
100
+ }
101
+ //# sourceMappingURL=readiness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../../src/interfaces/readiness.ts"],"names":[],"mappings":"AAAA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IACH,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE9F;;;;OAIG;IACH,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,IAAI,CAAA;IAE9F;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO,EAAE,SAAS,wBAAwB,EAAE,GAAG,IAAI,CAAA;IAE3D;;;OAGG;IACH,uBAAuB,IAAI,SAAS,wBAAwB,EAAE,CAAA;CAC/D;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IAEzB;;;OAGG;IACH,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE7C;;;;OAIG;IACH,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAE7D,kFAAkF;IAClF,OAAO,IAAI,IAAI,CAAA;IAGf,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAA;CACtB"}
@@ -9,7 +9,7 @@ export type ReplScope = {
9
9
  providerId: string;
10
10
  } | {
11
11
  type: 'device';
12
- deviceId: string;
12
+ deviceId: number;
13
13
  } | {
14
14
  type: 'addon';
15
15
  addonId: string;
@@ -15,10 +15,10 @@ export interface RestreamerExposedResource {
15
15
  export interface IRestreamer {
16
16
  readonly id: string;
17
17
  readonly name: string;
18
- registerDevice(deviceId: string, streams: readonly RegisteredStream[]): Promise<void>;
18
+ registerDevice(deviceId: number, streams: readonly RegisteredStream[]): Promise<void>;
19
19
  pushPacket(streamId: string, packet: EncodedPacket): void;
20
- unregisterDevice(deviceId: string): Promise<void>;
21
- getExposedResources(deviceId: string): readonly RestreamerExposedResource[];
20
+ unregisterDevice(deviceId: number): Promise<void>;
21
+ getExposedResources(deviceId: number): readonly RestreamerExposedResource[];
22
22
  proxyWhepOffer?(streamId: string, sdpOffer: string): Promise<string>;
23
23
  }
24
24
  //# sourceMappingURL=restreamer.d.ts.map
@@ -1,22 +1,2 @@
1
- /**
2
- * Scope restriction for a scoped token.
3
- */
4
- export interface TokenScope {
5
- readonly type: 'addon' | 'route-prefix' | 'capability';
6
- readonly target: string;
7
- }
8
- /**
9
- * A per-user API token with restricted scopes.
10
- */
11
- export interface ScopedToken {
12
- readonly id: string;
13
- readonly userId: string;
14
- readonly name: string;
15
- readonly tokenHash: string;
16
- readonly tokenPrefix: string;
17
- readonly scopes: TokenScope[];
18
- readonly expiresAt?: number;
19
- readonly lastUsedAt?: number;
20
- readonly createdAt: number;
21
- }
1
+ export { type TokenScope, type ScopedToken } from '../schemas/auth-records.js';
22
2
  //# sourceMappingURL=scoped-token.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scoped-token.d.ts","sourceRoot":"","sources":["../../src/interfaces/scoped-token.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,YAAY,CAAA;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,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,UAAU,EAAE,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B"}
1
+ {"version":3,"file":"scoped-token.d.ts","sourceRoot":"","sources":["../../src/interfaces/scoped-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAA"}
@@ -1,11 +1,34 @@
1
1
  /**
2
- * Detection Analysis Pipeline -- processes raw detections through
3
- * configurable stages to produce tracked, enriched, actionable events.
2
+ * Detection Analysis Pipeline -- types for tracked detections, sub-detections,
3
+ * recognition results, and audio classification.
4
4
  */
5
- import type { Detection } from './device-capabilities/object-detector.js';
6
5
  import type { VideoFrame } from './camera-pipeline.js';
7
- export declare const DETECTION_TYPES: readonly ["person", "vehicle", "animal", "package"];
8
- export type DetectionType = typeof DETECTION_TYPES[number];
6
+ /**
7
+ * A single detection entry consumed by the analysis pipeline (tracking,
8
+ * zones, session aggregation).
9
+ *
10
+ * Intentionally DIFFERENT from `SpatialDetection` (the engine-level
11
+ * detector output in `types/detection.ts`):
12
+ * - `SpatialDetection` is raw model output: `{class, bbox:{x,y,w,h},
13
+ * landmarks?, mask?}`.
14
+ * - `AnalysisDetection` is the pipeline's view: tuple-bbox
15
+ * `[x1,y1,x2,y2]`, optional enrichment (`id`, `label`, `zones`,
16
+ * `previousZones`) added by upstream stages.
17
+ *
18
+ * Renamed from the ambiguous `Detection` on 2026-04-14 to disambiguate
19
+ * from the other Detection types in the codebase (`ObjectDetection`
20
+ * for UI payloads, `SpatialDetection` for engine output).
21
+ */
22
+ export interface AnalysisDetection {
23
+ className: string;
24
+ score: number;
25
+ boundingBox?: [number, number, number, number];
26
+ id?: string;
27
+ label?: string;
28
+ labelScore?: number;
29
+ zones?: string[];
30
+ previousZones?: string[];
31
+ }
9
32
  export declare const SUB_DETECTION_TYPES: readonly ["face", "plate"];
10
33
  export type SubDetectionType = typeof SUB_DETECTION_TYPES[number];
11
34
  export declare const RECOGNITION_TYPES: readonly ["face", "plate", "clip", "custom"];
@@ -14,14 +37,14 @@ export interface AnalysisContext {
14
37
  readonly deviceId: string;
15
38
  readonly frame: VideoFrame;
16
39
  readonly timestamp: number;
17
- readonly rawDetections: readonly Detection[];
40
+ readonly rawDetections: readonly AnalysisDetection[];
18
41
  readonly trackedDetections: readonly ServerTrackedDetection[];
19
42
  readonly events: readonly AnalysisEvent[];
20
43
  readonly metadata: Readonly<Record<string, unknown>>;
21
44
  }
22
45
  export interface ServerTrackedDetection {
23
46
  readonly trackId: string;
24
- readonly detection: Detection;
47
+ readonly detection: AnalysisDetection;
25
48
  readonly crop?: Buffer;
26
49
  readonly tracking: TrackingInfo;
27
50
  readonly subDetections: readonly SubDetection[];
@@ -63,84 +86,4 @@ export interface AnalysisEvent {
63
86
  readonly description: string;
64
87
  readonly data: Readonly<Record<string, unknown>>;
65
88
  }
66
- export interface IAnalysisStage {
67
- readonly id: string;
68
- readonly name: string;
69
- readonly priority: number;
70
- enabled: boolean;
71
- process(ctx: AnalysisContext): Promise<AnalysisContext>;
72
- }
73
- export interface ISubDetector {
74
- readonly detectionType: SubDetectionType;
75
- readonly targetClasses: readonly string[];
76
- detect(crop: Buffer, cropWidth: number, cropHeight: number): Promise<SubDetection[]>;
77
- }
78
- export interface IFaceDetector extends ISubDetector {
79
- readonly detectionType: 'face';
80
- }
81
- export interface IPlateDetector extends ISubDetector {
82
- readonly detectionType: 'plate';
83
- }
84
- export interface IRecognizer {
85
- readonly recognitionType: RecognitionType;
86
- recognize(crop: Buffer, width: number, height: number): Promise<RecognitionResult | null>;
87
- }
88
- export interface IFaceRecognizer extends IRecognizer {
89
- getEmbedding(crop: Buffer): Promise<Float32Array>;
90
- registerKnown(label: string, embedding: Float32Array): void;
91
- }
92
- export interface IPlateRecognizer extends IRecognizer {
93
- readonly recognitionType: 'plate';
94
- }
95
- export interface IAudioClassifier {
96
- readonly ready: boolean;
97
- initialize(): Promise<void>;
98
- classify(audioSamples: Float32Array, sampleRate: number, topN?: number): Promise<readonly AudioClassification[]>;
99
- release(): Promise<void>;
100
- }
101
- export interface AudioClassification {
102
- readonly classIndex: number;
103
- readonly className: string;
104
- readonly score: number;
105
- readonly isSurveillanceRelevant: boolean;
106
- }
107
- export interface IClassFilterStage extends IAnalysisStage {
108
- readonly id: 'class-filter';
109
- setConfig(deviceId: string, config: Record<string, unknown>): void;
110
- getConfig(deviceId: string): Record<string, unknown>;
111
- }
112
- export interface ITrackerStage extends IAnalysisStage {
113
- readonly id: 'tracker';
114
- setConfig(deviceId: string, config: Record<string, unknown>): void;
115
- getConfig(deviceId: string): Record<string, unknown>;
116
- resetDevice(deviceId: string): void;
117
- }
118
- export interface ISubDetectionStage extends IAnalysisStage {
119
- readonly id: 'sub-detection';
120
- registerDetector(detector: ISubDetector): void;
121
- }
122
- export interface IRecognitionStage extends IAnalysisStage {
123
- readonly id: 'recognition';
124
- registerRecognizer(recognizer: IRecognizer): void;
125
- }
126
- export interface IZoneAnalysisStage extends IAnalysisStage {
127
- readonly id: 'zone-analysis';
128
- setConfig(deviceId: string, config: Record<string, unknown>): void;
129
- }
130
- export interface IEventGenerationStage extends IAnalysisStage {
131
- readonly id: 'event-generation';
132
- setConfig(deviceId: string, config: Record<string, unknown>): void;
133
- }
134
- export interface IObjectSnapshotStage extends IAnalysisStage {
135
- readonly id: 'object-snapshot';
136
- setConfig(deviceId: string, config: Record<string, unknown>): void;
137
- }
138
- export interface IAnalysisPipeline {
139
- addStage(stage: IAnalysisStage): void;
140
- removeStage(stageId: string): void;
141
- getStages(): readonly IAnalysisStage[];
142
- analyze(deviceId: string, frame: VideoFrame, rawDetections: Detection[]): Promise<AnalysisContext>;
143
- }
144
- export declare function createAnalysisContext(deviceId: string, frame: VideoFrame, rawDetections: Detection[]): AnalysisContext;
145
- export declare function enrichContext(ctx: AnalysisContext, updates: Partial<Pick<AnalysisContext, 'trackedDetections' | 'events' | 'metadata'>>): AnalysisContext;
146
89
  //# sourceMappingURL=server-analysis.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-analysis.d.ts","sourceRoot":"","sources":["../../src/interfaces/server-analysis.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAItD,eAAO,MAAM,eAAe,qDAAsD,CAAA;AAClF,MAAM,MAAM,aAAa,GAAG,OAAO,eAAe,CAAC,MAAM,CAAC,CAAA;AAE1D,eAAO,MAAM,mBAAmB,4BAA6B,CAAA;AAC7D,MAAM,MAAM,gBAAgB,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAA;AAEjE,eAAO,MAAM,iBAAiB,8CAA+C,CAAA;AAC7E,MAAM,MAAM,eAAe,GAAG,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAA;AAI9D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,aAAa,EAAE,SAAS,SAAS,EAAE,CAAA;IAC5C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,sBAAsB,EAAE,CAAA;IAC7D,QAAQ,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAA;IACzC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CACrD;AAID,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,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AE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CACjD"}
@@ -0,0 +1,120 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * `StorageLocationType` — the closed enum of *kinds* of storage a location
4
+ * can serve. Defined here (not in `capabilities/storage.cap.ts`) so the
5
+ * persisted record schema and the consumer-facing cap can both consume it
6
+ * without forming a circular import. The `storage` cap re-exports it
7
+ * verbatim for back-compat.
8
+ *
9
+ * This Zod schema is the **authoritative source** for `StorageLocationType`.
10
+ * The TS alias in `./storage.ts` re-exports `z.infer<typeof
11
+ * StorageLocationTypeSchema>` so the wire surface (cap) and the legacy
12
+ * `IStorageProvider` interface stay in lockstep.
13
+ */
14
+ export declare const StorageLocationTypeSchema: z.ZodEnum<{
15
+ data: "data";
16
+ media: "media";
17
+ recordings: "recordings";
18
+ cache: "cache";
19
+ logs: "logs";
20
+ models: "models";
21
+ "recordings-high": "recordings-high";
22
+ "recordings-low": "recordings-low";
23
+ "recordings-clips": "recordings-clips";
24
+ "event-images": "event-images";
25
+ "addons-data": "addons-data";
26
+ backups: "backups";
27
+ }>;
28
+ /**
29
+ * `StorageLocationType` — TS alias for the Zod enum above. Re-exported
30
+ * by `./storage.ts` so the legacy `IStorageProvider` interface keeps the
31
+ * same name without duplicating the literal union.
32
+ */
33
+ export type StorageLocationType = z.infer<typeof StorageLocationTypeSchema>;
34
+ /**
35
+ * Cardinality of a storage location type:
36
+ *
37
+ * - `singleton` — exactly one location instance allowed system-wide.
38
+ * Multiple instances would split state in a way that breaks
39
+ * consumers (e.g. two `addons-data` roots → addon's persistent
40
+ * state lands in either or both; two `cache` roots → cache misses
41
+ * on every read; two `data` roots → sqlite path bifurcation).
42
+ * Operators can EDIT the singleton's config (path / providerId)
43
+ * but never add a second instance. The seed always creates the
44
+ * initial default.
45
+ *
46
+ * - `multi` — multiple instances are first-class. Operators add
47
+ * secondary locations (e.g. NAS + local SSD for `recordings`,
48
+ * offsite + on-disk for `backups`). One is `isDefault: true`
49
+ * at any moment; others are addressable via fully-qualified id.
50
+ *
51
+ * Used by `StorageOrchestratorService.upsertLocation` to reject
52
+ * "Add" attempts on singleton types, and by the admin UI to hide
53
+ * the "+ Add location" button on those groups.
54
+ */
55
+ export declare const STORAGE_LOCATION_CARDINALITY: Readonly<Record<StorageLocationType, 'singleton' | 'multi'>>;
56
+ /**
57
+ * Persisted record for a storage location instance. Multi-instance
58
+ * (per `STORAGE_LOCATION_CARDINALITY[type]`) — operators can register
59
+ * e.g. two `backups` locations (one filesystem, one SFTP) with
60
+ * different `providerId`s, but only one `cache`/`data`/etc.
61
+ *
62
+ * `id` is a stable namespaced string of the form `<type>:<slug>`.
63
+ * The default location for a type uses `id === <type>:default` by
64
+ * convention (the bare type ref like `'backups'` resolves to it).
65
+ *
66
+ * `isSystem: true` marks a location as orchestrator-seeded and
67
+ * undeletable. The bootstrap-installed defaults (one per type) carry
68
+ * this flag; operator-added locations don't. Editing the config of
69
+ * a system location is allowed (path migration, provider swap) but
70
+ * deleting it is rejected at the cap level.
71
+ */
72
+ export declare const StorageLocationSchema: z.ZodObject<{
73
+ id: z.ZodString;
74
+ type: z.ZodEnum<{
75
+ data: "data";
76
+ media: "media";
77
+ recordings: "recordings";
78
+ cache: "cache";
79
+ logs: "logs";
80
+ models: "models";
81
+ "recordings-high": "recordings-high";
82
+ "recordings-low": "recordings-low";
83
+ "recordings-clips": "recordings-clips";
84
+ "event-images": "event-images";
85
+ "addons-data": "addons-data";
86
+ backups: "backups";
87
+ }>;
88
+ displayName: z.ZodString;
89
+ providerId: z.ZodString;
90
+ config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
91
+ isDefault: z.ZodDefault<z.ZodBoolean>;
92
+ isSystem: z.ZodDefault<z.ZodBoolean>;
93
+ createdAt: z.ZodNumber;
94
+ updatedAt: z.ZodNumber;
95
+ }, z.core.$strip>;
96
+ export type StorageLocation = z.infer<typeof StorageLocationSchema>;
97
+ /**
98
+ * Reference accepted by consumer-facing `api.storage.*` calls.
99
+ * Either:
100
+ * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
101
+ * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
102
+ *
103
+ * The orchestrator's `resolveRef(ref)` handles both cases.
104
+ */
105
+ export declare const StorageLocationRefSchema: z.ZodUnion<readonly [z.ZodEnum<{
106
+ data: "data";
107
+ media: "media";
108
+ recordings: "recordings";
109
+ cache: "cache";
110
+ logs: "logs";
111
+ models: "models";
112
+ "recordings-high": "recordings-high";
113
+ "recordings-low": "recordings-low";
114
+ "recordings-clips": "recordings-clips";
115
+ "event-images": "event-images";
116
+ "addons-data": "addons-data";
117
+ backups: "backups";
118
+ }>, z.ZodString]>;
119
+ export type StorageLocationRef = z.infer<typeof StorageLocationRefSchema>;
120
+ //# sourceMappingURL=storage-location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-location.d.ts","sourceRoot":"","sources":["../../src/interfaces/storage-location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;EAsBpC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,mBAAmB,EAAE,WAAW,GAAG,OAAO,CAAC,CAerG,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;iBAUhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;iBAGnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}