@camstack/addon-provider-tuya 0.2.22 → 0.2.24

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.
Files changed (3) hide show
  1. package/dist/addon.js +167 -59
  2. package/dist/addon.mjs +167 -59
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -8386,7 +8386,7 @@ var RecordingBandSchema = object({
8386
8386
  postBufferSec: number().min(0).optional()
8387
8387
  });
8388
8388
  ({
8389
- preBufferSec: 10,
8389
+ preBufferSec: 15,
8390
8390
  postBufferSec: 30
8391
8391
  }).postBufferSec * 1e3;
8392
8392
  /**
@@ -14606,128 +14606,103 @@ var COCO_TO_MACRO = {
14606
14606
  var AUDIO_MACRO_LABELS = [
14607
14607
  {
14608
14608
  id: "speech",
14609
- name: "Speech",
14610
- icon: "🗣️"
14609
+ name: "Speech"
14611
14610
  },
14612
14611
  {
14613
14612
  id: "scream",
14614
- name: "Scream / Shout",
14615
- icon: "😱"
14613
+ name: "Scream / Shout"
14616
14614
  },
14617
14615
  {
14618
14616
  id: "crying",
14619
- name: "Crying / Baby",
14620
- icon: "😢"
14617
+ name: "Crying / Baby"
14621
14618
  },
14622
14619
  {
14623
14620
  id: "laughter",
14624
- name: "Laughter",
14625
- icon: "😂"
14621
+ name: "Laughter"
14626
14622
  },
14627
14623
  {
14628
14624
  id: "music",
14629
- name: "Music",
14630
- icon: "🎵"
14625
+ name: "Music"
14631
14626
  },
14632
14627
  {
14633
14628
  id: "dog",
14634
- name: "Dog",
14635
- icon: "🐕"
14629
+ name: "Dog"
14636
14630
  },
14637
14631
  {
14638
14632
  id: "cat",
14639
- name: "Cat",
14640
- icon: "🐈"
14633
+ name: "Cat"
14641
14634
  },
14642
14635
  {
14643
14636
  id: "bird",
14644
- name: "Bird",
14645
- icon: "🐦"
14637
+ name: "Bird"
14646
14638
  },
14647
14639
  {
14648
14640
  id: "animal",
14649
- name: "Animal (other)",
14650
- icon: "🐾"
14641
+ name: "Animal (other)"
14651
14642
  },
14652
14643
  {
14653
14644
  id: "alarm",
14654
- name: "Alarm / Siren",
14655
- icon: "🚨"
14645
+ name: "Alarm / Siren"
14656
14646
  },
14657
14647
  {
14658
14648
  id: "doorbell",
14659
- name: "Doorbell / Knock",
14660
- icon: "🔔"
14649
+ name: "Doorbell / Knock"
14661
14650
  },
14662
14651
  {
14663
14652
  id: "glass_breaking",
14664
- name: "Glass Breaking",
14665
- icon: "💥"
14653
+ name: "Glass Breaking"
14666
14654
  },
14667
14655
  {
14668
14656
  id: "gunshot",
14669
- name: "Gunshot / Explosion",
14670
- icon: "💣"
14657
+ name: "Gunshot / Explosion"
14671
14658
  },
14672
14659
  {
14673
14660
  id: "vehicle",
14674
- name: "Vehicle",
14675
- icon: "🚗"
14661
+ name: "Vehicle"
14676
14662
  },
14677
14663
  {
14678
14664
  id: "siren",
14679
- name: "Emergency Siren",
14680
- icon: "🚑"
14665
+ name: "Emergency Siren"
14681
14666
  },
14682
14667
  {
14683
14668
  id: "fire",
14684
- name: "Fire / Smoke",
14685
- icon: "🔥"
14669
+ name: "Fire / Smoke"
14686
14670
  },
14687
14671
  {
14688
14672
  id: "water",
14689
- name: "Water",
14690
- icon: "💧"
14673
+ name: "Water"
14691
14674
  },
14692
14675
  {
14693
14676
  id: "wind",
14694
- name: "Wind / Weather",
14695
- icon: "🌬️"
14677
+ name: "Wind / Weather"
14696
14678
  },
14697
14679
  {
14698
14680
  id: "door",
14699
- name: "Door",
14700
- icon: "🚪"
14681
+ name: "Door"
14701
14682
  },
14702
14683
  {
14703
14684
  id: "footsteps",
14704
- name: "Footsteps",
14705
- icon: "👣"
14685
+ name: "Footsteps"
14706
14686
  },
14707
14687
  {
14708
14688
  id: "crowd",
14709
- name: "Crowd / Chatter",
14710
- icon: "👥"
14689
+ name: "Crowd / Chatter"
14711
14690
  },
14712
14691
  {
14713
14692
  id: "telephone",
14714
- name: "Telephone",
14715
- icon: "📞"
14693
+ name: "Telephone"
14716
14694
  },
14717
14695
  {
14718
14696
  id: "engine",
14719
- name: "Engine / Motor",
14720
- icon: "⚙️"
14697
+ name: "Engine / Motor"
14721
14698
  },
14722
14699
  {
14723
14700
  id: "tools",
14724
- name: "Tools / Construction",
14725
- icon: "🔨"
14701
+ name: "Tools / Construction"
14726
14702
  },
14727
14703
  {
14728
14704
  id: "silence",
14729
- name: "Silence",
14730
- icon: "🤫"
14705
+ name: "Silence"
14731
14706
  }
14732
14707
  ];
14733
14708
  var YAMNET_TO_MACRO = {
@@ -17229,7 +17204,7 @@ var TrackEnvelopeSchema = object({
17229
17204
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
17230
17205
  * keeps every scalar the list surfaces actually render (ids, class(es),
17231
17206
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
17232
- * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
17207
+ * zonesVisited, bestEventId, envelope, hasFace, hasEmbeddedFace, hasRider) and returns `positions` /
17233
17208
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
17234
17209
  * `getTrack`. Mirrors the event-store `projection` convention
17235
17210
  * (`getObjectEvents` et al.).
@@ -17524,6 +17499,35 @@ var TrackSchema = object({
17524
17499
  */
