@camstack/addon-matter-broker 0.2.102 → 0.2.103

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
@@ -19518,13 +19518,26 @@ var TrackAudioLabelSchema = object({
19518
19518
  * - `audio` — an audio event on the camera itself that was anomalous for
19519
19519
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19520
19520
  *
19521
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19522
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19523
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19524
+ * detector.
19525
+ *
19526
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19527
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19528
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19529
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19530
+ * could not name.
19531
+ *
19521
19532
  * The spatial subsystems (tracker association, occupancy count, re-id /
19522
19533
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19523
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19524
- * check silently readmits every source added after it was written.
19534
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19535
+ * `!== 'sensor'` check silently readmits every source added after it was
19536
+ * written.
19525
19537
  */
19526
19538
  var TrackSourceSchema = _enum([
19527
19539
  "pipeline",
19540
+ "onboard",
19528
19541
  "sensor",
19529
19542
  "audio"
19530
19543
  ]);
@@ -21606,13 +21619,39 @@ var MotionSourceEnum = _enum([
21606
21619
  */
21607
21620
  var MotionSourcesSchema = array(MotionSourceEnum);
21608
21621
  /**
21609
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21610
- * post-analysis already tags every detection with (`DetectionSource`) rather
21611
- * than a second spelling of the same two ideas — the value an operator picks
21612
- * here is the value that comes back on the track, the overlay and the debug
21613
- * row.
21622
+ * Which root detector a camera runs — EXACTLY ONE.
21623
+ *
21624
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21625
+ * with (`DetectionSource`) rather than a second spelling of the same two
21626
+ * ideas: the value an operator picks here is the value that comes back on the
21627
+ * track, the overlay and the debug row.
21628
+ *
21629
+ * ## Why one, and why it is still an array
21630
+ *
21631
+ * Two roots on one camera is a capability nobody asked for and the operator has
21632
+ * since ruled out. It was never free: both planes feed the SAME per-device
21633
+ * stationary registry, both can promote the same parked object, and the two
21634
+ * detectors disagree about the same box by construction — which is the
21635
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21636
+ *
21637
+ * The ARRAY shape survives because the stored settings and the attach payload
21638
+ * already speak it on every camera of every fleet, and a cap input that
21639
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21640
+ * in the one direction that costs an operator their cameras. So the wire stays
21641
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21642
+ * element rather than refused, and `max(1)` is what every consumer can then
21643
+ * rely on.
21644
+ *
21645
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21646
+ * a camera an operator left with no root detector — and `planDetectionSources`
21647
+ * has always said so: inventing a root for them is how a default acts without
21648
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21649
+ * suite caught it.
21650
+ *
21651
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21652
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21614
21653
  */
21615
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21654
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21616
21655
  /**
21617
21656
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21618
21657
  * so cap-side consumers (the orchestrator forward, the runner addon's
package/dist/addon.mjs CHANGED
@@ -19516,13 +19516,26 @@ var TrackAudioLabelSchema = object({
19516
19516
  * - `audio` — an audio event on the camera itself that was anomalous for
19517
19517
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19518
19518
  *
19519
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19520
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19521
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19522
+ * detector.
19523
+ *
19524
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19525
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19526
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19527
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19528
+ * could not name.
19529
+ *
19519
19530
  * The spatial subsystems (tracker association, occupancy count, re-id /
19520
19531
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19521
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19522
- * check silently readmits every source added after it was written.
19532
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19533
+ * `!== 'sensor'` check silently readmits every source added after it was
19534
+ * written.
19523
19535
  */
19524
19536
  var TrackSourceSchema = _enum([
19525
19537
  "pipeline",
19538
+ "onboard",
19526
19539
  "sensor",
19527
19540
  "audio"
19528
19541
  ]);
@@ -21604,13 +21617,39 @@ var MotionSourceEnum = _enum([
21604
21617
  */
21605
21618
  var MotionSourcesSchema = array(MotionSourceEnum);
21606
21619
  /**
21607
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21608
- * post-analysis already tags every detection with (`DetectionSource`) rather
21609
- * than a second spelling of the same two ideas — the value an operator picks
21610
- * here is the value that comes back on the track, the overlay and the debug
21611
- * row.
21620
+ * Which root detector a camera runs — EXACTLY ONE.
21621
+ *
21622
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21623
+ * with (`DetectionSource`) rather than a second spelling of the same two
21624
+ * ideas: the value an operator picks here is the value that comes back on the
21625
+ * track, the overlay and the debug row.
21626
+ *
21627
+ * ## Why one, and why it is still an array
21628
+ *
21629
+ * Two roots on one camera is a capability nobody asked for and the operator has
21630
+ * since ruled out. It was never free: both planes feed the SAME per-device
21631
+ * stationary registry, both can promote the same parked object, and the two
21632
+ * detectors disagree about the same box by construction — which is the
21633
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21634
+ *
21635
+ * The ARRAY shape survives because the stored settings and the attach payload
21636
+ * already speak it on every camera of every fleet, and a cap input that
21637
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21638
+ * in the one direction that costs an operator their cameras. So the wire stays
21639
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21640
+ * element rather than refused, and `max(1)` is what every consumer can then
21641
+ * rely on.
21642
+ *
21643
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21644
+ * a camera an operator left with no root detector — and `planDetectionSources`
21645
+ * has always said so: inventing a root for them is how a default acts without
21646
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21647
+ * suite caught it.
21648
+ *
21649
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21650
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21612
21651
  */
21613
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21652
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21614
21653
  /**
21615
21654
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21616
21655
  * 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-matter-broker",
3
- "version": "0.2.102",
3
+ "version": "0.2.103",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",