@camstack/addon-import-alexa 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
@@ -7724,7 +7724,7 @@ var RecordingBandSchema = object({
7724
7724
  postBufferSec: number().min(0).optional()
7725
7725
  });
7726
7726
  ({
7727
- preBufferSec: 10,
7727
+ preBufferSec: 15,
7728
7728
  postBufferSec: 30
7729
7729
  }).postBufferSec * 1e3;
7730
7730
  /**
@@ -14012,128 +14012,103 @@ var COCO_TO_MACRO = {
14012
14012
  var AUDIO_MACRO_LABELS = [
14013
14013
  {
14014
14014
  id: "speech",
14015
- name: "Speech",
14016
- icon: "🗣️"
14015
+ name: "Speech"
14017
14016
  },
14018
14017
  {
14019
14018
  id: "scream",
14020
- name: "Scream / Shout",
14021
- icon: "😱"
14019
+ name: "Scream / Shout"
14022
14020
  },
14023
14021
  {
14024
14022
  id: "crying",
14025
- name: "Crying / Baby",
14026
- icon: "😢"
14023
+ name: "Crying / Baby"
14027
14024
  },
14028
14025
  {
14029
14026
  id: "laughter",
14030
- name: "Laughter",
14031
- icon: "😂"
14027
+ name: "Laughter"
14032
14028
  },
14033
14029
  {
14034
14030
  id: "music",
14035
- name: "Music",
14036
- icon: "🎵"
14031
+ name: "Music"
14037
14032
  },
14038
14033
  {
14039
14034
  id: "dog",
14040
- name: "Dog",
14041
- icon: "🐕"
14035
+ name: "Dog"
14042
14036
  },
14043
14037
  {
14044
14038
  id: "cat",
14045
- name: "Cat",
14046
- icon: "🐈"
14039
+ name: "Cat"
14047
14040
  },
14048
14041
  {
14049
14042
  id: "bird",
14050
- name: "Bird",
14051
- icon: "🐦"
14043
+ name: "Bird"
14052
14044
  },
14053
14045
  {
14054
14046
  id: "animal",
14055
- name: "Animal (other)",
14056
- icon: "🐾"
14047
+ name: "Animal (other)"
14057
14048
  },
14058
14049
  {
14059
14050
  id: "alarm",
14060
- name: "Alarm / Siren",
14061
- icon: "🚨"
14051
+ name: "Alarm / Siren"
14062
14052
  },
14063
14053
  {
14064
14054
  id: "doorbell",
14065
- name: "Doorbell / Knock",
14066
- icon: "🔔"
14055
+ name: "Doorbell / Knock"
14067
14056
  },
14068
14057
  {
14069
14058
  id: "glass_breaking",
14070
- name: "Glass Breaking",
14071
- icon: "💥"
14059
+ name: "Glass Breaking"
14072
14060
  },
14073
14061
  {
14074
14062
  id: "gunshot",
14075
- name: "Gunshot / Explosion",
14076
- icon: "💣"
14063
+ name: "Gunshot / Explosion"
14077
14064
  },
14078
14065
  {
14079
14066
  id: "vehicle",
14080
- name: "Vehicle",
14081
- icon: "🚗"
14067
+ name: "Vehicle"
14082
14068
  },
14083
14069
  {
14084
14070
  id: "siren",
14085
- name: "Emergency Siren",
14086
- icon: "🚑"
14071
+ name: "Emergency Siren"
14087
14072
  },
14088
14073
  {
14089
14074
  id: "fire",
14090
- name: "Fire / Smoke",
14091
- icon: "🔥"
14075
+ name: "Fire / Smoke"
14092
14076
  },
14093
14077
  {
14094
14078
  id: "water",
14095
- name: "Water",
14096
- icon: "💧"
14079
+ name: "Water"
14097
14080
  },
14098
14081
  {
14099
14082
  id: "wind",
14100
- name: "Wind / Weather",
14101
- icon: "🌬️"
14083
+ name: "Wind / Weather"
14102
14084
  },
14103
14085
  {
14104
14086
  id: "door",
14105
- name: "Door",
14106
- icon: "🚪"
14087
+ name: "Door"
14107
14088
  },
14108
14089
  {
14109
14090
  id: "footsteps",
14110
- name: "Footsteps",
14111
- icon: "👣"
14091
+ name: "Footsteps"
14112
14092
  },
14113
14093
  {
14114
14094
  id: "crowd",
14115
- name: "Crowd / Chatter",
14116
- icon: "👥"
14095
+ name: "Crowd / Chatter"
14117
14096
  },
14118
14097
  {
14119
14098
  id: "telephone",
14120
- name: "Telephone",
14121
- icon: "📞"
14099
+ name: "Telephone"
14122
14100
  },
14123
14101
  {
14124
14102
  id: "engine",
14125
- name: "Engine / Motor",
14126
- icon: "⚙️"
14103
+ name: "Engine / Motor"
14127
14104
  },
14128
14105
  {
14129
14106
  id: "tools",
14130
- name: "Tools / Construction",
14131
- icon: "🔨"
14107
+ name: "Tools / Construction"
14132
14108
  },
14133
14109
  {
14134
14110
  id: "silence",
14135
- name: "Silence",
14136
- icon: "🤫"
14111
+ name: "Silence"
14137
14112
  }
14138
14113
  ];
14139
14114
  var YAMNET_TO_MACRO = {
@@ -16635,7 +16610,7 @@ var TrackEnvelopeSchema = object({
16635
16610
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
16636
16611
  * keeps every scalar the list surfaces actually render (ids, class(es),
16637
16612
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
16638
- * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
16613
+ * zonesVisited, bestEventId, envelope, hasFace, hasEmbeddedFace, hasRider) and returns `positions` /
16639
16614
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
16640
16615
  * `getTrack`. Mirrors the event-store `projection` convention
16641
16616
  * (`getObjectEvents` et al.).
@@ -16930,6 +16905,35 @@ var TrackSchema = object({
16930
16905
  */
