@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,201 @@
1
+ import type { ModelCatalogEntry } from './models.js';
2
+ import type { ClassMapDefinition } from './labels.js';
3
+ import type { PipelineSlot } from './pipeline.js';
4
+ import type { ConfigField } from '../interfaces/config-ui.js';
5
+ /**
6
+ * Each pipeline step implements this interface as a class.
7
+ * `definition` holds the static metadata; `getConfigSchema()` declares
8
+ * per-step settings (class filters, thresholds, etc.) that the UI renders
9
+ * dynamically and that can be overridden per-run.
10
+ */
11
+ export interface IPipelineStep {
12
+ readonly definition: StepDefinition;
13
+ getConfigSchema(): readonly ConfigField[];
14
+ }
15
+ export type PostprocessorType = 'yolo' | 'yolo-seg' | 'scrfd' | 'arcface' | 'softmax' | 'ctc' | 'saliency' | 'yamnet';
16
+ export interface StepDefinition {
17
+ /** Unique step identifier (e.g., 'object-detection', 'face-detection') */
18
+ readonly id: string;
19
+ /** Human-readable name */
20
+ readonly name: string;
21
+ /** Pipeline slot type */
22
+ readonly slot: PipelineSlot;
23
+ /** Which postprocessor to apply to raw model output */
24
+ readonly postprocessor: PostprocessorType;
25
+ /** How this step receives its input */
26
+ readonly extractMode: 'full-frame' | 'crop-roi';
27
+ /** Classes this step accepts from a parent detector (null = root, accepts full frame) */
28
+ readonly inputClasses: readonly string[] | null;
29
+ /** Classes this step outputs (e.g., ['person','vehicle','animal'] for YOLO) */
30
+ readonly outputClasses: readonly string[];
31
+ /** Available models for this step */
32
+ readonly models: readonly ModelCatalogEntry[];
33
+ /** Default model when no user preference is set */
34
+ readonly defaultModelId: string;
35
+ /**
36
+ * Optional per-format model preference. When an agent seeds its
37
+ * `addonDefaults[this.id]`, it looks up `defaultModelIdByFormat[agent.activeEngine.format]`
38
+ * first, then falls back to `defaultModelId`. Lets a step express "on
39
+ * coreml prefer apple-soundanalysis, on onnx prefer yamnet-onnx" without
40
+ * duplicating the step definition per engine.
41
+ */
42
+ readonly defaultModelIdByFormat?: Readonly<Record<string, string>>;
43
+ /**
44
+ * Whether a newly-seeded agent has this addon enabled by default.
45
+ * Absent = `true`. Operators can always toggle this after boot; this
46
+ * flag only controls the initial seed for operator-first-touch
47
+ * convenience (e.g. keep refiners off by default so operators opt in
48
+ * rather than out).
49
+ */
50
+ readonly enabledByDefault?: boolean;
51
+ /** Default confidence threshold */
52
+ readonly defaultConfidence: number;
53
+ /** Runtime label lookup (e.g., class name arrays for softmax, charset for CTC) */
54
+ readonly labels?: readonly string[];
55
+ /** Character set for CTC decode (index 0 = blank token) */
56
+ readonly charset?: readonly string[];
57
+ /** COCO-to-macro class mapping (e.g., 'car' → 'vehicle') */
58
+ readonly classMap?: ClassMapDefinition;
59
+ /** UI grouping label — steps with the same group are displayed together (e.g., 'Segmentation') */
60
+ readonly group?: string;
61
+ /**
62
+ * Default minimum parent detection score to trigger this child step.
63
+ * Child steps are skipped if the parent detection's confidence is
64
+ * below this threshold. Saves inference for low-confidence detections.
65
+ * E.g., face-detection with minParentScore=0.7 only runs on persons
66
+ * detected with score ≥ 0.7. Configurable per-step via settings.
67
+ */
68
+ readonly defaultMinParentScore?: number;
69
+ }
70
+ export interface PoolModelConfig {
71
+ /** Absolute path to the model file (.mlpackage, .xml, .onnx) */
72
+ readonly path: string;
73
+ /** Largest dimension of model input (e.g., 640 for 640×640) */
74
+ readonly inputSize: number;
75
+ /** How to preprocess the image before inference */
76
+ readonly preprocessMode: 'letterbox' | 'resize';
77
+ /** Postprocessor to apply to raw output in Python */
78
+ readonly postprocessor: PostprocessorType;
79
+ /** Confidence threshold for NMS / filtering */
80
+ readonly confidence: number;
81
+ /** Label names for softmax-based classifiers */
82
+ readonly labels?: readonly string[];
83
+ /** Character set for CTC-based recognizers */
84
+ readonly charset?: readonly string[];
85
+ /** Number of classes (for YOLO: 80 COCO or 1 for plate) */
86
+ readonly numClasses?: number;
87
+ /** Anchor strides for SCRFD (default [8, 16, 32]) */
88
+ readonly strides?: readonly number[];
89
+ /** Mask threshold for saliency/segmentation */
90
+ readonly maskThreshold?: number;
91
+ /** Hardware device target (CoreML: cpu/gpu/ane/all, OpenVINO: auto/cpu/gpu/npu, ONNX: cpu/cuda/coreml) */
92
+ readonly device?: string;
93
+ }
94
+ export interface DetectionsOutput {
95
+ readonly kind: 'detections';
96
+ readonly detections: readonly {
97
+ readonly class: string;
98
+ readonly score: number;
99
+ readonly bbox: readonly [number, number, number, number];
100
+ readonly landmarks?: readonly {
101
+ readonly x: number;
102
+ readonly y: number;
103
+ }[];
104
+ /** Base64-encoded binary mask cropped to bbox (instance segmentation) */
105
+ readonly mask?: string;
106
+ /** Width of the decoded mask in pixels */
107
+ readonly maskWidth?: number;
108
+ /** Height of the decoded mask in pixels */
109
+ readonly maskHeight?: number;
110
+ }[];
111
+ }
112
+ export interface ClassificationsOutput {
113
+ readonly kind: 'classifications';
114
+ readonly classifications: readonly {
115
+ readonly class: string;
116
+ readonly score: number;
117
+ }[];
118
+ /** Full ranked list for debugging (top-N). Only populated when traceVerbosity is enabled. */
119
+ readonly alternates?: readonly {
120
+ readonly class: string;
121
+ readonly score: number;
122
+ }[];
123
+ }
124
+ export interface EmbeddingOutput {
125
+ readonly kind: 'embedding';
126
+ readonly embedding: readonly number[];
127
+ readonly embeddingNorm: readonly number[];
128
+ }
129
+ export interface TextOutput {
130
+ readonly kind: 'text';
131
+ readonly text: string;
132
+ readonly confidence: number;
133
+ }
134
+ export interface MaskOutput {
135
+ readonly kind: 'mask';
136
+ readonly mask: string;
137
+ readonly maskWidth: number;
138
+ readonly maskHeight: number;
139
+ }
140
+ /** Discriminated union for step output — use switch(output.kind) */
141
+ export type StepOutput = DetectionsOutput | ClassificationsOutput | EmbeddingOutput | TextOutput | MaskOutput;
142
+ export type TraceVerbosity = 'off' | 'summary' | 'full';
143
+ export interface PipelineRunOptions {
144
+ readonly traceVerbosity?: TraceVerbosity;
145
+ }
146
+ export interface StepTrace {
147
+ readonly stepId: string;
148
+ readonly modelId: string;
149
+ readonly slot: PipelineSlot;
150
+ readonly postprocessor: PostprocessorType;
151
+ readonly preprocessMs: number;
152
+ readonly inferenceMs: number;
153
+ readonly postprocessMs: number;
154
+ readonly totalMs: number;
155
+ readonly inputType: 'full-frame' | 'crop-roi';
156
+ readonly inputSize: {
157
+ readonly width: number;
158
+ readonly height: number;
159
+ };
160
+ /** Class name of the parent detection that triggered this step */
161
+ readonly parentDetection?: string;
162
+ readonly outputKind: StepOutput['kind'];
163
+ readonly outputCount: number;
164
+ /** Human-readable top result (e.g., "person 0.92", "cat 0.88", "ABC123") */
165
+ readonly topResult?: string;
166
+ readonly error?: string;
167
+ }
168
+ export interface PipelineExecutionTrace {
169
+ readonly traceId: string;
170
+ readonly deviceId: number;
171
+ readonly timestamp: number;
172
+ readonly frameSize: {
173
+ readonly width: number;
174
+ readonly height: number;
175
+ };
176
+ readonly engineRuntime: string;
177
+ readonly steps: readonly StepTrace[];
178
+ readonly totalMs: number;
179
+ readonly detectionCount: number;
180
+ readonly [key: string]: unknown;
181
+ }
182
+ export interface MotionBox {
183
+ readonly bbox: readonly [number, number, number, number];
184
+ readonly changeScore: number;
185
+ }
186
+ export interface MotionRawEvent {
187
+ readonly type: 'motion.raw';
188
+ readonly deviceId: string;
189
+ readonly timestamp: number;
190
+ readonly boxes: readonly MotionBox[];
191
+ readonly frameSize: {
192
+ readonly width: number;
193
+ readonly height: number;
194
+ };
195
+ readonly motionScore: number;
196
+ }
197
+ export interface PipelineTraceEvent {
198
+ readonly type: 'pipeline.trace';
199
+ readonly trace: PipelineExecutionTrace;
200
+ }
201
+ //# sourceMappingURL=pipeline-step.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-step.d.ts","sourceRoot":"","sources":["../../src/types/pipeline-step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAM7D;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAA;IACnC,eAAe,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from './detection.js';
2
- export type PipelineSlot = 'detector' | 'cropper' | 'classifier' | 'refiner';
2
+ import type { ModelFormat } from './models.js';
3
+ export type PipelineSlot = 'detector' | 'cropper' | 'classifier' | 'refiner' | 'audio-classifier';
4
+ /**
5
+ * The selected inference environment — one per pipeline process.
6
+ * User picks this; all pipeline steps run within it.
7
+ */
8
+ export interface PipelineEngineChoice {
9
+ readonly runtime: 'node' | 'python';
10
+ readonly backend: string;
11
+ readonly format: ModelFormat;
12
+ /** Target hardware device within the backend (e.g., 'cpu', 'gpu', 'npu', 'ane', 'auto', 'all') */
13
+ readonly device?: string;
14
+ }
15
+ /** Available devices for a specific engine backend */
16
+ export interface EngineDeviceInfo {
17
+ readonly id: string;
18
+ readonly label: string;
19
+ readonly description?: string;
20
+ }
3
21
  export interface PipelineNode {
4
22
  readonly step: string;
5
23
  readonly addon: string;
24
+ /** Per-step overrides — only modelId + confidence. Runtime/backend come from engine. */
6
25
  readonly configOverride?: Readonly<Record<string, unknown>>;
7
26
  readonly children?: readonly PipelineNode[];
8
27
  }
