@camstack/addon-provider-unifi 0.2.103 → 0.2.104

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
@@ -19438,13 +19438,26 @@ var TrackAudioLabelSchema = object({
19438
19438
  * - `audio` — an audio event on the camera itself that was anomalous for
19439
19439
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19440
19440
  *
19441
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19442
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19443
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19444
+ * detector.
19445
+ *
19446
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19447
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19448
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19449
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19450
+ * could not name.
19451
+ *
19441
19452
  * The spatial subsystems (tracker association, occupancy count, re-id /
19442
19453
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19443
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19444
- * check silently readmits every source added after it was written.
19454
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19455
+ * `!== 'sensor'` check silently readmits every source added after it was
19456
+ * written.
19445
19457
  */
19446
19458
  var TrackSourceSchema = _enum([
19447
19459
  "pipeline",
19460
+ "onboard",
19448
19461
  "sensor",
19449
19462
  "audio"
19450
19463
  ]);
@@ -21526,13 +21539,39 @@ var MotionSourceEnum = _enum([
21526
21539
  */
21527
21540
  var MotionSourcesSchema = array(MotionSourceEnum);
21528
21541
  /**
21529
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21530
- * post-analysis already tags every detection with (`DetectionSource`) rather
21531
- * than a second spelling of the same two ideas — the value an operator picks
21532
- * here is the value that comes back on the track, the overlay and the debug
21533
- * row.
21542
+ * Which root detector a camera runs — EXACTLY ONE.
21543
+ *
21544
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21545
+ * with (`DetectionSource`) rather than a second spelling of the same two
21546
+ * ideas: the value an operator picks here is the value that comes back on the
21547
+ * track, the overlay and the debug row.
21548
+ *
21549
+ * ## Why one, and why it is still an array
21550
+ *
21551
+ * Two roots on one camera is a capability nobody asked for and the operator has
21552
+ * since ruled out. It was never free: both planes feed the SAME per-device
21553
+ * stationary registry, both can promote the same parked object, and the two
21554
+ * detectors disagree about the same box by construction — which is the
21555
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21556
+ *
21557
+ * The ARRAY shape survives because the stored settings and the attach payload
21558
+ * already speak it on every camera of every fleet, and a cap input that
21559
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21560
+ * in the one direction that costs an operator their cameras. So the wire stays
21561
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21562
+ * element rather than refused, and `max(1)` is what every consumer can then
21563
+ * rely on.
21564
+ *
21565
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21566
+ * a camera an operator left with no root detector — and `planDetectionSources`
21567
+ * has always said so: inventing a root for them is how a default acts without
21568
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21569
+ * suite caught it.
21570
+ *
21571
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21572
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21534
21573
  */
21535
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21574
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21536
21575
  /**
21537
21576
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21538
21577
  * so cap-side consumers (the orchestrator forward, the runner addon's
package/dist/addon.mjs CHANGED
@@ -19437,13 +19437,26 @@ var TrackAudioLabelSchema = object({
19437
19437
  * - `audio` — an audio event on the camera itself that was anomalous for
19438
19438
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19439
19439
  *
19440
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19441
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19442
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19443
+ * detector.
19444
+ *
19445
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19446
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19447
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19448
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19449
+ * could not name.
19450
+ *
19440
19451
  * The spatial subsystems (tracker association, occupancy count, re-id /
19441
19452
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19442
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19443
- * check silently readmits every source added after it was written.
19453
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19454
+ * `!== 'sensor'` check silently readmits every source added after it was
19455
+ * written.
19444
19456
  */
19445
19457
  var TrackSourceSchema = _enum([
19446
19458
  "pipeline",
19459
+ "onboard",
19447
19460
  "sensor",
19448
19461
  "audio"
19449
19462
  ]);
@@ -21525,13 +21538,39 @@ var MotionSourceEnum = _enum([
21525
21538
  */
21526
21539
  var MotionSourcesSchema = array(MotionSourceEnum);
21527
21540
  /**
21528
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21529
- * post-analysis already tags every detection with (`DetectionSource`) rather
21530
- * than a second spelling of the same two ideas — the value an operator picks
21531
- * here is the value that comes back on the track, the overlay and the debug
21532
- * row.
21541
+ * Which root detector a camera runs — EXACTLY ONE.
21542
+ *
21543
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21544
+ * with (`DetectionSource`) rather than a second spelling of the same two
21545
+ * ideas: the value an operator picks here is the value that comes back on the
21546
+ * track, the overlay and the debug row.
21547
+ *
21548
+ * ## Why one, and why it is still an array
21549
+ *
21550
+ * Two roots on one camera is a capability nobody asked for and the operator has
21551
+ * since ruled out. It was never free: both planes feed the SAME per-device
21552
+ * stationary registry, both can promote the same parked object, and the two
21553
+ * detectors disagree about the same box by construction — which is the
21554
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21555
+ *
21556
+ * The ARRAY shape survives because the stored settings and the attach payload
21557
+ * already speak it on every camera of every fleet, and a cap input that
21558
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21559
+ * in the one direction that costs an operator their cameras. So the wire stays
21560
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21561
+ * element rather than refused, and `max(1)` is what every consumer can then
21562
+ * rely on.
21563
+ *
21564
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21565
+ * a camera an operator left with no root detector — and `planDetectionSources`
21566
+ * has always said so: inventing a root for them is how a default acts without
21567
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21568
+ * suite caught it.
21569
+ *
21570
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21571
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21533
21572
  */
21534
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21573
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21535
21574
  /**
21536
21575
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21537
21576
  * so cap-side consumers (the orchestrator forward, the runner addon's
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.103",
3
+ "version": "0.2.104",
4
4
  "description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
5
5
  "keywords": [
6
6
  "camstack",