@camstack/addon-matter-broker 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 +204 -61
  2. package/dist/addon.mjs +204 -61
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -7580,7 +7580,7 @@ var RecordingBandSchema = object({
7580
7580
  postBufferSec: number().min(0).optional()
7581
7581
  });
7582
7582
  ({
7583
- preBufferSec: 10,
7583
+ preBufferSec: 15,
7584
7584
  postBufferSec: 30
7585
7585
  }).postBufferSec * 1e3;
7586
7586
  /**
@@ -13849,128 +13849,103 @@ var COCO_TO_MACRO = {
13849
13849
  var AUDIO_MACRO_LABELS = [
13850
13850
  {
13851
13851
  id: "speech",
13852
- name: "Speech",
13853
- icon: "🗣️"
13852
+ name: "Speech"
13854
13853
  },
13855
13854
  {
13856
13855
  id: "scream",
13857
- name: "Scream / Shout",
13858
- icon: "😱"
13856
+ name: "Scream / Shout"
13859
13857
  },
13860
13858
  {
13861
13859
  id: "crying",
13862
- name: "Crying / Baby",
13863
- icon: "😢"
13860
+ name: "Crying / Baby"
13864
13861
  },
13865
13862
  {
13866
13863
  id: "laughter",
13867
- name: "Laughter",
13868
- icon: "😂"
13864
+ name: "Laughter"
13869
13865
  },
13870
13866
  {
13871
13867
  id: "music",
13872
- name: "Music",
13873
- icon: "🎵"
13868
+ name: "Music"
13874
13869
  },
13875
13870
  {
13876
13871
  id: "dog",
13877
- name: "Dog",
13878
- icon: "🐕"
13872
+ name: "Dog"
13879
13873
  },
13880
13874
  {
13881
13875
  id: "cat",
13882
- name: "Cat",
13883
- icon: "🐈"
13876
+ name: "Cat"
13884
13877
  },
13885
13878
  {
13886
13879
  id: "bird",
13887
- name: "Bird",
13888
- icon: "🐦"
13880
+ name: "Bird"
13889
13881
  },
13890
13882
  {
13891
13883
  id: "animal",
13892
- name: "Animal (other)",
13893
- icon: "🐾"
13884
+ name: "Animal (other)"
13894
13885
  },
13895
13886
  {
13896
13887
  id: "alarm",
13897
- name: "Alarm / Siren",
13898
- icon: "🚨"
13888
+ name: "Alarm / Siren"
13899
13889
  },
13900
13890
  {
13901
13891
  id: "doorbell",
13902
- name: "Doorbell / Knock",
13903
- icon: "🔔"
13892
+ name: "Doorbell / Knock"
13904
13893
  },
13905
13894
  {
13906
13895
  id: "glass_breaking",
13907
- name: "Glass Breaking",
13908
- icon: "💥"
13896
+ name: "Glass Breaking"
13909
13897
  },
13910
13898
  {
13911
13899
  id: "gunshot",
13912
- name: "Gunshot / Explosion",
13913
- icon: "💣"
13900
+ name: "Gunshot / Explosion"
13914
13901
  },
13915
13902
  {
13916
13903
  id: "vehicle",
13917
- name: "Vehicle",
13918
- icon: "🚗"
13904
+ name: "Vehicle"
13919
13905
  },
13920
13906
  {
13921
13907
  id: "siren",
13922
- name: "Emergency Siren",
13923
- icon: "🚑"
13908
+ name: "Emergency Siren"
13924
13909
  },
13925
13910
  {
13926
13911
  id: "fire",
13927
- name: "Fire / Smoke",
13928
- icon: "🔥"
13912
+ name: "Fire / Smoke"
13929
13913
  },
13930
13914
  {
13931
13915
  id: "water",
13932
- name: "Water",
13933
- icon: "💧"
13916
+ name: "Water"
13934
13917
  },
13935
13918
  {
13936
13919
  id: "wind",
13937
- name: "Wind / Weather",
13938
- icon: "🌬️"
13920
+ name: "Wind / Weather"
13939
13921
  },
13940
13922
  {
13941
13923
  id: "door",
13942
- name: "Door",
13943
- icon: "🚪"
13924
+ name: "Door"
13944
13925
  },
13945
13926
  {
13946
13927
  id: "footsteps",
13947
- name: "Footsteps",
13948
- icon: "👣"
13928
+ name: "Footsteps"
13949
13929
  },
13950
13930
  {
13951
13931
  id: "crowd",
13952
- name: "Crowd / Chatter",
13953
- icon: "👥"
13932
+ name: "Crowd / Chatter"
13954
13933
  },
13955
13934
  {
13956
13935
  id: "telephone",
13957
- name: "Telephone",
13958
- icon: "📞"
13936
+ name: "Telephone"
13959
13937
  },
13960
13938
  {
13961
13939
  id: "engine",
13962
- name: "Engine / Motor",
13963
- icon: "⚙️"
13940
+ name: "Engine / Motor"
13964
13941
  },
13965
13942
  {
13966
13943
  id: "tools",
13967
- name: "Tools / Construction",
13968
- icon: "🔨"
13944
+ name: "Tools / Construction"
13969
13945
  },
13970
13946
  {
13971
13947
  id: "silence",
13972
- name: "Silence",
13973
- icon: "🤫"
13948
+ name: "Silence"
13974
13949
  }
13975
13950
  ];
13976
13951
  var YAMNET_TO_MACRO = {
@@ -16472,7 +16447,7 @@ var TrackEnvelopeSchema = object({
16472
16447
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
16473
16448
  * keeps every scalar the list surfaces actually render (ids, class(es),
16474
16449
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
16475
- * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
16450
+ * zonesVisited, bestEventId, envelope, hasFace, hasEmbeddedFace, hasRider) and returns `positions` /
16476
16451
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
16477
16452
  * `getTrack`. Mirrors the event-store `projection` convention
16478
16453
  * (`getObjectEvents` et al.).
@@ -16767,6 +16742,35 @@ var TrackSchema = object({
16767
16742
  */
