@camstack/addon-provider-tuya 0.2.103 → 0.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.
package/dist/addon.js CHANGED
@@ -20275,13 +20275,26 @@ var TrackAudioLabelSchema = object({
20275
20275
  * - `audio` — an audio event on the camera itself that was anomalous for
20276
20276
  * THAT camera, loud, and heard while nothing visual was happening (D62).
20277
20277
  *
20278
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
20279
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
20280
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
20281
+ * detector.
20282
+ *
20283
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
20284
+ * a persisted onboard track failed `safeParse` on read and came back with NO
20285
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
20286
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
20287
+ * could not name.
20288
+ *
20278
20289
  * The spatial subsystems (tracker association, occupancy count, re-id /
20279
20290
  * embedding, resurrection) MUST skip every synthetic source. Test for that
20280
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
20281
- * check silently readmits every source added after it was written.
20291
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
20292
+ * `!== 'sensor'` check silently readmits every source added after it was
20293
+ * written.
20282
20294
  */
20283
20295
  var TrackSourceSchema = _enum([
20284
20296
  "pipeline",
20297
+ "onboard",
20285
20298
  "sensor",
20286
20299
  "audio"
20287
20300
  ]);
@@ -22363,13 +22376,39 @@ var MotionSourceEnum = _enum([
22363
22376
  */
22364
22377
  var MotionSourcesSchema = array(MotionSourceEnum);
22365
22378
  /**
22366
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
22367
- * post-analysis already tags every detection with (`DetectionSource`) rather
22368
- * than a second spelling of the same two ideas — the value an operator picks
22369
- * here is the value that comes back on the track, the overlay and the debug
22370
- * row.
22379
+ * Which root detector a camera runs — EXACTLY ONE.
22380
+ *
22381
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
22382
+ * with (`DetectionSource`) rather than a second spelling of the same two
22383
+ * ideas: the value an operator picks here is the value that comes back on the
22384
+ * track, the overlay and the debug row.
22385
+ *
22386
+ * ## Why one, and why it is still an array
22387
+ *
22388
+ * Two roots on one camera is a capability nobody asked for and the operator has
22389
+ * since ruled out. It was never free: both planes feed the SAME per-device
22390
+ * stationary registry, both can promote the same parked object, and the two
22391
+ * detectors disagree about the same box by construction — which is the
22392
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
22393
+ *
22394
+ * The ARRAY shape survives because the stored settings and the attach payload
22395
+ * already speak it on every camera of every fleet, and a cap input that
22396
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
22397
+ * in the one direction that costs an operator their cameras. So the wire stays
22398
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
22399
+ * element rather than refused, and `max(1)` is what every consumer can then
22400
+ * rely on.
22401
+ *
22402
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
22403
+ * a camera an operator left with no root detector — and `planDetectionSources`
22404
+ * has always said so: inventing a root for them is how a default acts without
22405
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
22406
+ * suite caught it.
22407
+ *
22408
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
22409
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
22371
22410
  */
22372
- var DetectionSourcesSchema = array(DetectionSourceSchema);
22411
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
22373
22412
  /**
22374
22413
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
22375
22414
  * so cap-side consumers (the orchestrator forward, the runner addon's
package/dist/addon.mjs CHANGED
@@ -20274,13 +20274,26 @@ var TrackAudioLabelSchema = object({
20274
20274
  * - `audio` — an audio event on the camera itself that was anomalous for
20275
20275
  * THAT camera, loud, and heard while nothing visual was happening (D62).
20276
20276
  *
20277
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
20278
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
20279
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
20280
+ * detector.
20281
+ *
20282
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
20283
+ * a persisted onboard track failed `safeParse` on read and came back with NO
20284
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
20285
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
20286
+ * could not name.
20287
+ *
20277
20288
  * The spatial subsystems (tracker association, occupancy count, re-id /
20278
20289
  * embedding, resurrection) MUST skip every synthetic source. Test for that
20279
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
20280
- * check silently readmits every source added after it was written.
20290
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
20291
+ * `!== 'sensor'` check silently readmits every source added after it was
20292
+ * written.
20281
20293
  */
20282
20294
  var TrackSourceSchema = _enum([
20283
20295
  "pipeline",
20296
+ "onboard",
20284
20297
  "sensor",
20285
20298
  "audio"
20286
20299
  ]);
@@ -22362,13 +22375,39 @@ var MotionSourceEnum = _enum([
22362
22375
  */
22363
22376
  var MotionSourcesSchema = array(MotionSourceEnum);
22364
22377
  /**
22365
- * Which root detectors a camera runs. Deliberately the SAME vocabulary
22366
- * post-analysis already tags every detection with (`DetectionSource`) rather
22367
- * than a second spelling of the same two ideas — the value an operator picks
22368
- * here is the value that comes back on the track, the overlay and the debug
22369
- * row.
22378
+ * Which root detector a camera runs — EXACTLY ONE.
22379
+ *
22380
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
22381
+ * with (`DetectionSource`) rather than a second spelling of the same two
22382
+ * ideas: the value an operator picks here is the value that comes back on the
22383
+ * track, the overlay and the debug row.
22384
+ *
22385
+ * ## Why one, and why it is still an array
22386
+ *
22387
+ * Two roots on one camera is a capability nobody asked for and the operator has
22388
+ * since ruled out. It was never free: both planes feed the SAME per-device
22389
+ * stationary registry, both can promote the same parked object, and the two
22390
+ * detectors disagree about the same box by construction — which is the
22391
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
22392
+ *
22393
+ * The ARRAY shape survives because the stored settings and the attach payload
22394
+ * already speak it on every camera of every fleet, and a cap input that
22395
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
22396
+ * in the one direction that costs an operator their cameras. So the wire stays
22397
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
22398
+ * element rather than refused, and `max(1)` is what every consumer can then
22399
+ * rely on.
22400
+ *
22401
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
22402
+ * a camera an operator left with no root detector — and `planDetectionSources`
22403
+ * has always said so: inventing a root for them is how a default acts without
22404
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
22405
+ * suite caught it.
22406
+ *
22407
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
22408
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
22370
22409
  */
22371
- var DetectionSourcesSchema = array(DetectionSourceSchema);
22410
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
22372
22411
  /**
22373
22412
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
22374
22413
  * 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-tuya",
3
- "version": "0.2.103",
3
+ "version": "0.2.104",
4
4
  "description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
5
5
  "keywords": [
6
6
  "camstack",