16931
16906
  hasFace: boolean().optional(),
16932
16907
  /**
16908
+ * This track has a face row IN THE GALLERY: a crop **and** an embedding — a
16909
+ * face an operator could ASSIGN to an identity.
16910
+ *
16911
+ * The STRICT twin of {@link hasFace}, and the pair only earns its keep
16912
+ * because the two disagree. `hasFace` is stamped at the TOP of the face
16913
+ * branch, before every gate, and means no more than "a face detector produced
16914
+ * a face detail". This one is stamped at the single moment the gallery row
16915
+ * LANDS — after `FaceRecognizer.onTrackEnd` successfully persists it, i.e.
16916
+ * past the embedding-magnitude verdict, the `minFacePx` detection gate, the
16917
+ * candidate gate, the imageless-track drop (no crop was ever captured) and
16918
+ * the crop-store drop. Everything between the detector and that insert can
16919
+ * legitimately refuse the face, so a flag written any earlier promises the
16920
+ * operator something to assign and delivers nothing.
16921
+ *
16922
+ * **Independent of recognition.** A face collected but never auto-matched is
16923
+ * still assignable — it is in fact the face an operator most wants to reach —
16924
+ * so this is NOT gated on `recognizedIdentityId`. Recognition lands in
16925
+ * `subLabel`; this says only that the raw material exists.
16926
+ *
16927
+ * **Set once, never cleared.** A track that produced a gallery row produced
16928
+ * one; deleting the row later is the gallery's business, not this flag's.
16929
+ *
16930
+ * **Absent ≠ false**, the same rule as {@link hasFace}: every row written
16931
+ * before the column omits it, and so does every server that predates the
16932
+ * field. A consumer must test `=== true` and render nothing otherwise —
16933
+ * never infer "no assignable face".
16934
+ */
16935
+ hasEmbeddedFace: boolean().optional(),
16936
+ /**
16933
16937
  * This subject CONTAINS a folded rider — a person the rider-pairing step
16934
16938
  * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16935
16939
  * so the passage is tracked once and as a VEHICLE.
@@ -18319,6 +18323,32 @@ var DetailResultSchema = object({
18319
18323
  /** FRAME-space bbox (already mapped back from crop space). */
18320
18324
  bbox: NativeCropBboxSchema.optional(),
18321
18325
  embedding: string().optional(),