17525
17500
  hasFace: boolean().optional(),
17526
17501
  /**
17502
+ * This track has a face row IN THE GALLERY: a crop **and** an embedding — a
17503
+ * face an operator could ASSIGN to an identity.
17504
+ *
17505
+ * The STRICT twin of {@link hasFace}, and the pair only earns its keep
17506
+ * because the two disagree. `hasFace` is stamped at the TOP of the face
17507
+ * branch, before every gate, and means no more than "a face detector produced
17508
+ * a face detail". This one is stamped at the single moment the gallery row
17509
+ * LANDS — after `FaceRecognizer.onTrackEnd` successfully persists it, i.e.
17510
+ * past the embedding-magnitude verdict, the `minFacePx` detection gate, the
17511
+ * candidate gate, the imageless-track drop (no crop was ever captured) and
17512
+ * the crop-store drop. Everything between the detector and that insert can
17513
+ * legitimately refuse the face, so a flag written any earlier promises the
17514
+ * operator something to assign and delivers nothing.
17515
+ *
17516
+ * **Independent of recognition.** A face collected but never auto-matched is
17517
+ * still assignable — it is in fact the face an operator most wants to reach —
17518
+ * so this is NOT gated on `recognizedIdentityId`. Recognition lands in
17519
+ * `subLabel`; this says only that the raw material exists.
17520
+ *
17521
+ * **Set once, never cleared.** A track that produced a gallery row produced
17522
+ * one; deleting the row later is the gallery's business, not this flag's.
17523
+ *
17524
+ * **Absent ≠ false**, the same rule as {@link hasFace}: every row written
17525
+ * before the column omits it, and so does every server that predates the
17526
+ * field. A consumer must test `=== true` and render nothing otherwise —
17527
+ * never infer "no assignable face".
17528
+ */
17529
+ hasEmbeddedFace: boolean().optional(),
17530
+ /**
17527
17531
  * This subject CONTAINS a folded rider — a person the rider-pairing step
17528
17532
  * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
17529
17533
  * so the passage is tracked once and as a VEHICLE.
@@ -18913,6 +18917,32 @@ var DetailResultSchema = object({
18913
18917
  /** FRAME-space bbox (already mapped back from crop space). */