16768
16743
  hasFace: boolean().optional(),
16769
16744
  /**
16745
+ * This track has a face row IN THE GALLERY: a crop **and** an embedding — a
16746
+ * face an operator could ASSIGN to an identity.
16747
+ *
16748
+ * The STRICT twin of {@link hasFace}, and the pair only earns its keep
16749
+ * because the two disagree. `hasFace` is stamped at the TOP of the face
16750
+ * branch, before every gate, and means no more than "a face detector produced
16751
+ * a face detail". This one is stamped at the single moment the gallery row
16752
+ * LANDS — after `FaceRecognizer.onTrackEnd` successfully persists it, i.e.
16753
+ * past the embedding-magnitude verdict, the `minFacePx` detection gate, the
16754
+ * candidate gate, the imageless-track drop (no crop was ever captured) and
16755
+ * the crop-store drop. Everything between the detector and that insert can
16756
+ * legitimately refuse the face, so a flag written any earlier promises the
16757
+ * operator something to assign and delivers nothing.
16758
+ *
16759
+ * **Independent of recognition.** A face collected but never auto-matched is
16760
+ * still assignable — it is in fact the face an operator most wants to reach —
16761
+ * so this is NOT gated on `recognizedIdentityId`. Recognition lands in
16762
+ * `subLabel`; this says only that the raw material exists.
16763
+ *
16764
+ * **Set once, never cleared.** A track that produced a gallery row produced
16765
+ * one; deleting the row later is the gallery's business, not this flag's.
16766
+ *
16767
+ * **Absent ≠ false**, the same rule as {@link hasFace}: every row written
16768
+ * before the column omits it, and so does every server that predates the
16769
+ * field. A consumer must test `=== true` and render nothing otherwise —
16770
+ * never infer "no assignable face".
16771
+ */
16772
+ hasEmbeddedFace: boolean().optional(),
16773
+ /**
16770
16774
  * This subject CONTAINS a folded rider — a person the rider-pairing step
16771
16775
  * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16772
16776
  * so the passage is tracked once and as a VEHICLE.
@@ -18156,6 +18160,32 @@ var DetailResultSchema = object({
18156
18160
  /** FRAME-space bbox (already mapped back from crop space). */
18157
18161
  bbox: NativeCropBboxSchema.optional(),
18158
18162
  embedding: string$2().optional(),
