@camstack/addon-mqtt-broker 1.2.103 → 1.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.
@@ -19138,13 +19138,26 @@ var TrackAudioLabelSchema = object({
19138
19138
  * - `audio` — an audio event on the camera itself that was anomalous for
19139
19139
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19140
19140
  *
19141
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19142
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19143
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19144
+ * detector.
19145
+ *
19146
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19147
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19148
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19149
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19150
+ * could not name.
19151
+ *
19141
19152
  * The spatial subsystems (tracker association, occupancy count, re-id /
19142
19153
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19143
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19144
- * check silently readmits every source added after it was written.
19154
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19155
+ * `!== 'sensor'` check silently readmits every source added after it was
19156
+ * written.
19145
19157
  */
19146
19158
  var TrackSourceSchema = _enum([
19147
19159
  "pipeline",
19160
+ "onboard",
19148
19161
  "sensor",
19149
19162
  "audio"
19150
19163
  ]);
@@ -21226,13 +21239,39 @@ var MotionSourceEnum = _enum([
21226
21239
  */
21227
21240
  var MotionSourcesSchema = array(MotionSourceEnum);
21228
21241
  /**
21229
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21230
- * post-analysis already tags every detection with (`DetectionSource`) rather
21231
- * than a second spelling of the same two ideas — the value an operator picks
21232
- * here is the value that comes back on the track, the overlay and the debug
21233
- * row.
21242
+ * Which root detector a camera runs — EXACTLY ONE.
21243
+ *
21244
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21245
+ * with (`DetectionSource`) rather than a second spelling of the same two
21246
+ * ideas: the value an operator picks here is the value that comes back on the
21247
+ * track, the overlay and the debug row.
21248
+ *
21249
+ * ## Why one, and why it is still an array
21250
+ *
21251
+ * Two roots on one camera is a capability nobody asked for and the operator has
21252
+ * since ruled out. It was never free: both planes feed the SAME per-device
21253
+ * stationary registry, both can promote the same parked object, and the two
21254
+ * detectors disagree about the same box by construction — which is the
21255
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21256
+ *
21257
+ * The ARRAY shape survives because the stored settings and the attach payload
21258
+ * already speak it on every camera of every fleet, and a cap input that
21259
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21260
+ * in the one direction that costs an operator their cameras. So the wire stays
21261
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21262
+ * element rather than refused, and `max(1)` is what every consumer can then
21263
+ * rely on.
21264
+ *
21265
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21266
+ * a camera an operator left with no root detector — and `planDetectionSources`
21267
+ * has always said so: inventing a root for them is how a default acts without
21268
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21269
+ * suite caught it.
21270
+ *
21271
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21272
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21234
21273
  */
21235
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21274
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21236
21275
  /**
21237
21276
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21238
21277
  * so cap-side consumers (the orchestrator forward, the runner addon's
@@ -19133,13 +19133,26 @@ var TrackAudioLabelSchema = object({
19133
19133
  * - `audio` — an audio event on the camera itself that was anomalous for
19134
19134
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19135
19135
  *
19136
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19137
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19138
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19139
+ * detector.
19140
+ *
19141
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19142
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19143
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19144
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19145
+ * could not name.
19146
+ *
19136
19147
  * The spatial subsystems (tracker association, occupancy count, re-id /
19137
19148
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19138
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19139
- * check silently readmits every source added after it was written.
19149
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19150
+ * `!== 'sensor'` check silently readmits every source added after it was
19151
+ * written.
19140
19152
  */
19141
19153
  var TrackSourceSchema = _enum([
19142
19154
  "pipeline",
19155
+ "onboard",
19143
19156
  "sensor",
19144
19157
  "audio"
19145
19158
  ]);
@@ -21221,13 +21234,39 @@ var MotionSourceEnum = _enum([
21221
21234
  */
21222
21235
  var MotionSourcesSchema = array(MotionSourceEnum);
21223
21236
  /**
21224
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21225
- * post-analysis already tags every detection with (`DetectionSource`) rather
21226
- * than a second spelling of the same two ideas — the value an operator picks
21227
- * here is the value that comes back on the track, the overlay and the debug
21228
- * row.
21237
+ * Which root detector a camera runs — EXACTLY ONE.
21238
+ *
21239
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21240
+ * with (`DetectionSource`) rather than a second spelling of the same two
21241
+ * ideas: the value an operator picks here is the value that comes back on the
21242
+ * track, the overlay and the debug row.
21243
+ *
21244
+ * ## Why one, and why it is still an array
21245
+ *
21246
+ * Two roots on one camera is a capability nobody asked for and the operator has
21247
+ * since ruled out. It was never free: both planes feed the SAME per-device
21248
+ * stationary registry, both can promote the same parked object, and the two
21249
+ * detectors disagree about the same box by construction — which is the
21250
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21251
+ *
21252
+ * The ARRAY shape survives because the stored settings and the attach payload
21253
+ * already speak it on every camera of every fleet, and a cap input that
21254
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21255
+ * in the one direction that costs an operator their cameras. So the wire stays
21256
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21257
+ * element rather than refused, and `max(1)` is what every consumer can then
21258
+ * rely on.
21259
+ *
21260
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21261
+ * a camera an operator left with no root detector — and `planDetectionSources`
21262
+ * has always said so: inventing a root for them is how a default acts without
21263
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21264
+ * suite caught it.
21265
+ *
21266
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21267
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21229
21268
  */
21230
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21269
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21231
21270
  /**
21232
21271
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21233
21272
  * 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-mqtt-broker",
3
- "version": "1.2.103",
3
+ "version": "1.2.104",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",