18914
18918
  bbox: NativeCropBboxSchema.optional(),
18915
18919
  embedding: string().optional(),
18920
+ /**
18921
+ * L2 magnitude of the RAW pre-normalization embedding. Additive and optional
18922
+ * so an older runner that does not send it degrades to "unmeasurable", which
18923
+ * the consuming gate treats as accept — never as reject.
18924
+ */
18925
+ embeddingMagnitude: number().optional(),
18926
+ /**
18927
+ * Model that produced `embedding` — the SAME contract `labelModelId` has for
18928
+ * `label`, and for the same reason: the producing node is the only side that
18929
+ * knows which model actually ran, and re-deriving it downstream is exactly
18930
+ * the inference this model exists to forbid.
18931
+ *
18932
+ * Additive and optional, so a runner that predates it degrades to
18933
+ * "unmeasurable" rather than to a wrong answer — the consumer falls back to
18934
+ * its previous assumption instead of refusing.
18935
+ *
18936
+ * Its absence was not cosmetic. `FaceRecognizer` needs the probe's model id
18937
+ * to use `face-matcher`'s same-model gate (`sample.modelId !== probe.modelId`);
18938
+ * with nothing on the wire it took the id from the GALLERY, so the gate
18939
+ * compared the gallery against itself and could never fire. That turned the
18940
+ * one guard protecting the face feature space into a tautology, and it is
18941
+ * why swapping `face-embedding`'s model would NOT have stranded the enrolled
18942
+ * gallery as the catalog comment predicts — it would have scored the new
18943
+ * model's vectors against the old model's samples in one cosine space.
18944
+ */
18945
+ embeddingModelId: string().optional(),
18916
18946
  label: string().optional(),
