@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
|
@@ -5884,7 +5884,7 @@ var ZodIssueCode = {
|
|
|
5884
5884
|
var ZodFirstPartyTypeKind;
|
|
5885
5885
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5886
5886
|
//#endregion
|
|
5887
|
-
//#region ../types/dist/sleep-
|
|
5887
|
+
//#region ../types/dist/sleep-DC-wdyeS.mjs
|
|
5888
5888
|
/**
|
|
5889
5889
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5890
5890
|
* window to float samples (D455).
|
|
@@ -6669,6 +6669,40 @@ var BaseAddon = class {
|
|
|
6669
6669
|
const node = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6670
6670
|
return keys.size > 0 ? projectStore(raw, keys, node) : raw;
|
|
6671
6671
|
}
|
|
6672
|
+
/**
|
|
6673
|
+
* Whether ONE global key of this addon's store was written, read three-way
|
|
6674
|
+
* (D651). For a question a hydrated view cannot answer: `getGlobalSettings`
|
|
6675
|
+
* reports `value ?? default`, so "the operator chose the default" and "nobody
|
|
6676
|
+
* chose" look the same, and a failed read looks like both. A `perNode` key is
|
|
6677
|
+
* not supported here: its stored name is scoped.
|
|
6678
|
+
*/
|
|
6679
|
+
async readStoredGlobalKey(key) {
|
|
6680
|
+
const read = this._ctx?.settings?.readAddonStoreResult;
|
|
6681
|
+
if (read === void 0) return {
|
|
6682
|
+
kind: "unreadable",
|
|
6683
|
+
reason: "three-way-read-unavailable"
|
|
6684
|
+
};
|
|
6685
|
+
let result;
|
|
6686
|
+
try {
|
|
6687
|
+
result = await read.call(this._ctx?.settings);
|
|
6688
|
+
} catch (err) {
|
|
6689
|
+
return {
|
|
6690
|
+
kind: "unreadable",
|
|
6691
|
+
reason: "store-read-failed",
|
|
6692
|
+
error: err instanceof Error ? err.message : String(err)
|
|
6693
|
+
};
|
|
6694
|
+
}
|
|
6695
|
+
if (result.kind === "failed") return {
|
|
6696
|
+
kind: "unreadable",
|
|
6697
|
+
reason: "store-read-failed",
|
|
6698
|
+
error: result.error
|
|
6699
|
+
};
|
|
6700
|
+
if (result.kind === "missing" || !Object.prototype.hasOwnProperty.call(result.value, key)) return { kind: "absent" };
|
|
6701
|
+
return {
|
|
6702
|
+
kind: "present",
|
|
6703
|
+
value: result.value[key]
|
|
6704
|
+
};
|
|
6705
|
+
}
|
|
6672
6706
|
async updateGlobalSettings(patch, nodeId) {
|
|
6673
6707
|
const keys = this.perNodeKeys();
|
|
6674
6708
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
@@ -9992,6 +10026,43 @@ var LogChannelWindowSchema = object({
|
|
|
9992
10026
|
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
9993
10027
|
deviceIds: array(number().int()).readonly().nullable()
|
|
9994
10028
|
});
|
|
10029
|
+
var ClipModelMetaSchema = object({
|
|
10030
|
+
/** The paired text encoder's catalog id (the embedding-encoder's text catalog). */
|
|
10031
|
+
textModelId: string().min(1),
|
|
10032
|
+
/** Output dimension of BOTH towers. A vector of any other length is refused. */
|
|
10033
|
+
embeddingDim: number().int().positive(),
|
|
10034
|
+
/**
|
|
10035
|
+
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
10036
|
+
* per index: two models share an index only when their vectors are ranked
|
|
10037
|
+
* against each other, which for CLIP means never across families. MobileCLIP
|
|
10038
|
+
* S1 and S2 share `object-clip` for history (separated by the row's
|
|
10039
|
+
* `modelId`); any other model gets its own.
|
|
10040
|
+
*/
|
|
10041
|
+
vectorIndex: string().regex(/^object-clip(-[a-z0-9][a-z0-9-]*)?$/),
|
|
10042
|
+
/**
|
|
10043
|
+
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
10044
|
+
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
10045
|
+
* models directory, so two different tokenizers under the same name would
|
|
10046
|
+
* silently overwrite each other (whichever model downloaded last wins, and
|
|
10047
|
+
* the other one tokenises with the wrong vocabulary).
|
|
10048
|
+
*/
|
|
10049
|
+
tokenizerFile: string().min(1),
|
|
10050
|
+
/** Token window the text graph takes (SigLIP2: 64; CLIP BPE: 77). */
|
|
10051
|
+
contextLength: number().int().positive(),
|
|
10052
|
+
/** Id the tokenizer pads with. */
|
|
10053
|
+
padId: number().int().nonnegative(),
|
|
10054
|
+
/**
|
|
10055
|
+
* The search cosine floor at `strictness: 'loose'` — calibrated per model,
|
|
10056
|
+
* because cosine bands are a property of the model: 0.2 keeps 96% of matched
|
|
10057
|
+
* COCO caption-image pairs on MobileCLIP S1 and 2.7% on SigLIP2.
|
|
10058
|
+
*/
|
|
10059
|
+
searchMinScore: number().min(0).max(1)
|
|
10060
|
+
});
|
|
10061
|
+
var ClipSearchStrictnessSchema = _enum([
|
|
10062
|
+
"loose",
|
|
10063
|
+
"balanced",
|
|
10064
|
+
"strict"
|
|
10065
|
+
]);
|
|
9995
10066
|
var MODEL_FORMATS = [
|
|
9996
10067
|
"onnx",
|
|
9997
10068
|
"coreml",
|
|
@@ -10195,7 +10266,14 @@ var ModelCatalogEntrySchema = object({
|
|
|
10195
10266
|
* applies (Frigate / COCO public catalog). Set on a custom model whose raw
|
|
10196
10267
|
* labels already ARE the CamStack macros (Scrypted identity map).
|
|
10197
10268
|
*/
|
|
10198
|
-
classMap: DetectionCatalogClassMapSchema.optional()
|
|
10269
|
+
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
10270
|
+
/**
|
|
10271
|
+
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
10272
|
+
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
10273
|
+
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
10274
|
+
* embedding encoder and the semantic-search store (D649).
|
|
10275
|
+
*/
|
|
10276
|
+
clip: ClipModelMetaSchema.optional()
|
|
10199
10277
|
});
|
|
10200
10278
|
var ConvertTargetSchema = discriminatedUnion("format", [object({
|
|
10201
10279
|
format: literal("openvino"),
|
|
@@ -14447,6 +14525,27 @@ var LinkedDeviceSchema = object({
|
|
|
14447
14525
|
features: array(string()),
|
|
14448
14526
|
producesTrackedEvents: boolean().optional()
|
|
14449
14527
|
});
|
|
14528
|
+
/**
|
|
14529
|
+
* The `linked-devices` extension slot's editable value (D648): the operator's
|
|
14530
|
+
* pick list, exactly what `_linkedDeviceIds` persists. Tree children are NOT
|
|
14531
|
+
* in it — they are always linked and are not a pick.
|
|
14532
|
+
*
|
|
14533
|
+
* `trackedDeviceIds` (D655) is the tracked-event opt-in, exactly what
|
|
14534
|
+
* `_linkedDeviceTrackedIds` persists: which linked devices materialize a
|
|
14535
|
+
* synthetic tracked event on the camera. A read always carries it AS STORED
|
|
14536
|
+
* (an absent key reads as `[]`, which is what the resolver makes of it —
|
|
14537
|
+
* NONE). On a write it is optional: absent leaves the opt-in untouched, so a
|
|
14538
|
+
* card built before D655 cannot erase it by saving the pick list. A present
|
|
14539
|
+
* list REPLACES the opt-in; each id must be a pick, a device the camera links
|
|
14540
|
+
* by structure (the row's `impliedSources`: tree children, a picked
|
|
14541
|
+
* container's child) or already stored — so what was read can always be
|
|
14542
|
+
* written back unchanged, and a NEW opt-in outside the linked set is refused.
|
|
14543
|
+
*/
|
|
14544
|
+
var LinkedDevicesSlotValueSchema = object({
|
|
14545
|
+
deviceIds: array(number().int().positive()),
|
|
14546
|
+
trackedDeviceIds: array(number().int().positive()).optional()
|
|
14547
|
+
});
|
|
14548
|
+
DeviceType.Camera;
|
|
14450
14549
|
/** One camera's resolved linked set, tagged with the camera it belongs to.
|
|
14451
14550
|
* The batch answer needs the tag; the single-device answer already has it
|
|
14452
14551
|
* from the input, which is why `getLinkedDevices` keeps the untagged shape. */
|
|
@@ -14972,16 +15071,101 @@ var EmbeddingResultSchema = object({
|
|
|
14972
15071
|
embedding: array(number()),
|
|
14973
15072
|
inferenceMs: number()
|
|
14974
15073
|
});
|
|
15074
|
+
/** The two CLIP towers the encoder runs; a crash budget is kept per tower. */
|
|
15075
|
+
var EmbeddingTowerSchema = _enum(["image", "text"]);
|
|
15076
|
+
/**
|
|
15077
|
+
* A tower in the terminal `failed` state (D649, D6): it crashed or failed to
|
|
15078
|
+
* load `crashes` times within `windowMs`, and is refused by name until an
|
|
15079
|
+
* operator `resetFailedModels` or a model change — never on a timer.
|
|
15080
|
+
*
|
|
15081
|
+
* `nodeId` is the node whose tower failed. The state lives in THAT node's
|
|
15082
|
+
* encoder process (in memory — a runner respawn clears it), and one node's
|
|
15083
|
+
* answer says nothing about another's.
|
|
15084
|
+
*/
|
|
15085
|
+
var EmbeddingFailedModelSchema = object({
|
|
15086
|
+
modelId: string(),
|
|
15087
|
+
tower: EmbeddingTowerSchema,
|
|
15088
|
+
nodeId: string(),
|
|
15089
|
+
crashes: number(),
|
|
15090
|
+
windowMs: number(),
|
|
15091
|
+
sinceMs: number(),
|
|
15092
|
+
lastReason: string()
|
|
15093
|
+
});
|
|
15094
|
+
/**
|
|
15095
|
+
* A model whose REQUIREMENTS can never be met on this node (D649 round 5):
|
|
15096
|
+
* an id the catalog does not know, a model URL answering 404/410, a declared
|
|
15097
|
+
* sibling (the tokenizer) that is not there. After `attempts` failed builds
|
|
15098
|
+
* it is terminally `requirements-failed`, refused by name until an operator
|
|
15099
|
+
* `resetFailedModels` or a model change — the same exits as a crashed tower.
|
|
15100
|
+
*/
|
|
15101
|
+
var EmbeddingFailedRequirementSchema = object({
|
|
15102
|
+
modelId: string(),
|
|
15103
|
+
tower: EmbeddingTowerSchema,
|
|
15104
|
+
nodeId: string(),
|
|
15105
|
+
attempts: number(),
|
|
15106
|
+
sinceMs: number(),
|
|
15107
|
+
lastReason: string()
|
|
15108
|
+
});
|
|
14975
15109
|
var EmbeddingInfoSchema = object({
|
|
14976
15110
|
modelId: string(),
|
|
14977
15111
|
embeddingDim: number(),
|
|
14978
|
-
ready: boolean()
|
|
14979
|
-
|
|
15112
|
+
ready: boolean(),
|
|
15113
|
+
/**
|
|
15114
|
+
* The node that answered. Absent only from an encoder older than D649's
|
|
15115
|
+
* crash budget — whose `failedModels` is then UNKNOWN (D315), never "none".
|
|
15116
|
+
*/
|
|
15117
|
+
nodeId: string().optional(),
|
|
15118
|
+
/**
|
|
15119
|
+
* Towers in `failed` on the answering node, each row naming it. `undefined`
|
|
15120
|
+
* means the node could not say (pre-budget encoder); a node that has the
|
|
15121
|
+
* budget always answers an array, empty included.
|
|
15122
|
+
*/
|
|
15123
|
+
failedModels: array(EmbeddingFailedModelSchema).optional(),
|
|
15124
|
+
/** Models terminally `requirements-failed` on the answering node; same reading as above. */
|
|
15125
|
+
failedRequirements: array(EmbeddingFailedRequirementSchema).optional()
|
|
15126
|
+
});
|
|
15127
|
+
/**
|
|
15128
|
+
* The THREE codes an encoder refusal can carry (D649, D6). Same shape as
|
|
15129
|
+
* `VECTOR_INDEX_DIM_CONFLICT`: the code rides in the MESSAGE, because an
|
|
15130
|
+
* Error's own properties do not survive the UDS/tRPC hop and its message does,
|
|
15131
|
+
* and both sides go through the helpers below — the encoder builds the
|
|
15132
|
+
* refusal, the live detail plane classifies on it to count refusals per
|
|
15133
|
+
* camera instead of logging one warning per track. The bracketed token
|
|
15134
|
+
* carries the code, the model, the tower and the node so a consumer never
|
|
15135
|
+
* parses prose.
|
|
15136
|
+
*
|
|
15137
|
+
* - `EMBEDDING_MODEL_FAILED`: the tower crashed / failed to load past the crash
|
|
15138
|
+
* budget — terminal until `resetFailedModels` or a model change.
|
|
15139
|
+
* - `EMBEDDING_REQUIREMENTS_UNAVAILABLE`: files or runtime not there right now
|
|
15140
|
+
* (a download or Python that failed, or the cooldown after one) — the next
|
|
15141
|
+
* request past the cooldown tries again.
|
|
15142
|
+
* - `EMBEDDING_REQUIREMENTS_FAILED`: the requirements can never be met (unknown
|
|
15143
|
+
* id, 404/410, missing sibling) and the bounded attempts are spent —
|
|
15144
|
+
* terminal, same exits as a crashed tower.
|
|
15145
|
+
*/
|
|
15146
|
+
var EMBEDDING_MODEL_FAILED = "embedding-model-failed";
|
|
15147
|
+
var EMBEDDING_REQUIREMENTS_UNAVAILABLE = "embedding-requirements-unavailable";
|
|
15148
|
+
var EMBEDDING_REQUIREMENTS_FAILED = "embedding-requirements-failed";
|
|
15149
|
+
_enum([
|
|
15150
|
+
EMBEDDING_MODEL_FAILED,
|
|
15151
|
+
EMBEDDING_REQUIREMENTS_UNAVAILABLE,
|
|
15152
|
+
EMBEDDING_REQUIREMENTS_FAILED
|
|
15153
|
+
]);
|
|
15154
|
+
new RegExp(`\\[(${EMBEDDING_MODEL_FAILED}|${EMBEDDING_REQUIREMENTS_UNAVAILABLE}|${EMBEDDING_REQUIREMENTS_FAILED}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);
|
|
14980
15155
|
method(object({
|
|
14981
15156
|
crop: _instanceof(Uint8Array),
|
|
14982
15157
|
width: number(),
|
|
14983
15158
|
height: number()
|
|
14984
|
-
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
15159
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
15160
|
+
text: string(),
|
|
15161
|
+
modelId: string().min(1).optional()
|
|
15162
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" }), method(object({ modelId: string().min(1).optional() }), object({
|
|
15163
|
+
cleared: array(string()),
|
|
15164
|
+
nodeId: string()
|
|
15165
|
+
}), {
|
|
15166
|
+
kind: "mutation",
|
|
15167
|
+
auth: "admin"
|
|
15168
|
+
});
|
|
14985
15169
|
/**
|
|
14986
15170
|
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14987
15171
|
* through, per camera, with the denominator attached. It stores nothing.
|
|
@@ -18393,7 +18577,12 @@ var NcMediaPolicySchema = object({
|
|
|
18393
18577
|
* the degrade engine, which drops the video and keeps the still.
|
|
18394
18578
|
*/
|
|
18395
18579
|
clip: boolean().optional(),
|
|
18396
|
-
/**
|
|
18580
|
+
/**
|
|
18581
|
+
* Seconds of footage BEFORE / AFTER the event instant. Absent =
|
|
18582
|
+
* {@link NC_CLIP_PRE_ROLL_DEFAULT_SEC} / {@link NC_CLIP_POST_ROLL_DEFAULT_SEC}
|
|
18583
|
+
* (4 / 6), resolved by the Notification Center at dispatch — deliberately not
|
|
18584
|
+
* a Zod default, so a rule that never chose keeps following the hub's.
|
|
18585
|
+
*/
|
|
18397
18586
|
clipPreRollSec: number().int().min(0).max(30).optional(),
|
|
18398
18587
|
clipPostRollSec: number().int().min(0).max(30).optional(),
|
|
18399
18588
|
/**
|
|
@@ -19771,6 +19960,130 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
19771
19960
|
});
|
|
19772
19961
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
19773
19962
|
/**
|
|
19963
|
+
* A model choice has a SCOPE, and a scope change has a workflow.
|
|
19964
|
+
*
|
|
19965
|
+
* ## The two scopes
|
|
19966
|
+
*
|
|
19967
|
+
* Almost every pipeline step's model is a **node** question: which build runs
|
|
19968
|
+
* fastest on THIS accelerator. Two nodes may legitimately answer differently —
|
|
19969
|
+
* a Coral runs the tflite SSD, a Mac runs the coreml YOLO — because the answers
|
|
19970
|
+
* are compared against nothing. They produce boxes, and a box is a box.
|
|
19971
|
+
*
|
|
19972
|
+
* Two steps are not like that. `face-embedding` and `clip-embedding` produce
|
|
19973
|
+
* **vectors that land in ONE shared index** (`identity_samples`,
|
|
19974
|
+
* `vec_object_clip`) and are ranked against each other by cosine similarity.
|
|
19975
|
+
* Cosine similarity between two encoders is not a weak signal, it is a
|
|
19976
|
+
* meaningless number — and nothing inside a vector can tell you it happened.
|
|
19977
|
+
* So for those two steps the model is a **cluster** question with exactly one
|
|
19978
|
+
* answer, stored in exactly one row.
|
|
19979
|
+
*
|
|
19980
|
+
* That is the same argument [D52](../../../../docs/decisions/adr-0052.md) makes
|
|
19981
|
+
* for the crop convention (`detail-crop.ts`), one level up: the crop decides
|
|
19982
|
+
* WHAT pixels the encoder sees, this decides WHICH encoder sees them. Both are
|
|
19983
|
+
* cluster-wide for the same reason and neither may become per-node.
|
|
19984
|
+
*
|
|
19985
|
+
* ## Why the registry lives here and not in the step catalog
|
|
19986
|
+
*
|
|
19987
|
+
* The scope itself is declared on the step, in
|
|
19988
|
+
* `detection-pipeline/registry/step-definitions.ts` (`StepDefinition.modelScope`)
|
|
19989
|
+
* — that is where a new step declares what kind of choice its model is. But the
|
|
19990
|
+
* catalog lives inside `addon-pipeline`, and three packages that must NOT
|
|
19991
|
+
* import an addon need to know the set: the orchestrator (which renders and
|
|
19992
|
+
* stores the row), post-analysis (which pins the row for a re-embed pass) and
|
|
19993
|
+
* admin-ui (which mirrors it). So the set is mirrored here, and
|
|
19994
|
+
* `scripts/check-cluster-model-scope.ts` fails the build when the two disagree.
|
|
19995
|
+
* A hand-copied key that stops matching is exactly how a setting silently stops
|
|
19996
|
+
* arriving while both sides still look correct.
|
|
19997
|
+
*
|
|
19998
|
+
* ## The defaults ARE today's behaviour
|
|
19999
|
+
*
|
|
20000
|
+
* {@link DEFAULT_CLUSTER_STEP_MODELS} reproduces the catalog `defaultModelId`
|
|
20001
|
+
* of both steps. Declaring the scope therefore changes nothing on the day it
|
|
20002
|
+
* ships: the cluster row starts out saying what every node was already doing.
|
|
20003
|
+
* Changing it is legitimate — that is what the knob is for — but it invalidates
|
|
20004
|
+
* the stored vectors of that surface, and must be followed by a re-embed pass
|
|
20005
|
+
* (`face-reembed-pass.ts`, `embedding-rebuild.ts`).
|
|
20006
|
+
*/
|
|
20007
|
+
/**
|
|
20008
|
+
* Why the orchestrator cannot say which model the operator chose for a
|
|
20009
|
+
* cluster-scoped step (D651).
|
|
20010
|
+
*/
|
|
20011
|
+
var CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS = [
|
|
20012
|
+
"owner-not-ready",
|
|
20013
|
+
"store-read-failed",
|
|
20014
|
+
"three-way-read-unavailable",
|
|
20015
|
+
"invalid-stored",
|
|
20016
|
+
"not-cluster-scoped"
|
|
20017
|
+
];
|
|
20018
|
+
Object.freeze(Object.fromEntries([{
|
|
20019
|
+
stepId: "face-embedding",
|
|
20020
|
+
label: "Face recognition model",
|
|
20021
|
+
defaultModelId: "auraface-r100",
|
|
20022
|
+
indexName: "the enrolled face gallery",
|
|
20023
|
+
options: [
|
|
20024
|
+
{
|
|
20025
|
+
id: "auraface-r100",
|
|
20026
|
+
label: "AuraFace R100"
|
|
20027
|
+
},
|
|
20028
|
+
{
|
|
20029
|
+
id: "arcface-r100",
|
|
20030
|
+
label: "ArcFace (ResNet34)"
|
|
20031
|
+
},
|
|
20032
|
+
{
|
|
20033
|
+
id: "inception-resnet-v1",
|
|
20034
|
+
label: "Inception ResNet V1"
|
|
20035
|
+
}
|
|
20036
|
+
]
|
|
20037
|
+
}, {
|
|
20038
|
+
stepId: "clip-embedding",
|
|
20039
|
+
label: "Semantic search model",
|
|
20040
|
+
defaultModelId: "mobileclip-s1",
|
|
20041
|
+
indexName: "the object semantic-search index",
|
|
20042
|
+
options: [
|
|
20043
|
+
{
|
|
20044
|
+
id: "mobileclip-s1",
|
|
20045
|
+
label: "MobileCLIP S1"
|
|
20046
|
+
},
|
|
20047
|
+
{
|
|
20048
|
+
id: "mobileclip-s2",
|
|
20049
|
+
label: "MobileCLIP S2"
|
|
20050
|
+
},
|
|
20051
|
+
{
|
|
20052
|
+
id: "siglip2-b16-224",
|
|
20053
|
+
label: "SigLIP2 B/16 (Apache-2.0)"
|
|
20054
|
+
}
|
|
20055
|
+
]
|
|
20056
|
+
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
20057
|
+
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
20058
|
+
stepId: "face-embedding",
|
|
20059
|
+
key: "minLandmarkFaceSize",
|
|
20060
|
+
label: "Min face size for recognition (detection px)",
|
|
20061
|
+
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.",
|
|
20062
|
+
type: "slider",
|
|
20063
|
+
min: 0,
|
|
20064
|
+
max: 64,
|
|
20065
|
+
step: 2,
|
|
20066
|
+
default: 24
|
|
20067
|
+
}];
|
|
20068
|
+
function clusterStepSettingKey(stepId, fieldKey) {
|
|
20069
|
+
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
20070
|
+
}
|
|
20071
|
+
var ClusterSettingNumberSchema = number().finite();
|
|
20072
|
+
function readClusterStepSettings(config) {
|
|
20073
|
+
const out = {};
|
|
20074
|
+
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
20075
|
+
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
20076
|
+
const value = parsed.success ? parsed.data : field.default;
|
|
20077
|
+
const existing = out[field.stepId] ?? {};
|
|
20078
|
+
out[field.stepId] = {
|
|
20079
|
+
...existing,
|
|
20080
|
+
[field.key]: value
|
|
20081
|
+
};
|
|
20082
|
+
}
|
|
20083
|
+
return out;
|
|
20084
|
+
}
|
|
20085
|
+
readClusterStepSettings({});
|
|
20086
|
+
/**
|
|
19774
20087
|
* pipeline-analytics — device-scoped wrapper cap. Refines raw
|
|
19775
20088
|
* per-frame detections emitted by the pipeline runner into tracked
|
|
19776
20089
|
* objects, per-kind event collections (motion / object / audio), and
|
|
@@ -20586,7 +20899,8 @@ var MediaFileKindEnum = _enum([
|
|
|
20586
20899
|
"thumbnailSmall",
|
|
20587
20900
|
"confirmationCrop",
|
|
20588
20901
|
"debugCrop",
|
|
20589
|
-
"sceneFrame"
|
|
20902
|
+
"sceneFrame",
|
|
20903
|
+
"lastSceneFrame"
|
|
20590
20904
|
]);
|
|
20591
20905
|
/**
|
|
20592
20906
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -21138,7 +21452,23 @@ var SearchObjectEventsInput = object({
|
|
|
21138
21452
|
until: number().optional(),
|
|
21139
21453
|
classFilter: string().optional(),
|
|
21140
21454
|
limit: number().default(50),
|
|
21141
|
-
|
|
21455
|
+
/**
|
|
21456
|
+
* An ABSOLUTE cosine floor. Optional since D649: a floor is a property of the
|
|
21457
|
+
* model (0.2 kept 96% of matched pairs on MobileCLIP S1 and 2.7% on SigLIP2),
|
|
21458
|
+
* so an absent one resolves to the searched model's own `searchMinScore`
|
|
21459
|
+
* scaled by `strictness`. A number sent here is honoured verbatim.
|
|
21460
|
+
*/
|
|
21461
|
+
minScore: number().min(0).max(1).optional(),
|
|
21462
|
+
/** Model-relative floor — see `resolveClipSearchMinScore`. Default `loose`. */
|
|
21463
|
+
strictness: ClipSearchStrictnessSchema.optional(),
|
|
21464
|
+
/**
|
|
21465
|
+
* Search THIS CLIP model's index instead of the cluster row's. Every index a
|
|
21466
|
+
* model ever wrote stays searchable until it is wiped (the MobileCLIP index
|
|
21467
|
+
* through a SigLIP2 cutover and its rollback window). An id with no CLIP
|
|
21468
|
+
* metadata is refused; an id other than the cluster row's is ADMIN-only
|
|
21469
|
+
* (`model-override-requires-admin`).
|
|
21470
|
+
*/
|
|
21471
|
+
modelId: string().min(1).optional()
|
|
21142
21472
|
});
|
|
21143
21473
|
var TrackCascadeCountsSchema = object({
|
|
21144
21474
|
/** Persisted track roots deleted (authoritative). */
|
|
@@ -21273,7 +21603,41 @@ var RebuildObjectEmbeddingsInput = object({
|
|
|
21273
21603
|
* comparable, so wiping and rebuilding is the only way to be sure every vector
|
|
21274
21604
|
* means the same thing.
|
|
21275
21605
|
*/
|
|
21276
|
-
var WipeObjectEmbeddingsResultSchema = object({
|
|
21606
|
+
var WipeObjectEmbeddingsResultSchema = object({
|
|
21607
|
+
deleted: number(),
|
|
21608
|
+
/**
|
|
21609
|
+
* CLIP indexes that could NOT be emptied (unreachable, or refused at their
|
|
21610
|
+
* dimension) — not a clean slate. Additive and optional (D649).
|
|
21611
|
+
*/
|
|
21612
|
+
failedIndexes: array(string()).optional()
|
|
21613
|
+
});
|
|
21614
|
+
/**
|
|
21615
|
+
* Why a rebuild did not start, BY NAME — ONE vocabulary for both gates in front
|
|
21616
|
+
* of a pass (D649 over D651). A bare `started: false` read the same for "the
|
|
21617
|
+
* stores are booting" and "the cluster row names a model with no CLIP
|
|
21618
|
+
* metadata", which need different fixes.
|
|
21619
|
+
* - `stores-unavailable` — the analytics stores or the API are not up yet.
|
|
21620
|
+
* - the owner's confirmation of the cluster model (D651, `ClusterPinConfirmer`):
|
|
21621
|
+
* a pass that rewrites an index needs two agreeing reads of the OWNER's
|
|
21622
|
+
* answer (`pipelineOrchestrator.getClusterModelChoice`) — a pass that cannot
|
|
21623
|
+
* name its model does not run (D54):
|
|
21624
|
+
* - the owner's own `unreadable` reasons (`owner-not-ready`,
|
|
21625
|
+
* `store-read-failed`, `three-way-read-unavailable`, `invalid-stored`,
|
|
21626
|
+
* `not-cluster-scoped`);
|
|
21627
|
+
* - `method-unavailable` — the orchestrator predates the method;
|
|
21628
|
+
* - `read-failed` — the call failed or answered something unparseable;
|
|
21629
|
+
* - `reads-disagree` — the two reads named different choices.
|
|
21630
|
+
* - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
|
|
21631
|
+
* index to fill and no dimension to check against (D649).
|
|
21632
|
+
*/
|
|
21633
|
+
var RebuildObjectEmbeddingsRefusalSchema = _enum([
|
|
21634
|
+
"stores-unavailable",
|
|
21635
|
+
...CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS,
|
|
21636
|
+
"method-unavailable",
|
|
21637
|
+
"read-failed",
|
|
21638
|
+
"reads-disagree",
|
|
21639
|
+
"not-a-clip-model"
|
|
21640
|
+
]);
|
|
21277
21641
|
/**
|
|
21278
21642
|
* Acknowledgement that a rebuild STARTED.
|
|
21279
21643
|
*
|
|
@@ -21286,7 +21650,12 @@ var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
|
|
|
21286
21650
|
var RebuildObjectEmbeddingsResultSchema = object({
|
|
21287
21651
|
started: boolean(),
|
|
21288
21652
|
/** True when a pass was already running; the new request is ignored. */
|
|
21289
|
-
alreadyRunning: boolean()
|
|
21653
|
+
alreadyRunning: boolean(),
|
|
21654
|
+
/** Present when the pass refused to start — see `RebuildObjectEmbeddingsRefusalSchema`. */
|
|
21655
|
+
refusal: RebuildObjectEmbeddingsRefusalSchema.optional(),
|
|
21656
|
+
/** The CLIP model the pass pinned, and the index it fills (when it started). */
|
|
21657
|
+
modelId: string().optional(),
|
|
21658
|
+
index: string().optional()
|
|
21290
21659
|
});
|
|
21291
21660
|
var RebuildStatusSchema = object({
|
|
21292
21661
|
running: boolean(),
|
|
@@ -21320,7 +21689,11 @@ var RebuildStatusSchema = object({
|
|
|
21320
21689
|
startedAtMs: number().nullable(),
|
|
21321
21690
|
finishedAtMs: number().nullable(),
|
|
21322
21691
|
/** Present when the pass ended by throwing. */
|
|
21323
|
-
error: string().nullable()
|
|
21692
|
+
error: string().nullable(),
|
|
21693
|
+
/** The CLIP model the current / last pass pinned (D54), `null` before any. */
|
|
21694
|
+
modelId: string().nullable(),
|
|
21695
|
+
/** The index that pass fills — `ClipModelMeta.vectorIndex` of `modelId` (D649). */
|
|
21696
|
+
index: string().nullable()
|
|
21324
21697
|
});
|
|
21325
21698
|
/**
|
|
21326
21699
|
* Acknowledgement that a debug-media reclaim STARTED.
|
|
@@ -21641,7 +22014,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21641
22014
|
deviceId: number(),
|
|
21642
22015
|
ownerKind: MediaPresenceOwnerKindSchema,
|
|
21643
22016
|
ownerIds: array(string()).max(5e3)
|
|
21644
|
-
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
22017
|
+
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly(), { caller: "required" }), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21645
22018
|
kind: "mutation",
|
|
21646
22019
|
auth: "admin"
|
|
21647
22020
|
}), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
|
|
@@ -22099,7 +22472,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
22099
22472
|
height: number()
|
|
22100
22473
|
}), { kind: "mutation" }), method(object({
|
|
22101
22474
|
stepId: string(),
|
|
22102
|
-
frameId: number().int()
|
|
22475
|
+
frameId: number().int(),
|
|
22476
|
+
/**
|
|
22477
|
+
* The model to time — REQUIRED (D658). Without it the pool answered the
|
|
22478
|
+
* step's ACTIVE variant (the first loaded after boot), so a benchmark
|
|
22479
|
+
* of model B silently timed model A. Callers pass the `rootModelId`
|
|
22480
|
+
* their warmup `runPipeline` reported: the model that actually ran.
|
|
22481
|
+
*/
|
|
22482
|
+
modelId: string().min(1)
|
|
22103
22483
|
}), record(string(), unknown()), { kind: "mutation" }), method(object({ frameId: number().int() }), _void(), { kind: "mutation" }), method(object({ deviceKey: string().optional() }), EffectiveTuningSchema), method(_void(), array(object({
|
|
22104
22484
|
engineKey: string(),
|
|
22105
22485
|
engine: PipelineEngineChoiceSchema,
|
|
@@ -22676,6 +23056,17 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22676
23056
|
hubHostnameOverride: string().optional()
|
|
22677
23057
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
22678
23058
|
/**
|
|
23059
|
+
* What ONE step runs with on ONE roster device for THIS camera (D650): the
|
|
23060
|
+
* device's per-(node,device) base with the camera's override for that device
|
|
23061
|
+
* on top — the same `override ?? base` merge the orchestrator applies to the
|
|
23062
|
+
* elected device (`applyDeviceProvisioning`). Absent `modelId` ⇒ the executor
|
|
23063
|
+
* resolves the device format's default, exactly as on the elected device.
|
|
23064
|
+
*/
|
|
23065
|
+
var RunnerJumpStepProvisioningSchema = object({
|
|
23066
|
+
modelId: string().optional(),
|
|
23067
|
+
settings: record(string(), unknown()).optional()
|
|
23068
|
+
});
|
|
23069
|
+
/**
|
|
22679
23070
|
* One ENABLED inference device on the runner's node, as the step-tree
|
|
22680
23071
|
* device-jump resolver sees it (phase 1). The orchestrator populates this
|
|
22681
23072
|
* roster on the attach payload whenever the camera is elected onto a specific
|
|
@@ -22687,7 +23078,16 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22687
23078
|
var RunnerInferenceDeviceSchema = object({
|
|
22688
23079
|
deviceKey: string(),
|
|
22689
23080
|
weight: number().positive().default(1),
|
|
22690
|
-
maxSessions: number().int().positive().nullable().default(null)
|
|
23081
|
+
maxSessions: number().int().positive().nullable().default(null),
|
|
23082
|
+
/**
|
|
23083
|
+
* Per-step provisioning for this camera on THIS device (D650), keyed by step
|
|
23084
|
+
* id. A step the runner jumps here runs with these fields, never with the
|
|
23085
|
+
* elected device's: `modelId` / `settings` are REPLACED on the jumped subtree
|
|
23086
|
+
* (a step absent from the map runs with neither — the target format default).
|
|
23087
|
+
* Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
|
|
23088
|
+
* the elected device's provisioning, as before.
|
|
23089
|
+
*/
|
|
23090
|
+
steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
|
|
22691
23091
|
});
|
|
22692
23092
|
/**
|
|
22693
23093
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
@@ -23562,6 +23962,28 @@ var NodeInferenceDeviceSchema = object({
|
|
|
23562
23962
|
*/
|
|
23563
23963
|
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
23564
23964
|
});
|
|
23965
|
+
/**
|
|
23966
|
+
* The operator's model choice for one cluster-scoped step, answered by the
|
|
23967
|
+
* addon that OWNS the `clusterModel:*` settings (D651). Three answers, never
|
|
23968
|
+
* folded: a written choice, a key nobody wrote (the cluster runs the default
|
|
23969
|
+
* BY ABSENCE), or no answer. A caller that rewrites an index acts only on the
|
|
23970
|
+
* first two, read twice and agreeing.
|
|
23971
|
+
*/
|
|
23972
|
+
var ClusterModelChoiceSchema = discriminatedUnion("kind", [
|
|
23973
|
+
object({
|
|
23974
|
+
kind: literal("stored"),
|
|
23975
|
+
modelId: string()
|
|
23976
|
+
}),
|
|
23977
|
+
object({
|
|
23978
|
+
kind: literal("absent"),
|
|
23979
|
+
defaultModelId: string()
|
|
23980
|
+
}),
|
|
23981
|
+
object({
|
|
23982
|
+
kind: literal("unreadable"),
|
|
23983
|
+
reason: _enum(CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS),
|
|
23984
|
+
error: string().optional()
|
|
23985
|
+
})
|
|
23986
|
+
]);
|
|
23565
23987
|
var NodeInferenceDevicesSchema = object({
|
|
23566
23988
|
nodeId: string(),
|
|
23567
23989
|
/** False when the node's platform-probe was unreachable (no live device set). */
|
|
@@ -23589,10 +24011,17 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
23589
24011
|
}), object({ success: literal(true) }), {
|
|
23590
24012
|
kind: "mutation",
|
|
23591
24013
|
auth: "admin"
|
|
23592
|
-
}), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({
|
|
24014
|
+
}), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({
|
|
24015
|
+
migrated: number(),
|
|
24016
|
+
skipped: array(object({
|
|
24017
|
+
deviceId: number(),
|
|
24018
|
+
targetNodeId: string(),
|
|
24019
|
+
reason: string()
|
|
24020
|
+
})).default([])
|
|
24021
|
+
}), {
|
|
23593
24022
|
kind: "mutation",
|
|
23594
24023
|
auth: "admin"
|
|
23595
|
-
}), 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({
|
|
24024
|
+
}), 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({
|
|
23596
24025
|
nodeId: string(),
|
|
23597
24026
|
capName: string(),
|
|
23598
24027
|
addonId: string()
|
|
@@ -25892,6 +26321,177 @@ DeviceType.Camera, method(object({
|
|
|
25892
26321
|
auth: "protected"
|
|
25893
26322
|
});
|
|
25894
26323
|
/**
|
|
26324
|
+
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
26325
|
+
* valutatore puro del suo FRONTE.
|
|
26326
|
+
*
|
|
26327
|
+
* Viveva dentro il builtin virtual-doorbell
|
|
26328
|
+
* (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
|
|
26329
|
+
* predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
|
|
26330
|
+
* `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
|
|
26331
|
+
* tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
|
|
26332
|
+
* fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
|
|
26333
|
+
* SPOSTA qui e il doorbell la ri-esporta.
|
|
26334
|
+
*
|
|
26335
|
+
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
26336
|
+
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
26337
|
+
* regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
|
|
26338
|
+
* booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
|
|
26339
|
+
*/
|
|
26340
|
+
/**
|
|
26341
|
+
* Known binary / switch source caps → the boolean slice field whose
|
|
26342
|
+
* false→true rise counts as ACTIVE. Every entry is "fire on active".
|
|
26343
|
+
* Sensors whose "active" reading is not a plain boolean (presence's string
|
|
26344
|
+
* state, connectivity's connected flag) are deliberately excluded — a
|
|
26345
|
+
* reconnect is not a doorbell press, and it is not a recording either.
|
|
26346
|
+
*/
|
|
26347
|
+
var SOURCE_CAP_ACTIVE_FIELD = {
|
|
26348
|
+
contact: "entryOpen",
|
|
26349
|
+
binary: "on",
|
|
26350
|
+
switch: "on",
|
|
26351
|
+
motion: "detected",
|
|
26352
|
+
flood: "flooded",
|
|
26353
|
+
gas: "detected",
|
|
26354
|
+
smoke: "detected",
|
|
26355
|
+
"carbon-monoxide": "detected",
|
|
26356
|
+
vibration: "detected",
|
|
26357
|
+
tamper: "tampered"
|
|
26358
|
+
};
|
|
26359
|
+
object({
|
|
26360
|
+
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
26361
|
+
lastPressedAt: number().nullable(),
|
|
26362
|
+
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
26363
|
+
pressCountSinceStart: number()
|
|
26364
|
+
});
|
|
26365
|
+
object({
|
|
26366
|
+
deviceId: number(),
|
|
26367
|
+
timestamp: number()
|
|
26368
|
+
});
|
|
26369
|
+
/**
|
|
26370
|
+
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
26371
|
+
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
26372
|
+
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
26373
|
+
*/
|
|
26374
|
+
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
26375
|
+
DeviceType.Camera;
|
|
26376
|
+
DeviceType.Button, DeviceType.Camera;
|
|
26377
|
+
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
26378
|
+
DeviceType.Camera, DeviceType.Camera;
|
|
26379
|
+
/** A slot's editable value, discriminated on `slot`. */
|
|
26380
|
+
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
26381
|
+
DeviceType.Camera;
|
|
26382
|
+
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
26383
|
+
state: literal("unreachable"),
|
|
26384
|
+
reason: string()
|
|
26385
|
+
})]);
|
|
26386
|
+
/** One provider of slots — the D554 source-listing row. */
|
|
26387
|
+
var ExtensionSourceSchema = object({
|
|
26388
|
+
/** The routing prefix of every `slotRef` this provider serves. */
|
|
26389
|
+
source: string(),
|
|
26390
|
+
label: string(),
|
|
26391
|
+
/** Stamped by the dispatcher from the registry (D557). */
|
|
26392
|
+
addonId: string().optional(),
|
|
26393
|
+
availability: ExtensionSourceAvailabilitySchema
|
|
26394
|
+
});
|
|
26395
|
+
/**
|
|
26396
|
+
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
26397
|
+
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
26398
|
+
* (slice 2's cross-owner graft source); `unavailable` — it exists but is not a
|
|
26399
|
+
* valid source now (a container, which is never a pick). A source in any of
|
|
26400
|
+
* these states is SHOWN, never silently dropped or re-pointed.
|
|
26401
|
+
*/
|
|
26402
|
+
var ExtensionSourceHealthSchema = _enum([
|
|
26403
|
+
"ok",
|
|
26404
|
+
"missing",
|
|
26405
|
+
"foreign",
|
|
26406
|
+
"unavailable"
|
|
26407
|
+
]);
|
|
26408
|
+
var ExtensionSlotSourceSchema = object({
|
|
26409
|
+
deviceId: number().int(),
|
|
26410
|
+
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
26411
|
+
name: string().nullable(),
|
|
26412
|
+
health: ExtensionSourceHealthSchema,
|
|
26413
|
+
detail: string().optional()
|
|
26414
|
+
});
|
|
26415
|
+
/**
|
|
26416
|
+
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
26417
|
+
* reported read-only, named, never written through this contract (D62). The
|
|
26418
|
+
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
26419
|
+
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
26420
|
+
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
26421
|
+
*/
|
|
26422
|
+
var ExtensionSlotActivationSchema = object({
|
|
26423
|
+
state: _enum([
|
|
26424
|
+
"active",
|
|
26425
|
+
"inactive",
|
|
26426
|
+
"unknown"
|
|
26427
|
+
]),
|
|
26428
|
+
authority: string(),
|
|
26429
|
+
detail: string().optional()
|
|
26430
|
+
});
|
|
26431
|
+
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
26432
|
+
state: literal("ok"),
|
|
26433
|
+
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
26434
|
+
slotRef: string(),
|
|
26435
|
+
slot: ExtensionSlotIdSchema,
|
|
26436
|
+
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
26437
|
+
authority: string(),
|
|
26438
|
+
/** graft: its switch. association: null — removing every source is "off". */
|
|
26439
|
+
enabled: boolean().nullable(),
|
|
26440
|
+
/** graft: the cap registered on the host. association: null. */
|
|
26441
|
+
projects: string().nullable(),
|
|
26442
|
+
activation: ExtensionSlotActivationSchema.nullable(),
|
|
26443
|
+
value: ExtensionSlotValueSchema,
|
|
26444
|
+
sources: array(ExtensionSlotSourceSchema),
|
|
26445
|
+
/**
|
|
26446
|
+
* Devices the owner links to the host ON ITS OWN, by structure, and that
|
|
26447
|
+
* are therefore not in `value` (D655): a camera's device-tree children, and
|
|
26448
|
+
* the child a picked container stands for (D356 — a container is never a
|
|
26449
|
+
* pick, its children are). Read-only; the editor shows them and may offer
|
|
26450
|
+
* per-device options on them (the linked-devices tracked-event opt-in).
|
|
26451
|
+
* Absent when the owner links nothing beyond the picks, and from an owner
|
|
26452
|
+
* older than D655.
|
|
26453
|
+
*/
|
|
26454
|
+
impliedSources: array(ExtensionSlotSourceSchema).optional()
|
|
26455
|
+
}), object({
|
|
26456
|
+
state: literal("unreachable"),
|
|
26457
|
+
addonId: string(),
|
|
26458
|
+
reason: string()
|
|
26459
|
+
})]);
|
|
26460
|
+
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
26461
|
+
deviceId: number().int(),
|
|
26462
|
+
name: string(),
|
|
26463
|
+
type: string(),
|
|
26464
|
+
location: string().nullable(),
|
|
26465
|
+
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
26466
|
+
parentName: string().nullable(),
|
|
26467
|
+
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
26468
|
+
suggested: boolean(),
|
|
26469
|
+
/** Why it is suggested ("same location"), null when it is not. */
|
|
26470
|
+
reason: string().nullable()
|
|
26471
|
+
})) });
|
|
26472
|
+
/**
|
|
26473
|
+
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
26474
|
+
* reloaded the host (or, for an accessory child, its parent) because the
|
|
26475
|
+
* write changed what the host REGISTERS (a graft switched on or off, slice 2).
|
|
26476
|
+
*/
|
|
26477
|
+
var ExtensionSetResultSchema = object({
|
|
26478
|
+
applied: literal(true),
|
|
26479
|
+
reload: _enum([
|
|
26480
|
+
"none",
|
|
26481
|
+
"host",
|
|
26482
|
+
"parent"
|
|
26483
|
+
])
|
|
26484
|
+
});
|
|
26485
|
+
var ExtensionSlotRefInputSchema = object({
|
|
26486
|
+
deviceId: number().int(),
|
|
26487
|
+
slotRef: string().min(1)
|
|
26488
|
+
});
|
|
26489
|
+
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
26490
|
+
method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
26491
|
+
kind: "mutation",
|
|
26492
|
+
auth: "admin"
|
|
26493
|
+
});
|
|
26494
|
+
/**
|
|
25895
26495
|
* Optional client-side hints sent at session creation to help the provider
|
|
25896
26496
|
* pick the best native source. All fields optional — a viewer that knows
|
|
25897
26497
|
* nothing still gets a sane default. (Relocated from the retired `webrtc`
|
|
@@ -27680,17 +28280,6 @@ object({
|
|
|
27680
28280
|
deviceId: number(),
|
|
27681
28281
|
status: DeviceStatusSchema
|
|
27682
28282
|
});
|
|
27683
|
-
object({
|
|
27684
|
-
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
27685
|
-
lastPressedAt: number().nullable(),
|
|
27686
|
-
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
27687
|
-
pressCountSinceStart: number()
|
|
27688
|
-
});
|
|
27689
|
-
object({
|
|
27690
|
-
deviceId: number(),
|
|
27691
|
-
timestamp: number()
|
|
27692
|
-
});
|
|
27693
|
-
DeviceType.Button, DeviceType.Camera;
|
|
27694
28283
|
/**
|
|
27695
28284
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
27696
28285
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -34457,42 +35046,6 @@ DeviceType.Camera, method(object({
|
|
|
34457
35046
|
package: array(ZoneRuleSchema).readonly()
|
|
34458
35047
|
});
|
|
34459
35048
|
/**
|
|
34460
|
-
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
34461
|
-
* valutatore puro del suo FRONTE.
|
|
34462
|
-
*
|
|
34463
|
-
* Viveva dentro il builtin virtual-doorbell
|
|
34464
|
-
* (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
|
|
34465
|
-
* predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
|
|
34466
|
-
* `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
|
|
34467
|
-
* tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
|
|
34468
|
-
* fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
|
|
34469
|
-
* SPOSTA qui e il doorbell la ri-esporta.
|
|
34470
|
-
*
|
|
34471
|
-
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
34472
|
-
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
34473
|
-
* regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
|
|
34474
|
-
* booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
|
|
34475
|
-
*/
|
|
34476
|
-
/**
|
|
34477
|
-
* Known binary / switch source caps → the boolean slice field whose
|
|
34478
|
-
* false→true rise counts as ACTIVE. Every entry is "fire on active".
|
|
34479
|
-
* Sensors whose "active" reading is not a plain boolean (presence's string
|
|
34480
|
-
* state, connectivity's connected flag) are deliberately excluded — a
|
|
34481
|
-
* reconnect is not a doorbell press, and it is not a recording either.
|
|
34482
|
-
*/
|
|
34483
|
-
var SOURCE_CAP_ACTIVE_FIELD = {
|
|
34484
|
-
contact: "entryOpen",
|
|
34485
|
-
binary: "on",
|
|
34486
|
-
switch: "on",
|
|
34487
|
-
motion: "detected",
|
|
34488
|
-
flood: "flooded",
|
|
34489
|
-
gas: "detected",
|
|
34490
|
-
smoke: "detected",
|
|
34491
|
-
"carbon-monoxide": "detected",
|
|
34492
|
-
vibration: "detected",
|
|
34493
|
-
tamper: "tampered"
|
|
34494
|
-
};
|
|
34495
|
-
/**
|
|
34496
35049
|
* Accessory device helpers — shared across drivers.
|
|
34497
35050
|
*
|
|
34498
35051
|
* Many vendor-specific drivers register accessory child devices on
|
|
@@ -37292,6 +37845,30 @@ Object.freeze({
|
|
|
37292
37845
|
addonId: null,
|
|
37293
37846
|
access: "create"
|
|
37294
37847
|
},
|
|
37848
|
+
"deviceExtension.listCandidates": {
|
|
37849
|
+
capName: "device-extension",
|
|
37850
|
+
capScope: "device",
|
|
37851
|
+
addonId: null,
|
|
37852
|
+
access: "view"
|
|
37853
|
+
},
|
|
37854
|
+
"deviceExtension.listSlots": {
|
|
37855
|
+
capName: "device-extension",
|
|
37856
|
+
capScope: "device",
|
|
37857
|
+
addonId: null,
|
|
37858
|
+
access: "view"
|
|
37859
|
+
},
|
|
37860
|
+
"deviceExtension.listSources": {
|
|
37861
|
+
capName: "device-extension",
|
|
37862
|
+
capScope: "device",
|
|
37863
|
+
addonId: null,
|
|
37864
|
+
access: "view"
|
|
37865
|
+
},
|
|
37866
|
+
"deviceExtension.setSlot": {
|
|
37867
|
+
capName: "device-extension",
|
|
37868
|
+
capScope: "device",
|
|
37869
|
+
addonId: null,
|
|
37870
|
+
access: "create"
|
|
37871
|
+
},
|
|
37295
37872
|
"deviceManager.addLocation": {
|
|
37296
37873
|
capName: "device-manager",
|
|
37297
37874
|
capScope: "system",
|
|
@@ -37364,12 +37941,6 @@ Object.freeze({
|
|
|
37364
37941
|
addonId: null,
|
|
37365
37942
|
access: "create"
|
|
37366
37943
|
},
|
|
37367
|
-
"deviceManager.applyDeviceSettingsPatch": {
|
|
37368
|
-
capName: "device-manager",
|
|
37369
|
-
capScope: "system",
|
|
37370
|
-
addonId: null,
|
|
37371
|
-
access: "create"
|
|
37372
|
-
},
|
|
37373
37944
|
"deviceManager.applyInitialMeta": {
|
|
37374
37945
|
capName: "device-manager",
|
|
37375
37946
|
capScope: "system",
|
|
@@ -37472,12 +38043,6 @@ Object.freeze({
|
|
|
37472
38043
|
addonId: null,
|
|
37473
38044
|
access: "view"
|
|
37474
38045
|
},
|
|
37475
|
-
"deviceManager.getDeviceLiveContribution": {
|
|
37476
|
-
capName: "device-manager",
|
|
37477
|
-
capScope: "system",
|
|
37478
|
-
addonId: null,
|
|
37479
|
-
access: "view"
|
|
37480
|
-
},
|
|
37481
38046
|
"deviceManager.getDeviceLiveInfoAggregate": {
|
|
37482
38047
|
capName: "device-manager",
|
|
37483
38048
|
capScope: "system",
|
|
@@ -37490,12 +38055,6 @@ Object.freeze({
|
|
|
37490
38055
|
addonId: null,
|
|
37491
38056
|
access: "view"
|
|
37492
38057
|
},
|
|
37493
|
-
"deviceManager.getDeviceSettingsContribution": {
|
|
37494
|
-
capName: "device-manager",
|
|
37495
|
-
capScope: "system",
|
|
37496
|
-
addonId: null,
|
|
37497
|
-
access: "view"
|
|
37498
|
-
},
|
|
37499
38058
|
"deviceManager.getDeviceStatusAggregate": {
|
|
37500
38059
|
capName: "device-manager",
|
|
37501
38060
|
capScope: "system",
|
|
@@ -38000,24 +38559,6 @@ Object.freeze({
|
|
|
38000
38559
|
addonId: null,
|
|
38001
38560
|
access: "view"
|
|
38002
38561
|
},
|
|
38003
|
-
"doorbell.applyDeviceSettingsPatch": {
|
|
38004
|
-
capName: "doorbell",
|
|
38005
|
-
capScope: "device",
|
|
38006
|
-
addonId: null,
|
|
38007
|
-
access: "create"
|
|
38008
|
-
},
|
|
38009
|
-
"doorbell.getDeviceLiveContribution": {
|
|
38010
|
-
capName: "doorbell",
|
|
38011
|
-
capScope: "device",
|
|
38012
|
-
addonId: null,
|
|
38013
|
-
access: "view"
|
|
38014
|
-
},
|
|
38015
|
-
"doorbell.getDeviceSettingsContribution": {
|
|
38016
|
-
capName: "doorbell",
|
|
38017
|
-
capScope: "device",
|
|
38018
|
-
addonId: null,
|
|
38019
|
-
access: "view"
|
|
38020
|
-
},
|
|
38021
38562
|
"doorbell.getStatus": {
|
|
38022
38563
|
capName: "doorbell",
|
|
38023
38564
|
capScope: "device",
|
|
@@ -38042,6 +38583,12 @@ Object.freeze({
|
|
|
38042
38583
|
addonId: null,
|
|
38043
38584
|
access: "view"
|
|
38044
38585
|
},
|
|
38586
|
+
"embeddingEncoder.resetFailedModels": {
|
|
38587
|
+
capName: "embedding-encoder",
|
|
38588
|
+
capScope: "system",
|
|
38589
|
+
addonId: null,
|
|
38590
|
+
access: "delete"
|
|
38591
|
+
},
|
|
38045
38592
|
"enumSensor.getStatus": {
|
|
38046
38593
|
capName: "enum-sensor",
|
|
38047
38594
|
capScope: "device",
|
|
@@ -40376,6 +40923,12 @@ Object.freeze({
|
|
|
40376
40923
|
addonId: null,
|
|
40377
40924
|
access: "view"
|
|
40378
40925
|
},
|
|
40926
|
+
"pipelineOrchestrator.getClusterModelChoice": {
|
|
40927
|
+
capName: "pipeline-orchestrator",
|
|
40928
|
+
capScope: "system",
|
|
40929
|
+
addonId: null,
|
|
40930
|
+
access: "view"
|
|
40931
|
+
},
|
|
40379
40932
|
"pipelineOrchestrator.getDeviceLiveContribution": {
|
|
40380
40933
|
capName: "pipeline-orchestrator",
|
|
40381
40934
|
capScope: "system",
|
|
@@ -43201,6 +43754,26 @@ Object.freeze({
|
|
|
43201
43754
|
form: "single",
|
|
43202
43755
|
optional: false
|
|
43203
43756
|
}],
|
|
43757
|
+
"deviceExtension.listCandidates": [{
|
|
43758
|
+
name: "deviceId",
|
|
43759
|
+
form: "single",
|
|
43760
|
+
optional: false
|
|
43761
|
+
}],
|
|
43762
|
+
"deviceExtension.listSlots": [{
|
|
43763
|
+
name: "deviceId",
|
|
43764
|
+
form: "single",
|
|
43765
|
+
optional: false
|
|
43766
|
+
}],
|
|
43767
|
+
"deviceExtension.listSources": [{
|
|
43768
|
+
name: "deviceId",
|
|
43769
|
+
form: "single",
|
|
43770
|
+
optional: false
|
|
43771
|
+
}],
|
|
43772
|
+
"deviceExtension.setSlot": [{
|
|
43773
|
+
name: "deviceId",
|
|
43774
|
+
form: "single",
|
|
43775
|
+
optional: false
|
|
43776
|
+
}],
|
|
43204
43777
|
"deviceManager.adoptionRelease": [{
|
|
43205
43778
|
name: "camDeviceId",
|
|
43206
43779
|
form: "single",
|
|
@@ -45660,68 +46233,6 @@ TimelapseRuleInputSchema.extend({
|
|
|
45660
46233
|
createdAt: number(),
|
|
45661
46234
|
updatedAt: number()
|
|
45662
46235
|
});
|
|
45663
|
-
Object.freeze(Object.fromEntries([{
|
|
45664
|
-
stepId: "face-embedding",
|
|
45665
|
-
label: "Face recognition model",
|
|
45666
|
-
defaultModelId: "arcface-r100",
|
|
45667
|
-
indexName: "the enrolled face gallery",
|
|
45668
|
-
options: [
|
|
45669
|
-
{
|
|
45670
|
-
id: "arcface-r100",
|
|
45671
|
-
label: "ArcFace (ResNet34)"
|
|
45672
|
-
},
|
|
45673
|
-
{
|
|
45674
|
-
id: "auraface-r100",
|
|
45675
|
-
label: "AuraFace R100"
|
|
45676
|
-
},
|
|
45677
|
-
{
|
|
45678
|
-
id: "inception-resnet-v1",
|
|
45679
|
-
label: "Inception ResNet V1"
|
|
45680
|
-
}
|
|
45681
|
-
]
|
|
45682
|
-
}, {
|
|
45683
|
-
stepId: "clip-embedding",
|
|
45684
|
-
label: "Semantic search model",
|
|
45685
|
-
defaultModelId: "mobileclip-s1",
|
|
45686
|
-
indexName: "the object semantic-search index",
|
|
45687
|
-
options: [{
|
|
45688
|
-
id: "mobileclip-s1",
|
|
45689
|
-
label: "MobileCLIP S1"
|
|
45690
|
-
}, {
|
|
45691
|
-
id: "mobileclip-s2",
|
|
45692
|
-
label: "MobileCLIP S2"
|
|
45693
|
-
}]
|
|
45694
|
-
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
45695
|
-
string().min(1);
|
|
45696
|
-
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
45697
|
-
stepId: "face-embedding",
|
|
45698
|
-
key: "minLandmarkFaceSize",
|
|
45699
|
-
label: "Min face size for recognition (detection px)",
|
|
45700
|
-
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.",
|
|
45701
|
-
type: "slider",
|
|
45702
|
-
min: 0,
|
|
45703
|
-
max: 64,
|
|
45704
|
-
step: 2,
|
|
45705
|
-
default: 24
|
|
45706
|
-
}];
|
|
45707
|
-
function clusterStepSettingKey(stepId, fieldKey) {
|
|
45708
|
-
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
45709
|
-
}
|
|
45710
|
-
var ClusterSettingNumberSchema = number().finite();
|
|
45711
|
-
function readClusterStepSettings(config) {
|
|
45712
|
-
const out = {};
|
|
45713
|
-
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
45714
|
-
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
45715
|
-
const value = parsed.success ? parsed.data : field.default;
|
|
45716
|
-
const existing = out[field.stepId] ?? {};
|
|
45717
|
-
out[field.stepId] = {
|
|
45718
|
-
...existing,
|
|
45719
|
-
[field.key]: value
|
|
45720
|
-
};
|
|
45721
|
-
}
|
|
45722
|
-
return out;
|
|
45723
|
-
}
|
|
45724
|
-
readClusterStepSettings({});
|
|
45725
46236
|
object({
|
|
45726
46237
|
/**
|
|
45727
46238
|
* Fraction of the box's own size added on EACH side before cutting.
|