@camstack/addon-admin-ui 1.2.272 → 1.2.273

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 (100) hide show
  1. package/dist/assets/{AddonCollectionPage-D6fy7dpj.js → AddonCollectionPage-DVL4s2wW.js} +1 -1
  2. package/dist/assets/Addons-Bjmcg6Ko.js +1 -0
  3. package/dist/assets/{AdminTabs-V9k1QuVP.js → AdminTabs-DoHLDbj8.js} +1 -1
  4. package/dist/assets/AiProfiles-DeXGxdhB.js +3 -0
  5. package/dist/assets/{BrokerForm-CYGBfbxr.js → BrokerForm-DyNcYVjX.js} +1 -1
  6. package/dist/assets/Build-ByJea4gF.js +32 -0
  7. package/dist/assets/{Capabilities-D1KT-ivA.js → Capabilities-CCi4bm-O.js} +1 -1
  8. package/dist/assets/{CapabilityBadges-DS8SoWoz.js → CapabilityBadges-U9XXfh-v.js} +1 -1
  9. package/dist/assets/Cluster-6TrgImec.js +11 -0
  10. package/dist/assets/Data-DjkaO5a8.js +1 -0
  11. package/dist/assets/DetectionIntelligence-B9tvX78Z.js +1 -0
  12. package/dist/assets/DeviceAggregateSection-B7bHHsDQ.js +1 -0
  13. package/dist/assets/DeviceDetail-DW-Zs7dn.js +2 -0
  14. package/dist/assets/{Devices-HDneMnHi.js → Devices-DXz4Urh9.js} +1 -1
  15. package/dist/assets/{EmbedPlayerPage-B_wGVEK0.js → EmbedPlayerPage-CwclWKKR.js} +1 -1
  16. package/dist/assets/Events-BaIjuRgN.js +1 -0
  17. package/dist/assets/{FormBuilder-BXtojpHF.js → FormBuilder-zMABGJw7.js} +1 -1
  18. package/dist/assets/Identity-UFZtitwV.js +1 -0
  19. package/dist/assets/IntegrationDetail-CHpYDfdf.js +1 -0
  20. package/dist/assets/Integrations-DhHdsrg0.js +1 -0
  21. package/dist/assets/Integrations-DsePn_Cr.js +1 -0
  22. package/dist/assets/Locations-cniiDmaE.js +2 -0
  23. package/dist/assets/{Logs-BYTo71Yt.js → Logs-BheueelF.js} +1 -1
  24. package/dist/assets/{MotionZonesSettings-DDf16JDF.js → MotionZonesSettings-C-MEagV3.js} +1 -1
  25. package/dist/assets/{MyAccess-BbWITi4N.js → MyAccess-t_0lAy1j.js} +1 -1
  26. package/dist/assets/Network-DxQ27oxa.js +1 -0
  27. package/dist/assets/{NodeAddonsSettingsPanel-UySNHnGf.js → NodeAddonsSettingsPanel-DoIcVsDa.js} +1 -1
  28. package/dist/assets/{NodeInferenceDevices-B3VEAQWr.js → NodeInferenceDevices-DZWh4ghO.js} +1 -1
  29. package/dist/assets/Notifications-CCz7U1U5.js +1 -0
  30. package/dist/assets/Pipeline-BFX6jpez.js +1 -0
  31. package/dist/assets/Plates-B_iJXzYG.js +1 -0
  32. package/dist/assets/{PrivacyMaskSettings-C0HZcbXR.js → PrivacyMaskSettings-BroViObl.js} +1 -1
  33. package/dist/assets/{ProviderIcon-DXK0cuQe.js → ProviderIcon-PqhuuddF.js} +1 -1
  34. package/dist/assets/Recordings-BRClsNbY.js +1 -0
  35. package/dist/assets/{ScanNetworkModal-B3CQ1S3f.js → ScanNetworkModal-COiSX-GG.js} +1 -1
  36. package/dist/assets/{SceneMonitorEditor-BN7kLz08.js → SceneMonitorEditor-9cRzwxeR.js} +1 -1
  37. package/dist/assets/{Scenes-Dbko4G3U.js → Scenes-DfWhDDQp.js} +1 -1
  38. package/dist/assets/{Settings-eB6bRRQ2.js → Settings-Doc69JPq.js} +1 -1
  39. package/dist/assets/{Showroom-D7VNR9sm.js → Showroom-DKFaN6U4.js} +1 -1
  40. package/dist/assets/{StorageLocationsPanel-CfOU5MKV.js → StorageLocationsPanel-DafeBPeS.js} +1 -1
  41. package/dist/assets/{Terminal-DJ13Ptlg.js → Terminal-BIrWD_Jq.js} +3 -3
  42. package/dist/assets/{Viewer-DSNI0gBQ.js → Viewer-D0u46Vzi.js} +1 -1
  43. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CHnD_XCi.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-Bg_sv9Yy.js} +1 -1
  44. package/dist/assets/{archive-CfPc3zmd.js → archive-ByT1JpAz.js} +1 -1
  45. package/dist/assets/{authed-media-D0FYWdWm.js → authed-media-B4fHh3OP.js} +1 -1
  46. package/dist/assets/{boxes-Bziwj8sB.js → boxes-BK7opMw8.js} +1 -1
  47. package/dist/assets/circle-slash-f-RB-a4W.js +1 -0
  48. package/dist/assets/{debounced-invalidate-Bpjoo47a.js → debounced-invalidate-DmTBefP5.js} +1 -1
  49. package/dist/assets/{dist-CnCHhuKr.js → dist-Ia2qJKt8.js} +1 -1
  50. package/dist/assets/dist-ZOYLar6T.js +349 -0
  51. package/dist/assets/{face-bbox-CTW2Ql-L.js → face-bbox-l5zwSQ2B.js} +1 -1
  52. package/dist/assets/{hard-drive-download-D69_02_z.js → hard-drive-download-B63cgpRp.js} +1 -1
  53. package/dist/assets/{hostInit-Duev9E28.js → hostInit-BJo5NO15.js} +1 -1
  54. package/dist/assets/index-DG1fRQck.js +4 -0
  55. package/dist/assets/{layers-dj0W-5PD.js → layers-BO4xJ50D.js} +1 -1
  56. package/dist/assets/{location-owned-usage-Dd31wc7R.js → location-owned-usage-BNkOpZvo.js} +1 -1
  57. package/dist/assets/{mf-entry-bootstrap-0-f2ee65db.js → mf-entry-bootstrap-0-9dd52881.js} +2 -2
  58. package/dist/assets/{player-overlays-BCwjKg6p.js → player-overlays-DBpE_gxX.js} +1 -1
  59. package/dist/assets/remoteEntry-DXZfRwQs.js +1 -0
  60. package/dist/assets/{send-DI8RyAAG.js → send-K-6By08c.js} +1 -1
  61. package/dist/assets/{settings-2-pQ157vcG.js → settings-2-CL-7fhNd.js} +1 -1
  62. package/dist/assets/{square-check-big-CluVAeV_.js → square-check-big-CzkYc7lR.js} +1 -1
  63. package/dist/assets/src-9BHg7XNr.js +67 -0
  64. package/dist/assets/src-Df_6Q4fQ.js +349 -0
  65. package/dist/assets/{use-scenes-feed-Do31SA2K.js → use-scenes-feed-Hb7yxDm8.js} +1 -1
  66. package/dist/assets/{use-stationary-objects-DqcSiA8T.js → use-stationary-objects-CMpKcmYv.js} +1 -1
  67. package/dist/assets/useEventInvalidation-Dmnh5PQZ.js +1 -0
  68. package/dist/assets/{useNodeUrlSelection-BsR42Cfa.js → useNodeUrlSelection-DCo_-iFX.js} +1 -1
  69. package/dist/assets/user-round-A1b0P43l.js +1 -0
  70. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CwUNfWUA.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-Nq5Atcu1.js} +2 -2
  71. package/dist/index.html +5 -5
  72. package/dist/server/addon.js +641 -125
  73. package/package.json +1 -1
  74. package/dist/assets/Addons-BsQHKMWG.js +0 -1
  75. package/dist/assets/AiProfiles-DiPkD_fk.js +0 -3
  76. package/dist/assets/Build-CBeEDpy5.js +0 -32
  77. package/dist/assets/Cluster-gJW9vP03.js +0 -11
  78. package/dist/assets/Data-Bh0bzESu.js +0 -1
  79. package/dist/assets/DetectionIntelligence-Cv2fg-SI.js +0 -1
  80. package/dist/assets/DeviceAggregateSection-DHALwPAJ.js +0 -1
  81. package/dist/assets/DeviceDetail-Cj4upIZ8.js +0 -2
  82. package/dist/assets/Events-BPXFJIla.js +0 -1
  83. package/dist/assets/Identity-_IPjFsQw.js +0 -1
  84. package/dist/assets/IntegrationDetail-DIY7Jywc.js +0 -1
  85. package/dist/assets/Integrations-DXOrcEGt.js +0 -1
  86. package/dist/assets/Integrations-mJpIsz9F.js +0 -1
  87. package/dist/assets/Locations-wB0U93K4.js +0 -2
  88. package/dist/assets/Network-30R4cY39.js +0 -1
  89. package/dist/assets/Notifications-C1yukm6c.js +0 -1
  90. package/dist/assets/Pipeline-DXl1Hzdu.js +0 -1
  91. package/dist/assets/Plates-BIhVH_IZ.js +0 -1
  92. package/dist/assets/Recordings-CfpOjuow.js +0 -1
  93. package/dist/assets/circle-slash-DNDn3yid.js +0 -1
  94. package/dist/assets/dist-CRVdBpiI.js +0 -349
  95. package/dist/assets/index-BjhxGD-m.js +0 -4
  96. package/dist/assets/remoteEntry-DUHRclu_.js +0 -1
  97. package/dist/assets/src-BI1z_AYO.js +0 -67
  98. package/dist/assets/src-D2MUU060.js +0 -349
  99. package/dist/assets/useEventInvalidation-GeG-PeIJ.js +0 -1
  100. package/dist/assets/user-round-DG8UupM9.js +0 -1