18917
18947
  /**
18918
18948
  * The tier `label` occupies, copied VERBATIM from the producing step's
@@ -20323,6 +20353,7 @@ DeviceType.Camera, method(object({
20323
20353
  isBattery: boolean(),
20324
20354
  reason: _enum([
20325
20355
  "disabled",
20356
+ "offline",
20326
20357
  "sleeping",
20327
20358
  "unreachable",
20328
20359
  "waking"
@@ -20368,9 +20399,17 @@ targets: array(object({
20368
20399
  sleeping: boolean(),
20369
20400
  /** Current device state rendered over the cached frame. State images
20370
20401
  * remain authoritative even when their photographic background is
20371
- * old; null means the link must carry a current camera frame. */
20402
+ * old; null means the link must carry a current camera frame.
20403
+ *
20404
+ * **This is the ONLY source a surface may derive an inactive tile
20405
+ * from.** A client that reads a device's `online`/`disabled` flags and
20406
+ * draws its own verdict will disagree with the pixels it is painting
20407
+ * — the frame comes from here, and so must the sentence over it
20408
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
20409
+ * state. */
20372
20410
  stateReason: _enum([
20373
20411
  "disabled",
20412
+ "offline",
20374
20413
  "sleeping",
20375
20414
  "unreachable",
20376
20415
  "waking"
@@ -27097,9 +27136,21 @@ var RecordingLocationUsageSchema = object({
27097
27136
  * previously rendered as two identical "disks" with a nonsensical used
27098
27137
  * split — hydrate attribution across aliases is arbitrary by nature. */
27099
27138
  locationIds: array(string()).optional(),
27100
- /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
27139
+ /**
27140
+ * Filesystem root of the physical volume this row accounts — the only
27141
+ * operator-legible identity when a location has no `displayName` yet, and
27142
+ * what a "which disk is full" alert has to name. OPTIONAL for the same
27143
+ * train-skew reason as `oldestMs`: a recorder that predates the field omits
27144
+ * it, and this schema must keep validating that older provider's payload.
27145
+ */
27146
+ root: string().optional(),
27147
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). This is
27148
+ * the footage's SHARE of the volume, not how full the volume is — the disk
27149
+ * also holds everything that is not recordings. Volume fill is
27150
+ * `(totalBytes - availableBytes) / totalBytes`. */
27101
27151
  usedBytes: number(),
27102
- /** Free bytes on the location's volume; null when capacity is unknown (remote). */
27152
+ /** Free bytes on the location's volume; null when capacity is unknown
27153
+ * (remote/unstattable — the recorder logs the statfs failure with the root). */
27103
27154
  availableBytes: number().nullable(),
27104
27155
  /** Total bytes of the location's volume; null when unknown. */
27105
27156
  totalBytes: number().nullable()
@@ -27111,7 +27162,15 @@ var RecordingStorageUsageSchema = object({
27111
27162
  nodeId: string(),
27112
27163
  totalUsedBytes: number(),
27113
27164
  devices: array(RecordingDeviceUsageSchema),
27114
- locations: array(RecordingLocationUsageSchema)
27165
+ /**
27166
+ * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
27167
+ * of the payload without it: the hub serves this method through a BAKED
27168
+ * router, so a hub whose framework train predates a change to this array
27169
+ * strips it out of an answer a newer recorder happily produced. A UI that
27170
+ * dereferences it unconditionally crashes the whole Storage page over a
27171
+ * missing disk bar.
27172
+ */
27173
+ locations: array(RecordingLocationUsageSchema).optional()
27115
27174
  });
27116
27175
  /**
27117
27176
  * The OPERATOR-ARMED half of multi-location recordings (D116).
@@ -37896,8 +37955,13 @@ Object.freeze({
37896
37955
  "network-access": "ingress",
37897
37956
  "smtp-provider": "email"
37898
37957
  });
37899
- new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
37958
+ /** Schema defaults an untouched sub-field must author exactly these. */
37959
+ var NC_AUDIO_DEFAULTS = {
37960
+ hitPercent: 60,
37961
+ samplingSeconds: 10
37962
+ };
37900
37963
  new Set(["devices", "classes"]);
37964
+ NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
37901
37965
  /**
37902
37966
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
37903
37967
  *
@@ -38129,6 +38193,39 @@ TimelapseRuleInputSchema.extend({
38129
38193
  createdAt: number(),
38130
38194
  updatedAt: number()
38131
38195
  });
38196
+ Object.freeze(Object.fromEntries([{
38197
+ stepId: "face-embedding",
38198
+ label: "Face recognition model",
38199
+ defaultModelId: "arcface-r100",
38200
+ indexName: "the enrolled face gallery",
38201
+ options: [
38202
+ {
38203
+ id: "arcface-r100",
38204
+ label: "ArcFace (ResNet34)"
38205
+ },
38206
+ {
38207
+ id: "auraface-r100",
38208
+ label: "AuraFace R100"
38209
+ },
38210
+ {
38211
+ id: "inception-resnet-v1",
38212
+ label: "Inception ResNet V1"
38213
+ }
38214
+ ]
38215
+ }, {
38216
+ stepId: "clip-embedding",
38217
+ label: "Semantic search model",
38218
+ defaultModelId: "mobileclip-s1",
38219
+ indexName: "the object semantic-search index",
38220
+ options: [{
38221
+ id: "mobileclip-s1",
38222
+ label: "MobileCLIP S1"
38223
+ }, {
38224
+ id: "mobileclip-s2",
38225
+ label: "MobileCLIP S2"
38226
+ }]
38227
+ }].map((s) => [s.stepId, s.defaultModelId])));
38228
+ string().min(1);
38132
38229
  object({
38133
38230
  /**
38134
38231
  * Fraction of the box's own size added on EACH side before cutting.
@@ -38149,10 +38246,21 @@ object({
38149
38246
  */
38150
38247
  square: boolean()
38151
38248
  });
38152
- ({
38249
+ /**
38250
+ * The convention in force when nobody has configured one — byte-for-byte the
38251
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
38252
+ */
38253
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
38153
38254
  paddingRatio: .15,
38154
38255
  square: false
38155
- }).paddingRatio;
38256
+ };
38257
+ Object.freeze({
38258
+ x: 0,
38259
+ y: 0,
38260
+ w: 1,
38261
+ h: 1
38262
+ });
38263
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
38156
38264
  /**
38157
38265
  * WHICH delivered frames the decode worker retains a native copy of.
38158
38266
  *
package/dist/addon.mjs CHANGED
@@ -8385,7 +8385,7 @@ var RecordingBandSchema = object({
8385
8385
  postBufferSec: number().min(0).optional()
8386
8386
  });
8387
8387
  ({
8388
- preBufferSec: 10,
8388
+ preBufferSec: 15,
8389
8389
  postBufferSec: 30
8390
8390
  }).postBufferSec * 1e3;
8391
8391
  /**
@@ -14605,128 +14605,103 @@ var COCO_TO_MACRO = {
14605
14605
  var AUDIO_MACRO_LABELS = [
14606
14606
  {
14607
14607
  id: "speech",
14608
- name: "Speech",
14609
- icon: "🗣️"
14608
+ name: "Speech"
14610
14609
  },
14611
14610
  {
14612
14611
  id: "scream",
14613
- name: "Scream / Shout",
14614
- icon: "😱"
14612
+ name: "Scream / Shout"
14615
14613
  },
14616
14614
  {
14617
14615
  id: "crying",
14618
- name: "Crying / Baby",
14619
- icon: "😢"
14616
+ name: "Crying / Baby"
14620
14617
  },
14621
14618
  {
14622
14619
  id: "laughter",
14623
- name: "Laughter",
14624
- icon: "😂"
14620
+ name: "Laughter"
14625
14621
  },
14626
14622
  {
14627
14623
  id: "music",
14628
- name: "Music",
14629
- icon: "🎵"
14624
+ name: "Music"
14630
14625
  },
14631
14626
  {
14632
14627
  id: "dog",
14633
- name: "Dog",
14634
- icon: "🐕"
14628
+ name: "Dog"
14635
14629
  },
14636
14630
  {
14637
14631
  id: "cat",
14638
- name: "Cat",
14639
- icon: "🐈"
14632
+ name: "Cat"
14640
14633
  },
14641
14634
  {
14642
14635
  id: "bird",
14643
- name: "Bird",
14644
- icon: "🐦"
14636
+ name: "Bird"
14645
14637
  },
14646
14638
  {
14647
14639
  id: "animal",
14648
- name: "Animal (other)",
14649
- icon: "🐾"
14640
+ name: "Animal (other)"
14650
14641
  },
14651
14642
  {
14652
14643
  id: "alarm",
14653
- name: "Alarm / Siren",
14654
- icon: "🚨"
14644
+ name: "Alarm / Siren"
14655
14645
  },
14656
14646
  {
14657
14647
  id: "doorbell",
14658
- name: "Doorbell / Knock",
14659
- icon: "🔔"
14648
+ name: "Doorbell / Knock"
14660
14649
  },
14661
14650
  {
14662
14651
  id: "glass_breaking",
14663
- name: "Glass Breaking",
14664
- icon: "💥"
14652
+ name: "Glass Breaking"
14665
14653
  },
14666
14654
  {
14667
14655
  id: "gunshot",
14668
- name: "Gunshot / Explosion",
14669
- icon: "💣"
14656
+ name: "Gunshot / Explosion"
14670
14657
  },
14671
14658
  {
14672
14659
  id: "vehicle",
14673
- name: "Vehicle",
14674
- icon: "🚗"
14660
+ name: "Vehicle"
14675
14661
  },
14676
14662
  {
14677
14663
  id: "siren",
14678
- name: "Emergency Siren",
14679
- icon: "🚑"
14664
+ name: "Emergency Siren"
14680
14665
  },
14681
14666
  {
14682
14667
  id: "fire",
14683
- name: "Fire / Smoke",
14684
- icon: "🔥"
14668
+ name: "Fire / Smoke"
14685
14669
  },
14686
14670
  {
14687
14671
  id: "water",
14688
- name: "Water",
14689
- icon: "💧"
14672
+ name: "Water"
14690
14673
  },
14691
14674
  {
14692
14675
  id: "wind",
14693
- name: "Wind / Weather",
14694
- icon: "🌬️"
14676
+ name: "Wind / Weather"
14695
14677
  },
14696
14678
  {
14697
14679
  id: "door",
14698
- name: "Door",
14699
- icon: "🚪"
14680
+ name: "Door"
14700
14681
  },
14701
14682
  {
14702
14683
  id: "footsteps",
14703
- name: "Footsteps",
14704
- icon: "👣"
14684
+ name: "Footsteps"
14705
14685
  },
14706
14686
  {
14707
14687
  id: "crowd",
14708
- name: "Crowd / Chatter",
14709
- icon: "👥"
14688
+ name: "Crowd / Chatter"
14710
14689
  },
14711
14690
  {
14712
14691
  id: "telephone",
14713
- name: "Telephone",
14714
- icon: "📞"
14692
+ name: "Telephone"
14715
14693
  },
14716
14694
  {
14717
14695
  id: "engine",
14718
- name: "Engine / Motor",
14719
- icon: "⚙️"
14696
+ name: "Engine / Motor"
14720
14697
  },
14721
14698
  {
14722
14699
  id: "tools",
14723
- name: "Tools / Construction",
14724
- icon: "🔨"
14700
+ name: "Tools / Construction"
14725
14701
  },
14726
14702
  {
14727
14703
  id: "silence",
14728
- name: "Silence",
14729
- icon: "🤫"
14704
+ name: "Silence"
14730
14705
  }
14731
14706
  ];
14732
14707
  var YAMNET_TO_MACRO = {
@@ -17228,7 +17203,7 @@ var TrackEnvelopeSchema = object({
17228
17203
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
17229
17204
  * keeps every scalar the list surfaces actually render (ids, class(es),
17230
17205
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
17231
- * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
17206
+ * zonesVisited, bestEventId, envelope, hasFace, hasEmbeddedFace, hasRider) and returns `positions` /
17232
17207
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
17233
17208
  * `getTrack`. Mirrors the event-store `projection` convention
17234
17209
  * (`getObjectEvents` et al.).
@@ -17523,6 +17498,35 @@ var TrackSchema = object({
17523
17498
  */
