@camstack/types 0.1.40 → 0.1.42

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 (302) hide show
  1. package/dist/addon/base-addon.d.ts +12 -0
  2. package/dist/addon/base-addon.d.ts.map +1 -1
  3. package/dist/addon/durable-state.d.ts +33 -0
  4. package/dist/addon/durable-state.d.ts.map +1 -0
  5. package/dist/capabilities/accessories.cap.d.ts +56 -8
  6. package/dist/capabilities/accessories.cap.d.ts.map +1 -1
  7. package/dist/capabilities/advanced-notifier.cap.d.ts +4 -0
  8. package/dist/capabilities/advanced-notifier.cap.d.ts.map +1 -1
  9. package/dist/capabilities/air-quality-sensor.cap.d.ts +56 -0
  10. package/dist/capabilities/air-quality-sensor.cap.d.ts.map +1 -0
  11. package/dist/capabilities/alarm-panel.cap.d.ts +154 -0
  12. package/dist/capabilities/alarm-panel.cap.d.ts.map +1 -0
  13. package/dist/capabilities/ambient-light-sensor.cap.d.ts +39 -0
  14. package/dist/capabilities/ambient-light-sensor.cap.d.ts.map +1 -0
  15. package/dist/capabilities/automation-control.cap.d.ts +65 -0
  16. package/dist/capabilities/automation-control.cap.d.ts.map +1 -0
  17. package/dist/capabilities/battery.cap.d.ts +30 -1
  18. package/dist/capabilities/battery.cap.d.ts.map +1 -1
  19. package/dist/capabilities/binary.cap.d.ts +40 -0
  20. package/dist/capabilities/binary.cap.d.ts.map +1 -0
  21. package/dist/capabilities/brightness.cap.d.ts +3 -2
  22. package/dist/capabilities/brightness.cap.d.ts.map +1 -1
  23. package/dist/capabilities/broker.cap.d.ts +291 -0
  24. package/dist/capabilities/broker.cap.d.ts.map +1 -0
  25. package/dist/capabilities/button.cap.d.ts +27 -0
  26. package/dist/capabilities/button.cap.d.ts.map +1 -0
  27. package/dist/capabilities/camera-credentials.cap.d.ts +1 -0
  28. package/dist/capabilities/camera-credentials.cap.d.ts.map +1 -1
  29. package/dist/capabilities/camera-streams.cap.d.ts +147 -10
  30. package/dist/capabilities/camera-streams.cap.d.ts.map +1 -1
  31. package/dist/capabilities/capability-definition.d.ts +15 -0
  32. package/dist/capabilities/capability-definition.d.ts.map +1 -1
  33. package/dist/capabilities/carbon-monoxide.cap.d.ts +33 -0
  34. package/dist/capabilities/carbon-monoxide.cap.d.ts.map +1 -0
  35. package/dist/capabilities/climate-control.cap.d.ts +183 -0
  36. package/dist/capabilities/climate-control.cap.d.ts.map +1 -0
  37. package/dist/capabilities/color.cap.d.ts +186 -0
  38. package/dist/capabilities/color.cap.d.ts.map +1 -0
  39. package/dist/capabilities/connectivity.cap.d.ts +37 -0
  40. package/dist/capabilities/connectivity.cap.d.ts.map +1 -0
  41. package/dist/capabilities/consumables.cap.d.ts +105 -0
  42. package/dist/capabilities/consumables.cap.d.ts.map +1 -0
  43. package/dist/capabilities/contact.cap.d.ts +41 -0
  44. package/dist/capabilities/contact.cap.d.ts.map +1 -0
  45. package/dist/capabilities/control.cap.d.ts +167 -0
  46. package/dist/capabilities/control.cap.d.ts.map +1 -0
  47. package/dist/capabilities/cover.cap.d.ts +104 -0
  48. package/dist/capabilities/cover.cap.d.ts.map +1 -0
  49. package/dist/capabilities/custom-actions.d.ts +6 -0
  50. package/dist/capabilities/custom-actions.d.ts.map +1 -1
  51. package/dist/capabilities/decoder.cap.d.ts +1 -1
  52. package/dist/capabilities/device-adoption.cap.d.ts +203 -0
  53. package/dist/capabilities/device-adoption.cap.d.ts.map +1 -0
  54. package/dist/capabilities/device-discovery.cap.d.ts +44 -143
  55. package/dist/capabilities/device-discovery.cap.d.ts.map +1 -1
  56. package/dist/capabilities/device-manager.cap.d.ts +469 -0
  57. package/dist/capabilities/device-manager.cap.d.ts.map +1 -1
  58. package/dist/capabilities/device-ops.cap.d.ts +30 -0
  59. package/dist/capabilities/device-ops.cap.d.ts.map +1 -1
  60. package/dist/capabilities/device-provider.cap.d.ts +36 -0
  61. package/dist/capabilities/device-provider.cap.d.ts.map +1 -1
  62. package/dist/capabilities/device-status.cap.d.ts +1 -0
  63. package/dist/capabilities/device-status.cap.d.ts.map +1 -1
  64. package/dist/capabilities/doorbell.cap.d.ts +1 -0
  65. package/dist/capabilities/doorbell.cap.d.ts.map +1 -1
  66. package/dist/capabilities/enum-sensor.cap.d.ts +60 -0
  67. package/dist/capabilities/enum-sensor.cap.d.ts.map +1 -0
  68. package/dist/capabilities/event-emitter.cap.d.ts +79 -0
  69. package/dist/capabilities/event-emitter.cap.d.ts.map +1 -0
  70. package/dist/capabilities/fan-control.cap.d.ts +100 -0
  71. package/dist/capabilities/fan-control.cap.d.ts.map +1 -0
  72. package/dist/capabilities/feature-probe.cap.d.ts +1 -0
  73. package/dist/capabilities/feature-probe.cap.d.ts.map +1 -1
  74. package/dist/capabilities/filesystem-browse.cap.d.ts +39 -0
  75. package/dist/capabilities/filesystem-browse.cap.d.ts.map +1 -0
  76. package/dist/capabilities/flood.cap.d.ts +37 -0
  77. package/dist/capabilities/flood.cap.d.ts.map +1 -0
  78. package/dist/capabilities/gas.cap.d.ts +34 -0
  79. package/dist/capabilities/gas.cap.d.ts.map +1 -0
  80. package/dist/capabilities/humidifier.cap.d.ts +82 -0
  81. package/dist/capabilities/humidifier.cap.d.ts.map +1 -0
  82. package/dist/capabilities/humidity-sensor.cap.d.ts +43 -0
  83. package/dist/capabilities/humidity-sensor.cap.d.ts.map +1 -0
  84. package/dist/capabilities/image.cap.d.ts +44 -0
  85. package/dist/capabilities/image.cap.d.ts.map +1 -0
  86. package/dist/capabilities/index.d.ts +97 -12
  87. package/dist/capabilities/index.d.ts.map +1 -1
  88. package/dist/capabilities/integrations.cap.d.ts +12 -0
  89. package/dist/capabilities/integrations.cap.d.ts.map +1 -1
  90. package/dist/capabilities/intercom.cap.d.ts +49 -9
  91. package/dist/capabilities/intercom.cap.d.ts.map +1 -1
  92. package/dist/capabilities/lawn-mower-control.cap.d.ts +83 -0
  93. package/dist/capabilities/lawn-mower-control.cap.d.ts.map +1 -0
  94. package/dist/capabilities/lock-control.cap.d.ts +92 -0
  95. package/dist/capabilities/lock-control.cap.d.ts.map +1 -0
  96. package/dist/capabilities/media-player.cap.d.ts +201 -0
  97. package/dist/capabilities/media-player.cap.d.ts.map +1 -0
  98. package/dist/capabilities/motion-trigger.cap.d.ts +1 -0
  99. package/dist/capabilities/motion-trigger.cap.d.ts.map +1 -1
  100. package/dist/capabilities/motion-zones.cap.d.ts +1 -0
  101. package/dist/capabilities/motion-zones.cap.d.ts.map +1 -1
  102. package/dist/capabilities/native-object-detection.cap.d.ts +1 -0
  103. package/dist/capabilities/native-object-detection.cap.d.ts.map +1 -1
  104. package/dist/capabilities/network-quality.cap.d.ts +5 -0
  105. package/dist/capabilities/network-quality.cap.d.ts.map +1 -1
  106. package/dist/capabilities/notifier.cap.d.ts +173 -0
  107. package/dist/capabilities/notifier.cap.d.ts.map +1 -0
  108. package/dist/capabilities/numeric-sensor.cap.d.ts +52 -0
  109. package/dist/capabilities/numeric-sensor.cap.d.ts.map +1 -0
  110. package/dist/capabilities/osd.cap.d.ts +1 -0
  111. package/dist/capabilities/osd.cap.d.ts.map +1 -1
  112. package/dist/capabilities/pipeline-analytics.cap.d.ts +69 -22
  113. package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -1
  114. package/dist/capabilities/pipeline-executor.cap.d.ts +2 -2
  115. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +1 -1
  116. package/dist/capabilities/pipeline-runner.cap.d.ts +2 -2
  117. package/dist/capabilities/platform-probe.cap.d.ts +25 -0
  118. package/dist/capabilities/platform-probe.cap.d.ts.map +1 -1
  119. package/dist/capabilities/power-meter.cap.d.ts +65 -0
  120. package/dist/capabilities/power-meter.cap.d.ts.map +1 -0
  121. package/dist/capabilities/presence.cap.d.ts +79 -0
  122. package/dist/capabilities/presence.cap.d.ts.map +1 -0
  123. package/dist/capabilities/pressure-sensor.cap.d.ts +43 -0
  124. package/dist/capabilities/pressure-sensor.cap.d.ts.map +1 -0
  125. package/dist/capabilities/privacy-mask.cap.d.ts +1 -0
  126. package/dist/capabilities/privacy-mask.cap.d.ts.map +1 -1
  127. package/dist/capabilities/ptz-autotrack.cap.d.ts +1 -0
  128. package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -1
  129. package/dist/capabilities/ptz.cap.d.ts +1 -0
  130. package/dist/capabilities/ptz.cap.d.ts.map +1 -1
  131. package/dist/capabilities/reboot.cap.d.ts +1 -0
  132. package/dist/capabilities/reboot.cap.d.ts.map +1 -1
  133. package/dist/capabilities/recording.cap.d.ts +367 -32
  134. package/dist/capabilities/recording.cap.d.ts.map +1 -1
  135. package/dist/capabilities/restreamer.cap.d.ts +2 -2
  136. package/dist/capabilities/schemas/orchestrator-metrics.d.ts +2 -2
  137. package/dist/capabilities/schemas/streaming-shared.d.ts +64 -1
  138. package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -1
  139. package/dist/capabilities/script-runner.cap.d.ts +62 -0
  140. package/dist/capabilities/script-runner.cap.d.ts.map +1 -0
  141. package/dist/capabilities/settings-store.cap.d.ts +25 -0
  142. package/dist/capabilities/settings-store.cap.d.ts.map +1 -1
  143. package/dist/capabilities/smoke.cap.d.ts +38 -0
  144. package/dist/capabilities/smoke.cap.d.ts.map +1 -0
  145. package/dist/capabilities/snapshot-provider.cap.d.ts +1 -1
  146. package/dist/capabilities/snapshot.cap.d.ts +1 -0
  147. package/dist/capabilities/snapshot.cap.d.ts.map +1 -1
  148. package/dist/capabilities/storage-evictable.cap.d.ts +54 -0
  149. package/dist/capabilities/storage-evictable.cap.d.ts.map +1 -0
  150. package/dist/capabilities/storage-provider.cap.d.ts +46 -186
  151. package/dist/capabilities/storage-provider.cap.d.ts.map +1 -1
  152. package/dist/capabilities/storage.cap.d.ts +41 -226
  153. package/dist/capabilities/storage.cap.d.ts.map +1 -1
  154. package/dist/capabilities/stream-broker.cap.d.ts +323 -25
  155. package/dist/capabilities/stream-broker.cap.d.ts.map +1 -1
  156. package/dist/capabilities/stream-catalog.cap.d.ts +3 -0
  157. package/dist/capabilities/stream-catalog.cap.d.ts.map +1 -1
  158. package/dist/capabilities/stream-params.cap.d.ts +27 -26
  159. package/dist/capabilities/stream-params.cap.d.ts.map +1 -1
  160. package/dist/capabilities/switch.cap.d.ts +1 -0
  161. package/dist/capabilities/switch.cap.d.ts.map +1 -1
  162. package/dist/capabilities/tamper.cap.d.ts +33 -0
  163. package/dist/capabilities/tamper.cap.d.ts.map +1 -0
  164. package/dist/capabilities/temperature-sensor.cap.d.ts +51 -0
  165. package/dist/capabilities/temperature-sensor.cap.d.ts.map +1 -0
  166. package/dist/capabilities/update.cap.d.ts +49 -0
  167. package/dist/capabilities/update.cap.d.ts.map +1 -0
  168. package/dist/capabilities/vacuum-control.cap.d.ts +229 -0
  169. package/dist/capabilities/vacuum-control.cap.d.ts.map +1 -0
  170. package/dist/capabilities/valve.cap.d.ts +93 -0
  171. package/dist/capabilities/valve.cap.d.ts.map +1 -0
  172. package/dist/capabilities/vibration.cap.d.ts +33 -0
  173. package/dist/capabilities/vibration.cap.d.ts.map +1 -0
  174. package/dist/capabilities/videoclips.cap.d.ts +77 -0
  175. package/dist/capabilities/videoclips.cap.d.ts.map +1 -0
  176. package/dist/capabilities/water-heater.cap.d.ts +78 -0
  177. package/dist/capabilities/water-heater.cap.d.ts.map +1 -0
  178. package/dist/capabilities/weather.cap.d.ts +76 -0
  179. package/dist/capabilities/weather.cap.d.ts.map +1 -0
  180. package/dist/capabilities/webrtc-session.cap.d.ts +95 -1
  181. package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -1
  182. package/dist/constants.d.ts +0 -2
  183. package/dist/constants.d.ts.map +1 -1
  184. package/dist/device/base-device-provider.d.ts +11 -0
  185. package/dist/device/base-device-provider.d.ts.map +1 -1
  186. package/dist/device/base-device.d.ts +52 -0
  187. package/dist/device/base-device.d.ts.map +1 -1
  188. package/dist/device/device-context.d.ts +29 -0
  189. package/dist/device/device-context.d.ts.map +1 -1
  190. package/dist/device/device-link-transform.d.ts +6 -0
  191. package/dist/device/device-link-transform.d.ts.map +1 -0
  192. package/dist/device/device-management.d.ts +116 -4
  193. package/dist/device/device-management.d.ts.map +1 -1
  194. package/dist/device/device-type.d.ts +214 -3
  195. package/dist/device/device-type.d.ts.map +1 -1
  196. package/dist/device/device.d.ts +25 -0
  197. package/dist/device/device.d.ts.map +1 -1
  198. package/dist/device/index.d.ts +5 -1
  199. package/dist/device/index.d.ts.map +1 -1
  200. package/dist/device/path-util.d.ts +13 -0
  201. package/dist/device/path-util.d.ts.map +1 -0
  202. package/dist/device/schema-fields.d.ts +12 -0
  203. package/dist/device/schema-fields.d.ts.map +1 -0
  204. package/dist/device/source-info.d.ts +87 -0
  205. package/dist/device/source-info.d.ts.map +1 -0
  206. package/dist/device/system-mirror.d.ts +6 -2
  207. package/dist/device/system-mirror.d.ts.map +1 -1
  208. package/dist/encode-profile.d.ts +126 -0
  209. package/dist/encode-profile.d.ts.map +1 -0
  210. package/dist/enums/event-category.d.ts +64 -6
  211. package/dist/enums/event-category.d.ts.map +1 -1
  212. package/dist/generated/addon-api.d.ts +12722 -8080
  213. package/dist/generated/addon-api.d.ts.map +1 -1
  214. package/dist/generated/cap-status-types.d.ts +85 -1
  215. package/dist/generated/cap-status-types.d.ts.map +1 -1
  216. package/dist/generated/capability-router-map.d.ts +139 -7
  217. package/dist/generated/capability-router-map.d.ts.map +1 -1
  218. package/dist/generated/device-local-state.d.ts +117 -0
  219. package/dist/generated/device-local-state.d.ts.map +1 -1
  220. package/dist/generated/device-proxy.d.ts +126 -5
  221. package/dist/generated/device-proxy.d.ts.map +1 -1
  222. package/dist/generated/method-access-map.d.ts +1 -1
  223. package/dist/generated/method-access-map.d.ts.map +1 -1
  224. package/dist/generated/provider-kind-map.d.ts +1 -1
  225. package/dist/generated/provider-kind-map.d.ts.map +1 -1
  226. package/dist/generated/system-proxy.d.ts +10 -8
  227. package/dist/generated/system-proxy.d.ts.map +1 -1
  228. package/dist/{index-C2zzIDdX.mjs → index-BxWo3b49.mjs} +4714 -1113
  229. package/dist/index-BxWo3b49.mjs.map +1 -0
  230. package/dist/{index-DnpdVFKv.js → index-CGMPfVaT.js} +4321 -720
  231. package/dist/index-CGMPfVaT.js.map +1 -0
  232. package/dist/index.d.ts +22 -3
  233. package/dist/index.d.ts.map +1 -1
  234. package/dist/index.js +1384 -116
  235. package/dist/index.js.map +1 -1
  236. package/dist/index.mjs +1698 -430
  237. package/dist/index.mjs.map +1 -1
  238. package/dist/interfaces/addon-data-plane.d.ts +76 -0
  239. package/dist/interfaces/addon-data-plane.d.ts.map +1 -0
  240. package/dist/interfaces/addon.d.ts +60 -0
  241. package/dist/interfaces/addon.d.ts.map +1 -1
  242. package/dist/interfaces/advanced-notifier.d.ts +4 -0
  243. package/dist/interfaces/advanced-notifier.d.ts.map +1 -1
  244. package/dist/interfaces/capability.d.ts +42 -1
  245. package/dist/interfaces/capability.d.ts.map +1 -1
  246. package/dist/interfaces/config-ui.d.ts +70 -6
  247. package/dist/interfaces/config-ui.d.ts.map +1 -1
  248. package/dist/interfaces/device-capabilities/camera.d.ts +2 -1
  249. package/dist/interfaces/device-capabilities/camera.d.ts.map +1 -1
  250. package/dist/interfaces/event-bus.d.ts +49 -3
  251. package/dist/interfaces/event-bus.d.ts.map +1 -1
  252. package/dist/interfaces/kernel-abstractions.d.ts +10 -1
  253. package/dist/interfaces/kernel-abstractions.d.ts.map +1 -1
  254. package/dist/interfaces/network-quality.d.ts +8 -0
  255. package/dist/interfaces/network-quality.d.ts.map +1 -1
  256. package/dist/interfaces/pipeline-executor-capability.d.ts +2 -2
  257. package/dist/interfaces/pipeline-orchestrator-capability.d.ts +2 -1
  258. package/dist/interfaces/pipeline-orchestrator-capability.d.ts.map +1 -1
  259. package/dist/interfaces/pipeline-runner-capability.d.ts +7 -0
  260. package/dist/interfaces/pipeline-runner-capability.d.ts.map +1 -1
  261. package/dist/interfaces/recording-config-migrate.d.ts +13 -0
  262. package/dist/interfaces/recording-config-migrate.d.ts.map +1 -0
  263. package/dist/interfaces/recording-config.d.ts +209 -0
  264. package/dist/interfaces/recording-config.d.ts.map +1 -0
  265. package/dist/interfaces/rtp-egress.d.ts +2 -3
  266. package/dist/interfaces/rtp-egress.d.ts.map +1 -1
  267. package/dist/interfaces/storage-location-declaration.d.ts +34 -0
  268. package/dist/interfaces/storage-location-declaration.d.ts.map +1 -0
  269. package/dist/interfaces/storage-location.d.ts +19 -74
  270. package/dist/interfaces/storage-location.d.ts.map +1 -1
  271. package/dist/interfaces/storage.d.ts +15 -4
  272. package/dist/interfaces/storage.d.ts.map +1 -1
  273. package/dist/interfaces/stream-broker.d.ts +18 -3
  274. package/dist/interfaces/stream-broker.d.ts.map +1 -1
  275. package/dist/interfaces/timezones.d.ts +59 -0
  276. package/dist/interfaces/timezones.d.ts.map +1 -0
  277. package/dist/node.d.ts +3 -0
  278. package/dist/node.d.ts.map +1 -1
  279. package/dist/node.js +50 -8
  280. package/dist/node.js.map +1 -1
  281. package/dist/node.mjs +51 -9
  282. package/dist/node.mjs.map +1 -1
  283. package/dist/storage/filesystem-storage-provider.d.ts +2 -1
  284. package/dist/storage/filesystem-storage-provider.d.ts.map +1 -1
  285. package/dist/stream-selection.d.ts +85 -0
  286. package/dist/stream-selection.d.ts.map +1 -0
  287. package/dist/types/detection.d.ts +3 -3
  288. package/dist/types/io.d.ts +1 -1
  289. package/dist/types/io.d.ts.map +1 -1
  290. package/dist/util/location-match.d.ts +15 -0
  291. package/dist/util/location-match.d.ts.map +1 -0
  292. package/dist/utils/canonical-hash.d.ts +20 -0
  293. package/dist/utils/canonical-hash.d.ts.map +1 -0
  294. package/dist/utils/export-reconciler.d.ts +101 -0
  295. package/dist/utils/export-reconciler.d.ts.map +1 -0
  296. package/dist/utils/sleep.d.ts +36 -0
  297. package/dist/utils/sleep.d.ts.map +1 -0
  298. package/package.json +1 -1
  299. package/dist/capabilities/recording-engine.cap.d.ts +0 -477
  300. package/dist/capabilities/recording-engine.cap.d.ts.map +0 -1
  301. package/dist/index-C2zzIDdX.mjs.map +0 -1
  302. package/dist/index-DnpdVFKv.js.map +0 -1