18163
+ /**
18164
+ * L2 magnitude of the RAW pre-normalization embedding. Additive and optional
18165
+ * so an older runner that does not send it degrades to "unmeasurable", which
18166
+ * the consuming gate treats as accept — never as reject.
18167
+ */
18168
+ embeddingMagnitude: number().optional(),
18169
+ /**
18170
+ * Model that produced `embedding` — the SAME contract `labelModelId` has for
18171
+ * `label`, and for the same reason: the producing node is the only side that
18172
+ * knows which model actually ran, and re-deriving it downstream is exactly
18173
+ * the inference this model exists to forbid.
18174
+ *
18175
+ * Additive and optional, so a runner that predates it degrades to
18176
+ * "unmeasurable" rather than to a wrong answer — the consumer falls back to
18177
+ * its previous assumption instead of refusing.
18178
+ *
18179
+ * Its absence was not cosmetic. `FaceRecognizer` needs the probe's model id
18180
+ * to use `face-matcher`'s same-model gate (`sample.modelId !== probe.modelId`);
18181
+ * with nothing on the wire it took the id from the GALLERY, so the gate
18182
+ * compared the gallery against itself and could never fire. That turned the
18183
+ * one guard protecting the face feature space into a tautology, and it is
18184
+ * why swapping `face-embedding`'s model would NOT have stranded the enrolled
18185
+ * gallery as the catalog comment predicts — it would have scored the new
18186
+ * model's vectors against the old model's samples in one cosine space.
18187
+ */
18188
+ embeddingModelId: string$2().optional(),
18159
18189
  label: string$2().optional(),
18160
18190
  /**
18161
18191
  * The tier `label` occupies, copied VERBATIM from the producing step's
@@ -19031,6 +19061,12 @@ var CameraStatusSchema = object({
19031
19061
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19032
19062
  fetchedAt: number()
19033
19063
  });
19064
+ var InferenceDeviceExclusionReasonSchema = _enum([
19065
+ "disabled",
19066
+ "unavailable",
19067
+ "cannot-host-camera-root",
19068
+ "accelerator-preferred"
19069
+ ]);
19034
19070
  var NodeInferenceDeviceSchema = object({
19035
19071
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19036
19072
  key: string$2(),
@@ -19061,7 +19097,17 @@ var NodeInferenceDeviceSchema = object({
19061
19097
  * available per format; this is the stored selection that becomes the
19062
19098
  * default for EVERY camera landing on this accelerator.
19063
19099
  */
19064
- steps: record(string$2(), DeviceStepConfigSchema).optional()
19100
+ steps: record(string$2(), DeviceStepConfigSchema).optional(),
19101
+ /**
19102
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19103
+ * the reason the dispatcher drops it. Computed by the SAME
19104
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19105
+ * never disagree with the election — deriving it in the UI from
19106
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19107
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19108
+ * "an accelerator is serving" predicate).
19109
+ */
19110
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19065
19111
  });