17524
17499
  hasFace: boolean().optional(),
17525
17500
  /**
17501
+ * This track has a face row IN THE GALLERY: a crop **and** an embedding — a
17502
+ * face an operator could ASSIGN to an identity.
17503
+ *
17504
+ * The STRICT twin of {@link hasFace}, and the pair only earns its keep
17505
+ * because the two disagree. `hasFace` is stamped at the TOP of the face
17506
+ * branch, before every gate, and means no more than "a face detector produced
17507
+ * a face detail". This one is stamped at the single moment the gallery row
17508
+ * LANDS — after `FaceRecognizer.onTrackEnd` successfully persists it, i.e.
17509
+ * past the embedding-magnitude verdict, the `minFacePx` detection gate, the
17510
+ * candidate gate, the imageless-track drop (no crop was ever captured) and
17511
+ * the crop-store drop. Everything between the detector and that insert can
17512
+ * legitimately refuse the face, so a flag written any earlier promises the
17513
+ * operator something to assign and delivers nothing.
17514
+ *
17515
+ * **Independent of recognition.** A face collected but never auto-matched is
17516
+ * still assignable — it is in fact the face an operator most wants to reach —
17517
+ * so this is NOT gated on `recognizedIdentityId`. Recognition lands in
17518
+ * `subLabel`; this says only that the raw material exists.
17519
+ *
17520
+ * **Set once, never cleared.** A track that produced a gallery row produced
17521
+ * one; deleting the row later is the gallery's business, not this flag's.
17522
+ *
17523
+ * **Absent ≠ false**, the same rule as {@link hasFace}: every row written
17524
+ * before the column omits it, and so does every server that predates the
17525
+ * field. A consumer must test `=== true` and render nothing otherwise —
17526
+ * never infer "no assignable face".
17527
+ */
17528
+ hasEmbeddedFace: boolean().optional(),
17529
+ /**
17526
17530
  * This subject CONTAINS a folded rider — a person the rider-pairing step
17527
17531
  * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
17528
17532
  * so the passage is tracked once and as a VEHICLE.
@@ -18912,6 +18916,32 @@ var DetailResultSchema = object({
18912
18916
  /** FRAME-space bbox (already mapped back from crop space). */