@@ -200,9 +200,9 @@ export interface AudioDetection extends DetectionBase {
200
200
  *
201
201
  * Named `DetectionEntry` rather than `Detection` because the
202
202
  * device-capabilities namespace already exports a different `Detection`
203
- * interface for Scrypted-style object detectors. The two live in
204
- * separate files but both are re-exported at the package root, so
205
- * keeping names distinct avoids an import-level collision.
203
+ * interface for object detectors. The two live in separate files but
204
+ * both are re-exported at the package root, so keeping names distinct
205
+ * avoids an import-level collision.
206
206
  */
207
207
  export type DetectionEntry = ObjectDetection | AudioDetection;
208
208
  /**
@@ -46,7 +46,7 @@ export interface FrameInput {
46
46
  */
47
47
  export interface AudioChunkInput {
48
48
  readonly [key: string]: unknown;
49
- readonly data: Uint8Array;
49
+ readonly data: Uint8Array<ArrayBuffer>;
50
50
  readonly sampleRate: number;
51
51
  readonly channels: number;
52
52
  readonly timestamp: number;
@@ -1 +1 @@
1
- {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../src/types/io.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEpE,uEAAuE;AACvE,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAA;AAEpE,M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EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC3B;AAMD;;;;;;;GAOG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KACtB,CAAA;IACD,0FAA0F;IAC1F,QAAQ,CAAC,cAAc,CAAC,EAAE;QACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAA;QACpD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;KAC7B,CAAA;IACD,sCAAsC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED,kEAAkE;AAClE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAA;CAClC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Pure fuzzy matcher for adoption location import. Normalized
3
+ * case-insensitive Levenshtein similarity, used to reuse an existing
4
+ * CamStack location when an imported source location (e.g. an HA area) is
5
+ * close enough — otherwise the caller creates a new location.
6
+ */
7
+ /** Similarity in [0,1]; 1 = identical (after trim + lowercase). */
8
+ export declare function locationSimilarity(a: string, b: string): number;
9
+ /**
10
+ * Returns the existing name with the highest similarity to `externalName`,
11
+ * provided it is at least `threshold`; otherwise `null` (caller should create
12
+ * a new location named `externalName`).
13
+ */
14
+ export declare function bestLocationMatch(externalName: string, existing: readonly string[], threshold?: number): string | null;
15
+ //# sourceMappingURL=location-match.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location-match.d.ts","sourceRoot":"","sources":["../../src/util/location-match.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA6BH,mEAAmE;AACnE,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAM/D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,SAAS,SAAM,GACd,MAAM,GAAG,IAAI,CAWf"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Deterministic SHA-256 hash of an arbitrary serialisable value. The
3
+ * canonical form sorts object keys alphabetically at every depth so two
4
+ * structurally-equal inputs with different key insertion orders produce
5
+ * the same hash. Returns a 64-char lowercase hex digest.
6
+ *
7
+ * Used by export adapters (Alexa, HAP) to short-circuit re-discovery /
8
+ * accessory-rebuild work when the upstream shape is byte-identical to
9
+ * the last applied state — preventing user-visible "re-discovery"
10
+ * notifications on every addon-runner respawn. Each respawn re-fires
11
+ * `DeviceBindingsChanged` for every cap registration, which without
12
+ * this guard would propagate redundant pushes.
13
+ *
14
+ * Note: this is a SYMPTOMATIC fix layered on top of the binding-change
15
+ * subscription. The proper fix is a single "device ready" lifecycle
16
+ * barrier so exports react only when the full cap set has landed —
17
+ * tracked separately for post-HA-integration work.
18
+ */
19
+ export declare function canonicalHash(value: unknown): string;
20
+ //# sourceMappingURL=canonical-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonical-hash.d.ts","sourceRoot":"","sources":["../../src/utils/canonical-hash.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGpD"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Pure, stateless primitives shared by the camera export addons (Alexa, HAP)
3
+ * to advertise devices to external ecosystems without re-discovery storms.
4
+ *
5
+ * Spec: docs/superpowers/specs/2026-06-01-alexa-hap-export-reconciler-design.md
6
+ *
7
+ * Two functions, both pure (no I/O, no clock, no randomness, no event
8
+ * subscriptions) so they are exhaustively unit-testable in isolation:
9
+ *
10
+ * 1) `canonicalDeviceFingerprint(shape)` — a stable hash of the
11
+ * EXPORT-RELEVANT device shape (coarse type + the persisted
12
+ * `DeviceFeature` set). Order-independent and de-duplicated, so an
13
+ * unchanged device produces an identical fingerprint across restarts.
14
+ * Identity (`deviceId`) and volatile runtime values (online, battery%,
15
+ * name, location) are deliberately excluded.
16
+ *
17
+ * 2) `diffExportTargets(desired, lastAdvertised)` — a 3-way set diff keyed
18
+ * by `deviceId`: what to add, what to update (fingerprint changed), what
19
+ * to remove (no longer desired). Each exporter feeds its own persisted
20
+ * per-target sync state in and applies the resulting delta to its
21
+ * platform.
22
+ *
23
+ * The wiring — event subscription, boot scan, platform apply, persistence —
24
+ * stays in each exporter; only the fingerprint + diff are shared.
25
+ */
26
+ /** The export-relevant projection of a device, fed into the fingerprint. */
27
+ export interface DeviceExportShape {
28
+ /** Numeric device id. Identity only — NOT part of the fingerprint. */
29
+ readonly deviceId: number;
30
+ /**
31
+ * Coarse driver classification (e.g. `'camera' | 'battery-camera' | 'nvr'`),
32
+ * sourced from the `feature-probe` slice's `deviceType`. Part of the shape:
33
+ * the same feature set on a different device class can map to a different
34
+ * export surface.
35
+ */
36
+ readonly deviceType: string;
37
+ /**
38
+ * Export-relevant `DeviceFeature` values (e.g. `'pan-tilt-zoom'`,
39
+ * `'two-way-audio'`, `'doorbell-button'`, `'motion-trigger'`,
40
+ * `'battery-operated'`, `'ptz-autotrack'`). Sourced from the PERSISTED
41
+ * `PersistedDeviceMeta.features`, so it survives restart and is stable
42
+ * without a re-probe. Hashed order-independently + de-duplicated.
43
+ */
44
+ readonly features: readonly string[];
45
+ }
46
+ /**
47
+ * Compute the stable 64-char lowercase-hex fingerprint of a device's
48
+ * export-relevant shape. Two structurally-equal shapes (any feature order,
49
+ * any duplicates, any deviceId) hash identically.
50
+ */
51
+ export declare function canonicalDeviceFingerprint(shape: DeviceExportShape): string;
52
+ /** Per-export-target sync state for one device, persisted addon-side. */
53
+ export interface ExportTargetEntry {
54
+ /** Fingerprint last advertised to this target for this device. */
55
+ readonly fingerprint: string;
56
+ /**
57
+ * Platform-specific external ids (Alexa endpoint ids, HAP accessory UUIDs).
58
+ * Opaque to the diff — carried so the exporter can address what to update or
59
+ * delete on its platform.
60
+ */
61
+ readonly externalIds: readonly string[];
62
+ }
63
+ /** The 3-way delta produced by `diffExportTargets`. */
64
+ export interface ExportDelta<T> {
65
+ /** Desired devices with no last-advertised entry — publish fresh. */
66
+ readonly toAdd: readonly T[];
67
+ /** Desired devices whose fingerprint differs from last-advertised — re-advertise. */
68
+ readonly toUpdate: readonly T[];
69
+ /** `deviceId`s present in last-advertised but absent from desired — retract. */
70
+ readonly toRemove: readonly number[];
71
+ }
72
+ /**
73
+ * Pure 3-way diff of desired export state against the persisted
74
+ * last-advertised state, keyed by `deviceId`.
75
+ *
76
+ * - `desired` — one entry per device to advertise this cycle, each carrying
77
+ * the freshly-computed `fingerprint`.
78
+ * - `lastAdvertised` — the exporter's persisted per-target sync state.
79
+ *
80
+ * Neither input is mutated.
81
+ */
82
+ export declare function diffExportTargets<T extends {
83
+ deviceId: number;
84
+ fingerprint: string;
85
+ }>(desired: readonly T[], lastAdvertised: ReadonlyMap<number, ExportTargetEntry>): ExportDelta<T>;
86
+ /**
87
+ * Resolve the fingerprint an exporter should feed into `diffExportTargets`
88
+ * for one device this cycle.
89
+ *
90
+ * When a device is NOT yet probe-ready, carry forward its last-advertised
91
+ * (persisted) fingerprint so it nets to NO CHANGE in `diffExportTargets`
92
+ * (neither update nor remove) — never advertise a partial mid-probe shape. A
93
+ * brand-new un-probed device with no persisted entry falls back to `fresh` so
94
+ * it can advertise once.
95
+ */
96
+ export declare function resolveExportFingerprint(input: {
97
+ ready: boolean;
98
+ fresh: string;
99
+ persisted: string | undefined;
100
+ }): string;
101
+ //# sourceMappingURL=export-reconciler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-reconciler.d.ts","sourceRoot":"","sources":["../../src/utils/export-reconciler.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CACrC;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAG3E;AAED,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;CACxC;AAED,uDAAuD;AACvD,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAA;IAC5B,qFAAqF;IACrF,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAA;IAC/B,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CACrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACnF,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,GACrD,WAAW,CAAC,CAAC,CAAC,CAsBhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,GAAG,MAAM,CAGT"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Promise-based timer helpers — used everywhere the codebase needs to
3
+ * wait, back off, or schedule a retry. Before these helpers landed, each
4
+ * call site re-implemented `new Promise(r => setTimeout(r, ms))` inline,
5
+ * with subtle variations (some swallowing cancellation, some not). Two
6
+ * shapes cover every observed use case:
7
+ *
8
+ * - {@link sleep} for a plain, uncancellable wait — the default choice.
9
+ * - {@link sleepCancellable} for a wait that wakes early when an
10
+ * abort signal trips, used by long-running pollers whose teardown
11
+ * must stop a pending backoff promptly.
12
+ */
13
+ /**
14
+ * Resolve after `ms` milliseconds. Never rejects, never cancels. The
15
+ * sleep cannot be interrupted; for a wakeable variant use
16
+ * {@link sleepCancellable}.
17
+ *
18
+ * `ms <= 0` resolves on the next microtask via `setTimeout(0)`, which
19
+ * still gives the event loop a chance to drain — useful for breaking
20
+ * up tight async loops without changing call-site semantics.
21
+ */
22
+ export declare function sleep(ms: number): Promise<void>;
23
+ /**
24
+ * Resolve after `ms` milliseconds OR when `signal.aborted` flips,
25
+ * whichever fires first. The returned promise never rejects — aborted
26
+ * sleeps resolve normally so callers can model "wait or wake" without
27
+ * try/catch noise.
28
+ *
29
+ * await sleepCancellable(backoffMs, lifecycle.abortSignal)
30
+ * if (lifecycle.aborted) return
31
+ *
32
+ * If `signal` is already aborted at call time the helper resolves on
33
+ * the next microtask.
34
+ */
35
+ export declare function sleepCancellable(ms: number, signal: AbortSignal): Promise<void>;
36
+ //# sourceMappingURL=sleep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../src/utils/sleep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAc/E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",