9
28
  export interface PipelineConfig {
29
+ /** The inference environment for ALL video steps in this pipeline */
30
+ readonly engine: PipelineEngineChoice;
10
31
  readonly video: readonly PipelineNode[];
11
32
  readonly audio?: PipelineNode;
33
+ /** Independent engine for audio classification (audio pipeline has its own runtime) */
34
+ readonly audioEngine?: PipelineEngineChoice;
12
35
  }
13
36
  export interface PipelineStatus {
14
37
  readonly addon: string;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/types/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEpG,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAA;AAE5E,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;I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AC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAClD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAChC"}
@@ -0,0 +1,29 @@
1
+ import type { IElementConfig } from '../interfaces/context.js';
2
+ import type { ISettingsBackend } from '../interfaces/storage.js';
3
+ /**
4
+ * Persisted config store for a single element.
5
+ * Reads/writes to the element's scoped storage under the 'config' collection.
6
+ * Notifies listeners on every change.
7
+ */
8
+ export declare class ElementConfigStore implements IElementConfig {
9
+ private readonly elementId;
10
+ private cache;
11
+ private listeners;
12
+ private loaded;
13
+ private readonly getBackend;
14
+ constructor(elementId: string, settingsBackend: ISettingsBackend | (() => ISettingsBackend | null) | null);
15
+ /** Load config from storage into cache. Called once on first access. */
16
+ private ensureLoaded;
17
+ getAll(): Record<string, unknown>;
18
+ get<T = unknown>(key: string): T | undefined;
19
+ set(key: string, value: unknown): Promise<void>;
20
+ setAll(config: Record<string, unknown>): Promise<void>;
21
+ onChange(callback: (config: Record<string, unknown>) => void): () => void;
22
+ /** Initialize from storage — called by ContextFactory after creation */
23
+ load(): Promise<void>;
24
+ /** Initialize with default values (doesn't overwrite existing) */
25
+ loadDefaults(defaults: Record<string, unknown>): Promise<void>;
26
+ private persist;
27
+ private notifyListeners;
28
+ }
29
+ //# sourceMappingURL=element-config-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-config-store.d.ts","sourceRoot":"","sources":["../../src/utils/element-config-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM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5
+ */
6
+ export declare function errMsg(err: unknown): string;
7
+ //# sourceMappingURL=err-msg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"err-msg.d.ts","sourceRoot":"","sources":["../../src/utils/err-msg.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAI3C"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Type-safe JSON parsing helpers.
3
+ *
4
+ * `JSON.parse` is typed as `any` in lib.es5.d.ts, which triggers
5
+ * `no-unsafe-*` ESLint rules and destroys downstream inference. These
6
+ * wrappers return `unknown` — callers narrow structurally via type
7
+ * guards, `typeof` checks, or helpers like `asRecord`/`asString`.
8
+ */
9
+ /**
10
+ * Parse JSON and return it as `unknown` — the only entry point for untrusted JSON.
11
+ *
12
+ * The optional generic overload `parseJsonUnknown<T>(text)` returns `T` for
13
+ * call sites that know the shape at parse time (e.g. MQTT payloads with a
14
+ * known protocol schema). This is a **type-level bridge only** — no runtime
15
+ * validation is performed. Callers that need runtime validation should parse
16
+ * as `unknown` and narrow via Zod or structural guards.
17
+ */
18
+ export declare function parseJsonUnknown<T = unknown>(text: string): T;
19
+ /** Narrow an unknown value to a plain `Record<string, unknown>` or return null. */
20
+ export declare function asJsonObject(value: unknown): Record<string, unknown> | null;
21
+ /** Narrow an unknown value to a `readonly unknown[]` or return an empty array. */
22
+ export declare function asJsonArray(value: unknown): readonly unknown[];
23
+ /** Safe string extraction from an unknown record field. */
24
+ export declare function asString(value: unknown, fallback?: string): string;
25
+ /** Safe number extraction from an unknown record field. */
26
+ export declare function asNumber(value: unknown, fallback?: number): number;
27
+ /** Safe boolean extraction from an unknown record field. */
28
+ export declare function asBoolean(value: unknown, fallback?: boolean): boolean;
29
+ /** Parse JSON + narrow to object in one step. */
30
+ export declare function parseJsonObject(text: string): Record<string, unknown> | null;
31
+ /** Parse JSON + narrow to array in one step. */
32
+ export declare function parseJsonArray(text: string): readonly unknown[] | null;
33
+ //# sourceMappingURL=json-safe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-safe.d.ts","sourceRoot":"","sources":["../../src/utils/json-safe.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAI7D;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAK3E;AAED,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,OAAO,EAAE,CAE9D;AAED,2DAA2D;AAC3D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,SAAK,GAAG,MAAM,CAE9D;AAED,2DAA2D;AAC3D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,SAAI,GAAG,MAAM,CAE7D;AAED,4DAA4D;AAC5D,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,UAAQ,GAAG,OAAO,CAEnE;AAED,iDAAiD;AACjD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAM5E;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,OAAO,EAAE,GAAG,IAAI,CAOtE"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Strip the `userinfo` (`user:password@`) component from any URL we
3
+ * surface in logs or telemetry. Camera credentials live inside RTSP /
4
+ * RTMP / HTTP URLs by convention; emitting them verbatim leaks
5
+ * plaintext secrets into log files, support transcripts, and shared
6
+ * diagnostics. Returns the original string when the input is not a
7
+ * parseable URL — a log helper must never throw.
8
+ */
9
+ export declare function maskUrlCredentials(rawUrl: string): string;
10
+ //# sourceMappingURL=mask-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mask-url.d.ts","sourceRoot":"","sources":["../../src/utils/mask-url.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUzD"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Fixed-capacity ring buffer. When full, push() overwrites the oldest entry.
3
+ * drain() returns up to maxCount items in FIFO order and removes them.
4
+ */
5
+ export declare class RingBuffer<T> {
6
+ private readonly capacity;
7
+ private readonly items;
8
+ private head;
9
+ private tail;
10
+ private count;
11
+ constructor(capacity: number);
12
+ get size(): number;
13
+ push(item: T): void;
14
+ drain(maxCount: number): T[];
15
+ }
16
+ //# sourceMappingURL=ring-buffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ring-buffer.d.ts","sourceRoot":"","sources":["../../src/utils/ring-buffer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,UAAU,CAAC,CAAC;IAMX,OAAO,CAAC,QAAQ,CAAC,QAAQ;IALrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,OAAO,CAAC,IAAI,CAAI;IAChB,OAAO,CAAC,IAAI,CAAI;IAChB,OAAO,CAAC,KAAK,CAAI;gBAEY,QAAQ,EAAE,MAAM;IAI7C,IAAI,IAAI,IAAI,MAAM,CAAsB;IAExC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI;IAUnB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,EAAE;CAW7B"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * runInferenceStep — shared utility for executing a single inference call
3
+ * with timing, error capture, and optional timeout.
4
+ *
5
+ * Used by: pipeline-executor, benchmark-executor, benchmark.service,
6
+ * inference-engine-adapter — eliminating duplicated timing/error patterns.
7
+ */
8
+ export interface InferenceStepResult<T> {
9
+ /** The inference output, or undefined if the call failed */
10
+ readonly output: T | undefined;
11
+ /** Wall-clock duration in ms (rounded to 2 decimals) */
12
+ readonly durationMs: number;
13
+ /** True if the call succeeded */
14
+ readonly ok: boolean;
15
+ /** Error message if the call failed */
16
+ readonly error?: string;
17
+ }
18
+ /**
19
+ * Execute an inference function with timing and error capture.
20
+ *
21
+ * @param fn - The inference call (e.g. `() => engine.infer(frame)`)
22
+ * @param timeoutMs - Optional timeout in ms. If exceeded, rejects with timeout error.
23
+ * @returns InferenceStepResult with output, timing, and error info
24
+ */
25
+ export declare function runInferenceStep<T>(fn: () => Promise<T>, timeoutMs?: number): Promise<InferenceStepResult<T>>;
26
+ //# sourceMappingURL=run-inference-step.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-inference-step.d.ts","sourceRoot":"","sources":["../../src/utils/run-inference-step.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,SAAS,CAAA;IAC9B,wDAAwD;IACxD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;IACpB,uCAAuC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAqBjC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Canonical runtime/backend/format mapping utilities.
3
+ *
4
+ * This is the SINGLE SOURCE OF TRUTH for mapping between:
5
+ * - Pipeline config (runtime: 'node'|'python', backend: 'cpu'|'coreml'|'cuda'|...)
6
+ * - DetectionRuntime ('onnx'|'coreml'|'pytorch'|'openvino'|'tflite')
7
+ * - ModelFormat ('onnx'|'coreml'|'openvino'|'tflite'|'pt')
8
+ *
9
+ * Import from '@camstack/types' — do NOT duplicate these mappings anywhere.
10
+ */
11
+ import type { ModelFormat } from '../types/models.js';
12
+ import type { DetectionRuntime } from '../types/config.js';
13
+ /** Pipeline-level runtime: 'node' (ONNX Runtime in Node.js) or 'python' (Python inference) */
14
+ export type PipelineRuntime = 'node' | 'python';
15
+ /**
16
+ * Map a backend ID to the model format it requires.
17
+ *
18
+ * Node.js backends (cpu, coreml, cuda, tensorrt) all use ONNX format
19
+ * because onnxruntime-node loads .onnx and uses execution providers internally.
20
+ *
21
+ * Python backends use their native format.
22
+ */
23
+ declare const BACKEND_TO_FORMAT: Readonly<Record<string, ModelFormat>>;
24
+ /**
25
+ * Map DetectionRuntime to ModelFormat.
26
+ * Used when the addon receives an explicit runtime (not 'auto').
27
+ */
28
+ declare const RUNTIME_TO_FORMAT: Readonly<Record<DetectionRuntime, ModelFormat>>;
29
+ /**
30
+ * Map a Python backend to the Python inference script name.
31
+ */
32
+ declare const PYTHON_SCRIPT: Readonly<Record<string, string>>;
33
+ /**
34
+ * Resolve pipeline config (runtime + backend) to a DetectionRuntime.
35
+ *
36
+ * Pipeline config uses two levels:
37
+ * runtime: 'node' | 'python'
38
+ * backend: 'cpu' | 'coreml' | 'cuda' | 'openvino' | 'pytorch' | ...
39
+ *
40
+ * Addons expect a DetectionRuntime:
41
+ * 'onnx' | 'coreml' | 'pytorch' | 'openvino' | 'tflite'
42
+ *
43
+ * Mapping rules:
44
+ * node + any backend → 'onnx' (onnxruntime-node handles backend via EP)
45
+ * python + coreml → 'coreml' (native .mlpackage via coremltools)
46
+ * python + openvino → 'openvino'
47
+ * python + pytorch → 'pytorch'
48
+ * python + onnx-py → 'onnx'
49
+ * python + <other> → backend as-is
50
+ */
51
+ export declare function resolveDetectionRuntime(pipelineRuntime: PipelineRuntime | string, backend: string): DetectionRuntime;
52
+ /**
53
+ * Resolve pipeline config (runtime + backend) to a ModelFormat.
54
+ *
55
+ * Determines which model file format is needed (.onnx, .mlpackage, etc.)
56
+ */
57
+ export declare function resolveModelFormat(pipelineRuntime: PipelineRuntime | string, backend: string): ModelFormat;
58
+ /**
59
+ * Resolve pipeline runtime string to 'auto' | DetectionRuntime for addon consumption.
60
+ * Used when building addon addonConfig from pipeline step config.
61
+ *
62
+ * 'python' + 'coreml' → 'coreml'
63
+ * 'node' + 'coreml' → 'onnx'
64
+ * 'node' + 'cpu' → 'onnx'
65
+ * 'auto' → 'auto'
66
+ */
67
+ export declare function resolveAddonRuntime(pipelineRuntime: string | undefined, backend: string | undefined): DetectionRuntime | 'auto';
68
+ /**
69
+ * Get the model format needed for a given backend.
70
+ * Convenience wrapper for backend-only lookup (e.g., UI components).
71
+ */
72
+ export declare function formatForBackend(backend: string): ModelFormat;
73
+ /**
74
+ * Get the model format for a given DetectionRuntime.
75
+ */
76
+ export declare function formatForRuntime(runtime: DetectionRuntime): ModelFormat;
77
+ /**
78
+ * Get the Python inference script name for a backend.
79
+ * Returns undefined if no Python script is needed (e.g., 'cpu' uses ONNX).
80
+ */
81
+ export declare function pythonScriptForBackend(backend: string): string | undefined;
82
+ /**
83
+ * Check if a DetectionRuntime requires a Python binary.
84
+ * 'coreml', 'pytorch', 'openvino' need Python; 'onnx' and 'tflite' don't.
85
+ */
86
+ export declare function requiresPython(runtime: DetectionRuntime | string): boolean;
87
+ export { BACKEND_TO_FORMAT, RUNTIME_TO_FORMAT, PYTHON_SCRIPT };
88
+ //# sourceMappingURL=runtime-mapping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-mapping.d.ts","sourceRoot":"","sources":["../../src/utils/runtime-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE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,47 @@
1
+ /**
2
+ * Pure rules-driven zone evaluator. Shared between every consumer
3
+ * that gates items (motion regions, detections, future audio events,
4
+ * …) by `(zones, rules)` pairs. Lives in `@camstack/types/utils` so
5
+ * addon-motion-wasm + addon-detection-pipeline share one canonical
6
+ * implementation.
7
+ *
8
+ * Semantics — match the analytics zone-engine introduced in Phase 2a:
9
+ * - any active include rule fires ⇒ whitelist mode (only items
10
+ * satisfying at least one include rule pass)
11
+ * - otherwise ⇒ blacklist mode (items in any exclude rule are
12
+ * dropped, the rest pass)
13
+ * - inactive rules (`enabled: false`) are skipped before the gate
14
+ * - a rule's `classFilter` narrows it to the listed classes; an
15
+ * item whose class isn't in the filter is invisible to that rule
16
+ *
17
+ * Test point: each item provides a normalised (0–1) center via the
18
+ * `getCenter` accessor; rules fire when the center lies inside any
19
+ * of the rule's referenced zone polygons (ray-cast point-in-polygon).
20
+ * Bbox-area overlap would be marginally more intuitive on tiny
21
+ * items but doubles the per-frame cost; the center test keeps the
22
+ * hot path cheap and matches the operator's intuition for
23
+ * "where is the activity centered".
24
+ */
25
+ import type { Zone } from '../capabilities/zones.cap.js';
26
+ import type { ZoneRule } from '../capabilities/schemas/zone-rule.js';
27
+ export interface ZoneRuleEvalResult<T> {
28
+ readonly passed: readonly T[];
29
+ readonly excluded: readonly T[];
30
+ }
31
+ /**
32
+ * Evaluate `rules` against `items`. Returns the items partitioned
33
+ * into `passed` (kept by the gate) and `excluded` (dropped). When
34
+ * `rules` is empty or `zones` is empty everything passes — the gate
35
+ * is "off" without explicit configuration.
36
+ *
37
+ * `getCenter` returns the item's normalised (0–1) center point.
38
+ * `getClassName` is optional — when omitted, every rule's
39
+ * `classFilter` is treated as matching all classes (motion-stage
40
+ * semantics). Provide it for object detections so per-class rules
41
+ * narrow correctly.
42
+ */
43
+ export declare function evaluateZoneRules<T>(items: readonly T[], zones: readonly Zone[], rules: readonly ZoneRule[], getCenter: (item: T) => {
44
+ readonly x: number;
45
+ readonly y: number;
46
+ }, getClassName?: (item: T) => string | undefined): ZoneRuleEvalResult<T>;
47
+ //# sourceMappingURL=zone-rule-eval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zone-rule-eval.d.ts","sourceRoot":"","sources":["../../src/utils/zone-rule-eval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAA;AAEpE,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAA;CAChC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAClE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,SAAS,GAC7C,kBAAkB,CAAC,CAAC,CAAC,CA2BvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",
@@ -24,6 +24,11 @@
24
24
  "import": "./dist/index.mjs",
25
25
  "require": "./dist/index.js"
26
26
  },