18326
+ /**
18327
+ * L2 magnitude of the RAW pre-normalization embedding. Additive and optional
18328
+ * so an older runner that does not send it degrades to "unmeasurable", which
18329
+ * the consuming gate treats as accept — never as reject.
18330
+ */
18331
+ embeddingMagnitude: number().optional(),
18332
+ /**
18333
+ * Model that produced `embedding` — the SAME contract `labelModelId` has for
18334
+ * `label`, and for the same reason: the producing node is the only side that
18335
+ * knows which model actually ran, and re-deriving it downstream is exactly
18336
+ * the inference this model exists to forbid.
18337
+ *
18338
+ * Additive and optional, so a runner that predates it degrades to
18339
+ * "unmeasurable" rather than to a wrong answer — the consumer falls back to
18340
+ * its previous assumption instead of refusing.
18341
+ *
18342
+ * Its absence was not cosmetic. `FaceRecognizer` needs the probe's model id
18343
+ * to use `face-matcher`'s same-model gate (`sample.modelId !== probe.modelId`);
18344
+ * with nothing on the wire it took the id from the GALLERY, so the gate
18345
+ * compared the gallery against itself and could never fire. That turned the
18346
+ * one guard protecting the face feature space into a tautology, and it is
18347
+ * why swapping `face-embedding`'s model would NOT have stranded the enrolled
18348
+ * gallery as the catalog comment predicts — it would have scored the new
18349
+ * model's vectors against the old model's samples in one cosine space.
18350
+ */
18351
+ embeddingModelId: string().optional(),
18322
18352
  label: string().optional(),
18323
18353
  /**
18324
18354
  * The tier `label` occupies, copied VERBATIM from the producing step's
@@ -19194,6 +19224,12 @@ var CameraStatusSchema = object({
19194
19224
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19195
19225
  fetchedAt: number()
19196
19226
  });
19227
+ var InferenceDeviceExclusionReasonSchema = _enum([
19228
+ "disabled",
19229
+ "unavailable",
19230
+ "cannot-host-camera-root",
19231
+ "accelerator-preferred"
19232
+ ]);
19197
19233
  var NodeInferenceDeviceSchema = object({
19198
19234
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19199
19235
  key: string(),
@@ -19224,7 +19260,17 @@ var NodeInferenceDeviceSchema = object({
19224
19260
  * available per format; this is the stored selection that becomes the
19225
19261
  * default for EVERY camera landing on this accelerator.
19226
19262
  */
19227
- steps: record(string(), DeviceStepConfigSchema).optional()
19263
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19264
+ /**
19265
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19266
+ * the reason the dispatcher drops it. Computed by the SAME
19267
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19268
+ * never disagree with the election — deriving it in the UI from
19269
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19270
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19271
+ * "an accelerator is serving" predicate).
19272
+ */
19273
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19228
19274
  });