19066
19112
  var NodeInferenceDevicesSchema = object({
19067
19113
  nodeId: string$2(),
@@ -19566,6 +19612,7 @@ DeviceType.Camera, method(object({
19566
19612
  isBattery: boolean(),
19567
19613
  reason: _enum([
19568
19614
  "disabled",
19615
+ "offline",
19569
19616
  "sleeping",
19570
19617
  "unreachable",
19571
19618
  "waking"
@@ -19611,9 +19658,17 @@ targets: array(object({
19611
19658
  sleeping: boolean(),
19612
19659
  /** Current device state rendered over the cached frame. State images
19613
19660
  * remain authoritative even when their photographic background is
19614
- * old; null means the link must carry a current camera frame. */
19661
+ * old; null means the link must carry a current camera frame.
19662
+ *
19663
+ * **This is the ONLY source a surface may derive an inactive tile
19664
+ * from.** A client that reads a device's `online`/`disabled` flags and
19665
+ * draws its own verdict will disagree with the pixels it is painting
19666
+ * — the frame comes from here, and so must the sentence over it
19667
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
19668
+ * state. */
19615
19669
  stateReason: _enum([
19616
19670
  "disabled",
19671
+ "offline",
19617
19672
  "sleeping",
19618
19673
  "unreachable",
19619
19674
  "waking"
@@ -23920,7 +23975,12 @@ var ListResultSchema = object({
23920
23975
  probedAt: number()
23921
23976
  });
23922
23977
  var PreferredSchema = LocalInterfaceSchema.nullable();
23923
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23978
+ /**
23979
+ * Candidate base URL for the SDK to race on connect. Order matters —
23980
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23981
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23982
+ */
23983
+ var ConnectionEndpointSchema = object({
23924
23984
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23925
23985
  label: string$2(),
23926
23986
  /** Fully-formed base URL with scheme + host + port. */
@@ -23963,7 +24023,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23963
24023
  * ordering between polls.
23964
24024
  */
23965
24025
  priority: number()
23966
- })).readonly() });
24026
+ });
24027
+ /**
24028
+ * Where the advertised local port came from. Ordered most → least
24029
+ * authoritative, and the whole point of returning it: a client must be able to
24030
+ * tell a FACT about the hub's socket from an echo of its own guess.
24031
+ */
24032
+ var LocalPortSourceEnum = _enum([
24033
+ "server-config",
24034
+ "server-env",
24035
+ "caller-hint",
24036
+ "default"
24037
+ ]);
24038
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24039
+ var AdvertisedLocalPortSchema = object({
24040
+ port: number().int().min(1).max(65535),
24041
+ source: LocalPortSourceEnum
24042
+ });
24043
+ var GetConnectionEndpointsResultSchema = object({
24044
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24045
+ /**
24046
+ * The port the hub built the LAN/loopback URLs with, and where that number
24047
+ * came from.
24048
+ *
24049
+ * Returned rather than merely applied, because "the URL is right" and "the
24050
+ * client can KNOW the URL is right" are different properties. A client that
24051
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24052
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24053
+ * race the candidate or discard it. With `source` it can: anything but
24054
+ * `caller-hint` is the hub's own socket.
24055
+ *
24056
+ * Absent on hubs predating this field — a client that finds it missing is
24057
+ * talking to an echoing hub and must degrade exactly as it does for
24058
+ * `caller-hint`.
24059
+ */
24060
+ localPort: AdvertisedLocalPortSchema
24061
+ });
23967
24062
  /**
23968
24063
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23969
24064
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -23984,8 +24079,13 @@ var AllowedAddressesSchema = object({
23984
24079
  */
23985
24080
  addresses: array(string$2()).readonly() });
23986
24081
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
23987
- /** Local hub HTTP port to use in base URLs. */
23988
- port: number().int().min(1).max(65535),
24082
+ /**
24083
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24084
+ * written against the echoing contract keep working; the hub uses it
24085
+ * only when it cannot read its own port, and says so via
24086
+ * `localPort.source === 'caller-hint'`.
24087
+ */
24088
+ port: number().int().min(1).max(65535).optional(),
23989
24089
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
23990
24090
  * candidate. Default `true`. */
23991
24091
  includeLoopback: boolean().optional(),
@@ -37173,7 +37273,6 @@ var NC_AUDIO_DEFAULTS = {
37173
37273
  hitPercent: 60,
37174
37274
  samplingSeconds: 10
37175
37275
  };
37176
- new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
37177
37276
  new Set(["devices", "classes"]);
37178
37277
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
37179
37278
  /**
@@ -37407,6 +37506,39 @@ TimelapseRuleInputSchema.extend({
37407
37506
  createdAt: number(),
37408
37507
  updatedAt: number()
37409
37508
  });
37509
+ Object.freeze(Object.fromEntries([{
37510
+ stepId: "face-embedding",
37511
+ label: "Face recognition model",
37512
+ defaultModelId: "arcface-r100",
37513
+ indexName: "the enrolled face gallery",
37514
+ options: [
37515
+ {
37516
+ id: "arcface-r100",
37517
+ label: "ArcFace (ResNet34)"
37518
+ },
37519
+ {
37520
+ id: "auraface-r100",
37521
+ label: "AuraFace R100"
37522
+ },
37523
+ {
37524
+ id: "inception-resnet-v1",
37525
+ label: "Inception ResNet V1"
37526
+ }
37527
+ ]
37528
+ }, {
37529
+ stepId: "clip-embedding",
37530
+ label: "Semantic search model",
37531
+ defaultModelId: "mobileclip-s1",
37532
+ indexName: "the object semantic-search index",
37533
+ options: [{
37534
+ id: "mobileclip-s1",
37535
+ label: "MobileCLIP S1"
37536
+ }, {
37537
+ id: "mobileclip-s2",
37538
+ label: "MobileCLIP S2"
37539
+ }]
37540
+ }].map((s) => [s.stepId, s.defaultModelId])));
37541
+ string$2().min(1);
37410
37542
  object({
37411
37543
  /**
37412
37544
  * Fraction of the box's own size added on EACH side before cutting.
@@ -37427,10 +37559,21 @@ object({
37427
37559
  */
37428
37560
  square: boolean()
37429
37561
  });
37430
- ({
37562
+ /**
37563
+ * The convention in force when nobody has configured one — byte-for-byte the
37564
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
37565
+ */
37566
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
37431
37567
  paddingRatio: .15,
37432
37568
  square: false
37433
- }).paddingRatio;
37569
+ };
37570
+ Object.freeze({
37571
+ x: 0,
37572
+ y: 0,
37573
+ w: 1,
37574
+ h: 1
37575
+ });
37576
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
37434
37577
  /**
37435
37578
  * WHICH delivered frames the decode worker retains a native copy of.
37436
37579
  *
package/dist/addon.mjs CHANGED
@@ -7578,7 +7578,7 @@ var RecordingBandSchema = object({
7578
7578
  postBufferSec: number().min(0).optional()
7579
7579
  });
7580
7580
  ({
7581
- preBufferSec: 10,
7581
+ preBufferSec: 15,
7582
7582
  postBufferSec: 30
7583
7583
  }).postBufferSec * 1e3;
7584
7584
  /**
@@ -13847,128 +13847,103 @@ var COCO_TO_MACRO = {
13847
13847
  var AUDIO_MACRO_LABELS = [
13848
13848
  {
13849
13849
  id: "speech",
13850
- name: "Speech",
13851
- icon: "🗣️"
13850
+ name: "Speech"
13852
13851
  },
13853
13852
  {
13854
13853
  id: "scream",
13855
- name: "Scream / Shout",
13856
- icon: "😱"
13854
+ name: "Scream / Shout"
13857
13855
  },
13858
13856
  {
13859
13857
  id: "crying",
13860
- name: "Crying / Baby",
13861
- icon: "😢"
13858
+ name: "Crying / Baby"
13862
13859
  },
13863
13860
  {
13864
13861
  id: "laughter",
13865
- name: "Laughter",
13866
- icon: "😂"
13862
+ name: "Laughter"
13867
13863
  },
13868
13864
  {
13869
13865
  id: "music",
13870
- name: "Music",
13871
- icon: "🎵"
13866
+ name: "Music"
13872
13867
  },
13873
13868
  {
13874
13869
  id: "dog",
13875
- name: "Dog",
13876
- icon: "🐕"
13870
+ name: "Dog"
13877
13871
  },
13878
13872
  {
13879
13873
  id: "cat",
13880
- name: "Cat",
13881
- icon: "🐈"
13874
+ name: "Cat"
13882
13875
  },
13883
13876
  {
13884
13877
  id: "bird",
13885
- name: "Bird",
13886
- icon: "🐦"
13878
+ name: "Bird"
13887
13879
  },
13888
13880
  {
13889
13881
  id: "animal",
13890
- name: "Animal (other)",
13891
- icon: "🐾"
13882
+ name: "Animal (other)"
13892
13883
  },
13893
13884
  {
13894
13885
  id: "alarm",
13895
- name: "Alarm / Siren",
13896
- icon: "🚨"
13886
+ name: "Alarm / Siren"
13897
13887
  },
13898
13888
  {
13899
13889
  id: "doorbell",
13900
- name: "Doorbell / Knock",
13901
- icon: "🔔"
13890
+ name: "Doorbell / Knock"
13902
13891
  },
13903
13892
  {
13904
13893
  id: "glass_breaking",
13905
- name: "Glass Breaking",
13906
- icon: "💥"
13894
+ name: "Glass Breaking"
13907
13895
  },
13908
13896
  {
13909
13897
  id: "gunshot",
13910
- name: "Gunshot / Explosion",
13911
- icon: "💣"
13898
+ name: "Gunshot / Explosion"
13912
13899
  },
13913
13900
  {
13914
13901
  id: "vehicle",
13915
- name: "Vehicle",
13916
- icon: "🚗"
13902
+ name: "Vehicle"
13917
13903
  },
13918
13904
  {
13919
13905
  id: "siren",
13920
- name: "Emergency Siren",
13921
- icon: "🚑"
13906
+ name: "Emergency Siren"
13922
13907
  },
13923
13908
  {
13924
13909
  id: "fire",
13925
- name: "Fire / Smoke",
13926
- icon: "🔥"
13910
+ name: "Fire / Smoke"
13927
13911
  },
13928
13912
  {
13929
13913
  id: "water",
13930
- name: "Water",
13931
- icon: "💧"
13914
+ name: "Water"
13932
13915
  },
13933
13916
  {
13934
13917
  id: "wind",
13935
- name: "Wind / Weather",
13936
- icon: "🌬️"
13918
+ name: "Wind / Weather"
13937
13919
  },
13938
13920
  {
13939
13921
  id: "door",
13940
- name: "Door",
13941
- icon: "🚪"
13922
+ name: "Door"
13942
13923
  },
13943
13924
  {
13944
13925
  id: "footsteps",
13945
- name: "Footsteps",
13946
- icon: "👣"
13926
+ name: "Footsteps"
13947
13927
  },
13948
13928
  {
13949
13929
  id: "crowd",
13950
- name: "Crowd / Chatter",
13951
- icon: "👥"
13930
+ name: "Crowd / Chatter"
13952
13931
  },
13953
13932
  {
13954
13933
  id: "telephone",
13955
- name: "Telephone",
13956
- icon: "📞"
13934
+ name: "Telephone"
13957
13935
  },
13958
13936
  {
13959
13937
  id: "engine",
13960
- name: "Engine / Motor",
13961
- icon: "⚙️"
13938
+ name: "Engine / Motor"
13962
13939
  },
13963
13940
  {
13964
13941
  id: "tools",
13965
- name: "Tools / Construction",
13966
- icon: "🔨"
13942
+ name: "Tools / Construction"
13967
13943
  },
13968
13944
  {
13969
13945
  id: "silence",
13970
- name: "Silence",
13971
- icon: "🤫"
13946
+ name: "Silence"
13972
13947
  }
13973
13948
  ];
13974
13949
  var YAMNET_TO_MACRO = {
@@ -16470,7 +16445,7 @@ var TrackEnvelopeSchema = object({
16470
16445
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
16471
16446
  * keeps every scalar the list surfaces actually render (ids, class(es),
16472
16447
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
16473
- * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
16448
+ * zonesVisited, bestEventId, envelope, hasFace, hasEmbeddedFace, hasRider) and returns `positions` /
16474
16449
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
16475
16450
  * `getTrack`. Mirrors the event-store `projection` convention
16476
16451
  * (`getObjectEvents` et al.).
@@ -16765,6 +16740,35 @@ var TrackSchema = object({
16765
16740
  */
16766
16741
  hasFace: boolean().optional(),
16767
16742
  /**
16743
+ * This track has a face row IN THE GALLERY: a crop **and** an embedding — a
16744
+ * face an operator could ASSIGN to an identity.
16745
+ *
16746
+ * The STRICT twin of {@link hasFace}, and the pair only earns its keep
16747
+ * because the two disagree. `hasFace` is stamped at the TOP of the face
16748
+ * branch, before every gate, and means no more than "a face detector produced
16749
+ * a face detail". This one is stamped at the single moment the gallery row
16750
+ * LANDS — after `FaceRecognizer.onTrackEnd` successfully persists it, i.e.
16751
+ * past the embedding-magnitude verdict, the `minFacePx` detection gate, the
16752
+ * candidate gate, the imageless-track drop (no crop was ever captured) and
16753
+ * the crop-store drop. Everything between the detector and that insert can
16754
+ * legitimately refuse the face, so a flag written any earlier promises the
16755
+ * operator something to assign and delivers nothing.
16756
+ *
16757
+ * **Independent of recognition.** A face collected but never auto-matched is
16758
+ * still assignable — it is in fact the face an operator most wants to reach —
16759
+ * so this is NOT gated on `recognizedIdentityId`. Recognition lands in
16760
+ * `subLabel`; this says only that the raw material exists.
16761
+ *
16762
+ * **Set once, never cleared.** A track that produced a gallery row produced
16763
+ * one; deleting the row later is the gallery's business, not this flag's.
16764
+ *
16765
+ * **Absent ≠ false**, the same rule as {@link hasFace}: every row written
16766
+ * before the column omits it, and so does every server that predates the
16767
+ * field. A consumer must test `=== true` and render nothing otherwise —
16768
+ * never infer "no assignable face".
16769
+ */
16770
+ hasEmbeddedFace: boolean().optional(),
16771
+ /**
16768
16772
  * This subject CONTAINS a folded rider — a person the rider-pairing step
16769
16773
  * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16770
16774
  * so the passage is tracked once and as a VEHICLE.
@@ -18154,6 +18158,32 @@ var DetailResultSchema = object({
18154
18158
  /** FRAME-space bbox (already mapped back from crop space). */
18155
18159
  bbox: NativeCropBboxSchema.optional(),
18156
18160
  embedding: string$2().optional(),
18161
+ /**
18162
+ * L2 magnitude of the RAW pre-normalization embedding. Additive and optional
18163
+ * so an older runner that does not send it degrades to "unmeasurable", which
18164
+ * the consuming gate treats as accept — never as reject.
18165
+ */
18166
+ embeddingMagnitude: number().optional(),
18167
+ /**
18168
+ * Model that produced `embedding` — the SAME contract `labelModelId` has for
18169
+ * `label`, and for the same reason: the producing node is the only side that
18170
+ * knows which model actually ran, and re-deriving it downstream is exactly
18171
+ * the inference this model exists to forbid.
18172
+ *
18173
+ * Additive and optional, so a runner that predates it degrades to
18174
+ * "unmeasurable" rather than to a wrong answer — the consumer falls back to
18175
+ * its previous assumption instead of refusing.
18176
+ *
18177
+ * Its absence was not cosmetic. `FaceRecognizer` needs the probe's model id
18178
+ * to use `face-matcher`'s same-model gate (`sample.modelId !== probe.modelId`);
18179
+ * with nothing on the wire it took the id from the GALLERY, so the gate
18180
+ * compared the gallery against itself and could never fire. That turned the
18181
+ * one guard protecting the face feature space into a tautology, and it is
18182
+ * why swapping `face-embedding`'s model would NOT have stranded the enrolled
18183
+ * gallery as the catalog comment predicts — it would have scored the new
18184
+ * model's vectors against the old model's samples in one cosine space.
18185
+ */
18186
+ embeddingModelId: string$2().optional(),
18157
18187
  label: string$2().optional(),
18158
18188
  /**
18159
18189
  * The tier `label` occupies, copied VERBATIM from the producing step's
@@ -19029,6 +19059,12 @@ var CameraStatusSchema = object({
19029
19059
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19030
19060
  fetchedAt: number()
19031
19061
  });
19062
+ var InferenceDeviceExclusionReasonSchema = _enum([
19063
+ "disabled",
19064
+ "unavailable",
19065
+ "cannot-host-camera-root",
19066
+ "accelerator-preferred"
19067
+ ]);
19032
19068
  var NodeInferenceDeviceSchema = object({
19033
19069
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19034
19070
  key: string$2(),
@@ -19059,7 +19095,17 @@ var NodeInferenceDeviceSchema = object({
19059
19095
  * available per format; this is the stored selection that becomes the
19060
19096
  * default for EVERY camera landing on this accelerator.
19061
19097
  */
19062
- steps: record(string$2(), DeviceStepConfigSchema).optional()
19098
+ steps: record(string$2(), DeviceStepConfigSchema).optional(),
19099
+ /**
19100
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19101
+ * the reason the dispatcher drops it. Computed by the SAME
19102
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19103
+ * never disagree with the election — deriving it in the UI from
19104
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19105
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19106
+ * "an accelerator is serving" predicate).
19107
+ */
19108
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19063
19109
  });