@@ -5361,7 +5361,7 @@ var ZodIssueCode = {
5361
5361
  var ZodFirstPartyTypeKind;
5362
5362
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5363
5363
  //#endregion
5364
- //#region ../types/dist/sleep-BaRu0bS5.mjs
5364
+ //#region ../types/dist/sleep-BXv0ZcRa.mjs
5365
5365
  /**
5366
5366
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5367
5367
  * window to float samples (D455).
@@ -6146,6 +6146,40 @@ var BaseAddon = class {
6146
6146
  const node = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
6147
6147
  return keys.size > 0 ? projectStore(raw, keys, node) : raw;
6148
6148
  }
6149
+ /**
6150
+ * Whether ONE global key of this addon's store was written, read three-way
6151
+ * (D651). For a question a hydrated view cannot answer: `getGlobalSettings`
6152
+ * reports `value ?? default`, so "the operator chose the default" and "nobody
6153
+ * chose" look the same, and a failed read looks like both. A `perNode` key is
6154
+ * not supported here: its stored name is scoped.
6155
+ */
6156
+ async readStoredGlobalKey(key) {
6157
+ const read = this._ctx?.settings?.readAddonStoreResult;
6158
+ if (read === void 0) return {
6159
+ kind: "unreadable",
6160
+ reason: "three-way-read-unavailable"
6161
+ };
6162
+ let result;
6163
+ try {
6164
+ result = await read.call(this._ctx?.settings);
6165
+ } catch (err) {
6166
+ return {
6167
+ kind: "unreadable",
6168
+ reason: "store-read-failed",
6169
+ error: err instanceof Error ? err.message : String(err)
6170
+ };
6171
+ }
6172
+ if (result.kind === "failed") return {
6173
+ kind: "unreadable",
6174
+ reason: "store-read-failed",
6175
+ error: result.error
6176
+ };
6177
+ if (result.kind === "missing" || !Object.prototype.hasOwnProperty.call(result.value, key)) return { kind: "absent" };
6178
+ return {
6179
+ kind: "present",
6180
+ value: result.value[key]
6181
+ };
6182
+ }
6149
6183
  async updateGlobalSettings(patch, nodeId) {
6150
6184
  const keys = this.perNodeKeys();
6151
6185
  const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
@@ -9406,6 +9440,43 @@ var LogChannelWindowSchema = object({
9406
9440
  /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9407
9441
  deviceIds: array(number().int()).readonly().nullable()
9408
9442
  });
9443
+ var ClipModelMetaSchema = object({
9444
+ /** The paired text encoder's catalog id (the embedding-encoder's text catalog). */
9445
+ textModelId: string().min(1),
9446
+ /** Output dimension of BOTH towers. A vector of any other length is refused. */
9447
+ embeddingDim: number().int().positive(),
9448
+ /**
9449
+ * The `vector-store` index this model's vectors live in. ONE feature space
9450
+ * per index: two models share an index only when their vectors are ranked
9451
+ * against each other, which for CLIP means never across families. MobileCLIP
9452
+ * S1 and S2 share `object-clip` for history (separated by the row's
9453
+ * `modelId`); any other model gets its own.
9454
+ */
9455
+ vectorIndex: string().regex(/^object-clip(-[a-z0-9][a-z0-9-]*)?$/),
9456
+ /**
9457
+ * The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
9458
+ * must be unique per tokenizer: every model's siblings land in ONE flat
9459
+ * models directory, so two different tokenizers under the same name would
9460
+ * silently overwrite each other (whichever model downloaded last wins, and
9461
+ * the other one tokenises with the wrong vocabulary).
9462
+ */
9463
+ tokenizerFile: string().min(1),
9464
+ /** Token window the text graph takes (SigLIP2: 64; CLIP BPE: 77). */
9465
+ contextLength: number().int().positive(),
9466
+ /** Id the tokenizer pads with. */
9467
+ padId: number().int().nonnegative(),
9468
+ /**
9469
+ * The search cosine floor at `strictness: 'loose'` — calibrated per model,
9470
+ * because cosine bands are a property of the model: 0.2 keeps 96% of matched
9471
+ * COCO caption-image pairs on MobileCLIP S1 and 2.7% on SigLIP2.
9472
+ */
9473
+ searchMinScore: number().min(0).max(1)
9474
+ });
9475
+ var ClipSearchStrictnessSchema = _enum([
9476
+ "loose",
9477
+ "balanced",
9478
+ "strict"
9479
+ ]);
9409
9480
  var MODEL_FORMATS = [
9410
9481
  "onnx",
9411
9482
  "coreml",
@@ -9609,7 +9680,14 @@ var ModelCatalogEntrySchema = object({
9609
9680
  * applies (Frigate / COCO public catalog). Set on a custom model whose raw
9610
9681
  * labels already ARE the CamStack macros (Scrypted identity map).
9611
9682
  */
9612
- classMap: DetectionCatalogClassMapSchema.optional()
9683
+ classMap: DetectionCatalogClassMapSchema.optional(),
9684
+ /**
9685
+ * The model's CLIP feature-space contract (text encoder, dimension, vector
9686
+ * index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
9687
+ * CLIP image encoder; its absence is what "not a CLIP model" means to the
9688
+ * embedding encoder and the semantic-search store (D649).
9689
+ */
9690
+ clip: ClipModelMetaSchema.optional()
9613
9691
  });
9614
9692
  var ConvertTargetSchema = discriminatedUnion("format", [object({
9615
9693
  format: literal("openvino"),
@@ -13827,6 +13905,13 @@ var LinkedDeviceSchema = object({
13827
13905
  features: array(string()),
13828
13906
  producesTrackedEvents: boolean().optional()
13829
13907
  });
13908
+ /**
13909
+ * The `linked-devices` extension slot's editable value (D648): the operator's
13910
+ * pick list, exactly what `_linkedDeviceIds` persists. Tree children are NOT
13911
+ * in it — they are always linked and are not a pick.
13912
+ */
13913
+ var LinkedDevicesSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
13914
+ DeviceType.Camera;
13830
13915
  /** One camera's resolved linked set, tagged with the camera it belongs to.
13831
13916
  * The batch answer needs the tag; the single-device answer already has it
13832
13917
  * from the input, which is why `getLinkedDevices` keeps the untagged shape. */
@@ -14352,16 +14437,101 @@ var EmbeddingResultSchema = object({
14352
14437
  embedding: array(number()),
14353
14438
  inferenceMs: number()
14354
14439
  });
14440
+ /** The two CLIP towers the encoder runs; a crash budget is kept per tower. */
14441
+ var EmbeddingTowerSchema = _enum(["image", "text"]);
14442
+ /**
14443
+ * A tower in the terminal `failed` state (D649, D6): it crashed or failed to
14444
+ * load `crashes` times within `windowMs`, and is refused by name until an
14445
+ * operator `resetFailedModels` or a model change — never on a timer.
14446
+ *
14447
+ * `nodeId` is the node whose tower failed. The state lives in THAT node's
14448
+ * encoder process (in memory — a runner respawn clears it), and one node's
14449
+ * answer says nothing about another's.
14450
+ */
14451
+ var EmbeddingFailedModelSchema = object({
14452
+ modelId: string(),
14453
+ tower: EmbeddingTowerSchema,
14454
+ nodeId: string(),
14455
+ crashes: number(),
14456
+ windowMs: number(),
14457
+ sinceMs: number(),
14458
+ lastReason: string()
14459
+ });
14460
+ /**
14461
+ * A model whose REQUIREMENTS can never be met on this node (D649 round 5):
14462
+ * an id the catalog does not know, a model URL answering 404/410, a declared
14463
+ * sibling (the tokenizer) that is not there. After `attempts` failed builds
14464
+ * it is terminally `requirements-failed`, refused by name until an operator
14465
+ * `resetFailedModels` or a model change — the same exits as a crashed tower.
14466
+ */
14467
+ var EmbeddingFailedRequirementSchema = object({
14468
+ modelId: string(),
14469
+ tower: EmbeddingTowerSchema,
14470
+ nodeId: string(),
14471
+ attempts: number(),
14472
+ sinceMs: number(),
14473
+ lastReason: string()
14474
+ });
14355
14475
  var EmbeddingInfoSchema = object({
14356
14476
  modelId: string(),
14357
14477
  embeddingDim: number(),
14358
- ready: boolean()
14359
- });
14478
+ ready: boolean(),
14479
+ /**
14480
+ * The node that answered. Absent only from an encoder older than D649's
14481
+ * crash budget — whose `failedModels` is then UNKNOWN (D315), never "none".
14482
+ */
14483
+ nodeId: string().optional(),
14484
+ /**
14485
+ * Towers in `failed` on the answering node, each row naming it. `undefined`
14486
+ * means the node could not say (pre-budget encoder); a node that has the
14487
+ * budget always answers an array, empty included.
14488
+ */
14489
+ failedModels: array(EmbeddingFailedModelSchema).optional(),
14490
+ /** Models terminally `requirements-failed` on the answering node; same reading as above. */
14491
+ failedRequirements: array(EmbeddingFailedRequirementSchema).optional()
14492
+ });
14493
+ /**
14494
+ * The THREE codes an encoder refusal can carry (D649, D6). Same shape as
14495
+ * `VECTOR_INDEX_DIM_CONFLICT`: the code rides in the MESSAGE, because an
14496
+ * Error's own properties do not survive the UDS/tRPC hop and its message does,
14497
+ * and both sides go through the helpers below — the encoder builds the
14498
+ * refusal, the live detail plane classifies on it to count refusals per
14499
+ * camera instead of logging one warning per track. The bracketed token
14500
+ * carries the code, the model, the tower and the node so a consumer never
14501
+ * parses prose.
14502
+ *
14503
+ * - `EMBEDDING_MODEL_FAILED`: the tower crashed / failed to load past the crash
14504
+ * budget — terminal until `resetFailedModels` or a model change.
14505
+ * - `EMBEDDING_REQUIREMENTS_UNAVAILABLE`: files or runtime not there right now
14506
+ * (a download or Python that failed, or the cooldown after one) — the next
14507
+ * request past the cooldown tries again.
14508
+ * - `EMBEDDING_REQUIREMENTS_FAILED`: the requirements can never be met (unknown
14509
+ * id, 404/410, missing sibling) and the bounded attempts are spent —
14510
+ * terminal, same exits as a crashed tower.
14511
+ */
14512
+ var EMBEDDING_MODEL_FAILED = "embedding-model-failed";
14513
+ var EMBEDDING_REQUIREMENTS_UNAVAILABLE = "embedding-requirements-unavailable";
14514
+ var EMBEDDING_REQUIREMENTS_FAILED = "embedding-requirements-failed";
14515
+ _enum([
14516
+ EMBEDDING_MODEL_FAILED,
14517
+ EMBEDDING_REQUIREMENTS_UNAVAILABLE,
14518
+ EMBEDDING_REQUIREMENTS_FAILED
14519
+ ]);
14520
+ new RegExp(`\\[(${EMBEDDING_MODEL_FAILED}|${EMBEDDING_REQUIREMENTS_UNAVAILABLE}|${EMBEDDING_REQUIREMENTS_FAILED}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);
14360
14521
  method(object({
14361
14522
  crop: _instanceof(Uint8Array),
14362
14523
  width: number(),
14363
14524
  height: number()
14364
- }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
14525
+ }), EmbeddingResultSchema, { auth: "admin" }), method(object({
14526
+ text: string(),
14527
+ modelId: string().min(1).optional()
14528
+ }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" }), method(object({ modelId: string().min(1).optional() }), object({
14529
+ cleared: array(string()),
14530
+ nodeId: string()
14531
+ }), {
14532
+ kind: "mutation",
14533
+ auth: "admin"
14534
+ });
14365
14535
  /**
14366
14536
  * `failure-contribution` — the capability an addon reports its OWN losses
14367
14537
  * through, per camera, with the denominator attached. It stores nothing.
@@ -17767,7 +17937,12 @@ var NcMediaPolicySchema = object({
17767
17937
  * the degrade engine, which drops the video and keeps the still.
17768
17938
  */
17769
17939
  clip: boolean().optional(),
17770
- /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
17940
+ /**
17941
+ * Seconds of footage BEFORE / AFTER the event instant. Absent =
17942
+ * {@link NC_CLIP_PRE_ROLL_DEFAULT_SEC} / {@link NC_CLIP_POST_ROLL_DEFAULT_SEC}
17943
+ * (4 / 6), resolved by the Notification Center at dispatch — deliberately not
17944
+ * a Zod default, so a rule that never chose keeps following the hub's.
17945
+ */
17771
17946
  clipPreRollSec: number().int().min(0).max(30).optional(),
17772
17947
  clipPostRollSec: number().int().min(0).max(30).optional(),
17773
17948
  /**
@@ -19145,6 +19320,130 @@ var OauthIntegrationDescriptorSchema = object({
19145
19320
  });
19146
19321
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
19147
19322
  /**
19323
+ * A model choice has a SCOPE, and a scope change has a workflow.
19324
+ *
19325
+ * ## The two scopes
19326
+ *
19327
+ * Almost every pipeline step's model is a **node** question: which build runs
19328
+ * fastest on THIS accelerator. Two nodes may legitimately answer differently —
19329
+ * a Coral runs the tflite SSD, a Mac runs the coreml YOLO — because the answers
19330
+ * are compared against nothing. They produce boxes, and a box is a box.
19331
+ *
19332
+ * Two steps are not like that. `face-embedding` and `clip-embedding` produce
19333
+ * **vectors that land in ONE shared index** (`identity_samples`,
19334
+ * `vec_object_clip`) and are ranked against each other by cosine similarity.
19335
+ * Cosine similarity between two encoders is not a weak signal, it is a
19336
+ * meaningless number — and nothing inside a vector can tell you it happened.
19337
+ * So for those two steps the model is a **cluster** question with exactly one
19338
+ * answer, stored in exactly one row.
19339
+ *
19340
+ * That is the same argument [D52](../../../../docs/decisions/adr-0052.md) makes
19341
+ * for the crop convention (`detail-crop.ts`), one level up: the crop decides
19342
+ * WHAT pixels the encoder sees, this decides WHICH encoder sees them. Both are
19343
+ * cluster-wide for the same reason and neither may become per-node.
19344
+ *
19345
+ * ## Why the registry lives here and not in the step catalog
19346
+ *
19347
+ * The scope itself is declared on the step, in
19348
+ * `detection-pipeline/registry/step-definitions.ts` (`StepDefinition.modelScope`)
19349
+ * — that is where a new step declares what kind of choice its model is. But the
19350
+ * catalog lives inside `addon-pipeline`, and three packages that must NOT
19351
+ * import an addon need to know the set: the orchestrator (which renders and
19352
+ * stores the row), post-analysis (which pins the row for a re-embed pass) and
19353
+ * admin-ui (which mirrors it). So the set is mirrored here, and
19354
+ * `scripts/check-cluster-model-scope.ts` fails the build when the two disagree.
19355
+ * A hand-copied key that stops matching is exactly how a setting silently stops
19356
+ * arriving while both sides still look correct.
19357
+ *
19358
+ * ## The defaults ARE today's behaviour
19359
+ *
19360
+ * {@link DEFAULT_CLUSTER_STEP_MODELS} reproduces the catalog `defaultModelId`
19361
+ * of both steps. Declaring the scope therefore changes nothing on the day it
19362
+ * ships: the cluster row starts out saying what every node was already doing.
19363
+ * Changing it is legitimate — that is what the knob is for — but it invalidates
19364
+ * the stored vectors of that surface, and must be followed by a re-embed pass
19365
+ * (`face-reembed-pass.ts`, `embedding-rebuild.ts`).
19366
+ */
19367
+ /**
19368
+ * Why the orchestrator cannot say which model the operator chose for a
19369
+ * cluster-scoped step (D651).
19370
+ */
19371
+ var CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS = [
19372
+ "owner-not-ready",
19373
+ "store-read-failed",
19374
+ "three-way-read-unavailable",
19375
+ "invalid-stored",
19376
+ "not-cluster-scoped"
19377
+ ];
19378
+ Object.freeze(Object.fromEntries([{
19379
+ stepId: "face-embedding",
19380
+ label: "Face recognition model",
19381
+ defaultModelId: "auraface-r100",
19382
+ indexName: "the enrolled face gallery",
19383
+ options: [
19384
+ {
19385
+ id: "auraface-r100",
19386
+ label: "AuraFace R100"
19387
+ },
19388
+ {
19389
+ id: "arcface-r100",
19390
+ label: "ArcFace (ResNet34)"
19391
+ },
19392
+ {
19393
+ id: "inception-resnet-v1",
19394
+ label: "Inception ResNet V1"
19395
+ }
19396
+ ]
19397
+ }, {
19398
+ stepId: "clip-embedding",
19399
+ label: "Semantic search model",
19400
+ defaultModelId: "mobileclip-s1",
19401
+ indexName: "the object semantic-search index",
19402
+ options: [
19403
+ {
19404
+ id: "mobileclip-s1",
19405
+ label: "MobileCLIP S1"
19406
+ },
19407
+ {
19408
+ id: "mobileclip-s2",
19409
+ label: "MobileCLIP S2"
19410
+ },
19411
+ {
19412
+ id: "siglip2-b16-224",
19413
+ label: "SigLIP2 B/16 (Apache-2.0)"
19414
+ }
19415
+ ]
19416
+ }].map((s) => [s.stepId, s.defaultModelId])));
19417
+ var CLUSTER_STEP_SETTING_FIELDS = [{
19418
+ stepId: "face-embedding",
19419
+ key: "minLandmarkFaceSize",
19420
+ label: "Min face size for recognition (detection px)",
19421
+ description: "Refuse to embed a face smaller than this IN THE DETECTION FRAME. Applies to every node — the enrolled gallery is one index, and two admission floors would fill it from two policies. 0 disables the gate.",
19422
+ type: "slider",
19423
+ min: 0,
19424
+ max: 64,
19425
+ step: 2,
19426
+ default: 24
19427
+ }];
19428
+ function clusterStepSettingKey(stepId, fieldKey) {
19429
+ return `clusterStepSetting:${stepId}:${fieldKey}`;
19430
+ }
19431
+ var ClusterSettingNumberSchema = number().finite();
19432
+ function readClusterStepSettings(config) {
19433
+ const out = {};
19434
+ for (const field of CLUSTER_STEP_SETTING_FIELDS) {
19435
+ const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
19436
+ const value = parsed.success ? parsed.data : field.default;
19437
+ const existing = out[field.stepId] ?? {};
19438
+ out[field.stepId] = {
19439
+ ...existing,
19440
+ [field.key]: value
19441
+ };
19442
+ }
19443
+ return out;
19444
+ }
19445
+ readClusterStepSettings({});
19446
+ /**
19148
19447
  * pipeline-analytics — device-scoped wrapper cap. Refines raw
19149
19448
  * per-frame detections emitted by the pipeline runner into tracked
19150
19449
  * objects, per-kind event collections (motion / object / audio), and
@@ -19960,7 +20259,8 @@ var MediaFileKindEnum = _enum([
19960
20259
  "thumbnailSmall",
19961
20260
  "confirmationCrop",
19962
20261
  "debugCrop",
19963
- "sceneFrame"
20262
+ "sceneFrame",
20263
+ "lastSceneFrame"
19964
20264
  ]);
19965
20265
  /**
19966
20266
  * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
@@ -20512,7 +20812,23 @@ var SearchObjectEventsInput = object({
20512
20812
  until: number().optional(),
20513
20813
  classFilter: string().optional(),
20514
20814
  limit: number().default(50),
20515
- minScore: number().min(0).max(1).default(.2)
20815
+ /**
20816
+ * An ABSOLUTE cosine floor. Optional since D649: a floor is a property of the
20817
+ * model (0.2 kept 96% of matched pairs on MobileCLIP S1 and 2.7% on SigLIP2),
20818
+ * so an absent one resolves to the searched model's own `searchMinScore`
20819
+ * scaled by `strictness`. A number sent here is honoured verbatim.
20820
+ */
20821
+ minScore: number().min(0).max(1).optional(),
20822
+ /** Model-relative floor — see `resolveClipSearchMinScore`. Default `loose`. */
20823
+ strictness: ClipSearchStrictnessSchema.optional(),
20824
+ /**
20825
+ * Search THIS CLIP model's index instead of the cluster row's. Every index a
20826
+ * model ever wrote stays searchable until it is wiped (the MobileCLIP index
20827
+ * through a SigLIP2 cutover and its rollback window). An id with no CLIP
20828
+ * metadata is refused; an id other than the cluster row's is ADMIN-only
20829
+ * (`model-override-requires-admin`).
20830
+ */
20831
+ modelId: string().min(1).optional()
20516
20832
  });
20517
20833
  var TrackCascadeCountsSchema = object({
20518
20834
  /** Persisted track roots deleted (authoritative). */
@@ -20647,7 +20963,41 @@ var RebuildObjectEmbeddingsInput = object({
20647
20963
  * comparable, so wiping and rebuilding is the only way to be sure every vector
20648
20964
  * means the same thing.
20649
20965
  */
20650
- var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
20966
+ var WipeObjectEmbeddingsResultSchema = object({
20967
+ deleted: number(),
20968
+ /**
20969
+ * CLIP indexes that could NOT be emptied (unreachable, or refused at their
20970
+ * dimension) — not a clean slate. Additive and optional (D649).
20971
+ */
20972
+ failedIndexes: array(string()).optional()
20973
+ });
20974
+ /**
20975
+ * Why a rebuild did not start, BY NAME — ONE vocabulary for both gates in front
20976
+ * of a pass (D649 over D651). A bare `started: false` read the same for "the
20977
+ * stores are booting" and "the cluster row names a model with no CLIP
20978
+ * metadata", which need different fixes.
20979
+ * - `stores-unavailable` — the analytics stores or the API are not up yet.
20980
+ * - the owner's confirmation of the cluster model (D651, `ClusterPinConfirmer`):
20981
+ * a pass that rewrites an index needs two agreeing reads of the OWNER's
20982
+ * answer (`pipelineOrchestrator.getClusterModelChoice`) — a pass that cannot
20983
+ * name its model does not run (D54):
20984
+ * - the owner's own `unreadable` reasons (`owner-not-ready`,
20985
+ * `store-read-failed`, `three-way-read-unavailable`, `invalid-stored`,
20986
+ * `not-cluster-scoped`);
20987
+ * - `method-unavailable` — the orchestrator predates the method;
20988
+ * - `read-failed` — the call failed or answered something unparseable;
20989
+ * - `reads-disagree` — the two reads named different choices.
20990
+ * - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
20991
+ * index to fill and no dimension to check against (D649).
20992
+ */
20993
+ var RebuildObjectEmbeddingsRefusalSchema = _enum([
20994
+ "stores-unavailable",
20995
+ ...CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS,
20996
+ "method-unavailable",
20997
+ "read-failed",
20998
+ "reads-disagree",
20999
+ "not-a-clip-model"
21000
+ ]);
20651
21001
  /**
20652
21002
  * Acknowledgement that a rebuild STARTED.
20653
21003
  *
@@ -20660,7 +21010,12 @@ var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
20660
21010
  var RebuildObjectEmbeddingsResultSchema = object({
20661
21011
  started: boolean(),
20662
21012
  /** True when a pass was already running; the new request is ignored. */
20663
- alreadyRunning: boolean()
21013
+ alreadyRunning: boolean(),
21014
+ /** Present when the pass refused to start — see `RebuildObjectEmbeddingsRefusalSchema`. */
21015
+ refusal: RebuildObjectEmbeddingsRefusalSchema.optional(),
21016
+ /** The CLIP model the pass pinned, and the index it fills (when it started). */
21017
+ modelId: string().optional(),
21018
+ index: string().optional()
20664
21019
  });
20665
21020
  var RebuildStatusSchema = object({
20666
21021
  running: boolean(),
@@ -20694,7 +21049,11 @@ var RebuildStatusSchema = object({
20694
21049
  startedAtMs: number().nullable(),
20695
21050
  finishedAtMs: number().nullable(),
20696
21051
  /** Present when the pass ended by throwing. */
20697
- error: string().nullable()
21052
+ error: string().nullable(),
21053
+ /** The CLIP model the current / last pass pinned (D54), `null` before any. */
21054
+ modelId: string().nullable(),
21055
+ /** The index that pass fills — `ClipModelMeta.vectorIndex` of `modelId` (D649). */
21056
+ index: string().nullable()
20698
21057
  });
20699
21058
  /**
20700
21059
  * Acknowledgement that a debug-media reclaim STARTED.
@@ -21015,7 +21374,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21015
21374
  deviceId: number(),
21016
21375
  ownerKind: MediaPresenceOwnerKindSchema,
21017
21376
  ownerIds: array(string()).max(5e3)
21018
- }), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
21377
+ }), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly(), { caller: "required" }), method(object({}), WipeObjectEmbeddingsResultSchema, {
21019
21378
  kind: "mutation",
21020
21379
  auth: "admin"
21021
21380
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -22050,6 +22409,17 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
22050
22409
  hubHostnameOverride: string().optional()
22051
22410
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
22052
22411
  /**
22412
+ * What ONE step runs with on ONE roster device for THIS camera (D650): the
22413
+ * device's per-(node,device) base with the camera's override for that device
22414
+ * on top — the same `override ?? base` merge the orchestrator applies to the
22415
+ * elected device (`applyDeviceProvisioning`). Absent `modelId` ⇒ the executor
22416
+ * resolves the device format's default, exactly as on the elected device.
22417
+ */
22418
+ var RunnerJumpStepProvisioningSchema = object({
22419
+ modelId: string().optional(),
22420
+ settings: record(string(), unknown()).optional()
22421
+ });
22422
+ /**
22053
22423
  * One ENABLED inference device on the runner's node, as the step-tree
22054
22424
  * device-jump resolver sees it (phase 1). The orchestrator populates this
22055
22425
  * roster on the attach payload whenever the camera is elected onto a specific
@@ -22061,7 +22431,16 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
22061
22431
  var RunnerInferenceDeviceSchema = object({
22062
22432
  deviceKey: string(),
22063
22433
  weight: number().positive().default(1),
22064
- maxSessions: number().int().positive().nullable().default(null)
22434
+ maxSessions: number().int().positive().nullable().default(null),
22435
+ /**
22436
+ * Per-step provisioning for this camera on THIS device (D650), keyed by step
22437
+ * id. A step the runner jumps here runs with these fields, never with the
22438
+ * elected device's: `modelId` / `settings` are REPLACED on the jumped subtree
22439
+ * (a step absent from the map runs with neither — the target format default).
22440
+ * Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
22441
+ * the elected device's provisioning, as before.
22442
+ */
22443
+ steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
22065
22444
  });
22066
22445
  /**
22067
22446
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
@@ -22936,6 +23315,28 @@ var NodeInferenceDeviceSchema = object({
22936
23315
  */
22937
23316
  exclusion: InferenceDeviceExclusionReasonSchema.nullable()
22938
23317
  });
23318
+ /**
23319
+ * The operator's model choice for one cluster-scoped step, answered by the
23320
+ * addon that OWNS the `clusterModel:*` settings (D651). Three answers, never
23321
+ * folded: a written choice, a key nobody wrote (the cluster runs the default
23322
+ * BY ABSENCE), or no answer. A caller that rewrites an index acts only on the
23323
+ * first two, read twice and agreeing.
23324
+ */
23325
+ var ClusterModelChoiceSchema = discriminatedUnion("kind", [
23326
+ object({
23327
+ kind: literal("stored"),
23328
+ modelId: string()
23329
+ }),
23330
+ object({
23331
+ kind: literal("absent"),
23332
+ defaultModelId: string()
23333
+ }),
23334
+ object({
23335
+ kind: literal("unreadable"),
23336
+ reason: _enum(CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS),
23337
+ error: string().optional()
23338
+ })
23339
+ ]);
22939
23340
  var NodeInferenceDevicesSchema = object({
22940
23341
  nodeId: string(),
22941
23342
  /** False when the node's platform-probe was unreachable (no live device set). */
@@ -22963,10 +23364,17 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
22963
23364
  }), object({ success: literal(true) }), {
22964
23365
  kind: "mutation",
22965
23366
  auth: "admin"
22966
- }), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({ migrated: number() }), {
23367
+ }), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({
23368
+ migrated: number(),
23369
+ skipped: array(object({
23370
+ deviceId: number(),
23371
+ targetNodeId: string(),
23372
+ reason: string()
23373
+ })).default([])
23374
+ }), {
22967
23375
  kind: "mutation",
22968
23376
  auth: "admin"
22969
- }), method(_void(), array(PipelineAssignmentSchema).readonly()), method(object({ deviceId: number() }), PipelineAssignmentSchema.nullable()), method(_void(), array(AgentLoadSummarySchema).readonly()), method(_void(), GlobalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(object({ nodeId: string() }), CapabilityBindingsSchema), method(object({
23377
+ }), method(_void(), array(PipelineAssignmentSchema).readonly()), method(object({ deviceId: number() }), PipelineAssignmentSchema.nullable()), method(_void(), array(AgentLoadSummarySchema).readonly()), method(object({ stepId: string() }), ClusterModelChoiceSchema), method(_void(), GlobalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(object({ nodeId: string() }), CapabilityBindingsSchema), method(object({
22970
23378
  nodeId: string(),
22971
23379
  capName: string(),
22972
23380
  addonId: string()
@@ -25266,6 +25674,167 @@ DeviceType.Camera, method(object({
25266
25674
  auth: "protected"
25267
25675
  });
25268
25676
  /**
25677
+ * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
25678
+ * valutatore puro del suo FRONTE.
25679
+ *
25680
+ * Viveva dentro il builtin virtual-doorbell
25681
+ * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
25682
+ * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
25683
+ * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
25684
+ * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
25685
+ * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
25686
+ * SPOSTA qui e il doorbell la ri-esporta.
25687
+ *
25688
+ * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
25689
+ * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
25690
+ * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
25691
+ * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
25692
+ */
25693
+ /**
25694
+ * Known binary / switch source caps → the boolean slice field whose
25695
+ * false→true rise counts as ACTIVE. Every entry is "fire on active".
25696
+ * Sensors whose "active" reading is not a plain boolean (presence's string
25697
+ * state, connectivity's connected flag) are deliberately excluded — a
25698
+ * reconnect is not a doorbell press, and it is not a recording either.
25699
+ */
25700
+ var SOURCE_CAP_ACTIVE_FIELD = {
25701
+ contact: "entryOpen",
25702
+ binary: "on",
25703
+ switch: "on",
25704
+ motion: "detected",
25705
+ flood: "flooded",
25706
+ gas: "detected",
25707
+ smoke: "detected",
25708
+ "carbon-monoxide": "detected",
25709
+ vibration: "detected",
25710
+ tamper: "tampered"
25711
+ };
25712
+ object({
25713
+ /** Ms epoch of the last press. null = never observed since this provider started. */
25714
+ lastPressedAt: number().nullable(),
25715
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
25716
+ pressCountSinceStart: number()
25717
+ });
25718
+ object({
25719
+ deviceId: number(),
25720
+ timestamp: number()
25721
+ });
25722
+ /**
25723
+ * The `doorbell-source` extension slot's editable value (D648): the camera's
25724
+ * virtual-doorbell trigger devices, exactly what the wrapper's
25725
+ * `doorbellSources` persists (as `{ deviceId }` records).
25726
+ */
25727
+ var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
25728
+ DeviceType.Camera;
25729
+ DeviceType.Button, DeviceType.Camera;
25730
+ var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
25731
+ DeviceType.Camera, DeviceType.Camera;
25732
+ /** A slot's editable value, discriminated on `slot`. */
25733
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
25734
+ DeviceType.Camera;
25735
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
25736
+ state: literal("unreachable"),
25737
+ reason: string()
25738
+ })]);
25739
+ /** One provider of slots — the D554 source-listing row. */
25740
+ var ExtensionSourceSchema = object({
25741
+ /** The routing prefix of every `slotRef` this provider serves. */
25742
+ source: string(),
25743
+ label: string(),
25744
+ /** Stamped by the dispatcher from the registry (D557). */
25745
+ addonId: string().optional(),
25746
+ availability: ExtensionSourceAvailabilitySchema
25747
+ });
25748
+ /**
25749
+ * How one picked source stands. `missing` — no such device (deleted, or an id
25750
+ * that never existed); `foreign` — a device the slot's owner cannot read from
25751
+ * (slice 2's cross-owner graft source); `unavailable` — it exists but is not a
25752
+ * valid source now (a container, which is never a pick). A source in any of
25753
+ * these states is SHOWN, never silently dropped or re-pointed.
25754
+ */
25755
+ var ExtensionSourceHealthSchema = _enum([
25756
+ "ok",
25757
+ "missing",
25758
+ "foreign",
25759
+ "unavailable"
25760
+ ]);
25761
+ var ExtensionSlotSourceSchema = object({
25762
+ deviceId: number().int(),
25763
+ /** The device's name, or null when it could not be resolved (`missing`). */
25764
+ name: string().nullable(),
25765
+ health: ExtensionSourceHealthSchema,
25766
+ detail: string().optional()
25767
+ });
25768
+ /**
25769
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
25770
+ * reported read-only, named, never written through this contract (D62). The
25771
+ * virtual doorbell's sources ring only while the wrapper is bound to the
25772
+ * camera, and that binding belongs to `deviceManager.setWrapperActive`.
25773
+ * `unknown` means the gate could not be read; it is not "inactive" (D315).
25774
+ */
25775
+ var ExtensionSlotActivationSchema = object({
25776
+ state: _enum([
25777
+ "active",
25778
+ "inactive",
25779
+ "unknown"
25780
+ ]),
25781
+ authority: string(),
25782
+ detail: string().optional()
25783
+ });
25784
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
25785
+ state: literal("ok"),
25786
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
25787
+ slotRef: string(),
25788
+ slot: ExtensionSlotIdSchema,
25789
+ /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
25790
+ authority: string(),
25791
+ /** graft: its switch. association: null — removing every source is "off". */
25792
+ enabled: boolean().nullable(),
25793
+ /** graft: the cap registered on the host. association: null. */
25794
+ projects: string().nullable(),
25795
+ activation: ExtensionSlotActivationSchema.nullable(),
25796
+ value: ExtensionSlotValueSchema,
25797
+ sources: array(ExtensionSlotSourceSchema)
25798
+ }), object({
25799
+ state: literal("unreachable"),
25800
+ addonId: string(),
25801
+ reason: string()
25802
+ })]);
25803
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
25804
+ deviceId: number().int(),
25805
+ name: string(),
25806
+ type: string(),
25807
+ location: string().nullable(),
25808
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
25809
+ parentName: string().nullable(),
25810
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
25811
+ suggested: boolean(),
25812
+ /** Why it is suggested ("same location"), null when it is not. */
25813
+ reason: string().nullable()
25814
+ })) });
25815
+ /**
25816
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
25817
+ * reloaded the host (or, for an accessory child, its parent) because the
25818
+ * write changed what the host REGISTERS (a graft switched on or off, slice 2).
25819
+ */
25820
+ var ExtensionSetResultSchema = object({
25821
+ applied: literal(true),
25822
+ reload: _enum([
25823
+ "none",
25824
+ "host",
25825
+ "parent"
25826
+ ])
25827
+ });
25828
+ var ExtensionSlotRefInputSchema = object({
25829
+ deviceId: number().int(),
25830
+ slotRef: string().min(1)
25831
+ });
25832
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
25833
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
25834
+ kind: "mutation",
25835
+ auth: "admin"
25836
+ });
25837
+ /**
25269
25838
  * Optional client-side hints sent at session creation to help the provider
25270
25839
  * pick the best native source. All fields optional — a viewer that knows
25271
25840
  * nothing still gets a sane default. (Relocated from the retired `webrtc`
@@ -27054,17 +27623,6 @@ object({
27054
27623
  deviceId: number(),
27055
27624
  status: DeviceStatusSchema
27056
27625
  });
27057
- object({
27058
- /** Ms epoch of the last press. null = never observed since this provider started. */
27059
- lastPressedAt: number().nullable(),
27060
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
27061
- pressCountSinceStart: number()
27062
- });
27063
- object({
27064
- deviceId: number(),
27065
- timestamp: number()
27066
- });
27067
- DeviceType.Button, DeviceType.Camera;
27068
27626
  /**
27069
27627
  * Enum-state sensor — a string value picked from a finite option set.
27070
27628
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -33831,42 +34389,6 @@ DeviceType.Camera, method(object({
33831
34389
  package: array(ZoneRuleSchema).readonly()
33832
34390
  });
33833
34391
  /**
33834
- * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
33835
- * valutatore puro del suo FRONTE.
33836
- *
33837
- * Viveva dentro il builtin virtual-doorbell
33838
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
33839
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
33840
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
33841
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
33842
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
33843
- * SPOSTA qui e il doorbell la ri-esporta.
33844
- *
33845
- * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
33846
- * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
33847
- * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
33848
- * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
33849
- */
33850
- /**
33851
- * Known binary / switch source caps → the boolean slice field whose
33852
- * false→true rise counts as ACTIVE. Every entry is "fire on active".
33853
- * Sensors whose "active" reading is not a plain boolean (presence's string
33854
- * state, connectivity's connected flag) are deliberately excluded — a
33855
- * reconnect is not a doorbell press, and it is not a recording either.
33856
- */
33857
- var SOURCE_CAP_ACTIVE_FIELD = {
33858
- contact: "entryOpen",
33859
- binary: "on",
33860
- switch: "on",
33861
- motion: "detected",
33862
- flood: "flooded",
33863
- gas: "detected",
33864
- smoke: "detected",
33865
- "carbon-monoxide": "detected",
33866
- vibration: "detected",
33867
- tamper: "tampered"
33868
- };
33869
- /**
33870
34392
  * Accessory device helpers — shared across drivers.
33871
34393
  *
33872
34394
  * Many vendor-specific drivers register accessory child devices on
@@ -36666,6 +37188,30 @@ Object.freeze({
36666
37188
  addonId: null,
36667
37189
  access: "create"
36668
37190
  },
37191
+ "deviceExtension.listCandidates": {
37192
+ capName: "device-extension",
37193
+ capScope: "device",
37194
+ addonId: null,
37195
+ access: "view"
37196
+ },
37197
+ "deviceExtension.listSlots": {
37198
+ capName: "device-extension",
37199
+ capScope: "device",
37200
+ addonId: null,
37201
+ access: "view"
37202
+ },
37203
+ "deviceExtension.listSources": {
37204
+ capName: "device-extension",
37205
+ capScope: "device",
37206
+ addonId: null,
37207
+ access: "view"
37208
+ },
37209
+ "deviceExtension.setSlot": {
37210
+ capName: "device-extension",
37211
+ capScope: "device",
37212
+ addonId: null,
37213
+ access: "create"
37214
+ },
36669
37215
  "deviceManager.addLocation": {
36670
37216
  capName: "device-manager",
36671
37217
  capScope: "system",
@@ -37416,6 +37962,12 @@ Object.freeze({
37416
37962
  addonId: null,
37417
37963
  access: "view"
37418
37964
  },
37965
+ "embeddingEncoder.resetFailedModels": {
37966
+ capName: "embedding-encoder",
37967
+ capScope: "system",
37968
+ addonId: null,
37969
+ access: "delete"
37970
+ },
37419
37971
  "enumSensor.getStatus": {
37420
37972
  capName: "enum-sensor",
37421
37973
  capScope: "device",
@@ -39750,6 +40302,12 @@ Object.freeze({
39750
40302
  addonId: null,
39751
40303
  access: "view"
39752
40304
  },
40305
+ "pipelineOrchestrator.getClusterModelChoice": {
40306
+ capName: "pipeline-orchestrator",
40307
+ capScope: "system",
40308
+ addonId: null,
40309
+ access: "view"
40310
+ },
39753
40311
  "pipelineOrchestrator.getDeviceLiveContribution": {
39754
40312
  capName: "pipeline-orchestrator",
39755
40313
  capScope: "system",
@@ -42575,6 +43133,26 @@ Object.freeze({
42575
43133
  form: "single",
42576
43134
  optional: false
42577
43135
  }],
43136
+ "deviceExtension.listCandidates": [{
43137
+ name: "deviceId",
43138
+ form: "single",
43139
+ optional: false
43140
+ }],
43141
+ "deviceExtension.listSlots": [{
43142
+ name: "deviceId",
43143
+ form: "single",
43144
+ optional: false
43145
+ }],
43146
+ "deviceExtension.listSources": [{
43147
+ name: "deviceId",
43148
+ form: "single",
43149
+ optional: false
43150
+ }],
43151
+ "deviceExtension.setSlot": [{
43152
+ name: "deviceId",
43153
+ form: "single",
43154
+ optional: false
43155
+ }],
42578
43156
  "deviceManager.adoptionRelease": [{
42579
43157
  name: "camDeviceId",
42580
43158
  form: "single",
@@ -45034,68 +45612,6 @@ TimelapseRuleInputSchema.extend({
45034
45612
  createdAt: number(),
45035
45613
  updatedAt: number()
45036
45614
  });
45037
- Object.freeze(Object.fromEntries([{
45038
- stepId: "face-embedding",
45039
- label: "Face recognition model",
45040
- defaultModelId: "arcface-r100",
45041
- indexName: "the enrolled face gallery",
45042
- options: [
45043
- {
45044
- id: "arcface-r100",
45045
- label: "ArcFace (ResNet34)"
45046
- },
45047
- {
45048
- id: "auraface-r100",
45049
- label: "AuraFace R100"
45050
- },
45051
- {
45052
- id: "inception-resnet-v1",
45053
- label: "Inception ResNet V1"
45054
- }
45055
- ]
45056
- }, {
45057
- stepId: "clip-embedding",
45058
- label: "Semantic search model",
45059
- defaultModelId: "mobileclip-s1",
45060
- indexName: "the object semantic-search index",
45061
- options: [{
45062
- id: "mobileclip-s1",
45063
- label: "MobileCLIP S1"
45064
- }, {
45065
- id: "mobileclip-s2",
45066
- label: "MobileCLIP S2"
45067
- }]
45068
- }].map((s) => [s.stepId, s.defaultModelId])));
45069
- string().min(1);
45070
- var CLUSTER_STEP_SETTING_FIELDS = [{
45071
- stepId: "face-embedding",
45072
- key: "minLandmarkFaceSize",
45073
- label: "Min face size for recognition (detection px)",
45074
- description: "Refuse to embed a face smaller than this IN THE DETECTION FRAME. Applies to every node — the enrolled gallery is one index, and two admission floors would fill it from two policies. 0 disables the gate.",
45075
- type: "slider",
45076
- min: 0,
45077
- max: 64,
45078
- step: 2,
45079
- default: 24
45080
- }];
45081
- function clusterStepSettingKey(stepId, fieldKey) {
45082
- return `clusterStepSetting:${stepId}:${fieldKey}`;
45083
- }
45084
- var ClusterSettingNumberSchema = number().finite();
45085
- function readClusterStepSettings(config) {
45086
- const out = {};
45087
- for (const field of CLUSTER_STEP_SETTING_FIELDS) {
45088
- const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
45089
- const value = parsed.success ? parsed.data : field.default;
45090
- const existing = out[field.stepId] ?? {};
45091
- out[field.stepId] = {
45092
- ...existing,
45093
- [field.key]: value
45094
- };
45095
- }
45096
- return out;
45097
- }
45098
- readClusterStepSettings({});
45099
45615
  object({
45100
45616
  /**
45101
45617
  * Fraction of the box's own size added on EACH side before cutting.
@@ -45297,7 +45813,7 @@ var AdminUIAddon = class extends BaseAddon {
45297
45813
  capability: adminUiCapability,
45298
45814
  provider: {
45299
45815
  getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
45300
- getVersion: async () => ({ version: "1.2.272" })
45816
+ getVersion: async () => ({ version: "1.2.273" })
45301
45817
  }
45302
45818
  }];
45303
45819
  }