19229
19275
  var NodeInferenceDevicesSchema = object({
19230
19276
  nodeId: string(),
@@ -19729,6 +19775,7 @@ DeviceType.Camera, method(object({
19729
19775
  isBattery: boolean(),
19730
19776
  reason: _enum([
19731
19777
  "disabled",
19778
+ "offline",
19732
19779
  "sleeping",
19733
19780
  "unreachable",
19734
19781
  "waking"
@@ -19774,9 +19821,17 @@ targets: array(object({
19774
19821
  sleeping: boolean(),
19775
19822
  /** Current device state rendered over the cached frame. State images
19776
19823
  * remain authoritative even when their photographic background is
19777
- * old; null means the link must carry a current camera frame. */
19824
+ * old; null means the link must carry a current camera frame.
19825
+ *
19826
+ * **This is the ONLY source a surface may derive an inactive tile
19827
+ * from.** A client that reads a device's `online`/`disabled` flags and
19828
+ * draws its own verdict will disagree with the pixels it is painting
19829
+ * — the frame comes from here, and so must the sentence over it
19830
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
19831
+ * state. */
19778
19832
  stateReason: _enum([
19779
19833
  "disabled",
19834
+ "offline",
19780
19835
  "sleeping",
19781
19836
  "unreachable",
19782
19837
  "waking"
@@ -24083,7 +24138,12 @@ var ListResultSchema = object({
24083
24138
  probedAt: number()
24084
24139
  });
24085
24140
  var PreferredSchema = LocalInterfaceSchema.nullable();
24086
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24141
+ /**
24142
+ * Candidate base URL for the SDK to race on connect. Order matters —
24143
+ * the SDK should attempt these top-to-bottom with a short per-candidate
24144
+ * timeout (e.g. 1500ms) and cache the winner for the session.
24145
+ */
24146
+ var ConnectionEndpointSchema = object({
24087
24147
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
24088
24148
  label: string(),
24089
24149
  /** Fully-formed base URL with scheme + host + port. */
@@ -24126,7 +24186,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24126
24186
  * ordering between polls.
24127
24187
  */
24128
24188
  priority: number()
24129
- })).readonly() });
24189
+ });
24190
+ /**
24191
+ * Where the advertised local port came from. Ordered most → least
24192
+ * authoritative, and the whole point of returning it: a client must be able to
24193
+ * tell a FACT about the hub's socket from an echo of its own guess.
24194
+ */
24195
+ var LocalPortSourceEnum = _enum([
24196
+ "server-config",
24197
+ "server-env",
24198
+ "caller-hint",
24199
+ "default"
24200
+ ]);
24201
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24202
+ var AdvertisedLocalPortSchema = object({
24203
+ port: number().int().min(1).max(65535),
24204
+ source: LocalPortSourceEnum
24205
+ });
24206
+ var GetConnectionEndpointsResultSchema = object({
24207
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24208
+ /**
24209
+ * The port the hub built the LAN/loopback URLs with, and where that number
24210
+ * came from.
24211
+ *
24212
+ * Returned rather than merely applied, because "the URL is right" and "the
24213
+ * client can KNOW the URL is right" are different properties. A client that
24214
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24215
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24216
+ * race the candidate or discard it. With `source` it can: anything but
24217
+ * `caller-hint` is the hub's own socket.
24218
+ *
24219
+ * Absent on hubs predating this field — a client that finds it missing is
24220
+ * talking to an echoing hub and must degrade exactly as it does for
24221
+ * `caller-hint`.
24222
+ */
24223
+ localPort: AdvertisedLocalPortSchema
24224
+ });
24130
24225
  /**
24131
24226
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24132
24227
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24147,8 +24242,13 @@ var AllowedAddressesSchema = object({
24147
24242
  */
24148
24243
  addresses: array(string()).readonly() });
24149
24244
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24150
- /** Local hub HTTP port to use in base URLs. */
24151
- port: number().int().min(1).max(65535),
24245
+ /**
24246
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24247
+ * written against the echoing contract keep working; the hub uses it
24248
+ * only when it cannot read its own port, and says so via
24249
+ * `localPort.source === 'caller-hint'`.
24250
+ */
24251
+ port: number().int().min(1).max(65535).optional(),
24152
24252
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24153
24253
  * candidate. Default `true`. */
24154
24254
  includeLoopback: boolean().optional(),
@@ -37336,7 +37436,6 @@ var NC_AUDIO_DEFAULTS = {
37336
37436
  hitPercent: 60,
37337
37437
  samplingSeconds: 10
37338
37438
  };
37339
- new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
37340
37439
  new Set(["devices", "classes"]);
37341
37440
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
37342
37441
  /**
@@ -37570,6 +37669,39 @@ TimelapseRuleInputSchema.extend({
37570
37669
  createdAt: number(),
37571
37670
  updatedAt: number()
37572
37671
  });
37672
+ Object.freeze(Object.fromEntries([{
37673
+ stepId: "face-embedding",
37674
+ label: "Face recognition model",
37675
+ defaultModelId: "arcface-r100",
37676
+ indexName: "the enrolled face gallery",
37677
+ options: [
37678
+ {
37679
+ id: "arcface-r100",
37680
+ label: "ArcFace (ResNet34)"
37681
+ },
37682
+ {
37683
+ id: "auraface-r100",
37684
+ label: "AuraFace R100"
37685
+ },
37686
+ {
37687
+ id: "inception-resnet-v1",
37688
+ label: "Inception ResNet V1"
37689
+ }
37690
+ ]
37691
+ }, {
37692
+ stepId: "clip-embedding",
37693
+ label: "Semantic search model",
37694
+ defaultModelId: "mobileclip-s1",
37695
+ indexName: "the object semantic-search index",
37696
+ options: [{
37697
+ id: "mobileclip-s1",
37698
+ label: "MobileCLIP S1"
37699
+ }, {
37700
+ id: "mobileclip-s2",
37701
+ label: "MobileCLIP S2"
37702
+ }]
37703
+ }].map((s) => [s.stepId, s.defaultModelId])));
37704
+ string().min(1);
37573
37705
  object({
37574
37706
  /**
37575
37707
  * Fraction of the box's own size added on EACH side before cutting.
@@ -37590,10 +37722,21 @@ object({
37590
37722
  */
37591
37723
  square: boolean()
37592
37724
  });
37593
- ({
37725
+ /**
37726
+ * The convention in force when nobody has configured one — byte-for-byte the
37727
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
37728
+ */
37729
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
37594
37730
  paddingRatio: .15,
37595
37731
  square: false
37596
- }).paddingRatio;
37732
+ };
37733
+ Object.freeze({
37734
+ x: 0,
37735
+ y: 0,
37736
+ w: 1,
37737
+ h: 1
37738
+ });
37739
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
37597
37740
  /**
37598
37741
  * WHICH delivered frames the decode worker retains a native copy of.
37599
37742
  *
package/dist/addon.mjs CHANGED
@@ -7724,7 +7724,7 @@ var RecordingBandSchema = object({
7724
7724
  postBufferSec: number().min(0).optional()
7725
7725
  });
7726
7726
  ({
7727
- preBufferSec: 10,
7727
+ preBufferSec: 15,
7728
7728
  postBufferSec: 30
7729
7729
  }).postBufferSec * 1e3;
7730
7730
  /**
@@ -14012,128 +14012,103 @@ var COCO_TO_MACRO = {
14012
14012
  var AUDIO_MACRO_LABELS = [
14013
14013
  {
14014
14014
  id: "speech",
14015
- name: "Speech",
14016
- icon: "🗣️"
14015
+ name: "Speech"
14017
14016
  },
14018
14017
  {
14019
14018
  id: "scream",
14020
- name: "Scream / Shout",
14021
- icon: "😱"
14019
+ name: "Scream / Shout"
14022
14020
  },
14023
14021
  {
14024
14022
  id: "crying",
14025
- name: "Crying / Baby",
14026
- icon: "😢"
14023
+ name: "Crying / Baby"
14027
14024
  },
14028
14025
  {
14029
14026
  id: "laughter",
14030
- name: "Laughter",
14031
- icon: "😂"
14027
+ name: "Laughter"
14032
14028
  },
14033
14029
  {
14034
14030
  id: "music",
14035
- name: "Music",
14036
- icon: "🎵"
14031
+ name: "Music"
14037
14032
  },
14038
14033
  {
14039
14034
  id: "dog",
14040
- name: "Dog",
14041
- icon: "🐕"
14035
+ name: "Dog"
14042
14036
  },
14043
14037
  {
14044
14038
  id: "cat",
14045
- name: "Cat",
14046
- icon: "🐈"
14039
+ name: "Cat"
14047
14040
  },
14048
14041
  {
14049
14042
  id: "bird",
14050
- name: "Bird",
14051
- icon: "🐦"
14043
+ name: "Bird"
14052
14044
  },
14053
14045
  {
14054
14046
  id: "animal",
14055
- name: "Animal (other)",
14056
- icon: "🐾"
14047
+ name: "Animal (other)"
14057
14048
  },
14058
14049
  {
14059
14050
  id: "alarm",
14060
- name: "Alarm / Siren",
14061
- icon: "🚨"
14051
+ name: "Alarm / Siren"
14062
14052
  },
14063
14053
  {
14064
14054
  id: "doorbell",
14065
- name: "Doorbell / Knock",
14066
- icon: "🔔"
14055
+ name: "Doorbell / Knock"
14067
14056
  },
14068
14057
  {
14069
14058
  id: "glass_breaking",
14070
- name: "Glass Breaking",
14071
- icon: "💥"
14059
+ name: "Glass Breaking"
14072
14060
  },
14073
14061
  {
14074
14062
  id: "gunshot",
14075
- name: "Gunshot / Explosion",
14076
- icon: "💣"
14063
+ name: "Gunshot / Explosion"
14077
14064
  },
14078
14065
  {
14079
14066
  id: "vehicle",
14080
- name: "Vehicle",
14081
- icon: "🚗"
14067
+ name: "Vehicle"
14082
14068
  },
14083
14069
  {
14084
14070
  id: "siren",
14085
- name: "Emergency Siren",
14086
- icon: "🚑"
14071
+ name: "Emergency Siren"
14087
14072
  },
14088
14073
  {
14089
14074
  id: "fire",
14090
- name: "Fire / Smoke",
14091
- icon: "🔥"
14075
+ name: "Fire / Smoke"
14092
14076
  },
14093
14077
  {
14094
14078
  id: "water",
14095
- name: "Water",
14096
- icon: "💧"
14079
+ name: "Water"
14097
14080
  },
14098
14081
  {
14099
14082
  id: "wind",
14100
- name: "Wind / Weather",
14101
- icon: "🌬️"
14083
+ name: "Wind / Weather"
14102
14084
  },
14103
14085
  {
14104
14086
  id: "door",
14105
- name: "Door",
14106
- icon: "🚪"
14087
+ name: "Door"
14107
14088
  },
14108
14089
  {
14109
14090
  id: "footsteps",
14110
- name: "Footsteps",
14111
- icon: "👣"
14091
+ name: "Footsteps"
14112
14092
  },
14113
14093
  {
14114
14094
  id: "crowd",
14115
- name: "Crowd / Chatter",
14116
- icon: "👥"
14095
+ name: "Crowd / Chatter"
14117
14096
  },
14118
14097
  {
14119
14098
  id: "telephone",
14120
- name: "Telephone",
14121
- icon: "📞"
14099
+ name: "Telephone"
14122
14100
  },
14123
14101
  {
14124
14102
  id: "engine",
14125
- name: "Engine / Motor",
14126
- icon: "⚙️"
14103
+ name: "Engine / Motor"
14127
14104
  },
14128
14105
  {
14129
14106
  id: "tools",
14130
- name: "Tools / Construction",
14131
- icon: "🔨"
14107
+ name: "Tools / Construction"
14132
14108
  },
14133
14109
  {
14134
14110
  id: "silence",
14135
- name: "Silence",
14136
- icon: "🤫"
14111
+ name: "Silence"
14137
14112
  }
14138
14113
  ];
14139
14114
  var YAMNET_TO_MACRO = {
@@ -16635,7 +16610,7 @@ var TrackEnvelopeSchema = object({
16635
16610
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
16636
16611
  * keeps every scalar the list surfaces actually render (ids, class(es),
16637
16612
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
16638
- * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
16613
+ * zonesVisited, bestEventId, envelope, hasFace, hasEmbeddedFace, hasRider) and returns `positions` /
16639
16614
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
16640
16615
  * `getTrack`. Mirrors the event-store `projection` convention
16641
16616
  * (`getObjectEvents` et al.).
@@ -16930,6 +16905,35 @@ var TrackSchema = object({
16930
16905
  */
16931
16906
  hasFace: boolean().optional(),
16932
16907
  /**
16908
+ * This track has a face row IN THE GALLERY: a crop **and** an embedding — a
16909
+ * face an operator could ASSIGN to an identity.
16910
+ *
16911
+ * The STRICT twin of {@link hasFace}, and the pair only earns its keep
16912
+ * because the two disagree. `hasFace` is stamped at the TOP of the face
16913
+ * branch, before every gate, and means no more than "a face detector produced
16914
+ * a face detail". This one is stamped at the single moment the gallery row
16915
+ * LANDS — after `FaceRecognizer.onTrackEnd` successfully persists it, i.e.
16916
+ * past the embedding-magnitude verdict, the `minFacePx` detection gate, the
16917
+ * candidate gate, the imageless-track drop (no crop was ever captured) and
16918
+ * the crop-store drop. Everything between the detector and that insert can
16919
+ * legitimately refuse the face, so a flag written any earlier promises the
16920
+ * operator something to assign and delivers nothing.
16921
+ *
16922
+ * **Independent of recognition.** A face collected but never auto-matched is
16923
+ * still assignable — it is in fact the face an operator most wants to reach —
16924
+ * so this is NOT gated on `recognizedIdentityId`. Recognition lands in
16925
+ * `subLabel`; this says only that the raw material exists.
16926
+ *
16927
+ * **Set once, never cleared.** A track that produced a gallery row produced
16928
+ * one; deleting the row later is the gallery's business, not this flag's.
16929
+ *
16930
+ * **Absent ≠ false**, the same rule as {@link hasFace}: every row written
16931
+ * before the column omits it, and so does every server that predates the
16932
+ * field. A consumer must test `=== true` and render nothing otherwise —
16933
+ * never infer "no assignable face".
16934
+ */
16935
+ hasEmbeddedFace: boolean().optional(),
16936
+ /**
16933
16937
  * This subject CONTAINS a folded rider — a person the rider-pairing step
16934
16938
  * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16935
16939
  * so the passage is tracked once and as a VEHICLE.
@@ -18319,6 +18323,32 @@ var DetailResultSchema = object({
18319
18323
  /** FRAME-space bbox (already mapped back from crop space). */
18320
18324
  bbox: NativeCropBboxSchema.optional(),
18321
18325
  embedding: string().optional(),
18326
+ /**
18327
+ * L2 magnitude of the RAW pre-normalization embedding. Additive and optional
18328
+ * so an older runner that does not send it degrades to "unmeasurable", which
18329
+ * the consuming gate treats as accept — never as reject.
18330
+ */
18331
+ embeddingMagnitude: number().optional(),
18332
+ /**
18333
+ * Model that produced `embedding` — the SAME contract `labelModelId` has for
18334
+ * `label`, and for the same reason: the producing node is the only side that
18335
+ * knows which model actually ran, and re-deriving it downstream is exactly
18336
+ * the inference this model exists to forbid.
18337
+ *
18338
+ * Additive and optional, so a runner that predates it degrades to
18339
+ * "unmeasurable" rather than to a wrong answer — the consumer falls back to
18340
+ * its previous assumption instead of refusing.
18341
+ *
18342
+ * Its absence was not cosmetic. `FaceRecognizer` needs the probe's model id
18343
+ * to use `face-matcher`'s same-model gate (`sample.modelId !== probe.modelId`);
18344
+ * with nothing on the wire it took the id from the GALLERY, so the gate
18345
+ * compared the gallery against itself and could never fire. That turned the
18346
+ * one guard protecting the face feature space into a tautology, and it is
18347
+ * why swapping `face-embedding`'s model would NOT have stranded the enrolled
18348
+ * gallery as the catalog comment predicts — it would have scored the new
18349
+ * model's vectors against the old model's samples in one cosine space.
18350
+ */
18351
+ embeddingModelId: string().optional(),
18322
18352
  label: string().optional(),
18323
18353
  /**
18324
18354
  * The tier `label` occupies, copied VERBATIM from the producing step's
@@ -19194,6 +19224,12 @@ var CameraStatusSchema = object({
19194
19224
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19195
19225
  fetchedAt: number()
19196
19226
  });
19227
+ var InferenceDeviceExclusionReasonSchema = _enum([
19228
+ "disabled",
19229
+ "unavailable",
19230
+ "cannot-host-camera-root",
19231
+ "accelerator-preferred"
19232
+ ]);
19197
19233
  var NodeInferenceDeviceSchema = object({
19198
19234
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19199
19235
  key: string(),
@@ -19224,7 +19260,17 @@ var NodeInferenceDeviceSchema = object({
19224
19260
  * available per format; this is the stored selection that becomes the
19225
19261
  * default for EVERY camera landing on this accelerator.
19226
19262
  */
19227
- steps: record(string(), DeviceStepConfigSchema).optional()
19263
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19264
+ /**
19265
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19266
+ * the reason the dispatcher drops it. Computed by the SAME
19267
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19268
+ * never disagree with the election — deriving it in the UI from
19269
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19270
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19271
+ * "an accelerator is serving" predicate).
19272
+ */
19273
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19228
19274
  });