19064
19110
  var NodeInferenceDevicesSchema = object({
19065
19111
  nodeId: string$2(),
@@ -19564,6 +19610,7 @@ DeviceType.Camera, method(object({
19564
19610
  isBattery: boolean(),
19565
19611
  reason: _enum([
19566
19612
  "disabled",
19613
+ "offline",
19567
19614
  "sleeping",
19568
19615
  "unreachable",
19569
19616
  "waking"
@@ -19609,9 +19656,17 @@ targets: array(object({
19609
19656
  sleeping: boolean(),
19610
19657
  /** Current device state rendered over the cached frame. State images
19611
19658
  * remain authoritative even when their photographic background is
19612
- * old; null means the link must carry a current camera frame. */
19659
+ * old; null means the link must carry a current camera frame.
19660
+ *
19661
+ * **This is the ONLY source a surface may derive an inactive tile
19662
+ * from.** A client that reads a device's `online`/`disabled` flags and
19663
+ * draws its own verdict will disagree with the pixels it is painting
19664
+ * — the frame comes from here, and so must the sentence over it
19665
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
19666
+ * state. */
19613
19667
  stateReason: _enum([
19614
19668
  "disabled",
19669
+ "offline",
19615
19670
  "sleeping",
19616
19671
  "unreachable",
19617
19672
  "waking"
@@ -23918,7 +23973,12 @@ var ListResultSchema = object({
23918
23973
  probedAt: number()
23919
23974
  });
23920
23975
  var PreferredSchema = LocalInterfaceSchema.nullable();
23921
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23976
+ /**
23977
+ * Candidate base URL for the SDK to race on connect. Order matters —
23978
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23979
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23980
+ */
23981
+ var ConnectionEndpointSchema = object({
23922
23982
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23923
23983
  label: string$2(),
23924
23984
  /** Fully-formed base URL with scheme + host + port. */
@@ -23961,7 +24021,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23961
24021
  * ordering between polls.
23962
24022
  */
23963
24023
  priority: number()
23964
- })).readonly() });
24024
+ });
24025
+ /**
24026
+ * Where the advertised local port came from. Ordered most → least
24027
+ * authoritative, and the whole point of returning it: a client must be able to
24028
+ * tell a FACT about the hub's socket from an echo of its own guess.
24029
+ */
24030
+ var LocalPortSourceEnum = _enum([
24031
+ "server-config",
24032
+ "server-env",
24033
+ "caller-hint",
24034
+ "default"
24035
+ ]);
24036
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24037
+ var AdvertisedLocalPortSchema = object({
24038
+ port: number().int().min(1).max(65535),
24039
+ source: LocalPortSourceEnum
24040
+ });
24041
+ var GetConnectionEndpointsResultSchema = object({
24042
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24043
+ /**
24044
+ * The port the hub built the LAN/loopback URLs with, and where that number
24045
+ * came from.
24046
+ *
24047
+ * Returned rather than merely applied, because "the URL is right" and "the
24048
+ * client can KNOW the URL is right" are different properties. A client that
24049
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24050
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24051
+ * race the candidate or discard it. With `source` it can: anything but
24052
+ * `caller-hint` is the hub's own socket.
24053
+ *
24054
+ * Absent on hubs predating this field — a client that finds it missing is
24055
+ * talking to an echoing hub and must degrade exactly as it does for
24056
+ * `caller-hint`.
24057
+ */
24058
+ localPort: AdvertisedLocalPortSchema
24059
+ });
23965
24060
  /**
23966
24061
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23967
24062
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -23982,8 +24077,13 @@ var AllowedAddressesSchema = object({
23982
24077
  */
23983
24078
  addresses: array(string$2()).readonly() });
23984
24079
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
23985
- /** Local hub HTTP port to use in base URLs. */
23986
- port: number().int().min(1).max(65535),
24080
+ /**
24081
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24082
+ * written against the echoing contract keep working; the hub uses it
24083
+ * only when it cannot read its own port, and says so via
24084
+ * `localPort.source === 'caller-hint'`.
24085
+ */
24086
+ port: number().int().min(1).max(65535).optional(),
23987
24087
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
23988
24088
  * candidate. Default `true`. */
23989
24089
  includeLoopback: boolean().optional(),
@@ -37171,7 +37271,6 @@ var NC_AUDIO_DEFAULTS = {
37171
37271
  hitPercent: 60,
37172
37272
  samplingSeconds: 10
37173
37273
  };
37174
- new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
37175
37274
  new Set(["devices", "classes"]);
37176
37275
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
37177
37276
  /**
@@ -37405,6 +37504,39 @@ TimelapseRuleInputSchema.extend({
37405
37504
  createdAt: number(),
37406
37505
  updatedAt: number()
37407
37506
  });
37507
+ Object.freeze(Object.fromEntries([{
37508
+ stepId: "face-embedding",
37509
+ label: "Face recognition model",
37510
+ defaultModelId: "arcface-r100",
37511
+ indexName: "the enrolled face gallery",
37512
+ options: [
37513
+ {
37514
+ id: "arcface-r100",
37515
+ label: "ArcFace (ResNet34)"
37516
+ },
37517
+ {
37518
+ id: "auraface-r100",
37519
+ label: "AuraFace R100"
37520
+ },
37521
+ {
37522
+ id: "inception-resnet-v1",
37523
+ label: "Inception ResNet V1"
37524
+ }
37525
+ ]
37526
+ }, {
37527
+ stepId: "clip-embedding",
37528
+ label: "Semantic search model",
37529
+ defaultModelId: "mobileclip-s1",
37530
+ indexName: "the object semantic-search index",
37531
+ options: [{
37532
+ id: "mobileclip-s1",
37533
+ label: "MobileCLIP S1"
37534
+ }, {
37535
+ id: "mobileclip-s2",
37536
+ label: "MobileCLIP S2"
37537
+ }]
37538
+ }].map((s) => [s.stepId, s.defaultModelId])));
37539
+ string$2().min(1);
37408
37540
  object({
37409
37541
  /**
37410
37542
  * Fraction of the box's own size added on EACH side before cutting.
@@ -37425,10 +37557,21 @@ object({
37425
37557
  */
37426
37558
  square: boolean()
37427
37559
  });
37428
- ({
37560
+ /**
37561
+ * The convention in force when nobody has configured one — byte-for-byte the
37562
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
37563
+ */
37564
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
37429
37565
  paddingRatio: .15,
37430
37566
  square: false
37431
- }).paddingRatio;
37567
+ };
37568
+ Object.freeze({
37569
+ x: 0,
37570
+ y: 0,
37571
+ w: 1,
37572
+ h: 1
37573
+ });
37574
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
37432
37575
  /**
37433
37576
  * WHICH delivered frames the decode worker retains a native copy of.
37434
37577
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-matter-broker",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",