@camstack/addon-ai 0.4.124 → 0.4.125
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/THIRD_PARTY_MODELS.md +8 -0
- package/dist/addon.js +640 -124
- package/dist/addon.mjs +640 -124
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5525,7 +5525,7 @@ function number(params) {
|
|
|
5525
5525
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
5526
5526
|
}
|
|
5527
5527
|
//#endregion
|
|
5528
|
-
//#region ../types/dist/sleep-
|
|
5528
|
+
//#region ../types/dist/sleep-BXv0ZcRa.mjs
|
|
5529
5529
|
/**
|
|
5530
5530
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5531
5531
|
* window to float samples (D455).
|
|
@@ -6310,6 +6310,40 @@ var BaseAddon = class {
|
|
|
6310
6310
|
const node = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6311
6311
|
return keys.size > 0 ? projectStore(raw, keys, node) : raw;
|
|
6312
6312
|
}
|
|
6313
|
+
/**
|
|
6314
|
+
* Whether ONE global key of this addon's store was written, read three-way
|
|
6315
|
+
* (D651). For a question a hydrated view cannot answer: `getGlobalSettings`
|
|
6316
|
+
* reports `value ?? default`, so "the operator chose the default" and "nobody
|
|
6317
|
+
* chose" look the same, and a failed read looks like both. A `perNode` key is
|
|
6318
|
+
* not supported here: its stored name is scoped.
|
|
6319
|
+
*/
|
|
6320
|
+
async readStoredGlobalKey(key) {
|
|
6321
|
+
const read = this._ctx?.settings?.readAddonStoreResult;
|
|
6322
|
+
if (read === void 0) return {
|
|
6323
|
+
kind: "unreadable",
|
|
6324
|
+
reason: "three-way-read-unavailable"
|
|
6325
|
+
};
|
|
6326
|
+
let result;
|
|
6327
|
+
try {
|
|
6328
|
+
result = await read.call(this._ctx?.settings);
|
|
6329
|
+
} catch (err) {
|
|
6330
|
+
return {
|
|
6331
|
+
kind: "unreadable",
|
|
6332
|
+
reason: "store-read-failed",
|
|
6333
|
+
error: err instanceof Error ? err.message : String(err)
|
|
6334
|
+
};
|
|
6335
|
+
}
|
|
6336
|
+
if (result.kind === "failed") return {
|
|
6337
|
+
kind: "unreadable",
|
|
6338
|
+
reason: "store-read-failed",
|
|
6339
|
+
error: result.error
|
|
6340
|
+
};
|
|
6341
|
+
if (result.kind === "missing" || !Object.prototype.hasOwnProperty.call(result.value, key)) return { kind: "absent" };
|
|
6342
|
+
return {
|
|
6343
|
+
kind: "present",
|
|
6344
|
+
value: result.value[key]
|
|
6345
|
+
};
|
|
6346
|
+
}
|
|
6313
6347
|
async updateGlobalSettings(patch, nodeId) {
|
|
6314
6348
|
const keys = this.perNodeKeys();
|
|
6315
6349
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
@@ -9611,6 +9645,43 @@ var LogChannelWindowSchema = object({
|
|
|
9611
9645
|
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
9612
9646
|
deviceIds: array(number$1().int()).readonly().nullable()
|
|
9613
9647
|
});
|
|
9648
|
+
var ClipModelMetaSchema = object({
|
|
9649
|
+
/** The paired text encoder's catalog id (the embedding-encoder's text catalog). */
|
|
9650
|
+
textModelId: string().min(1),
|
|
9651
|
+
/** Output dimension of BOTH towers. A vector of any other length is refused. */
|
|
9652
|
+
embeddingDim: number$1().int().positive(),
|
|
9653
|
+
/**
|
|
9654
|
+
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
9655
|
+
* per index: two models share an index only when their vectors are ranked
|
|
9656
|
+
* against each other, which for CLIP means never across families. MobileCLIP
|
|
9657
|
+
* S1 and S2 share `object-clip` for history (separated by the row's
|
|
9658
|
+
* `modelId`); any other model gets its own.
|
|
9659
|
+
*/
|
|
9660
|
+
vectorIndex: string().regex(/^object-clip(-[a-z0-9][a-z0-9-]*)?$/),
|
|
9661
|
+
/**
|
|
9662
|
+
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
9663
|
+
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
9664
|
+
* models directory, so two different tokenizers under the same name would
|
|
9665
|
+
* silently overwrite each other (whichever model downloaded last wins, and
|
|
9666
|
+
* the other one tokenises with the wrong vocabulary).
|
|
9667
|
+
*/
|
|
9668
|
+
tokenizerFile: string().min(1),
|
|
9669
|
+
/** Token window the text graph takes (SigLIP2: 64; CLIP BPE: 77). */
|
|
9670
|
+
contextLength: number$1().int().positive(),
|
|
9671
|
+
/** Id the tokenizer pads with. */
|
|
9672
|
+
padId: number$1().int().nonnegative(),
|
|
9673
|
+
/**
|
|
9674
|
+
* The search cosine floor at `strictness: 'loose'` — calibrated per model,
|
|
9675
|
+
* because cosine bands are a property of the model: 0.2 keeps 96% of matched
|
|
9676
|
+
* COCO caption-image pairs on MobileCLIP S1 and 2.7% on SigLIP2.
|
|
9677
|
+
*/
|
|
9678
|
+
searchMinScore: number$1().min(0).max(1)
|
|
9679
|
+
});
|
|
9680
|
+
var ClipSearchStrictnessSchema = _enum([
|
|
9681
|
+
"loose",
|
|
9682
|
+
"balanced",
|
|
9683
|
+
"strict"
|
|
9684
|
+
]);
|
|
9614
9685
|
var MODEL_FORMATS = [
|
|
9615
9686
|
"onnx",
|
|
9616
9687
|
"coreml",
|
|
@@ -9814,7 +9885,14 @@ var ModelCatalogEntrySchema = object({
|
|
|
9814
9885
|
* applies (Frigate / COCO public catalog). Set on a custom model whose raw
|
|
9815
9886
|
* labels already ARE the CamStack macros (Scrypted identity map).
|
|
9816
9887
|
*/
|
|
9817
|
-
classMap: DetectionCatalogClassMapSchema.optional()
|
|
9888
|
+
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
9889
|
+
/**
|
|
9890
|
+
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
9891
|
+
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
9892
|
+
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
9893
|
+
* embedding encoder and the semantic-search store (D649).
|
|
9894
|
+
*/
|
|
9895
|
+
clip: ClipModelMetaSchema.optional()
|
|
9818
9896
|
});
|
|
9819
9897
|
var ConvertTargetSchema = discriminatedUnion("format", [object({
|
|
9820
9898
|
format: literal("openvino"),
|
|
@@ -14032,6 +14110,13 @@ var LinkedDeviceSchema = object({
|
|
|
14032
14110
|
features: array(string()),
|
|
14033
14111
|
producesTrackedEvents: boolean().optional()
|
|
14034
14112
|
});
|
|
14113
|
+
/**
|
|
14114
|
+
* The `linked-devices` extension slot's editable value (D648): the operator's
|
|
14115
|
+
* pick list, exactly what `_linkedDeviceIds` persists. Tree children are NOT
|
|
14116
|
+
* in it — they are always linked and are not a pick.
|
|
14117
|
+
*/
|
|
14118
|
+
var LinkedDevicesSlotValueSchema = object({ deviceIds: array(number$1().int().positive()) });
|
|
14119
|
+
DeviceType.Camera;
|
|
14035
14120
|
/** One camera's resolved linked set, tagged with the camera it belongs to.
|
|
14036
14121
|
* The batch answer needs the tag; the single-device answer already has it
|
|
14037
14122
|
* from the input, which is why `getLinkedDevices` keeps the untagged shape. */
|
|
@@ -14557,16 +14642,101 @@ var EmbeddingResultSchema = object({
|
|
|
14557
14642
|
embedding: array(number$1()),
|
|
14558
14643
|
inferenceMs: number$1()
|
|
14559
14644
|
});
|
|
14645
|
+
/** The two CLIP towers the encoder runs; a crash budget is kept per tower. */
|
|
14646
|
+
var EmbeddingTowerSchema = _enum(["image", "text"]);
|
|
14647
|
+
/**
|
|
14648
|
+
* A tower in the terminal `failed` state (D649, D6): it crashed or failed to
|
|
14649
|
+
* load `crashes` times within `windowMs`, and is refused by name until an
|
|
14650
|
+
* operator `resetFailedModels` or a model change — never on a timer.
|
|
14651
|
+
*
|
|
14652
|
+
* `nodeId` is the node whose tower failed. The state lives in THAT node's
|
|
14653
|
+
* encoder process (in memory — a runner respawn clears it), and one node's
|
|
14654
|
+
* answer says nothing about another's.
|
|
14655
|
+
*/
|
|
14656
|
+
var EmbeddingFailedModelSchema = object({
|
|
14657
|
+
modelId: string(),
|
|
14658
|
+
tower: EmbeddingTowerSchema,
|
|
14659
|
+
nodeId: string(),
|
|
14660
|
+
crashes: number$1(),
|
|
14661
|
+
windowMs: number$1(),
|
|
14662
|
+
sinceMs: number$1(),
|
|
14663
|
+
lastReason: string()
|
|
14664
|
+
});
|
|
14665
|
+
/**
|
|
14666
|
+
* A model whose REQUIREMENTS can never be met on this node (D649 round 5):
|
|
14667
|
+
* an id the catalog does not know, a model URL answering 404/410, a declared
|
|
14668
|
+
* sibling (the tokenizer) that is not there. After `attempts` failed builds
|
|
14669
|
+
* it is terminally `requirements-failed`, refused by name until an operator
|
|
14670
|
+
* `resetFailedModels` or a model change — the same exits as a crashed tower.
|
|
14671
|
+
*/
|
|
14672
|
+
var EmbeddingFailedRequirementSchema = object({
|
|
14673
|
+
modelId: string(),
|
|
14674
|
+
tower: EmbeddingTowerSchema,
|
|
14675
|
+
nodeId: string(),
|
|
14676
|
+
attempts: number$1(),
|
|
14677
|
+
sinceMs: number$1(),
|
|
14678
|
+
lastReason: string()
|
|
14679
|
+
});
|
|
14560
14680
|
var EmbeddingInfoSchema = object({
|
|
14561
14681
|
modelId: string(),
|
|
14562
14682
|
embeddingDim: number$1(),
|
|
14563
|
-
ready: boolean()
|
|
14564
|
-
|
|
14683
|
+
ready: boolean(),
|
|
14684
|
+
/**
|
|
14685
|
+
* The node that answered. Absent only from an encoder older than D649's
|
|
14686
|
+
* crash budget — whose `failedModels` is then UNKNOWN (D315), never "none".
|
|
14687
|
+
*/
|
|
14688
|
+
nodeId: string().optional(),
|
|
14689
|
+
/**
|
|
14690
|
+
* Towers in `failed` on the answering node, each row naming it. `undefined`
|
|
14691
|
+
* means the node could not say (pre-budget encoder); a node that has the
|
|
14692
|
+
* budget always answers an array, empty included.
|
|
14693
|
+
*/
|
|
14694
|
+
failedModels: array(EmbeddingFailedModelSchema).optional(),
|
|
14695
|
+
/** Models terminally `requirements-failed` on the answering node; same reading as above. */
|
|
14696
|
+
failedRequirements: array(EmbeddingFailedRequirementSchema).optional()
|
|
14697
|
+
});
|
|
14698
|
+
/**
|
|
14699
|
+
* The THREE codes an encoder refusal can carry (D649, D6). Same shape as
|
|
14700
|
+
* `VECTOR_INDEX_DIM_CONFLICT`: the code rides in the MESSAGE, because an
|
|
14701
|
+
* Error's own properties do not survive the UDS/tRPC hop and its message does,
|
|
14702
|
+
* and both sides go through the helpers below — the encoder builds the
|
|
14703
|
+
* refusal, the live detail plane classifies on it to count refusals per
|
|
14704
|
+
* camera instead of logging one warning per track. The bracketed token
|
|
14705
|
+
* carries the code, the model, the tower and the node so a consumer never
|
|
14706
|
+
* parses prose.
|
|
14707
|
+
*
|
|
14708
|
+
* - `EMBEDDING_MODEL_FAILED`: the tower crashed / failed to load past the crash
|
|
14709
|
+
* budget — terminal until `resetFailedModels` or a model change.
|
|
14710
|
+
* - `EMBEDDING_REQUIREMENTS_UNAVAILABLE`: files or runtime not there right now
|
|
14711
|
+
* (a download or Python that failed, or the cooldown after one) — the next
|
|
14712
|
+
* request past the cooldown tries again.
|
|
14713
|
+
* - `EMBEDDING_REQUIREMENTS_FAILED`: the requirements can never be met (unknown
|
|
14714
|
+
* id, 404/410, missing sibling) and the bounded attempts are spent —
|
|
14715
|
+
* terminal, same exits as a crashed tower.
|
|
14716
|
+
*/
|
|
14717
|
+
var EMBEDDING_MODEL_FAILED = "embedding-model-failed";
|
|
14718
|
+
var EMBEDDING_REQUIREMENTS_UNAVAILABLE = "embedding-requirements-unavailable";
|
|
14719
|
+
var EMBEDDING_REQUIREMENTS_FAILED = "embedding-requirements-failed";
|
|
14720
|
+
_enum([
|
|
14721
|
+
EMBEDDING_MODEL_FAILED,
|
|
14722
|
+
EMBEDDING_REQUIREMENTS_UNAVAILABLE,
|
|
14723
|
+
EMBEDDING_REQUIREMENTS_FAILED
|
|
14724
|
+
]);
|
|
14725
|
+
new RegExp(`\\[(${EMBEDDING_MODEL_FAILED}|${EMBEDDING_REQUIREMENTS_UNAVAILABLE}|${EMBEDDING_REQUIREMENTS_FAILED}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);
|
|
14565
14726
|
method(object({
|
|
14566
14727
|
crop: _instanceof(Uint8Array),
|
|
14567
14728
|
width: number$1(),
|
|
14568
14729
|
height: number$1()
|
|
14569
|
-
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
14730
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
14731
|
+
text: string(),
|
|
14732
|
+
modelId: string().min(1).optional()
|
|
14733
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" }), method(object({ modelId: string().min(1).optional() }), object({
|
|
14734
|
+
cleared: array(string()),
|
|
14735
|
+
nodeId: string()
|
|
14736
|
+
}), {
|
|
14737
|
+
kind: "mutation",
|
|
14738
|
+
auth: "admin"
|
|
14739
|
+
});
|
|
14570
14740
|
/**
|
|
14571
14741
|
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14572
14742
|
* through, per camera, with the denominator attached. It stores nothing.
|
|
@@ -18080,7 +18250,12 @@ var NcMediaPolicySchema = object({
|
|
|
18080
18250
|
* the degrade engine, which drops the video and keeps the still.
|
|
18081
18251
|
*/
|
|
18082
18252
|
clip: boolean().optional(),
|
|
18083
|
-
/**
|
|
18253
|
+
/**
|
|
18254
|
+
* Seconds of footage BEFORE / AFTER the event instant. Absent =
|
|
18255
|
+
* {@link NC_CLIP_PRE_ROLL_DEFAULT_SEC} / {@link NC_CLIP_POST_ROLL_DEFAULT_SEC}
|
|
18256
|
+
* (4 / 6), resolved by the Notification Center at dispatch — deliberately not
|
|
18257
|
+
* a Zod default, so a rule that never chose keeps following the hub's.
|
|
18258
|
+
*/
|
|
18084
18259
|
clipPreRollSec: number$1().int().min(0).max(30).optional(),
|
|
18085
18260
|
clipPostRollSec: number$1().int().min(0).max(30).optional(),
|
|
18086
18261
|
/**
|
|
@@ -19458,6 +19633,130 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
19458
19633
|
});
|
|
19459
19634
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
19460
19635
|
/**
|
|
19636
|
+
* A model choice has a SCOPE, and a scope change has a workflow.
|
|
19637
|
+
*
|
|
19638
|
+
* ## The two scopes
|
|
19639
|
+
*
|
|
19640
|
+
* Almost every pipeline step's model is a **node** question: which build runs
|
|
19641
|
+
* fastest on THIS accelerator. Two nodes may legitimately answer differently —
|
|
19642
|
+
* a Coral runs the tflite SSD, a Mac runs the coreml YOLO — because the answers
|
|
19643
|
+
* are compared against nothing. They produce boxes, and a box is a box.
|
|
19644
|
+
*
|
|
19645
|
+
* Two steps are not like that. `face-embedding` and `clip-embedding` produce
|
|
19646
|
+
* **vectors that land in ONE shared index** (`identity_samples`,
|
|
19647
|
+
* `vec_object_clip`) and are ranked against each other by cosine similarity.
|
|
19648
|
+
* Cosine similarity between two encoders is not a weak signal, it is a
|
|
19649
|
+
* meaningless number — and nothing inside a vector can tell you it happened.
|
|
19650
|
+
* So for those two steps the model is a **cluster** question with exactly one
|
|
19651
|
+
* answer, stored in exactly one row.
|
|
19652
|
+
*
|
|
19653
|
+
* That is the same argument [D52](../../../../docs/decisions/adr-0052.md) makes
|
|
19654
|
+
* for the crop convention (`detail-crop.ts`), one level up: the crop decides
|
|
19655
|
+
* WHAT pixels the encoder sees, this decides WHICH encoder sees them. Both are
|
|
19656
|
+
* cluster-wide for the same reason and neither may become per-node.
|
|
19657
|
+
*
|
|
19658
|
+
* ## Why the registry lives here and not in the step catalog
|
|
19659
|
+
*
|
|
19660
|
+
* The scope itself is declared on the step, in
|
|
19661
|
+
* `detection-pipeline/registry/step-definitions.ts` (`StepDefinition.modelScope`)
|
|
19662
|
+
* — that is where a new step declares what kind of choice its model is. But the
|
|
19663
|
+
* catalog lives inside `addon-pipeline`, and three packages that must NOT
|
|
19664
|
+
* import an addon need to know the set: the orchestrator (which renders and
|
|
19665
|
+
* stores the row), post-analysis (which pins the row for a re-embed pass) and
|
|
19666
|
+
* admin-ui (which mirrors it). So the set is mirrored here, and
|
|
19667
|
+
* `scripts/check-cluster-model-scope.ts` fails the build when the two disagree.
|
|
19668
|
+
* A hand-copied key that stops matching is exactly how a setting silently stops
|
|
19669
|
+
* arriving while both sides still look correct.
|
|
19670
|
+
*
|
|
19671
|
+
* ## The defaults ARE today's behaviour
|
|
19672
|
+
*
|
|
19673
|
+
* {@link DEFAULT_CLUSTER_STEP_MODELS} reproduces the catalog `defaultModelId`
|
|
19674
|
+
* of both steps. Declaring the scope therefore changes nothing on the day it
|
|
19675
|
+
* ships: the cluster row starts out saying what every node was already doing.
|
|
19676
|
+
* Changing it is legitimate — that is what the knob is for — but it invalidates
|
|
19677
|
+
* the stored vectors of that surface, and must be followed by a re-embed pass
|
|
19678
|
+
* (`face-reembed-pass.ts`, `embedding-rebuild.ts`).
|
|
19679
|
+
*/
|
|
19680
|
+
/**
|
|
19681
|
+
* Why the orchestrator cannot say which model the operator chose for a
|
|
19682
|
+
* cluster-scoped step (D651).
|
|
19683
|
+
*/
|
|
19684
|
+
var CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS = [
|
|
19685
|
+
"owner-not-ready",
|
|
19686
|
+
"store-read-failed",
|
|
19687
|
+
"three-way-read-unavailable",
|
|
19688
|
+
"invalid-stored",
|
|
19689
|
+
"not-cluster-scoped"
|
|
19690
|
+
];
|
|
19691
|
+
Object.freeze(Object.fromEntries([{
|
|
19692
|
+
stepId: "face-embedding",
|
|
19693
|
+
label: "Face recognition model",
|
|
19694
|
+
defaultModelId: "auraface-r100",
|
|
19695
|
+
indexName: "the enrolled face gallery",
|
|
19696
|
+
options: [
|
|
19697
|
+
{
|
|
19698
|
+
id: "auraface-r100",
|
|
19699
|
+
label: "AuraFace R100"
|
|
19700
|
+
},
|
|
19701
|
+
{
|
|
19702
|
+
id: "arcface-r100",
|
|
19703
|
+
label: "ArcFace (ResNet34)"
|
|
19704
|
+
},
|
|
19705
|
+
{
|
|
19706
|
+
id: "inception-resnet-v1",
|
|
19707
|
+
label: "Inception ResNet V1"
|
|
19708
|
+
}
|
|
19709
|
+
]
|
|
19710
|
+
}, {
|
|
19711
|
+
stepId: "clip-embedding",
|
|
19712
|
+
label: "Semantic search model",
|
|
19713
|
+
defaultModelId: "mobileclip-s1",
|
|
19714
|
+
indexName: "the object semantic-search index",
|
|
19715
|
+
options: [
|
|
19716
|
+
{
|
|
19717
|
+
id: "mobileclip-s1",
|
|
19718
|
+
label: "MobileCLIP S1"
|
|
19719
|
+
},
|
|
19720
|
+
{
|
|
19721
|
+
id: "mobileclip-s2",
|
|
19722
|
+
label: "MobileCLIP S2"
|
|
19723
|
+
},
|
|
19724
|
+
{
|
|
19725
|
+
id: "siglip2-b16-224",
|
|
19726
|
+
label: "SigLIP2 B/16 (Apache-2.0)"
|
|
19727
|
+
}
|
|
19728
|
+
]
|
|
19729
|
+
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
19730
|
+
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
19731
|
+
stepId: "face-embedding",
|
|
19732
|
+
key: "minLandmarkFaceSize",
|
|
19733
|
+
label: "Min face size for recognition (detection px)",
|
|
19734
|
+
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.",
|
|
19735
|
+
type: "slider",
|
|
19736
|
+
min: 0,
|
|
19737
|
+
max: 64,
|
|
19738
|
+
step: 2,
|
|
19739
|
+
default: 24
|
|
19740
|
+
}];
|
|
19741
|
+
function clusterStepSettingKey(stepId, fieldKey) {
|
|
19742
|
+
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
19743
|
+
}
|
|
19744
|
+
var ClusterSettingNumberSchema = number$1().finite();
|
|
19745
|
+
function readClusterStepSettings(config) {
|
|
19746
|
+
const out = {};
|
|
19747
|
+
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
19748
|
+
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
19749
|
+
const value = parsed.success ? parsed.data : field.default;
|
|
19750
|
+
const existing = out[field.stepId] ?? {};
|
|
19751
|
+
out[field.stepId] = {
|
|
19752
|
+
...existing,
|
|
19753
|
+
[field.key]: value
|
|
19754
|
+
};
|
|
19755
|
+
}
|
|
19756
|
+
return out;
|
|
19757
|
+
}
|
|
19758
|
+
readClusterStepSettings({});
|
|
19759
|
+
/**
|
|
19461
19760
|
* pipeline-analytics — device-scoped wrapper cap. Refines raw
|
|
19462
19761
|
* per-frame detections emitted by the pipeline runner into tracked
|
|
19463
19762
|
* objects, per-kind event collections (motion / object / audio), and
|
|
@@ -20273,7 +20572,8 @@ var MediaFileKindEnum = _enum([
|
|
|
20273
20572
|
"thumbnailSmall",
|
|
20274
20573
|
"confirmationCrop",
|
|
20275
20574
|
"debugCrop",
|
|
20276
|
-
"sceneFrame"
|
|
20575
|
+
"sceneFrame",
|
|
20576
|
+
"lastSceneFrame"
|
|
20277
20577
|
]);
|
|
20278
20578
|
/**
|
|
20279
20579
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -20825,7 +21125,23 @@ var SearchObjectEventsInput = object({
|
|
|
20825
21125
|
until: number$1().optional(),
|
|
20826
21126
|
classFilter: string().optional(),
|
|
20827
21127
|
limit: number$1().default(50),
|
|
20828
|
-
|
|
21128
|
+
/**
|
|
21129
|
+
* An ABSOLUTE cosine floor. Optional since D649: a floor is a property of the
|
|
21130
|
+
* model (0.2 kept 96% of matched pairs on MobileCLIP S1 and 2.7% on SigLIP2),
|
|
21131
|
+
* so an absent one resolves to the searched model's own `searchMinScore`
|
|
21132
|
+
* scaled by `strictness`. A number sent here is honoured verbatim.
|
|
21133
|
+
*/
|
|
21134
|
+
minScore: number$1().min(0).max(1).optional(),
|
|
21135
|
+
/** Model-relative floor — see `resolveClipSearchMinScore`. Default `loose`. */
|
|
21136
|
+
strictness: ClipSearchStrictnessSchema.optional(),
|
|
21137
|
+
/**
|
|
21138
|
+
* Search THIS CLIP model's index instead of the cluster row's. Every index a
|
|
21139
|
+
* model ever wrote stays searchable until it is wiped (the MobileCLIP index
|
|
21140
|
+
* through a SigLIP2 cutover and its rollback window). An id with no CLIP
|
|
21141
|
+
* metadata is refused; an id other than the cluster row's is ADMIN-only
|
|
21142
|
+
* (`model-override-requires-admin`).
|
|
21143
|
+
*/
|
|
21144
|
+
modelId: string().min(1).optional()
|
|
20829
21145
|
});
|
|
20830
21146
|
var TrackCascadeCountsSchema = object({
|
|
20831
21147
|
/** Persisted track roots deleted (authoritative). */
|
|
@@ -20960,7 +21276,41 @@ var RebuildObjectEmbeddingsInput = object({
|
|
|
20960
21276
|
* comparable, so wiping and rebuilding is the only way to be sure every vector
|
|
20961
21277
|
* means the same thing.
|
|
20962
21278
|
*/
|
|
20963
|
-
var WipeObjectEmbeddingsResultSchema = object({
|
|
21279
|
+
var WipeObjectEmbeddingsResultSchema = object({
|
|
21280
|
+
deleted: number$1(),
|
|
21281
|
+
/**
|
|
21282
|
+
* CLIP indexes that could NOT be emptied (unreachable, or refused at their
|
|
21283
|
+
* dimension) — not a clean slate. Additive and optional (D649).
|
|
21284
|
+
*/
|
|
21285
|
+
failedIndexes: array(string()).optional()
|
|
21286
|
+
});
|
|
21287
|
+
/**
|
|
21288
|
+
* Why a rebuild did not start, BY NAME — ONE vocabulary for both gates in front
|
|
21289
|
+
* of a pass (D649 over D651). A bare `started: false` read the same for "the
|
|
21290
|
+
* stores are booting" and "the cluster row names a model with no CLIP
|
|
21291
|
+
* metadata", which need different fixes.
|
|
21292
|
+
* - `stores-unavailable` — the analytics stores or the API are not up yet.
|
|
21293
|
+
* - the owner's confirmation of the cluster model (D651, `ClusterPinConfirmer`):
|
|
21294
|
+
* a pass that rewrites an index needs two agreeing reads of the OWNER's
|
|
21295
|
+
* answer (`pipelineOrchestrator.getClusterModelChoice`) — a pass that cannot
|
|
21296
|
+
* name its model does not run (D54):
|
|
21297
|
+
* - the owner's own `unreadable` reasons (`owner-not-ready`,
|
|
21298
|
+
* `store-read-failed`, `three-way-read-unavailable`, `invalid-stored`,
|
|
21299
|
+
* `not-cluster-scoped`);
|
|
21300
|
+
* - `method-unavailable` — the orchestrator predates the method;
|
|
21301
|
+
* - `read-failed` — the call failed or answered something unparseable;
|
|
21302
|
+
* - `reads-disagree` — the two reads named different choices.
|
|
21303
|
+
* - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
|
|
21304
|
+
* index to fill and no dimension to check against (D649).
|
|
21305
|
+
*/
|
|
21306
|
+
var RebuildObjectEmbeddingsRefusalSchema = _enum([
|
|
21307
|
+
"stores-unavailable",
|
|
21308
|
+
...CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS,
|
|
21309
|
+
"method-unavailable",
|
|
21310
|
+
"read-failed",
|
|
21311
|
+
"reads-disagree",
|
|
21312
|
+
"not-a-clip-model"
|
|
21313
|
+
]);
|
|
20964
21314
|
/**
|
|
20965
21315
|
* Acknowledgement that a rebuild STARTED.
|
|
20966
21316
|
*
|
|
@@ -20973,7 +21323,12 @@ var WipeObjectEmbeddingsResultSchema = object({ deleted: number$1() });
|
|
|
20973
21323
|
var RebuildObjectEmbeddingsResultSchema = object({
|
|
20974
21324
|
started: boolean(),
|
|
20975
21325
|
/** True when a pass was already running; the new request is ignored. */
|
|
20976
|
-
alreadyRunning: boolean()
|
|
21326
|
+
alreadyRunning: boolean(),
|
|
21327
|
+
/** Present when the pass refused to start — see `RebuildObjectEmbeddingsRefusalSchema`. */
|
|
21328
|
+
refusal: RebuildObjectEmbeddingsRefusalSchema.optional(),
|
|
21329
|
+
/** The CLIP model the pass pinned, and the index it fills (when it started). */
|
|
21330
|
+
modelId: string().optional(),
|
|
21331
|
+
index: string().optional()
|
|
20977
21332
|
});
|
|
20978
21333
|
var RebuildStatusSchema = object({
|
|
20979
21334
|
running: boolean(),
|
|
@@ -21007,7 +21362,11 @@ var RebuildStatusSchema = object({
|
|
|
21007
21362
|
startedAtMs: number$1().nullable(),
|
|
21008
21363
|
finishedAtMs: number$1().nullable(),
|
|
21009
21364
|
/** Present when the pass ended by throwing. */
|
|
21010
|
-
error: string().nullable()
|
|
21365
|
+
error: string().nullable(),
|
|
21366
|
+
/** The CLIP model the current / last pass pinned (D54), `null` before any. */
|
|
21367
|
+
modelId: string().nullable(),
|
|
21368
|
+
/** The index that pass fills — `ClipModelMeta.vectorIndex` of `modelId` (D649). */
|
|
21369
|
+
index: string().nullable()
|
|
21011
21370
|
});
|
|
21012
21371
|
/**
|
|
21013
21372
|
* Acknowledgement that a debug-media reclaim STARTED.
|
|
@@ -21328,7 +21687,7 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
|
|
|
21328
21687
|
deviceId: number$1(),
|
|
21329
21688
|
ownerKind: MediaPresenceOwnerKindSchema,
|
|
21330
21689
|
ownerIds: array(string()).max(5e3)
|
|
21331
|
-
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21690
|
+
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly(), { caller: "required" }), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21332
21691
|
kind: "mutation",
|
|
21333
21692
|
auth: "admin"
|
|
21334
21693
|
}), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
|
|
@@ -22363,6 +22722,17 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22363
22722
|
hubHostnameOverride: string().optional()
|
|
22364
22723
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
22365
22724
|
/**
|
|
22725
|
+
* What ONE step runs with on ONE roster device for THIS camera (D650): the
|
|
22726
|
+
* device's per-(node,device) base with the camera's override for that device
|
|
22727
|
+
* on top — the same `override ?? base` merge the orchestrator applies to the
|
|
22728
|
+
* elected device (`applyDeviceProvisioning`). Absent `modelId` ⇒ the executor
|
|
22729
|
+
* resolves the device format's default, exactly as on the elected device.
|
|
22730
|
+
*/
|
|
22731
|
+
var RunnerJumpStepProvisioningSchema = object({
|
|
22732
|
+
modelId: string().optional(),
|
|
22733
|
+
settings: record(string(), unknown()).optional()
|
|
22734
|
+
});
|
|
22735
|
+
/**
|
|
22366
22736
|
* One ENABLED inference device on the runner's node, as the step-tree
|
|
22367
22737
|
* device-jump resolver sees it (phase 1). The orchestrator populates this
|
|
22368
22738
|
* roster on the attach payload whenever the camera is elected onto a specific
|
|
@@ -22374,7 +22744,16 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22374
22744
|
var RunnerInferenceDeviceSchema = object({
|
|
22375
22745
|
deviceKey: string(),
|
|
22376
22746
|
weight: number$1().positive().default(1),
|
|
22377
|
-
maxSessions: number$1().int().positive().nullable().default(null)
|
|
22747
|
+
maxSessions: number$1().int().positive().nullable().default(null),
|
|
22748
|
+
/**
|
|
22749
|
+
* Per-step provisioning for this camera on THIS device (D650), keyed by step
|
|
22750
|
+
* id. A step the runner jumps here runs with these fields, never with the
|
|
22751
|
+
* elected device's: `modelId` / `settings` are REPLACED on the jumped subtree
|
|
22752
|
+
* (a step absent from the map runs with neither — the target format default).
|
|
22753
|
+
* Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
|
|
22754
|
+
* the elected device's provisioning, as before.
|
|
22755
|
+
*/
|
|
22756
|
+
steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
|
|
22378
22757
|
});
|
|
22379
22758
|
/**
|
|
22380
22759
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
@@ -23249,6 +23628,28 @@ var NodeInferenceDeviceSchema = object({
|
|
|
23249
23628
|
*/
|
|
23250
23629
|
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
23251
23630
|
});
|
|
23631
|
+
/**
|
|
23632
|
+
* The operator's model choice for one cluster-scoped step, answered by the
|
|
23633
|
+
* addon that OWNS the `clusterModel:*` settings (D651). Three answers, never
|
|
23634
|
+
* folded: a written choice, a key nobody wrote (the cluster runs the default
|
|
23635
|
+
* BY ABSENCE), or no answer. A caller that rewrites an index acts only on the
|
|
23636
|
+
* first two, read twice and agreeing.
|
|
23637
|
+
*/
|
|
23638
|
+
var ClusterModelChoiceSchema = discriminatedUnion("kind", [
|
|
23639
|
+
object({
|
|
23640
|
+
kind: literal("stored"),
|
|
23641
|
+
modelId: string()
|
|
23642
|
+
}),
|
|
23643
|
+
object({
|
|
23644
|
+
kind: literal("absent"),
|
|
23645
|
+
defaultModelId: string()
|
|
23646
|
+
}),
|
|
23647
|
+
object({
|
|
23648
|
+
kind: literal("unreadable"),
|
|
23649
|
+
reason: _enum(CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS),
|
|
23650
|
+
error: string().optional()
|
|
23651
|
+
})
|
|
23652
|
+
]);
|
|
23252
23653
|
var NodeInferenceDevicesSchema = object({
|
|
23253
23654
|
nodeId: string(),
|
|
23254
23655
|
/** False when the node's platform-probe was unreachable (no live device set). */
|
|
@@ -23276,10 +23677,17 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
23276
23677
|
}), object({ success: literal(true) }), {
|
|
23277
23678
|
kind: "mutation",
|
|
23278
23679
|
auth: "admin"
|
|
23279
|
-
}), method(object({ deviceId: number$1() }), object({ deviceKey: string().nullable() })), method(_void(), object({
|
|
23680
|
+
}), method(object({ deviceId: number$1() }), object({ deviceKey: string().nullable() })), method(_void(), object({
|
|
23681
|
+
migrated: number$1(),
|
|
23682
|
+
skipped: array(object({
|
|
23683
|
+
deviceId: number$1(),
|
|
23684
|
+
targetNodeId: string(),
|
|
23685
|
+
reason: string()
|
|
23686
|
+
})).default([])
|
|
23687
|
+
}), {
|
|
23280
23688
|
kind: "mutation",
|
|
23281
23689
|
auth: "admin"
|
|
23282
|
-
}), method(_void(), array(PipelineAssignmentSchema).readonly()), method(object({ deviceId: number$1() }), PipelineAssignmentSchema.nullable()), method(_void(), array(AgentLoadSummarySchema).readonly()), method(_void(), GlobalMetricsSchema), method(object({ deviceId: number$1() }), CameraMetricsSchema.nullable()), method(object({ nodeId: string() }), CapabilityBindingsSchema), method(object({
|
|
23690
|
+
}), method(_void(), array(PipelineAssignmentSchema).readonly()), method(object({ deviceId: number$1() }), PipelineAssignmentSchema.nullable()), method(_void(), array(AgentLoadSummarySchema).readonly()), method(object({ stepId: string() }), ClusterModelChoiceSchema), method(_void(), GlobalMetricsSchema), method(object({ deviceId: number$1() }), CameraMetricsSchema.nullable()), method(object({ nodeId: string() }), CapabilityBindingsSchema), method(object({
|
|
23283
23691
|
nodeId: string(),
|
|
23284
23692
|
capName: string(),
|
|
23285
23693
|
addonId: string()
|
|
@@ -25579,6 +25987,167 @@ DeviceType.Camera, method(object({
|
|
|
25579
25987
|
auth: "protected"
|
|
25580
25988
|
});
|
|
25581
25989
|
/**
|
|
25990
|
+
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
25991
|
+
* valutatore puro del suo FRONTE.
|
|
25992
|
+
*
|
|
25993
|
+
* Viveva dentro il builtin virtual-doorbell
|
|
25994
|
+
* (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
|
|
25995
|
+
* predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
|
|
25996
|
+
* `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
|
|
25997
|
+
* tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
|
|
25998
|
+
* fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
|
|
25999
|
+
* SPOSTA qui e il doorbell la ri-esporta.
|
|
26000
|
+
*
|
|
26001
|
+
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
26002
|
+
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
26003
|
+
* regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
|
|
26004
|
+
* booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
|
|
26005
|
+
*/
|
|
26006
|
+
/**
|
|
26007
|
+
* Known binary / switch source caps → the boolean slice field whose
|
|
26008
|
+
* false→true rise counts as ACTIVE. Every entry is "fire on active".
|
|
26009
|
+
* Sensors whose "active" reading is not a plain boolean (presence's string
|
|
26010
|
+
* state, connectivity's connected flag) are deliberately excluded — a
|
|
26011
|
+
* reconnect is not a doorbell press, and it is not a recording either.
|
|
26012
|
+
*/
|
|
26013
|
+
var SOURCE_CAP_ACTIVE_FIELD = {
|
|
26014
|
+
contact: "entryOpen",
|
|
26015
|
+
binary: "on",
|
|
26016
|
+
switch: "on",
|
|
26017
|
+
motion: "detected",
|
|
26018
|
+
flood: "flooded",
|
|
26019
|
+
gas: "detected",
|
|
26020
|
+
smoke: "detected",
|
|
26021
|
+
"carbon-monoxide": "detected",
|
|
26022
|
+
vibration: "detected",
|
|
26023
|
+
tamper: "tampered"
|
|
26024
|
+
};
|
|
26025
|
+
object({
|
|
26026
|
+
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
26027
|
+
lastPressedAt: number$1().nullable(),
|
|
26028
|
+
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
26029
|
+
pressCountSinceStart: number$1()
|
|
26030
|
+
});
|
|
26031
|
+
object({
|
|
26032
|
+
deviceId: number$1(),
|
|
26033
|
+
timestamp: number$1()
|
|
26034
|
+
});
|
|
26035
|
+
/**
|
|
26036
|
+
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
26037
|
+
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
26038
|
+
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
26039
|
+
*/
|
|
26040
|
+
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number$1().int().positive()) });
|
|
26041
|
+
DeviceType.Camera;
|
|
26042
|
+
DeviceType.Button, DeviceType.Camera;
|
|
26043
|
+
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
26044
|
+
DeviceType.Camera, DeviceType.Camera;
|
|
26045
|
+
/** A slot's editable value, discriminated on `slot`. */
|
|
26046
|
+
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
26047
|
+
DeviceType.Camera;
|
|
26048
|
+
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
26049
|
+
state: literal("unreachable"),
|
|
26050
|
+
reason: string()
|
|
26051
|
+
})]);
|
|
26052
|
+
/** One provider of slots — the D554 source-listing row. */
|
|
26053
|
+
var ExtensionSourceSchema = object({
|
|
26054
|
+
/** The routing prefix of every `slotRef` this provider serves. */
|
|
26055
|
+
source: string(),
|
|
26056
|
+
label: string(),
|
|
26057
|
+
/** Stamped by the dispatcher from the registry (D557). */
|
|
26058
|
+
addonId: string().optional(),
|
|
26059
|
+
availability: ExtensionSourceAvailabilitySchema
|
|
26060
|
+
});
|
|
26061
|
+
/**
|
|
26062
|
+
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
26063
|
+
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
26064
|
+
* (slice 2's cross-owner graft source); `unavailable` — it exists but is not a
|
|
26065
|
+
* valid source now (a container, which is never a pick). A source in any of
|
|
26066
|
+
* these states is SHOWN, never silently dropped or re-pointed.
|
|
26067
|
+
*/
|
|
26068
|
+
var ExtensionSourceHealthSchema = _enum([
|
|
26069
|
+
"ok",
|
|
26070
|
+
"missing",
|
|
26071
|
+
"foreign",
|
|
26072
|
+
"unavailable"
|
|
26073
|
+
]);
|
|
26074
|
+
var ExtensionSlotSourceSchema = object({
|
|
26075
|
+
deviceId: number$1().int(),
|
|
26076
|
+
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
26077
|
+
name: string().nullable(),
|
|
26078
|
+
health: ExtensionSourceHealthSchema,
|
|
26079
|
+
detail: string().optional()
|
|
26080
|
+
});
|
|
26081
|
+
/**
|
|
26082
|
+
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
26083
|
+
* reported read-only, named, never written through this contract (D62). The
|
|
26084
|
+
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
26085
|
+
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
26086
|
+
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
26087
|
+
*/
|
|
26088
|
+
var ExtensionSlotActivationSchema = object({
|
|
26089
|
+
state: _enum([
|
|
26090
|
+
"active",
|
|
26091
|
+
"inactive",
|
|
26092
|
+
"unknown"
|
|
26093
|
+
]),
|
|
26094
|
+
authority: string(),
|
|
26095
|
+
detail: string().optional()
|
|
26096
|
+
});
|
|
26097
|
+
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
26098
|
+
state: literal("ok"),
|
|
26099
|
+
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
26100
|
+
slotRef: string(),
|
|
26101
|
+
slot: ExtensionSlotIdSchema,
|
|
26102
|
+
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
26103
|
+
authority: string(),
|
|
26104
|
+
/** graft: its switch. association: null — removing every source is "off". */
|
|
26105
|
+
enabled: boolean().nullable(),
|
|
26106
|
+
/** graft: the cap registered on the host. association: null. */
|
|
26107
|
+
projects: string().nullable(),
|
|
26108
|
+
activation: ExtensionSlotActivationSchema.nullable(),
|
|
26109
|
+
value: ExtensionSlotValueSchema,
|
|
26110
|
+
sources: array(ExtensionSlotSourceSchema)
|
|
26111
|
+
}), object({
|
|
26112
|
+
state: literal("unreachable"),
|
|
26113
|
+
addonId: string(),
|
|
26114
|
+
reason: string()
|
|
26115
|
+
})]);
|
|
26116
|
+
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
26117
|
+
deviceId: number$1().int(),
|
|
26118
|
+
name: string(),
|
|
26119
|
+
type: string(),
|
|
26120
|
+
location: string().nullable(),
|
|
26121
|
+
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
26122
|
+
parentName: string().nullable(),
|
|
26123
|
+
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
26124
|
+
suggested: boolean(),
|
|
26125
|
+
/** Why it is suggested ("same location"), null when it is not. */
|
|
26126
|
+
reason: string().nullable()
|
|
26127
|
+
})) });
|
|
26128
|
+
/**
|
|
26129
|
+
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
26130
|
+
* reloaded the host (or, for an accessory child, its parent) because the
|
|
26131
|
+
* write changed what the host REGISTERS (a graft switched on or off, slice 2).
|
|
26132
|
+
*/
|
|
26133
|
+
var ExtensionSetResultSchema = object({
|
|
26134
|
+
applied: literal(true),
|
|
26135
|
+
reload: _enum([
|
|
26136
|
+
"none",
|
|
26137
|
+
"host",
|
|
26138
|
+
"parent"
|
|
26139
|
+
])
|
|
26140
|
+
});
|
|
26141
|
+
var ExtensionSlotRefInputSchema = object({
|
|
26142
|
+
deviceId: number$1().int(),
|
|
26143
|
+
slotRef: string().min(1)
|
|
26144
|
+
});
|
|
26145
|
+
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
26146
|
+
method(object({ deviceId: number$1().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number$1().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
26147
|
+
kind: "mutation",
|
|
26148
|
+
auth: "admin"
|
|
26149
|
+
});
|
|
26150
|
+
/**
|
|
25582
26151
|
* Optional client-side hints sent at session creation to help the provider
|
|
25583
26152
|
* pick the best native source. All fields optional — a viewer that knows
|
|
25584
26153
|
* nothing still gets a sane default. (Relocated from the retired `webrtc`
|
|
@@ -27367,17 +27936,6 @@ object({
|
|
|
27367
27936
|
deviceId: number$1(),
|
|
27368
27937
|
status: DeviceStatusSchema
|
|
27369
27938
|
});
|
|
27370
|
-
object({
|
|
27371
|
-
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
27372
|
-
lastPressedAt: number$1().nullable(),
|
|
27373
|
-
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
27374
|
-
pressCountSinceStart: number$1()
|
|
27375
|
-
});
|
|
27376
|
-
object({
|
|
27377
|
-
deviceId: number$1(),
|
|
27378
|
-
timestamp: number$1()
|
|
27379
|
-
});
|
|
27380
|
-
DeviceType.Button, DeviceType.Camera;
|
|
27381
27939
|
/**
|
|
27382
27940
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
27383
27941
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -34144,42 +34702,6 @@ DeviceType.Camera, method(object({
|
|
|
34144
34702
|
package: array(ZoneRuleSchema).readonly()
|
|
34145
34703
|
});
|
|
34146
34704
|
/**
|
|
34147
|
-
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
34148
|
-
* valutatore puro del suo FRONTE.
|
|
34149
|
-
*
|
|
34150
|
-
* Viveva dentro il builtin virtual-doorbell
|
|
34151
|
-
* (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
|
|
34152
|
-
* predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
|
|
34153
|
-
* `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
|
|
34154
|
-
* tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
|
|
34155
|
-
* fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
|
|
34156
|
-
* SPOSTA qui e il doorbell la ri-esporta.
|
|
34157
|
-
*
|
|
34158
|
-
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
34159
|
-
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
34160
|
-
* regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
|
|
34161
|
-
* booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
|
|
34162
|
-
*/
|
|
34163
|
-
/**
|
|
34164
|
-
* Known binary / switch source caps → the boolean slice field whose
|
|
34165
|
-
* false→true rise counts as ACTIVE. Every entry is "fire on active".
|
|
34166
|
-
* Sensors whose "active" reading is not a plain boolean (presence's string
|
|
34167
|
-
* state, connectivity's connected flag) are deliberately excluded — a
|
|
34168
|
-
* reconnect is not a doorbell press, and it is not a recording either.
|
|
34169
|
-
*/
|
|
34170
|
-
var SOURCE_CAP_ACTIVE_FIELD = {
|
|
34171
|
-
contact: "entryOpen",
|
|
34172
|
-
binary: "on",
|
|
34173
|
-
switch: "on",
|
|
34174
|
-
motion: "detected",
|
|
34175
|
-
flood: "flooded",
|
|
34176
|
-
gas: "detected",
|
|
34177
|
-
smoke: "detected",
|
|
34178
|
-
"carbon-monoxide": "detected",
|
|
34179
|
-
vibration: "detected",
|
|
34180
|
-
tamper: "tampered"
|
|
34181
|
-
};
|
|
34182
|
-
/**
|
|
34183
34705
|
* Accessory device helpers — shared across drivers.
|
|
34184
34706
|
*
|
|
34185
34707
|
* Many vendor-specific drivers register accessory child devices on
|
|
@@ -36979,6 +37501,30 @@ Object.freeze({
|
|
|
36979
37501
|
addonId: null,
|
|
36980
37502
|
access: "create"
|
|
36981
37503
|
},
|
|
37504
|
+
"deviceExtension.listCandidates": {
|
|
37505
|
+
capName: "device-extension",
|
|
37506
|
+
capScope: "device",
|
|
37507
|
+
addonId: null,
|
|
37508
|
+
access: "view"
|
|
37509
|
+
},
|
|
37510
|
+
"deviceExtension.listSlots": {
|
|
37511
|
+
capName: "device-extension",
|
|
37512
|
+
capScope: "device",
|
|
37513
|
+
addonId: null,
|
|
37514
|
+
access: "view"
|
|
37515
|
+
},
|
|
37516
|
+
"deviceExtension.listSources": {
|
|
37517
|
+
capName: "device-extension",
|
|
37518
|
+
capScope: "device",
|
|
37519
|
+
addonId: null,
|
|
37520
|
+
access: "view"
|
|
37521
|
+
},
|
|
37522
|
+
"deviceExtension.setSlot": {
|
|
37523
|
+
capName: "device-extension",
|
|
37524
|
+
capScope: "device",
|
|
37525
|
+
addonId: null,
|
|
37526
|
+
access: "create"
|
|
37527
|
+
},
|
|
36982
37528
|
"deviceManager.addLocation": {
|
|
36983
37529
|
capName: "device-manager",
|
|
36984
37530
|
capScope: "system",
|
|
@@ -37729,6 +38275,12 @@ Object.freeze({
|
|
|
37729
38275
|
addonId: null,
|
|
37730
38276
|
access: "view"
|
|
37731
38277
|
},
|
|
38278
|
+
"embeddingEncoder.resetFailedModels": {
|
|
38279
|
+
capName: "embedding-encoder",
|
|
38280
|
+
capScope: "system",
|
|
38281
|
+
addonId: null,
|
|
38282
|
+
access: "delete"
|
|
38283
|
+
},
|
|
37732
38284
|
"enumSensor.getStatus": {
|
|
37733
38285
|
capName: "enum-sensor",
|
|
37734
38286
|
capScope: "device",
|
|
@@ -40063,6 +40615,12 @@ Object.freeze({
|
|
|
40063
40615
|
addonId: null,
|
|
40064
40616
|
access: "view"
|
|
40065
40617
|
},
|
|
40618
|
+
"pipelineOrchestrator.getClusterModelChoice": {
|
|
40619
|
+
capName: "pipeline-orchestrator",
|
|
40620
|
+
capScope: "system",
|
|
40621
|
+
addonId: null,
|
|
40622
|
+
access: "view"
|
|
40623
|
+
},
|
|
40066
40624
|
"pipelineOrchestrator.getDeviceLiveContribution": {
|
|
40067
40625
|
capName: "pipeline-orchestrator",
|
|
40068
40626
|
capScope: "system",
|
|
@@ -42888,6 +43446,26 @@ Object.freeze({
|
|
|
42888
43446
|
form: "single",
|
|
42889
43447
|
optional: false
|
|
42890
43448
|
}],
|
|
43449
|
+
"deviceExtension.listCandidates": [{
|
|
43450
|
+
name: "deviceId",
|
|
43451
|
+
form: "single",
|
|
43452
|
+
optional: false
|
|
43453
|
+
}],
|
|
43454
|
+
"deviceExtension.listSlots": [{
|
|
43455
|
+
name: "deviceId",
|
|
43456
|
+
form: "single",
|
|
43457
|
+
optional: false
|
|
43458
|
+
}],
|
|
43459
|
+
"deviceExtension.listSources": [{
|
|
43460
|
+
name: "deviceId",
|
|
43461
|
+
form: "single",
|
|
43462
|
+
optional: false
|
|
43463
|
+
}],
|
|
43464
|
+
"deviceExtension.setSlot": [{
|
|
43465
|
+
name: "deviceId",
|
|
43466
|
+
form: "single",
|
|
43467
|
+
optional: false
|
|
43468
|
+
}],
|
|
42891
43469
|
"deviceManager.adoptionRelease": [{
|
|
42892
43470
|
name: "camDeviceId",
|
|
42893
43471
|
form: "single",
|
|
@@ -45347,68 +45925,6 @@ TimelapseRuleInputSchema.extend({
|
|
|
45347
45925
|
createdAt: number$1(),
|
|
45348
45926
|
updatedAt: number$1()
|
|
45349
45927
|
});
|
|
45350
|
-
Object.freeze(Object.fromEntries([{
|
|
45351
|
-
stepId: "face-embedding",
|
|
45352
|
-
label: "Face recognition model",
|
|
45353
|
-
defaultModelId: "arcface-r100",
|
|
45354
|
-
indexName: "the enrolled face gallery",
|
|
45355
|
-
options: [
|
|
45356
|
-
{
|
|
45357
|
-
id: "arcface-r100",
|
|
45358
|
-
label: "ArcFace (ResNet34)"
|
|
45359
|
-
},
|
|
45360
|
-
{
|
|
45361
|
-
id: "auraface-r100",
|
|
45362
|
-
label: "AuraFace R100"
|
|
45363
|
-
},
|
|
45364
|
-
{
|
|
45365
|
-
id: "inception-resnet-v1",
|
|
45366
|
-
label: "Inception ResNet V1"
|
|
45367
|
-
}
|
|
45368
|
-
]
|
|
45369
|
-
}, {
|
|
45370
|
-
stepId: "clip-embedding",
|
|
45371
|
-
label: "Semantic search model",
|
|
45372
|
-
defaultModelId: "mobileclip-s1",
|
|
45373
|
-
indexName: "the object semantic-search index",
|
|
45374
|
-
options: [{
|
|
45375
|
-
id: "mobileclip-s1",
|
|
45376
|
-
label: "MobileCLIP S1"
|
|
45377
|
-
}, {
|
|
45378
|
-
id: "mobileclip-s2",
|
|
45379
|
-
label: "MobileCLIP S2"
|
|
45380
|
-
}]
|
|
45381
|
-
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
45382
|
-
string().min(1);
|
|
45383
|
-
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
45384
|
-
stepId: "face-embedding",
|
|
45385
|
-
key: "minLandmarkFaceSize",
|
|
45386
|
-
label: "Min face size for recognition (detection px)",
|
|
45387
|
-
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.",
|
|
45388
|
-
type: "slider",
|
|
45389
|
-
min: 0,
|
|
45390
|
-
max: 64,
|
|
45391
|
-
step: 2,
|
|
45392
|
-
default: 24
|
|
45393
|
-
}];
|
|
45394
|
-
function clusterStepSettingKey(stepId, fieldKey) {
|
|
45395
|
-
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
45396
|
-
}
|
|
45397
|
-
var ClusterSettingNumberSchema = number$1().finite();
|
|
45398
|
-
function readClusterStepSettings(config) {
|
|
45399
|
-
const out = {};
|
|
45400
|
-
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
45401
|
-
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
45402
|
-
const value = parsed.success ? parsed.data : field.default;
|
|
45403
|
-
const existing = out[field.stepId] ?? {};
|
|
45404
|
-
out[field.stepId] = {
|
|
45405
|
-
...existing,
|
|
45406
|
-
[field.key]: value
|
|
45407
|
-
};
|
|
45408
|
-
}
|
|
45409
|
-
return out;
|
|
45410
|
-
}
|
|
45411
|
-
readClusterStepSettings({});
|
|
45412
45928
|
object({
|
|
45413
45929
|
/**
|
|
45414
45930
|
* Fraction of the box's own size added on EACH side before cutting.
|