@camstack/addon-provider-homeassistant 1.2.126 → 1.2.127

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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("./dist-CtfLmU_u.js");
2
+ const require_dist = require("./dist-yx8Zuhab.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_zlib = require("node:zlib");
5
5
  //#region src/ha-device-source.ts
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-DSmGE3CV.mjs";
1
+ import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-BDT9dZuy.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
4
4
  //#region src/ha-device-source.ts
@@ -19824,13 +19824,26 @@ var TrackAudioLabelSchema = object({
19824
19824
  * - `audio` — an audio event on the camera itself that was anomalous for
19825
19825
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19826
19826
  *
19827
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19828
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19829
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19830
+ * detector.
19831
+ *
19832
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19833
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19834
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19835
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19836
+ * could not name.
19837
+ *
19827
19838
  * The spatial subsystems (tracker association, occupancy count, re-id /
19828
19839
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19829
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19830
- * check silently readmits every source added after it was written.
19840
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19841
+ * `!== 'sensor'` check silently readmits every source added after it was
19842
+ * written.
19831
19843
  */
19832
19844
  var TrackSourceSchema = _enum([
19833
19845
  "pipeline",
19846
+ "onboard",
19834
19847
  "sensor",
19835
19848
  "audio"
19836
19849
  ]);
@@ -21912,13 +21925,39 @@ var MotionSourceEnum = _enum([
21912
21925
  */
21913
21926
  var MotionSourcesSchema = array(MotionSourceEnum);
21914
21927
  /**
21915
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21916
- * post-analysis already tags every detection with (`DetectionSource`) rather
21917
- * than a second spelling of the same two ideas — the value an operator picks
21918
- * here is the value that comes back on the track, the overlay and the debug
21919
- * row.
21928
+ * Which root detector a camera runs — EXACTLY ONE.
21929
+ *
21930
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21931
+ * with (`DetectionSource`) rather than a second spelling of the same two
21932
+ * ideas: the value an operator picks here is the value that comes back on the
21933
+ * track, the overlay and the debug row.
21934
+ *
21935
+ * ## Why one, and why it is still an array
21936
+ *
21937
+ * Two roots on one camera is a capability nobody asked for and the operator has
21938
+ * since ruled out. It was never free: both planes feed the SAME per-device
21939
+ * stationary registry, both can promote the same parked object, and the two
21940
+ * detectors disagree about the same box by construction — which is the
21941
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21942
+ *
21943
+ * The ARRAY shape survives because the stored settings and the attach payload
21944
+ * already speak it on every camera of every fleet, and a cap input that
21945
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21946
+ * in the one direction that costs an operator their cameras. So the wire stays
21947
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21948
+ * element rather than refused, and `max(1)` is what every consumer can then
21949
+ * rely on.
21950
+ *
21951
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21952
+ * a camera an operator left with no root detector — and `planDetectionSources`
21953
+ * has always said so: inventing a root for them is how a default acts without
21954
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21955
+ * suite caught it.
21956
+ *
21957
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21958
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21920
21959
  */
21921
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21960
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21922
21961
  /**
21923
21962
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21924
21963
  * so cap-side consumers (the orchestrator forward, the runner addon's
@@ -19824,13 +19824,26 @@ var TrackAudioLabelSchema = object({
19824
19824
  * - `audio` — an audio event on the camera itself that was anomalous for
19825
19825
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19826
19826
  *
19827
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19828
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19829
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19830
+ * detector.
19831
+ *
19832
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19833
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19834
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19835
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19836
+ * could not name.
19837
+ *
19827
19838
  * The spatial subsystems (tracker association, occupancy count, re-id /
19828
19839
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19829
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19830
- * check silently readmits every source added after it was written.
19840
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19841
+ * `!== 'sensor'` check silently readmits every source added after it was
19842
+ * written.
19831
19843
  */
19832
19844
  var TrackSourceSchema = _enum([
19833
19845
  "pipeline",
19846
+ "onboard",
19834
19847
  "sensor",
19835
19848
  "audio"
19836
19849
  ]);
@@ -21912,13 +21925,39 @@ var MotionSourceEnum = _enum([
21912
21925
  */
21913
21926
  var MotionSourcesSchema = array(MotionSourceEnum);
21914
21927
  /**
21915
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21916
- * post-analysis already tags every detection with (`DetectionSource`) rather
21917
- * than a second spelling of the same two ideas — the value an operator picks
21918
- * here is the value that comes back on the track, the overlay and the debug
21919
- * row.
21928
+ * Which root detector a camera runs — EXACTLY ONE.
21929
+ *
21930
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21931
+ * with (`DetectionSource`) rather than a second spelling of the same two
21932
+ * ideas: the value an operator picks here is the value that comes back on the
21933
+ * track, the overlay and the debug row.
21934
+ *
21935
+ * ## Why one, and why it is still an array
21936
+ *
21937
+ * Two roots on one camera is a capability nobody asked for and the operator has
21938
+ * since ruled out. It was never free: both planes feed the SAME per-device
21939
+ * stationary registry, both can promote the same parked object, and the two
21940
+ * detectors disagree about the same box by construction — which is the
21941
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21942
+ *
21943
+ * The ARRAY shape survives because the stored settings and the attach payload
21944
+ * already speak it on every camera of every fleet, and a cap input that
21945
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21946
+ * in the one direction that costs an operator their cameras. So the wire stays
21947
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21948
+ * element rather than refused, and `max(1)` is what every consumer can then
21949
+ * rely on.
21950
+ *
21951
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21952
+ * a camera an operator left with no root detector — and `planDetectionSources`
21953
+ * has always said so: inventing a root for them is how a default acts without
21954
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21955
+ * suite caught it.
21956
+ *
21957
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21958
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21920
21959
  */
21921
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21960
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21922
21961
  /**
21923
21962
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21924
21963
  * so cap-side consumers (the orchestrator forward, the runner addon's
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-CtfLmU_u.js");
6
+ const require_dist = require("../dist-yx8Zuhab.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/ha-export/topics.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-DSmGE3CV.mjs";
1
+ import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-BDT9dZuy.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  //#region src/ha-export/topics.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.126",
3
+ "version": "1.2.127",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",