27
+ "./node": {
28
+ "types": "./dist/node.d.ts",
29
+ "import": "./dist/node.mjs",
30
+ "require": "./dist/node.js"
31
+ },
27
32
  "./catalogs": {
28
33
  "types": "./dist/catalogs/index.d.ts",
29
34
  "import": "./dist/catalogs/index.mjs",
@@ -35,7 +40,7 @@
35
40
  "dist"
36
41
  ],
37
42
  "scripts": {
38
- "build": "tsup && tsc --declaration --emitDeclarationOnly --outDir dist --skipLibCheck",
43
+ "build": "vite build && tsc -p tsconfig.json --emitDeclarationOnly",
39
44
  "dev": "tsup --watch",
40
45
  "typecheck": "tsc --noEmit",
41
46
  "test": "vitest run",
@@ -43,9 +48,13 @@
43
48
  "publish": "npm publish --access public"
44
49
  },
45
50
  "devDependencies": {
51
+ "@trpc/client": "^11.16.0",
46
52
  "@trpc/server": "^11.16.0",
47
53
  "tsup": "^8.0.0",
48
54
  "typescript": "~5.9.0",
49
55
  "vitest": "^3.0.0"
56
+ },
57
+ "dependencies": {
58
+ "zod": "^4.3.6"
50
59
  }
51
60
  }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=addon-capability-provider.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addon-capability-provider.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/addon-capability-provider.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=addon-declaration.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addon-declaration.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/addon-declaration.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=capability.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capability.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/capability.test.ts"],"names":[],"mappings":""}