@camstack/addon-model-studio 1.1.174 → 1.1.176
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.
- package/dist/{MotionZonesSettings-DavNeZt1.mjs → MotionZonesSettings-BnpvJ5xP.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-bWW0b0eT.mjs → PrivacyMaskSettings-B7PWwVz7.mjs} +4 -4
- package/dist/{SceneMonitorEditor-DuXCuccO.mjs → SceneMonitorEditor-DnFT8BoA.mjs} +3 -3
- package/dist/_stub.js +12 -12
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-C_y_ArLj.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DyLSvcVV.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BIijwyaW.mjs +26 -0
- package/dist/addon-model-studio.css +1 -1
- package/dist/{hostInit-nK0BL4EK.mjs → hostInit-Bt1i3ABN.mjs} +2 -2
- package/dist/model-studio.addon.js +672 -161
- package/dist/model-studio.addon.mjs +672 -161
- package/dist/{player-overlays-BZLfX48i.mjs → player-overlays-Dorp8NvG.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DAticuj8.mjs → responsive-D5frmtog.mjs} +1 -1
- package/dist/{scene-monitor-copy-CuI6S0HF.mjs → scene-monitor-copy-Czk6VgU1.mjs} +1 -1
- package/dist/{square-Dh-K-SIJ.mjs → square-B-8Ri8UR.mjs} +1 -1
- package/dist/{trash-2-Cuodqp-m.mjs → trash-2-C8wBWb92.mjs} +1 -1
- 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-DnqPAdaL.mjs} +1 -1
- package/package.json +1 -1
- 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-
|
|
5866
|
+
//#region ../types/dist/sleep-DC-wdyeS.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,27 @@ 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
|
+
* `trackedDeviceIds` (D655) is the tracked-event opt-in, exactly what
|
|
14513
|
+
* `_linkedDeviceTrackedIds` persists: which linked devices materialize a
|
|
14514
|
+
* synthetic tracked event on the camera. A read always carries it AS STORED
|
|
14515
|
+
* (an absent key reads as `[]`, which is what the resolver makes of it —
|
|
14516
|
+
* NONE). On a write it is optional: absent leaves the opt-in untouched, so a
|
|
14517
|
+
* card built before D655 cannot erase it by saving the pick list. A present
|
|
14518
|
+
* list REPLACES the opt-in; each id must be a pick, a device the camera links
|
|
14519
|
+
* by structure (the row's `impliedSources`: tree children, a picked
|
|
14520
|
+
* container's child) or already stored — so what was read can always be
|
|
14521
|
+
* written back unchanged, and a NEW opt-in outside the linked set is refused.
|
|
14522
|
+
*/
|
|
14523
|
+
var LinkedDevicesSlotValueSchema = object({
|
|
14524
|
+
deviceIds: array(number().int().positive()),
|
|
14525
|
+
trackedDeviceIds: array(number().int().positive()).optional()
|
|
14526
|
+
});
|
|
14527
|
+
DeviceType.Camera;
|
|
14429
14528
|
/** One camera's resolved linked set, tagged with the camera it belongs to.
|
|
14430
14529
|
* The batch answer needs the tag; the single-device answer already has it
|
|
14431
14530
|
* from the input, which is why `getLinkedDevices` keeps the untagged shape. */
|
|
@@ -14951,16 +15050,101 @@ var EmbeddingResultSchema = object({
|
|
|
14951
15050
|
embedding: array(number()),
|
|
14952
15051
|
inferenceMs: number()
|
|
14953
15052
|
});
|
|
15053
|
+
/** The two CLIP towers the encoder runs; a crash budget is kept per tower. */
|
|
15054
|
+
var EmbeddingTowerSchema = _enum(["image", "text"]);
|
|
15055
|
+
/**
|
|
15056
|
+
* A tower in the terminal `failed` state (D649, D6): it crashed or failed to
|
|
15057
|
+
* load `crashes` times within `windowMs`, and is refused by name until an
|
|
15058
|
+
* operator `resetFailedModels` or a model change — never on a timer.
|
|
15059
|
+
*
|
|
15060
|
+
* `nodeId` is the node whose tower failed. The state lives in THAT node's
|
|
15061
|
+
* encoder process (in memory — a runner respawn clears it), and one node's
|
|
15062
|
+
* answer says nothing about another's.
|
|
15063
|
+
*/
|
|
15064
|
+
var EmbeddingFailedModelSchema = object({
|
|
15065
|
+
modelId: string(),
|
|
15066
|
+
tower: EmbeddingTowerSchema,
|
|
15067
|
+
nodeId: string(),
|
|
15068
|
+
crashes: number(),
|
|
15069
|
+
windowMs: number(),
|
|
15070
|
+
sinceMs: number(),
|
|
15071
|
+
lastReason: string()
|
|
15072
|
+
});
|
|
15073
|
+
/**
|
|
15074
|
+
* A model whose REQUIREMENTS can never be met on this node (D649 round 5):
|
|
15075
|
+
* an id the catalog does not know, a model URL answering 404/410, a declared
|
|
15076
|
+
* sibling (the tokenizer) that is not there. After `attempts` failed builds
|
|
15077
|
+
* it is terminally `requirements-failed`, refused by name until an operator
|
|
15078
|
+
* `resetFailedModels` or a model change — the same exits as a crashed tower.
|
|
15079
|
+
*/
|
|
15080
|
+
var EmbeddingFailedRequirementSchema = object({
|
|
15081
|
+
modelId: string(),
|
|
15082
|
+
tower: EmbeddingTowerSchema,
|
|
15083
|
+
nodeId: string(),
|
|
15084
|
+
attempts: number(),
|
|
15085
|
+
sinceMs: number(),
|
|
15086
|
+
lastReason: string()
|
|
15087
|
+
});
|
|
14954
15088
|
var EmbeddingInfoSchema = object({
|
|
14955
15089
|
modelId: string(),
|
|
14956
15090
|
embeddingDim: number(),
|
|
14957
|
-
ready: boolean()
|
|
14958
|
-
|
|
15091
|
+
ready: boolean(),
|
|
15092
|
+
/**
|
|
15093
|
+
* The node that answered. Absent only from an encoder older than D649's
|
|
15094
|
+
* crash budget — whose `failedModels` is then UNKNOWN (D315), never "none".
|
|
15095
|
+
*/
|
|
15096
|
+
nodeId: string().optional(),
|
|
15097
|
+
/**
|
|
15098
|
+
* Towers in `failed` on the answering node, each row naming it. `undefined`
|
|
15099
|
+
* means the node could not say (pre-budget encoder); a node that has the
|
|
15100
|
+
* budget always answers an array, empty included.
|
|
15101
|
+
*/
|
|
15102
|
+
failedModels: array(EmbeddingFailedModelSchema).optional(),
|
|
15103
|
+
/** Models terminally `requirements-failed` on the answering node; same reading as above. */
|
|
15104
|
+
failedRequirements: array(EmbeddingFailedRequirementSchema).optional()
|
|
15105
|
+
});
|
|
15106
|
+
/**
|
|
15107
|
+
* The THREE codes an encoder refusal can carry (D649, D6). Same shape as
|
|
15108
|
+
* `VECTOR_INDEX_DIM_CONFLICT`: the code rides in the MESSAGE, because an
|
|
15109
|
+
* Error's own properties do not survive the UDS/tRPC hop and its message does,
|
|
15110
|
+
* and both sides go through the helpers below — the encoder builds the
|
|
15111
|
+
* refusal, the live detail plane classifies on it to count refusals per
|
|
15112
|
+
* camera instead of logging one warning per track. The bracketed token
|
|
15113
|
+
* carries the code, the model, the tower and the node so a consumer never
|
|
15114
|
+
* parses prose.
|
|
15115
|
+
*
|
|
15116
|
+
* - `EMBEDDING_MODEL_FAILED`: the tower crashed / failed to load past the crash
|
|
15117
|
+
* budget — terminal until `resetFailedModels` or a model change.
|
|
15118
|
+
* - `EMBEDDING_REQUIREMENTS_UNAVAILABLE`: files or runtime not there right now
|
|
15119
|
+
* (a download or Python that failed, or the cooldown after one) — the next
|
|
15120
|
+
* request past the cooldown tries again.
|
|
15121
|
+
* - `EMBEDDING_REQUIREMENTS_FAILED`: the requirements can never be met (unknown
|
|
15122
|
+
* id, 404/410, missing sibling) and the bounded attempts are spent —
|
|
15123
|
+
* terminal, same exits as a crashed tower.
|
|
15124
|
+
*/
|
|
15125
|
+
var EMBEDDING_MODEL_FAILED = "embedding-model-failed";
|
|
15126
|
+
var EMBEDDING_REQUIREMENTS_UNAVAILABLE = "embedding-requirements-unavailable";
|
|
15127
|
+
var EMBEDDING_REQUIREMENTS_FAILED = "embedding-requirements-failed";
|
|
15128
|
+
_enum([
|
|
15129
|
+
EMBEDDING_MODEL_FAILED,
|
|
15130
|
+
EMBEDDING_REQUIREMENTS_UNAVAILABLE,
|
|
15131
|
+
EMBEDDING_REQUIREMENTS_FAILED
|
|
15132
|
+
]);
|
|
15133
|
+
new RegExp(`\\[(${EMBEDDING_MODEL_FAILED}|${EMBEDDING_REQUIREMENTS_UNAVAILABLE}|${EMBEDDING_REQUIREMENTS_FAILED}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);
|
|
14959
15134
|
method(object({
|
|
14960
15135
|
crop: _instanceof(Uint8Array),
|
|
14961
15136
|
width: number(),
|
|
14962
15137
|
height: number()
|
|
14963
|
-
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
15138
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
15139
|
+
text: string(),
|
|
15140
|
+
modelId: string().min(1).optional()
|
|
15141
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" }), method(object({ modelId: string().min(1).optional() }), object({
|
|
15142
|
+
cleared: array(string()),
|
|
15143
|
+
nodeId: string()
|
|
15144
|
+
}), {
|
|
15145
|
+
kind: "mutation",
|
|
15146
|
+
auth: "admin"
|
|
15147
|
+
});
|
|
14964
15148
|
/**
|
|
14965
15149
|
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14966
15150
|
* through, per camera, with the denominator attached. It stores nothing.
|
|
@@ -18372,7 +18556,12 @@ var NcMediaPolicySchema = object({
|
|
|
18372
18556
|
* the degrade engine, which drops the video and keeps the still.
|
|
18373
18557
|
*/
|
|
18374
18558
|
clip: boolean().optional(),
|
|
18375
|
-
/**
|
|
18559
|
+
/**
|
|
18560
|
+
* Seconds of footage BEFORE / AFTER the event instant. Absent =
|
|
18561
|
+
* {@link NC_CLIP_PRE_ROLL_DEFAULT_SEC} / {@link NC_CLIP_POST_ROLL_DEFAULT_SEC}
|
|
18562
|
+
* (4 / 6), resolved by the Notification Center at dispatch — deliberately not
|
|
18563
|
+
* a Zod default, so a rule that never chose keeps following the hub's.
|
|
18564
|
+
*/
|
|
18376
18565
|
clipPreRollSec: number().int().min(0).max(30).optional(),
|
|
18377
18566
|
clipPostRollSec: number().int().min(0).max(30).optional(),
|
|
18378
18567
|
/**
|
|
@@ -19750,6 +19939,130 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
19750
19939
|
});
|
|
19751
19940
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
19752
19941
|
/**
|
|
19942
|
+
* A model choice has a SCOPE, and a scope change has a workflow.
|
|
19943
|
+
*
|
|
19944
|
+
* ## The two scopes
|
|
19945
|
+
*
|
|
19946
|
+
* Almost every pipeline step's model is a **node** question: which build runs
|
|
19947
|
+
* fastest on THIS accelerator. Two nodes may legitimately answer differently —
|
|
19948
|
+
* a Coral runs the tflite SSD, a Mac runs the coreml YOLO — because the answers
|
|
19949
|
+
* are compared against nothing. They produce boxes, and a box is a box.
|
|
19950
|
+
*
|
|
19951
|
+
* Two steps are not like that. `face-embedding` and `clip-embedding` produce
|
|
19952
|
+
* **vectors that land in ONE shared index** (`identity_samples`,
|
|
19953
|
+
* `vec_object_clip`) and are ranked against each other by cosine similarity.
|
|
19954
|
+
* Cosine similarity between two encoders is not a weak signal, it is a
|
|
19955
|
+
* meaningless number — and nothing inside a vector can tell you it happened.
|
|
19956
|
+
* So for those two steps the model is a **cluster** question with exactly one
|
|
19957
|
+
* answer, stored in exactly one row.
|
|
19958
|
+
*
|
|
19959
|
+
* That is the same argument [D52](../../../../docs/decisions/adr-0052.md) makes
|
|
19960
|
+
* for the crop convention (`detail-crop.ts`), one level up: the crop decides
|
|
19961
|
+
* WHAT pixels the encoder sees, this decides WHICH encoder sees them. Both are
|
|
19962
|
+
* cluster-wide for the same reason and neither may become per-node.
|
|
19963
|
+
*
|
|
19964
|
+
* ## Why the registry lives here and not in the step catalog
|
|
19965
|
+
*
|
|
19966
|
+
* The scope itself is declared on the step, in
|
|
19967
|
+
* `detection-pipeline/registry/step-definitions.ts` (`StepDefinition.modelScope`)
|
|
19968
|
+
* — that is where a new step declares what kind of choice its model is. But the
|
|
19969
|
+
* catalog lives inside `addon-pipeline`, and three packages that must NOT
|
|
19970
|
+
* import an addon need to know the set: the orchestrator (which renders and
|
|
19971
|
+
* stores the row), post-analysis (which pins the row for a re-embed pass) and
|
|
19972
|
+
* admin-ui (which mirrors it). So the set is mirrored here, and
|
|
19973
|
+
* `scripts/check-cluster-model-scope.ts` fails the build when the two disagree.
|
|
19974
|
+
* A hand-copied key that stops matching is exactly how a setting silently stops
|
|
19975
|
+
* arriving while both sides still look correct.
|
|
19976
|
+
*
|
|
19977
|
+
* ## The defaults ARE today's behaviour
|
|
19978
|
+
*
|
|
19979
|
+
* {@link DEFAULT_CLUSTER_STEP_MODELS} reproduces the catalog `defaultModelId`
|
|
19980
|
+
* of both steps. Declaring the scope therefore changes nothing on the day it
|
|
19981
|
+
* ships: the cluster row starts out saying what every node was already doing.
|
|
19982
|
+
* Changing it is legitimate — that is what the knob is for — but it invalidates
|
|
19983
|
+
* the stored vectors of that surface, and must be followed by a re-embed pass
|
|
19984
|
+
* (`face-reembed-pass.ts`, `embedding-rebuild.ts`).
|
|
19985
|
+
*/
|
|
19986
|
+
/**
|
|
19987
|
+
* Why the orchestrator cannot say which model the operator chose for a
|
|
19988
|
+
* cluster-scoped step (D651).
|
|
19989
|
+
*/
|
|
19990
|
+
var CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS = [
|
|
19991
|
+
"owner-not-ready",
|
|
19992
|
+
"store-read-failed",
|
|
19993
|
+
"three-way-read-unavailable",
|
|
19994
|
+
"invalid-stored",
|
|
19995
|
+
"not-cluster-scoped"
|
|
19996
|
+
];
|
|
19997
|
+
Object.freeze(Object.fromEntries([{
|
|
19998
|
+
stepId: "face-embedding",
|
|
19999
|
+
label: "Face recognition model",
|
|
20000
|
+
defaultModelId: "auraface-r100",
|
|
20001
|
+
indexName: "the enrolled face gallery",
|
|
20002
|
+
options: [
|
|
20003
|
+
{
|
|
20004
|
+
id: "auraface-r100",
|
|
20005
|
+
label: "AuraFace R100"
|
|
20006
|
+
},
|
|
20007
|
+
{
|
|
20008
|
+
id: "arcface-r100",
|
|
20009
|
+
label: "ArcFace (ResNet34)"
|
|
20010
|
+
},
|
|
20011
|
+
{
|
|
20012
|
+
id: "inception-resnet-v1",
|
|
20013
|
+
label: "Inception ResNet V1"
|
|
20014
|
+
}
|
|
20015
|
+
]
|
|
20016
|
+
}, {
|
|
20017
|
+
stepId: "clip-embedding",
|
|
20018
|
+
label: "Semantic search model",
|
|
20019
|
+
defaultModelId: "mobileclip-s1",
|
|
20020
|
+
indexName: "the object semantic-search index",
|
|
20021
|
+
options: [
|
|
20022
|
+
{
|
|
20023
|
+
id: "mobileclip-s1",
|
|
20024
|
+
label: "MobileCLIP S1"
|
|
20025
|
+
},
|
|
20026
|
+
{
|
|
20027
|
+
id: "mobileclip-s2",
|
|
20028
|
+
label: "MobileCLIP S2"
|
|
20029
|
+
},
|
|
20030
|
+
{
|
|
20031
|
+
id: "siglip2-b16-224",
|
|
20032
|
+
label: "SigLIP2 B/16 (Apache-2.0)"
|
|
20033
|
+
}
|
|
20034
|
+
]
|
|
20035
|
+
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
20036
|
+
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
20037
|
+
stepId: "face-embedding",
|
|
20038
|
+
key: "minLandmarkFaceSize",
|
|
20039
|
+
label: "Min face size for recognition (detection px)",
|
|
20040
|
+
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.",
|
|
20041
|
+
type: "slider",
|
|
20042
|
+
min: 0,
|
|
20043
|
+
max: 64,
|
|
20044
|
+
step: 2,
|
|
20045
|
+
default: 24
|
|
20046
|
+
}];
|
|
20047
|
+
function clusterStepSettingKey(stepId, fieldKey) {
|
|
20048
|
+
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
20049
|
+
}
|
|
20050
|
+
var ClusterSettingNumberSchema = number().finite();
|
|
20051
|
+
function readClusterStepSettings(config) {
|
|
20052
|
+
const out = {};
|
|
20053
|
+
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
20054
|
+
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
20055
|
+
const value = parsed.success ? parsed.data : field.default;
|
|
20056
|
+
const existing = out[field.stepId] ?? {};
|
|
20057
|
+
out[field.stepId] = {
|
|
20058
|
+
...existing,
|
|
20059
|
+
[field.key]: value
|
|
20060
|
+
};
|
|
20061
|
+
}
|
|
20062
|
+
return out;
|
|
20063
|
+
}
|
|
20064
|
+
readClusterStepSettings({});
|
|
20065
|
+
/**
|
|
19753
20066
|
* pipeline-analytics — device-scoped wrapper cap. Refines raw
|
|
19754
20067
|
* per-frame detections emitted by the pipeline runner into tracked
|
|
19755
20068
|
* objects, per-kind event collections (motion / object / audio), and
|
|
@@ -20565,7 +20878,8 @@ var MediaFileKindEnum = _enum([
|
|
|
20565
20878
|
"thumbnailSmall",
|
|
20566
20879
|
"confirmationCrop",
|
|
20567
20880
|
"debugCrop",
|
|
20568
|
-
"sceneFrame"
|
|
20881
|
+
"sceneFrame",
|
|
20882
|
+
"lastSceneFrame"
|
|
20569
20883
|
]);
|
|
20570
20884
|
/**
|
|
20571
20885
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -21117,7 +21431,23 @@ var SearchObjectEventsInput = object({
|
|
|
21117
21431
|
until: number().optional(),
|
|
21118
21432
|
classFilter: string().optional(),
|
|
21119
21433
|
limit: number().default(50),
|
|
21120
|
-
|
|
21434
|
+
/**
|
|
21435
|
+
* An ABSOLUTE cosine floor. Optional since D649: a floor is a property of the
|
|
21436
|
+
* model (0.2 kept 96% of matched pairs on MobileCLIP S1 and 2.7% on SigLIP2),
|
|
21437
|
+
* so an absent one resolves to the searched model's own `searchMinScore`
|
|
21438
|
+
* scaled by `strictness`. A number sent here is honoured verbatim.
|
|
21439
|
+
*/
|
|
21440
|
+
minScore: number().min(0).max(1).optional(),
|
|
21441
|
+
/** Model-relative floor — see `resolveClipSearchMinScore`. Default `loose`. */
|
|
21442
|
+
strictness: ClipSearchStrictnessSchema.optional(),
|
|
21443
|
+
/**
|
|
21444
|
+
* Search THIS CLIP model's index instead of the cluster row's. Every index a
|
|
21445
|
+
* model ever wrote stays searchable until it is wiped (the MobileCLIP index
|
|
21446
|
+
* through a SigLIP2 cutover and its rollback window). An id with no CLIP
|
|
21447
|
+
* metadata is refused; an id other than the cluster row's is ADMIN-only
|
|
21448
|
+
* (`model-override-requires-admin`).
|
|
21449
|
+
*/
|
|
21450
|
+
modelId: string().min(1).optional()
|
|
21121
21451
|
});
|
|
21122
21452
|
var TrackCascadeCountsSchema = object({
|
|
21123
21453
|
/** Persisted track roots deleted (authoritative). */
|
|
@@ -21252,7 +21582,41 @@ var RebuildObjectEmbeddingsInput = object({
|
|
|
21252
21582
|
* comparable, so wiping and rebuilding is the only way to be sure every vector
|
|
21253
21583
|
* means the same thing.
|
|
21254
21584
|
*/
|
|
21255
|
-
var WipeObjectEmbeddingsResultSchema = object({
|
|
21585
|
+
var WipeObjectEmbeddingsResultSchema = object({
|
|
21586
|
+
deleted: number(),
|
|
21587
|
+
/**
|
|
21588
|
+
* CLIP indexes that could NOT be emptied (unreachable, or refused at their
|
|
21589
|
+
* dimension) — not a clean slate. Additive and optional (D649).
|
|
21590
|
+
*/
|
|
21591
|
+
failedIndexes: array(string()).optional()
|
|
21592
|
+
});
|
|
21593
|
+
/**
|
|
21594
|
+
* Why a rebuild did not start, BY NAME — ONE vocabulary for both gates in front
|
|
21595
|
+
* of a pass (D649 over D651). A bare `started: false` read the same for "the
|
|
21596
|
+
* stores are booting" and "the cluster row names a model with no CLIP
|
|
21597
|
+
* metadata", which need different fixes.
|
|
21598
|
+
* - `stores-unavailable` — the analytics stores or the API are not up yet.
|
|
21599
|
+
* - the owner's confirmation of the cluster model (D651, `ClusterPinConfirmer`):
|
|
21600
|
+
* a pass that rewrites an index needs two agreeing reads of the OWNER's
|
|
21601
|
+
* answer (`pipelineOrchestrator.getClusterModelChoice`) — a pass that cannot
|
|
21602
|
+
* name its model does not run (D54):
|
|
21603
|
+
* - the owner's own `unreadable` reasons (`owner-not-ready`,
|
|
21604
|
+
* `store-read-failed`, `three-way-read-unavailable`, `invalid-stored`,
|
|
21605
|
+
* `not-cluster-scoped`);
|
|
21606
|
+
* - `method-unavailable` — the orchestrator predates the method;
|
|
21607
|
+
* - `read-failed` — the call failed or answered something unparseable;
|
|
21608
|
+
* - `reads-disagree` — the two reads named different choices.
|
|
21609
|
+
* - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
|
|
21610
|
+
* index to fill and no dimension to check against (D649).
|
|
21611
|
+
*/
|
|
21612
|
+
var RebuildObjectEmbeddingsRefusalSchema = _enum([
|
|
21613
|
+
"stores-unavailable",
|
|
21614
|
+
...CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS,
|
|
21615
|
+
"method-unavailable",
|
|
21616
|
+
"read-failed",
|
|
21617
|
+
"reads-disagree",
|
|
21618
|
+
"not-a-clip-model"
|
|
21619
|
+
]);
|
|
21256
21620
|
/**
|
|
21257
21621
|
* Acknowledgement that a rebuild STARTED.
|
|
21258
21622
|
*
|
|
@@ -21265,7 +21629,12 @@ var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
|
|
|
21265
21629
|
var RebuildObjectEmbeddingsResultSchema = object({
|
|
21266
21630
|
started: boolean(),
|
|
21267
21631
|
/** True when a pass was already running; the new request is ignored. */
|
|
21268
|
-
alreadyRunning: boolean()
|
|
21632
|
+
alreadyRunning: boolean(),
|
|
21633
|
+
/** Present when the pass refused to start — see `RebuildObjectEmbeddingsRefusalSchema`. */
|
|
21634
|
+
refusal: RebuildObjectEmbeddingsRefusalSchema.optional(),
|
|
21635
|
+
/** The CLIP model the pass pinned, and the index it fills (when it started). */
|
|
21636
|
+
modelId: string().optional(),
|
|
21637
|
+
index: string().optional()
|
|
21269
21638
|
});
|
|
21270
21639
|
var RebuildStatusSchema = object({
|
|
21271
21640
|
running: boolean(),
|
|
@@ -21299,7 +21668,11 @@ var RebuildStatusSchema = object({
|
|
|
21299
21668
|
startedAtMs: number().nullable(),
|
|
21300
21669
|
finishedAtMs: number().nullable(),
|
|
21301
21670
|
/** Present when the pass ended by throwing. */
|
|
21302
|
-
error: string().nullable()
|
|
21671
|
+
error: string().nullable(),
|
|
21672
|
+
/** The CLIP model the current / last pass pinned (D54), `null` before any. */
|
|
21673
|
+
modelId: string().nullable(),
|
|
21674
|
+
/** The index that pass fills — `ClipModelMeta.vectorIndex` of `modelId` (D649). */
|
|
21675
|
+
index: string().nullable()
|
|
21303
21676
|
});
|
|
21304
21677
|
/**
|
|
21305
21678
|
* Acknowledgement that a debug-media reclaim STARTED.
|
|
@@ -21620,7 +21993,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21620
21993
|
deviceId: number(),
|
|
21621
21994
|
ownerKind: MediaPresenceOwnerKindSchema,
|
|
21622
21995
|
ownerIds: array(string()).max(5e3)
|
|
21623
|
-
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21996
|
+
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly(), { caller: "required" }), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21624
21997
|
kind: "mutation",
|
|
21625
21998
|
auth: "admin"
|
|
21626
21999
|
}), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
|
|
@@ -22078,7 +22451,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
22078
22451
|
height: number()
|
|
22079
22452
|
}), { kind: "mutation" }), method(object({
|
|
22080
22453
|
stepId: string(),
|
|
22081
|
-
frameId: number().int()
|
|
22454
|
+
frameId: number().int(),
|
|
22455
|
+
/**
|
|
22456
|
+
* The model to time — REQUIRED (D658). Without it the pool answered the
|
|
22457
|
+
* step's ACTIVE variant (the first loaded after boot), so a benchmark
|
|
22458
|
+
* of model B silently timed model A. Callers pass the `rootModelId`
|
|
22459
|
+
* their warmup `runPipeline` reported: the model that actually ran.
|
|
22460
|
+
*/
|
|
22461
|
+
modelId: string().min(1)
|
|
22082
22462
|
}), record(string(), unknown()), { kind: "mutation" }), method(object({ frameId: number().int() }), _void(), { kind: "mutation" }), method(object({ deviceKey: string().optional() }), EffectiveTuningSchema), method(_void(), array(object({
|
|
22083
22463
|
engineKey: string(),
|
|
22084
22464
|
engine: PipelineEngineChoiceSchema,
|
|
@@ -22655,6 +23035,17 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22655
23035
|
hubHostnameOverride: string().optional()
|
|
22656
23036
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
22657
23037
|
/**
|
|
23038
|
+
* What ONE step runs with on ONE roster device for THIS camera (D650): the
|
|
23039
|
+
* device's per-(node,device) base with the camera's override for that device
|
|
23040
|
+
* on top — the same `override ?? base` merge the orchestrator applies to the
|
|
23041
|
+
* elected device (`applyDeviceProvisioning`). Absent `modelId` ⇒ the executor
|
|
23042
|
+
* resolves the device format's default, exactly as on the elected device.
|
|
23043
|
+
*/
|
|
23044
|
+
var RunnerJumpStepProvisioningSchema = object({
|
|
23045
|
+
modelId: string().optional(),
|
|
23046
|
+
settings: record(string(), unknown()).optional()
|
|
23047
|
+
});
|
|
23048
|
+
/**
|
|
22658
23049
|
* One ENABLED inference device on the runner's node, as the step-tree
|
|
22659
23050
|
* device-jump resolver sees it (phase 1). The orchestrator populates this
|
|
22660
23051
|
* roster on the attach payload whenever the camera is elected onto a specific
|
|
@@ -22666,7 +23057,16 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22666
23057
|
var RunnerInferenceDeviceSchema = object({
|
|
22667
23058
|
deviceKey: string(),
|
|
22668
23059
|
weight: number().positive().default(1),
|
|
22669
|
-
maxSessions: number().int().positive().nullable().default(null)
|
|
23060
|
+
maxSessions: number().int().positive().nullable().default(null),
|
|
23061
|
+
/**
|
|
23062
|
+
* Per-step provisioning for this camera on THIS device (D650), keyed by step
|
|
23063
|
+
* id. A step the runner jumps here runs with these fields, never with the
|
|
23064
|
+
* elected device's: `modelId` / `settings` are REPLACED on the jumped subtree
|
|
23065
|
+
* (a step absent from the map runs with neither — the target format default).
|
|
23066
|
+
* Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
|
|
23067
|
+
* the elected device's provisioning, as before.
|
|
23068
|
+
*/
|
|
23069
|
+
steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
|
|
22670
23070
|
});
|
|
22671
23071
|
/**
|
|
22672
23072
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
@@ -23541,6 +23941,28 @@ var NodeInferenceDeviceSchema = object({
|
|
|
23541
23941
|
*/
|
|
23542
23942
|
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
23543
23943
|
});
|
|
23944
|
+
/**
|
|
23945
|
+
* The operator's model choice for one cluster-scoped step, answered by the
|
|
23946
|
+
* addon that OWNS the `clusterModel:*` settings (D651). Three answers, never
|
|
23947
|
+
* folded: a written choice, a key nobody wrote (the cluster runs the default
|
|
23948
|
+
* BY ABSENCE), or no answer. A caller that rewrites an index acts only on the
|
|
23949
|
+
* first two, read twice and agreeing.
|
|
23950
|
+
*/
|
|
23951
|
+
var ClusterModelChoiceSchema = discriminatedUnion("kind", [
|
|
23952
|
+
object({
|
|
23953
|
+
kind: literal("stored"),
|
|
23954
|
+
modelId: string()
|
|
23955
|
+
}),
|
|
23956
|
+
object({
|
|
23957
|
+
kind: literal("absent"),
|
|
23958
|
+
defaultModelId: string()
|
|
23959
|
+
}),
|
|
23960
|
+
object({
|
|
23961
|
+
kind: literal("unreadable"),
|
|
23962
|
+
reason: _enum(CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS),
|
|
23963
|
+
error: string().optional()
|
|
23964
|
+
})
|
|
23965
|
+
]);
|
|
23544
23966
|
var NodeInferenceDevicesSchema = object({
|
|
23545
23967
|
nodeId: string(),
|
|
23546
23968
|
/** False when the node's platform-probe was unreachable (no live device set). */
|
|
@@ -23568,10 +23990,17 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
23568
23990
|
}), object({ success: literal(true) }), {
|
|
23569
23991
|
kind: "mutation",
|
|
23570
23992
|
auth: "admin"
|
|
23571
|
-
}), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({
|
|
23993
|
+
}), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({
|
|
23994
|
+
migrated: number(),
|
|
23995
|
+
skipped: array(object({
|
|
23996
|
+
deviceId: number(),
|
|
23997
|
+
targetNodeId: string(),
|
|
23998
|
+
reason: string()
|
|
23999
|
+
})).default([])
|
|
24000
|
+
}), {
|
|
23572
24001
|
kind: "mutation",
|
|
23573
24002
|
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({
|
|
24003
|
+
}), 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
24004
|
nodeId: string(),
|
|
23576
24005
|
capName: string(),
|
|
23577
24006
|
addonId: string()
|
|
@@ -25871,6 +26300,177 @@ DeviceType.Camera, method(object({
|
|
|
25871
26300
|
auth: "protected"
|
|
25872
26301
|
});
|
|
25873
26302
|
/**
|
|
26303
|
+
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
26304
|
+
* valutatore puro del suo FRONTE.
|
|
26305
|
+
*
|
|
26306
|
+
* Viveva dentro il builtin virtual-doorbell
|
|
26307
|
+
* (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
|
|
26308
|
+
* predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
|
|
26309
|
+
* `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
|
|
26310
|
+
* tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
|
|
26311
|
+
* fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
|
|
26312
|
+
* SPOSTA qui e il doorbell la ri-esporta.
|
|
26313
|
+
*
|
|
26314
|
+
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
26315
|
+
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
26316
|
+
* regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
|
|
26317
|
+
* booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
|
|
26318
|
+
*/
|
|
26319
|
+
/**
|
|
26320
|
+
* Known binary / switch source caps → the boolean slice field whose
|
|
26321
|
+
* false→true rise counts as ACTIVE. Every entry is "fire on active".
|
|
26322
|
+
* Sensors whose "active" reading is not a plain boolean (presence's string
|
|
26323
|
+
* state, connectivity's connected flag) are deliberately excluded — a
|
|
26324
|
+
* reconnect is not a doorbell press, and it is not a recording either.
|
|
26325
|
+
*/
|
|
26326
|
+
var SOURCE_CAP_ACTIVE_FIELD = {
|
|
26327
|
+
contact: "entryOpen",
|
|
26328
|
+
binary: "on",
|
|
26329
|
+
switch: "on",
|
|
26330
|
+
motion: "detected",
|
|
26331
|
+
flood: "flooded",
|
|
26332
|
+
gas: "detected",
|
|
26333
|
+
smoke: "detected",
|
|
26334
|
+
"carbon-monoxide": "detected",
|
|
26335
|
+
vibration: "detected",
|
|
26336
|
+
tamper: "tampered"
|
|
26337
|
+
};
|
|
26338
|
+
object({
|
|
26339
|
+
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
26340
|
+
lastPressedAt: number().nullable(),
|
|
26341
|
+
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
26342
|
+
pressCountSinceStart: number()
|
|
26343
|
+
});
|
|
26344
|
+
object({
|
|
26345
|
+
deviceId: number(),
|
|
26346
|
+
timestamp: number()
|
|
26347
|
+
});
|
|
26348
|
+
/**
|
|
26349
|
+
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
26350
|
+
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
26351
|
+
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
26352
|
+
*/
|
|
26353
|
+
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
26354
|
+
DeviceType.Camera;
|
|
26355
|
+
DeviceType.Button, DeviceType.Camera;
|
|
26356
|
+
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
26357
|
+
DeviceType.Camera, DeviceType.Camera;
|
|
26358
|
+
/** A slot's editable value, discriminated on `slot`. */
|
|
26359
|
+
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
26360
|
+
DeviceType.Camera;
|
|
26361
|
+
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
26362
|
+
state: literal("unreachable"),
|
|
26363
|
+
reason: string()
|
|
26364
|
+
})]);
|
|
26365
|
+
/** One provider of slots — the D554 source-listing row. */
|
|
26366
|
+
var ExtensionSourceSchema = object({
|
|
26367
|
+
/** The routing prefix of every `slotRef` this provider serves. */
|
|
26368
|
+
source: string(),
|
|
26369
|
+
label: string(),
|
|
26370
|
+
/** Stamped by the dispatcher from the registry (D557). */
|
|
26371
|
+
addonId: string().optional(),
|
|
26372
|
+
availability: ExtensionSourceAvailabilitySchema
|
|
26373
|
+
});
|
|
26374
|
+
/**
|
|
26375
|
+
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
26376
|
+
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
26377
|
+
* (slice 2's cross-owner graft source); `unavailable` — it exists but is not a
|
|
26378
|
+
* valid source now (a container, which is never a pick). A source in any of
|
|
26379
|
+
* these states is SHOWN, never silently dropped or re-pointed.
|
|
26380
|
+
*/
|
|
26381
|
+
var ExtensionSourceHealthSchema = _enum([
|
|
26382
|
+
"ok",
|
|
26383
|
+
"missing",
|
|
26384
|
+
"foreign",
|
|
26385
|
+
"unavailable"
|
|
26386
|
+
]);
|
|
26387
|
+
var ExtensionSlotSourceSchema = object({
|
|
26388
|
+
deviceId: number().int(),
|
|
26389
|
+
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
26390
|
+
name: string().nullable(),
|
|
26391
|
+
health: ExtensionSourceHealthSchema,
|
|
26392
|
+
detail: string().optional()
|
|
26393
|
+
});
|
|
26394
|
+
/**
|
|
26395
|
+
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
26396
|
+
* reported read-only, named, never written through this contract (D62). The
|
|
26397
|
+
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
26398
|
+
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
26399
|
+
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
26400
|
+
*/
|
|
26401
|
+
var ExtensionSlotActivationSchema = object({
|
|
26402
|
+
state: _enum([
|
|
26403
|
+
"active",
|
|
26404
|
+
"inactive",
|
|
26405
|
+
"unknown"
|
|
26406
|
+
]),
|
|
26407
|
+
authority: string(),
|
|
26408
|
+
detail: string().optional()
|
|
26409
|
+
});
|
|
26410
|
+
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
26411
|
+
state: literal("ok"),
|
|
26412
|
+
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
26413
|
+
slotRef: string(),
|
|
26414
|
+
slot: ExtensionSlotIdSchema,
|
|
26415
|
+
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
26416
|
+
authority: string(),
|
|
26417
|
+
/** graft: its switch. association: null — removing every source is "off". */
|
|
26418
|
+
enabled: boolean().nullable(),
|
|
26419
|
+
/** graft: the cap registered on the host. association: null. */
|
|
26420
|
+
projects: string().nullable(),
|
|
26421
|
+
activation: ExtensionSlotActivationSchema.nullable(),
|
|
26422
|
+
value: ExtensionSlotValueSchema,
|
|
26423
|
+
sources: array(ExtensionSlotSourceSchema),
|
|
26424
|
+
/**
|
|
26425
|
+
* Devices the owner links to the host ON ITS OWN, by structure, and that
|
|
26426
|
+
* are therefore not in `value` (D655): a camera's device-tree children, and
|
|
26427
|
+
* the child a picked container stands for (D356 — a container is never a
|
|
26428
|
+
* pick, its children are). Read-only; the editor shows them and may offer
|
|
26429
|
+
* per-device options on them (the linked-devices tracked-event opt-in).
|
|
26430
|
+
* Absent when the owner links nothing beyond the picks, and from an owner
|
|
26431
|
+
* older than D655.
|
|
26432
|
+
*/
|
|
26433
|
+
impliedSources: array(ExtensionSlotSourceSchema).optional()
|
|
26434
|
+
}), object({
|
|
26435
|
+
state: literal("unreachable"),
|
|
26436
|
+
addonId: string(),
|
|
26437
|
+
reason: string()
|
|
26438
|
+
})]);
|
|
26439
|
+
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
26440
|
+
deviceId: number().int(),
|
|
26441
|
+
name: string(),
|
|
26442
|
+
type: string(),
|
|
26443
|
+
location: string().nullable(),
|
|
26444
|
+
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
26445
|
+
parentName: string().nullable(),
|
|
26446
|
+
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
26447
|
+
suggested: boolean(),
|
|
26448
|
+
/** Why it is suggested ("same location"), null when it is not. */
|
|
26449
|
+
reason: string().nullable()
|
|
26450
|
+
})) });
|
|
26451
|
+
/**
|
|
26452
|
+
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
26453
|
+
* reloaded the host (or, for an accessory child, its parent) because the
|
|
26454
|
+
* write changed what the host REGISTERS (a graft switched on or off, slice 2).
|
|
26455
|
+
*/
|
|
26456
|
+
var ExtensionSetResultSchema = object({
|
|
26457
|
+
applied: literal(true),
|
|
26458
|
+
reload: _enum([
|
|
26459
|
+
"none",
|
|
26460
|
+
"host",
|
|
26461
|
+
"parent"
|
|
26462
|
+
])
|
|
26463
|
+
});
|
|
26464
|
+
var ExtensionSlotRefInputSchema = object({
|
|
26465
|
+
deviceId: number().int(),
|
|
26466
|
+
slotRef: string().min(1)
|
|
26467
|
+
});
|
|
26468
|
+
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
26469
|
+
method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
26470
|
+
kind: "mutation",
|
|
26471
|
+
auth: "admin"
|
|
26472
|
+
});
|
|
26473
|
+
/**
|
|
25874
26474
|
* Optional client-side hints sent at session creation to help the provider
|
|
25875
26475
|
* pick the best native source. All fields optional — a viewer that knows
|
|
25876
26476
|
* nothing still gets a sane default. (Relocated from the retired `webrtc`
|
|
@@ -27659,17 +28259,6 @@ object({
|
|
|
27659
28259
|
deviceId: number(),
|
|
27660
28260
|
status: DeviceStatusSchema
|
|
27661
28261
|
});
|
|
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
28262
|
/**
|
|
27674
28263
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
27675
28264
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -34436,42 +35025,6 @@ DeviceType.Camera, method(object({
|
|
|
34436
35025
|
package: array(ZoneRuleSchema).readonly()
|
|
34437
35026
|
});
|
|
34438
35027
|
/**
|
|
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
35028
|
* Accessory device helpers — shared across drivers.
|
|
34476
35029
|
*
|
|
34477
35030
|
* Many vendor-specific drivers register accessory child devices on
|
|
@@ -37271,6 +37824,30 @@ Object.freeze({
|
|
|
37271
37824
|
addonId: null,
|
|
37272
37825
|
access: "create"
|
|
37273
37826
|
},
|
|
37827
|
+
"deviceExtension.listCandidates": {
|
|
37828
|
+
capName: "device-extension",
|
|
37829
|
+
capScope: "device",
|
|
37830
|
+
addonId: null,
|
|
37831
|
+
access: "view"
|
|
37832
|
+
},
|
|
37833
|
+
"deviceExtension.listSlots": {
|
|
37834
|
+
capName: "device-extension",
|
|
37835
|
+
capScope: "device",
|
|
37836
|
+
addonId: null,
|
|
37837
|
+
access: "view"
|
|
37838
|
+
},
|
|
37839
|
+
"deviceExtension.listSources": {
|
|
37840
|
+
capName: "device-extension",
|
|
37841
|
+
capScope: "device",
|
|
37842
|
+
addonId: null,
|
|
37843
|
+
access: "view"
|
|
37844
|
+
},
|
|
37845
|
+
"deviceExtension.setSlot": {
|
|
37846
|
+
capName: "device-extension",
|
|
37847
|
+
capScope: "device",
|
|
37848
|
+
addonId: null,
|
|
37849
|
+
access: "create"
|
|
37850
|
+
},
|
|
37274
37851
|
"deviceManager.addLocation": {
|
|
37275
37852
|
capName: "device-manager",
|
|
37276
37853
|
capScope: "system",
|
|
@@ -37343,12 +37920,6 @@ Object.freeze({
|
|
|
37343
37920
|
addonId: null,
|
|
37344
37921
|
access: "create"
|
|
37345
37922
|
},
|
|
37346
|
-
"deviceManager.applyDeviceSettingsPatch": {
|
|
37347
|
-
capName: "device-manager",
|
|
37348
|
-
capScope: "system",
|
|
37349
|
-
addonId: null,
|
|
37350
|
-
access: "create"
|
|
37351
|
-
},
|
|
37352
37923
|
"deviceManager.applyInitialMeta": {
|
|
37353
37924
|
capName: "device-manager",
|
|
37354
37925
|
capScope: "system",
|
|
@@ -37451,12 +38022,6 @@ Object.freeze({
|
|
|
37451
38022
|
addonId: null,
|
|
37452
38023
|
access: "view"
|
|
37453
38024
|
},
|
|
37454
|
-
"deviceManager.getDeviceLiveContribution": {
|
|
37455
|
-
capName: "device-manager",
|
|
37456
|
-
capScope: "system",
|
|
37457
|
-
addonId: null,
|
|
37458
|
-
access: "view"
|
|
37459
|
-
},
|
|
37460
38025
|
"deviceManager.getDeviceLiveInfoAggregate": {
|
|
37461
38026
|
capName: "device-manager",
|
|
37462
38027
|
capScope: "system",
|
|
@@ -37469,12 +38034,6 @@ Object.freeze({
|
|
|
37469
38034
|
addonId: null,
|
|
37470
38035
|
access: "view"
|
|
37471
38036
|
},
|
|
37472
|
-
"deviceManager.getDeviceSettingsContribution": {
|
|
37473
|
-
capName: "device-manager",
|
|
37474
|
-
capScope: "system",
|
|
37475
|
-
addonId: null,
|
|
37476
|
-
access: "view"
|
|
37477
|
-
},
|
|
37478
38037
|
"deviceManager.getDeviceStatusAggregate": {
|
|
37479
38038
|
capName: "device-manager",
|
|
37480
38039
|
capScope: "system",
|
|
@@ -37979,24 +38538,6 @@ Object.freeze({
|
|
|
37979
38538
|
addonId: null,
|
|
37980
38539
|
access: "view"
|
|
37981
38540
|
},
|
|
37982
|
-
"doorbell.applyDeviceSettingsPatch": {
|
|
37983
|
-
capName: "doorbell",
|
|
37984
|
-
capScope: "device",
|
|
37985
|
-
addonId: null,
|
|
37986
|
-
access: "create"
|
|
37987
|
-
},
|
|
37988
|
-
"doorbell.getDeviceLiveContribution": {
|
|
37989
|
-
capName: "doorbell",
|
|
37990
|
-
capScope: "device",
|
|
37991
|
-
addonId: null,
|
|
37992
|
-
access: "view"
|
|
37993
|
-
},
|
|
37994
|
-
"doorbell.getDeviceSettingsContribution": {
|
|
37995
|
-
capName: "doorbell",
|
|
37996
|
-
capScope: "device",
|
|
37997
|
-
addonId: null,
|
|
37998
|
-
access: "view"
|
|
37999
|
-
},
|
|
38000
38541
|
"doorbell.getStatus": {
|
|
38001
38542
|
capName: "doorbell",
|
|
38002
38543
|
capScope: "device",
|
|
@@ -38021,6 +38562,12 @@ Object.freeze({
|
|
|
38021
38562
|
addonId: null,
|
|
38022
38563
|
access: "view"
|
|
38023
38564
|
},
|
|
38565
|
+
"embeddingEncoder.resetFailedModels": {
|
|
38566
|
+
capName: "embedding-encoder",
|
|
38567
|
+
capScope: "system",
|
|
38568
|
+
addonId: null,
|
|
38569
|
+
access: "delete"
|
|
38570
|
+
},
|
|
38024
38571
|
"enumSensor.getStatus": {
|
|
38025
38572
|
capName: "enum-sensor",
|
|
38026
38573
|
capScope: "device",
|
|
@@ -40355,6 +40902,12 @@ Object.freeze({
|
|
|
40355
40902
|
addonId: null,
|
|
40356
40903
|
access: "view"
|
|
40357
40904
|
},
|
|
40905
|
+
"pipelineOrchestrator.getClusterModelChoice": {
|
|
40906
|
+
capName: "pipeline-orchestrator",
|
|
40907
|
+
capScope: "system",
|
|
40908
|
+
addonId: null,
|
|
40909
|
+
access: "view"
|
|
40910
|
+
},
|
|
40358
40911
|
"pipelineOrchestrator.getDeviceLiveContribution": {
|
|
40359
40912
|
capName: "pipeline-orchestrator",
|
|
40360
40913
|
capScope: "system",
|
|
@@ -43180,6 +43733,26 @@ Object.freeze({
|
|
|
43180
43733
|
form: "single",
|
|
43181
43734
|
optional: false
|
|
43182
43735
|
}],
|
|
43736
|
+
"deviceExtension.listCandidates": [{
|
|
43737
|
+
name: "deviceId",
|
|
43738
|
+
form: "single",
|
|
43739
|
+
optional: false
|
|
43740
|
+
}],
|
|
43741
|
+
"deviceExtension.listSlots": [{
|
|
43742
|
+
name: "deviceId",
|
|
43743
|
+
form: "single",
|
|
43744
|
+
optional: false
|
|
43745
|
+
}],
|
|
43746
|
+
"deviceExtension.listSources": [{
|
|
43747
|
+
name: "deviceId",
|
|
43748
|
+
form: "single",
|
|
43749
|
+
optional: false
|
|
43750
|
+
}],
|
|
43751
|
+
"deviceExtension.setSlot": [{
|
|
43752
|
+
name: "deviceId",
|
|
43753
|
+
form: "single",
|
|
43754
|
+
optional: false
|
|
43755
|
+
}],
|
|
43183
43756
|
"deviceManager.adoptionRelease": [{
|
|
43184
43757
|
name: "camDeviceId",
|
|
43185
43758
|
form: "single",
|
|
@@ -45639,68 +46212,6 @@ TimelapseRuleInputSchema.extend({
|
|
|
45639
46212
|
createdAt: number(),
|
|
45640
46213
|
updatedAt: number()
|
|
45641
46214
|
});
|
|
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
46215
|
object({
|
|
45705
46216
|
/**
|
|
45706
46217
|
* Fraction of the box's own size added on EACH side before cutting.
|