@camstack/addon-provider-tuya 0.2.23 → 0.2.25

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 +204 -61
  2. package/dist/addon.mjs +204 -61
  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
@@ -19788,6 +19818,12 @@ var CameraStatusSchema = object({
19788
19818
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19789
19819
  fetchedAt: number()
19790
19820
  });
19821
+ var InferenceDeviceExclusionReasonSchema = _enum([
19822
+ "disabled",
19823
+ "unavailable",
19824
+ "cannot-host-camera-root",
19825
+ "accelerator-preferred"
19826
+ ]);
19791
19827
  var NodeInferenceDeviceSchema = object({
19792
19828
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19793
19829
  key: string(),
@@ -19818,7 +19854,17 @@ var NodeInferenceDeviceSchema = object({
19818
19854
  * available per format; this is the stored selection that becomes the
19819
19855
  * default for EVERY camera landing on this accelerator.
19820
19856
  */
19821
- steps: record(string(), DeviceStepConfigSchema).optional()
19857
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19858
+ /**
19859
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19860
+ * the reason the dispatcher drops it. Computed by the SAME
19861
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19862
+ * never disagree with the election — deriving it in the UI from
19863
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19864
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19865
+ * "an accelerator is serving" predicate).
19866
+ */
19867
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19822
19868
  });
19823
19869
  var NodeInferenceDevicesSchema = object({
19824
19870
  nodeId: string(),
@@ -20323,6 +20369,7 @@ DeviceType.Camera, method(object({
20323
20369
  isBattery: boolean(),
20324
20370
  reason: _enum([
20325
20371
  "disabled",
20372
+ "offline",
20326
20373
  "sleeping",
20327
20374
  "unreachable",
20328
20375
  "waking"
@@ -20368,9 +20415,17 @@ targets: array(object({
20368
20415
  sleeping: boolean(),
20369
20416
  /** Current device state rendered over the cached frame. State images
20370
20417
  * remain authoritative even when their photographic background is
20371
- * old; null means the link must carry a current camera frame. */
20418
+ * old; null means the link must carry a current camera frame.
20419
+ *
20420
+ * **This is the ONLY source a surface may derive an inactive tile
20421
+ * from.** A client that reads a device's `online`/`disabled` flags and
20422
+ * draws its own verdict will disagree with the pixels it is painting
20423
+ * — the frame comes from here, and so must the sentence over it
20424
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
20425
+ * state. */
20372
20426
  stateReason: _enum([
20373
20427
  "disabled",
20428
+ "offline",
20374
20429
  "sleeping",
20375
20430
  "unreachable",
20376
20431
  "waking"
@@ -24668,7 +24723,12 @@ var ListResultSchema = object({
24668
24723
  probedAt: number()
24669
24724
  });
24670
24725
  var PreferredSchema = LocalInterfaceSchema.nullable();
24671
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24726
+ /**
24727
+ * Candidate base URL for the SDK to race on connect. Order matters —
24728
+ * the SDK should attempt these top-to-bottom with a short per-candidate
24729
+ * timeout (e.g. 1500ms) and cache the winner for the session.
24730
+ */
24731
+ var ConnectionEndpointSchema = object({
24672
24732
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
24673
24733
  label: string(),
24674
24734
  /** Fully-formed base URL with scheme + host + port. */
@@ -24711,7 +24771,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24711
24771
  * ordering between polls.
24712
24772
  */
24713
24773
  priority: number()
24714
- })).readonly() });
24774
+ });
24775
+ /**
24776
+ * Where the advertised local port came from. Ordered most → least
24777
+ * authoritative, and the whole point of returning it: a client must be able to
24778
+ * tell a FACT about the hub's socket from an echo of its own guess.
24779
+ */
24780
+ var LocalPortSourceEnum = _enum([
24781
+ "server-config",
24782
+ "server-env",
24783
+ "caller-hint",
24784
+ "default"
24785
+ ]);
24786
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24787
+ var AdvertisedLocalPortSchema = object({
24788
+ port: number().int().min(1).max(65535),
24789
+ source: LocalPortSourceEnum
24790
+ });
24791
+ var GetConnectionEndpointsResultSchema = object({
24792
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24793
+ /**
24794
+ * The port the hub built the LAN/loopback URLs with, and where that number
24795
+ * came from.
24796
+ *
24797
+ * Returned rather than merely applied, because "the URL is right" and "the
24798
+ * client can KNOW the URL is right" are different properties. A client that
24799
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24800
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24801
+ * race the candidate or discard it. With `source` it can: anything but
24802
+ * `caller-hint` is the hub's own socket.
24803
+ *
24804
+ * Absent on hubs predating this field — a client that finds it missing is
24805
+ * talking to an echoing hub and must degrade exactly as it does for
24806
+ * `caller-hint`.
24807
+ */
24808
+ localPort: AdvertisedLocalPortSchema
24809
+ });
24715
24810
  /**
24716
24811
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24717
24812
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24732,8 +24827,13 @@ var AllowedAddressesSchema = object({
24732
24827
  */
24733
24828
  addresses: array(string()).readonly() });
24734
24829
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24735
- /** Local hub HTTP port to use in base URLs. */
24736
- port: number().int().min(1).max(65535),
24830
+ /**
24831
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24832
+ * written against the echoing contract keep working; the hub uses it
24833
+ * only when it cannot read its own port, and says so via
24834
+ * `localPort.source === 'caller-hint'`.
24835
+ */
24836
+ port: number().int().min(1).max(65535).optional(),
24737
24837
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24738
24838
  * candidate. Default `true`. */
24739
24839
  includeLoopback: boolean().optional(),
@@ -37921,7 +38021,6 @@ var NC_AUDIO_DEFAULTS = {
37921
38021
  hitPercent: 60,
37922
38022
  samplingSeconds: 10
37923
38023
  };
37924
- new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
37925
38024
  new Set(["devices", "classes"]);
37926
38025
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
37927
38026
  /**
@@ -38155,6 +38254,39 @@ TimelapseRuleInputSchema.extend({
38155
38254
  createdAt: number(),
38156
38255
  updatedAt: number()
38157
38256
  });
38257
+ Object.freeze(Object.fromEntries([{
38258
+ stepId: "face-embedding",
38259
+ label: "Face recognition model",
38260
+ defaultModelId: "arcface-r100",
38261
+ indexName: "the enrolled face gallery",
38262
+ options: [
38263
+ {
38264
+ id: "arcface-r100",
38265
+ label: "ArcFace (ResNet34)"
38266
+ },
38267
+ {
38268
+ id: "auraface-r100",
38269
+ label: "AuraFace R100"
38270
+ },
38271
+ {
38272
+ id: "inception-resnet-v1",
38273
+ label: "Inception ResNet V1"
38274
+ }
38275
+ ]
38276
+ }, {
38277
+ stepId: "clip-embedding",
38278
+ label: "Semantic search model",
38279
+ defaultModelId: "mobileclip-s1",
38280
+ indexName: "the object semantic-search index",
38281
+ options: [{
38282
+ id: "mobileclip-s1",
38283
+ label: "MobileCLIP S1"
38284
+ }, {
38285
+ id: "mobileclip-s2",
38286
+ label: "MobileCLIP S2"
38287
+ }]
38288
+ }].map((s) => [s.stepId, s.defaultModelId])));
38289
+ string().min(1);
38158
38290
  object({
38159
38291
  /**
38160
38292
  * Fraction of the box's own size added on EACH side before cutting.
@@ -38175,10 +38307,21 @@ object({
38175
38307
  */
38176
38308
  square: boolean()
38177
38309
  });
38178
- ({
38310
+ /**
38311
+ * The convention in force when nobody has configured one — byte-for-byte the
38312
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
38313
+ */
38314
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
38179
38315
  paddingRatio: .15,
38180
38316
  square: false
38181
- }).paddingRatio;
38317
+ };
38318
+ Object.freeze({
38319
+ x: 0,
38320
+ y: 0,
38321
+ w: 1,
38322
+ h: 1
38323
+ });
38324
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
38182
38325
  /**
38183
38326
  * WHICH delivered frames the decode worker retains a native copy of.
38184
38327
  *
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
@@ -19787,6 +19817,12 @@ var CameraStatusSchema = object({
19787
19817
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19788
19818
  fetchedAt: number()
19789
19819
  });
19820
+ var InferenceDeviceExclusionReasonSchema = _enum([
19821
+ "disabled",
19822
+ "unavailable",
19823
+ "cannot-host-camera-root",
19824
+ "accelerator-preferred"
19825
+ ]);
19790
19826
  var NodeInferenceDeviceSchema = object({
19791
19827
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19792
19828
  key: string(),
@@ -19817,7 +19853,17 @@ var NodeInferenceDeviceSchema = object({
19817
19853
  * available per format; this is the stored selection that becomes the
19818
19854
  * default for EVERY camera landing on this accelerator.
19819
19855
  */
19820
- steps: record(string(), DeviceStepConfigSchema).optional()
19856
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19857
+ /**
19858
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19859
+ * the reason the dispatcher drops it. Computed by the SAME
19860
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19861
+ * never disagree with the election — deriving it in the UI from
19862
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19863
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19864
+ * "an accelerator is serving" predicate).
19865
+ */
19866
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19821
19867
  });
19822
19868
  var NodeInferenceDevicesSchema = object({
19823
19869
  nodeId: string(),
@@ -20322,6 +20368,7 @@ DeviceType.Camera, method(object({
20322
20368
  isBattery: boolean(),
20323
20369
  reason: _enum([
20324
20370
  "disabled",
20371
+ "offline",
20325
20372
  "sleeping",
20326
20373
  "unreachable",
20327
20374
  "waking"
@@ -20367,9 +20414,17 @@ targets: array(object({
20367
20414
  sleeping: boolean(),
20368
20415
  /** Current device state rendered over the cached frame. State images
20369
20416
  * remain authoritative even when their photographic background is
20370
- * old; null means the link must carry a current camera frame. */
20417
+ * old; null means the link must carry a current camera frame.
20418
+ *
20419
+ * **This is the ONLY source a surface may derive an inactive tile
20420
+ * from.** A client that reads a device's `online`/`disabled` flags and
20421
+ * draws its own verdict will disagree with the pixels it is painting
20422
+ * — the frame comes from here, and so must the sentence over it
20423
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
20424
+ * state. */
20371
20425
  stateReason: _enum([
20372
20426
  "disabled",
20427
+ "offline",
20373
20428
  "sleeping",
20374
20429
  "unreachable",
20375
20430
  "waking"
@@ -24667,7 +24722,12 @@ var ListResultSchema = object({
24667
24722
  probedAt: number()
24668
24723
  });
24669
24724
  var PreferredSchema = LocalInterfaceSchema.nullable();
24670
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24725
+ /**
24726
+ * Candidate base URL for the SDK to race on connect. Order matters —
24727
+ * the SDK should attempt these top-to-bottom with a short per-candidate
24728
+ * timeout (e.g. 1500ms) and cache the winner for the session.
24729
+ */
24730
+ var ConnectionEndpointSchema = object({
24671
24731
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
24672
24732
  label: string(),
24673
24733
  /** Fully-formed base URL with scheme + host + port. */
@@ -24710,7 +24770,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24710
24770
  * ordering between polls.
24711
24771
  */
24712
24772
  priority: number()
24713
- })).readonly() });
24773
+ });
24774
+ /**
24775
+ * Where the advertised local port came from. Ordered most → least
24776
+ * authoritative, and the whole point of returning it: a client must be able to
24777
+ * tell a FACT about the hub's socket from an echo of its own guess.
24778
+ */
24779
+ var LocalPortSourceEnum = _enum([
24780
+ "server-config",
24781
+ "server-env",
24782
+ "caller-hint",
24783
+ "default"
24784
+ ]);
24785
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24786
+ var AdvertisedLocalPortSchema = object({
24787
+ port: number().int().min(1).max(65535),
24788
+ source: LocalPortSourceEnum
24789
+ });
24790
+ var GetConnectionEndpointsResultSchema = object({
24791
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24792
+ /**
24793
+ * The port the hub built the LAN/loopback URLs with, and where that number
24794
+ * came from.
24795
+ *
24796
+ * Returned rather than merely applied, because "the URL is right" and "the
24797
+ * client can KNOW the URL is right" are different properties. A client that
24798
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24799
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24800
+ * race the candidate or discard it. With `source` it can: anything but
24801
+ * `caller-hint` is the hub's own socket.
24802
+ *
24803
+ * Absent on hubs predating this field — a client that finds it missing is
24804
+ * talking to an echoing hub and must degrade exactly as it does for
24805
+ * `caller-hint`.
24806
+ */
24807
+ localPort: AdvertisedLocalPortSchema
24808
+ });
24714
24809
  /**
24715
24810
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24716
24811
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24731,8 +24826,13 @@ var AllowedAddressesSchema = object({
24731
24826
  */
24732
24827
  addresses: array(string()).readonly() });
24733
24828
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24734
- /** Local hub HTTP port to use in base URLs. */
24735
- port: number().int().min(1).max(65535),
24829
+ /**
24830
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24831
+ * written against the echoing contract keep working; the hub uses it
24832
+ * only when it cannot read its own port, and says so via
24833
+ * `localPort.source === 'caller-hint'`.
24834
+ */
24835
+ port: number().int().min(1).max(65535).optional(),
24736
24836
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24737
24837
  * candidate. Default `true`. */
24738
24838
  includeLoopback: boolean().optional(),
@@ -37920,7 +38020,6 @@ var NC_AUDIO_DEFAULTS = {
37920
38020
  hitPercent: 60,
37921
38021
  samplingSeconds: 10
37922
38022
  };
37923
- new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
37924
38023
  new Set(["devices", "classes"]);
37925
38024
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
37926
38025
  /**
@@ -38154,6 +38253,39 @@ TimelapseRuleInputSchema.extend({
38154
38253
  createdAt: number(),
38155
38254
  updatedAt: number()
38156
38255
  });
38256
+ Object.freeze(Object.fromEntries([{
38257
+ stepId: "face-embedding",
38258
+ label: "Face recognition model",
38259
+ defaultModelId: "arcface-r100",
38260
+ indexName: "the enrolled face gallery",
38261
+ options: [
38262
+ {
38263
+ id: "arcface-r100",
38264
+ label: "ArcFace (ResNet34)"
38265
+ },
38266
+ {
38267
+ id: "auraface-r100",
38268
+ label: "AuraFace R100"
38269
+ },
38270
+ {
38271
+ id: "inception-resnet-v1",
38272
+ label: "Inception ResNet V1"
38273
+ }
38274
+ ]
38275
+ }, {
38276
+ stepId: "clip-embedding",
38277
+ label: "Semantic search model",
38278
+ defaultModelId: "mobileclip-s1",
38279
+ indexName: "the object semantic-search index",
38280
+ options: [{
38281
+ id: "mobileclip-s1",
38282
+ label: "MobileCLIP S1"
38283
+ }, {
38284
+ id: "mobileclip-s2",
38285
+ label: "MobileCLIP S2"
38286
+ }]
38287
+ }].map((s) => [s.stepId, s.defaultModelId])));
38288
+ string().min(1);
38157
38289
  object({
38158
38290
  /**
38159
38291
  * Fraction of the box's own size added on EACH side before cutting.
@@ -38174,10 +38306,21 @@ object({
38174
38306
  */
38175
38307
  square: boolean()
38176
38308
  });
38177
- ({
38309
+ /**
38310
+ * The convention in force when nobody has configured one — byte-for-byte the
38311
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
38312
+ */
38313
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
38178
38314
  paddingRatio: .15,
38179
38315
  square: false
38180
- }).paddingRatio;
38316
+ };
38317
+ Object.freeze({
38318
+ x: 0,
38319
+ y: 0,
38320
+ w: 1,
38321
+ h: 1
38322
+ });
38323
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
38181
38324
  /**
38182
38325
  * WHICH delivered frames the decode worker retains a native copy of.
38183
38326
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-tuya",
3
- "version": "0.2.23",
3
+ "version": "0.2.25",
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",