@camstack/addon-model-studio 1.1.174 → 1.1.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MotionZonesSettings-DavNeZt1.mjs → MotionZonesSettings-BnPKd-p7.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-bWW0b0eT.mjs → PrivacyMaskSettings-DuPNepvj.mjs} +4 -4
- package/dist/{SceneMonitorEditor-DuXCuccO.mjs → SceneMonitorEditor-shkSy7R6.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-BtQXSIcN.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CSU-vA08.mjs +26 -0
- package/dist/addon-model-studio.css +1 -1
- package/dist/{hostInit-nK0BL4EK.mjs → hostInit-v1KM-izE.mjs} +2 -2
- package/dist/model-studio.addon.js +640 -124
- package/dist/model-studio.addon.mjs +640 -124
- package/dist/{player-overlays-BZLfX48i.mjs → player-overlays-XBDUBreN.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DAticuj8.mjs → responsive-Ct9r9fcD.mjs} +1 -1
- package/dist/{scene-monitor-copy-CuI6S0HF.mjs → scene-monitor-copy-6edUqagK.mjs} +1 -1
- package/dist/{square-Dh-K-SIJ.mjs → square-xaUv7lAA.mjs} +1 -1
- package/dist/{trash-2-Cuodqp-m.mjs → trash-2-BjU_ykxW.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-Byr-xHCs.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-BXv0ZcRa.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,13 @@ 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
|
+
var LinkedDevicesSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
14534
|
+
DeviceType.Camera;
|
|
14450
14535
|
/** One camera's resolved linked set, tagged with the camera it belongs to.
|
|
14451
14536
|
* The batch answer needs the tag; the single-device answer already has it
|
|
14452
14537
|
* from the input, which is why `getLinkedDevices` keeps the untagged shape. */
|
|
@@ -14972,16 +15057,101 @@ var EmbeddingResultSchema = object({
|
|
|
14972
15057
|
embedding: array(number()),
|
|
14973
15058
|
inferenceMs: number()
|
|
14974
15059
|
});
|
|
15060
|
+
/** The two CLIP towers the encoder runs; a crash budget is kept per tower. */
|
|
15061
|
+
var EmbeddingTowerSchema = _enum(["image", "text"]);
|
|
15062
|
+
/**
|
|
15063
|
+
* A tower in the terminal `failed` state (D649, D6): it crashed or failed to
|
|
15064
|
+
* load `crashes` times within `windowMs`, and is refused by name until an
|
|
15065
|
+
* operator `resetFailedModels` or a model change — never on a timer.
|
|
15066
|
+
*
|
|
15067
|
+
* `nodeId` is the node whose tower failed. The state lives in THAT node's
|
|
15068
|
+
* encoder process (in memory — a runner respawn clears it), and one node's
|
|
15069
|
+
* answer says nothing about another's.
|
|
15070
|
+
*/
|
|
15071
|
+
var EmbeddingFailedModelSchema = object({
|
|
15072
|
+
modelId: string(),
|
|
15073
|
+
tower: EmbeddingTowerSchema,
|
|
15074
|
+
nodeId: string(),
|
|
15075
|
+
crashes: number(),
|
|
15076
|
+
windowMs: number(),
|
|
15077
|
+
sinceMs: number(),
|
|
15078
|
+
lastReason: string()
|
|
15079
|
+
});
|
|
15080
|
+
/**
|
|
15081
|
+
* A model whose REQUIREMENTS can never be met on this node (D649 round 5):
|
|
15082
|
+
* an id the catalog does not know, a model URL answering 404/410, a declared
|
|
15083
|
+
* sibling (the tokenizer) that is not there. After `attempts` failed builds
|
|
15084
|
+
* it is terminally `requirements-failed`, refused by name until an operator
|
|
15085
|
+
* `resetFailedModels` or a model change — the same exits as a crashed tower.
|
|
15086
|
+
*/
|
|
15087
|
+
var EmbeddingFailedRequirementSchema = object({
|
|
15088
|
+
modelId: string(),
|
|
15089
|
+
tower: EmbeddingTowerSchema,
|
|
15090
|
+
nodeId: string(),
|
|
15091
|
+
attempts: number(),
|
|
15092
|
+
sinceMs: number(),
|
|
15093
|
+
lastReason: string()
|
|
15094
|
+
});
|
|
14975
15095
|
var EmbeddingInfoSchema = object({
|
|
14976
15096
|
modelId: string(),
|
|
14977
15097
|
embeddingDim: number(),
|
|
14978
|
-
ready: boolean()
|
|
14979
|
-
|
|
15098
|
+
ready: boolean(),
|
|
15099
|
+
/**
|
|
15100
|
+
* The node that answered. Absent only from an encoder older than D649's
|
|
15101
|
+
* crash budget — whose `failedModels` is then UNKNOWN (D315), never "none".
|
|
15102
|
+
*/
|
|
15103
|
+
nodeId: string().optional(),
|
|
15104
|
+
/**
|
|
15105
|
+
* Towers in `failed` on the answering node, each row naming it. `undefined`
|
|
15106
|
+
* means the node could not say (pre-budget encoder); a node that has the
|
|
15107
|
+
* budget always answers an array, empty included.
|
|
15108
|
+
*/
|
|
15109
|
+
failedModels: array(EmbeddingFailedModelSchema).optional(),
|
|
15110
|
+
/** Models terminally `requirements-failed` on the answering node; same reading as above. */
|
|
15111
|
+
failedRequirements: array(EmbeddingFailedRequirementSchema).optional()
|
|
15112
|
+
});
|
|
15113
|
+
/**
|
|
15114
|
+
* The THREE codes an encoder refusal can carry (D649, D6). Same shape as
|
|
15115
|
+
* `VECTOR_INDEX_DIM_CONFLICT`: the code rides in the MESSAGE, because an
|
|
15116
|
+
* Error's own properties do not survive the UDS/tRPC hop and its message does,
|
|
15117
|
+
* and both sides go through the helpers below — the encoder builds the
|
|
15118
|
+
* refusal, the live detail plane classifies on it to count refusals per
|
|
15119
|
+
* camera instead of logging one warning per track. The bracketed token
|
|
15120
|
+
* carries the code, the model, the tower and the node so a consumer never
|
|
15121
|
+
* parses prose.
|
|
15122
|
+
*
|
|
15123
|
+
* - `EMBEDDING_MODEL_FAILED`: the tower crashed / failed to load past the crash
|
|
15124
|
+
* budget — terminal until `resetFailedModels` or a model change.
|
|
15125
|
+
* - `EMBEDDING_REQUIREMENTS_UNAVAILABLE`: files or runtime not there right now
|
|
15126
|
+
* (a download or Python that failed, or the cooldown after one) — the next
|
|
15127
|
+
* request past the cooldown tries again.
|
|
15128
|
+
* - `EMBEDDING_REQUIREMENTS_FAILED`: the requirements can never be met (unknown
|
|
15129
|
+
* id, 404/410, missing sibling) and the bounded attempts are spent —
|
|
15130
|
+
* terminal, same exits as a crashed tower.
|
|
15131
|
+
*/
|
|
15132
|
+
var EMBEDDING_MODEL_FAILED = "embedding-model-failed";
|
|
15133
|
+
var EMBEDDING_REQUIREMENTS_UNAVAILABLE = "embedding-requirements-unavailable";
|
|
15134
|
+
var EMBEDDING_REQUIREMENTS_FAILED = "embedding-requirements-failed";
|
|
15135
|
+
_enum([
|
|
15136
|
+
EMBEDDING_MODEL_FAILED,
|
|
15137
|
+
EMBEDDING_REQUIREMENTS_UNAVAILABLE,
|
|
15138
|
+
EMBEDDING_REQUIREMENTS_FAILED
|
|
15139
|
+
]);
|
|
15140
|
+
new RegExp(`\\[(${EMBEDDING_MODEL_FAILED}|${EMBEDDING_REQUIREMENTS_UNAVAILABLE}|${EMBEDDING_REQUIREMENTS_FAILED}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);
|
|
14980
15141
|
method(object({
|
|
14981
15142
|
crop: _instanceof(Uint8Array),
|
|
14982
15143
|
width: number(),
|
|
14983
15144
|
height: number()
|
|
14984
|
-
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
15145
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
15146
|
+
text: string(),
|
|
15147
|
+
modelId: string().min(1).optional()
|
|
15148
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" }), method(object({ modelId: string().min(1).optional() }), object({
|
|
15149
|
+
cleared: array(string()),
|
|
15150
|
+
nodeId: string()
|
|
15151
|
+
}), {
|
|
15152
|
+
kind: "mutation",
|
|
15153
|
+
auth: "admin"
|
|
15154
|
+
});
|
|
14985
15155
|
/**
|
|
14986
15156
|
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14987
15157
|
* through, per camera, with the denominator attached. It stores nothing.
|
|
@@ -18393,7 +18563,12 @@ var NcMediaPolicySchema = object({
|
|
|
18393
18563
|
* the degrade engine, which drops the video and keeps the still.
|
|
18394
18564
|
*/
|
|
18395
18565
|
clip: boolean().optional(),
|
|
18396
|
-
/**
|
|
18566
|
+
/**
|
|
18567
|
+
* Seconds of footage BEFORE / AFTER the event instant. Absent =
|
|
18568
|
+
* {@link NC_CLIP_PRE_ROLL_DEFAULT_SEC} / {@link NC_CLIP_POST_ROLL_DEFAULT_SEC}
|
|
18569
|
+
* (4 / 6), resolved by the Notification Center at dispatch — deliberately not
|
|
18570
|
+
* a Zod default, so a rule that never chose keeps following the hub's.
|
|
18571
|
+
*/
|
|
18397
18572
|
clipPreRollSec: number().int().min(0).max(30).optional(),
|
|
18398
18573
|
clipPostRollSec: number().int().min(0).max(30).optional(),
|
|
18399
18574
|
/**
|
|
@@ -19771,6 +19946,130 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
19771
19946
|
});
|
|
19772
19947
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
19773
19948
|
/**
|
|
19949
|
+
* A model choice has a SCOPE, and a scope change has a workflow.
|
|
19950
|
+
*
|
|
19951
|
+
* ## The two scopes
|
|
19952
|
+
*
|
|
19953
|
+
* Almost every pipeline step's model is a **node** question: which build runs
|
|
19954
|
+
* fastest on THIS accelerator. Two nodes may legitimately answer differently —
|
|
19955
|
+
* a Coral runs the tflite SSD, a Mac runs the coreml YOLO — because the answers
|
|
19956
|
+
* are compared against nothing. They produce boxes, and a box is a box.
|
|
19957
|
+
*
|
|
19958
|
+
* Two steps are not like that. `face-embedding` and `clip-embedding` produce
|
|
19959
|
+
* **vectors that land in ONE shared index** (`identity_samples`,
|
|
19960
|
+
* `vec_object_clip`) and are ranked against each other by cosine similarity.
|
|
19961
|
+
* Cosine similarity between two encoders is not a weak signal, it is a
|
|
19962
|
+
* meaningless number — and nothing inside a vector can tell you it happened.
|
|
19963
|
+
* So for those two steps the model is a **cluster** question with exactly one
|
|
19964
|
+
* answer, stored in exactly one row.
|
|
19965
|
+
*
|
|
19966
|
+
* That is the same argument [D52](../../../../docs/decisions/adr-0052.md) makes
|
|
19967
|
+
* for the crop convention (`detail-crop.ts`), one level up: the crop decides
|
|
19968
|
+
* WHAT pixels the encoder sees, this decides WHICH encoder sees them. Both are
|
|
19969
|
+
* cluster-wide for the same reason and neither may become per-node.
|
|
19970
|
+
*
|
|
19971
|
+
* ## Why the registry lives here and not in the step catalog
|
|
19972
|
+
*
|
|
19973
|
+
* The scope itself is declared on the step, in
|
|
19974
|
+
* `detection-pipeline/registry/step-definitions.ts` (`StepDefinition.modelScope`)
|
|
19975
|
+
* — that is where a new step declares what kind of choice its model is. But the
|
|
19976
|
+
* catalog lives inside `addon-pipeline`, and three packages that must NOT
|
|
19977
|
+
* import an addon need to know the set: the orchestrator (which renders and
|
|
19978
|
+
* stores the row), post-analysis (which pins the row for a re-embed pass) and
|
|
19979
|
+
* admin-ui (which mirrors it). So the set is mirrored here, and
|
|
19980
|
+
* `scripts/check-cluster-model-scope.ts` fails the build when the two disagree.
|
|
19981
|
+
* A hand-copied key that stops matching is exactly how a setting silently stops
|
|
19982
|
+
* arriving while both sides still look correct.
|
|
19983
|
+
*
|
|
19984
|
+
* ## The defaults ARE today's behaviour
|
|
19985
|
+
*
|
|
19986
|
+
* {@link DEFAULT_CLUSTER_STEP_MODELS} reproduces the catalog `defaultModelId`
|
|
19987
|
+
* of both steps. Declaring the scope therefore changes nothing on the day it
|
|
19988
|
+
* ships: the cluster row starts out saying what every node was already doing.
|
|
19989
|
+
* Changing it is legitimate — that is what the knob is for — but it invalidates
|
|
19990
|
+
* the stored vectors of that surface, and must be followed by a re-embed pass
|
|
19991
|
+
* (`face-reembed-pass.ts`, `embedding-rebuild.ts`).
|
|
19992
|
+
*/
|
|
19993
|
+
/**
|
|
19994
|
+
* Why the orchestrator cannot say which model the operator chose for a
|
|
19995
|
+
* cluster-scoped step (D651).
|
|
19996
|
+
*/
|
|
19997
|
+
var CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS = [
|
|
19998
|
+
"owner-not-ready",
|
|
19999
|
+
"store-read-failed",
|
|
20000
|
+
"three-way-read-unavailable",
|
|
20001
|
+
"invalid-stored",
|
|
20002
|
+
"not-cluster-scoped"
|
|
20003
|
+
];
|
|
20004
|
+
Object.freeze(Object.fromEntries([{
|
|
20005
|
+
stepId: "face-embedding",
|
|
20006
|
+
label: "Face recognition model",
|
|
20007
|
+
defaultModelId: "auraface-r100",
|
|
20008
|
+
indexName: "the enrolled face gallery",
|
|
20009
|
+
options: [
|
|
20010
|
+
{
|
|
20011
|
+
id: "auraface-r100",
|
|
20012
|
+
label: "AuraFace R100"
|
|
20013
|
+
},
|
|
20014
|
+
{
|
|
20015
|
+
id: "arcface-r100",
|
|
20016
|
+
label: "ArcFace (ResNet34)"
|
|
20017
|
+
},
|
|
20018
|
+
{
|
|
20019
|
+
id: "inception-resnet-v1",
|
|
20020
|
+
label: "Inception ResNet V1"
|
|
20021
|
+
}
|
|
20022
|
+
]
|
|
20023
|
+
}, {
|
|
20024
|
+
stepId: "clip-embedding",
|
|
20025
|
+
label: "Semantic search model",
|
|
20026
|
+
defaultModelId: "mobileclip-s1",
|
|
20027
|
+
indexName: "the object semantic-search index",
|
|
20028
|
+
options: [
|
|
20029
|
+
{
|
|
20030
|
+
id: "mobileclip-s1",
|
|
20031
|
+
label: "MobileCLIP S1"
|
|
20032
|
+
},
|
|
20033
|
+
{
|
|
20034
|
+
id: "mobileclip-s2",
|
|
20035
|
+
label: "MobileCLIP S2"
|
|
20036
|
+
},
|
|
20037
|
+
{
|
|
20038
|
+
id: "siglip2-b16-224",
|
|
20039
|
+
label: "SigLIP2 B/16 (Apache-2.0)"
|
|
20040
|
+
}
|
|
20041
|
+
]
|
|
20042
|
+
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
20043
|
+
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
20044
|
+
stepId: "face-embedding",
|
|
20045
|
+
key: "minLandmarkFaceSize",
|
|
20046
|
+
label: "Min face size for recognition (detection px)",
|
|
20047
|
+
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.",
|
|
20048
|
+
type: "slider",
|
|
20049
|
+
min: 0,
|
|
20050
|
+
max: 64,
|
|
20051
|
+
step: 2,
|
|
20052
|
+
default: 24
|
|
20053
|
+
}];
|
|
20054
|
+
function clusterStepSettingKey(stepId, fieldKey) {
|
|
20055
|
+
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
20056
|
+
}
|
|
20057
|
+
var ClusterSettingNumberSchema = number().finite();
|
|
20058
|
+
function readClusterStepSettings(config) {
|
|
20059
|
+
const out = {};
|
|
20060
|
+
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
20061
|
+
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
20062
|
+
const value = parsed.success ? parsed.data : field.default;
|
|
20063
|
+
const existing = out[field.stepId] ?? {};
|
|
20064
|
+
out[field.stepId] = {
|
|
20065
|
+
...existing,
|
|
20066
|
+
[field.key]: value
|
|
20067
|
+
};
|
|
20068
|
+
}
|
|
20069
|
+
return out;
|
|
20070
|
+
}
|
|
20071
|
+
readClusterStepSettings({});
|
|
20072
|
+
/**
|
|
19774
20073
|
* pipeline-analytics — device-scoped wrapper cap. Refines raw
|
|
19775
20074
|
* per-frame detections emitted by the pipeline runner into tracked
|
|
19776
20075
|
* objects, per-kind event collections (motion / object / audio), and
|
|
@@ -20586,7 +20885,8 @@ var MediaFileKindEnum = _enum([
|
|
|
20586
20885
|
"thumbnailSmall",
|
|
20587
20886
|
"confirmationCrop",
|
|
20588
20887
|
"debugCrop",
|
|
20589
|
-
"sceneFrame"
|
|
20888
|
+
"sceneFrame",
|
|
20889
|
+
"lastSceneFrame"
|
|
20590
20890
|
]);
|
|
20591
20891
|
/**
|
|
20592
20892
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -21138,7 +21438,23 @@ var SearchObjectEventsInput = object({
|
|
|
21138
21438
|
until: number().optional(),
|
|
21139
21439
|
classFilter: string().optional(),
|
|
21140
21440
|
limit: number().default(50),
|
|
21141
|
-
|
|
21441
|
+
/**
|
|
21442
|
+
* An ABSOLUTE cosine floor. Optional since D649: a floor is a property of the
|
|
21443
|
+
* model (0.2 kept 96% of matched pairs on MobileCLIP S1 and 2.7% on SigLIP2),
|
|
21444
|
+
* so an absent one resolves to the searched model's own `searchMinScore`
|
|
21445
|
+
* scaled by `strictness`. A number sent here is honoured verbatim.
|
|
21446
|
+
*/
|
|
21447
|
+
minScore: number().min(0).max(1).optional(),
|
|
21448
|
+
/** Model-relative floor — see `resolveClipSearchMinScore`. Default `loose`. */
|
|
21449
|
+
strictness: ClipSearchStrictnessSchema.optional(),
|
|
21450
|
+
/**
|
|
21451
|
+
* Search THIS CLIP model's index instead of the cluster row's. Every index a
|
|
21452
|
+
* model ever wrote stays searchable until it is wiped (the MobileCLIP index
|
|
21453
|
+
* through a SigLIP2 cutover and its rollback window). An id with no CLIP
|
|
21454
|
+
* metadata is refused; an id other than the cluster row's is ADMIN-only
|
|
21455
|
+
* (`model-override-requires-admin`).
|
|
21456
|
+
*/
|
|
21457
|
+
modelId: string().min(1).optional()
|
|
21142
21458
|
});
|
|
21143
21459
|
var TrackCascadeCountsSchema = object({
|
|
21144
21460
|
/** Persisted track roots deleted (authoritative). */
|
|
@@ -21273,7 +21589,41 @@ var RebuildObjectEmbeddingsInput = object({
|
|
|
21273
21589
|
* comparable, so wiping and rebuilding is the only way to be sure every vector
|
|
21274
21590
|
* means the same thing.
|
|
21275
21591
|
*/
|
|
21276
|
-
var WipeObjectEmbeddingsResultSchema = object({
|
|
21592
|
+
var WipeObjectEmbeddingsResultSchema = object({
|
|
21593
|
+
deleted: number(),
|
|
21594
|
+
/**
|
|
21595
|
+
* CLIP indexes that could NOT be emptied (unreachable, or refused at their
|
|
21596
|
+
* dimension) — not a clean slate. Additive and optional (D649).
|
|
21597
|
+
*/
|
|
21598
|
+
failedIndexes: array(string()).optional()
|
|
21599
|
+
});
|
|
21600
|
+
/**
|
|
21601
|
+
* Why a rebuild did not start, BY NAME — ONE vocabulary for both gates in front
|
|
21602
|
+
* of a pass (D649 over D651). A bare `started: false` read the same for "the
|
|
21603
|
+
* stores are booting" and "the cluster row names a model with no CLIP
|
|
21604
|
+
* metadata", which need different fixes.
|
|
21605
|
+
* - `stores-unavailable` — the analytics stores or the API are not up yet.
|
|
21606
|
+
* - the owner's confirmation of the cluster model (D651, `ClusterPinConfirmer`):
|
|
21607
|
+
* a pass that rewrites an index needs two agreeing reads of the OWNER's
|
|
21608
|
+
* answer (`pipelineOrchestrator.getClusterModelChoice`) — a pass that cannot
|
|
21609
|
+
* name its model does not run (D54):
|
|
21610
|
+
* - the owner's own `unreadable` reasons (`owner-not-ready`,
|
|
21611
|
+
* `store-read-failed`, `three-way-read-unavailable`, `invalid-stored`,
|
|
21612
|
+
* `not-cluster-scoped`);
|
|
21613
|
+
* - `method-unavailable` — the orchestrator predates the method;
|
|
21614
|
+
* - `read-failed` — the call failed or answered something unparseable;
|
|
21615
|
+
* - `reads-disagree` — the two reads named different choices.
|
|
21616
|
+
* - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
|
|
21617
|
+
* index to fill and no dimension to check against (D649).
|
|
21618
|
+
*/
|
|
21619
|
+
var RebuildObjectEmbeddingsRefusalSchema = _enum([
|
|
21620
|
+
"stores-unavailable",
|
|
21621
|
+
...CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS,
|
|
21622
|
+
"method-unavailable",
|
|
21623
|
+
"read-failed",
|
|
21624
|
+
"reads-disagree",
|
|
21625
|
+
"not-a-clip-model"
|
|
21626
|
+
]);
|
|
21277
21627
|
/**
|
|
21278
21628
|
* Acknowledgement that a rebuild STARTED.
|
|
21279
21629
|
*
|
|
@@ -21286,7 +21636,12 @@ var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
|
|
|
21286
21636
|
var RebuildObjectEmbeddingsResultSchema = object({
|
|
21287
21637
|
started: boolean(),
|
|
21288
21638
|
/** True when a pass was already running; the new request is ignored. */
|
|
21289
|
-
alreadyRunning: boolean()
|
|
21639
|
+
alreadyRunning: boolean(),
|
|
21640
|
+
/** Present when the pass refused to start — see `RebuildObjectEmbeddingsRefusalSchema`. */
|
|
21641
|
+
refusal: RebuildObjectEmbeddingsRefusalSchema.optional(),
|
|
21642
|
+
/** The CLIP model the pass pinned, and the index it fills (when it started). */
|
|
21643
|
+
modelId: string().optional(),
|
|
21644
|
+
index: string().optional()
|
|
21290
21645
|
});
|
|
21291
21646
|
var RebuildStatusSchema = object({
|
|
21292
21647
|
running: boolean(),
|
|
@@ -21320,7 +21675,11 @@ var RebuildStatusSchema = object({
|
|
|
21320
21675
|
startedAtMs: number().nullable(),
|
|
21321
21676
|
finishedAtMs: number().nullable(),
|
|
21322
21677
|
/** Present when the pass ended by throwing. */
|
|
21323
|
-
error: string().nullable()
|
|
21678
|
+
error: string().nullable(),
|
|
21679
|
+
/** The CLIP model the current / last pass pinned (D54), `null` before any. */
|
|
21680
|
+
modelId: string().nullable(),
|
|
21681
|
+
/** The index that pass fills — `ClipModelMeta.vectorIndex` of `modelId` (D649). */
|
|
21682
|
+
index: string().nullable()
|
|
21324
21683
|
});
|
|
21325
21684
|
/**
|
|
21326
21685
|
* Acknowledgement that a debug-media reclaim STARTED.
|
|
@@ -21641,7 +22000,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21641
22000
|
deviceId: number(),
|
|
21642
22001
|
ownerKind: MediaPresenceOwnerKindSchema,
|
|
21643
22002
|
ownerIds: array(string()).max(5e3)
|
|
21644
|
-
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
22003
|
+
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly(), { caller: "required" }), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21645
22004
|
kind: "mutation",
|
|
21646
22005
|
auth: "admin"
|
|
21647
22006
|
}), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
|
|
@@ -22676,6 +23035,17 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22676
23035
|
hubHostnameOverride: string().optional()
|
|
22677
23036
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
22678
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
|
+
/**
|
|
22679
23049
|
* One ENABLED inference device on the runner's node, as the step-tree
|
|
22680
23050
|
* device-jump resolver sees it (phase 1). The orchestrator populates this
|
|
22681
23051
|
* roster on the attach payload whenever the camera is elected onto a specific
|
|
@@ -22687,7 +23057,16 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22687
23057
|
var RunnerInferenceDeviceSchema = object({
|
|
22688
23058
|
deviceKey: string(),
|
|
22689
23059
|
weight: number().positive().default(1),
|
|
22690
|
-
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()
|
|
22691
23070
|
});
|
|
22692
23071
|
/**
|
|
22693
23072
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
@@ -23562,6 +23941,28 @@ var NodeInferenceDeviceSchema = object({
|
|
|
23562
23941
|
*/
|
|
23563
23942
|
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
23564
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
|
+
]);
|
|
23565
23966
|
var NodeInferenceDevicesSchema = object({
|
|
23566
23967
|
nodeId: string(),
|
|
23567
23968
|
/** False when the node's platform-probe was unreachable (no live device set). */
|
|
@@ -23589,10 +23990,17 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
23589
23990
|
}), object({ success: literal(true) }), {
|
|
23590
23991
|
kind: "mutation",
|
|
23591
23992
|
auth: "admin"
|
|
23592
|
-
}), 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
|
+
}), {
|
|
23593
24001
|
kind: "mutation",
|
|
23594
24002
|
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({
|
|
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({
|
|
23596
24004
|
nodeId: string(),
|
|
23597
24005
|
capName: string(),
|
|
23598
24006
|
addonId: string()
|
|
@@ -25892,6 +26300,167 @@ DeviceType.Camera, method(object({
|
|
|
25892
26300
|
auth: "protected"
|
|
25893
26301
|
});
|
|
25894
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
|
+
}), object({
|
|
26425
|
+
state: literal("unreachable"),
|
|
26426
|
+
addonId: string(),
|
|
26427
|
+
reason: string()
|
|
26428
|
+
})]);
|
|
26429
|
+
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
26430
|
+
deviceId: number().int(),
|
|
26431
|
+
name: string(),
|
|
26432
|
+
type: string(),
|
|
26433
|
+
location: string().nullable(),
|
|
26434
|
+
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
26435
|
+
parentName: string().nullable(),
|
|
26436
|
+
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
26437
|
+
suggested: boolean(),
|
|
26438
|
+
/** Why it is suggested ("same location"), null when it is not. */
|
|
26439
|
+
reason: string().nullable()
|
|
26440
|
+
})) });
|
|
26441
|
+
/**
|
|
26442
|
+
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
26443
|
+
* reloaded the host (or, for an accessory child, its parent) because the
|
|
26444
|
+
* write changed what the host REGISTERS (a graft switched on or off, slice 2).
|
|
26445
|
+
*/
|
|
26446
|
+
var ExtensionSetResultSchema = object({
|
|
26447
|
+
applied: literal(true),
|
|
26448
|
+
reload: _enum([
|
|
26449
|
+
"none",
|
|
26450
|
+
"host",
|
|
26451
|
+
"parent"
|
|
26452
|
+
])
|
|
26453
|
+
});
|
|
26454
|
+
var ExtensionSlotRefInputSchema = object({
|
|
26455
|
+
deviceId: number().int(),
|
|
26456
|
+
slotRef: string().min(1)
|
|
26457
|
+
});
|
|
26458
|
+
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
26459
|
+
method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
26460
|
+
kind: "mutation",
|
|
26461
|
+
auth: "admin"
|
|
26462
|
+
});
|
|
26463
|
+
/**
|
|
25895
26464
|
* Optional client-side hints sent at session creation to help the provider
|
|
25896
26465
|
* pick the best native source. All fields optional — a viewer that knows
|
|
25897
26466
|
* nothing still gets a sane default. (Relocated from the retired `webrtc`
|
|
@@ -27680,17 +28249,6 @@ object({
|
|
|
27680
28249
|
deviceId: number(),
|
|
27681
28250
|
status: DeviceStatusSchema
|
|
27682
28251
|
});
|
|
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
28252
|
/**
|
|
27695
28253
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
27696
28254
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -34457,42 +35015,6 @@ DeviceType.Camera, method(object({
|
|
|
34457
35015
|
package: array(ZoneRuleSchema).readonly()
|
|
34458
35016
|
});
|
|
34459
35017
|
/**
|
|
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
35018
|
* Accessory device helpers — shared across drivers.
|
|
34497
35019
|
*
|
|
34498
35020
|
* Many vendor-specific drivers register accessory child devices on
|
|
@@ -37292,6 +37814,30 @@ Object.freeze({
|
|
|
37292
37814
|
addonId: null,
|
|
37293
37815
|
access: "create"
|
|
37294
37816
|
},
|
|
37817
|
+
"deviceExtension.listCandidates": {
|
|
37818
|
+
capName: "device-extension",
|
|
37819
|
+
capScope: "device",
|
|
37820
|
+
addonId: null,
|
|
37821
|
+
access: "view"
|
|
37822
|
+
},
|
|
37823
|
+
"deviceExtension.listSlots": {
|
|
37824
|
+
capName: "device-extension",
|
|
37825
|
+
capScope: "device",
|
|
37826
|
+
addonId: null,
|
|
37827
|
+
access: "view"
|
|
37828
|
+
},
|
|
37829
|
+
"deviceExtension.listSources": {
|
|
37830
|
+
capName: "device-extension",
|
|
37831
|
+
capScope: "device",
|
|
37832
|
+
addonId: null,
|
|
37833
|
+
access: "view"
|
|
37834
|
+
},
|
|
37835
|
+
"deviceExtension.setSlot": {
|
|
37836
|
+
capName: "device-extension",
|
|
37837
|
+
capScope: "device",
|
|
37838
|
+
addonId: null,
|
|
37839
|
+
access: "create"
|
|
37840
|
+
},
|
|
37295
37841
|
"deviceManager.addLocation": {
|
|
37296
37842
|
capName: "device-manager",
|
|
37297
37843
|
capScope: "system",
|
|
@@ -38042,6 +38588,12 @@ Object.freeze({
|
|
|
38042
38588
|
addonId: null,
|
|
38043
38589
|
access: "view"
|
|
38044
38590
|
},
|
|
38591
|
+
"embeddingEncoder.resetFailedModels": {
|
|
38592
|
+
capName: "embedding-encoder",
|
|
38593
|
+
capScope: "system",
|
|
38594
|
+
addonId: null,
|
|
38595
|
+
access: "delete"
|
|
38596
|
+
},
|
|
38045
38597
|
"enumSensor.getStatus": {
|
|
38046
38598
|
capName: "enum-sensor",
|
|
38047
38599
|
capScope: "device",
|
|
@@ -40376,6 +40928,12 @@ Object.freeze({
|
|
|
40376
40928
|
addonId: null,
|
|
40377
40929
|
access: "view"
|
|
40378
40930
|
},
|
|
40931
|
+
"pipelineOrchestrator.getClusterModelChoice": {
|
|
40932
|
+
capName: "pipeline-orchestrator",
|
|
40933
|
+
capScope: "system",
|
|
40934
|
+
addonId: null,
|
|
40935
|
+
access: "view"
|
|
40936
|
+
},
|
|
40379
40937
|
"pipelineOrchestrator.getDeviceLiveContribution": {
|
|
40380
40938
|
capName: "pipeline-orchestrator",
|
|
40381
40939
|
capScope: "system",
|
|
@@ -43201,6 +43759,26 @@ Object.freeze({
|
|
|
43201
43759
|
form: "single",
|
|
43202
43760
|
optional: false
|
|
43203
43761
|
}],
|
|
43762
|
+
"deviceExtension.listCandidates": [{
|
|
43763
|
+
name: "deviceId",
|
|
43764
|
+
form: "single",
|
|
43765
|
+
optional: false
|
|
43766
|
+
}],
|
|
43767
|
+
"deviceExtension.listSlots": [{
|
|
43768
|
+
name: "deviceId",
|
|
43769
|
+
form: "single",
|
|
43770
|
+
optional: false
|
|
43771
|
+
}],
|
|
43772
|
+
"deviceExtension.listSources": [{
|
|
43773
|
+
name: "deviceId",
|
|
43774
|
+
form: "single",
|
|
43775
|
+
optional: false
|
|
43776
|
+
}],
|
|
43777
|
+
"deviceExtension.setSlot": [{
|
|
43778
|
+
name: "deviceId",
|
|
43779
|
+
form: "single",
|
|
43780
|
+
optional: false
|
|
43781
|
+
}],
|
|
43204
43782
|
"deviceManager.adoptionRelease": [{
|
|
43205
43783
|
name: "camDeviceId",
|
|
43206
43784
|
form: "single",
|
|
@@ -45660,68 +46238,6 @@ TimelapseRuleInputSchema.extend({
|
|
|
45660
46238
|
createdAt: number(),
|
|
45661
46239
|
updatedAt: number()
|
|
45662
46240
|
});
|
|
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
46241
|
object({
|
|
45726
46242
|
/**
|
|
45727
46243
|
* Fraction of the box's own size added on EACH side before cutting.
|