@camstack/addon-model-studio 1.1.174 → 1.1.175

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 (19) hide show
  1. package/dist/{MotionZonesSettings-DavNeZt1.mjs → MotionZonesSettings-BnPKd-p7.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-bWW0b0eT.mjs → PrivacyMaskSettings-DuPNepvj.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-DuXCuccO.mjs → SceneMonitorEditor-shkSy7R6.mjs} +3 -3
  4. package/dist/_stub.js +12 -12
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-C_y_ArLj.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BtQXSIcN.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CSU-vA08.mjs +26 -0
  7. package/dist/addon-model-studio.css +1 -1
  8. package/dist/{hostInit-nK0BL4EK.mjs → hostInit-v1KM-izE.mjs} +2 -2
  9. package/dist/model-studio.addon.js +640 -124
  10. package/dist/model-studio.addon.mjs +640 -124
  11. package/dist/{player-overlays-BZLfX48i.mjs → player-overlays-XBDUBreN.mjs} +1 -1
  12. package/dist/remoteEntry.js +1 -1
  13. package/dist/{responsive-DAticuj8.mjs → responsive-Ct9r9fcD.mjs} +1 -1
  14. package/dist/{scene-monitor-copy-CuI6S0HF.mjs → scene-monitor-copy-6edUqagK.mjs} +1 -1
  15. package/dist/{square-Dh-K-SIJ.mjs → square-xaUv7lAA.mjs} +1 -1
  16. package/dist/{trash-2-Cuodqp-m.mjs → trash-2-BjU_ykxW.mjs} +1 -1
  17. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-mbmirjVC.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Byr-xHCs.mjs} +1 -1
  18. package/package.json +1 -1
  19. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DwoBFtDL.mjs +0 -26