18913
18917
  bbox: NativeCropBboxSchema.optional(),
18914
18918
  embedding: string().optional(),
18919
+ /**
18920
+ * L2 magnitude of the RAW pre-normalization embedding. Additive and optional
18921
+ * so an older runner that does not send it degrades to "unmeasurable", which
18922
+ * the consuming gate treats as accept — never as reject.
18923
+ */
18924
+ embeddingMagnitude: number().optional(),
18925
+ /**
18926
+ * Model that produced `embedding` — the SAME contract `labelModelId` has for
18927
+ * `label`, and for the same reason: the producing node is the only side that
18928
+ * knows which model actually ran, and re-deriving it downstream is exactly
18929
+ * the inference this model exists to forbid.
18930
+ *
18931
+ * Additive and optional, so a runner that predates it degrades to
18932
+ * "unmeasurable" rather than to a wrong answer — the consumer falls back to
18933
+ * its previous assumption instead of refusing.
18934
+ *
18935
+ * Its absence was not cosmetic. `FaceRecognizer` needs the probe's model id
18936
+ * to use `face-matcher`'s same-model gate (`sample.modelId !== probe.modelId`);
18937
+ * with nothing on the wire it took the id from the GALLERY, so the gate
18938
+ * compared the gallery against itself and could never fire. That turned the
18939
+ * one guard protecting the face feature space into a tautology, and it is
18940
+ * why swapping `face-embedding`'s model would NOT have stranded the enrolled
18941
+ * gallery as the catalog comment predicts — it would have scored the new
18942
+ * model's vectors against the old model's samples in one cosine space.
18943
+ */
18944
+ embeddingModelId: string().optional(),
18915
18945
  label: string().optional(),
