@camstack/addon-provider-amcrest 0.2.105 → 0.2.107

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
@@ -19433,13 +19433,26 @@ var TrackAudioLabelSchema = object({
19433
19433
  * - `audio` — an audio event on the camera itself that was anomalous for
19434
19434
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19435
19435
  *
19436
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19437
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19438
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19439
+ * detector.
19440
+ *
19441
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19442
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19443
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19444
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19445
+ * could not name.
19446
+ *
19436
19447
  * The spatial subsystems (tracker association, occupancy count, re-id /
19437
19448
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19438
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19439
- * check silently readmits every source added after it was written.
19449
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19450
+ * `!== 'sensor'` check silently readmits every source added after it was
19451
+ * written.
19440
19452
  */
19441
19453
  var TrackSourceSchema = _enum([
19442
19454
  "pipeline",
19455
+ "onboard",
19443
19456
  "sensor",
19444
19457
  "audio"
19445
19458
  ]);
@@ -20027,6 +20040,7 @@ var MediaFileKindEnum = _enum([
20027
20040
  "keyFrame",
20028
20041
  "keyFrameSmall",
20029
20042
  "thumbnailSmall",
20043
+ "confirmationCrop",
20030
20044
  "sceneFrame"
20031
20045
  ]);
20032
20046
  /**
@@ -21521,13 +21535,39 @@ var MotionSourceEnum = _enum([
21521
21535
  */
21522
21536
  var MotionSourcesSchema = array(MotionSourceEnum);
21523
21537
  /**
21524
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21525
- * post-analysis already tags every detection with (`DetectionSource`) rather
21526
- * than a second spelling of the same two ideas — the value an operator picks
21527
- * here is the value that comes back on the track, the overlay and the debug
21528
- * row.
21538
+ * Which root detector a camera runs — EXACTLY ONE.
21539
+ *
21540
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21541
+ * with (`DetectionSource`) rather than a second spelling of the same two
21542
+ * ideas: the value an operator picks here is the value that comes back on the
21543
+ * track, the overlay and the debug row.
21544
+ *
21545
+ * ## Why one, and why it is still an array
21546
+ *
21547
+ * Two roots on one camera is a capability nobody asked for and the operator has
21548
+ * since ruled out. It was never free: both planes feed the SAME per-device
21549
+ * stationary registry, both can promote the same parked object, and the two
21550
+ * detectors disagree about the same box by construction — which is the
21551
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21552
+ *
21553
+ * The ARRAY shape survives because the stored settings and the attach payload
21554
+ * already speak it on every camera of every fleet, and a cap input that
21555
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21556
+ * in the one direction that costs an operator their cameras. So the wire stays
21557
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21558
+ * element rather than refused, and `max(1)` is what every consumer can then
21559
+ * rely on.
21560
+ *
21561
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21562
+ * a camera an operator left with no root detector — and `planDetectionSources`
21563
+ * has always said so: inventing a root for them is how a default acts without
21564
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21565
+ * suite caught it.
21566
+ *
21567
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21568
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21529
21569
  */
21530
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21570
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21531
21571
  /**
21532
21572
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21533
21573
  * so cap-side consumers (the orchestrator forward, the runner addon's
package/dist/addon.mjs CHANGED
@@ -19434,13 +19434,26 @@ var TrackAudioLabelSchema = object({
19434
19434
  * - `audio` — an audio event on the camera itself that was anomalous for
19435
19435
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19436
19436
  *
19437
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19438
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19439
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19440
+ * detector.
19441
+ *
19442
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19443
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19444
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19445
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19446
+ * could not name.
19447
+ *
19437
19448
  * The spatial subsystems (tracker association, occupancy count, re-id /
19438
19449
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19439
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19440
- * check silently readmits every source added after it was written.
19450
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19451
+ * `!== 'sensor'` check silently readmits every source added after it was
19452
+ * written.
19441
19453
  */
19442
19454
  var TrackSourceSchema = _enum([
19443
19455
  "pipeline",
19456
+ "onboard",
19444
19457
  "sensor",
19445
19458
  "audio"
19446
19459
  ]);
@@ -20028,6 +20041,7 @@ var MediaFileKindEnum = _enum([
20028
20041
  "keyFrame",
20029
20042
  "keyFrameSmall",
20030
20043
  "thumbnailSmall",
20044
+ "confirmationCrop",
20031
20045
  "sceneFrame"
20032
20046
  ]);
20033
20047
  /**
@@ -21522,13 +21536,39 @@ var MotionSourceEnum = _enum([
21522
21536
  */
21523
21537
  var MotionSourcesSchema = array(MotionSourceEnum);
21524
21538
  /**
21525
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21526
- * post-analysis already tags every detection with (`DetectionSource`) rather
21527
- * than a second spelling of the same two ideas — the value an operator picks
21528
- * here is the value that comes back on the track, the overlay and the debug
21529
- * row.
21539
+ * Which root detector a camera runs — EXACTLY ONE.
21540
+ *
21541
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21542
+ * with (`DetectionSource`) rather than a second spelling of the same two
21543
+ * ideas: the value an operator picks here is the value that comes back on the
21544
+ * track, the overlay and the debug row.
21545
+ *
21546
+ * ## Why one, and why it is still an array
21547
+ *
21548
+ * Two roots on one camera is a capability nobody asked for and the operator has
21549
+ * since ruled out. It was never free: both planes feed the SAME per-device
21550
+ * stationary registry, both can promote the same parked object, and the two
21551
+ * detectors disagree about the same box by construction — which is the
21552
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21553
+ *
21554
+ * The ARRAY shape survives because the stored settings and the attach payload
21555
+ * already speak it on every camera of every fleet, and a cap input that
21556
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21557
+ * in the one direction that costs an operator their cameras. So the wire stays
21558
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21559
+ * element rather than refused, and `max(1)` is what every consumer can then
21560
+ * rely on.
21561
+ *
21562
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21563
+ * a camera an operator left with no root detector — and `planDetectionSources`
21564
+ * has always said so: inventing a root for them is how a default acts without
21565
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21566
+ * suite caught it.
21567
+ *
21568
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21569
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21530
21570
  */
21531
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21571
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21532
21572
  /**
21533
21573
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21534
21574
  * 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-amcrest",
3
- "version": "0.2.105",
3
+ "version": "0.2.107",
4
4
  "description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
5
5
  "keywords": [
6
6
  "camstack",