@camstack/types 0.1.40 → 0.1.41
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.
- package/dist/addon/base-addon.d.ts +12 -0
- package/dist/addon/base-addon.d.ts.map +1 -1
- package/dist/addon/durable-state.d.ts +33 -0
- package/dist/addon/durable-state.d.ts.map +1 -0
- package/dist/capabilities/accessories.cap.d.ts +56 -8
- package/dist/capabilities/accessories.cap.d.ts.map +1 -1
- package/dist/capabilities/advanced-notifier.cap.d.ts +4 -0
- package/dist/capabilities/advanced-notifier.cap.d.ts.map +1 -1
- package/dist/capabilities/air-quality-sensor.cap.d.ts +56 -0
- package/dist/capabilities/air-quality-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/alarm-panel.cap.d.ts +154 -0
- package/dist/capabilities/alarm-panel.cap.d.ts.map +1 -0
- package/dist/capabilities/ambient-light-sensor.cap.d.ts +39 -0
- package/dist/capabilities/ambient-light-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/automation-control.cap.d.ts +65 -0
- package/dist/capabilities/automation-control.cap.d.ts.map +1 -0
- package/dist/capabilities/battery.cap.d.ts +30 -1
- package/dist/capabilities/battery.cap.d.ts.map +1 -1
- package/dist/capabilities/binary.cap.d.ts +40 -0
- package/dist/capabilities/binary.cap.d.ts.map +1 -0
- package/dist/capabilities/brightness.cap.d.ts +3 -2
- package/dist/capabilities/brightness.cap.d.ts.map +1 -1
- package/dist/capabilities/broker.cap.d.ts +291 -0
- package/dist/capabilities/broker.cap.d.ts.map +1 -0
- package/dist/capabilities/button.cap.d.ts +27 -0
- package/dist/capabilities/button.cap.d.ts.map +1 -0
- package/dist/capabilities/camera-credentials.cap.d.ts +1 -0
- package/dist/capabilities/camera-credentials.cap.d.ts.map +1 -1
- package/dist/capabilities/camera-streams.cap.d.ts +147 -10
- package/dist/capabilities/camera-streams.cap.d.ts.map +1 -1
- package/dist/capabilities/capability-definition.d.ts +15 -0
- package/dist/capabilities/capability-definition.d.ts.map +1 -1
- package/dist/capabilities/carbon-monoxide.cap.d.ts +33 -0
- package/dist/capabilities/carbon-monoxide.cap.d.ts.map +1 -0
- package/dist/capabilities/climate-control.cap.d.ts +183 -0
- package/dist/capabilities/climate-control.cap.d.ts.map +1 -0
- package/dist/capabilities/color.cap.d.ts +186 -0
- package/dist/capabilities/color.cap.d.ts.map +1 -0
- package/dist/capabilities/connectivity.cap.d.ts +37 -0
- package/dist/capabilities/connectivity.cap.d.ts.map +1 -0
- package/dist/capabilities/consumables.cap.d.ts +105 -0
- package/dist/capabilities/consumables.cap.d.ts.map +1 -0
- package/dist/capabilities/contact.cap.d.ts +41 -0
- package/dist/capabilities/contact.cap.d.ts.map +1 -0
- package/dist/capabilities/control.cap.d.ts +167 -0
- package/dist/capabilities/control.cap.d.ts.map +1 -0
- package/dist/capabilities/cover.cap.d.ts +104 -0
- package/dist/capabilities/cover.cap.d.ts.map +1 -0
- package/dist/capabilities/custom-actions.d.ts +6 -0
- package/dist/capabilities/custom-actions.d.ts.map +1 -1
- package/dist/capabilities/decoder.cap.d.ts +1 -1
- package/dist/capabilities/device-adoption.cap.d.ts +203 -0
- package/dist/capabilities/device-adoption.cap.d.ts.map +1 -0
- package/dist/capabilities/device-discovery.cap.d.ts +44 -143
- package/dist/capabilities/device-discovery.cap.d.ts.map +1 -1
- package/dist/capabilities/device-manager.cap.d.ts +469 -0
- package/dist/capabilities/device-manager.cap.d.ts.map +1 -1
- package/dist/capabilities/device-ops.cap.d.ts +30 -0
- package/dist/capabilities/device-ops.cap.d.ts.map +1 -1
- package/dist/capabilities/device-provider.cap.d.ts +36 -0
- package/dist/capabilities/device-provider.cap.d.ts.map +1 -1
- package/dist/capabilities/device-status.cap.d.ts +1 -0
- package/dist/capabilities/device-status.cap.d.ts.map +1 -1
- package/dist/capabilities/doorbell.cap.d.ts +1 -0
- package/dist/capabilities/doorbell.cap.d.ts.map +1 -1
- package/dist/capabilities/enum-sensor.cap.d.ts +60 -0
- package/dist/capabilities/enum-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/event-emitter.cap.d.ts +79 -0
- package/dist/capabilities/event-emitter.cap.d.ts.map +1 -0
- package/dist/capabilities/fan-control.cap.d.ts +100 -0
- package/dist/capabilities/fan-control.cap.d.ts.map +1 -0
- package/dist/capabilities/feature-probe.cap.d.ts +1 -0
- package/dist/capabilities/feature-probe.cap.d.ts.map +1 -1
- package/dist/capabilities/flood.cap.d.ts +37 -0
- package/dist/capabilities/flood.cap.d.ts.map +1 -0
- package/dist/capabilities/gas.cap.d.ts +34 -0
- package/dist/capabilities/gas.cap.d.ts.map +1 -0
- package/dist/capabilities/humidifier.cap.d.ts +82 -0
- package/dist/capabilities/humidifier.cap.d.ts.map +1 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts +43 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/image.cap.d.ts +44 -0
- package/dist/capabilities/image.cap.d.ts.map +1 -0
- package/dist/capabilities/index.d.ts +93 -12
- package/dist/capabilities/index.d.ts.map +1 -1
- package/dist/capabilities/integrations.cap.d.ts +12 -0
- package/dist/capabilities/integrations.cap.d.ts.map +1 -1
- package/dist/capabilities/intercom.cap.d.ts +49 -9
- package/dist/capabilities/intercom.cap.d.ts.map +1 -1
- package/dist/capabilities/lawn-mower-control.cap.d.ts +83 -0
- package/dist/capabilities/lawn-mower-control.cap.d.ts.map +1 -0
- package/dist/capabilities/lock-control.cap.d.ts +92 -0
- package/dist/capabilities/lock-control.cap.d.ts.map +1 -0
- package/dist/capabilities/media-player.cap.d.ts +201 -0
- package/dist/capabilities/media-player.cap.d.ts.map +1 -0
- package/dist/capabilities/motion-trigger.cap.d.ts +1 -0
- package/dist/capabilities/motion-trigger.cap.d.ts.map +1 -1
- package/dist/capabilities/motion-zones.cap.d.ts +1 -0
- package/dist/capabilities/motion-zones.cap.d.ts.map +1 -1
- package/dist/capabilities/native-object-detection.cap.d.ts +1 -0
- package/dist/capabilities/native-object-detection.cap.d.ts.map +1 -1
- package/dist/capabilities/network-quality.cap.d.ts +5 -0
- package/dist/capabilities/network-quality.cap.d.ts.map +1 -1
- package/dist/capabilities/notifier.cap.d.ts +173 -0
- package/dist/capabilities/notifier.cap.d.ts.map +1 -0
- package/dist/capabilities/numeric-sensor.cap.d.ts +52 -0
- package/dist/capabilities/numeric-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/osd.cap.d.ts +1 -0
- package/dist/capabilities/osd.cap.d.ts.map +1 -1
- package/dist/capabilities/pipeline-analytics.cap.d.ts +69 -22
- package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -1
- package/dist/capabilities/pipeline-executor.cap.d.ts +2 -2
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +1 -1
- package/dist/capabilities/pipeline-runner.cap.d.ts +2 -2
- package/dist/capabilities/platform-probe.cap.d.ts +25 -0
- package/dist/capabilities/platform-probe.cap.d.ts.map +1 -1
- package/dist/capabilities/power-meter.cap.d.ts +65 -0
- package/dist/capabilities/power-meter.cap.d.ts.map +1 -0
- package/dist/capabilities/presence.cap.d.ts +79 -0
- package/dist/capabilities/presence.cap.d.ts.map +1 -0
- package/dist/capabilities/pressure-sensor.cap.d.ts +43 -0
- package/dist/capabilities/pressure-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/privacy-mask.cap.d.ts +1 -0
- package/dist/capabilities/privacy-mask.cap.d.ts.map +1 -1
- package/dist/capabilities/ptz-autotrack.cap.d.ts +1 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -1
- package/dist/capabilities/ptz.cap.d.ts +1 -0
- package/dist/capabilities/ptz.cap.d.ts.map +1 -1
- package/dist/capabilities/reboot.cap.d.ts +1 -0
- package/dist/capabilities/reboot.cap.d.ts.map +1 -1
- package/dist/capabilities/recording.cap.d.ts +238 -32
- package/dist/capabilities/recording.cap.d.ts.map +1 -1
- package/dist/capabilities/restreamer.cap.d.ts +2 -2
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts +2 -2
- package/dist/capabilities/schemas/streaming-shared.d.ts +64 -1
- package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -1
- package/dist/capabilities/script-runner.cap.d.ts +62 -0
- package/dist/capabilities/script-runner.cap.d.ts.map +1 -0
- package/dist/capabilities/settings-store.cap.d.ts +25 -0
- package/dist/capabilities/settings-store.cap.d.ts.map +1 -1
- package/dist/capabilities/smoke.cap.d.ts +38 -0
- package/dist/capabilities/smoke.cap.d.ts.map +1 -0
- package/dist/capabilities/snapshot-provider.cap.d.ts +1 -1
- package/dist/capabilities/snapshot.cap.d.ts +1 -0
- package/dist/capabilities/snapshot.cap.d.ts.map +1 -1
- package/dist/capabilities/storage-evictable.cap.d.ts +54 -0
- package/dist/capabilities/storage-evictable.cap.d.ts.map +1 -0
- package/dist/capabilities/storage-provider.cap.d.ts +31 -186
- package/dist/capabilities/storage-provider.cap.d.ts.map +1 -1
- package/dist/capabilities/storage.cap.d.ts +35 -226
- package/dist/capabilities/storage.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-broker.cap.d.ts +309 -25
- package/dist/capabilities/stream-broker.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-catalog.cap.d.ts +3 -0
- package/dist/capabilities/stream-catalog.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-params.cap.d.ts +27 -26
- package/dist/capabilities/stream-params.cap.d.ts.map +1 -1
- package/dist/capabilities/switch.cap.d.ts +1 -0
- package/dist/capabilities/switch.cap.d.ts.map +1 -1
- package/dist/capabilities/tamper.cap.d.ts +33 -0
- package/dist/capabilities/tamper.cap.d.ts.map +1 -0
- package/dist/capabilities/temperature-sensor.cap.d.ts +51 -0
- package/dist/capabilities/temperature-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/update.cap.d.ts +49 -0
- package/dist/capabilities/update.cap.d.ts.map +1 -0
- package/dist/capabilities/vacuum-control.cap.d.ts +229 -0
- package/dist/capabilities/vacuum-control.cap.d.ts.map +1 -0
- package/dist/capabilities/valve.cap.d.ts +93 -0
- package/dist/capabilities/valve.cap.d.ts.map +1 -0
- package/dist/capabilities/vibration.cap.d.ts +33 -0
- package/dist/capabilities/vibration.cap.d.ts.map +1 -0
- package/dist/capabilities/water-heater.cap.d.ts +78 -0
- package/dist/capabilities/water-heater.cap.d.ts.map +1 -0
- package/dist/capabilities/weather.cap.d.ts +76 -0
- package/dist/capabilities/weather.cap.d.ts.map +1 -0
- package/dist/capabilities/webrtc-session.cap.d.ts +95 -1
- package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -1
- package/dist/constants.d.ts +0 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/device/base-device-provider.d.ts +11 -0
- package/dist/device/base-device-provider.d.ts.map +1 -1
- package/dist/device/base-device.d.ts +52 -0
- package/dist/device/base-device.d.ts.map +1 -1
- package/dist/device/device-context.d.ts +29 -0
- package/dist/device/device-context.d.ts.map +1 -1
- package/dist/device/device-link-transform.d.ts +6 -0
- package/dist/device/device-link-transform.d.ts.map +1 -0
- package/dist/device/device-management.d.ts +116 -4
- package/dist/device/device-management.d.ts.map +1 -1
- package/dist/device/device-type.d.ts +214 -3
- package/dist/device/device-type.d.ts.map +1 -1
- package/dist/device/device.d.ts +25 -0
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/index.d.ts +5 -1
- package/dist/device/index.d.ts.map +1 -1
- package/dist/device/path-util.d.ts +13 -0
- package/dist/device/path-util.d.ts.map +1 -0
- package/dist/device/schema-fields.d.ts +12 -0
- package/dist/device/schema-fields.d.ts.map +1 -0
- package/dist/device/source-info.d.ts +87 -0
- package/dist/device/source-info.d.ts.map +1 -0
- package/dist/device/system-mirror.d.ts +6 -2
- package/dist/device/system-mirror.d.ts.map +1 -1
- package/dist/encode-profile.d.ts +126 -0
- package/dist/encode-profile.d.ts.map +1 -0
- package/dist/enums/event-category.d.ts +64 -6
- package/dist/enums/event-category.d.ts.map +1 -1
- package/dist/generated/addon-api.d.ts +12345 -8129
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/generated/cap-status-types.d.ts +85 -1
- package/dist/generated/cap-status-types.d.ts.map +1 -1
- package/dist/generated/capability-router-map.d.ts +133 -7
- package/dist/generated/capability-router-map.d.ts.map +1 -1
- package/dist/generated/device-local-state.d.ts +117 -0
- package/dist/generated/device-local-state.d.ts.map +1 -1
- package/dist/generated/device-proxy.d.ts +124 -5
- package/dist/generated/device-proxy.d.ts.map +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts.map +1 -1
- package/dist/generated/provider-kind-map.d.ts +1 -1
- package/dist/generated/provider-kind-map.d.ts.map +1 -1
- package/dist/generated/system-proxy.d.ts +9 -7
- package/dist/generated/system-proxy.d.ts.map +1 -1
- package/dist/{index-DnpdVFKv.js → index-BSA_TBea.js} +4170 -728
- package/dist/index-BSA_TBea.js.map +1 -0
- package/dist/{index-C2zzIDdX.mjs → index-Bpj3ScIH.mjs} +4563 -1121
- package/dist/index-Bpj3ScIH.mjs.map +1 -0
- package/dist/index.d.ts +21 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1323 -116
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1637 -430
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/addon-data-plane.d.ts +76 -0
- package/dist/interfaces/addon-data-plane.d.ts.map +1 -0
- package/dist/interfaces/addon.d.ts +60 -0
- package/dist/interfaces/addon.d.ts.map +1 -1
- package/dist/interfaces/advanced-notifier.d.ts +4 -0
- package/dist/interfaces/advanced-notifier.d.ts.map +1 -1
- package/dist/interfaces/capability.d.ts +42 -1
- package/dist/interfaces/capability.d.ts.map +1 -1
- package/dist/interfaces/config-ui.d.ts +70 -6
- package/dist/interfaces/config-ui.d.ts.map +1 -1
- package/dist/interfaces/device-capabilities/camera.d.ts +2 -1
- package/dist/interfaces/device-capabilities/camera.d.ts.map +1 -1
- package/dist/interfaces/event-bus.d.ts +49 -3
- package/dist/interfaces/event-bus.d.ts.map +1 -1
- package/dist/interfaces/kernel-abstractions.d.ts +10 -1
- package/dist/interfaces/kernel-abstractions.d.ts.map +1 -1
- package/dist/interfaces/network-quality.d.ts +8 -0
- package/dist/interfaces/network-quality.d.ts.map +1 -1
- package/dist/interfaces/pipeline-executor-capability.d.ts +2 -2
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts +2 -1
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts.map +1 -1
- package/dist/interfaces/pipeline-runner-capability.d.ts +7 -0
- package/dist/interfaces/pipeline-runner-capability.d.ts.map +1 -1
- package/dist/interfaces/recording-config.d.ts +91 -0
- package/dist/interfaces/recording-config.d.ts.map +1 -0
- package/dist/interfaces/rtp-egress.d.ts +2 -3
- package/dist/interfaces/rtp-egress.d.ts.map +1 -1
- package/dist/interfaces/storage-location-declaration.d.ts +34 -0
- package/dist/interfaces/storage-location-declaration.d.ts.map +1 -0
- package/dist/interfaces/storage-location.d.ts +18 -74
- package/dist/interfaces/storage-location.d.ts.map +1 -1
- package/dist/interfaces/storage.d.ts +15 -4
- package/dist/interfaces/storage.d.ts.map +1 -1
- package/dist/interfaces/stream-broker.d.ts +18 -3
- package/dist/interfaces/stream-broker.d.ts.map +1 -1
- package/dist/interfaces/timezones.d.ts +59 -0
- package/dist/interfaces/timezones.d.ts.map +1 -0
- package/dist/node.d.ts +3 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +50 -8
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +51 -9
- package/dist/node.mjs.map +1 -1
- package/dist/storage/filesystem-storage-provider.d.ts +2 -1
- package/dist/storage/filesystem-storage-provider.d.ts.map +1 -1
- package/dist/stream-selection.d.ts +85 -0
- package/dist/stream-selection.d.ts.map +1 -0
- package/dist/types/detection.d.ts +3 -3
- package/dist/types/io.d.ts +1 -1
- package/dist/types/io.d.ts.map +1 -1
- package/dist/util/location-match.d.ts +15 -0
- package/dist/util/location-match.d.ts.map +1 -0
- package/dist/utils/canonical-hash.d.ts +20 -0
- package/dist/utils/canonical-hash.d.ts.map +1 -0
- package/dist/utils/export-reconciler.d.ts +101 -0
- package/dist/utils/export-reconciler.d.ts.map +1 -0
- package/dist/utils/sleep.d.ts +36 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/capabilities/recording-engine.cap.d.ts +0 -477
- package/dist/capabilities/recording-engine.cap.d.ts.map +0 -1
- package/dist/index-C2zzIDdX.mjs.map +0 -1
- 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
|
|
204
|
-
*
|
|
205
|
-
*
|
|
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
|
/**
|
package/dist/types/io.d.ts
CHANGED
|
@@ -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;
|
package/dist/types/io.d.ts.map
CHANGED
|
@@ -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,CA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F;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"}
|