@camstack/addon-ai 0.4.108 → 0.4.109

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
@@ -19338,13 +19338,26 @@ var TrackAudioLabelSchema = object({
19338
19338
  * - `audio` — an audio event on the camera itself that was anomalous for
19339
19339
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19340
19340
  *
19341
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19342
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19343
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19344
+ * detector.
19345
+ *
19346
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19347
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19348
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19349
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19350
+ * could not name.
19351
+ *
19341
19352
  * The spatial subsystems (tracker association, occupancy count, re-id /
19342
19353
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19343
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19344
- * check silently readmits every source added after it was written.
19354
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19355
+ * `!== 'sensor'` check silently readmits every source added after it was
19356
+ * written.
19345
19357
  */
19346
19358
  var TrackSourceSchema = _enum([
19347
19359
  "pipeline",
19360
+ "onboard",
19348
19361
  "sensor",
19349
19362
  "audio"
19350
19363
  ]);
@@ -21426,13 +21439,39 @@ var MotionSourceEnum = _enum([
21426
21439
  */
21427
21440
  var MotionSourcesSchema = array(MotionSourceEnum);
21428
21441
  /**
21429
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21430
- * post-analysis already tags every detection with (`DetectionSource`) rather
21431
- * than a second spelling of the same two ideas — the value an operator picks
21432
- * here is the value that comes back on the track, the overlay and the debug
21433
- * row.
21442
+ * Which root detector a camera runs — EXACTLY ONE.
21443
+ *
21444
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21445
+ * with (`DetectionSource`) rather than a second spelling of the same two
21446
+ * ideas: the value an operator picks here is the value that comes back on the
21447
+ * track, the overlay and the debug row.
21448
+ *
21449
+ * ## Why one, and why it is still an array
21450
+ *
21451
+ * Two roots on one camera is a capability nobody asked for and the operator has
21452
+ * since ruled out. It was never free: both planes feed the SAME per-device
21453
+ * stationary registry, both can promote the same parked object, and the two
21454
+ * detectors disagree about the same box by construction — which is the
21455
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21456
+ *
21457
+ * The ARRAY shape survives because the stored settings and the attach payload
21458
+ * already speak it on every camera of every fleet, and a cap input that
21459
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21460
+ * in the one direction that costs an operator their cameras. So the wire stays
21461
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21462
+ * element rather than refused, and `max(1)` is what every consumer can then
21463
+ * rely on.
21464
+ *
21465
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21466
+ * a camera an operator left with no root detector — and `planDetectionSources`
21467
+ * has always said so: inventing a root for them is how a default acts without
21468
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21469
+ * suite caught it.
21470
+ *
21471
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21472
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21434
21473
  */
21435
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21474
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21436
21475
  /**
21437
21476
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21438
21477
  * so cap-side consumers (the orchestrator forward, the runner addon's
package/dist/addon.mjs CHANGED
@@ -19365,13 +19365,26 @@ var TrackAudioLabelSchema = object({
19365
19365
  * - `audio` — an audio event on the camera itself that was anomalous for
19366
19366
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19367
19367
  *
19368
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19369
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19370
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19371
+ * detector.
19372
+ *
19373
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19374
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19375
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19376
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19377
+ * could not name.
19378
+ *
19368
19379
  * The spatial subsystems (tracker association, occupancy count, re-id /
19369
19380
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19370
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19371
- * check silently readmits every source added after it was written.
19381
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19382
+ * `!== 'sensor'` check silently readmits every source added after it was
19383
+ * written.
19372
19384
  */
19373
19385
  var TrackSourceSchema = _enum([
19374
19386
  "pipeline",
19387
+ "onboard",
19375
19388
  "sensor",
19376
19389
  "audio"
19377
19390
  ]);
@@ -21453,13 +21466,39 @@ var MotionSourceEnum = _enum([
21453
21466
  */
21454
21467
  var MotionSourcesSchema = array(MotionSourceEnum);
21455
21468
  /**
21456
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
21457
- * post-analysis already tags every detection with (`DetectionSource`) rather
21458
- * than a second spelling of the same two ideas — the value an operator picks
21459
- * here is the value that comes back on the track, the overlay and the debug
21460
- * row.
21469
+ * Which root detector a camera runs — EXACTLY ONE.
21470
+ *
21471
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21472
+ * with (`DetectionSource`) rather than a second spelling of the same two
21473
+ * ideas: the value an operator picks here is the value that comes back on the
21474
+ * track, the overlay and the debug row.
21475
+ *
21476
+ * ## Why one, and why it is still an array
21477
+ *
21478
+ * Two roots on one camera is a capability nobody asked for and the operator has
21479
+ * since ruled out. It was never free: both planes feed the SAME per-device
21480
+ * stationary registry, both can promote the same parked object, and the two
21481
+ * detectors disagree about the same box by construction — which is the
21482
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21483
+ *
21484
+ * The ARRAY shape survives because the stored settings and the attach payload
21485
+ * already speak it on every camera of every fleet, and a cap input that
21486
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21487
+ * in the one direction that costs an operator their cameras. So the wire stays
21488
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21489
+ * element rather than refused, and `max(1)` is what every consumer can then
21490
+ * rely on.
21491
+ *
21492
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21493
+ * a camera an operator left with no root detector — and `planDetectionSources`
21494
+ * has always said so: inventing a root for them is how a default acts without
21495
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21496
+ * suite caught it.
21497
+ *
21498
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21499
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21461
21500
  */
21462
- var DetectionSourcesSchema = array(DetectionSourceSchema);
21501
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21463
21502
  /**
21464
21503
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21465
21504
  * 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-ai",
3
- "version": "0.4.108",
3
+ "version": "0.4.109",
4
4
  "description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
5
5
  "keywords": [
6
6
  "camstack",