@camstack/addon-provider-hikvision 1.2.111 → 1.2.112

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
@@ -19745,13 +19745,26 @@ var TrackAudioLabelSchema = object({
19745
19745
  * - `audio` — an audio event on the camera itself that was anomalous for
19746
19746
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19747
19747
  *
19748
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19749
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19750
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19751
+ * detector.
19752
+ *
19753
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19754
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19755
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19756
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19757
+ * could not name.
19758
+ *
19748
19759
  * The spatial subsystems (tracker association, occupancy count, re-id /
19749
19760
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19750
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19751
- * check silently readmits every source added after it was written.
19761
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19762
+ * `!== 'sensor'` check silently readmits every source added after it was
19763
+ * written.
19752
19764
  */
19753
19765
  var TrackSourceSchema = _enum([
19754
19766
  "pipeline",
19767
+ "onboard",
19755
19768
  "sensor",
19756
19769
  "audio"
19757
19770
  ]);
@@ -21833,13 +21846,39 @@ var MotionSourceEnum = _enum([
21833
21846
  */
21834
21847
  var MotionSourcesSchema = array(MotionSourceEnum);
21835
21848
  /**
21836
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21837
- * post-analysis already tags every detection with (`DetectionSource`) rather
21838
- * than a second spelling of the same two ideas — the value an operator picks
21839
- * here is the value that comes back on the track, the overlay and the debug
21840
- * row.
21849
+ * Which root detector a camera runs — EXACTLY ONE.
21850
+ *
21851
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21852
+ * with (`DetectionSource`) rather than a second spelling of the same two
21853
+ * ideas: the value an operator picks here is the value that comes back on the
21854
+ * track, the overlay and the debug row.
21855
+ *
21856
+ * ## Why one, and why it is still an array
21857
+ *
21858
+ * Two roots on one camera is a capability nobody asked for and the operator has
21859
+ * since ruled out. It was never free: both planes feed the SAME per-device
21860
+ * stationary registry, both can promote the same parked object, and the two
21861
+ * detectors disagree about the same box by construction — which is the
21862
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21863
+ *
21864
+ * The ARRAY shape survives because the stored settings and the attach payload
21865
+ * already speak it on every camera of every fleet, and a cap input that
21866
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21867
+ * in the one direction that costs an operator their cameras. So the wire stays
21868
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21869
+ * element rather than refused, and `max(1)` is what every consumer can then
21870
+ * rely on.
21871
+ *
21872
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21873
+ * a camera an operator left with no root detector — and `planDetectionSources`
21874
+ * has always said so: inventing a root for them is how a default acts without
21875
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21876
+ * suite caught it.
21877
+ *
21878
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21879
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21841
21880
  */
21842
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21881
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21843
21882
  /**
21844
21883
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21845
21884
  * so cap-side consumers (the orchestrator forward, the runner addon's
package/dist/addon.mjs CHANGED
@@ -19746,13 +19746,26 @@ var TrackAudioLabelSchema = object({
19746
19746
  * - `audio` — an audio event on the camera itself that was anomalous for
19747
19747
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19748
19748
  *
19749
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19750
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19751
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19752
+ * detector.
19753
+ *
19754
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19755
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19756
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19757
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19758
+ * could not name.
19759
+ *
19749
19760
  * The spatial subsystems (tracker association, occupancy count, re-id /
19750
19761
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19751
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19752
- * check silently readmits every source added after it was written.
19762
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19763
+ * `!== 'sensor'` check silently readmits every source added after it was
19764
+ * written.
19753
19765
  */
19754
19766
  var TrackSourceSchema = _enum([
19755
19767
  "pipeline",
19768
+ "onboard",
19756
19769
  "sensor",
19757
19770
  "audio"
19758
19771
  ]);
@@ -21834,13 +21847,39 @@ var MotionSourceEnum = _enum([
21834
21847
  */
21835
21848
  var MotionSourcesSchema = array(MotionSourceEnum);
21836
21849
  /**
21837
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21838
- * post-analysis already tags every detection with (`DetectionSource`) rather
21839
- * than a second spelling of the same two ideas — the value an operator picks
21840
- * here is the value that comes back on the track, the overlay and the debug
21841
- * row.
21850
+ * Which root detector a camera runs — EXACTLY ONE.
21851
+ *
21852
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21853
+ * with (`DetectionSource`) rather than a second spelling of the same two
21854
+ * ideas: the value an operator picks here is the value that comes back on the
21855
+ * track, the overlay and the debug row.
21856
+ *
21857
+ * ## Why one, and why it is still an array
21858
+ *
21859
+ * Two roots on one camera is a capability nobody asked for and the operator has
21860
+ * since ruled out. It was never free: both planes feed the SAME per-device
21861
+ * stationary registry, both can promote the same parked object, and the two
21862
+ * detectors disagree about the same box by construction — which is the
21863
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21864
+ *
21865
+ * The ARRAY shape survives because the stored settings and the attach payload
21866
+ * already speak it on every camera of every fleet, and a cap input that
21867
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21868
+ * in the one direction that costs an operator their cameras. So the wire stays
21869
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21870
+ * element rather than refused, and `max(1)` is what every consumer can then
21871
+ * rely on.
21872
+ *
21873
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21874
+ * a camera an operator left with no root detector — and `planDetectionSources`
21875
+ * has always said so: inventing a root for them is how a default acts without
21876
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21877
+ * suite caught it.
21878
+ *
21879
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21880
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21842
21881
  */
21843
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21882
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21844
21883
  /**
21845
21884
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21846
21885
  * 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-hikvision",
3
- "version": "1.2.111",
3
+ "version": "1.2.112",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",