19229
19275
  var NodeInferenceDevicesSchema = object({
19230
19276
  nodeId: string(),
@@ -19729,6 +19775,7 @@ DeviceType.Camera, method(object({
19729
19775
  isBattery: boolean(),
19730
19776
  reason: _enum([
19731
19777
  "disabled",
19778
+ "offline",
19732
19779
  "sleeping",
19733
19780
  "unreachable",
19734
19781
  "waking"
@@ -19774,9 +19821,17 @@ targets: array(object({
19774
19821
  sleeping: boolean(),
19775
19822
  /** Current device state rendered over the cached frame. State images
19776
19823
  * remain authoritative even when their photographic background is
19777
- * old; null means the link must carry a current camera frame. */
19824
+ * old; null means the link must carry a current camera frame.
19825
+ *
19826
+ * **This is the ONLY source a surface may derive an inactive tile
19827
+ * from.** A client that reads a device's `online`/`disabled` flags and
19828
+ * draws its own verdict will disagree with the pixels it is painting
19829
+ * — the frame comes from here, and so must the sentence over it
19830
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
19831
+ * state. */
19778
19832
  stateReason: _enum([
19779
19833
  "disabled",
19834
+ "offline",
19780
19835
  "sleeping",
19781
19836
  "unreachable",
19782
19837
  "waking"
@@ -24083,7 +24138,12 @@ var ListResultSchema = object({
24083
24138
  probedAt: number()
24084
24139
  });
24085
24140
  var PreferredSchema = LocalInterfaceSchema.nullable();
24086
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24141
+ /**
24142
+ * Candidate base URL for the SDK to race on connect. Order matters —
24143
+ * the SDK should attempt these top-to-bottom with a short per-candidate
24144
+ * timeout (e.g. 1500ms) and cache the winner for the session.
24145
+ */
24146
+ var ConnectionEndpointSchema = object({
24087
24147
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
24088
24148
  label: string(),
24089
24149
  /** Fully-formed base URL with scheme + host + port. */
@@ -24126,7 +24186,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24126
24186
  * ordering between polls.
24127
24187
  */
24128
24188
  priority: number()
24129
- })).readonly() });
24189
+ });
24190
+ /**
24191
+ * Where the advertised local port came from. Ordered most → least
24192
+ * authoritative, and the whole point of returning it: a client must be able to
24193
+ * tell a FACT about the hub's socket from an echo of its own guess.
24194
+ */
24195
+ var LocalPortSourceEnum = _enum([
24196
+ "server-config",
24197
+ "server-env",
24198
+ "caller-hint",
24199
+ "default"
24200
+ ]);
24201
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24202
+ var AdvertisedLocalPortSchema = object({
24203
+ port: number().int().min(1).max(65535),
24204
+ source: LocalPortSourceEnum
24205
+ });
24206
+ var GetConnectionEndpointsResultSchema = object({
24207
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24208
+ /**
24209
+ * The port the hub built the LAN/loopback URLs with, and where that number
24210
+ * came from.
24211
+ *
24212
+ * Returned rather than merely applied, because "the URL is right" and "the
24213
+ * client can KNOW the URL is right" are different properties. A client that
24214
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24215
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24216
+ * race the candidate or discard it. With `source` it can: anything but
24217
+ * `caller-hint` is the hub's own socket.
24218
+ *
24219
+ * Absent on hubs predating this field — a client that finds it missing is
24220
+ * talking to an echoing hub and must degrade exactly as it does for
24221
+ * `caller-hint`.
24222
+ */
24223
+ localPort: AdvertisedLocalPortSchema
24224
+ });
24130
24225
  /**
24131
24226
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24132
24227
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24147,8 +24242,13 @@ var AllowedAddressesSchema = object({
24147
24242
  */
24148
24243
  addresses: array(string()).readonly() });
24149
24244
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24150
- /** Local hub HTTP port to use in base URLs. */
24151
- port: number().int().min(1).max(65535),
24245
+ /**
24246
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24247
+ * written against the echoing contract keep working; the hub uses it
24248
+ * only when it cannot read its own port, and says so via
24249
+ * `localPort.source === 'caller-hint'`.
24250
+ */
24251
+ port: number().int().min(1).max(65535).optional(),
24152
24252
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24153
24253
  * candidate. Default `true`. */
24154
24254
  includeLoopback: boolean().optional(),
@@ -37336,7 +37436,6 @@ var NC_AUDIO_DEFAULTS = {
37336
37436
  hitPercent: 60,
37337
37437
  samplingSeconds: 10
37338
37438
  };
37339
- new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
37340
37439
  new Set(["devices", "classes"]);
37341
37440
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
37342
37441
  /**
@@ -37570,6 +37669,39 @@ TimelapseRuleInputSchema.extend({
37570
37669
  createdAt: number(),
37571
37670
  updatedAt: number()
37572
37671
  });
37672
+ Object.freeze(Object.fromEntries([{
37673
+ stepId: "face-embedding",
37674
+ label: "Face recognition model",
37675
+ defaultModelId: "arcface-r100",
37676
+ indexName: "the enrolled face gallery",
37677
+ options: [
37678
+ {
37679
+ id: "arcface-r100",
37680
+ label: "ArcFace (ResNet34)"
37681
+ },
37682
+ {
37683
+ id: "auraface-r100",
37684
+ label: "AuraFace R100"
37685
+ },
37686
+ {
37687
+ id: "inception-resnet-v1",
37688
+ label: "Inception ResNet V1"
37689
+ }
37690
+ ]
37691
+ }, {
37692
+ stepId: "clip-embedding",
37693
+ label: "Semantic search model",
37694
+ defaultModelId: "mobileclip-s1",
37695
+ indexName: "the object semantic-search index",
37696
+ options: [{
37697
+ id: "mobileclip-s1",
37698
+ label: "MobileCLIP S1"
37699
+ }, {
37700
+ id: "mobileclip-s2",
37701
+ label: "MobileCLIP S2"
37702
+ }]
37703
+ }].map((s) => [s.stepId, s.defaultModelId])));
37704
+ string().min(1);
37573
37705
  object({
37574
37706
  /**
37575
37707
  * Fraction of the box's own size added on EACH side before cutting.
@@ -37590,10 +37722,21 @@ object({
37590
37722
  */
37591
37723
  square: boolean()
37592
37724
  });
37593
- ({
37725
+ /**
37726
+ * The convention in force when nobody has configured one — byte-for-byte the
37727
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
37728
+ */
37729
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
37594
37730
  paddingRatio: .15,
37595
37731
  square: false
37596
- }).paddingRatio;
37732
+ };
37733
+ Object.freeze({
37734
+ x: 0,
37735
+ y: 0,
37736
+ w: 1,
37737
+ h: 1
37738
+ });
37739
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
37597
37740
  /**
37598
37741
  * WHICH delivered frames the decode worker retains a native copy of.
37599
37742
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",