@camstack/addon-provider-petkit 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
@@ -20557,13 +20557,26 @@ var TrackAudioLabelSchema = object({
20557
20557
  * - `audio` — an audio event on the camera itself that was anomalous for
20558
20558
  * THAT camera, loud, and heard while nothing visual was happening (D62).
20559
20559
  *
20560
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
20561
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
20562
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
20563
+ * detector.
20564
+ *
20565
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
20566
+ * a persisted onboard track failed `safeParse` on read and came back with NO
20567
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
20568
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
20569
+ * could not name.
20570
+ *
20560
20571
  * The spatial subsystems (tracker association, occupancy count, re-id /
20561
20572
  * embedding, resurrection) MUST skip every synthetic source. Test for that
20562
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
20563
- * check silently readmits every source added after it was written.
20573
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
20574
+ * `!== 'sensor'` check silently readmits every source added after it was
20575
+ * written.
20564
20576
  */
20565
20577
  var TrackSourceSchema = _enum([
20566
20578
  "pipeline",
20579
+ "onboard",
20567
20580
  "sensor",
20568
20581
  "audio"
20569
20582
  ]);
@@ -22645,13 +22658,39 @@ var MotionSourceEnum = _enum([
22645
22658
  */
22646
22659
  var MotionSourcesSchema = array(MotionSourceEnum);
22647
22660
  /**
22648
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
22649
- * post-analysis already tags every detection with (`DetectionSource`) rather
22650
- * than a second spelling of the same two ideas — the value an operator picks
22651
- * here is the value that comes back on the track, the overlay and the debug
22652
- * row.
22661
+ * Which root detector a camera runs — EXACTLY ONE.
22662
+ *
22663
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
22664
+ * with (`DetectionSource`) rather than a second spelling of the same two
22665
+ * ideas: the value an operator picks here is the value that comes back on the
22666
+ * track, the overlay and the debug row.
22667
+ *
22668
+ * ## Why one, and why it is still an array
22669
+ *
22670
+ * Two roots on one camera is a capability nobody asked for and the operator has
22671
+ * since ruled out. It was never free: both planes feed the SAME per-device
22672
+ * stationary registry, both can promote the same parked object, and the two
22673
+ * detectors disagree about the same box by construction — which is the
22674
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
22675
+ *
22676
+ * The ARRAY shape survives because the stored settings and the attach payload
22677
+ * already speak it on every camera of every fleet, and a cap input that
22678
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
22679
+ * in the one direction that costs an operator their cameras. So the wire stays
22680
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
22681
+ * element rather than refused, and `max(1)` is what every consumer can then
22682
+ * rely on.
22683
+ *
22684
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
22685
+ * a camera an operator left with no root detector — and `planDetectionSources`
22686
+ * has always said so: inventing a root for them is how a default acts without
22687
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
22688
+ * suite caught it.
22689
+ *
22690
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
22691
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
22653
22692
  */
22654
- var DetectionSourcesSchema = array(DetectionSourceSchema);
22693
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
22655
22694
  /**
22656
22695
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
22657
22696
  * so cap-side consumers (the orchestrator forward, the runner addon's
package/dist/addon.mjs CHANGED
@@ -20556,13 +20556,26 @@ var TrackAudioLabelSchema = object({
20556
20556
  * - `audio` — an audio event on the camera itself that was anomalous for
20557
20557
  * THAT camera, loud, and heard while nothing visual was happening (D62).
20558
20558
  *
20559
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
20560
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
20561
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
20562
+ * detector.
20563
+ *
20564
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
20565
+ * a persisted onboard track failed `safeParse` on read and came back with NO
20566
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
20567
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
20568
+ * could not name.
20569
+ *
20559
20570
  * The spatial subsystems (tracker association, occupancy count, re-id /
20560
20571
  * embedding, resurrection) MUST skip every synthetic source. Test for that
20561
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
20562
- * check silently readmits every source added after it was written.
20572
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
20573
+ * `!== 'sensor'` check silently readmits every source added after it was
20574
+ * written.
20563
20575
  */
20564
20576
  var TrackSourceSchema = _enum([
20565
20577
  "pipeline",
20578
+ "onboard",
20566
20579
  "sensor",
20567
20580
  "audio"
20568
20581
  ]);
@@ -22644,13 +22657,39 @@ var MotionSourceEnum = _enum([
22644
22657
  */
22645
22658
  var MotionSourcesSchema = array(MotionSourceEnum);
22646
22659
  /**
22647
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
22648
- * post-analysis already tags every detection with (`DetectionSource`) rather
22649
- * than a second spelling of the same two ideas — the value an operator picks
22650
- * here is the value that comes back on the track, the overlay and the debug
22651
- * row.
22660
+ * Which root detector a camera runs — EXACTLY ONE.
22661
+ *
22662
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
22663
+ * with (`DetectionSource`) rather than a second spelling of the same two
22664
+ * ideas: the value an operator picks here is the value that comes back on the
22665
+ * track, the overlay and the debug row.
22666
+ *
22667
+ * ## Why one, and why it is still an array
22668
+ *
22669
+ * Two roots on one camera is a capability nobody asked for and the operator has
22670
+ * since ruled out. It was never free: both planes feed the SAME per-device
22671
+ * stationary registry, both can promote the same parked object, and the two
22672
+ * detectors disagree about the same box by construction — which is the
22673
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
22674
+ *
22675
+ * The ARRAY shape survives because the stored settings and the attach payload
22676
+ * already speak it on every camera of every fleet, and a cap input that
22677
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
22678
+ * in the one direction that costs an operator their cameras. So the wire stays
22679
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
22680
+ * element rather than refused, and `max(1)` is what every consumer can then
22681
+ * rely on.
22682
+ *
22683
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
22684
+ * a camera an operator left with no root detector — and `planDetectionSources`
22685
+ * has always said so: inventing a root for them is how a default acts without
22686
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
22687
+ * suite caught it.
22688
+ *
22689
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
22690
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
22652
22691
  */
22653
- var DetectionSourcesSchema = array(DetectionSourceSchema);
22692
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
22654
22693
  /**
22655
22694
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
22656
22695
  * 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-petkit",
3
- "version": "0.2.103",
3
+ "version": "0.2.104",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",