@camstack/addon-provider-unifi 0.2.103 → 0.2.105

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
  ]);
@@ -20032,6 +20045,7 @@ var MediaFileKindEnum = _enum([
20032
20045
  "keyFrame",
20033
20046
  "keyFrameSmall",
20034
20047
  "thumbnailSmall",
20048
+ "confirmationCrop",
20035
20049
  "sceneFrame"
20036
20050
  ]);
20037
20051
  /**
@@ -21526,13 +21540,39 @@ var MotionSourceEnum = _enum([
21526
21540
  */
21527
21541
  var MotionSourcesSchema = array(MotionSourceEnum);
21528
21542
  /**
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.
21543
+ * Which root detector a camera runs — EXACTLY ONE.
21544
+ *
21545
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21546
+ * with (`DetectionSource`) rather than a second spelling of the same two
21547
+ * ideas: the value an operator picks here is the value that comes back on the
21548
+ * track, the overlay and the debug row.
21549
+ *
21550
+ * ## Why one, and why it is still an array
21551
+ *
21552
+ * Two roots on one camera is a capability nobody asked for and the operator has
21553
+ * since ruled out. It was never free: both planes feed the SAME per-device
21554
+ * stationary registry, both can promote the same parked object, and the two
21555
+ * detectors disagree about the same box by construction — which is the
21556
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21557
+ *
21558
+ * The ARRAY shape survives because the stored settings and the attach payload
21559
+ * already speak it on every camera of every fleet, and a cap input that
21560
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21561
+ * in the one direction that costs an operator their cameras. So the wire stays
21562
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21563
+ * element rather than refused, and `max(1)` is what every consumer can then
21564
+ * rely on.
21565
+ *
21566
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21567
+ * a camera an operator left with no root detector — and `planDetectionSources`
21568
+ * has always said so: inventing a root for them is how a default acts without
21569
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21570
+ * suite caught it.
21571
+ *
21572
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21573
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21534
21574
  */
21535
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21575
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21536
21576
  /**
21537
21577
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21538
21578
  * 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
  ]);
@@ -20031,6 +20044,7 @@ var MediaFileKindEnum = _enum([
20031
20044
  "keyFrame",
20032
20045
  "keyFrameSmall",
20033
20046
  "thumbnailSmall",
20047
+ "confirmationCrop",
20034
20048
  "sceneFrame"
20035
20049
  ]);
20036
20050
  /**
@@ -21525,13 +21539,39 @@ var MotionSourceEnum = _enum([
21525
21539
  */
21526
21540
  var MotionSourcesSchema = array(MotionSourceEnum);
21527
21541
  /**
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.
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.
21533
21573
  */
21534
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21574
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21535
21575
  /**
21536
21576
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21537
21577
  * 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.105",
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",