@camstack/addon-admin-ui 1.2.272 → 1.2.274

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 (99) hide show
  1. package/dist/assets/{AddonCollectionPage-D6fy7dpj.js → AddonCollectionPage-BOTHCV2D.js} +1 -1
  2. package/dist/assets/Addons-CbeIFZJ2.js +1 -0
  3. package/dist/assets/{AdminTabs-V9k1QuVP.js → AdminTabs-BvjY54SD.js} +1 -1
  4. package/dist/assets/{AiProfiles-DiPkD_fk.js → AiProfiles-D329R6km.js} +2 -2
  5. package/dist/assets/{BrokerForm-CYGBfbxr.js → BrokerForm-D9m9Mc3l.js} +1 -1
  6. package/dist/assets/Build-DWmWawlx.js +32 -0
  7. package/dist/assets/{Capabilities-D1KT-ivA.js → Capabilities-DF61zltz.js} +1 -1
  8. package/dist/assets/{CapabilityBadges-DS8SoWoz.js → CapabilityBadges-CFvvuhva.js} +1 -1
  9. package/dist/assets/Cluster-CMQudXda.js +11 -0
  10. package/dist/assets/Data-BQ0K8rdW.js +1 -0
  11. package/dist/assets/DetectionIntelligence-DHIHBsxn.js +1 -0
  12. package/dist/assets/DeviceAggregateSection-OFFk7SGf.js +1 -0
  13. package/dist/assets/DeviceDetail-CWtCkwPI.js +2 -0
  14. package/dist/assets/{Devices-HDneMnHi.js → Devices-D7I7551M.js} +1 -1
  15. package/dist/assets/{EmbedPlayerPage-B_wGVEK0.js → EmbedPlayerPage-Dx2pvRNo.js} +1 -1
  16. package/dist/assets/Events-DGBRbSqe.js +1 -0
  17. package/dist/assets/FormBuilder-6kOmZbWs.js +1 -0
  18. package/dist/assets/Identity-BaMVfoh_.js +1 -0
  19. package/dist/assets/IntegrationDetail-DMxdgCPj.js +1 -0
  20. package/dist/assets/Integrations-CxONsWLr.js +1 -0
  21. package/dist/assets/Integrations-DYra9lmX.js +1 -0
  22. package/dist/assets/{Locations-wB0U93K4.js → Locations-nDgJ1tHl.js} +3 -2
  23. package/dist/assets/{Logs-BYTo71Yt.js → Logs-CsIyTnn-.js} +1 -1
  24. package/dist/assets/{MotionZonesSettings-DDf16JDF.js → MotionZonesSettings-FUOKXRb_.js} +1 -1
  25. package/dist/assets/{MyAccess-BbWITi4N.js → MyAccess-lYGk_mZK.js} +1 -1
  26. package/dist/assets/Network-DjS8HGVe.js +1 -0
  27. package/dist/assets/{NodeAddonsSettingsPanel-UySNHnGf.js → NodeAddonsSettingsPanel-BjymDRjR.js} +1 -1
  28. package/dist/assets/{NodeInferenceDevices-B3VEAQWr.js → NodeInferenceDevices-hswljS9A.js} +1 -1
  29. package/dist/assets/Notifications-C3_3XV5R.js +1 -0
  30. package/dist/assets/Pipeline-BLv0pzdj.js +1 -0
  31. package/dist/assets/Plates-lfpwlyz-.js +1 -0
  32. package/dist/assets/{PrivacyMaskSettings-C0HZcbXR.js → PrivacyMaskSettings-D2QFmXzU.js} +1 -1
  33. package/dist/assets/{ProviderIcon-DXK0cuQe.js → ProviderIcon-BGhdIU-0.js} +1 -1
  34. package/dist/assets/Recordings-C8m9WddP.js +1 -0
  35. package/dist/assets/{ScanNetworkModal-B3CQ1S3f.js → ScanNetworkModal-C3-hctF4.js} +1 -1
  36. package/dist/assets/{SceneMonitorEditor-BN7kLz08.js → SceneMonitorEditor-Cn9lA9AE.js} +1 -1
  37. package/dist/assets/{Scenes-Dbko4G3U.js → Scenes-Dz58qVwS.js} +1 -1
  38. package/dist/assets/{Settings-eB6bRRQ2.js → Settings-Cln5vhOJ.js} +1 -1
  39. package/dist/assets/{Showroom-D7VNR9sm.js → Showroom-6s5BJrv8.js} +1 -1
  40. package/dist/assets/{StorageLocationsPanel-CfOU5MKV.js → StorageLocationsPanel-VprWIWZO.js} +1 -1
  41. package/dist/assets/{Terminal-DJ13Ptlg.js → Terminal-BQeFXTnk.js} +5 -5
  42. package/dist/assets/{Viewer-DSNI0gBQ.js → Viewer-B4vcuobV.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-CMSALIh6.js} +1 -1
  44. package/dist/assets/{archive-CfPc3zmd.js → archive-CxaPR4VA.js} +1 -1
  45. package/dist/assets/{authed-media-D0FYWdWm.js → authed-media-kR1UJRFZ.js} +1 -1
  46. package/dist/assets/{boxes-Bziwj8sB.js → boxes-ahR2aP9t.js} +1 -1
  47. package/dist/assets/circle-slash-D6McDg9C.js +1 -0
  48. package/dist/assets/{debounced-invalidate-Bpjoo47a.js → debounced-invalidate-DsbuiBYD.js} +1 -1
  49. package/dist/assets/dist-B9MjYWSP.js +349 -0
  50. package/dist/assets/{dist-CnCHhuKr.js → dist-CdKpoxOt.js} +1 -1
  51. package/dist/assets/{face-bbox-CTW2Ql-L.js → face-bbox-DlcGdkm9.js} +1 -1
  52. package/dist/assets/{hard-drive-download-D69_02_z.js → hard-drive-download-DXiTOKp3.js} +1 -1
  53. package/dist/assets/{hostInit-Duev9E28.js → hostInit-D9bsJEyR.js} +1 -1
  54. package/dist/assets/index-DfQ3ZWeO.js +4 -0
  55. package/dist/assets/{layers-dj0W-5PD.js → layers-D-yMLL--.js} +1 -1
  56. package/dist/assets/{location-owned-usage-Dd31wc7R.js → location-owned-usage-DRvqW2iR.js} +1 -1
  57. package/dist/assets/{mf-entry-bootstrap-0-f2ee65db.js → mf-entry-bootstrap-0-93a6c078.js} +2 -2
  58. package/dist/assets/{player-overlays-BCwjKg6p.js → player-overlays-D7VPhnE4.js} +1 -1
  59. package/dist/assets/remoteEntry-BXoXe1pe.js +1 -0
  60. package/dist/assets/{send-DI8RyAAG.js → send-NTowi8jm.js} +1 -1
  61. package/dist/assets/{settings-2-pQ157vcG.js → settings-2-CXbV9_wC.js} +1 -1
  62. package/dist/assets/{square-check-big-CluVAeV_.js → square-check-big-D2AZ3bho.js} +1 -1
  63. package/dist/assets/src-C0jQERZt.js +349 -0
  64. package/dist/assets/src-Dxazp552.js +67 -0
  65. package/dist/assets/{use-scenes-feed-Do31SA2K.js → use-scenes-feed-toWwtXlf.js} +1 -1
  66. package/dist/assets/{use-stationary-objects-DqcSiA8T.js → use-stationary-objects-BwWKWaFp.js} +1 -1
  67. package/dist/assets/useEventInvalidation-DsPYHXlH.js +1 -0
  68. package/dist/assets/{useNodeUrlSelection-BsR42Cfa.js → useNodeUrlSelection-Cx1_KqVy.js} +1 -1
  69. package/dist/assets/user-round-Bz43MmhT.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_-D76Y7RJx.js} +2 -2
  71. package/dist/index.html +5 -5
  72. package/dist/server/addon.js +673 -162
  73. package/package.json +1 -1
  74. package/dist/assets/Addons-BsQHKMWG.js +0 -1
  75. package/dist/assets/Build-CBeEDpy5.js +0 -32
  76. package/dist/assets/Cluster-gJW9vP03.js +0 -11
  77. package/dist/assets/Data-Bh0bzESu.js +0 -1
  78. package/dist/assets/DetectionIntelligence-Cv2fg-SI.js +0 -1
  79. package/dist/assets/DeviceAggregateSection-DHALwPAJ.js +0 -1
  80. package/dist/assets/DeviceDetail-Cj4upIZ8.js +0 -2
  81. package/dist/assets/Events-BPXFJIla.js +0 -1
  82. package/dist/assets/FormBuilder-BXtojpHF.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/Network-30R4cY39.js +0 -1
  88. package/dist/assets/Notifications-C1yukm6c.js +0 -1
  89. package/dist/assets/Pipeline-DXl1Hzdu.js +0 -1
  90. package/dist/assets/Plates-BIhVH_IZ.js +0 -1
  91. package/dist/assets/Recordings-CfpOjuow.js +0 -1
  92. package/dist/assets/circle-slash-DNDn3yid.js +0 -1
  93. package/dist/assets/dist-CRVdBpiI.js +0 -349
  94. package/dist/assets/index-BjhxGD-m.js +0 -4
  95. package/dist/assets/remoteEntry-DUHRclu_.js +0 -1
  96. package/dist/assets/src-BI1z_AYO.js +0 -67
  97. package/dist/assets/src-D2MUU060.js +0 -349
  98. package/dist/assets/useEventInvalidation-GeG-PeIJ.js +0 -1
  99. 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-DC-wdyeS.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,27 @@ 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