@@ -5863,7 +5863,7 @@ var ZodIssueCode = {
5863
5863
  var ZodFirstPartyTypeKind;
5864
5864
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5865
5865
  //#endregion
5866
- //#region ../types/dist/sleep-BaRu0bS5.mjs
5866
+ //#region ../types/dist/sleep-BXv0ZcRa.mjs
5867
5867
  /**
5868
5868
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5869
5869
  * window to float samples (D455).
@@ -6648,6 +6648,40 @@ var BaseAddon = class {
6648
6648
  const node = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
6649
6649
  return keys.size > 0 ? projectStore(raw, keys, node) : raw;
6650
6650
  }
6651
+ /**
6652
+ * Whether ONE global key of this addon's store was written, read three-way
6653
+ * (D651). For a question a hydrated view cannot answer: `getGlobalSettings`
6654
+ * reports `value ?? default`, so "the operator chose the default" and "nobody
6655
+ * chose" look the same, and a failed read looks like both. A `perNode` key is
6656
+ * not supported here: its stored name is scoped.
6657
+ */
6658
+ async readStoredGlobalKey(key) {
6659
+ const read = this._ctx?.settings?.readAddonStoreResult;
6660
+ if (read === void 0) return {
6661
+ kind: "unreadable",
6662
+ reason: "three-way-read-unavailable"
6663
+ };
6664
+ let result;
6665
+ try {
6666
+ result = await read.call(this._ctx?.settings);
6667
+ } catch (err) {
6668
+ return {
6669
+ kind: "unreadable",
6670
+ reason: "store-read-failed",
6671
+ error: err instanceof Error ? err.message : String(err)
6672
+ };
6673
+ }
6674
+ if (result.kind === "failed") return {
6675
+ kind: "unreadable",
6676
+ reason: "store-read-failed",
6677
+ error: result.error
6678
+ };
6679
+ if (result.kind === "missing" || !Object.prototype.hasOwnProperty.call(result.value, key)) return { kind: "absent" };
6680
+ return {
6681
+ kind: "present",
6682
+ value: result.value[key]
6683
+ };
6684
+ }
6651
6685
  async updateGlobalSettings(patch, nodeId) {
6652
6686
  const keys = this.perNodeKeys();
6653
6687
  const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
@@ -9971,6 +10005,43 @@ var LogChannelWindowSchema = object({
9971
10005
  /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9972
10006
  deviceIds: array(number().int()).readonly().nullable()
9973
10007
  });
10008
+ var ClipModelMetaSchema = object({
10009
+ /** The paired text encoder's catalog id (the embedding-encoder's text catalog). */
10010
+ textModelId: string().min(1),
10011
+ /** Output dimension of BOTH towers. A vector of any other length is refused. */
10012
+ embeddingDim: number().int().positive(),
10013
+ /**
10014
+ * The `vector-store` index this model's vectors live in. ONE feature space
10015
+ * per index: two models share an index only when their vectors are ranked
10016
+ * against each other, which for CLIP means never across families. MobileCLIP
10017
+ * S1 and S2 share `object-clip` for history (separated by the row's
10018
+ * `modelId`); any other model gets its own.
10019
+ */
10020
+ vectorIndex: string().regex(/^object-clip(-[a-z0-9][a-z0-9-]*)?$/),
10021
+ /**
10022
+ * The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
10023
+ * must be unique per tokenizer: every model's siblings land in ONE flat
10024
+ * models directory, so two different tokenizers under the same name would
10025
+ * silently overwrite each other (whichever model downloaded last wins, and
10026
+ * the other one tokenises with the wrong vocabulary).
10027
+ */
10028
+ tokenizerFile: string().min(1),
10029
+ /** Token window the text graph takes (SigLIP2: 64; CLIP BPE: 77). */
10030
+ contextLength: number().int().positive(),
10031
+ /** Id the tokenizer pads with. */
10032
+ padId: number().int().nonnegative(),
10033
+ /**
10034
+ * The search cosine floor at `strictness: 'loose'` — calibrated per model,
10035
+ * because cosine bands are a property of the model: 0.2 keeps 96% of matched
10036
+ * COCO caption-image pairs on MobileCLIP S1 and 2.7% on SigLIP2.
10037
+ */
10038
+ searchMinScore: number().min(0).max(1)
10039
+ });
10040
+ var ClipSearchStrictnessSchema = _enum([
10041
+ "loose",
10042
+ "balanced",
10043
+ "strict"
10044
+ ]);
9974
10045
  var MODEL_FORMATS = [
9975
10046
  "onnx",
9976
10047
  "coreml",
@@ -10174,7 +10245,14 @@ var ModelCatalogEntrySchema = object({
10174
10245
  * applies (Frigate / COCO public catalog). Set on a custom model whose raw
10175
10246
  * labels already ARE the CamStack macros (Scrypted identity map).
10176
10247
  */
10177
- classMap: DetectionCatalogClassMapSchema.optional()
10248
+ classMap: DetectionCatalogClassMapSchema.optional(),
10249
+ /**
10250
+ * The model's CLIP feature-space contract (text encoder, dimension, vector
10251
+ * index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
10252
+ * CLIP image encoder; its absence is what "not a CLIP model" means to the
10253
+ * embedding encoder and the semantic-search store (D649).
10254
+ */
10255
+ clip: ClipModelMetaSchema.optional()
10178
10256
  });
10179
10257
  var ConvertTargetSchema = discriminatedUnion("format", [object({
10180
10258
  format: literal("openvino"),
@@ -14426,6 +14504,13 @@ var LinkedDeviceSchema = object({
14426
14504
  features: array(string()),
14427
14505
  producesTrackedEvents: boolean().optional()
14428
14506
  });
14507
+ /**
14508
+ * The `linked-devices` extension slot's editable value (D648): the operator's
14509
+ * pick list, exactly what `_linkedDeviceIds` persists. Tree children are NOT
14510
+ * in it — they are always linked and are not a pick.
14511
+ */
14512
+ var LinkedDevicesSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
14513
+ DeviceType.Camera;
14429
14514
  /** One camera's resolved linked set, tagged with the camera it belongs to.
14430
14515
  * The batch answer needs the tag; the single-device answer already has it
14431
14516
  * from the input, which is why `getLinkedDevices` keeps the untagged shape. */
@@ -14951,16 +15036,101 @@ var EmbeddingResultSchema = object({
14951
15036
  embedding: array(number()),
14952
15037
  inferenceMs: number()
14953
15038
  });
15039
+ /** The two CLIP towers the encoder runs; a crash budget is kept per tower. */
15040
+ var EmbeddingTowerSchema = _enum(["image", "text"]);
15041
+ /**
15042
+ * A tower in the terminal `failed` state (D649, D6): it crashed or failed to
15043
+ * load `crashes` times within `windowMs`, and is refused by name until an
15044
+ * operator `resetFailedModels` or a model change — never on a timer.
15045
+ *
15046
+ * `nodeId` is the node whose tower failed. The state lives in THAT node's
15047
+ * encoder process (in memory — a runner respawn clears it), and one node's
15048
+ * answer says nothing about another's.
15049
+ */
15050
+ var EmbeddingFailedModelSchema = object({
15051
+ modelId: string(),
15052
+ tower: EmbeddingTowerSchema,
15053
+ nodeId: string(),
15054
+ crashes: number(),
15055
+ windowMs: number(),
15056
+ sinceMs: number(),
15057
+ lastReason: string()
15058
+ });
15059
+ /**
15060
+ * A model whose REQUIREMENTS can never be met on this node (D649 round 5):
15061
+ * an id the catalog does not know, a model URL answering 404/410, a declared
15062
+ * sibling (the tokenizer) that is not there. After `attempts` failed builds
15063
+ * it is terminally `requirements-failed`, refused by name until an operator
15064
+ * `resetFailedModels` or a model change — the same exits as a crashed tower.
15065
+ */
15066
+ var EmbeddingFailedRequirementSchema = object({
15067
+ modelId: string(),
15068
+ tower: EmbeddingTowerSchema,
15069
+ nodeId: string(),
15070
+ attempts: number(),
15071
+ sinceMs: number(),
15072
+ lastReason: string()
15073
+ });
14954
15074
  var EmbeddingInfoSchema = object({
14955
15075
  modelId: string(),
14956
15076
  embeddingDim: number(),
14957
- ready: boolean()
14958
- });
15077
+ ready: boolean(),
15078
+ /**
15079
+ * The node that answered. Absent only from an encoder older than D649's
15080
+ * crash budget — whose `failedModels` is then UNKNOWN (D315), never "none".
15081
+ */
15082
+ nodeId: string().optional(),
15083
+ /**
15084
+ * Towers in `failed` on the answering node, each row naming it. `undefined`
15085
+ * means the node could not say (pre-budget encoder); a node that has the
15086
+ * budget always answers an array, empty included.
15087
+ */
15088
+ failedModels: array(EmbeddingFailedModelSchema).optional(),
15089
+ /** Models terminally `requirements-failed` on the answering node; same reading as above. */
15090
+ failedRequirements: array(EmbeddingFailedRequirementSchema).optional()
15091
+ });
15092
+ /**
15093
+ * The THREE codes an encoder refusal can carry (D649, D6). Same shape as
15094
+ * `VECTOR_INDEX_DIM_CONFLICT`: the code rides in the MESSAGE, because an
15095
+ * Error's own properties do not survive the UDS/tRPC hop and its message does,
15096
+ * and both sides go through the helpers below — the encoder builds the
15097
+ * refusal, the live detail plane classifies on it to count refusals per
15098
+ * camera instead of logging one warning per track. The bracketed token
15099
+ * carries the code, the model, the tower and the node so a consumer never
15100
+ * parses prose.
15101
+ *
15102
+ * - `EMBEDDING_MODEL_FAILED`: the tower crashed / failed to load past the crash
15103
+ * budget — terminal until `resetFailedModels` or a model change.
15104
+ * - `EMBEDDING_REQUIREMENTS_UNAVAILABLE`: files or runtime not there right now
15105
+ * (a download or Python that failed, or the cooldown after one) — the next
15106
+ * request past the cooldown tries again.
15107
+ * - `EMBEDDING_REQUIREMENTS_FAILED`: the requirements can never be met (unknown
15108
+ * id, 404/410, missing sibling) and the bounded attempts are spent —
15109
+ * terminal, same exits as a crashed tower.
15110
+ */
15111
+ var EMBEDDING_MODEL_FAILED = "embedding-model-failed";
15112
+ var EMBEDDING_REQUIREMENTS_UNAVAILABLE = "embedding-requirements-unavailable";
15113
+ var EMBEDDING_REQUIREMENTS_FAILED = "embedding-requirements-failed";
15114
+ _enum([
15115
+ EMBEDDING_MODEL_FAILED,
15116
+ EMBEDDING_REQUIREMENTS_UNAVAILABLE,
15117
+ EMBEDDING_REQUIREMENTS_FAILED
15118
+ ]);
15119
+ new RegExp(`\\[(${EMBEDDING_MODEL_FAILED}|${EMBEDDING_REQUIREMENTS_UNAVAILABLE}|${EMBEDDING_REQUIREMENTS_FAILED}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);
14959
15120
  method(object({
14960
15121
  crop: _instanceof(Uint8Array),
14961
15122
  width: number(),
14962
15123
  height: number()
14963
- }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
15124
+ }), EmbeddingResultSchema, { auth: "admin" }), method(object({
15125
+ text: string(),
15126
+ modelId: string().min(1).optional()
15127
+ }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" }), method(object({ modelId: string().min(1).optional() }), object({
15128
+ cleared: array(string()),
15129
+ nodeId: string()
15130
+ }), {
15131
+ kind: "mutation",
15132
+ auth: "admin"
15133
+ });
14964
15134
  /**
14965
15135
  * `failure-contribution` — the capability an addon reports its OWN losses
14966
15136
  * through, per camera, with the denominator attached. It stores nothing.
@@ -18372,7 +18542,12 @@ var NcMediaPolicySchema = object({
18372
18542
  * the degrade engine, which drops the video and keeps the still.
18373
18543
  */
18374
18544
  clip: boolean().optional(),
18375
- /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
18545
+ /**
18546
+ * Seconds of footage BEFORE / AFTER the event instant. Absent =
18547
+ * {@link NC_CLIP_PRE_ROLL_DEFAULT_SEC} / {@link NC_CLIP_POST_ROLL_DEFAULT_SEC}
18548
+ * (4 / 6), resolved by the Notification Center at dispatch — deliberately not
18549
+ * a Zod default, so a rule that never chose keeps following the hub's.
18550
+ */
18376
18551
  clipPreRollSec: number().int().min(0).max(30).optional(),
18377
18552
  clipPostRollSec: number().int().min(0).max(30).optional(),
18378
18553
  /**
@@ -19750,6 +19925,130 @@ var OauthIntegrationDescriptorSchema = object({
19750
19925
  });
19751
19926
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
19752
19927
  /**
19928
+ * A model choice has a SCOPE, and a scope change has a workflow.
19929
+ *
19930
+ * ## The two scopes
19931
+ *
19932
+ * Almost every pipeline step's model is a **node** question: which build runs
19933
+ * fastest on THIS accelerator. Two nodes may legitimately answer differently —
19934
+ * a Coral runs the tflite SSD, a Mac runs the coreml YOLO — because the answers
19935
+ * are compared against nothing. They produce boxes, and a box is a box.
19936
+ *
19937
+ * Two steps are not like that. `face-embedding` and `clip-embedding` produce
19938
+ * **vectors that land in ONE shared index** (`identity_samples`,
19939
+ * `vec_object_clip`) and are ranked against each other by cosine similarity.
19940
+ * Cosine similarity between two encoders is not a weak signal, it is a
19941
+ * meaningless number — and nothing inside a vector can tell you it happened.
19942
+ * So for those two steps the model is a **cluster** question with exactly one
19943
+ * answer, stored in exactly one row.
19944
+ *
19945
+ * That is the same argument [D52](../../../../docs/decisions/adr-0052.md) makes
19946
+ * for the crop convention (`detail-crop.ts`), one level up: the crop decides
19947
+ * WHAT pixels the encoder sees, this decides WHICH encoder sees them. Both are
19948
+ * cluster-wide for the same reason and neither may become per-node.
19949
+ *
19950
+ * ## Why the registry lives here and not in the step catalog
19951
+ *
19952
+ * The scope itself is declared on the step, in
19953
+ * `detection-pipeline/registry/step-definitions.ts` (`StepDefinition.modelScope`)
19954
+ * — that is where a new step declares what kind of choice its model is. But the
19955
+ * catalog lives inside `addon-pipeline`, and three packages that must NOT
19956
+ * import an addon need to know the set: the orchestrator (which renders and
19957
+ * stores the row), post-analysis (which pins the row for a re-embed pass) and
19958
+ * admin-ui (which mirrors it). So the set is mirrored here, and
19959
+ * `scripts/check-cluster-model-scope.ts` fails the build when the two disagree.
19960
+ * A hand-copied key that stops matching is exactly how a setting silently stops
19961
+ * arriving while both sides still look correct.
19962
+ *
19963
+ * ## The defaults ARE today's behaviour
19964
+ *
19965
+ * {@link DEFAULT_CLUSTER_STEP_MODELS} reproduces the catalog `defaultModelId`
19966
+ * of both steps. Declaring the scope therefore changes nothing on the day it
19967
+ * ships: the cluster row starts out saying what every node was already doing.
19968
+ * Changing it is legitimate — that is what the knob is for — but it invalidates
19969
+ * the stored vectors of that surface, and must be followed by a re-embed pass
19970
+ * (`face-reembed-pass.ts`, `embedding-rebuild.ts`).
19971
+ */
19972
+ /**
19973
+ * Why the orchestrator cannot say which model the operator chose for a
19974
+ * cluster-scoped step (D651).
19975
+ */
19976
+ var CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS = [
19977
+ "owner-not-ready",
19978
+ "store-read-failed",
19979
+ "three-way-read-unavailable",
19980
+ "invalid-stored",
19981
+ "not-cluster-scoped"
19982
+ ];
19983
+ Object.freeze(Object.fromEntries([{
19984
+ stepId: "face-embedding",
19985
+ label: "Face recognition model",
19986
+ defaultModelId: "auraface-r100",
19987
+ indexName: "the enrolled face gallery",
19988
+ options: [
19989
+ {
19990
+ id: "auraface-r100",
19991
+ label: "AuraFace R100"
19992
+ },
19993
+ {
19994
+ id: "arcface-r100",
19995
+ label: "ArcFace (ResNet34)"
19996
+ },
19997
+ {
19998
+ id: "inception-resnet-v1",
19999
+ label: "Inception ResNet V1"
20000
+ }
20001
+ ]
20002
+ }, {
20003
+ stepId: "clip-embedding",
20004
+ label: "Semantic search model",
20005
+ defaultModelId: "mobileclip-s1",
20006
+ indexName: "the object semantic-search index",
20007
+ options: [
20008
+ {
20009
+ id: "mobileclip-s1",
20010
+ label: "MobileCLIP S1"
20011
+ },
20012
+ {
20013
+ id: "mobileclip-s2",
20014
+ label: "MobileCLIP S2"
20015
+ },
20016
+ {
20017
+ id: "siglip2-b16-224",
20018
+ label: "SigLIP2 B/16 (Apache-2.0)"
20019
+ }
20020
+ ]
20021
+ }].map((s) => [s.stepId, s.defaultModelId])));
20022
+ var CLUSTER_STEP_SETTING_FIELDS = [{
20023
+ stepId: "face-embedding",
20024
+ key: "minLandmarkFaceSize",
20025
+ label: "Min face size for recognition (detection px)",
20026
+ 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.",
20027
+ type: "slider",
20028
+ min: 0,
20029
+ max: 64,
20030
+ step: 2,
20031
+ default: 24
20032
+ }];
20033
+ function clusterStepSettingKey(stepId, fieldKey) {
20034
+ return `clusterStepSetting:${stepId}:${fieldKey}`;
20035
+ }
20036
+ var ClusterSettingNumberSchema = number().finite();
20037
+ function readClusterStepSettings(config) {
20038
+ const out = {};
20039
+ for (const field of CLUSTER_STEP_SETTING_FIELDS) {
20040
+ const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
20041
+ const value = parsed.success ? parsed.data : field.default;
20042
+ const existing = out[field.stepId] ?? {};
20043
+ out[field.stepId] = {
20044
+ ...existing,
20045
+ [field.key]: value
20046
+ };
20047
+ }
20048
+ return out;
20049
+ }
20050
+ readClusterStepSettings({});
20051
+ /**
19753
20052
  * pipeline-analytics — device-scoped wrapper cap. Refines raw
19754
20053
  * per-frame detections emitted by the pipeline runner into tracked
19755
20054
  * objects, per-kind event collections (motion / object / audio), and
@@ -20565,7 +20864,8 @@ var MediaFileKindEnum = _enum([
20565
20864
  "thumbnailSmall",
20566
20865
  "confirmationCrop",
20567
20866
  "debugCrop",
20568
- "sceneFrame"
20867
+ "sceneFrame",
20868
+ "lastSceneFrame"
20569
20869
  ]);
20570
20870
  /**
20571
20871
  * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
@@ -21117,7 +21417,23 @@ var SearchObjectEventsInput = object({
21117
21417
  until: number().optional(),
21118
21418
  classFilter: string().optional(),
21119
21419
  limit: number().default(50),
21120
- minScore: number().min(0).max(1).default(.2)
21420
+ /**
21421
+ * An ABSOLUTE cosine floor. Optional since D649: a floor is a property of the
21422
+ * model (0.2 kept 96% of matched pairs on MobileCLIP S1 and 2.7% on SigLIP2),
21423
+ * so an absent one resolves to the searched model's own `searchMinScore`
21424
+ * scaled by `strictness`. A number sent here is honoured verbatim.
21425
+ */
21426
+ minScore: number().min(0).max(1).optional(),
21427
+ /** Model-relative floor — see `resolveClipSearchMinScore`. Default `loose`. */
21428
+ strictness: ClipSearchStrictnessSchema.optional(),
21429
+ /**
21430
+ * Search THIS CLIP model's index instead of the cluster row's. Every index a
21431
+ * model ever wrote stays searchable until it is wiped (the MobileCLIP index
21432
+ * through a SigLIP2 cutover and its rollback window). An id with no CLIP
21433
+ * metadata is refused; an id other than the cluster row's is ADMIN-only
21434
+ * (`model-override-requires-admin`).
21435
+ */
21436
+ modelId: string().min(1).optional()
21121
21437
  });
21122
21438
  var TrackCascadeCountsSchema = object({
21123
21439
  /** Persisted track roots deleted (authoritative). */
@@ -21252,7 +21568,41 @@ var RebuildObjectEmbeddingsInput = object({
21252
21568
  * comparable, so wiping and rebuilding is the only way to be sure every vector
21253
21569
  * means the same thing.
21254
21570
  */
21255
- var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
21571
+ var WipeObjectEmbeddingsResultSchema = object({
21572
+ deleted: number(),
21573
+ /**
21574
+ * CLIP indexes that could NOT be emptied (unreachable, or refused at their
21575
+ * dimension) — not a clean slate. Additive and optional (D649).
21576
+ */
21577
+ failedIndexes: array(string()).optional()
21578
+ });
21579
+ /**
21580
+ * Why a rebuild did not start, BY NAME — ONE vocabulary for both gates in front
21581
+ * of a pass (D649 over D651). A bare `started: false` read the same for "the
21582
+ * stores are booting" and "the cluster row names a model with no CLIP
21583
+ * metadata", which need different fixes.
21584
+ * - `stores-unavailable` — the analytics stores or the API are not up yet.
21585
+ * - the owner's confirmation of the cluster model (D651, `ClusterPinConfirmer`):
21586
+ * a pass that rewrites an index needs two agreeing reads of the OWNER's
21587
+ * answer (`pipelineOrchestrator.getClusterModelChoice`) — a pass that cannot
21588
+ * name its model does not run (D54):
21589
+ * - the owner's own `unreadable` reasons (`owner-not-ready`,
21590
+ * `store-read-failed`, `three-way-read-unavailable`, `invalid-stored`,
21591
+ * `not-cluster-scoped`);
21592
+ * - `method-unavailable` — the orchestrator predates the method;
21593
+ * - `read-failed` — the call failed or answered something unparseable;
21594
+ * - `reads-disagree` — the two reads named different choices.
21595
+ * - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
21596
+ * index to fill and no dimension to check against (D649).
21597
+ */
21598
+ var RebuildObjectEmbeddingsRefusalSchema = _enum([
21599
+ "stores-unavailable",
21600
+ ...CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS,
21601
+ "method-unavailable",
21602
+ "read-failed",
21603
+ "reads-disagree",
21604
+ "not-a-clip-model"
21605
+ ]);
21256
21606
  /**
21257
21607
  * Acknowledgement that a rebuild STARTED.
21258
21608
  *
@@ -21265,7 +21615,12 @@ var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
21265
21615
  var RebuildObjectEmbeddingsResultSchema = object({
21266
21616
  started: boolean(),
21267
21617
  /** True when a pass was already running; the new request is ignored. */
21268
- alreadyRunning: boolean()
21618
+ alreadyRunning: boolean(),
21619
+ /** Present when the pass refused to start — see `RebuildObjectEmbeddingsRefusalSchema`. */
21620
+ refusal: RebuildObjectEmbeddingsRefusalSchema.optional(),
21621
+ /** The CLIP model the pass pinned, and the index it fills (when it started). */
21622
+ modelId: string().optional(),
21623
+ index: string().optional()
21269
21624
  });
21270
21625
  var RebuildStatusSchema = object({
21271
21626
  running: boolean(),
@@ -21299,7 +21654,11 @@ var RebuildStatusSchema = object({
21299
21654
  startedAtMs: number().nullable(),
21300
21655
  finishedAtMs: number().nullable(),
21301
21656
  /** Present when the pass ended by throwing. */
21302
- error: string().nullable()
21657
+ error: string().nullable(),
21658
+ /** The CLIP model the current / last pass pinned (D54), `null` before any. */
21659
+ modelId: string().nullable(),
21660
+ /** The index that pass fills — `ClipModelMeta.vectorIndex` of `modelId` (D649). */
21661
+ index: string().nullable()
21303
21662
  });
21304
21663
  /**
21305
21664
  * Acknowledgement that a debug-media reclaim STARTED.
@@ -21620,7 +21979,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21620
21979
  deviceId: number(),
21621
21980
  ownerKind: MediaPresenceOwnerKindSchema,
21622
21981
  ownerIds: array(string()).max(5e3)
21623
- }), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
21982
+ }), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly(), { caller: "required" }), method(object({}), WipeObjectEmbeddingsResultSchema, {
21624
21983
  kind: "mutation",
21625
21984
  auth: "admin"
21626
21985
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -22655,6 +23014,17 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
22655
23014
  hubHostnameOverride: string().optional()
22656
23015
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
22657
23016
  /**
23017
+ * What ONE step runs with on ONE roster device for THIS camera (D650): the
23018
+ * device's per-(node,device) base with the camera's override for that device
23019
+ * on top — the same `override ?? base` merge the orchestrator applies to the
23020
+ * elected device (`applyDeviceProvisioning`). Absent `modelId` ⇒ the executor
23021
+ * resolves the device format's default, exactly as on the elected device.
23022
+ */
23023
+ var RunnerJumpStepProvisioningSchema = object({
23024
+ modelId: string().optional(),
23025
+ settings: record(string(), unknown()).optional()
23026
+ });
23027
+ /**
22658
23028
  * One ENABLED inference device on the runner's node, as the step-tree
22659
23029
  * device-jump resolver sees it (phase 1). The orchestrator populates this
22660
23030
  * roster on the attach payload whenever the camera is elected onto a specific
@@ -22666,7 +23036,16 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
22666
23036
  var RunnerInferenceDeviceSchema = object({
22667
23037
  deviceKey: string(),
22668
23038
  weight: number().positive().default(1),
22669
- maxSessions: number().int().positive().nullable().default(null)
23039
+ maxSessions: number().int().positive().nullable().default(null),
23040
+ /**
23041
+ * Per-step provisioning for this camera on THIS device (D650), keyed by step
23042
+ * id. A step the runner jumps here runs with these fields, never with the
23043
+ * elected device's: `modelId` / `settings` are REPLACED on the jumped subtree
23044
+ * (a step absent from the map runs with neither — the target format default).
23045
+ * Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
23046
+ * the elected device's provisioning, as before.
23047
+ */
23048
+ steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
22670
23049
  });
22671
23050
  /**
22672
23051
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
@@ -23541,6 +23920,28 @@ var NodeInferenceDeviceSchema = object({
23541
23920
  */
23542
23921
  exclusion: InferenceDeviceExclusionReasonSchema.nullable()
23543
23922
  });
23923
+ /**
23924
+ * The operator's model choice for one cluster-scoped step, answered by the
23925
+ * addon that OWNS the `clusterModel:*` settings (D651). Three answers, never
23926
+ * folded: a written choice, a key nobody wrote (the cluster runs the default
23927
+ * BY ABSENCE), or no answer. A caller that rewrites an index acts only on the
23928
+ * first two, read twice and agreeing.
23929
+ */
23930
+ var ClusterModelChoiceSchema = discriminatedUnion("kind", [
23931
+ object({
23932
+ kind: literal("stored"),
23933
+ modelId: string()
23934
+ }),
23935
+ object({
23936
+ kind: literal("absent"),
23937
+ defaultModelId: string()
23938
+ }),
23939
+ object({
23940
+ kind: literal("unreadable"),
23941
+ reason: _enum(CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS),
23942
+ error: string().optional()
23943
+ })
23944
+ ]);
23544
23945
  var NodeInferenceDevicesSchema = object({
23545
23946
  nodeId: string(),
23546
23947
  /** False when the node's platform-probe was unreachable (no live device set). */
@@ -23568,10 +23969,17 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
23568
23969
  }), object({ success: literal(true) }), {
23569
23970
  kind: "mutation",
23570
23971
  auth: "admin"
23571
- }), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({ migrated: number() }), {
23972
+ }), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({
23973
+ migrated: number(),
23974
+ skipped: array(object({
23975
+ deviceId: number(),
23976
+ targetNodeId: string(),
23977
+ reason: string()
23978
+ })).default([])
23979
+ }), {
23572
23980
  kind: "mutation",
23573
23981
  auth: "admin"
23574
- }), 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({
23982
+ }), 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({
23575
23983
  nodeId: string(),
23576
23984
  capName: string(),
23577
23985
  addonId: string()
@@ -25871,6 +26279,167 @@ DeviceType.Camera, method(object({
25871
26279
  auth: "protected"
25872
26280
  });
25873
26281
  /**
26282
+ * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
26283
+ * valutatore puro del suo FRONTE.
26284
+ *
26285
+ * Viveva dentro il builtin virtual-doorbell
26286
+ * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
26287
+ * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
26288
+ * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
26289
+ * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
26290
+ * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
26291
+ * SPOSTA qui e il doorbell la ri-esporta.
26292
+ *
26293
+ * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
26294
+ * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
26295
+ * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
26296
+ * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
26297
+ */
26298
+ /**
26299
+ * Known binary / switch source caps → the boolean slice field whose
26300
+ * false→true rise counts as ACTIVE. Every entry is "fire on active".
26301
+ * Sensors whose "active" reading is not a plain boolean (presence's string
26302
+ * state, connectivity's connected flag) are deliberately excluded — a
26303
+ * reconnect is not a doorbell press, and it is not a recording either.
26304
+ */
26305
+ var SOURCE_CAP_ACTIVE_FIELD = {
26306
+ contact: "entryOpen",
26307
+ binary: "on",
26308
+ switch: "on",
26309
+ motion: "detected",
26310
+ flood: "flooded",
26311
+ gas: "detected",
26312
+ smoke: "detected",
26313
+ "carbon-monoxide": "detected",
26314
+ vibration: "detected",
26315
+ tamper: "tampered"
26316
+ };
26317
+ object({
26318
+ /** Ms epoch of the last press. null = never observed since this provider started. */
26319
+ lastPressedAt: number().nullable(),
26320
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
26321
+ pressCountSinceStart: number()
26322
+ });
26323
+ object({
26324
+ deviceId: number(),
26325
+ timestamp: number()
26326
+ });
26327
+ /**
26328
+ * The `doorbell-source` extension slot's editable value (D648): the camera's
26329
+ * virtual-doorbell trigger devices, exactly what the wrapper's
26330
+ * `doorbellSources` persists (as `{ deviceId }` records).
26331
+ */
26332
+ var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
26333
+ DeviceType.Camera;
26334
+ DeviceType.Button, DeviceType.Camera;
26335
+ var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
26336
+ DeviceType.Camera, DeviceType.Camera;
26337
+ /** A slot's editable value, discriminated on `slot`. */
26338
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
26339
+ DeviceType.Camera;
26340
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
26341
+ state: literal("unreachable"),
26342
+ reason: string()
26343
+ })]);
26344
+ /** One provider of slots — the D554 source-listing row. */
26345
+ var ExtensionSourceSchema = object({
26346
+ /** The routing prefix of every `slotRef` this provider serves. */
26347
+ source: string(),
26348
+ label: string(),
26349
+ /** Stamped by the dispatcher from the registry (D557). */
26350
+ addonId: string().optional(),
26351
+ availability: ExtensionSourceAvailabilitySchema
26352
+ });
26353
+ /**
26354
+ * How one picked source stands. `missing` — no such device (deleted, or an id
26355
+ * that never existed); `foreign` — a device the slot's owner cannot read from
26356
+ * (slice 2's cross-owner graft source); `unavailable` — it exists but is not a
26357
+ * valid source now (a container, which is never a pick). A source in any of
26358
+ * these states is SHOWN, never silently dropped or re-pointed.
26359
+ */
26360
+ var ExtensionSourceHealthSchema = _enum([
26361
+ "ok",
26362
+ "missing",
26363
+ "foreign",
26364
+ "unavailable"
26365
+ ]);
26366
+ var ExtensionSlotSourceSchema = object({
26367
+ deviceId: number().int(),
26368
+ /** The device's name, or null when it could not be resolved (`missing`). */
26369
+ name: string().nullable(),
26370
+ health: ExtensionSourceHealthSchema,
26371
+ detail: string().optional()
26372
+ });
26373
+ /**
26374
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
26375
+ * reported read-only, named, never written through this contract (D62). The
26376
+ * virtual doorbell's sources ring only while the wrapper is bound to the
26377
+ * camera, and that binding belongs to `deviceManager.setWrapperActive`.
26378
+ * `unknown` means the gate could not be read; it is not "inactive" (D315).
26379
+ */
26380
+ var ExtensionSlotActivationSchema = object({
26381
+ state: _enum([
26382
+ "active",
26383
+ "inactive",
26384
+ "unknown"
26385
+ ]),
26386
+ authority: string(),
26387
+ detail: string().optional()
26388
+ });
26389
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
26390
+ state: literal("ok"),
26391
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
26392
+ slotRef: string(),
26393
+ slot: ExtensionSlotIdSchema,
26394
+ /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
26395
+ authority: string(),
26396
+ /** graft: its switch. association: null — removing every source is "off". */
26397
+ enabled: boolean().nullable(),
26398
+ /** graft: the cap registered on the host. association: null. */
26399
+ projects: string().nullable(),
26400
+ activation: ExtensionSlotActivationSchema.nullable(),
26401
+ value: ExtensionSlotValueSchema,
26402
+ sources: array(ExtensionSlotSourceSchema)
26403
+ }), object({
26404
+ state: literal("unreachable"),
26405
+ addonId: string(),
26406
+ reason: string()
26407
+ })]);
26408
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
26409
+ deviceId: number().int(),
26410
+ name: string(),
26411
+ type: string(),
26412
+ location: string().nullable(),
26413
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
26414
+ parentName: string().nullable(),
26415
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
26416
+ suggested: boolean(),
26417
+ /** Why it is suggested ("same location"), null when it is not. */
26418
+ reason: string().nullable()
26419
+ })) });
26420
+ /**
26421
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
26422
+ * reloaded the host (or, for an accessory child, its parent) because the
26423
+ * write changed what the host REGISTERS (a graft switched on or off, slice 2).
26424
+ */
26425
+ var ExtensionSetResultSchema = object({
26426
+ applied: literal(true),
26427
+ reload: _enum([
26428
+ "none",
26429
+ "host",
26430
+ "parent"
26431
+ ])
26432
+ });
26433
+ var ExtensionSlotRefInputSchema = object({
26434
+ deviceId: number().int(),
26435
+ slotRef: string().min(1)
26436
+ });
26437
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
26438
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
26439
+ kind: "mutation",
26440
+ auth: "admin"
26441
+ });
26442
+ /**
25874
26443
  * Optional client-side hints sent at session creation to help the provider
25875
26444
  * pick the best native source. All fields optional — a viewer that knows
25876
26445
  * nothing still gets a sane default. (Relocated from the retired `webrtc`
@@ -27659,17 +28228,6 @@ object({
27659
28228
  deviceId: number(),
27660
28229
  status: DeviceStatusSchema
27661
28230
  });
27662
- object({
27663
- /** Ms epoch of the last press. null = never observed since this provider started. */
27664
- lastPressedAt: number().nullable(),
27665
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
27666
- pressCountSinceStart: number()
27667
- });
27668
- object({
27669
- deviceId: number(),
27670
- timestamp: number()
27671
- });
27672
- DeviceType.Button, DeviceType.Camera;
27673
28231
  /**
27674
28232
  * Enum-state sensor — a string value picked from a finite option set.
27675
28233
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -34436,42 +34994,6 @@ DeviceType.Camera, method(object({
34436
34994
  package: array(ZoneRuleSchema).readonly()
34437
34995
  });
34438
34996
  /**
34439
- * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
34440
- * valutatore puro del suo FRONTE.
34441
- *
34442
- * Viveva dentro il builtin virtual-doorbell
34443
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
34444
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
34445
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
34446
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
34447
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
34448
- * SPOSTA qui e il doorbell la ri-esporta.
34449
- *
34450
- * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
34451
- * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
34452
- * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
34453
- * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
34454
- */
34455
- /**
34456
- * Known binary / switch source caps → the boolean slice field whose
34457
- * false→true rise counts as ACTIVE. Every entry is "fire on active".
34458
- * Sensors whose "active" reading is not a plain boolean (presence's string
34459
- * state, connectivity's connected flag) are deliberately excluded — a
34460
- * reconnect is not a doorbell press, and it is not a recording either.
34461
- */
34462
- var SOURCE_CAP_ACTIVE_FIELD = {
34463
- contact: "entryOpen",
34464
- binary: "on",
34465
- switch: "on",
34466
- motion: "detected",
34467
- flood: "flooded",
34468
- gas: "detected",
34469
- smoke: "detected",
34470
- "carbon-monoxide": "detected",
34471
- vibration: "detected",
34472
- tamper: "tampered"
34473
- };
34474
- /**
34475
34997
  * Accessory device helpers — shared across drivers.
34476
34998
  *
34477
34999
  * Many vendor-specific drivers register accessory child devices on
@@ -37271,6 +37793,30 @@ Object.freeze({
37271
37793
  addonId: null,
37272
37794
  access: "create"
37273
37795
  },
37796
+ "deviceExtension.listCandidates": {
37797
+ capName: "device-extension",
37798
+ capScope: "device",
37799
+ addonId: null,
37800
+ access: "view"
37801
+ },
37802
+ "deviceExtension.listSlots": {
37803
+ capName: "device-extension",
37804
+ capScope: "device",
37805
+ addonId: null,
37806
+ access: "view"
37807
+ },
37808
+ "deviceExtension.listSources": {
37809
+ capName: "device-extension",
37810
+ capScope: "device",
37811
+ addonId: null,
37812
+ access: "view"
37813
+ },
37814
+ "deviceExtension.setSlot": {
37815
+ capName: "device-extension",
37816
+ capScope: "device",
37817
+ addonId: null,
37818
+ access: "create"
37819
+ },
37274
37820
  "deviceManager.addLocation": {
37275
37821
  capName: "device-manager",
37276
37822
  capScope: "system",
@@ -38021,6 +38567,12 @@ Object.freeze({
38021
38567
  addonId: null,
38022
38568
  access: "view"
38023
38569
  },
38570
+ "embeddingEncoder.resetFailedModels": {
38571
+ capName: "embedding-encoder",
38572
+ capScope: "system",
38573
+ addonId: null,
38574
+ access: "delete"
38575
+ },
38024
38576
  "enumSensor.getStatus": {
38025
38577
  capName: "enum-sensor",
38026
38578
  capScope: "device",
@@ -40355,6 +40907,12 @@ Object.freeze({
40355
40907
  addonId: null,
40356
40908
  access: "view"
40357
40909
  },
40910
+ "pipelineOrchestrator.getClusterModelChoice": {
40911
+ capName: "pipeline-orchestrator",
40912
+ capScope: "system",
40913
+ addonId: null,
40914
+ access: "view"
40915
+ },
40358
40916
  "pipelineOrchestrator.getDeviceLiveContribution": {
40359
40917
  capName: "pipeline-orchestrator",
40360
40918
  capScope: "system",
@@ -43180,6 +43738,26 @@ Object.freeze({
43180
43738
  form: "single",
43181
43739
  optional: false
43182
43740
  }],
43741
+ "deviceExtension.listCandidates": [{
43742
+ name: "deviceId",
43743
+ form: "single",
43744
+ optional: false
43745
+ }],
43746
+ "deviceExtension.listSlots": [{
43747
+ name: "deviceId",
43748
+ form: "single",
43749
+ optional: false
43750
+ }],
43751
+ "deviceExtension.listSources": [{
43752
+ name: "deviceId",
43753
+ form: "single",
43754
+ optional: false
43755
+ }],
43756
+ "deviceExtension.setSlot": [{
43757
+ name: "deviceId",
43758
+ form: "single",
43759
+ optional: false
43760
+ }],
43183
43761
  "deviceManager.adoptionRelease": [{
43184
43762
  name: "camDeviceId",
43185
43763
  form: "single",
@@ -45639,68 +46217,6 @@ TimelapseRuleInputSchema.extend({
45639
46217
  createdAt: number(),
45640
46218
  updatedAt: number()
45641
46219
  });
45642
- Object.freeze(Object.fromEntries([{
45643
- stepId: "face-embedding",
45644
- label: "Face recognition model",
45645
- defaultModelId: "arcface-r100",
45646
- indexName: "the enrolled face gallery",
45647
- options: [
45648
- {
45649
- id: "arcface-r100",
45650
- label: "ArcFace (ResNet34)"
45651
- },
45652
- {
45653
- id: "auraface-r100",
45654
- label: "AuraFace R100"
45655
- },
45656
- {
45657
- id: "inception-resnet-v1",
45658
- label: "Inception ResNet V1"
45659
- }
45660
- ]
45661
- }, {
45662
- stepId: "clip-embedding",
45663
- label: "Semantic search model",
45664
- defaultModelId: "mobileclip-s1",
45665
- indexName: "the object semantic-search index",
45666
- options: [{
45667
- id: "mobileclip-s1",
45668
- label: "MobileCLIP S1"
45669
- }, {
45670
- id: "mobileclip-s2",
45671
- label: "MobileCLIP S2"
45672
- }]
45673
- }].map((s) => [s.stepId, s.defaultModelId])));
45674
- string().min(1);
45675
- var CLUSTER_STEP_SETTING_FIELDS = [{
45676
- stepId: "face-embedding",
45677
- key: "minLandmarkFaceSize",
45678
- label: "Min face size for recognition (detection px)",
45679
- 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.",
45680
- type: "slider",
45681
- min: 0,
45682
- max: 64,
45683
- step: 2,
45684
- default: 24
45685
- }];
45686
- function clusterStepSettingKey(stepId, fieldKey) {
45687
- return `clusterStepSetting:${stepId}:${fieldKey}`;
45688
- }
45689
- var ClusterSettingNumberSchema = number().finite();
45690
- function readClusterStepSettings(config) {
45691
- const out = {};
45692
- for (const field of CLUSTER_STEP_SETTING_FIELDS) {
45693
- const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
45694
- const value = parsed.success ? parsed.data : field.default;
45695
- const existing = out[field.stepId] ?? {};
45696
- out[field.stepId] = {
45697
- ...existing,
45698
- [field.key]: value
45699
- };
45700
- }
45701
- return out;
45702
- }
45703
- readClusterStepSettings({});
45704
46220
  object({
45705
46221
  /**
45706
46222
  * Fraction of the box's own size added on EACH side before cutting.