18916
18946
  /**
18917
18947
  * The tier `label` occupies, copied VERBATIM from the producing step's
@@ -20322,6 +20352,7 @@ DeviceType.Camera, method(object({
20322
20352
  isBattery: boolean(),
20323
20353
  reason: _enum([
20324
20354
  "disabled",
20355
+ "offline",
20325
20356
  "sleeping",
20326
20357
  "unreachable",
20327
20358
  "waking"
@@ -20367,9 +20398,17 @@ targets: array(object({
20367
20398
  sleeping: boolean(),
20368
20399
  /** Current device state rendered over the cached frame. State images
20369
20400
  * remain authoritative even when their photographic background is
20370
- * old; null means the link must carry a current camera frame. */
20401
+ * old; null means the link must carry a current camera frame.
20402
+ *
20403
+ * **This is the ONLY source a surface may derive an inactive tile
20404
+ * from.** A client that reads a device's `online`/`disabled` flags and
20405
+ * draws its own verdict will disagree with the pixels it is painting
20406
+ * — the frame comes from here, and so must the sentence over it
20407
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
20408
+ * state. */
20371
20409
  stateReason: _enum([
20372
20410
  "disabled",
20411
+ "offline",
20373
20412
  "sleeping",
20374
20413
  "unreachable",
20375
20414
  "waking"
@@ -27096,9 +27135,21 @@ var RecordingLocationUsageSchema = object({
27096
27135
  * previously rendered as two identical "disks" with a nonsensical used
27097
27136
  * split — hydrate attribution across aliases is arbitrary by nature. */
27098
27137
  locationIds: array(string()).optional(),
27099
- /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
27138
+ /**
27139
+ * Filesystem root of the physical volume this row accounts — the only
27140
+ * operator-legible identity when a location has no `displayName` yet, and
27141
+ * what a "which disk is full" alert has to name. OPTIONAL for the same
27142
+ * train-skew reason as `oldestMs`: a recorder that predates the field omits
27143
+ * it, and this schema must keep validating that older provider's payload.
27144
+ */
27145
+ root: string().optional(),
27146
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). This is
27147
+ * the footage's SHARE of the volume, not how full the volume is — the disk
27148
+ * also holds everything that is not recordings. Volume fill is
27149
+ * `(totalBytes - availableBytes) / totalBytes`. */
27100
27150
  usedBytes: number(),
27101
- /** Free bytes on the location's volume; null when capacity is unknown (remote). */
27151
+ /** Free bytes on the location's volume; null when capacity is unknown
27152
+ * (remote/unstattable — the recorder logs the statfs failure with the root). */
27102
27153
  availableBytes: number().nullable(),
27103
27154
  /** Total bytes of the location's volume; null when unknown. */
27104
27155
  totalBytes: number().nullable()
@@ -27110,7 +27161,15 @@ var RecordingStorageUsageSchema = object({
27110
27161
  nodeId: string(),
27111
27162
  totalUsedBytes: number(),
27112
27163
  devices: array(RecordingDeviceUsageSchema),
27113
- locations: array(RecordingLocationUsageSchema)
27164
+ /**
27165
+ * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
27166
+ * of the payload without it: the hub serves this method through a BAKED
27167
+ * router, so a hub whose framework train predates a change to this array
27168
+ * strips it out of an answer a newer recorder happily produced. A UI that
27169
+ * dereferences it unconditionally crashes the whole Storage page over a
27170
+ * missing disk bar.
27171
+ */
27172
+ locations: array(RecordingLocationUsageSchema).optional()
27114
27173
  });
27115
27174
  /**
27116
27175
  * The OPERATOR-ARMED half of multi-location recordings (D116).
@@ -37895,8 +37954,13 @@ Object.freeze({
37895
37954
  "network-access": "ingress",
37896
37955
  "smtp-provider": "email"
37897
37956
  });
37898
- new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
37957
+ /** Schema defaults an untouched sub-field must author exactly these. */
37958
+ var NC_AUDIO_DEFAULTS = {
37959
+ hitPercent: 60,
37960
+ samplingSeconds: 10
37961
+ };
37899
37962
  new Set(["devices", "classes"]);
37963
+ NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
37900
37964
  /**
37901
37965
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
37902
37966
  *
@@ -38128,6 +38192,39 @@ TimelapseRuleInputSchema.extend({
38128
38192
  createdAt: number(),
38129
38193
  updatedAt: number()
38130
38194
  });
38195
+ Object.freeze(Object.fromEntries([{
38196
+ stepId: "face-embedding",
38197
+ label: "Face recognition model",
38198
+ defaultModelId: "arcface-r100",
38199
+ indexName: "the enrolled face gallery",
38200
+ options: [
38201
+ {
38202
+ id: "arcface-r100",
38203
+ label: "ArcFace (ResNet34)"
38204
+ },
38205
+ {
38206
+ id: "auraface-r100",
38207
+ label: "AuraFace R100"
38208
+ },
38209
+ {
38210
+ id: "inception-resnet-v1",
38211
+ label: "Inception ResNet V1"
38212
+ }
38213
+ ]
38214
+ }, {
38215
+ stepId: "clip-embedding",
38216
+ label: "Semantic search model",
38217
+ defaultModelId: "mobileclip-s1",
38218
+ indexName: "the object semantic-search index",
38219
+ options: [{
38220
+ id: "mobileclip-s1",
38221
+ label: "MobileCLIP S1"
38222
+ }, {
38223
+ id: "mobileclip-s2",
38224
+ label: "MobileCLIP S2"
38225
+ }]
38226
+ }].map((s) => [s.stepId, s.defaultModelId])));
38227
+ string().min(1);
38131
38228
  object({
38132
38229
  /**
38133
38230
  * Fraction of the box's own size added on EACH side before cutting.
@@ -38148,10 +38245,21 @@ object({
38148
38245
  */
38149
38246
  square: boolean()
38150
38247
  });
38151
- ({
38248
+ /**
38249
+ * The convention in force when nobody has configured one — byte-for-byte the
38250
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
38251
+ */
38252
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
38152
38253
  paddingRatio: .15,
38153
38254
  square: false
38154
- }).paddingRatio;
38255
+ };
38256
+ Object.freeze({
38257
+ x: 0,
38258
+ y: 0,
38259
+ w: 1,
38260
+ h: 1
38261
+ });
38262
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
38155
38263
  /**
38156
38264
  * WHICH delivered frames the decode worker retains a native copy of.
38157
38265
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-tuya",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
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",