+ * `trackedDeviceIds` (D655) is the tracked-event opt-in, exactly what
13914
+ * `_linkedDeviceTrackedIds` persists: which linked devices materialize a
13915
+ * synthetic tracked event on the camera. A read always carries it AS STORED
13916
+ * (an absent key reads as `[]`, which is what the resolver makes of it —
13917
+ * NONE). On a write it is optional: absent leaves the opt-in untouched, so a
13918
+ * card built before D655 cannot erase it by saving the pick list. A present
13919
+ * list REPLACES the opt-in; each id must be a pick, a device the camera links
13920
+ * by structure (the row's `impliedSources`: tree children, a picked
13921
+ * container's child) or already stored — so what was read can always be
13922
+ * written back unchanged, and a NEW opt-in outside the linked set is refused.
13923
+ */
13924
+ var LinkedDevicesSlotValueSchema = object({
13925
+ deviceIds: array(number().int().positive()),
13926
+ trackedDeviceIds: array(number().int().positive()).optional()
13927
+ });
13928
+ DeviceType.Camera;
13830
13929
  /** One camera's resolved linked set, tagged with the camera it belongs to.
13831
13930
  * The batch answer needs the tag; the single-device answer already has it
13832
13931
  * from the input, which is why `getLinkedDevices` keeps the untagged shape. */
@@ -14352,16 +14451,101 @@ var EmbeddingResultSchema = object({
14352
14451
  embedding: array(number()),
14353
14452
  inferenceMs: number()
14354
14453
  });
14454
+ /** The two CLIP towers the encoder runs; a crash budget is kept per tower. */
14455
+ var EmbeddingTowerSchema = _enum(["image", "text"]);
14456
+ /**
14457
+ * A tower in the terminal `failed` state (D649, D6): it crashed or failed to
14458
+ * load `crashes` times within `windowMs`, and is refused by name until an
14459
+ * operator `resetFailedModels` or a model change — never on a timer.
14460
+ *
14461
+ * `nodeId` is the node whose tower failed. The state lives in THAT node's
14462
+ * encoder process (in memory — a runner respawn clears it), and one node's
14463
+ * answer says nothing about another's.
14464
+ */
14465
+ var EmbeddingFailedModelSchema = object({
14466
+ modelId: string(),
14467
+ tower: EmbeddingTowerSchema,
14468
+ nodeId: string(),
14469
+ crashes: number(),
14470
+ windowMs: number(),
14471
+ sinceMs: number(),
14472
+ lastReason: string()
14473
+ });
14474
+ /**
14475
+ * A model whose REQUIREMENTS can never be met on this node (D649 round 5):
14476
+ * an id the catalog does not know, a model URL answering 404/410, a declared
14477
+ * sibling (the tokenizer) that is not there. After `attempts` failed builds
14478
+ * it is terminally `requirements-failed`, refused by name until an operator
14479
+ * `resetFailedModels` or a model change — the same exits as a crashed tower.
14480
+ */
14481
+ var EmbeddingFailedRequirementSchema = object({
14482
+ modelId: string(),
14483
+ tower: EmbeddingTowerSchema,
14484
+ nodeId: string(),
14485
+ attempts: number(),
14486
+ sinceMs: number(),
14487
+ lastReason: string()
14488
+ });
14355
14489
  var EmbeddingInfoSchema = object({
14356
14490
  modelId: string(),
14357
14491
  embeddingDim: number(),
14358
- ready: boolean()
14359
- });
14492
+ ready: boolean(),
14493
+ /**
14494
+ * The node that answered. Absent only from an encoder older than D649's
14495
+ * crash budget — whose `failedModels` is then UNKNOWN (D315), never "none".
14496
+ */
14497
+ nodeId: string().optional(),
14498
+ /**
14499
+ * Towers in `failed` on the answering node, each row naming it. `undefined`
14500
+ * means the node could not say (pre-budget encoder); a node that has the
14501
+ * budget always answers an array, empty included.
14502
+ */
14503
+ failedModels: array(EmbeddingFailedModelSchema).optional(),
14504
+ /** Models terminally `requirements-failed` on the answering node; same reading as above. */
14505
+ failedRequirements: array(EmbeddingFailedRequirementSchema).optional()
14506
+ });
14507
+ /**
14508
+ * The THREE codes an encoder refusal can carry (D649, D6). Same shape as
14509
+ * `VECTOR_INDEX_DIM_CONFLICT`: the code rides in the MESSAGE, because an
14510
+ * Error's own properties do not survive the UDS/tRPC hop and its message does,
14511
+ * and both sides go through the helpers below — the encoder builds the
14512
+ * refusal, the live detail plane classifies on it to count refusals per
14513
+ * camera instead of logging one warning per track. The bracketed token
14514
+ * carries the code, the model, the tower and the node so a consumer never
14515
+ * parses prose.
14516
+ *
14517
+ * - `EMBEDDING_MODEL_FAILED`: the tower crashed / failed to load past the crash
14518
+ * budget — terminal until `resetFailedModels` or a model change.
14519
+ * - `EMBEDDING_REQUIREMENTS_UNAVAILABLE`: files or runtime not there right now
14520
+ * (a download or Python that failed, or the cooldown after one) — the next
14521
+ * request past the cooldown tries again.
14522
+ * - `EMBEDDING_REQUIREMENTS_FAILED`: the requirements can never be met (unknown
14523
+ * id, 404/410, missing sibling) and the bounded attempts are spent —
14524
+ * terminal, same exits as a crashed tower.
14525
+ */
14526
+ var EMBEDDING_MODEL_FAILED = "embedding-model-failed";
14527
+ var EMBEDDING_REQUIREMENTS_UNAVAILABLE = "embedding-requirements-unavailable";
14528
+ var EMBEDDING_REQUIREMENTS_FAILED = "embedding-requirements-failed";
14529
+ _enum([
14530
+ EMBEDDING_MODEL_FAILED,
14531
+ EMBEDDING_REQUIREMENTS_UNAVAILABLE,
14532
+ EMBEDDING_REQUIREMENTS_FAILED
14533
+ ]);
14534
+ new RegExp(`\\[(${EMBEDDING_MODEL_FAILED}|${EMBEDDING_REQUIREMENTS_UNAVAILABLE}|${EMBEDDING_REQUIREMENTS_FAILED}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);
14360
14535
  method(object({
14361
14536
  crop: _instanceof(Uint8Array),
14362
14537
  width: number(),
14363
14538
  height: number()
14364
- }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
14539
+ }), EmbeddingResultSchema, { auth: "admin" }), method(object({
14540
+ text: string(),
14541
+ modelId: string().min(1).optional()
14542
+ }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" }), method(object({ modelId: string().min(1).optional() }), object({
14543
+ cleared: array(string()),
14544
+ nodeId: string()
14545
+ }), {
14546
+ kind: "mutation",
14547
+ auth: "admin"
14548
+ });
14365
14549
  /**
14366
14550
  * `failure-contribution` — the capability an addon reports its OWN losses
14367
14551
  * through, per camera, with the denominator attached. It stores nothing.
@@ -17767,7 +17951,12 @@ var NcMediaPolicySchema = object({
17767
17951
  * the degrade engine, which drops the video and keeps the still.
17768
17952
  */
17769
17953
  clip: boolean().optional(),
17770
- /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
17954
+ /**
17955
+ * Seconds of footage BEFORE / AFTER the event instant. Absent =
17956
+ * {@link NC_CLIP_PRE_ROLL_DEFAULT_SEC} / {@link NC_CLIP_POST_ROLL_DEFAULT_SEC}
17957
+ * (4 / 6), resolved by the Notification Center at dispatch — deliberately not
17958
+ * a Zod default, so a rule that never chose keeps following the hub's.
17959
+ */
17771
17960
  clipPreRollSec: number().int().min(0).max(30).optional(),
17772
17961
  clipPostRollSec: number().int().min(0).max(30).optional(),
17773
17962
  /**
@@ -19145,6 +19334,130 @@ var OauthIntegrationDescriptorSchema = object({
19145
19334
  });
19146
19335
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
19147
19336
  /**
19337
+ * A model choice has a SCOPE, and a scope change has a workflow.
19338
+ *
19339
+ * ## The two scopes
19340
+ *
19341
+ * Almost every pipeline step's model is a **node** question: which build runs
19342
+ * fastest on THIS accelerator. Two nodes may legitimately answer differently —
19343
+ * a Coral runs the tflite SSD, a Mac runs the coreml YOLO — because the answers
19344
+ * are compared against nothing. They produce boxes, and a box is a box.
19345
+ *
19346
+ * Two steps are not like that. `face-embedding` and `clip-embedding` produce
19347
+ * **vectors that land in ONE shared index** (`identity_samples`,
19348
+ * `vec_object_clip`) and are ranked against each other by cosine similarity.
19349
+ * Cosine similarity between two encoders is not a weak signal, it is a
19350
+ * meaningless number — and nothing inside a vector can tell you it happened.
19351
+ * So for those two steps the model is a **cluster** question with exactly one
19352
+ * answer, stored in exactly one row.
19353
+ *
19354
+ * That is the same argument [D52](../../../../docs/decisions/adr-0052.md) makes
19355
+ * for the crop convention (`detail-crop.ts`), one level up: the crop decides
19356
+ * WHAT pixels the encoder sees, this decides WHICH encoder sees them. Both are
19357
+ * cluster-wide for the same reason and neither may become per-node.
19358
+ *
19359
+ * ## Why the registry lives here and not in the step catalog
19360
+ *
19361
+ * The scope itself is declared on the step, in
19362
+ * `detection-pipeline/registry/step-definitions.ts` (`StepDefinition.modelScope`)
19363
+ * — that is where a new step declares what kind of choice its model is. But the
19364
+ * catalog lives inside `addon-pipeline`, and three packages that must NOT
19365
+ * import an addon need to know the set: the orchestrator (which renders and
19366
+ * stores the row), post-analysis (which pins the row for a re-embed pass) and
19367
+ * admin-ui (which mirrors it). So the set is mirrored here, and
19368
+ * `scripts/check-cluster-model-scope.ts` fails the build when the two disagree.
19369
+ * A hand-copied key that stops matching is exactly how a setting silently stops
19370
+ * arriving while both sides still look correct.
19371
+ *
19372
+ * ## The defaults ARE today's behaviour
19373
+ *
19374
+ * {@link DEFAULT_CLUSTER_STEP_MODELS} reproduces the catalog `defaultModelId`
19375
+ * of both steps. Declaring the scope therefore changes nothing on the day it
19376
+ * ships: the cluster row starts out saying what every node was already doing.
19377
+ * Changing it is legitimate — that is what the knob is for — but it invalidates
19378
+ * the stored vectors of that surface, and must be followed by a re-embed pass
19379
+ * (`face-reembed-pass.ts`, `embedding-rebuild.ts`).
19380
+ */
19381
+ /**
19382
+ * Why the orchestrator cannot say which model the operator chose for a
19383
+ * cluster-scoped step (D651).
19384
+ */
19385
+ var CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS = [
19386
+ "owner-not-ready",
19387
+ "store-read-failed",
19388
+ "three-way-read-unavailable",
19389
+ "invalid-stored",
19390
+ "not-cluster-scoped"
19391
+ ];
19392
+ Object.freeze(Object.fromEntries([{
19393
+ stepId: "face-embedding",
19394
+ label: "Face recognition model",
19395
+ defaultModelId: "auraface-r100",
19396
+ indexName: "the enrolled face gallery",
19397
+ options: [
19398
+ {
19399
+ id: "auraface-r100",
19400
+ label: "AuraFace R100"
19401
+ },
19402
+ {
19403
+ id: "arcface-r100",
19404
+ label: "ArcFace (ResNet34)"
19405
+ },
19406
+ {
19407
+ id: "inception-resnet-v1",
19408
+ label: "Inception ResNet V1"
19409
+ }
19410
+ ]
19411
+ }, {
19412
+ stepId: "clip-embedding",
19413
+ label: "Semantic search model",
19414
+ defaultModelId: "mobileclip-s1",
19415
+ indexName: "the object semantic-search index",
19416
+ options: [
19417
+ {
19418
+ id: "mobileclip-s1",
19419
+ label: "MobileCLIP S1"
19420
+ },
19421
+ {
19422
+ id: "mobileclip-s2",
19423
+ label: "MobileCLIP S2"
19424
+ },
19425
+ {
19426
+ id: "siglip2-b16-224",
19427
+ label: "SigLIP2 B/16 (Apache-2.0)"
19428
+ }
19429
+ ]
19430
+ }].map((s) => [s.stepId, s.defaultModelId])));
19431
+ var CLUSTER_STEP_SETTING_FIELDS = [{
19432
+ stepId: "face-embedding",
19433
+ key: "minLandmarkFaceSize",
19434
+ label: "Min face size for recognition (detection px)",
19435
+ 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.",
19436
+ type: "slider",
19437
+ min: 0,
19438
+ max: 64,
19439
+ step: 2,
19440
+ default: 24
19441
+ }];
19442
+ function clusterStepSettingKey(stepId, fieldKey) {
19443
+ return `clusterStepSetting:${stepId}:${fieldKey}`;
19444
+ }
19445
+ var ClusterSettingNumberSchema = number().finite();
19446
+ function readClusterStepSettings(config) {
19447
+ const out = {};
19448
+ for (const field of CLUSTER_STEP_SETTING_FIELDS) {
19449
+ const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
19450
+ const value = parsed.success ? parsed.data : field.default;
19451
+ const existing = out[field.stepId] ?? {};
19452
+ out[field.stepId] = {
19453
+ ...existing,
19454
+ [field.key]: value
19455
+ };
19456
+ }
19457
+ return out;
19458
+ }
19459
+ readClusterStepSettings({});
19460
+ /**
19148
19461
  * pipeline-analytics — device-scoped wrapper cap. Refines raw
19149
19462
  * per-frame detections emitted by the pipeline runner into tracked
19150
19463
  * objects, per-kind event collections (motion / object / audio), and
@@ -19960,7 +20273,8 @@ var MediaFileKindEnum = _enum([
19960
20273
  "thumbnailSmall",
19961
20274
  "confirmationCrop",
19962
20275
  "debugCrop",
19963
- "sceneFrame"
20276
+ "sceneFrame",
20277
+ "lastSceneFrame"
19964
20278
  ]);
19965
20279
  /**
19966
20280
  * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
@@ -20512,7 +20826,23 @@ var SearchObjectEventsInput = object({
20512
20826
  until: number().optional(),
20513
20827
  classFilter: string().optional(),
20514
20828
  limit: number().default(50),
20515
- minScore: number().min(0).max(1).default(.2)
20829
+ /**
20830
+ * An ABSOLUTE cosine floor. Optional since D649: a floor is a property of the
20831
+ * model (0.2 kept 96% of matched pairs on MobileCLIP S1 and 2.7% on SigLIP2),
20832
+ * so an absent one resolves to the searched model's own `searchMinScore`
20833
+ * scaled by `strictness`. A number sent here is honoured verbatim.
20834
+ */
20835
+ minScore: number().min(0).max(1).optional(),
20836
+ /** Model-relative floor — see `resolveClipSearchMinScore`. Default `loose`. */
20837
+ strictness: ClipSearchStrictnessSchema.optional(),
20838
+ /**
20839
+ * Search THIS CLIP model's index instead of the cluster row's. Every index a
20840
+ * model ever wrote stays searchable until it is wiped (the MobileCLIP index
20841
+ * through a SigLIP2 cutover and its rollback window). An id with no CLIP
20842
+ * metadata is refused; an id other than the cluster row's is ADMIN-only
20843
+ * (`model-override-requires-admin`).
20844
+ */
20845
+ modelId: string().min(1).optional()
20516
20846
  });
20517
20847
  var TrackCascadeCountsSchema = object({
20518
20848
  /** Persisted track roots deleted (authoritative). */
@@ -20647,7 +20977,41 @@ var RebuildObjectEmbeddingsInput = object({
20647
20977
  * comparable, so wiping and rebuilding is the only way to be sure every vector
20648
20978
  * means the same thing.
20649
20979
  */
20650
- var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
20980
+ var WipeObjectEmbeddingsResultSchema = object({
20981
+ deleted: number(),
20982
+ /**
20983
+ * CLIP indexes that could NOT be emptied (unreachable, or refused at their
20984
+ * dimension) — not a clean slate. Additive and optional (D649).
20985
+ */
20986
+ failedIndexes: array(string()).optional()
20987
+ });
20988
+ /**
20989
+ * Why a rebuild did not start, BY NAME — ONE vocabulary for both gates in front
20990
+ * of a pass (D649 over D651). A bare `started: false` read the same for "the
20991
+ * stores are booting" and "the cluster row names a model with no CLIP
20992
+ * metadata", which need different fixes.
20993
+ * - `stores-unavailable` — the analytics stores or the API are not up yet.
20994
+ * - the owner's confirmation of the cluster model (D651, `ClusterPinConfirmer`):
20995
+ * a pass that rewrites an index needs two agreeing reads of the OWNER's
20996
+ * answer (`pipelineOrchestrator.getClusterModelChoice`) — a pass that cannot
20997
+ * name its model does not run (D54):
20998
+ * - the owner's own `unreadable` reasons (`owner-not-ready`,
20999
+ * `store-read-failed`, `three-way-read-unavailable`, `invalid-stored`,
21000
+ * `not-cluster-scoped`);
21001
+ * - `method-unavailable` — the orchestrator predates the method;
21002
+ * - `read-failed` — the call failed or answered something unparseable;
21003
+ * - `reads-disagree` — the two reads named different choices.
21004
+ * - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
21005
+ * index to fill and no dimension to check against (D649).
21006
+ */
21007
+ var RebuildObjectEmbeddingsRefusalSchema = _enum([
21008
+ "stores-unavailable",
21009
+ ...CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS,
21010
+ "method-unavailable",
21011
+ "read-failed",
21012
+ "reads-disagree",
21013
+ "not-a-clip-model"
21014
+ ]);
20651
21015
  /**
20652
21016
  * Acknowledgement that a rebuild STARTED.
20653
21017
  *
@@ -20660,7 +21024,12 @@ var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
20660
21024
  var RebuildObjectEmbeddingsResultSchema = object({
20661
21025
  started: boolean(),
20662
21026
  /** True when a pass was already running; the new request is ignored. */
20663
- alreadyRunning: boolean()
21027
+ alreadyRunning: boolean(),
21028
+ /** Present when the pass refused to start — see `RebuildObjectEmbeddingsRefusalSchema`. */
21029
+ refusal: RebuildObjectEmbeddingsRefusalSchema.optional(),
21030
+ /** The CLIP model the pass pinned, and the index it fills (when it started). */
21031
+ modelId: string().optional(),
21032
+ index: string().optional()
20664
21033
  });
20665
21034
  var RebuildStatusSchema = object({
20666
21035
  running: boolean(),
@@ -20694,7 +21063,11 @@ var RebuildStatusSchema = object({
20694
21063
  startedAtMs: number().nullable(),
20695
21064
  finishedAtMs: number().nullable(),
20696
21065
  /** Present when the pass ended by throwing. */
20697
- error: string().nullable()
21066
+ error: string().nullable(),
21067
+ /** The CLIP model the current / last pass pinned (D54), `null` before any. */
21068
+ modelId: string().nullable(),
21069
+ /** The index that pass fills — `ClipModelMeta.vectorIndex` of `modelId` (D649). */
21070
+ index: string().nullable()
20698
21071
  });
20699
21072
  /**
20700
21073
  * Acknowledgement that a debug-media reclaim STARTED.
@@ -21015,7 +21388,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21015
21388
  deviceId: number(),
21016
21389
  ownerKind: MediaPresenceOwnerKindSchema,
21017
21390
  ownerIds: array(string()).max(5e3)
21018
- }), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
21391
+ }), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly(), { caller: "required" }), method(object({}), WipeObjectEmbeddingsResultSchema, {
21019
21392
  kind: "mutation",
21020
21393
  auth: "admin"
21021
21394
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -21473,7 +21846,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
21473
21846
  height: number()
21474
21847
  }), { kind: "mutation" }), method(object({
21475
21848
  stepId: string(),
21476
- frameId: number().int()
21849
+ frameId: number().int(),
21850
+ /**
21851
+ * The model to time — REQUIRED (D658). Without it the pool answered the
21852
+ * step's ACTIVE variant (the first loaded after boot), so a benchmark
21853
+ * of model B silently timed model A. Callers pass the `rootModelId`
21854
+ * their warmup `runPipeline` reported: the model that actually ran.
21855
+ */
21856
+ modelId: string().min(1)
21477
21857
  }), record(string(), unknown()), { kind: "mutation" }), method(object({ frameId: number().int() }), _void(), { kind: "mutation" }), method(object({ deviceKey: string().optional() }), EffectiveTuningSchema), method(_void(), array(object({
21478
21858
  engineKey: string(),
21479
21859
  engine: PipelineEngineChoiceSchema,
@@ -22050,6 +22430,17 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
22050
22430
  hubHostnameOverride: string().optional()
22051
22431
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
22052
22432
  /**
22433
+ * What ONE step runs with on ONE roster device for THIS camera (D650): the
22434
+ * device's per-(node,device) base with the camera's override for that device
22435
+ * on top — the same `override ?? base` merge the orchestrator applies to the
22436
+ * elected device (`applyDeviceProvisioning`). Absent `modelId` ⇒ the executor
22437
+ * resolves the device format's default, exactly as on the elected device.
22438
+ */
22439
+ var RunnerJumpStepProvisioningSchema = object({
22440
+ modelId: string().optional(),
22441
+ settings: record(string(), unknown()).optional()
22442
+ });
22443
+ /**
22053
22444
  * One ENABLED inference device on the runner's node, as the step-tree
22054
22445
  * device-jump resolver sees it (phase 1). The orchestrator populates this
22055
22446
  * roster on the attach payload whenever the camera is elected onto a specific
@@ -22061,7 +22452,16 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
22061
22452
  var RunnerInferenceDeviceSchema = object({
22062
22453
  deviceKey: string(),
22063
22454
  weight: number().positive().default(1),
22064
- maxSessions: number().int().positive().nullable().default(null)
22455
+ maxSessions: number().int().positive().nullable().default(null),
22456
+ /**
22457
+ * Per-step provisioning for this camera on THIS device (D650), keyed by step
22458
+ * id. A step the runner jumps here runs with these fields, never with the
22459
+ * elected device's: `modelId` / `settings` are REPLACED on the jumped subtree
22460
+ * (a step absent from the map runs with neither — the target format default).
22461
+ * Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
22462
+ * the elected device's provisioning, as before.
22463
+ */
22464
+ steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
22065
22465
  });
22066
22466
  /**
22067
22467
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
@@ -22936,6 +23336,28 @@ var NodeInferenceDeviceSchema = object({
22936
23336
  */
22937
23337
  exclusion: InferenceDeviceExclusionReasonSchema.nullable()
22938
23338
  });
23339
+ /**
23340
+ * The operator's model choice for one cluster-scoped step, answered by the
23341
+ * addon that OWNS the `clusterModel:*` settings (D651). Three answers, never
23342
+ * folded: a written choice, a key nobody wrote (the cluster runs the default
23343
+ * BY ABSENCE), or no answer. A caller that rewrites an index acts only on the
23344
+ * first two, read twice and agreeing.
23345
+ */
23346
+ var ClusterModelChoiceSchema = discriminatedUnion("kind", [
23347
+ object({
23348
+ kind: literal("stored"),
23349
+ modelId: string()
23350
+ }),
23351
+ object({
23352
+ kind: literal("absent"),
23353
+ defaultModelId: string()
23354
+ }),
23355
+ object({
23356
+ kind: literal("unreadable"),
23357
+ reason: _enum(CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS),
23358
+ error: string().optional()
23359
+ })
23360
+ ]);
22939
23361
  var NodeInferenceDevicesSchema = object({
22940
23362
  nodeId: string(),
22941
23363
  /** False when the node's platform-probe was unreachable (no live device set). */
@@ -22963,10 +23385,17 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
22963
23385
  }), object({ success: literal(true) }), {
22964
23386
  kind: "mutation",
22965
23387
  auth: "admin"
22966
- }), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({ migrated: number() }), {
23388
+ }), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({
23389
+ migrated: number(),
23390
+ skipped: array(object({
23391
+ deviceId: number(),
23392
+ targetNodeId: string(),
23393
+ reason: string()
23394
+ })).default([])
23395
+ }), {
22967
23396
  kind: "mutation",
22968
23397
  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({
23398
+ }), 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
23399
  nodeId: string(),
22971
23400
  capName: string(),
22972
23401
  addonId: string()
@@ -25266,6 +25695,177 @@ DeviceType.Camera, method(object({
25266
25695
  auth: "protected"
25267
25696
  });
25268
25697
  /**
25698
+ * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
25699
+ * valutatore puro del suo FRONTE.
25700
+ *
25701
+ * Viveva dentro il builtin virtual-doorbell
25702
+ * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
25703
+ * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
25704
+ * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
25705
+ * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
25706
+ * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
25707
+ * SPOSTA qui e il doorbell la ri-esporta.
25708
+ *
25709
+ * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
25710
+ * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
25711
+ * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
25712
+ * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
25713
+ */
25714
+ /**
25715
+ * Known binary / switch source caps → the boolean slice field whose
25716
+ * false→true rise counts as ACTIVE. Every entry is "fire on active".
25717
+ * Sensors whose "active" reading is not a plain boolean (presence's string
25718
+ * state, connectivity's connected flag) are deliberately excluded — a
25719
+ * reconnect is not a doorbell press, and it is not a recording either.
25720
+ */
25721
+ var SOURCE_CAP_ACTIVE_FIELD = {
25722
+ contact: "entryOpen",
25723
+ binary: "on",
25724
+ switch: "on",
25725
+ motion: "detected",
25726
+ flood: "flooded",
25727
+ gas: "detected",
25728
+ smoke: "detected",
25729
+ "carbon-monoxide": "detected",
25730
+ vibration: "detected",
25731
+ tamper: "tampered"
25732
+ };
25733
+ object({
25734
+ /** Ms epoch of the last press. null = never observed since this provider started. */
25735
+ lastPressedAt: number().nullable(),
25736
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
25737
+ pressCountSinceStart: number()
25738
+ });
25739
+ object({
25740
+ deviceId: number(),
25741
+ timestamp: number()
25742
+ });
25743
+ /**
25744
+ * The `doorbell-source` extension slot's editable value (D648): the camera's
25745
+ * virtual-doorbell trigger devices, exactly what the wrapper's
25746
+ * `doorbellSources` persists (as `{ deviceId }` records).
25747
+ */
25748
+ var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
25749
+ DeviceType.Camera;
25750
+ DeviceType.Button, DeviceType.Camera;
25751
+ var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
25752
+ DeviceType.Camera, DeviceType.Camera;
25753
+ /** A slot's editable value, discriminated on `slot`. */
25754
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
25755
+ DeviceType.Camera;
25756
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
25757
+ state: literal("unreachable"),
25758
+ reason: string()
25759
+ })]);
25760
+ /** One provider of slots — the D554 source-listing row. */
25761
+ var ExtensionSourceSchema = object({
25762
+ /** The routing prefix of every `slotRef` this provider serves. */
25763
+ source: string(),
25764
+ label: string(),
25765
+ /** Stamped by the dispatcher from the registry (D557). */
25766
+ addonId: string().optional(),
25767
+ availability: ExtensionSourceAvailabilitySchema
25768
+ });
25769
+ /**
25770
+ * How one picked source stands. `missing` — no such device (deleted, or an id
25771
+ * that never existed); `foreign` — a device the slot's owner cannot read from
25772
+ * (slice 2's cross-owner graft source); `unavailable` — it exists but is not a
25773
+ * valid source now (a container, which is never a pick). A source in any of
25774
+ * these states is SHOWN, never silently dropped or re-pointed.
25775
+ */
25776
+ var ExtensionSourceHealthSchema = _enum([
25777
+ "ok",
25778
+ "missing",
25779
+ "foreign",
25780
+ "unavailable"
25781
+ ]);
25782
+ var ExtensionSlotSourceSchema = object({
25783
+ deviceId: number().int(),
25784
+ /** The device's name, or null when it could not be resolved (`missing`). */
25785
+ name: string().nullable(),
25786
+ health: ExtensionSourceHealthSchema,
25787
+ detail: string().optional()
25788
+ });
25789
+ /**
25790
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
25791
+ * reported read-only, named, never written through this contract (D62). The
25792
+ * virtual doorbell's sources ring only while the wrapper is bound to the
25793
+ * camera, and that binding belongs to `deviceManager.setWrapperActive`.
25794
+ * `unknown` means the gate could not be read; it is not "inactive" (D315).
25795
+ */
25796
+ var ExtensionSlotActivationSchema = object({
25797
+ state: _enum([
25798
+ "active",
25799
+ "inactive",
25800
+ "unknown"
25801
+ ]),
25802
+ authority: string(),
25803
+ detail: string().optional()
25804
+ });
25805
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
25806
+ state: literal("ok"),
25807
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
25808
+ slotRef: string(),
25809
+ slot: ExtensionSlotIdSchema,
25810
+ /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
25811
+ authority: string(),
25812
+ /** graft: its switch. association: null — removing every source is "off". */
25813
+ enabled: boolean().nullable(),
25814
+ /** graft: the cap registered on the host. association: null. */
25815
+ projects: string().nullable(),
25816
+ activation: ExtensionSlotActivationSchema.nullable(),
25817
+ value: ExtensionSlotValueSchema,
25818
+ sources: array(ExtensionSlotSourceSchema),
25819
+ /**
25820
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
25821
+ * are therefore not in `value` (D655): a camera's device-tree children, and
25822
+ * the child a picked container stands for (D356 — a container is never a
25823
+ * pick, its children are). Read-only; the editor shows them and may offer
25824
+ * per-device options on them (the linked-devices tracked-event opt-in).
25825
+ * Absent when the owner links nothing beyond the picks, and from an owner
25826
+ * older than D655.
25827
+ */
25828
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
25829
+ }), object({
25830
+ state: literal("unreachable"),
25831
+ addonId: string(),
25832
+ reason: string()
25833
+ })]);
25834
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
25835
+ deviceId: number().int(),
25836
+ name: string(),
25837
+ type: string(),
25838
+ location: string().nullable(),
25839
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
25840
+ parentName: string().nullable(),
25841
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
25842
+ suggested: boolean(),
25843
+ /** Why it is suggested ("same location"), null when it is not. */
25844
+ reason: string().nullable()
25845
+ })) });
25846
+ /**
25847
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
25848
+ * reloaded the host (or, for an accessory child, its parent) because the
25849
+ * write changed what the host REGISTERS (a graft switched on or off, slice 2).
25850
+ */
25851
+ var ExtensionSetResultSchema = object({
25852
+ applied: literal(true),
25853
+ reload: _enum([
25854
+ "none",
25855
+ "host",
25856
+ "parent"
25857
+ ])
25858
+ });
25859
+ var ExtensionSlotRefInputSchema = object({
25860
+ deviceId: number().int(),
25861
+ slotRef: string().min(1)
25862
+ });
25863
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
25864
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
25865
+ kind: "mutation",
25866
+ auth: "admin"
25867
+ });
25868
+ /**
25269
25869
  * Optional client-side hints sent at session creation to help the provider
25270
25870
  * pick the best native source. All fields optional — a viewer that knows
25271
25871
  * nothing still gets a sane default. (Relocated from the retired `webrtc`
@@ -27054,17 +27654,6 @@ object({
27054
27654
  deviceId: number(),
27055
27655
  status: DeviceStatusSchema
27056
27656
  });
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
27657
  /**
27069
27658
  * Enum-state sensor — a string value picked from a finite option set.
27070
27659
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -33831,42 +34420,6 @@ DeviceType.Camera, method(object({
33831
34420
  package: array(ZoneRuleSchema).readonly()
33832
34421
  });
33833
34422
  /**
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
34423
  * Accessory device helpers — shared across drivers.
33871
34424
  *
33872
34425
  * Many vendor-specific drivers register accessory child devices on
@@ -36666,6 +37219,30 @@ Object.freeze({
36666
37219
  addonId: null,
36667
37220
  access: "create"
36668
37221
  },
37222
+ "deviceExtension.listCandidates": {
37223
+ capName: "device-extension",
37224
+ capScope: "device",
37225
+ addonId: null,
37226
+ access: "view"
37227
+ },
37228
+ "deviceExtension.listSlots": {
37229
+ capName: "device-extension",
37230
+ capScope: "device",
37231
+ addonId: null,
37232
+ access: "view"
37233
+ },
37234
+ "deviceExtension.listSources": {
37235
+ capName: "device-extension",
37236
+ capScope: "device",
37237
+ addonId: null,
37238
+ access: "view"
37239
+ },
37240
+ "deviceExtension.setSlot": {
37241
+ capName: "device-extension",
37242
+ capScope: "device",
37243
+ addonId: null,
37244
+ access: "create"
37245
+ },
36669
37246
  "deviceManager.addLocation": {
36670
37247
  capName: "device-manager",
36671
37248
  capScope: "system",
@@ -36738,12 +37315,6 @@ Object.freeze({
36738
37315
  addonId: null,
36739
37316
  access: "create"
36740
37317
  },
36741
- "deviceManager.applyDeviceSettingsPatch": {
36742
- capName: "device-manager",
36743
- capScope: "system",
36744
- addonId: null,
36745
- access: "create"
36746
- },
36747
37318
  "deviceManager.applyInitialMeta": {
36748
37319
  capName: "device-manager",
36749
37320
  capScope: "system",
@@ -36846,12 +37417,6 @@ Object.freeze({
36846
37417
  addonId: null,
36847
37418
  access: "view"
36848
37419
  },
36849
- "deviceManager.getDeviceLiveContribution": {
36850
- capName: "device-manager",
36851
- capScope: "system",
36852
- addonId: null,
36853
- access: "view"
36854
- },
36855
37420
  "deviceManager.getDeviceLiveInfoAggregate": {
36856
37421
  capName: "device-manager",
36857
37422
  capScope: "system",
@@ -36864,12 +37429,6 @@ Object.freeze({
36864
37429
  addonId: null,
36865
37430
  access: "view"
36866
37431
  },
36867
- "deviceManager.getDeviceSettingsContribution": {
36868
- capName: "device-manager",
36869
- capScope: "system",
36870
- addonId: null,
36871
- access: "view"
36872
- },
36873
37432
  "deviceManager.getDeviceStatusAggregate": {
36874
37433
  capName: "device-manager",
36875
37434
  capScope: "system",
@@ -37374,24 +37933,6 @@ Object.freeze({
37374
37933
  addonId: null,
37375
37934
  access: "view"
37376
37935
  },
37377
- "doorbell.applyDeviceSettingsPatch": {
37378
- capName: "doorbell",
37379
- capScope: "device",
37380
- addonId: null,
37381
- access: "create"
37382
- },
37383
- "doorbell.getDeviceLiveContribution": {
37384
- capName: "doorbell",
37385
- capScope: "device",
37386
- addonId: null,
37387
- access: "view"
37388
- },
37389
- "doorbell.getDeviceSettingsContribution": {
37390
- capName: "doorbell",
37391
- capScope: "device",
37392
- addonId: null,
37393
- access: "view"
37394
- },
37395
37936
  "doorbell.getStatus": {
37396
37937
  capName: "doorbell",
37397
37938
  capScope: "device",
@@ -37416,6 +37957,12 @@ Object.freeze({
37416
37957
  addonId: null,
37417
37958
  access: "view"
37418
37959
  },
37960
+ "embeddingEncoder.resetFailedModels": {
37961
+ capName: "embedding-encoder",
37962
+ capScope: "system",
37963
+ addonId: null,
37964
+ access: "delete"
37965
+ },
37419
37966
  "enumSensor.getStatus": {
37420
37967
  capName: "enum-sensor",
37421
37968
  capScope: "device",
@@ -39750,6 +40297,12 @@ Object.freeze({
39750
40297
  addonId: null,
39751
40298
  access: "view"
39752
40299
  },
40300
+ "pipelineOrchestrator.getClusterModelChoice": {
40301
+ capName: "pipeline-orchestrator",
40302
+ capScope: "system",
40303
+ addonId: null,
40304
+ access: "view"
40305
+ },
39753
40306
  "pipelineOrchestrator.getDeviceLiveContribution": {
39754
40307
  capName: "pipeline-orchestrator",
39755
40308
  capScope: "system",
@@ -42575,6 +43128,26 @@ Object.freeze({
42575
43128
  form: "single",
42576
43129
  optional: false
42577
43130
  }],
43131
+ "deviceExtension.listCandidates": [{
43132
+ name: "deviceId",
43133
+ form: "single",
43134
+ optional: false
43135
+ }],
43136
+ "deviceExtension.listSlots": [{
43137
+ name: "deviceId",
43138
+ form: "single",
43139
+ optional: false
43140
+ }],
43141
+ "deviceExtension.listSources": [{
43142
+ name: "deviceId",
43143
+ form: "single",
43144
+ optional: false
43145
+ }],
43146
+ "deviceExtension.setSlot": [{
43147
+ name: "deviceId",
43148
+ form: "single",
43149
+ optional: false
43150
+ }],
42578
43151
  "deviceManager.adoptionRelease": [{
42579
43152
  name: "camDeviceId",
42580
43153
  form: "single",
@@ -45034,68 +45607,6 @@ TimelapseRuleInputSchema.extend({
45034
45607
  createdAt: number(),
45035
45608
  updatedAt: number()
45036
45609
  });
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
45610
  object({
45100
45611
  /**
45101
45612
  * Fraction of the box's own size added on EACH side before cutting.
@@ -45297,7 +45808,7 @@ var AdminUIAddon = class extends BaseAddon {
45297
45808
  capability: adminUiCapability,
45298
45809
  provider: {
45299
45810
  getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
45300
- getVersion: async () => ({ version: "1.2.272" })
45811
+ getVersion: async () => ({ version: "1.2.274" })
45301
45812
  }
45302
45813
  }];
45303
45814
  }