@camstack/addon-admin-ui 1.2.271 → 1.2.273
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/assets/{AddonCollectionPage-DqzCMX3d.js → AddonCollectionPage-DVL4s2wW.js} +1 -1
- package/dist/assets/Addons-Bjmcg6Ko.js +1 -0
- package/dist/assets/{AdminTabs-k3mRubjE.js → AdminTabs-DoHLDbj8.js} +1 -1
- package/dist/assets/AiProfiles-DeXGxdhB.js +3 -0
- package/dist/assets/{BrokerForm-CIY1d1d7.js → BrokerForm-DyNcYVjX.js} +1 -1
- package/dist/assets/Build-ByJea4gF.js +32 -0
- package/dist/assets/{Capabilities-Bn8ZC2CW.js → Capabilities-CCi4bm-O.js} +1 -1
- package/dist/assets/{CapabilityBadges-DldALMee.js → CapabilityBadges-U9XXfh-v.js} +1 -1
- package/dist/assets/Cluster-6TrgImec.js +11 -0
- package/dist/assets/Data-DjkaO5a8.js +1 -0
- package/dist/assets/DetectionIntelligence-B9tvX78Z.js +1 -0
- package/dist/assets/DeviceAggregateSection-B7bHHsDQ.js +1 -0
- package/dist/assets/DeviceDetail-DW-Zs7dn.js +2 -0
- package/dist/assets/{Devices-DlqwzcD1.js → Devices-DXz4Urh9.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-DU6hDBqg.js → EmbedPlayerPage-CwclWKKR.js} +1 -1
- package/dist/assets/Events-BaIjuRgN.js +1 -0
- package/dist/assets/{FormBuilder-Dc6E_voV.js → FormBuilder-zMABGJw7.js} +1 -1
- package/dist/assets/Identity-UFZtitwV.js +1 -0
- package/dist/assets/IntegrationDetail-CHpYDfdf.js +1 -0
- package/dist/assets/Integrations-DhHdsrg0.js +1 -0
- package/dist/assets/Integrations-DsePn_Cr.js +1 -0
- package/dist/assets/Locations-cniiDmaE.js +2 -0
- package/dist/assets/{Logs-DUYk0c3A.js → Logs-BheueelF.js} +1 -1
- package/dist/assets/{MotionZonesSettings-BckmPRiR.js → MotionZonesSettings-C-MEagV3.js} +1 -1
- package/dist/assets/{MyAccess-BFQMx9o3.js → MyAccess-t_0lAy1j.js} +1 -1
- package/dist/assets/Network-DxQ27oxa.js +1 -0
- package/dist/assets/{NodeAddonsSettingsPanel-DJrBrOZU.js → NodeAddonsSettingsPanel-DoIcVsDa.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-4ReR6_7N.js → NodeInferenceDevices-DZWh4ghO.js} +1 -1
- package/dist/assets/Notifications-CCz7U1U5.js +1 -0
- package/dist/assets/Pipeline-BFX6jpez.js +1 -0
- package/dist/assets/Plates-B_iJXzYG.js +1 -0
- package/dist/assets/{PrivacyMaskSettings-Cv5zA9gQ.js → PrivacyMaskSettings-BroViObl.js} +1 -1
- package/dist/assets/{ProviderIcon-DCfQzHIr.js → ProviderIcon-PqhuuddF.js} +1 -1
- package/dist/assets/Recordings-BRClsNbY.js +1 -0
- package/dist/assets/{ScanNetworkModal-gzNZ-LAb.js → ScanNetworkModal-COiSX-GG.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-pno9hqpn.js → SceneMonitorEditor-9cRzwxeR.js} +1 -1
- package/dist/assets/{Scenes-DtKIr9F_.js → Scenes-DfWhDDQp.js} +1 -1
- package/dist/assets/{Settings-BCPiq_88.js → Settings-Doc69JPq.js} +1 -1
- package/dist/assets/{Showroom-IZoJF2xo.js → Showroom-DKFaN6U4.js} +1 -1
- package/dist/assets/{StorageLocationsPanel-BSKjMvak.js → StorageLocationsPanel-DafeBPeS.js} +1 -1
- package/dist/assets/{Terminal-4EjaVPEr.js → Terminal-BIrWD_Jq.js} +3 -3
- package/dist/assets/{Viewer-DpLmscaq.js → Viewer-D0u46Vzi.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BtKTkhyx.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-Bg_sv9Yy.js} +1 -1
- package/dist/assets/{archive-BB3ec_n-.js → archive-ByT1JpAz.js} +1 -1
- package/dist/assets/{authed-media-Bqv01DZY.js → authed-media-B4fHh3OP.js} +1 -1
- package/dist/assets/{boxes-BxaSpZkk.js → boxes-BK7opMw8.js} +1 -1
- package/dist/assets/circle-slash-f-RB-a4W.js +1 -0
- package/dist/assets/{debounced-invalidate-CAdmny96.js → debounced-invalidate-DmTBefP5.js} +1 -1
- package/dist/assets/{dist-C8vQbt24.js → dist-Ia2qJKt8.js} +1 -1
- package/dist/assets/dist-ZOYLar6T.js +349 -0
- package/dist/assets/{face-bbox-CfSqm4Yv.js → face-bbox-l5zwSQ2B.js} +1 -1
- package/dist/assets/{hard-drive-download-BQnyHdfx.js → hard-drive-download-B63cgpRp.js} +1 -1
- package/dist/assets/{hostInit-D6CdLzdb.js → hostInit-BJo5NO15.js} +1 -1
- package/dist/assets/index-DG1fRQck.js +4 -0
- package/dist/assets/{layers-BCrYpCnW.js → layers-BO4xJ50D.js} +1 -1
- package/dist/assets/{location-owned-usage-CSpMCCbU.js → location-owned-usage-BNkOpZvo.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-a15f07ff.js → mf-entry-bootstrap-0-9dd52881.js} +2 -2
- package/dist/assets/{player-overlays-CZvLgyNg.js → player-overlays-DBpE_gxX.js} +1 -1
- package/dist/assets/remoteEntry-DXZfRwQs.js +1 -0
- package/dist/assets/{send-C3IG3eJW.js → send-K-6By08c.js} +1 -1
- package/dist/assets/{settings-2-BnPcSjOh.js → settings-2-CL-7fhNd.js} +1 -1
- package/dist/assets/{square-check-big-CPDPjmHM.js → square-check-big-CzkYc7lR.js} +1 -1
- package/dist/assets/src-9BHg7XNr.js +67 -0
- package/dist/assets/src-Df_6Q4fQ.js +349 -0
- package/dist/assets/{use-scenes-feed-D1KpjfQY.js → use-scenes-feed-Hb7yxDm8.js} +1 -1
- package/dist/assets/{use-stationary-objects-DyHqCMnC.js → use-stationary-objects-CMpKcmYv.js} +1 -1
- package/dist/assets/useEventInvalidation-Dmnh5PQZ.js +1 -0
- package/dist/assets/{useNodeUrlSelection-BUzugSCi.js → useNodeUrlSelection-DCo_-iFX.js} +1 -1
- package/dist/assets/user-round-A1b0P43l.js +1 -0
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-C0cIlp9L.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-Nq5Atcu1.js} +2 -2
- package/dist/index.html +5 -5
- package/dist/server/addon.js +1773 -901
- package/package.json +1 -1
- package/dist/assets/Addons-Cfzhy1FL.js +0 -1
- package/dist/assets/AiProfiles-CYFmuxOf.js +0 -3
- package/dist/assets/Build-IIy-q7uD.js +0 -32
- package/dist/assets/Cluster-B8FyeYha.js +0 -11
- package/dist/assets/Data-dNt8Y-C9.js +0 -1
- package/dist/assets/DetectionIntelligence-wp6N_etF.js +0 -1
- package/dist/assets/DeviceAggregateSection-CU1nQkPf.js +0 -1
- package/dist/assets/DeviceDetail-DKhrYv1V.js +0 -2
- package/dist/assets/Events-CjI9E2hP.js +0 -1
- package/dist/assets/Identity-0lewBgT-.js +0 -1
- package/dist/assets/IntegrationDetail-YdhQQL83.js +0 -1
- package/dist/assets/Integrations-CdDCtOkK.js +0 -1
- package/dist/assets/Integrations-yaU-gfjg.js +0 -1
- package/dist/assets/Locations-BfO7yEPX.js +0 -2
- package/dist/assets/Network-CIk-9jzK.js +0 -1
- package/dist/assets/Notifications-DzKNUl7R.js +0 -1
- package/dist/assets/Pipeline-ai7qzobB.js +0 -1
- package/dist/assets/Plates-B4prub48.js +0 -1
- package/dist/assets/Recordings-bZJhzJsd.js +0 -1
- package/dist/assets/circle-slash-C8eiZoEi.js +0 -1
- package/dist/assets/dist-E283Fu6V.js +0 -349
- package/dist/assets/index-BKWONarY.js +0 -4
- package/dist/assets/remoteEntry-C_uTdAWt.js +0 -1
- package/dist/assets/src-BZTmBMCp.js +0 -67
- package/dist/assets/src-CIZ3ediW.js +0 -349
- package/dist/assets/useEventInvalidation-BBv2U92f.js +0 -1
- package/dist/assets/user-round-DYOT4vMb.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -5361,7 +5361,7 @@ var ZodIssueCode = {
|
|
|
5361
5361
|
var ZodFirstPartyTypeKind;
|
|
5362
5362
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5363
5363
|
//#endregion
|
|
5364
|
-
//#region ../types/dist/sleep-
|
|
5364
|
+
//#region ../types/dist/sleep-BXv0ZcRa.mjs
|
|
5365
5365
|
/**
|
|
5366
5366
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5367
5367
|
* window to float samples (D455).
|
|
@@ -6146,6 +6146,40 @@ var BaseAddon = class {
|
|
|
6146
6146
|
const node = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
6147
6147
|
return keys.size > 0 ? projectStore(raw, keys, node) : raw;
|
|
6148
6148
|
}
|
|
6149
|
+
/**
|
|
6150
|
+
* Whether ONE global key of this addon's store was written, read three-way
|
|
6151
|
+
* (D651). For a question a hydrated view cannot answer: `getGlobalSettings`
|
|
6152
|
+
* reports `value ?? default`, so "the operator chose the default" and "nobody
|
|
6153
|
+
* chose" look the same, and a failed read looks like both. A `perNode` key is
|
|
6154
|
+
* not supported here: its stored name is scoped.
|
|
6155
|
+
*/
|
|
6156
|
+
async readStoredGlobalKey(key) {
|
|
6157
|
+
const read = this._ctx?.settings?.readAddonStoreResult;
|
|
6158
|
+
if (read === void 0) return {
|
|
6159
|
+
kind: "unreadable",
|
|
6160
|
+
reason: "three-way-read-unavailable"
|
|
6161
|
+
};
|
|
6162
|
+
let result;
|
|
6163
|
+
try {
|
|
6164
|
+
result = await read.call(this._ctx?.settings);
|
|
6165
|
+
} catch (err) {
|
|
6166
|
+
return {
|
|
6167
|
+
kind: "unreadable",
|
|
6168
|
+
reason: "store-read-failed",
|
|
6169
|
+
error: err instanceof Error ? err.message : String(err)
|
|
6170
|
+
};
|
|
6171
|
+
}
|
|
6172
|
+
if (result.kind === "failed") return {
|
|
6173
|
+
kind: "unreadable",
|
|
6174
|
+
reason: "store-read-failed",
|
|
6175
|
+
error: result.error
|
|
6176
|
+
};
|
|
6177
|
+
if (result.kind === "missing" || !Object.prototype.hasOwnProperty.call(result.value, key)) return { kind: "absent" };
|
|
6178
|
+
return {
|
|
6179
|
+
kind: "present",
|
|
6180
|
+
value: result.value[key]
|
|
6181
|
+
};
|
|
6182
|
+
}
|
|
6149
6183
|
async updateGlobalSettings(patch, nodeId) {
|
|
6150
6184
|
const keys = this.perNodeKeys();
|
|
6151
6185
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
@@ -9406,6 +9440,43 @@ var LogChannelWindowSchema = object({
|
|
|
9406
9440
|
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
9407
9441
|
deviceIds: array(number().int()).readonly().nullable()
|
|
9408
9442
|
});
|
|
9443
|
+
var ClipModelMetaSchema = object({
|
|
9444
|
+
/** The paired text encoder's catalog id (the embedding-encoder's text catalog). */
|
|
9445
|
+
textModelId: string().min(1),
|
|
9446
|
+
/** Output dimension of BOTH towers. A vector of any other length is refused. */
|
|
9447
|
+
embeddingDim: number().int().positive(),
|
|
9448
|
+
/**
|
|
9449
|
+
* The `vector-store` index this model's vectors live in. ONE feature space
|
|
9450
|
+
* per index: two models share an index only when their vectors are ranked
|
|
9451
|
+
* against each other, which for CLIP means never across families. MobileCLIP
|
|
9452
|
+
* S1 and S2 share `object-clip` for history (separated by the row's
|
|
9453
|
+
* `modelId`); any other model gets its own.
|
|
9454
|
+
*/
|
|
9455
|
+
vectorIndex: string().regex(/^object-clip(-[a-z0-9][a-z0-9-]*)?$/),
|
|
9456
|
+
/**
|
|
9457
|
+
* The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
|
|
9458
|
+
* must be unique per tokenizer: every model's siblings land in ONE flat
|
|
9459
|
+
* models directory, so two different tokenizers under the same name would
|
|
9460
|
+
* silently overwrite each other (whichever model downloaded last wins, and
|
|
9461
|
+
* the other one tokenises with the wrong vocabulary).
|
|
9462
|
+
*/
|
|
9463
|
+
tokenizerFile: string().min(1),
|
|
9464
|
+
/** Token window the text graph takes (SigLIP2: 64; CLIP BPE: 77). */
|
|
9465
|
+
contextLength: number().int().positive(),
|
|
9466
|
+
/** Id the tokenizer pads with. */
|
|
9467
|
+
padId: number().int().nonnegative(),
|
|
9468
|
+
/**
|
|
9469
|
+
* The search cosine floor at `strictness: 'loose'` — calibrated per model,
|
|
9470
|
+
* because cosine bands are a property of the model: 0.2 keeps 96% of matched
|
|
9471
|
+
* COCO caption-image pairs on MobileCLIP S1 and 2.7% on SigLIP2.
|
|
9472
|
+
*/
|
|
9473
|
+
searchMinScore: number().min(0).max(1)
|
|
9474
|
+
});
|
|
9475
|
+
var ClipSearchStrictnessSchema = _enum([
|
|
9476
|
+
"loose",
|
|
9477
|
+
"balanced",
|
|
9478
|
+
"strict"
|
|
9479
|
+
]);
|
|
9409
9480
|
var MODEL_FORMATS = [
|
|
9410
9481
|
"onnx",
|
|
9411
9482
|
"coreml",
|
|
@@ -9434,7 +9505,7 @@ var ModelFormatEntrySchema = object({
|
|
|
9434
9505
|
/** Multi-file payload (directory members or sibling files). */
|
|
9435
9506
|
files: array(string()).readonly().optional(),
|
|
9436
9507
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
9437
|
-
runtimes: array(_enum(["
|
|
9508
|
+
runtimes: array(_enum(["python"])).readonly().optional()
|
|
9438
9509
|
});
|
|
9439
9510
|
/**
|
|
9440
9511
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -9609,7 +9680,14 @@ var ModelCatalogEntrySchema = object({
|
|
|
9609
9680
|
* applies (Frigate / COCO public catalog). Set on a custom model whose raw
|
|
9610
9681
|
* labels already ARE the CamStack macros (Scrypted identity map).
|
|
9611
9682
|
*/
|
|
9612
|
-
classMap: DetectionCatalogClassMapSchema.optional()
|
|
9683
|
+
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
9684
|
+
/**
|
|
9685
|
+
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
9686
|
+
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
9687
|
+
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
9688
|
+
* embedding encoder and the semantic-search store (D649).
|
|
9689
|
+
*/
|
|
9690
|
+
clip: ClipModelMetaSchema.optional()
|
|
9613
9691
|
});
|
|
9614
9692
|
var ConvertTargetSchema = discriminatedUnion("format", [object({
|
|
9615
9693
|
format: literal("openvino"),
|
|
@@ -13827,6 +13905,13 @@ var LinkedDeviceSchema = object({
|
|
|
13827
13905
|
features: array(string()),
|
|
13828
13906
|
producesTrackedEvents: boolean().optional()
|
|
13829
13907
|
});
|
|
13908
|
+
/**
|
|
13909
|
+
* The `linked-devices` extension slot's editable value (D648): the operator's
|
|
13910
|
+
* pick list, exactly what `_linkedDeviceIds` persists. Tree children are NOT
|
|
13911
|
+
* in it — they are always linked and are not a pick.
|
|
13912
|
+
*/
|
|
13913
|
+
var LinkedDevicesSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
13914
|
+
DeviceType.Camera;
|
|
13830
13915
|
/** One camera's resolved linked set, tagged with the camera it belongs to.
|
|
13831
13916
|
* The batch answer needs the tag; the single-device answer already has it
|
|
13832
13917
|
* from the input, which is why `getLinkedDevices` keeps the untagged shape. */
|
|
@@ -14352,16 +14437,101 @@ var EmbeddingResultSchema = object({
|
|
|
14352
14437
|
embedding: array(number()),
|
|
14353
14438
|
inferenceMs: number()
|
|
14354
14439
|
});
|
|
14440
|
+
/** The two CLIP towers the encoder runs; a crash budget is kept per tower. */
|
|
14441
|
+
var EmbeddingTowerSchema = _enum(["image", "text"]);
|
|
14442
|
+
/**
|
|
14443
|
+
* A tower in the terminal `failed` state (D649, D6): it crashed or failed to
|
|
14444
|
+
* load `crashes` times within `windowMs`, and is refused by name until an
|
|
14445
|
+
* operator `resetFailedModels` or a model change — never on a timer.
|
|
14446
|
+
*
|
|
14447
|
+
* `nodeId` is the node whose tower failed. The state lives in THAT node's
|
|
14448
|
+
* encoder process (in memory — a runner respawn clears it), and one node's
|
|
14449
|
+
* answer says nothing about another's.
|
|
14450
|
+
*/
|
|
14451
|
+
var EmbeddingFailedModelSchema = object({
|
|
14452
|
+
modelId: string(),
|
|
14453
|
+
tower: EmbeddingTowerSchema,
|
|
14454
|
+
nodeId: string(),
|
|
14455
|
+
crashes: number(),
|
|
14456
|
+
windowMs: number(),
|
|
14457
|
+
sinceMs: number(),
|
|
14458
|
+
lastReason: string()
|
|
14459
|
+
});
|
|
14460
|
+
/**
|
|
14461
|
+
* A model whose REQUIREMENTS can never be met on this node (D649 round 5):
|
|
14462
|
+
* an id the catalog does not know, a model URL answering 404/410, a declared
|
|
14463
|
+
* sibling (the tokenizer) that is not there. After `attempts` failed builds
|
|
14464
|
+
* it is terminally `requirements-failed`, refused by name until an operator
|
|
14465
|
+
* `resetFailedModels` or a model change — the same exits as a crashed tower.
|
|
14466
|
+
*/
|
|
14467
|
+
var EmbeddingFailedRequirementSchema = object({
|
|
14468
|
+
modelId: string(),
|
|
14469
|
+
tower: EmbeddingTowerSchema,
|
|
14470
|
+
nodeId: string(),
|
|
14471
|
+
attempts: number(),
|
|
14472
|
+
sinceMs: number(),
|
|
14473
|
+
lastReason: string()
|
|
14474
|
+
});
|
|
14355
14475
|
var EmbeddingInfoSchema = object({
|
|
14356
14476
|
modelId: string(),
|
|
14357
14477
|
embeddingDim: number(),
|
|
14358
|
-
ready: boolean()
|
|
14359
|
-
|
|
14478
|
+
ready: boolean(),
|
|
14479
|
+
/**
|
|
14480
|
+
* The node that answered. Absent only from an encoder older than D649's
|
|
14481
|
+
* crash budget — whose `failedModels` is then UNKNOWN (D315), never "none".
|
|
14482
|
+
*/
|
|
14483
|
+
nodeId: string().optional(),
|
|
14484
|
+
/**
|
|
14485
|
+
* Towers in `failed` on the answering node, each row naming it. `undefined`
|
|
14486
|
+
* means the node could not say (pre-budget encoder); a node that has the
|
|
14487
|
+
* budget always answers an array, empty included.
|
|
14488
|
+
*/
|
|
14489
|
+
failedModels: array(EmbeddingFailedModelSchema).optional(),
|
|
14490
|
+
/** Models terminally `requirements-failed` on the answering node; same reading as above. */
|
|
14491
|
+
failedRequirements: array(EmbeddingFailedRequirementSchema).optional()
|
|
14492
|
+
});
|
|
14493
|
+
/**
|
|
14494
|
+
* The THREE codes an encoder refusal can carry (D649, D6). Same shape as
|
|
14495
|
+
* `VECTOR_INDEX_DIM_CONFLICT`: the code rides in the MESSAGE, because an
|
|
14496
|
+
* Error's own properties do not survive the UDS/tRPC hop and its message does,
|
|
14497
|
+
* and both sides go through the helpers below — the encoder builds the
|
|
14498
|
+
* refusal, the live detail plane classifies on it to count refusals per
|
|
14499
|
+
* camera instead of logging one warning per track. The bracketed token
|
|
14500
|
+
* carries the code, the model, the tower and the node so a consumer never
|
|
14501
|
+
* parses prose.
|
|
14502
|
+
*
|
|
14503
|
+
* - `EMBEDDING_MODEL_FAILED`: the tower crashed / failed to load past the crash
|
|
14504
|
+
* budget — terminal until `resetFailedModels` or a model change.
|
|
14505
|
+
* - `EMBEDDING_REQUIREMENTS_UNAVAILABLE`: files or runtime not there right now
|
|
14506
|
+
* (a download or Python that failed, or the cooldown after one) — the next
|
|
14507
|
+
* request past the cooldown tries again.
|
|
14508
|
+
* - `EMBEDDING_REQUIREMENTS_FAILED`: the requirements can never be met (unknown
|
|
14509
|
+
* id, 404/410, missing sibling) and the bounded attempts are spent —
|
|
14510
|
+
* terminal, same exits as a crashed tower.
|
|
14511
|
+
*/
|
|
14512
|
+
var EMBEDDING_MODEL_FAILED = "embedding-model-failed";
|
|
14513
|
+
var EMBEDDING_REQUIREMENTS_UNAVAILABLE = "embedding-requirements-unavailable";
|
|
14514
|
+
var EMBEDDING_REQUIREMENTS_FAILED = "embedding-requirements-failed";
|
|
14515
|
+
_enum([
|
|
14516
|
+
EMBEDDING_MODEL_FAILED,
|
|
14517
|
+
EMBEDDING_REQUIREMENTS_UNAVAILABLE,
|
|
14518
|
+
EMBEDDING_REQUIREMENTS_FAILED
|
|
14519
|
+
]);
|
|
14520
|
+
new RegExp(`\\[(${EMBEDDING_MODEL_FAILED}|${EMBEDDING_REQUIREMENTS_UNAVAILABLE}|${EMBEDDING_REQUIREMENTS_FAILED}) model=([^\\s\\]]+) tower=(image|text) node=([^\\s\\]]+)\\]`);
|
|
14360
14521
|
method(object({
|
|
14361
14522
|
crop: _instanceof(Uint8Array),
|
|
14362
14523
|
width: number(),
|
|
14363
14524
|
height: number()
|
|
14364
|
-
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
14525
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(object({
|
|
14526
|
+
text: string(),
|
|
14527
|
+
modelId: string().min(1).optional()
|
|
14528
|
+
}), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" }), method(object({ modelId: string().min(1).optional() }), object({
|
|
14529
|
+
cleared: array(string()),
|
|
14530
|
+
nodeId: string()
|
|
14531
|
+
}), {
|
|
14532
|
+
kind: "mutation",
|
|
14533
|
+
auth: "admin"
|
|
14534
|
+
});
|
|
14365
14535
|
/**
|
|
14366
14536
|
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14367
14537
|
* through, per camera, with the denominator attached. It stores nothing.
|
|
@@ -17046,6 +17216,29 @@ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
|
17046
17216
|
]);
|
|
17047
17217
|
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
17048
17218
|
/**
|
|
17219
|
+
* The panel's transitions, as ONE list.
|
|
17220
|
+
*
|
|
17221
|
+
* Named here rather than spelled out at each of the four sites that need them
|
|
17222
|
+
* (the emitter, the intake, the editor group, the combined-notification gate),
|
|
17223
|
+
* because a transition added to the enum and forgotten at one of them is an
|
|
17224
|
+
* alarm state nobody can be notified about. That is exactly what this list
|
|
17225
|
+
* failed to prevent while it held three: `alarm-arming` was the fourth.
|
|
17226
|
+
*
|
|
17227
|
+
* In LIFECYCLE order, which is the order an editor lists them in and the order
|
|
17228
|
+
* a person experiences them — not the order they were added.
|
|
17229
|
+
*/
|
|
17230
|
+
var NC_ALARM_SYSTEM_EVENT_KINDS = [
|
|
17231
|
+
"alarm-arm-refused",
|
|
17232
|
+
"alarm-check-failed",
|
|
17233
|
+
"alarm-arming",
|
|
17234
|
+
"alarm-armed",
|
|
17235
|
+
"alarm-pending",
|
|
17236
|
+
"alarm-triggered",
|
|
17237
|
+
"alarm-rearmed",
|
|
17238
|
+
"alarm-sensor-bypass",
|
|
17239
|
+
"alarm-disarmed"
|
|
17240
|
+
];
|
|
17241
|
+
/**
|
|
17049
17242
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
17050
17243
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
17051
17244
|
* selected kinds.
|
|
@@ -17112,6 +17305,25 @@ var NcScheduleSchema = object({
|
|
|
17112
17305
|
/** Active OUTSIDE the windows (e.g. "only outside business hours"). */
|
|
17113
17306
|
invert: boolean().optional()
|
|
17114
17307
|
});
|
|
17308
|
+
/**
|
|
17309
|
+
* How a system-event rule of the `device-events` or `system` family speaks
|
|
17310
|
+
* (D647): at once, per event (`instant`, the only behaviour before D647), or
|
|
17311
|
+
* as a STATE SUMMARY at the end of each window of `schedule`.
|
|
17312
|
+
*/
|
|
17313
|
+
var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
|
|
17314
|
+
/**
|
|
17315
|
+
* `summary`: the rule sends NOTHING per event. When a window of `schedule`
|
|
17316
|
+
* CLOSES, it sends one notification with the current state of its kinds
|
|
17317
|
+
* (low batteries, consumables to replace, devices offline, updates
|
|
17318
|
+
* available, ...), after its own filters. Nothing to report sends nothing.
|
|
17319
|
+
* The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
|
|
17320
|
+
* midnight crossing); the send time is each window's END. Refused on the
|
|
17321
|
+
* `alarm` family, which stays instant (`systemEventDeliveryProblems`).
|
|
17322
|
+
*/
|
|
17323
|
+
var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
|
|
17324
|
+
mode: literal("summary"),
|
|
17325
|
+
schedule: NcScheduleSchema
|
|
17326
|
+
})]);
|
|
17115
17327
|
/** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
|
|
17116
17328
|
var NcPlateMatcherSchema = object({
|
|
17117
17329
|
/**
|
|
@@ -17725,7 +17937,12 @@ var NcMediaPolicySchema = object({
|
|
|
17725
17937
|
* the degrade engine, which drops the video and keeps the still.
|
|
17726
17938
|
*/
|
|
17727
17939
|
clip: boolean().optional(),
|
|
17728
|
-
/**
|
|
17940
|
+
/**
|
|
17941
|
+
* Seconds of footage BEFORE / AFTER the event instant. Absent =
|
|
17942
|
+
* {@link NC_CLIP_PRE_ROLL_DEFAULT_SEC} / {@link NC_CLIP_POST_ROLL_DEFAULT_SEC}
|
|
17943
|
+
* (4 / 6), resolved by the Notification Center at dispatch — deliberately not
|
|
17944
|
+
* a Zod default, so a rule that never chose keeps following the hub's.
|
|
17945
|
+
*/
|
|
17729
17946
|
clipPreRollSec: number().int().min(0).max(30).optional(),
|
|
17730
17947
|
clipPostRollSec: number().int().min(0).max(30).optional(),
|
|
17731
17948
|
/**
|
|
@@ -17847,6 +18064,16 @@ var NcRuleInputSchema = object({
|
|
|
17847
18064
|
delivery: NcDeliverySchema,
|
|
17848
18065
|
conditions: NcConditionsSchema.default({}),
|
|
17849
18066
|
schedule: NcScheduleSchema.optional(),
|
|
18067
|
+
/**
|
|
18068
|
+
* A `device-events` / `system` rule's delivery (D647): absent or `instant`
|
|
18069
|
+
* is a notification per event; `summary` is one state summary per closed
|
|
18070
|
+
* window of its schedule. `.optional()` and never defaulted: absent must
|
|
18071
|
+
* keep meaning what every rule authored before D647 meant, with no
|
|
18072
|
+
* migration. Top-level rather than inside `conditions.systemEvent`, so a
|
|
18073
|
+
* client that does not know it (an older viewer re-sending `conditions`
|
|
18074
|
+
* whole) leaves it standing through the store's patch merge.
|
|
18075
|
+
*/
|
|
18076
|
+
systemEventDelivery: NcSystemEventDeliverySchema.optional(),
|
|
17850
18077
|
/** May be empty when `targetUsers` addresses at least one user — the
|
|
17851
18078
|
* "at least one addressee" invariant is enforced by the provider, because
|
|
17852
18079
|
* a cross-field refine here would break `NcRulePatchSchema.partial()`. */
|
|
@@ -18075,6 +18302,28 @@ var NcRuleSchema = NcRuleInputSchema.extend({
|
|
|
18075
18302
|
*/
|
|
18076
18303
|
disabledTargetIds: array(string()).default([])
|
|
18077
18304
|
});
|
|
18305
|
+
/** One section of a previewed state summary. `unavailable` = its state could not be read. */
|
|
18306
|
+
var NcStateSummaryPreviewSectionSchema = object({
|
|
18307
|
+
id: string(),
|
|
18308
|
+
status: _enum(["read", "unavailable"]),
|
|
18309
|
+
items: number().int().nonnegative(),
|
|
18310
|
+
reason: string().optional()
|
|
18311
|
+
});
|
|
18312
|
+
/**
|
|
18313
|
+
* The summary a rule would send now. `empty` = nothing to report and every
|
|
18314
|
+
* section read: such a summary is NOT sent. `dropped` counts the open states
|
|
18315
|
+
* the rule's own filters (or a camera mute) left out, by reason.
|
|
18316
|
+
* `excludedGroups` names the kind groups selected that have no state to report
|
|
18317
|
+
* (backups & exports).
|
|
18318
|
+
*/
|
|
18319
|
+
var NcStateSummaryPreviewSchema = object({
|
|
18320
|
+
empty: boolean(),
|
|
18321
|
+
count: number().int().nonnegative(),
|
|
18322
|
+
text: string(),
|
|
18323
|
+
sections: array(NcStateSummaryPreviewSectionSchema),
|
|
18324
|
+
dropped: record(string(), number().int().nonnegative()),
|
|
18325
|
+
excludedGroups: array(string())
|
|
18326
|
+
});
|
|
18078
18327
|
var NcTestResultSchema = object({
|
|
18079
18328
|
recordId: string(),
|
|
18080
18329
|
recordKind: _enum([
|
|
@@ -18166,6 +18415,13 @@ var NcTemplateVarDescriptorSchema = object({
|
|
|
18166
18415
|
kinds: array(NcTemplateVarKindSchema).optional(),
|
|
18167
18416
|
deliveries: array(NcDeliverySchema).optional(),
|
|
18168
18417
|
systemEventKinds: array(NcSystemEventKindSchema).optional(),
|
|
18418
|
+
/**
|
|
18419
|
+
* Which system-event DELIVERY has a value for it (D647). Absent = an
|
|
18420
|
+
* instant row only when the descriptor names `systemEventKinds` (a
|
|
18421
|
+
* per-event fact: a summary row has no single device), and both otherwise.
|
|
18422
|
+
* `['summary']` marks the state-summary vocabulary (`{{summaryText}}`, ...).
|
|
18423
|
+
*/
|
|
18424
|
+
systemEventDeliveries: array(NcSystemEventDeliveryModeSchema).optional(),
|
|
18169
18425
|
dynamic: object({
|
|
18170
18426
|
prefix: literal("count_"),
|
|
18171
18427
|
from: literal("classes")
|
|
@@ -18178,7 +18434,9 @@ var NcTemplatePreviewInputSchema = object({
|
|
|
18178
18434
|
field: NcTemplateFieldSchema,
|
|
18179
18435
|
kind: NcRuleKindSchema.optional(),
|
|
18180
18436
|
delivery: NcDeliverySchema.optional(),
|
|
18181
|
-
systemEventKinds: array(NcSystemEventKindSchema).optional()
|
|
18437
|
+
systemEventKinds: array(NcSystemEventKindSchema).optional(),
|
|
18438
|
+
/** The rule's system-event delivery (D647); absent = instant. */
|
|
18439
|
+
systemEventDelivery: NcSystemEventDeliveryModeSchema.optional()
|
|
18182
18440
|
}),
|
|
18183
18441
|
template: object({
|
|
18184
18442
|
title: string().max(500).optional(),
|
|
@@ -18712,6 +18970,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18712
18970
|
}), object({ results: array(NcTestResultSchema) }), {
|
|
18713
18971
|
kind: "mutation",
|
|
18714
18972
|
auth: "admin"
|
|
18973
|
+
}), method(object({ rule: NcRuleInputSchema }), NcStateSummaryPreviewSchema, {
|
|
18974
|
+
kind: "mutation",
|
|
18975
|
+
auth: "admin",
|
|
18976
|
+
access: "view"
|
|
18715
18977
|
}), method(object({}), object({
|
|
18716
18978
|
catalog: array(NcConditionDescriptorSchema),
|
|
18717
18979
|
taxonomy: NcTaxonomySchema.optional()
|
|
@@ -19058,752 +19320,276 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
19058
19320
|
});
|
|
19059
19321
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
19060
19322
|
/**
|
|
19061
|
-
*
|
|
19062
|
-
*
|
|
19063
|
-
*
|
|
19323
|
+
* A model choice has a SCOPE, and a scope change has a workflow.
|
|
19324
|
+
*
|
|
19325
|
+
* ## The two scopes
|
|
19326
|
+
*
|
|
19327
|
+
* Almost every pipeline step's model is a **node** question: which build runs
|
|
19328
|
+
* fastest on THIS accelerator. Two nodes may legitimately answer differently —
|
|
19329
|
+
* a Coral runs the tflite SSD, a Mac runs the coreml YOLO — because the answers
|
|
19330
|
+
* are compared against nothing. They produce boxes, and a box is a box.
|
|
19331
|
+
*
|
|
19332
|
+
* Two steps are not like that. `face-embedding` and `clip-embedding` produce
|
|
19333
|
+
* **vectors that land in ONE shared index** (`identity_samples`,
|
|
19334
|
+
* `vec_object_clip`) and are ranked against each other by cosine similarity.
|
|
19335
|
+
* Cosine similarity between two encoders is not a weak signal, it is a
|
|
19336
|
+
* meaningless number — and nothing inside a vector can tell you it happened.
|
|
19337
|
+
* So for those two steps the model is a **cluster** question with exactly one
|
|
19338
|
+
* answer, stored in exactly one row.
|
|
19339
|
+
*
|
|
19340
|
+
* That is the same argument [D52](../../../../docs/decisions/adr-0052.md) makes
|
|
19341
|
+
* for the crop convention (`detail-crop.ts`), one level up: the crop decides
|
|
19342
|
+
* WHAT pixels the encoder sees, this decides WHICH encoder sees them. Both are
|
|
19343
|
+
* cluster-wide for the same reason and neither may become per-node.
|
|
19344
|
+
*
|
|
19345
|
+
* ## Why the registry lives here and not in the step catalog
|
|
19346
|
+
*
|
|
19347
|
+
* The scope itself is declared on the step, in
|
|
19348
|
+
* `detection-pipeline/registry/step-definitions.ts` (`StepDefinition.modelScope`)
|
|
19349
|
+
* — that is where a new step declares what kind of choice its model is. But the
|
|
19350
|
+
* catalog lives inside `addon-pipeline`, and three packages that must NOT
|
|
19351
|
+
* import an addon need to know the set: the orchestrator (which renders and
|
|
19352
|
+
* stores the row), post-analysis (which pins the row for a re-embed pass) and
|
|
19353
|
+
* admin-ui (which mirrors it). So the set is mirrored here, and
|
|
19354
|
+
* `scripts/check-cluster-model-scope.ts` fails the build when the two disagree.
|
|
19355
|
+
* A hand-copied key that stops matching is exactly how a setting silently stops
|
|
19356
|
+
* arriving while both sides still look correct.
|
|
19357
|
+
*
|
|
19358
|
+
* ## The defaults ARE today's behaviour
|
|
19359
|
+
*
|
|
19360
|
+
* {@link DEFAULT_CLUSTER_STEP_MODELS} reproduces the catalog `defaultModelId`
|
|
19361
|
+
* of both steps. Declaring the scope therefore changes nothing on the day it
|
|
19362
|
+
* ships: the cluster row starts out saying what every node was already doing.
|
|
19363
|
+
* Changing it is legitimate — that is what the knob is for — but it invalidates
|
|
19364
|
+
* the stored vectors of that surface, and must be followed by a re-embed pass
|
|
19365
|
+
* (`face-reembed-pass.ts`, `embedding-rebuild.ts`).
|
|
19366
|
+
*/
|
|
19367
|
+
/**
|
|
19368
|
+
* Why the orchestrator cannot say which model the operator chose for a
|
|
19369
|
+
* cluster-scoped step (D651).
|
|
19370
|
+
*/
|
|
19371
|
+
var CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS = [
|
|
19372
|
+
"owner-not-ready",
|
|
19373
|
+
"store-read-failed",
|
|
19374
|
+
"three-way-read-unavailable",
|
|
19375
|
+
"invalid-stored",
|
|
19376
|
+
"not-cluster-scoped"
|
|
19377
|
+
];
|
|
19378
|
+
Object.freeze(Object.fromEntries([{
|
|
19379
|
+
stepId: "face-embedding",
|
|
19380
|
+
label: "Face recognition model",
|
|
19381
|
+
defaultModelId: "auraface-r100",
|
|
19382
|
+
indexName: "the enrolled face gallery",
|
|
19383
|
+
options: [
|
|
19384
|
+
{
|
|
19385
|
+
id: "auraface-r100",
|
|
19386
|
+
label: "AuraFace R100"
|
|
19387
|
+
},
|
|
19388
|
+
{
|
|
19389
|
+
id: "arcface-r100",
|
|
19390
|
+
label: "ArcFace (ResNet34)"
|
|
19391
|
+
},
|
|
19392
|
+
{
|
|
19393
|
+
id: "inception-resnet-v1",
|
|
19394
|
+
label: "Inception ResNet V1"
|
|
19395
|
+
}
|
|
19396
|
+
]
|
|
19397
|
+
}, {
|
|
19398
|
+
stepId: "clip-embedding",
|
|
19399
|
+
label: "Semantic search model",
|
|
19400
|
+
defaultModelId: "mobileclip-s1",
|
|
19401
|
+
indexName: "the object semantic-search index",
|
|
19402
|
+
options: [
|
|
19403
|
+
{
|
|
19404
|
+
id: "mobileclip-s1",
|
|
19405
|
+
label: "MobileCLIP S1"
|
|
19406
|
+
},
|
|
19407
|
+
{
|
|
19408
|
+
id: "mobileclip-s2",
|
|
19409
|
+
label: "MobileCLIP S2"
|
|
19410
|
+
},
|
|
19411
|
+
{
|
|
19412
|
+
id: "siglip2-b16-224",
|
|
19413
|
+
label: "SigLIP2 B/16 (Apache-2.0)"
|
|
19414
|
+
}
|
|
19415
|
+
]
|
|
19416
|
+
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
19417
|
+
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
19418
|
+
stepId: "face-embedding",
|
|
19419
|
+
key: "minLandmarkFaceSize",
|
|
19420
|
+
label: "Min face size for recognition (detection px)",
|
|
19421
|
+
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.",
|
|
19422
|
+
type: "slider",
|
|
19423
|
+
min: 0,
|
|
19424
|
+
max: 64,
|
|
19425
|
+
step: 2,
|
|
19426
|
+
default: 24
|
|
19427
|
+
}];
|
|
19428
|
+
function clusterStepSettingKey(stepId, fieldKey) {
|
|
19429
|
+
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
19430
|
+
}
|
|
19431
|
+
var ClusterSettingNumberSchema = number().finite();
|
|
19432
|
+
function readClusterStepSettings(config) {
|
|
19433
|
+
const out = {};
|
|
19434
|
+
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
19435
|
+
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
19436
|
+
const value = parsed.success ? parsed.data : field.default;
|
|
19437
|
+
const existing = out[field.stepId] ?? {};
|
|
19438
|
+
out[field.stepId] = {
|
|
19439
|
+
...existing,
|
|
19440
|
+
[field.key]: value
|
|
19441
|
+
};
|
|
19442
|
+
}
|
|
19443
|
+
return out;
|
|
19444
|
+
}
|
|
19445
|
+
readClusterStepSettings({});
|
|
19446
|
+
/**
|
|
19447
|
+
* pipeline-analytics — device-scoped wrapper cap. Refines raw
|
|
19448
|
+
* per-frame detections emitted by the pipeline runner into tracked
|
|
19449
|
+
* objects, per-kind event collections (motion / object / audio), and
|
|
19450
|
+
* persisted media. Owns the post-detection domain end-to-end:
|
|
19451
|
+
*
|
|
19452
|
+
* runner emits PipelineInferenceResult
|
|
19453
|
+
* ↓ (event bus)
|
|
19454
|
+
* pipeline-analytics subscriber
|
|
19455
|
+
* ↓ SORT tracker + zone engine + state analyzer + event emitter
|
|
19456
|
+
* → three DB collections (one per kind), one FS media tree, one
|
|
19457
|
+
* unified event emitter (FrameTracked + TrackStarted/Ended +
|
|
19458
|
+
* DetectionEvent on bus)
|
|
19459
|
+
*
|
|
19460
|
+
* Pure subscriber model. No `processFrame` cap method — the runner
|
|
19461
|
+
* already publishes the raw frame on the bus. The cap surface is
|
|
19462
|
+
* only QUERIES + per-device settings, bound on/off via
|
|
19463
|
+
* `device-manager.setWrapperActive`. `defaultActive: true` because
|
|
19464
|
+
* every camera with a detection pipeline wants its raw detections
|
|
19465
|
+
* refined; operators opt out per-device via BindingsTab when needed.
|
|
19466
|
+
*
|
|
19467
|
+
* Replaces the legacy `analysis-pipeline`, `analysis-data-persistence`
|
|
19468
|
+
* (per-device surface) and `track-trail` caps — see P11 cleanup.
|
|
19064
19469
|
*/
|
|
19065
|
-
var
|
|
19066
|
-
|
|
19067
|
-
|
|
19068
|
-
|
|
19069
|
-
|
|
19070
|
-
|
|
19071
|
-
|
|
19072
|
-
|
|
19073
|
-
|
|
19074
|
-
|
|
19075
|
-
|
|
19076
|
-
|
|
19077
|
-
crop: object({
|
|
19078
|
-
left: number(),
|
|
19079
|
-
top: number(),
|
|
19080
|
-
width: number().positive(),
|
|
19081
|
-
height: number().positive()
|
|
19082
|
-
}).optional(),
|
|
19083
|
-
content: object({
|
|
19084
|
-
width: number().int().positive(),
|
|
19085
|
-
height: number().int().positive()
|
|
19086
|
-
}),
|
|
19087
|
-
fit: _enum(["stretch", "contain"]),
|
|
19088
|
-
format: _enum([
|
|
19089
|
-
"rgb",
|
|
19090
|
-
"gray",
|
|
19091
|
-
"jpeg"
|
|
19092
|
-
])
|
|
19093
|
-
});
|
|
19470
|
+
var TrackStateSchema = _enum([
|
|
19471
|
+
"new",
|
|
19472
|
+
"entered",
|
|
19473
|
+
"left",
|
|
19474
|
+
"moving",
|
|
19475
|
+
"idle"
|
|
19476
|
+
]);
|
|
19477
|
+
var EventKindSchema = _enum([
|
|
19478
|
+
"motion",
|
|
19479
|
+
"object",
|
|
19480
|
+
"audio"
|
|
19481
|
+
]);
|
|
19094
19482
|
/**
|
|
19095
|
-
*
|
|
19096
|
-
*
|
|
19097
|
-
*
|
|
19483
|
+
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
19484
|
+
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
19485
|
+
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
19098
19486
|
*/
|
|
19099
|
-
var
|
|
19100
|
-
|
|
19101
|
-
|
|
19102
|
-
|
|
19103
|
-
|
|
19104
|
-
|
|
19105
|
-
|
|
19106
|
-
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
"
|
|
19110
|
-
"
|
|
19111
|
-
"
|
|
19112
|
-
"
|
|
19113
|
-
"
|
|
19114
|
-
"gguf"
|
|
19487
|
+
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
19488
|
+
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
19489
|
+
var EventKindIconSchema = _enum([
|
|
19490
|
+
"motion",
|
|
19491
|
+
"audio",
|
|
19492
|
+
"person",
|
|
19493
|
+
"vehicle",
|
|
19494
|
+
"animal",
|
|
19495
|
+
"door",
|
|
19496
|
+
"pir",
|
|
19497
|
+
"smoke",
|
|
19498
|
+
"water",
|
|
19499
|
+
"button",
|
|
19500
|
+
"package",
|
|
19501
|
+
"generic"
|
|
19115
19502
|
]);
|
|
19116
|
-
var
|
|
19117
|
-
"
|
|
19118
|
-
"
|
|
19119
|
-
"
|
|
19120
|
-
"
|
|
19121
|
-
"
|
|
19503
|
+
var EventKindCategorySchema = _enum([
|
|
19504
|
+
"motion",
|
|
19505
|
+
"audio",
|
|
19506
|
+
"detection",
|
|
19507
|
+
"sensor",
|
|
19508
|
+
"control",
|
|
19509
|
+
"custom",
|
|
19510
|
+
"package"
|
|
19122
19511
|
]);
|
|
19123
|
-
|
|
19124
|
-
|
|
19125
|
-
|
|
19126
|
-
|
|
19127
|
-
|
|
19128
|
-
|
|
19129
|
-
|
|
19130
|
-
|
|
19131
|
-
devices: array(object({
|
|
19132
|
-
id: string(),
|
|
19133
|
-
label: string(),
|
|
19134
|
-
description: string().optional()
|
|
19135
|
-
})).readonly(),
|
|
19136
|
-
defaultDevice: string()
|
|
19137
|
-
});
|
|
19138
|
-
var PipelineDefaultStepSchema = lazy(() => object({
|
|
19139
|
-
addonId: string(),
|
|
19140
|
-
addonName: string(),
|
|
19141
|
-
slot: PipelineSlotSchema,
|
|
19142
|
-
inputClasses: array(string()).readonly(),
|
|
19143
|
-
outputClasses: array(string()).readonly(),
|
|
19144
|
-
enabled: boolean(),
|
|
19145
|
-
modelId: string(),
|
|
19146
|
-
children: array(PipelineDefaultStepSchema).readonly(),
|
|
19147
|
-
group: string().optional(),
|
|
19148
|
-
settings: record(string(), unknown()).optional()
|
|
19149
|
-
}));
|
|
19150
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
19151
|
-
addonId: string(),
|
|
19152
|
-
enabled: boolean(),
|
|
19153
|
-
modelId: string(),
|
|
19154
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
19155
|
-
settings: record(string(), unknown()).optional()
|
|
19156
|
-
}));
|
|
19157
|
-
var PipelineTemplateSchema$1 = object({
|
|
19158
|
-
id: string(),
|
|
19159
|
-
name: string(),
|
|
19160
|
-
createdAt: string(),
|
|
19161
|
-
updatedAt: string(),
|
|
19162
|
-
engine: PipelineEngineChoiceSchema,
|
|
19163
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
19164
|
-
});
|
|
19165
|
-
var PipelineModelOptionSchema = object({
|
|
19166
|
-
id: string(),
|
|
19167
|
-
name: string(),
|
|
19168
|
-
formats: record(string(), object({
|
|
19169
|
-
downloaded: boolean(),
|
|
19170
|
-
sizeMB: number()
|
|
19171
|
-
})),
|
|
19172
|
-
group: ModelVariantGroupSchema.optional(),
|
|
19173
|
-
legacy: boolean().optional(),
|
|
19174
|
-
provider: ModelProviderIdSchema.optional()
|
|
19175
|
-
});
|
|
19176
|
-
var ConfigFieldBridge = custom();
|
|
19177
|
-
var PipelineAddonSchemaSchema = object({
|
|
19178
|
-
id: string(),
|
|
19179
|
-
name: string(),
|
|
19180
|
-
slot: PipelineSlotSchema,
|
|
19181
|
-
inputClasses: array(string()).readonly(),
|
|
19182
|
-
outputClasses: array(string()).readonly(),
|
|
19183
|
-
childSlots: array(PipelineSlotSchema).readonly(),
|
|
19184
|
-
models: array(PipelineModelOptionSchema).readonly(),
|
|
19185
|
-
defaultModelId: string(),
|
|
19186
|
-
defaultModelIdByFormat: record(string(), string()).optional(),
|
|
19187
|
-
enabledByDefault: boolean().optional(),
|
|
19188
|
-
backfillIntoExistingOverrides: boolean().optional(),
|
|
19189
|
-
defaultConfidence: number(),
|
|
19190
|
-
group: string().optional(),
|
|
19191
|
-
configSchema: array(ConfigFieldBridge).readonly().optional()
|
|
19192
|
-
});
|
|
19193
|
-
var PipelineSlotSchemaSchema = object({
|
|
19194
|
-
id: PipelineSlotSchema,
|
|
19512
|
+
/** Taxonomy level — macro (timeline lane) vs sub (events-page leaf). */
|
|
19513
|
+
var EventKindLevelSchema = _enum(["macro", "sub"]);
|
|
19514
|
+
var EventKindDescriptorSchema = object({
|
|
19515
|
+
/** Stable kind id (e.g. 'motion', 'vehicle', 'car', 'lock'). */
|
|
19516
|
+
kind: string(),
|
|
19517
|
+
/** i18n key resolved on the UI side; `label` is the English fallback. */
|
|
19518
|
+
labelKey: string(),
|
|
19519
|
+
/** English fallback label (kept for clients that don't translate). */
|
|
19195
19520
|
label: string(),
|
|
19196
|
-
|
|
19197
|
-
|
|
19198
|
-
|
|
19199
|
-
|
|
19200
|
-
|
|
19201
|
-
|
|
19202
|
-
|
|
19203
|
-
|
|
19204
|
-
|
|
19205
|
-
|
|
19206
|
-
|
|
19207
|
-
|
|
19208
|
-
|
|
19209
|
-
|
|
19210
|
-
|
|
19211
|
-
|
|
19212
|
-
|
|
19213
|
-
state: _enum([
|
|
19214
|
-
"idle",
|
|
19215
|
-
"installing",
|
|
19216
|
-
"verifying",
|
|
19217
|
-
"ready",
|
|
19218
|
-
"failed"
|
|
19219
|
-
]),
|
|
19220
|
-
progress: number().optional(),
|
|
19221
|
-
error: string().optional(),
|
|
19222
|
-
nextRetryAt: number().optional(),
|
|
19223
|
-
/**
|
|
19224
|
-
* Gate A (config-correctness gate at engine change): human-readable
|
|
19225
|
-
* config issues surfaced EAGERLY when the node's engine changes — model
|
|
19226
|
-
* substitutions ("chose X, running Y") and zero-build steps ("no model
|
|
19227
|
-
* has a <format> build"). Additive/optional: informational only, never
|
|
19228
|
-
* enforced here — `assertEngineReady` (readiness) still gates inference.
|
|
19229
|
-
* Absent/empty when the node-default tree resolves cleanly.
|
|
19230
|
-
*/
|
|
19231
|
-
configIssues: array(string()).optional()
|
|
19232
|
-
});
|
|
19233
|
-
var PipelineStepInputSchema = lazy(() => object({
|
|
19234
|
-
addonId: string(),
|
|
19235
|
-
modelId: string().optional(),
|
|
19236
|
-
enabled: boolean().default(true),
|
|
19237
|
-
children: array(PipelineStepInputSchema).optional(),
|
|
19238
|
-
settings: record(string(), unknown()).optional(),
|
|
19239
|
-
jumpDeviceKey: string().optional()
|
|
19240
|
-
}));
|
|
19241
|
-
var ModelSubstitutionSchema = object({
|
|
19242
|
-
addonId: string(),
|
|
19243
|
-
chosen: string(),
|
|
19244
|
-
running: string(),
|
|
19245
|
-
format: string()
|
|
19246
|
-
});
|
|
19247
|
-
var PipelineValidationIssueSchema = object({
|
|
19248
|
-
addonId: string(),
|
|
19249
|
-
kind: _enum(["unknown-addon", "no-format-build"]),
|
|
19250
|
-
detail: string()
|
|
19251
|
-
});
|
|
19252
|
-
var PipelineValidationResultSchema = object({
|
|
19253
|
-
ok: boolean(),
|
|
19254
|
-
issues: array(PipelineValidationIssueSchema).readonly(),
|
|
19255
|
-
substitutions: array(ModelSubstitutionSchema).readonly(),
|
|
19256
|
-
/** The node's `currentEngine.format` this validation ran against. */
|
|
19257
|
-
format: string()
|
|
19258
|
-
});
|
|
19259
|
-
var ReferenceImageEntrySchema = object({
|
|
19260
|
-
filename: string(),
|
|
19261
|
-
stepIds: array(string()).readonly().optional()
|
|
19262
|
-
});
|
|
19263
|
-
var ReferenceImageBodySchema = object({
|
|
19264
|
-
base64: string(),
|
|
19265
|
-
filename: string()
|
|
19521
|
+
/** Hex color for timeline/legend rendering. */
|
|
19522
|
+
color: string(),
|
|
19523
|
+
/** Dictionary id → lucide component on the UI side. */
|
|
19524
|
+
iconId: string(),
|
|
19525
|
+
/** Legacy closed-vocab glyph — fallback for `iconId`. */
|
|
19526
|
+
icon: EventKindIconSchema,
|
|
19527
|
+
category: EventKindCategorySchema,
|
|
19528
|
+
/** Macro parent for this kind ('car' → 'vehicle'); null for a macro. */
|
|
19529
|
+
parentKind: string().nullable(),
|
|
19530
|
+
/** Derived from `parentKind`, explicit for the client tree. */
|
|
19531
|
+
level: EventKindLevelSchema,
|
|
19532
|
+
/** Which cap + device contributes this kind. For built-ins the camera
|
|
19533
|
+
* itself; for sensor kinds the LINKED source device. */
|
|
19534
|
+
source: object({
|
|
19535
|
+
capName: string(),
|
|
19536
|
+
deviceId: number()
|
|
19537
|
+
})
|
|
19266
19538
|
});
|
|
19267
|
-
|
|
19268
|
-
|
|
19269
|
-
|
|
19539
|
+
/** One camera's event vocabulary, as returned by `listEventKindsBatch`. */
|
|
19540
|
+
var EventKindsForDeviceSchema = object({
|
|
19541
|
+
deviceId: number(),
|
|
19542
|
+
kinds: array(EventKindDescriptorSchema).readonly()
|
|
19270
19543
|
});
|
|
19271
|
-
var
|
|
19272
|
-
var AudioBackendSchema = object({
|
|
19544
|
+
var SensorEventSchema = object({
|
|
19273
19545
|
id: string(),
|
|
19274
|
-
|
|
19275
|
-
|
|
19276
|
-
|
|
19546
|
+
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
19547
|
+
* yields N rows, one per camera). */
|
|
19548
|
+
deviceId: number(),
|
|
19549
|
+
/** The linked sensor device whose state changed. */
|
|
19550
|
+
sourceDeviceId: number(),
|
|
19551
|
+
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
19552
|
+
kind: string(),
|
|
19553
|
+
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
19554
|
+
value: record(string(), unknown()).nullable(),
|
|
19555
|
+
timestamp: number()
|
|
19556
|
+
});
|
|
19557
|
+
/**
|
|
19558
|
+
* One stored sighting on a track's trajectory.
|
|
19559
|
+
*
|
|
19560
|
+
* The array these live in is returned in TIME order (D399) — it is APPENDED in
|
|
19561
|
+
* arrival order, and the two detector passes interleave, so a consumer must not
|
|
19562
|
+
* assume the two are the same on a row written by an older build.
|
|
19563
|
+
*/
|
|
19564
|
+
var TrackPositionSchema = object({
|
|
19565
|
+
x: number(),
|
|
19566
|
+
y: number(),
|
|
19567
|
+
timestamp: number(),
|
|
19568
|
+
bbox: BoundingBoxSchema,
|
|
19277
19569
|
/**
|
|
19278
|
-
*
|
|
19279
|
-
*
|
|
19280
|
-
*
|
|
19281
|
-
*
|
|
19570
|
+
* Which detector pass measured this box (D399): `frame` is the full-frame
|
|
19571
|
+
* pass on the analysis raster, `recovery` is the native-resolution
|
|
19572
|
+
* small-subject second pass (D377/D378). Both write into one array, and until
|
|
19573
|
+
* this field existed the only way to tell them apart was that full-frame boxes
|
|
19574
|
+
* are exact multiples of 1.2 while recovery boxes are full-precision floats.
|
|
19575
|
+
* Absent on rows written before D399.
|
|
19282
19576
|
*/
|
|
19283
|
-
|
|
19284
|
-
|
|
19285
|
-
|
|
19286
|
-
|
|
19287
|
-
availableBackends: array(AudioBackendSchema).readonly(),
|
|
19288
|
-
sampleRate: number(),
|
|
19289
|
-
chunkDurationMs: number()
|
|
19577
|
+
source: _enum(["frame", "recovery"]).optional(),
|
|
19578
|
+
/** Detection score of this box, so a position can be weighed and not only
|
|
19579
|
+
* plotted. Absent on rows written before D399. */
|
|
19580
|
+
score: number().optional()
|
|
19290
19581
|
});
|
|
19291
|
-
var
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19582
|
+
var TrackSnapshotSchema = object({
|
|
19583
|
+
timestamp: number(),
|
|
19584
|
+
position: TrackPositionSchema,
|
|
19585
|
+
/** The snapshot's media row id (D482); resolve via `listTrackMedia({ trackId })`. */
|
|
19586
|
+
mediaId: number().int()
|
|
19295
19587
|
});
|
|
19296
19588
|
/**
|
|
19297
|
-
*
|
|
19298
|
-
*
|
|
19299
|
-
*
|
|
19300
|
-
*
|
|
19301
|
-
* `debug.alternateLabels['audio-classifier']`, per-source timings in
|
|
19302
|
-
* `debug.stepTimings`. The outer `success`/`error` fields stay so the
|
|
19303
|
-
* benchmark UI can still report a clean failure when the classifier
|
|
19304
|
-
* cap isn't available.
|
|
19305
|
-
*/
|
|
19306
|
-
var AudioTestResultSchema = object({
|
|
19307
|
-
success: boolean(),
|
|
19308
|
-
error: string().optional(),
|
|
19309
|
-
frame: custom().optional()
|
|
19310
|
-
});
|
|
19311
|
-
var PipelineConfigBridge = custom();
|
|
19312
|
-
var ConfigUISchemaBridge = custom();
|
|
19313
|
-
var ConfigUISchemaNullableBridge = custom();
|
|
19314
|
-
var InferenceCapabilitiesBridge = custom();
|
|
19315
|
-
var ModelAvailabilityListBridge = custom();
|
|
19316
|
-
var PipelineRunResultBridge = custom();
|
|
19317
|
-
method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
|
|
19318
|
-
modelId: string(),
|
|
19319
|
-
settings: record(string(), unknown()).readonly()
|
|
19320
|
-
}))), method(object({ steps: record(string(), object({
|
|
19321
|
-
modelId: string(),
|
|
19322
|
-
settings: record(string(), unknown()).readonly()
|
|
19323
|
-
})) }), object({ success: literal(true) }), {
|
|
19324
|
-
kind: "mutation",
|
|
19325
|
-
auth: "admin"
|
|
19326
|
-
}), method(object({ nodeId: string() }), object({
|
|
19327
|
-
success: literal(true),
|
|
19328
|
-
clearedDevices: number()
|
|
19329
|
-
}), {
|
|
19330
|
-
kind: "mutation",
|
|
19331
|
-
auth: "admin"
|
|
19332
|
-
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
19333
|
-
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
19334
|
-
deviceKey: string(),
|
|
19335
|
-
/**
|
|
19336
|
-
* `failed` — the per-device restart budget is exhausted; no pool
|
|
19337
|
-
* will be spawned until an operator re-arms it or the runner
|
|
19338
|
-
* respawns. `backoff` — under budget, waiting out the backoff (or
|
|
19339
|
-
* a cached pool observed dead and not yet condemned).
|
|
19340
|
-
*/
|
|
19341
|
-
state: _enum(["failed", "backoff"]),
|
|
19342
|
-
/** Epoch ms of the death that produced this state. */
|
|
19343
|
-
since: number(),
|
|
19344
|
-
/** Pool deaths inside the current window. */
|
|
19345
|
-
deaths: number(),
|
|
19346
|
-
/** The last death's message. */
|
|
19347
|
-
lastError: string()
|
|
19348
|
-
})).readonly() })), method(object({
|
|
19349
|
-
nodeId: string(),
|
|
19350
|
-
deviceKey: string()
|
|
19351
|
-
}), object({ rearmed: boolean() }), {
|
|
19352
|
-
kind: "mutation",
|
|
19353
|
-
auth: "admin"
|
|
19354
|
-
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({ steps: array(PipelineStepInputSchema) }), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
|
|
19355
|
-
name: string(),
|
|
19356
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
19357
|
-
engine: PipelineEngineChoiceSchema
|
|
19358
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
19359
|
-
id: string(),
|
|
19360
|
-
name: string().optional(),
|
|
19361
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
19362
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
19363
|
-
addonId: string(),
|
|
19364
|
-
modelId: string(),
|
|
19365
|
-
format: ModelFormatSchema$1
|
|
19366
|
-
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
19367
|
-
addonId: string(),
|
|
19368
|
-
modelId: string(),
|
|
19369
|
-
format: ModelFormatSchema$1
|
|
19370
|
-
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
19371
|
-
engine: PipelineEngineChoiceSchema.optional(),
|
|
19372
|
-
steps: array(PipelineStepInputSchema).min(1),
|
|
19373
|
-
frame: FrameInputSchema.optional(),
|
|
19374
|
-
/**
|
|
19375
|
-
* Process-local lazy frame. Valid only when caller and provider resolve
|
|
19376
|
-
* in the same execution-group process; split/cross-node callers use
|
|
19377
|
-
* `frame`/`image` inline compatibility instead.
|
|
19378
|
-
*/
|
|
19379
|
-
frameRef: FrameRefSchema.optional(),
|
|
19380
|
-
/**
|
|
19381
|
-
* CB5 shm passthrough — a `FrameHandle` naming the same ring slot
|
|
19382
|
-
* the decoded pixels live in. One more member of the one-of
|
|
19383
|
-
* frame/frameHandle/image/imageBase64/referenceImage group.
|
|
19384
|
-
*/
|
|
19385
|
-
frameHandle: FrameHandleSchema.optional(),
|
|
19386
|
-
imageBase64: string().optional(),
|
|
19387
|
-
/**
|
|
19388
|
-
* Binary JPEG bytes — preferred over `imageBase64` on internal
|
|
19389
|
-
* hops (hub → forked worker via Moleculer MsgPack) because it
|
|
19390
|
-
* skips the 33% base64 overhead + the per-call base64 decode on
|
|
19391
|
-
* the detection-pipeline worker. Callers can pass either; exactly
|
|
19392
|
-
* one of `frame`/`image`/`imageBase64`/`referenceImage` is required.
|
|
19393
|
-
*/
|
|
19394
|
-
image: _instanceof(Uint8Array).optional(),
|
|
19395
|
-
referenceImage: string().optional(),
|
|
19396
|
-
deviceId: number().optional(),
|
|
19397
|
-
sessionId: string().optional(),
|
|
19398
|
-
/**
|
|
19399
|
-
* Execution plane. 'full' (default) runs the whole tree — benchmark,
|
|
19400
|
-
* reference-image, and detail-subtree calls. 'frame' is the live
|
|
19401
|
-
* per-frame dispatch: ONLY root-plane steps run; crop children
|
|
19402
|
-
* (inputClasses ≠ null) are skipped and served per-track via
|
|
19403
|
-
* pipelineRunner.runDetailSubtree (two-plane design).
|
|
19404
|
-
*/
|
|
19405
|
-
plane: _enum(["full", "frame"]).optional(),
|
|
19406
|
-
/**
|
|
19407
|
-
* Inference-device selector (Phase 2 multi-device). Format
|
|
19408
|
-
* `<backend>:<device>` (e.g. `openvino:gpu`, `edgetpu:usb`, `cpu`).
|
|
19409
|
-
* Omitted ⇒ the runner's default device (current single-engine
|
|
19410
|
-
* behaviour). Selects WHICH device pool of the node runs the call.
|
|
19411
|
-
*/
|
|
19412
|
-
deviceKey: string().optional(),
|
|
19413
|
-
/**
|
|
19414
|
-
* Two-plane NATIVE child-crop reference. Set by `runDetailSubtree` ONLY
|
|
19415
|
-
* when the parent crop was resolved from the frame's retained NATIVE
|
|
19416
|
-
* surface (a frameHandle HIT). Lets the executor re-cut a LEAF crop
|
|
19417
|
-
* child's ROI (plate-ocr, face-embedding, leaf classifiers) at native
|
|
19418
|
-
* resolution from that surface — the SAME quality path faces already
|
|
19419
|
-
* had — instead of the downscaled parent tile. `handle` keys the native
|
|
19420
|
-
* surface (node-pinned to its owner); `cropFrameSpace` is the parent
|
|
19421
|
-
* crop's padded/clamped rectangle in FRAME-space pixels, used to compose
|
|
19422
|
-
* the executor's crop-normalized child ROI back into frame-normalized
|
|
19423
|
-
* coordinates. Auxiliary to the image source (`image`/`frame`/…), NOT one
|
|
19424
|
-
* of the mutually-exclusive image inputs. Absent ⇒ tile-crop children
|
|
19425
|
-
* (today's behaviour on the fallback path).
|
|
19426
|
-
*/
|
|
19427
|
-
nativeCropRef: NativeCropRefSchema.optional()
|
|
19428
|
-
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
19429
|
-
engine: PipelineEngineChoiceSchema.optional(),
|
|
19430
|
-
steps: array(PipelineStepInputSchema).min(1),
|
|
19431
|
-
frames: array(FrameInputSchema).min(1).max(255),
|
|
19432
|
-
deviceId: number().optional(),
|
|
19433
|
-
sessionId: string().optional(),
|
|
19434
|
-
/**
|
|
19435
|
-
* Pure-inference benchmark hint. A NONZERO uint32 pins every frame in
|
|
19436
|
-
* the batch to the Python pool's bench preprocess cache
|
|
19437
|
-
* (`_bench_frame_id`) so a REPEATED benchmark frame is decoded +
|
|
19438
|
-
* preprocessed ONCE and every later inference is a pure-inference cache
|
|
19439
|
-
* hit — the sustained-throughput run measures inference, not
|
|
19440
|
-
* decode+preprocess+infer. Omitted/0 for live frames (all different →
|
|
19441
|
-
* full preprocess every call, correct). Fresh per sustained run;
|
|
19442
|
-
* released via `uncacheFrame`.
|
|
19443
|
-
*/
|
|
19444
|
-
frameId: number().int().nonnegative().optional(),
|
|
19445
|
-
/** Inference-device selector (Phase 2 multi-device); see runPipeline. */
|
|
19446
|
-
deviceKey: string().optional()
|
|
19447
|
-
}), object({ results: array(PipelineRunResultBridge).readonly() }), { kind: "mutation" }), method(object({
|
|
19448
|
-
data: _instanceof(Uint8Array),
|
|
19449
|
-
width: number().int().positive(),
|
|
19450
|
-
height: number().int().positive(),
|
|
19451
|
-
format: _enum([
|
|
19452
|
-
"rgb",
|
|
19453
|
-
"bgr",
|
|
19454
|
-
"gray"
|
|
19455
|
-
])
|
|
19456
|
-
}), object({
|
|
19457
|
-
frameId: number(),
|
|
19458
|
-
width: number(),
|
|
19459
|
-
height: number()
|
|
19460
|
-
}), { kind: "mutation" }), method(object({
|
|
19461
|
-
stepId: string(),
|
|
19462
|
-
frameId: number().int()
|
|
19463
|
-
}), record(string(), unknown()), { kind: "mutation" }), method(object({ frameId: number().int() }), _void(), { kind: "mutation" }), method(_void(), object({
|
|
19464
|
-
batchMode: string(),
|
|
19465
|
-
windowMs: number(),
|
|
19466
|
-
maxBatchSize: number(),
|
|
19467
|
-
concurrency: number()
|
|
19468
|
-
})), method(_void(), array(object({
|
|
19469
|
-
engineKey: string(),
|
|
19470
|
-
engine: PipelineEngineChoiceSchema,
|
|
19471
|
-
modelsLoaded: array(string()).readonly(),
|
|
19472
|
-
inUseByCameras: array(number()).readonly(),
|
|
19473
|
-
/**
|
|
19474
|
-
* Origin of this resident factory.
|
|
19475
|
-
* - `runtime` — main camera-serving engine (no idle TTL).
|
|
19476
|
-
* - `warm-override` — benchmark/test override held in the warm
|
|
19477
|
-
* cache; auto-disposed after the idle TTL.
|
|
19478
|
-
* - `device-pool` — a concurrent per-device pool (Phase 2
|
|
19479
|
-
* multi-device, keyed by `deviceKey`) resolved
|
|
19480
|
-
* via `resolveDeviceFactory`. Runs alongside the
|
|
19481
|
-
* `runtime` engine on a DIFFERENT accelerator
|
|
19482
|
-
* (NPU / iGPU / Coral) — this is how the
|
|
19483
|
-
* Engines tab shows all pools running at once.
|
|
19484
|
-
*/
|
|
19485
|
-
kind: _enum([
|
|
19486
|
-
"runtime",
|
|
19487
|
-
"warm-override",
|
|
19488
|
-
"device-pool"
|
|
19489
|
-
]),
|
|
19490
|
-
/** Native pid of the underlying Python pool (null when no pool). */
|
|
19491
|
-
poolPid: number().nullable(),
|
|
19492
|
-
/** ms since this factory was last used (null when not warm-tracked). */
|
|
19493
|
-
idleMs: number().nullable(),
|
|
19494
|
-
/** Idle TTL after which `warm-override` factories self-evict (null when not applicable). */
|
|
19495
|
-
idleTtlMs: number().nullable()
|
|
19496
|
-
})).readonly()), method(object({ engine: PipelineEngineChoiceSchema }), object({ success: literal(true) }), {
|
|
19497
|
-
kind: "mutation",
|
|
19498
|
-
auth: "admin"
|
|
19499
|
-
}), method(object({
|
|
19500
|
-
engine: PipelineEngineChoiceSchema,
|
|
19501
|
-
force: boolean().optional()
|
|
19502
|
-
}), object({
|
|
19503
|
-
success: boolean(),
|
|
19504
|
-
reason: string().optional()
|
|
19505
|
-
}), {
|
|
19506
|
-
kind: "mutation",
|
|
19507
|
-
auth: "admin"
|
|
19508
|
-
}), method(_void(), array(ReferenceImageEntrySchema).readonly()), method(object({ filename: string() }), ReferenceImageBodySchema.nullable()), method(_void(), array(ReferenceAudioEntrySchema).readonly()), method(object({ filename: string() }), ReferenceAudioBodySchema.nullable()), method(_void(), AudioCapabilitiesSchema), method(object({
|
|
19509
|
-
addonId: string(),
|
|
19510
|
-
modelId: string(),
|
|
19511
|
-
filename: string().optional(),
|
|
19512
|
-
settings: record(string(), unknown()).optional()
|
|
19513
|
-
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
19514
|
-
/**
|
|
19515
|
-
* Per-stage gating mode applied to the zones a rule references.
|
|
19516
|
-
*
|
|
19517
|
-
* - `include`: the rule contributes to a **whitelist** for its stage.
|
|
19518
|
-
* When at least one `include` rule fires for a stage, only entities
|
|
19519
|
-
* inside one of those zones pass that stage.
|
|
19520
|
-
* - `exclude`: the rule contributes to a **blacklist** for its stage.
|
|
19521
|
-
* Entities inside one of those zones are dropped at that stage.
|
|
19522
|
-
*
|
|
19523
|
-
* `monitor`-style observation (count without filtering) is not a rule
|
|
19524
|
-
* mode — zones without any matching rule are observed naturally by
|
|
19525
|
-
* `zone-analytics` (live snapshot + history), so an "I just want to
|
|
19526
|
-
* count, not filter" use case needs no rule at all.
|
|
19527
|
-
*/
|
|
19528
|
-
var ZoneRuleModeEnum = _enum(["include", "exclude"]);
|
|
19529
|
-
/**
|
|
19530
|
-
* Per-consumer rule that references existing zones (geometry) and
|
|
19531
|
-
* defines how a specific pipeline stage should treat them. Each
|
|
19532
|
-
* consumer addon owns its own `ZoneRule[]` array in its per-device
|
|
19533
|
-
* settings:
|
|
19534
|
-
*
|
|
19535
|
-
* - `addon-motion-wasm` → `motionZoneRules: ZoneRule[]` (motion stage)
|
|
19536
|
-
* - `addon-detection-pipeline` → `detectionZoneRules: ZoneRule[]` (detection stage)
|
|
19537
|
-
* - future: notification rules, audio gating, etc.
|
|
19538
|
-
*
|
|
19539
|
-
* One rule applies to N zones (`zoneIds[]`) so the operator can
|
|
19540
|
-
* express "ignore motion in ALL of {garden, street}" with a single
|
|
19541
|
-
* rule. `classFilter` narrows the rule to specific object classes —
|
|
19542
|
-
* "drop person detections in the street, but keep cars" is one
|
|
19543
|
-
* `exclude` rule with `classFilter: ['person']`.
|
|
19544
|
-
*
|
|
19545
|
-
* `enabled` is a soft toggle — the operator can keep the rule
|
|
19546
|
-
* configured but inert without deleting it.
|
|
19547
|
-
*/
|
|
19548
|
-
var ZoneRuleSchema = object({
|
|
19549
|
-
/** Stable rule id — survives edits, used by the UI for diffing. */
|
|
19550
|
-
id: string(),
|
|
19551
|
-
/** Optional human-readable label rendered in the rule editor. */
|
|
19552
|
-
name: string().optional(),
|
|
19553
|
-
/** Zones this rule targets. The rule's `mode` applies to ALL
|
|
19554
|
-
* listed zones (OR-set: a detection in any one of them counts).
|
|
19555
|
-
* At least one zone id required — a rule with no targets is a
|
|
19556
|
-
* configuration mistake and the form validator rejects it. */
|
|
19557
|
-
zoneIds: array(string()).min(1).readonly(),
|
|
19558
|
-
mode: ZoneRuleModeEnum,
|
|
19559
|
-
/**
|
|
19560
|
-
* Class names this rule applies to. Empty / undefined ⇒ rule
|
|
19561
|
-
* applies to every class. Class strings match the `macroClass`
|
|
19562
|
-
* field on detections (e.g. `person`, `car`, `dog`).
|
|
19563
|
-
*/
|
|
19564
|
-
classFilter: array(string()).readonly().optional(),
|
|
19565
|
-
/**
|
|
19566
|
-
* Minimum bbox/mask overlap (0–1) with any of the rule's zones
|
|
19567
|
-
* required to consider an entity "in the zone". Defaults to the
|
|
19568
|
-
* consumer's stage default when omitted. Kept for back-compat with
|
|
19569
|
-
* existing per-rule overrides; new operators pick the value via
|
|
19570
|
-
* `bboxInclusionPct` (operator-friendly 0–100). Whichever field is
|
|
19571
|
-
* set, the lower-level engine reads it as a 0–1 fraction.
|
|
19572
|
-
*/
|
|
19573
|
-
overlapThreshold: number().min(0).max(1).optional(),
|
|
19574
|
-
/**
|
|
19575
|
-
* Operator-friendly version of `overlapThreshold` — the percentage
|
|
19576
|
-
* of the detection's bbox that must lie inside the zone for the
|
|
19577
|
-
* rule to match. Documented default is 85%; the engine substitutes
|
|
19578
|
-
* that when the field is omitted (kept optional so existing rules
|
|
19579
|
-
* stored without it stay valid).
|
|
19580
|
-
*
|
|
19581
|
-
* When BOTH `overlapThreshold` and `bboxInclusionPct` are set on a
|
|
19582
|
-
* rule, the engine prefers `bboxInclusionPct` because it's the
|
|
19583
|
-
* field exposed in the UI. Internally both feed the same gate.
|
|
19584
|
-
*/
|
|
19585
|
-
bboxInclusionPct: number().min(0).max(100).optional(),
|
|
19586
|
-
/**
|
|
19587
|
-
* When `true` and a detection has a segmentation mask, use the
|
|
19588
|
-
* mask for overlap instead of the bbox. Detection-stage only;
|
|
19589
|
-
* motion rules ignore this field.
|
|
19590
|
-
*/
|
|
19591
|
-
preferMask: boolean().optional(),
|
|
19592
|
-
/**
|
|
19593
|
-
* Soft-toggle: `false` disables the rule without deleting it.
|
|
19594
|
-
* Defaults to `true` so operators creating a rule via the UI
|
|
19595
|
-
* see it active immediately.
|
|
19596
|
-
*/
|
|
19597
|
-
enabled: boolean().default(true)
|
|
19598
|
-
});
|
|
19599
|
-
array(ZoneRuleSchema).readonly();
|
|
19600
|
-
/**
|
|
19601
|
-
* Zone — pure geometry + identity. NO filtering behaviour.
|
|
19602
|
-
*
|
|
19603
|
-
* Zones describe **where** in the frame the operator wants to flag
|
|
19604
|
-
* something; consumer-owned {@link ZoneRule} arrays describe **how**
|
|
19605
|
-
* each pipeline stage uses them. Splitting the two means a single
|
|
19606
|
-
* polygon "Driveway" can simultaneously back a motion-exclude rule,
|
|
19607
|
-
* a detection-include rule on `['car']`, and an occupancy aggregate
|
|
19608
|
-
* — without three duplicated polygons.
|
|
19609
|
-
*
|
|
19610
|
-
* Owned by the orchestrator addon (provider) and mirrored into the
|
|
19611
|
-
* `zones` device-state slice on every mutation. Consumers
|
|
19612
|
-
* (motion-wasm, pipeline-executor, analytics, admin UI) read either
|
|
19613
|
-
* via `api.zones.listZones` (one-shot) or via `dev.state.zones` (live
|
|
19614
|
-
* mirror with `onChanged`).
|
|
19615
|
-
*
|
|
19616
|
-
* Coordinates are normalised fractions of the frame (0–1) so zones
|
|
19617
|
-
* survive resolution changes and stream profile switches.
|
|
19618
|
-
*
|
|
19619
|
-
* `kind` discriminates between full polygons (closed regions used
|
|
19620
|
-
* for intrusion / occupancy filters) and tripwires (open 2-point
|
|
19621
|
-
* line segments used for cross events). Onboard / firmware-reported
|
|
19622
|
-
* zones (Reolink, ONVIF) are out of scope for now — see the deferred
|
|
19623
|
-
* task list.
|
|
19624
|
-
*/
|
|
19625
|
-
var ZoneKindEnum = _enum(["polygon", "tripwire"]);
|
|
19626
|
-
/** Polygon vertex in fraction-of-frame coordinates (0–1). */
|
|
19627
|
-
var PolygonPointSchema = object({
|
|
19628
|
-
x: number(),
|
|
19629
|
-
y: number()
|
|
19630
|
-
});
|
|
19631
|
-
/** A camera detection zone — pure geometry/identity. */
|
|
19632
|
-
var ZoneSchema = object({
|
|
19633
|
-
id: string(),
|
|
19634
|
-
name: string(),
|
|
19635
|
-
kind: ZoneKindEnum.default("polygon"),
|
|
19636
|
-
/** Polygon vertices, fraction of frame (0–1). */
|
|
19637
|
-
polygon: array(PolygonPointSchema).readonly(),
|
|
19638
|
-
/** Visual color for UI rendering. */
|
|
19639
|
-
color: string().default("#3b82f6")
|
|
19640
|
-
});
|
|
19641
|
-
DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).readonly()), method(object({
|
|
19642
|
-
deviceId: number(),
|
|
19643
|
-
zone: ZoneSchema
|
|
19644
|
-
}), _void(), {
|
|
19645
|
-
kind: "mutation",
|
|
19646
|
-
auth: "admin"
|
|
19647
|
-
}), method(object({
|
|
19648
|
-
deviceId: number(),
|
|
19649
|
-
zoneId: string()
|
|
19650
|
-
}), _void(), {
|
|
19651
|
-
kind: "mutation",
|
|
19652
|
-
auth: "admin"
|
|
19653
|
-
}), method(object({
|
|
19654
|
-
deviceId: number(),
|
|
19655
|
-
zone: ZoneSchema
|
|
19656
|
-
}), _void(), {
|
|
19657
|
-
kind: "mutation",
|
|
19658
|
-
auth: "admin"
|
|
19659
|
-
}), object({ zones: array(ZoneSchema).readonly() });
|
|
19660
|
-
/**
|
|
19661
|
-
* pipeline-analytics — device-scoped wrapper cap. Refines raw
|
|
19662
|
-
* per-frame detections emitted by the pipeline runner into tracked
|
|
19663
|
-
* objects, per-kind event collections (motion / object / audio), and
|
|
19664
|
-
* persisted media. Owns the post-detection domain end-to-end:
|
|
19665
|
-
*
|
|
19666
|
-
* runner emits PipelineInferenceResult
|
|
19667
|
-
* ↓ (event bus)
|
|
19668
|
-
* pipeline-analytics subscriber
|
|
19669
|
-
* ↓ SORT tracker + zone engine + state analyzer + event emitter
|
|
19670
|
-
* → three DB collections (one per kind), one FS media tree, one
|
|
19671
|
-
* unified event emitter (FrameTracked + TrackStarted/Ended +
|
|
19672
|
-
* DetectionEvent on bus)
|
|
19673
|
-
*
|
|
19674
|
-
* Pure subscriber model. No `processFrame` cap method — the runner
|
|
19675
|
-
* already publishes the raw frame on the bus. The cap surface is
|
|
19676
|
-
* only QUERIES + per-device settings, bound on/off via
|
|
19677
|
-
* `device-manager.setWrapperActive`. `defaultActive: true` because
|
|
19678
|
-
* every camera with a detection pipeline wants its raw detections
|
|
19679
|
-
* refined; operators opt out per-device via BindingsTab when needed.
|
|
19680
|
-
*
|
|
19681
|
-
* Replaces the legacy `analysis-pipeline`, `analysis-data-persistence`
|
|
19682
|
-
* (per-device surface) and `track-trail` caps — see P11 cleanup.
|
|
19683
|
-
*/
|
|
19684
|
-
var TrackStateSchema = _enum([
|
|
19685
|
-
"new",
|
|
19686
|
-
"entered",
|
|
19687
|
-
"left",
|
|
19688
|
-
"moving",
|
|
19689
|
-
"idle"
|
|
19690
|
-
]);
|
|
19691
|
-
var EventKindSchema = _enum([
|
|
19692
|
-
"motion",
|
|
19693
|
-
"object",
|
|
19694
|
-
"audio"
|
|
19695
|
-
]);
|
|
19696
|
-
/**
|
|
19697
|
-
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
19698
|
-
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
19699
|
-
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
19700
|
-
*/
|
|
19701
|
-
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
19702
|
-
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
19703
|
-
var EventKindIconSchema = _enum([
|
|
19704
|
-
"motion",
|
|
19705
|
-
"audio",
|
|
19706
|
-
"person",
|
|
19707
|
-
"vehicle",
|
|
19708
|
-
"animal",
|
|
19709
|
-
"door",
|
|
19710
|
-
"pir",
|
|
19711
|
-
"smoke",
|
|
19712
|
-
"water",
|
|
19713
|
-
"button",
|
|
19714
|
-
"package",
|
|
19715
|
-
"generic"
|
|
19716
|
-
]);
|
|
19717
|
-
var EventKindCategorySchema = _enum([
|
|
19718
|
-
"motion",
|
|
19719
|
-
"audio",
|
|
19720
|
-
"detection",
|
|
19721
|
-
"sensor",
|
|
19722
|
-
"control",
|
|
19723
|
-
"custom",
|
|
19724
|
-
"package"
|
|
19725
|
-
]);
|
|
19726
|
-
/** Taxonomy level — macro (timeline lane) vs sub (events-page leaf). */
|
|
19727
|
-
var EventKindLevelSchema = _enum(["macro", "sub"]);
|
|
19728
|
-
var EventKindDescriptorSchema = object({
|
|
19729
|
-
/** Stable kind id (e.g. 'motion', 'vehicle', 'car', 'lock'). */
|
|
19730
|
-
kind: string(),
|
|
19731
|
-
/** i18n key resolved on the UI side; `label` is the English fallback. */
|
|
19732
|
-
labelKey: string(),
|
|
19733
|
-
/** English fallback label (kept for clients that don't translate). */
|
|
19734
|
-
label: string(),
|
|
19735
|
-
/** Hex color for timeline/legend rendering. */
|
|
19736
|
-
color: string(),
|
|
19737
|
-
/** Dictionary id → lucide component on the UI side. */
|
|
19738
|
-
iconId: string(),
|
|
19739
|
-
/** Legacy closed-vocab glyph — fallback for `iconId`. */
|
|
19740
|
-
icon: EventKindIconSchema,
|
|
19741
|
-
category: EventKindCategorySchema,
|
|
19742
|
-
/** Macro parent for this kind ('car' → 'vehicle'); null for a macro. */
|
|
19743
|
-
parentKind: string().nullable(),
|
|
19744
|
-
/** Derived from `parentKind`, explicit for the client tree. */
|
|
19745
|
-
level: EventKindLevelSchema,
|
|
19746
|
-
/** Which cap + device contributes this kind. For built-ins the camera
|
|
19747
|
-
* itself; for sensor kinds the LINKED source device. */
|
|
19748
|
-
source: object({
|
|
19749
|
-
capName: string(),
|
|
19750
|
-
deviceId: number()
|
|
19751
|
-
})
|
|
19752
|
-
});
|
|
19753
|
-
/** One camera's event vocabulary, as returned by `listEventKindsBatch`. */
|
|
19754
|
-
var EventKindsForDeviceSchema = object({
|
|
19755
|
-
deviceId: number(),
|
|
19756
|
-
kinds: array(EventKindDescriptorSchema).readonly()
|
|
19757
|
-
});
|
|
19758
|
-
var SensorEventSchema = object({
|
|
19759
|
-
id: string(),
|
|
19760
|
-
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
19761
|
-
* yields N rows, one per camera). */
|
|
19762
|
-
deviceId: number(),
|
|
19763
|
-
/** The linked sensor device whose state changed. */
|
|
19764
|
-
sourceDeviceId: number(),
|
|
19765
|
-
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
19766
|
-
kind: string(),
|
|
19767
|
-
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
19768
|
-
value: record(string(), unknown()).nullable(),
|
|
19769
|
-
timestamp: number()
|
|
19770
|
-
});
|
|
19771
|
-
/**
|
|
19772
|
-
* One stored sighting on a track's trajectory.
|
|
19773
|
-
*
|
|
19774
|
-
* The array these live in is returned in TIME order (D399) — it is APPENDED in
|
|
19775
|
-
* arrival order, and the two detector passes interleave, so a consumer must not
|
|
19776
|
-
* assume the two are the same on a row written by an older build.
|
|
19777
|
-
*/
|
|
19778
|
-
var TrackPositionSchema = object({
|
|
19779
|
-
x: number(),
|
|
19780
|
-
y: number(),
|
|
19781
|
-
timestamp: number(),
|
|
19782
|
-
bbox: BoundingBoxSchema,
|
|
19783
|
-
/**
|
|
19784
|
-
* Which detector pass measured this box (D399): `frame` is the full-frame
|
|
19785
|
-
* pass on the analysis raster, `recovery` is the native-resolution
|
|
19786
|
-
* small-subject second pass (D377/D378). Both write into one array, and until
|
|
19787
|
-
* this field existed the only way to tell them apart was that full-frame boxes
|
|
19788
|
-
* are exact multiples of 1.2 while recovery boxes are full-precision floats.
|
|
19789
|
-
* Absent on rows written before D399.
|
|
19790
|
-
*/
|
|
19791
|
-
source: _enum(["frame", "recovery"]).optional(),
|
|
19792
|
-
/** Detection score of this box, so a position can be weighed and not only
|
|
19793
|
-
* plotted. Absent on rows written before D399. */
|
|
19794
|
-
score: number().optional()
|
|
19795
|
-
});
|
|
19796
|
-
var TrackSnapshotSchema = object({
|
|
19797
|
-
timestamp: number(),
|
|
19798
|
-
position: TrackPositionSchema,
|
|
19799
|
-
/** The snapshot's media row id (D482); resolve via `listTrackMedia({ trackId })`. */
|
|
19800
|
-
mediaId: number().int()
|
|
19801
|
-
});
|
|
19802
|
-
/**
|
|
19803
|
-
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
19804
|
-
* divided by the track's detection-frame dims), computed at persist time.
|
|
19805
|
-
* Absent when the frame dims were unknown when the track was persisted
|
|
19806
|
-
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
19589
|
+
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
19590
|
+
* divided by the track's detection-frame dims), computed at persist time.
|
|
19591
|
+
* Absent when the frame dims were unknown when the track was persisted
|
|
19592
|
+
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
19807
19593
|
*/
|
|
19808
19594
|
var TrackEnvelopeSchema = object({
|
|
19809
19595
|
minX: number(),
|
|
@@ -20228,6 +20014,22 @@ var TrackSchema = object({
|
|
|
20228
20014
|
* omit it. Render nothing when absent.
|
|
20229
20015
|
*/
|
|
20230
20016
|
previewMissReason: string().optional(),
|
|
20017
|
+
/**
|
|
20018
|
+
* The ROOT model that produced this track — the `FrameResult.rootModelId` of
|
|
20019
|
+
* the frame it was BORN on (D646). What a later replay compares against, so
|
|
20020
|
+
* "the original model" is named rather than assumed. A birth fact: never
|
|
20021
|
+
* rewritten by a later frame. **Absent ≠ unknown-model**: a row from before
|
|
20022
|
+
* the column, and a track the camera's own detector produced, carry none.
|
|
20023
|
+
*/
|
|
20024
|
+
modelId: string().optional(),
|
|
20025
|
+
/**
|
|
20026
|
+
* Size (px) of the detection frame this track's `positions[].bbox` live in —
|
|
20027
|
+
* the frame it was born on, else the camera's latest analysis frame at
|
|
20028
|
+
* persist time. Divide a position by these to normalise it. Absent when the
|
|
20029
|
+
* size was never known.
|
|
20030
|
+
*/
|
|
20031
|
+
frameWidth: number().optional(),
|
|
20032
|
+
frameHeight: number().optional(),
|
|
20231
20033
|
...TrackFlagFields,
|
|
20232
20034
|
...TrackRetrainFields
|
|
20233
20035
|
});
|
|
@@ -20457,7 +20259,8 @@ var MediaFileKindEnum = _enum([
|
|
|
20457
20259
|
"thumbnailSmall",
|
|
20458
20260
|
"confirmationCrop",
|
|
20459
20261
|
"debugCrop",
|
|
20460
|
-
"sceneFrame"
|
|
20262
|
+
"sceneFrame",
|
|
20263
|
+
"lastSceneFrame"
|
|
20461
20264
|
]);
|
|
20462
20265
|
/**
|
|
20463
20266
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -21009,7 +20812,23 @@ var SearchObjectEventsInput = object({
|
|
|
21009
20812
|
until: number().optional(),
|
|
21010
20813
|
classFilter: string().optional(),
|
|
21011
20814
|
limit: number().default(50),
|
|
21012
|
-
|
|
20815
|
+
/**
|
|
20816
|
+
* An ABSOLUTE cosine floor. Optional since D649: a floor is a property of the
|
|
20817
|
+
* model (0.2 kept 96% of matched pairs on MobileCLIP S1 and 2.7% on SigLIP2),
|
|
20818
|
+
* so an absent one resolves to the searched model's own `searchMinScore`
|
|
20819
|
+
* scaled by `strictness`. A number sent here is honoured verbatim.
|
|
20820
|
+
*/
|
|
20821
|
+
minScore: number().min(0).max(1).optional(),
|
|
20822
|
+
/** Model-relative floor — see `resolveClipSearchMinScore`. Default `loose`. */
|
|
20823
|
+
strictness: ClipSearchStrictnessSchema.optional(),
|
|
20824
|
+
/**
|
|
20825
|
+
* Search THIS CLIP model's index instead of the cluster row's. Every index a
|
|
20826
|
+
* model ever wrote stays searchable until it is wiped (the MobileCLIP index
|
|
20827
|
+
* through a SigLIP2 cutover and its rollback window). An id with no CLIP
|
|
20828
|
+
* metadata is refused; an id other than the cluster row's is ADMIN-only
|
|
20829
|
+
* (`model-override-requires-admin`).
|
|
20830
|
+
*/
|
|
20831
|
+
modelId: string().min(1).optional()
|
|
21013
20832
|
});
|
|
21014
20833
|
var TrackCascadeCountsSchema = object({
|
|
21015
20834
|
/** Persisted track roots deleted (authoritative). */
|
|
@@ -21144,7 +20963,41 @@ var RebuildObjectEmbeddingsInput = object({
|
|
|
21144
20963
|
* comparable, so wiping and rebuilding is the only way to be sure every vector
|
|
21145
20964
|
* means the same thing.
|
|
21146
20965
|
*/
|
|
21147
|
-
var WipeObjectEmbeddingsResultSchema = object({
|
|
20966
|
+
var WipeObjectEmbeddingsResultSchema = object({
|
|
20967
|
+
deleted: number(),
|
|
20968
|
+
/**
|
|
20969
|
+
* CLIP indexes that could NOT be emptied (unreachable, or refused at their
|
|
20970
|
+
* dimension) — not a clean slate. Additive and optional (D649).
|
|
20971
|
+
*/
|
|
20972
|
+
failedIndexes: array(string()).optional()
|
|
20973
|
+
});
|
|
20974
|
+
/**
|
|
20975
|
+
* Why a rebuild did not start, BY NAME — ONE vocabulary for both gates in front
|
|
20976
|
+
* of a pass (D649 over D651). A bare `started: false` read the same for "the
|
|
20977
|
+
* stores are booting" and "the cluster row names a model with no CLIP
|
|
20978
|
+
* metadata", which need different fixes.
|
|
20979
|
+
* - `stores-unavailable` — the analytics stores or the API are not up yet.
|
|
20980
|
+
* - the owner's confirmation of the cluster model (D651, `ClusterPinConfirmer`):
|
|
20981
|
+
* a pass that rewrites an index needs two agreeing reads of the OWNER's
|
|
20982
|
+
* answer (`pipelineOrchestrator.getClusterModelChoice`) — a pass that cannot
|
|
20983
|
+
* name its model does not run (D54):
|
|
20984
|
+
* - the owner's own `unreadable` reasons (`owner-not-ready`,
|
|
20985
|
+
* `store-read-failed`, `three-way-read-unavailable`, `invalid-stored`,
|
|
20986
|
+
* `not-cluster-scoped`);
|
|
20987
|
+
* - `method-unavailable` — the orchestrator predates the method;
|
|
20988
|
+
* - `read-failed` — the call failed or answered something unparseable;
|
|
20989
|
+
* - `reads-disagree` — the two reads named different choices.
|
|
20990
|
+
* - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
|
|
20991
|
+
* index to fill and no dimension to check against (D649).
|
|
20992
|
+
*/
|
|
20993
|
+
var RebuildObjectEmbeddingsRefusalSchema = _enum([
|
|
20994
|
+
"stores-unavailable",
|
|
20995
|
+
...CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS,
|
|
20996
|
+
"method-unavailable",
|
|
20997
|
+
"read-failed",
|
|
20998
|
+
"reads-disagree",
|
|
20999
|
+
"not-a-clip-model"
|
|
21000
|
+
]);
|
|
21148
21001
|
/**
|
|
21149
21002
|
* Acknowledgement that a rebuild STARTED.
|
|
21150
21003
|
*
|
|
@@ -21157,7 +21010,12 @@ var WipeObjectEmbeddingsResultSchema = object({ deleted: number() });
|
|
|
21157
21010
|
var RebuildObjectEmbeddingsResultSchema = object({
|
|
21158
21011
|
started: boolean(),
|
|
21159
21012
|
/** True when a pass was already running; the new request is ignored. */
|
|
21160
|
-
alreadyRunning: boolean()
|
|
21013
|
+
alreadyRunning: boolean(),
|
|
21014
|
+
/** Present when the pass refused to start — see `RebuildObjectEmbeddingsRefusalSchema`. */
|
|
21015
|
+
refusal: RebuildObjectEmbeddingsRefusalSchema.optional(),
|
|
21016
|
+
/** The CLIP model the pass pinned, and the index it fills (when it started). */
|
|
21017
|
+
modelId: string().optional(),
|
|
21018
|
+
index: string().optional()
|
|
21161
21019
|
});
|
|
21162
21020
|
var RebuildStatusSchema = object({
|
|
21163
21021
|
running: boolean(),
|
|
@@ -21191,7 +21049,11 @@ var RebuildStatusSchema = object({
|
|
|
21191
21049
|
startedAtMs: number().nullable(),
|
|
21192
21050
|
finishedAtMs: number().nullable(),
|
|
21193
21051
|
/** Present when the pass ended by throwing. */
|
|
21194
|
-
error: string().nullable()
|
|
21052
|
+
error: string().nullable(),
|
|
21053
|
+
/** The CLIP model the current / last pass pinned (D54), `null` before any. */
|
|
21054
|
+
modelId: string().nullable(),
|
|
21055
|
+
/** The index that pass fills — `ClipModelMeta.vectorIndex` of `modelId` (D649). */
|
|
21056
|
+
index: string().nullable()
|
|
21195
21057
|
});
|
|
21196
21058
|
/**
|
|
21197
21059
|
* Acknowledgement that a debug-media reclaim STARTED.
|
|
@@ -21234,24 +21096,6 @@ var MediaReclaimStatusSchema = object({
|
|
|
21234
21096
|
finishedAtMs: number().nullable(),
|
|
21235
21097
|
error: string().nullable()
|
|
21236
21098
|
});
|
|
21237
|
-
var ReplayFrameInputSchema = object({
|
|
21238
|
-
timestamp: number(),
|
|
21239
|
-
frame: PipelineRunResultBridge
|
|
21240
|
-
});
|
|
21241
|
-
var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
21242
|
-
className: string(),
|
|
21243
|
-
firstSeenMs: number(),
|
|
21244
|
-
lastSeenMs: number(),
|
|
21245
|
-
/** Bbox of the track's FIRST matched detection, pixel-space in the clip's
|
|
21246
|
-
* frame — a representative box for the diff's `(className, window, IoU)`
|
|
21247
|
-
* pairing (`replay-diff.ts`). A replay does not need the full per-frame
|
|
21248
|
-
* trajectory production's `Track.positions` keeps. */
|
|
21249
|
-
bbox: BoundingBoxSchema,
|
|
21250
|
-
/** How many of the input frames this track matched a real detection on
|
|
21251
|
-
* (never a coasted/extrapolated frame) — the replay's own signal for "how
|
|
21252
|
-
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21253
|
-
framesMatched: number().int()
|
|
21254
|
-
})).readonly() });
|
|
21255
21099
|
/**
|
|
21256
21100
|
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21257
21101
|
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
@@ -21482,16 +21326,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21482
21326
|
}), RetrainAssistResultSchema, {
|
|
21483
21327
|
kind: "mutation",
|
|
21484
21328
|
auth: "admin"
|
|
21485
|
-
}), method(object({
|
|
21486
|
-
deviceId: number(),
|
|
21487
|
-
source: DetectionSourceSchema,
|
|
21488
|
-
zones: array(ZoneSchema).readonly().optional(),
|
|
21489
|
-
detectionRules: array(ZoneRuleSchema).readonly().optional(),
|
|
21490
|
-
zoneMembershipMinOverlap: number().min(0).max(1).optional(),
|
|
21491
|
-
frames: array(ReplayFrameInputSchema).min(1)
|
|
21492
|
-
}), RunReplayFrameProcessorResultSchema, {
|
|
21493
|
-
kind: "mutation",
|
|
21494
|
-
auth: "admin"
|
|
21495
21329
|
}), method(object({ trackId: string() }), array(RetrainAnnotationSchema).readonly(), {
|
|
21496
21330
|
kind: "query",
|
|
21497
21331
|
auth: "admin"
|
|
@@ -21540,7 +21374,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21540
21374
|
deviceId: number(),
|
|
21541
21375
|
ownerKind: MediaPresenceOwnerKindSchema,
|
|
21542
21376
|
ownerIds: array(string()).max(5e3)
|
|
21543
|
-
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21377
|
+
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly(), { caller: "required" }), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21544
21378
|
kind: "mutation",
|
|
21545
21379
|
auth: "admin"
|
|
21546
21380
|
}), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
|
|
@@ -21567,6 +21401,478 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21567
21401
|
eventId: string(),
|
|
21568
21402
|
timestamp: number()
|
|
21569
21403
|
});
|
|
21404
|
+
/**
|
|
21405
|
+
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
21406
|
+
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
21407
|
+
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
21408
|
+
*/
|
|
21409
|
+
var NativeCropRefSchema = object({
|
|
21410
|
+
/** Handle keying the retained native surface (node-pinned to its owner). */
|
|
21411
|
+
handle: FrameHandleSchema,
|
|
21412
|
+
/** The parent crop's padded/clamped rectangle in FRAME-space pixels. */
|
|
21413
|
+
cropFrameSpace: object({
|
|
21414
|
+
x: number(),
|
|
21415
|
+
y: number(),
|
|
21416
|
+
w: number(),
|
|
21417
|
+
h: number()
|
|
21418
|
+
})
|
|
21419
|
+
});
|
|
21420
|
+
object({
|
|
21421
|
+
crop: object({
|
|
21422
|
+
left: number(),
|
|
21423
|
+
top: number(),
|
|
21424
|
+
width: number().positive(),
|
|
21425
|
+
height: number().positive()
|
|
21426
|
+
}).optional(),
|
|
21427
|
+
content: object({
|
|
21428
|
+
width: number().int().positive(),
|
|
21429
|
+
height: number().int().positive()
|
|
21430
|
+
}),
|
|
21431
|
+
fit: _enum(["stretch", "contain"]),
|
|
21432
|
+
format: _enum([
|
|
21433
|
+
"rgb",
|
|
21434
|
+
"gray",
|
|
21435
|
+
"jpeg"
|
|
21436
|
+
])
|
|
21437
|
+
});
|
|
21438
|
+
/**
|
|
21439
|
+
* Process-local frame identity. It is serializable so it can ride an in-process
|
|
21440
|
+
* capability call, but `registryId` deliberately prevents resolution in any
|
|
21441
|
+
* other process or execution group.
|
|
21442
|
+
*/
|
|
21443
|
+
var FrameRefSchema = object({
|
|
21444
|
+
registryId: string().min(1),
|
|
21445
|
+
id: string().min(1),
|
|
21446
|
+
width: number().int().positive(),
|
|
21447
|
+
height: number().int().positive(),
|
|
21448
|
+
format: _enum(["rgb", "gray"]),
|
|
21449
|
+
timestamp: number(),
|
|
21450
|
+
capturedAt: number().optional()
|
|
21451
|
+
});
|
|
21452
|
+
var ModelFormatSchema$1 = _enum([
|
|
21453
|
+
"onnx",
|
|
21454
|
+
"coreml",
|
|
21455
|
+
"openvino",
|
|
21456
|
+
"tflite",
|
|
21457
|
+
"pt",
|
|
21458
|
+
"gguf"
|
|
21459
|
+
]);
|
|
21460
|
+
var PipelineSlotSchema = _enum([
|
|
21461
|
+
"detector",
|
|
21462
|
+
"cropper",
|
|
21463
|
+
"classifier",
|
|
21464
|
+
"refiner",
|
|
21465
|
+
"audio-classifier"
|
|
21466
|
+
]);
|
|
21467
|
+
var PipelineEngineChoiceSchema = object({
|
|
21468
|
+
runtime: literal("python"),
|
|
21469
|
+
backend: string(),
|
|
21470
|
+
format: ModelFormatSchema$1,
|
|
21471
|
+
device: string().optional()
|
|
21472
|
+
});
|
|
21473
|
+
/**
|
|
21474
|
+
* One pool's resolved provisioning (`getEffectiveTuning`). `numWorkers` is the
|
|
21475
|
+
* knob that lifts a saturated pool (`inference-devices.md`); `concurrency` is
|
|
21476
|
+
* per-worker in-flight requests. `deviceKey` echoes the pool asked about —
|
|
21477
|
+
* `null` for the node-default pool.
|
|
21478
|
+
*/
|
|
21479
|
+
var EffectiveTuningSchema = object({
|
|
21480
|
+
deviceKey: string().nullable(),
|
|
21481
|
+
runtime: string(),
|
|
21482
|
+
batchMode: string(),
|
|
21483
|
+
windowMs: number(),
|
|
21484
|
+
maxBatchSize: number(),
|
|
21485
|
+
concurrency: number(),
|
|
21486
|
+
numWorkers: number()
|
|
21487
|
+
});
|
|
21488
|
+
var AvailableEngineSchema = object({
|
|
21489
|
+
engine: PipelineEngineChoiceSchema,
|
|
21490
|
+
devices: array(object({
|
|
21491
|
+
id: string(),
|
|
21492
|
+
label: string(),
|
|
21493
|
+
description: string().optional()
|
|
21494
|
+
})).readonly(),
|
|
21495
|
+
defaultDevice: string()
|
|
21496
|
+
});
|
|
21497
|
+
var PipelineDefaultStepSchema = lazy(() => object({
|
|
21498
|
+
addonId: string(),
|
|
21499
|
+
addonName: string(),
|
|
21500
|
+
slot: PipelineSlotSchema,
|
|
21501
|
+
inputClasses: array(string()).readonly(),
|
|
21502
|
+
outputClasses: array(string()).readonly(),
|
|
21503
|
+
enabled: boolean(),
|
|
21504
|
+
modelId: string(),
|
|
21505
|
+
children: array(PipelineDefaultStepSchema).readonly(),
|
|
21506
|
+
group: string().optional(),
|
|
21507
|
+
settings: record(string(), unknown()).optional()
|
|
21508
|
+
}));
|
|
21509
|
+
var PipelineTemplateStepSchema = lazy(() => object({
|
|
21510
|
+
addonId: string(),
|
|
21511
|
+
enabled: boolean(),
|
|
21512
|
+
modelId: string(),
|
|
21513
|
+
children: array(PipelineTemplateStepSchema).readonly(),
|
|
21514
|
+
settings: record(string(), unknown()).optional()
|
|
21515
|
+
}));
|
|
21516
|
+
var PipelineTemplateSchema$1 = object({
|
|
21517
|
+
id: string(),
|
|
21518
|
+
name: string(),
|
|
21519
|
+
createdAt: string(),
|
|
21520
|
+
updatedAt: string(),
|
|
21521
|
+
engine: PipelineEngineChoiceSchema,
|
|
21522
|
+
steps: array(PipelineTemplateStepSchema).readonly()
|
|
21523
|
+
});
|
|
21524
|
+
var PipelineModelOptionSchema = object({
|
|
21525
|
+
id: string(),
|
|
21526
|
+
name: string(),
|
|
21527
|
+
formats: record(string(), object({
|
|
21528
|
+
downloaded: boolean(),
|
|
21529
|
+
sizeMB: number()
|
|
21530
|
+
})),
|
|
21531
|
+
group: ModelVariantGroupSchema.optional(),
|
|
21532
|
+
legacy: boolean().optional(),
|
|
21533
|
+
provider: ModelProviderIdSchema.optional()
|
|
21534
|
+
});
|
|
21535
|
+
var ConfigFieldBridge = custom();
|
|
21536
|
+
var PipelineAddonSchemaSchema = object({
|
|
21537
|
+
id: string(),
|
|
21538
|
+
name: string(),
|
|
21539
|
+
slot: PipelineSlotSchema,
|
|
21540
|
+
inputClasses: array(string()).readonly(),
|
|
21541
|
+
outputClasses: array(string()).readonly(),
|
|
21542
|
+
childSlots: array(PipelineSlotSchema).readonly(),
|
|
21543
|
+
models: array(PipelineModelOptionSchema).readonly(),
|
|
21544
|
+
defaultModelId: string(),
|
|
21545
|
+
defaultModelIdByFormat: record(string(), string()).optional(),
|
|
21546
|
+
enabledByDefault: boolean().optional(),
|
|
21547
|
+
backfillIntoExistingOverrides: boolean().optional(),
|
|
21548
|
+
defaultConfidence: number(),
|
|
21549
|
+
group: string().optional(),
|
|
21550
|
+
configSchema: array(ConfigFieldBridge).readonly().optional()
|
|
21551
|
+
});
|
|
21552
|
+
var PipelineSlotSchemaSchema = object({
|
|
21553
|
+
id: PipelineSlotSchema,
|
|
21554
|
+
label: string(),
|
|
21555
|
+
priority: number(),
|
|
21556
|
+
parentSlot: PipelineSlotSchema.nullable(),
|
|
21557
|
+
addons: array(PipelineAddonSchemaSchema).readonly()
|
|
21558
|
+
});
|
|
21559
|
+
var PipelineSchemaSchema = object({
|
|
21560
|
+
availableEngines: array(AvailableEngineSchema).readonly(),
|
|
21561
|
+
selectedEngine: PipelineEngineChoiceSchema,
|
|
21562
|
+
slots: array(PipelineSlotSchemaSchema).readonly()
|
|
21563
|
+
});
|
|
21564
|
+
var EngineProvisioningSchema = object({
|
|
21565
|
+
runtimeId: _enum([
|
|
21566
|
+
"onnx",
|
|
21567
|
+
"openvino",
|
|
21568
|
+
"coreml",
|
|
21569
|
+
"edgetpu"
|
|
21570
|
+
]).nullable(),
|
|
21571
|
+
device: string().nullable(),
|
|
21572
|
+
state: _enum([
|
|
21573
|
+
"idle",
|
|
21574
|
+
"installing",
|
|
21575
|
+
"verifying",
|
|
21576
|
+
"ready",
|
|
21577
|
+
"failed"
|
|
21578
|
+
]),
|
|
21579
|
+
progress: number().optional(),
|
|
21580
|
+
error: string().optional(),
|
|
21581
|
+
nextRetryAt: number().optional(),
|
|
21582
|
+
/**
|
|
21583
|
+
* Gate A (config-correctness gate at engine change): human-readable
|
|
21584
|
+
* config issues surfaced EAGERLY when the node's engine changes — model
|
|
21585
|
+
* substitutions ("chose X, running Y") and zero-build steps ("no model
|
|
21586
|
+
* has a <format> build"). Additive/optional: informational only, never
|
|
21587
|
+
* enforced here — `assertEngineReady` (readiness) still gates inference.
|
|
21588
|
+
* Absent/empty when the node-default tree resolves cleanly.
|
|
21589
|
+
*/
|
|
21590
|
+
configIssues: array(string()).optional()
|
|
21591
|
+
});
|
|
21592
|
+
var PipelineStepInputSchema = lazy(() => object({
|
|
21593
|
+
addonId: string(),
|
|
21594
|
+
modelId: string().optional(),
|
|
21595
|
+
enabled: boolean().default(true),
|
|
21596
|
+
children: array(PipelineStepInputSchema).optional(),
|
|
21597
|
+
settings: record(string(), unknown()).optional(),
|
|
21598
|
+
jumpDeviceKey: string().optional()
|
|
21599
|
+
}));
|
|
21600
|
+
var ModelSubstitutionSchema = object({
|
|
21601
|
+
addonId: string(),
|
|
21602
|
+
chosen: string(),
|
|
21603
|
+
running: string(),
|
|
21604
|
+
format: string()
|
|
21605
|
+
});
|
|
21606
|
+
var PipelineValidationIssueSchema = object({
|
|
21607
|
+
addonId: string(),
|
|
21608
|
+
kind: _enum([
|
|
21609
|
+
"unknown-addon",
|
|
21610
|
+
"no-format-build",
|
|
21611
|
+
"unknown-device"
|
|
21612
|
+
]),
|
|
21613
|
+
detail: string()
|
|
21614
|
+
});
|
|
21615
|
+
var PipelineValidationResultSchema = object({
|
|
21616
|
+
ok: boolean(),
|
|
21617
|
+
issues: array(PipelineValidationIssueSchema).readonly(),
|
|
21618
|
+
substitutions: array(ModelSubstitutionSchema).readonly(),
|
|
21619
|
+
/** The node's `currentEngine.format` this validation ran against. */
|
|
21620
|
+
format: string()
|
|
21621
|
+
});
|
|
21622
|
+
var ReferenceImageEntrySchema = object({
|
|
21623
|
+
filename: string(),
|
|
21624
|
+
stepIds: array(string()).readonly().optional()
|
|
21625
|
+
});
|
|
21626
|
+
var ReferenceImageBodySchema = object({
|
|
21627
|
+
base64: string(),
|
|
21628
|
+
filename: string()
|
|
21629
|
+
});
|
|
21630
|
+
var ReferenceAudioEntrySchema = object({
|
|
21631
|
+
filename: string(),
|
|
21632
|
+
sizeKb: number()
|
|
21633
|
+
});
|
|
21634
|
+
var ReferenceAudioBodySchema = object({ base64: string() });
|
|
21635
|
+
var AudioBackendSchema = object({
|
|
21636
|
+
id: string(),
|
|
21637
|
+
name: string(),
|
|
21638
|
+
description: string(),
|
|
21639
|
+
available: boolean(),
|
|
21640
|
+
/**
|
|
21641
|
+
* Raw classifier labels this backend can emit (e.g. YAMNet's
|
|
21642
|
+
* 521-class set or Apple SoundAnalysis's 303-class set). Used by
|
|
21643
|
+
* the benchmark UI to populate the `enabledMicroClasses` filter
|
|
21644
|
+
* specific to the selected backend without a separate fetch.
|
|
21645
|
+
*/
|
|
21646
|
+
rawLabels: array(string()).readonly().optional()
|
|
21647
|
+
});
|
|
21648
|
+
var AudioCapabilitiesSchema = object({
|
|
21649
|
+
activeBackend: string(),
|
|
21650
|
+
availableBackends: array(AudioBackendSchema).readonly(),
|
|
21651
|
+
sampleRate: number(),
|
|
21652
|
+
chunkDurationMs: number()
|
|
21653
|
+
});
|
|
21654
|
+
var DownloadModelResultSchema = object({
|
|
21655
|
+
filePath: string(),
|
|
21656
|
+
sizeMB: number(),
|
|
21657
|
+
durationMs: number()
|
|
21658
|
+
});
|
|
21659
|
+
/**
|
|
21660
|
+
* Wrapper carrying a single test run's result. Replaces the legacy
|
|
21661
|
+
* ad-hoc `{labels: [{className, originalClass, score}]}` shape with the
|
|
21662
|
+
* canonical `AudioResult` from the Phase 6 output rework: one
|
|
21663
|
+
* `AudioDetection` per class above `minScore`, top-N candidates in
|
|
21664
|
+
* `debug.alternateLabels['audio-classifier']`, per-source timings in
|
|
21665
|
+
* `debug.stepTimings`. The outer `success`/`error` fields stay so the
|
|
21666
|
+
* benchmark UI can still report a clean failure when the classifier
|
|
21667
|
+
* cap isn't available.
|
|
21668
|
+
*/
|
|
21669
|
+
var AudioTestResultSchema = object({
|
|
21670
|
+
success: boolean(),
|
|
21671
|
+
error: string().optional(),
|
|
21672
|
+
frame: custom().optional()
|
|
21673
|
+
});
|
|
21674
|
+
var PipelineConfigBridge = custom();
|
|
21675
|
+
var ConfigUISchemaBridge = custom();
|
|
21676
|
+
var ConfigUISchemaNullableBridge = custom();
|
|
21677
|
+
var InferenceCapabilitiesBridge = custom();
|
|
21678
|
+
var ModelAvailabilityListBridge = custom();
|
|
21679
|
+
var PipelineRunResultBridge = custom();
|
|
21680
|
+
method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
|
|
21681
|
+
modelId: string(),
|
|
21682
|
+
settings: record(string(), unknown()).readonly()
|
|
21683
|
+
}))), method(object({ steps: record(string(), object({
|
|
21684
|
+
modelId: string(),
|
|
21685
|
+
settings: record(string(), unknown()).readonly()
|
|
21686
|
+
})) }), object({ success: literal(true) }), {
|
|
21687
|
+
kind: "mutation",
|
|
21688
|
+
auth: "admin"
|
|
21689
|
+
}), method(object({ nodeId: string() }), object({
|
|
21690
|
+
success: literal(true),
|
|
21691
|
+
clearedDevices: number()
|
|
21692
|
+
}), {
|
|
21693
|
+
kind: "mutation",
|
|
21694
|
+
auth: "admin"
|
|
21695
|
+
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
21696
|
+
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
21697
|
+
deviceKey: string(),
|
|
21698
|
+
/**
|
|
21699
|
+
* `failed` — the per-device restart budget is exhausted; no pool
|
|
21700
|
+
* will be spawned until an operator re-arms it or the runner
|
|
21701
|
+
* respawns. `backoff` — under budget, waiting out the backoff (or
|
|
21702
|
+
* a cached pool observed dead and not yet condemned).
|
|
21703
|
+
*/
|
|
21704
|
+
state: _enum(["failed", "backoff"]),
|
|
21705
|
+
/** Epoch ms of the death that produced this state. */
|
|
21706
|
+
since: number(),
|
|
21707
|
+
/** Pool deaths inside the current window. */
|
|
21708
|
+
deaths: number(),
|
|
21709
|
+
/** The last death's message. */
|
|
21710
|
+
lastError: string()
|
|
21711
|
+
})).readonly() })), method(object({
|
|
21712
|
+
nodeId: string(),
|
|
21713
|
+
deviceKey: string()
|
|
21714
|
+
}), object({ rearmed: boolean() }), {
|
|
21715
|
+
kind: "mutation",
|
|
21716
|
+
auth: "admin"
|
|
21717
|
+
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
21718
|
+
steps: array(PipelineStepInputSchema),
|
|
21719
|
+
deviceKey: string().optional()
|
|
21720
|
+
}), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
|
|
21721
|
+
name: string(),
|
|
21722
|
+
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
21723
|
+
engine: PipelineEngineChoiceSchema
|
|
21724
|
+
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
21725
|
+
id: string(),
|
|
21726
|
+
name: string().optional(),
|
|
21727
|
+
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
21728
|
+
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
21729
|
+
addonId: string(),
|
|
21730
|
+
modelId: string(),
|
|
21731
|
+
format: ModelFormatSchema$1
|
|
21732
|
+
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
21733
|
+
addonId: string(),
|
|
21734
|
+
modelId: string(),
|
|
21735
|
+
format: ModelFormatSchema$1
|
|
21736
|
+
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
21737
|
+
steps: array(PipelineStepInputSchema).min(1),
|
|
21738
|
+
frame: FrameInputSchema.optional(),
|
|
21739
|
+
/**
|
|
21740
|
+
* Process-local lazy frame. Valid only when caller and provider resolve
|
|
21741
|
+
* in the same execution-group process; split/cross-node callers use
|
|
21742
|
+
* `frame`/`image` inline compatibility instead.
|
|
21743
|
+
*/
|
|
21744
|
+
frameRef: FrameRefSchema.optional(),
|
|
21745
|
+
/**
|
|
21746
|
+
* CB5 shm passthrough — a `FrameHandle` naming the same ring slot
|
|
21747
|
+
* the decoded pixels live in. One more member of the one-of
|
|
21748
|
+
* frame/frameHandle/image/imageBase64/referenceImage group.
|
|
21749
|
+
*/
|
|
21750
|
+
frameHandle: FrameHandleSchema.optional(),
|
|
21751
|
+
imageBase64: string().optional(),
|
|
21752
|
+
/**
|
|
21753
|
+
* Binary JPEG bytes — preferred over `imageBase64` on internal
|
|
21754
|
+
* hops (hub → forked worker via Moleculer MsgPack) because it
|
|
21755
|
+
* skips the 33% base64 overhead + the per-call base64 decode on
|
|
21756
|
+
* the detection-pipeline worker. Callers can pass either; exactly
|
|
21757
|
+
* one of `frame`/`image`/`imageBase64`/`referenceImage` is required.
|
|
21758
|
+
*/
|
|
21759
|
+
image: _instanceof(Uint8Array).optional(),
|
|
21760
|
+
referenceImage: string().optional(),
|
|
21761
|
+
deviceId: number().optional(),
|
|
21762
|
+
sessionId: string().optional(),
|
|
21763
|
+
/**
|
|
21764
|
+
* Execution plane. 'full' (default) runs the whole tree — benchmark,
|
|
21765
|
+
* reference-image, and detail-subtree calls. 'frame' is the live
|
|
21766
|
+
* per-frame dispatch: ONLY root-plane steps run; crop children
|
|
21767
|
+
* (inputClasses ≠ null) are skipped and served per-track via
|
|
21768
|
+
* pipelineRunner.runDetailSubtree (two-plane design).
|
|
21769
|
+
*/
|
|
21770
|
+
plane: _enum(["full", "frame"]).optional(),
|
|
21771
|
+
/**
|
|
21772
|
+
* Inference-device selector (Phase 2 multi-device). Format
|
|
21773
|
+
* `<backend>:<device>` (e.g. `openvino:gpu`, `edgetpu:usb`, `cpu`).
|
|
21774
|
+
* Omitted ⇒ the runner's default device (current single-engine
|
|
21775
|
+
* behaviour). Selects WHICH device pool of the node runs the call.
|
|
21776
|
+
*/
|
|
21777
|
+
deviceKey: string().optional(),
|
|
21778
|
+
/**
|
|
21779
|
+
* Two-plane NATIVE child-crop reference. Set by `runDetailSubtree` ONLY
|
|
21780
|
+
* when the parent crop was resolved from the frame's retained NATIVE
|
|
21781
|
+
* surface (a frameHandle HIT). Lets the executor re-cut a LEAF crop
|
|
21782
|
+
* child's ROI (plate-ocr, face-embedding, leaf classifiers) at native
|
|
21783
|
+
* resolution from that surface — the SAME quality path faces already
|
|
21784
|
+
* had — instead of the downscaled parent tile. `handle` keys the native
|
|
21785
|
+
* surface (node-pinned to its owner); `cropFrameSpace` is the parent
|
|
21786
|
+
* crop's padded/clamped rectangle in FRAME-space pixels, used to compose
|
|
21787
|
+
* the executor's crop-normalized child ROI back into frame-normalized
|
|
21788
|
+
* coordinates. Auxiliary to the image source (`image`/`frame`/…), NOT one
|
|
21789
|
+
* of the mutually-exclusive image inputs. Absent ⇒ tile-crop children
|
|
21790
|
+
* (today's behaviour on the fallback path).
|
|
21791
|
+
*/
|
|
21792
|
+
nativeCropRef: NativeCropRefSchema.optional(),
|
|
21793
|
+
/**
|
|
21794
|
+
* Offline REPLAY of stored media for `deviceId` (D56, D646): the
|
|
21795
|
+
* camera's zone gate and overrides apply as live, every executing
|
|
21796
|
+
* step runs EXACTLY the model it names on the `deviceKey` pool it
|
|
21797
|
+
* names or the call refuses (`model-not-servable` /
|
|
21798
|
+
* `device-not-servable`), and nothing reaches the camera's live
|
|
21799
|
+
* trace stream. Absent ⇒ unchanged behaviour.
|
|
21800
|
+
*/
|
|
21801
|
+
replay: literal(true).optional()
|
|
21802
|
+
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
21803
|
+
steps: array(PipelineStepInputSchema).min(1),
|
|
21804
|
+
frames: array(FrameInputSchema).min(1).max(255),
|
|
21805
|
+
deviceId: number().optional(),
|
|
21806
|
+
sessionId: string().optional(),
|
|
21807
|
+
/**
|
|
21808
|
+
* Pure-inference benchmark hint. A NONZERO uint32 pins every frame in
|
|
21809
|
+
* the batch to the Python pool's bench preprocess cache
|
|
21810
|
+
* (`_bench_frame_id`) so a REPEATED benchmark frame is decoded +
|
|
21811
|
+
* preprocessed ONCE and every later inference is a pure-inference cache
|
|
21812
|
+
* hit — the sustained-throughput run measures inference, not
|
|
21813
|
+
* decode+preprocess+infer. Omitted/0 for live frames (all different →
|
|
21814
|
+
* full preprocess every call, correct). Fresh per sustained run;
|
|
21815
|
+
* released via `uncacheFrame`.
|
|
21816
|
+
*/
|
|
21817
|
+
frameId: number().int().nonnegative().optional(),
|
|
21818
|
+
/** Inference-device selector (Phase 2 multi-device); see runPipeline. */
|
|
21819
|
+
deviceKey: string().optional()
|
|
21820
|
+
}), object({ results: array(PipelineRunResultBridge).readonly() }), { kind: "mutation" }), method(object({
|
|
21821
|
+
data: _instanceof(Uint8Array),
|
|
21822
|
+
width: number().int().positive(),
|
|
21823
|
+
height: number().int().positive(),
|
|
21824
|
+
format: _enum([
|
|
21825
|
+
"rgb",
|
|
21826
|
+
"bgr",
|
|
21827
|
+
"gray"
|
|
21828
|
+
])
|
|
21829
|
+
}), object({
|
|
21830
|
+
frameId: number(),
|
|
21831
|
+
width: number(),
|
|
21832
|
+
height: number()
|
|
21833
|
+
}), { kind: "mutation" }), method(object({
|
|
21834
|
+
stepId: string(),
|
|
21835
|
+
frameId: number().int()
|
|
21836
|
+
}), record(string(), unknown()), { kind: "mutation" }), method(object({ frameId: number().int() }), _void(), { kind: "mutation" }), method(object({ deviceKey: string().optional() }), EffectiveTuningSchema), method(_void(), array(object({
|
|
21837
|
+
engineKey: string(),
|
|
21838
|
+
engine: PipelineEngineChoiceSchema,
|
|
21839
|
+
modelsLoaded: array(string()).readonly(),
|
|
21840
|
+
inUseByCameras: array(number()).readonly(),
|
|
21841
|
+
/**
|
|
21842
|
+
* Origin of this resident factory.
|
|
21843
|
+
* - `runtime` — main camera-serving engine (no idle TTL).
|
|
21844
|
+
* - `device-pool` — a concurrent per-device pool (Phase 2
|
|
21845
|
+
* multi-device, keyed by `deviceKey`) resolved
|
|
21846
|
+
* via `resolveDeviceFactory`. Runs alongside the
|
|
21847
|
+
* `runtime` engine on a DIFFERENT accelerator
|
|
21848
|
+
* (NPU / iGPU / Coral) — this is how the
|
|
21849
|
+
* Engines tab shows all pools running at once.
|
|
21850
|
+
*/
|
|
21851
|
+
kind: _enum(["runtime", "device-pool"]),
|
|
21852
|
+
/** Native pid of the underlying Python pool (null when no pool). */
|
|
21853
|
+
poolPid: number().nullable(),
|
|
21854
|
+
/** ms since this factory was last used (null when not warm-tracked). */
|
|
21855
|
+
idleMs: number().nullable(),
|
|
21856
|
+
/** Idle TTL after which the factory self-evicts (null when not applicable). */
|
|
21857
|
+
idleTtlMs: number().nullable()
|
|
21858
|
+
})).readonly()), method(object({ engine: PipelineEngineChoiceSchema }), object({ success: literal(true) }), {
|
|
21859
|
+
kind: "mutation",
|
|
21860
|
+
auth: "admin"
|
|
21861
|
+
}), method(object({
|
|
21862
|
+
engine: PipelineEngineChoiceSchema,
|
|
21863
|
+
force: boolean().optional()
|
|
21864
|
+
}), object({
|
|
21865
|
+
success: boolean(),
|
|
21866
|
+
reason: string().optional()
|
|
21867
|
+
}), {
|
|
21868
|
+
kind: "mutation",
|
|
21869
|
+
auth: "admin"
|
|
21870
|
+
}), method(_void(), array(ReferenceImageEntrySchema).readonly()), method(object({ filename: string() }), ReferenceImageBodySchema.nullable()), method(_void(), array(ReferenceAudioEntrySchema).readonly()), method(object({ filename: string() }), ReferenceAudioBodySchema.nullable()), method(_void(), AudioCapabilitiesSchema), method(object({
|
|
21871
|
+
addonId: string(),
|
|
21872
|
+
modelId: string(),
|
|
21873
|
+
filename: string().optional(),
|
|
21874
|
+
settings: record(string(), unknown()).optional()
|
|
21875
|
+
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
21570
21876
|
object({
|
|
21571
21877
|
activeCameras: number(),
|
|
21572
21878
|
throttledCameras: number(),
|
|
@@ -21592,6 +21898,66 @@ var CameraMetricsSchema = object({
|
|
|
21592
21898
|
});
|
|
21593
21899
|
var CameraMetricsWithDeviceIdSchema = CameraMetricsSchema.extend({ deviceId: number() });
|
|
21594
21900
|
/**
|
|
21901
|
+
* Zone — pure geometry + identity. NO filtering behaviour.
|
|
21902
|
+
*
|
|
21903
|
+
* Zones describe **where** in the frame the operator wants to flag
|
|
21904
|
+
* something; consumer-owned {@link ZoneRule} arrays describe **how**
|
|
21905
|
+
* each pipeline stage uses them. Splitting the two means a single
|
|
21906
|
+
* polygon "Driveway" can simultaneously back a motion-exclude rule,
|
|
21907
|
+
* a detection-include rule on `['car']`, and an occupancy aggregate
|
|
21908
|
+
* — without three duplicated polygons.
|
|
21909
|
+
*
|
|
21910
|
+
* Owned by the orchestrator addon (provider) and mirrored into the
|
|
21911
|
+
* `zones` device-state slice on every mutation. Consumers
|
|
21912
|
+
* (motion-wasm, pipeline-executor, analytics, admin UI) read either
|
|
21913
|
+
* via `api.zones.listZones` (one-shot) or via `dev.state.zones` (live
|
|
21914
|
+
* mirror with `onChanged`).
|
|
21915
|
+
*
|
|
21916
|
+
* Coordinates are normalised fractions of the frame (0–1) so zones
|
|
21917
|
+
* survive resolution changes and stream profile switches.
|
|
21918
|
+
*
|
|
21919
|
+
* `kind` discriminates between full polygons (closed regions used
|
|
21920
|
+
* for intrusion / occupancy filters) and tripwires (open 2-point
|
|
21921
|
+
* line segments used for cross events). Onboard / firmware-reported
|
|
21922
|
+
* zones (Reolink, ONVIF) are out of scope for now — see the deferred
|
|
21923
|
+
* task list.
|
|
21924
|
+
*/
|
|
21925
|
+
var ZoneKindEnum = _enum(["polygon", "tripwire"]);
|
|
21926
|
+
/** Polygon vertex in fraction-of-frame coordinates (0–1). */
|
|
21927
|
+
var PolygonPointSchema = object({
|
|
21928
|
+
x: number(),
|
|
21929
|
+
y: number()
|
|
21930
|
+
});
|
|
21931
|
+
/** A camera detection zone — pure geometry/identity. */
|
|
21932
|
+
var ZoneSchema = object({
|
|
21933
|
+
id: string(),
|
|
21934
|
+
name: string(),
|
|
21935
|
+
kind: ZoneKindEnum.default("polygon"),
|
|
21936
|
+
/** Polygon vertices, fraction of frame (0–1). */
|
|
21937
|
+
polygon: array(PolygonPointSchema).readonly(),
|
|
21938
|
+
/** Visual color for UI rendering. */
|
|
21939
|
+
color: string().default("#3b82f6")
|
|
21940
|
+
});
|
|
21941
|
+
DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).readonly()), method(object({
|
|
21942
|
+
deviceId: number(),
|
|
21943
|
+
zone: ZoneSchema
|
|
21944
|
+
}), _void(), {
|
|
21945
|
+
kind: "mutation",
|
|
21946
|
+
auth: "admin"
|
|
21947
|
+
}), method(object({
|
|
21948
|
+
deviceId: number(),
|
|
21949
|
+
zoneId: string()
|
|
21950
|
+
}), _void(), {
|
|
21951
|
+
kind: "mutation",
|
|
21952
|
+
auth: "admin"
|
|
21953
|
+
}), method(object({
|
|
21954
|
+
deviceId: number(),
|
|
21955
|
+
zone: ZoneSchema
|
|
21956
|
+
}), _void(), {
|
|
21957
|
+
kind: "mutation",
|
|
21958
|
+
auth: "admin"
|
|
21959
|
+
}), object({ zones: array(ZoneSchema).readonly() });
|
|
21960
|
+
/**
|
|
21595
21961
|
* A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
|
|
21596
21962
|
* decode worker resolves it against the RETAINED native frame's real pixel dims,
|
|
21597
21963
|
* so the caller supplies only the detection-res bbox divided by the detection
|
|
@@ -22043,6 +22409,17 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22043
22409
|
hubHostnameOverride: string().optional()
|
|
22044
22410
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
22045
22411
|
/**
|
|
22412
|
+
* What ONE step runs with on ONE roster device for THIS camera (D650): the
|
|
22413
|
+
* device's per-(node,device) base with the camera's override for that device
|
|
22414
|
+
* on top — the same `override ?? base` merge the orchestrator applies to the
|
|
22415
|
+
* elected device (`applyDeviceProvisioning`). Absent `modelId` ⇒ the executor
|
|
22416
|
+
* resolves the device format's default, exactly as on the elected device.
|
|
22417
|
+
*/
|
|
22418
|
+
var RunnerJumpStepProvisioningSchema = object({
|
|
22419
|
+
modelId: string().optional(),
|
|
22420
|
+
settings: record(string(), unknown()).optional()
|
|
22421
|
+
});
|
|
22422
|
+
/**
|
|
22046
22423
|
* One ENABLED inference device on the runner's node, as the step-tree
|
|
22047
22424
|
* device-jump resolver sees it (phase 1). The orchestrator populates this
|
|
22048
22425
|
* roster on the attach payload whenever the camera is elected onto a specific
|
|
@@ -22054,7 +22431,16 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
22054
22431
|
var RunnerInferenceDeviceSchema = object({
|
|
22055
22432
|
deviceKey: string(),
|
|
22056
22433
|
weight: number().positive().default(1),
|
|
22057
|
-
maxSessions: number().int().positive().nullable().default(null)
|
|
22434
|
+
maxSessions: number().int().positive().nullable().default(null),
|
|
22435
|
+
/**
|
|
22436
|
+
* Per-step provisioning for this camera on THIS device (D650), keyed by step
|
|
22437
|
+
* id. A step the runner jumps here runs with these fields, never with the
|
|
22438
|
+
* elected device's: `modelId` / `settings` are REPLACED on the jumped subtree
|
|
22439
|
+
* (a step absent from the map runs with neither — the target format default).
|
|
22440
|
+
* Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
|
|
22441
|
+
* the elected device's provisioning, as before.
|
|
22442
|
+
*/
|
|
22443
|
+
steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
|
|
22058
22444
|
});
|
|
22059
22445
|
/**
|
|
22060
22446
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
@@ -22929,6 +23315,28 @@ var NodeInferenceDeviceSchema = object({
|
|
|
22929
23315
|
*/
|
|
22930
23316
|
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
22931
23317
|
});
|
|
23318
|
+
/**
|
|
23319
|
+
* The operator's model choice for one cluster-scoped step, answered by the
|
|
23320
|
+
* addon that OWNS the `clusterModel:*` settings (D651). Three answers, never
|
|
23321
|
+
* folded: a written choice, a key nobody wrote (the cluster runs the default
|
|
23322
|
+
* BY ABSENCE), or no answer. A caller that rewrites an index acts only on the
|
|
23323
|
+
* first two, read twice and agreeing.
|
|
23324
|
+
*/
|
|
23325
|
+
var ClusterModelChoiceSchema = discriminatedUnion("kind", [
|
|
23326
|
+
object({
|
|
23327
|
+
kind: literal("stored"),
|
|
23328
|
+
modelId: string()
|
|
23329
|
+
}),
|
|
23330
|
+
object({
|
|
23331
|
+
kind: literal("absent"),
|
|
23332
|
+
defaultModelId: string()
|
|
23333
|
+
}),
|
|
23334
|
+
object({
|
|
23335
|
+
kind: literal("unreadable"),
|
|
23336
|
+
reason: _enum(CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS),
|
|
23337
|
+
error: string().optional()
|
|
23338
|
+
})
|
|
23339
|
+
]);
|
|
22932
23340
|
var NodeInferenceDevicesSchema = object({
|
|
22933
23341
|
nodeId: string(),
|
|
22934
23342
|
/** False when the node's platform-probe was unreachable (no live device set). */
|
|
@@ -22956,10 +23364,17 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
22956
23364
|
}), object({ success: literal(true) }), {
|
|
22957
23365
|
kind: "mutation",
|
|
22958
23366
|
auth: "admin"
|
|
22959
|
-
}), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({
|
|
23367
|
+
}), method(object({ deviceId: number() }), object({ deviceKey: string().nullable() })), method(_void(), object({
|
|
23368
|
+
migrated: number(),
|
|
23369
|
+
skipped: array(object({
|
|
23370
|
+
deviceId: number(),
|
|
23371
|
+
targetNodeId: string(),
|
|
23372
|
+
reason: string()
|
|
23373
|
+
})).default([])
|
|
23374
|
+
}), {
|
|
22960
23375
|
kind: "mutation",
|
|
22961
23376
|
auth: "admin"
|
|
22962
|
-
}), 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({
|
|
23377
|
+
}), 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({
|
|
22963
23378
|
nodeId: string(),
|
|
22964
23379
|
capName: string(),
|
|
22965
23380
|
addonId: string()
|
|
@@ -25259,6 +25674,167 @@ DeviceType.Camera, method(object({
|
|
|
25259
25674
|
auth: "protected"
|
|
25260
25675
|
});
|
|
25261
25676
|
/**
|
|
25677
|
+
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
25678
|
+
* valutatore puro del suo FRONTE.
|
|
25679
|
+
*
|
|
25680
|
+
* Viveva dentro il builtin virtual-doorbell
|
|
25681
|
+
* (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
|
|
25682
|
+
* predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
|
|
25683
|
+
* `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
|
|
25684
|
+
* tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
|
|
25685
|
+
* fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
|
|
25686
|
+
* SPOSTA qui e il doorbell la ri-esporta.
|
|
25687
|
+
*
|
|
25688
|
+
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
25689
|
+
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
25690
|
+
* regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
|
|
25691
|
+
* booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
|
|
25692
|
+
*/
|
|
25693
|
+
/**
|
|
25694
|
+
* Known binary / switch source caps → the boolean slice field whose
|
|
25695
|
+
* false→true rise counts as ACTIVE. Every entry is "fire on active".
|
|
25696
|
+
* Sensors whose "active" reading is not a plain boolean (presence's string
|
|
25697
|
+
* state, connectivity's connected flag) are deliberately excluded — a
|
|
25698
|
+
* reconnect is not a doorbell press, and it is not a recording either.
|
|
25699
|
+
*/
|
|
25700
|
+
var SOURCE_CAP_ACTIVE_FIELD = {
|
|
25701
|
+
contact: "entryOpen",
|
|
25702
|
+
binary: "on",
|
|
25703
|
+
switch: "on",
|
|
25704
|
+
motion: "detected",
|
|
25705
|
+
flood: "flooded",
|
|
25706
|
+
gas: "detected",
|
|
25707
|
+
smoke: "detected",
|
|
25708
|
+
"carbon-monoxide": "detected",
|
|
25709
|
+
vibration: "detected",
|
|
25710
|
+
tamper: "tampered"
|
|
25711
|
+
};
|
|
25712
|
+
object({
|
|
25713
|
+
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
25714
|
+
lastPressedAt: number().nullable(),
|
|
25715
|
+
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
25716
|
+
pressCountSinceStart: number()
|
|
25717
|
+
});
|
|
25718
|
+
object({
|
|
25719
|
+
deviceId: number(),
|
|
25720
|
+
timestamp: number()
|
|
25721
|
+
});
|
|
25722
|
+
/**
|
|
25723
|
+
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
25724
|
+
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
25725
|
+
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
25726
|
+
*/
|
|
25727
|
+
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
25728
|
+
DeviceType.Camera;
|
|
25729
|
+
DeviceType.Button, DeviceType.Camera;
|
|
25730
|
+
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
25731
|
+
DeviceType.Camera, DeviceType.Camera;
|
|
25732
|
+
/** A slot's editable value, discriminated on `slot`. */
|
|
25733
|
+
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
25734
|
+
DeviceType.Camera;
|
|
25735
|
+
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
25736
|
+
state: literal("unreachable"),
|
|
25737
|
+
reason: string()
|
|
25738
|
+
})]);
|
|
25739
|
+
/** One provider of slots — the D554 source-listing row. */
|
|
25740
|
+
var ExtensionSourceSchema = object({
|
|
25741
|
+
/** The routing prefix of every `slotRef` this provider serves. */
|
|
25742
|
+
source: string(),
|
|
25743
|
+
label: string(),
|
|
25744
|
+
/** Stamped by the dispatcher from the registry (D557). */
|
|
25745
|
+
addonId: string().optional(),
|
|
25746
|
+
availability: ExtensionSourceAvailabilitySchema
|
|
25747
|
+
});
|
|
25748
|
+
/**
|
|
25749
|
+
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
25750
|
+
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
25751
|
+
* (slice 2's cross-owner graft source); `unavailable` — it exists but is not a
|
|
25752
|
+
* valid source now (a container, which is never a pick). A source in any of
|
|
25753
|
+
* these states is SHOWN, never silently dropped or re-pointed.
|
|
25754
|
+
*/
|
|
25755
|
+
var ExtensionSourceHealthSchema = _enum([
|
|
25756
|
+
"ok",
|
|
25757
|
+
"missing",
|
|
25758
|
+
"foreign",
|
|
25759
|
+
"unavailable"
|
|
25760
|
+
]);
|
|
25761
|
+
var ExtensionSlotSourceSchema = object({
|
|
25762
|
+
deviceId: number().int(),
|
|
25763
|
+
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
25764
|
+
name: string().nullable(),
|
|
25765
|
+
health: ExtensionSourceHealthSchema,
|
|
25766
|
+
detail: string().optional()
|
|
25767
|
+
});
|
|
25768
|
+
/**
|
|
25769
|
+
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
25770
|
+
* reported read-only, named, never written through this contract (D62). The
|
|
25771
|
+
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
25772
|
+
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
25773
|
+
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
25774
|
+
*/
|
|
25775
|
+
var ExtensionSlotActivationSchema = object({
|
|
25776
|
+
state: _enum([
|
|
25777
|
+
"active",
|
|
25778
|
+
"inactive",
|
|
25779
|
+
"unknown"
|
|
25780
|
+
]),
|
|
25781
|
+
authority: string(),
|
|
25782
|
+
detail: string().optional()
|
|
25783
|
+
});
|
|
25784
|
+
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
25785
|
+
state: literal("ok"),
|
|
25786
|
+
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
25787
|
+
slotRef: string(),
|
|
25788
|
+
slot: ExtensionSlotIdSchema,
|
|
25789
|
+
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
25790
|
+
authority: string(),
|
|
25791
|
+
/** graft: its switch. association: null — removing every source is "off". */
|
|
25792
|
+
enabled: boolean().nullable(),
|
|
25793
|
+
/** graft: the cap registered on the host. association: null. */
|
|
25794
|
+
projects: string().nullable(),
|
|
25795
|
+
activation: ExtensionSlotActivationSchema.nullable(),
|
|
25796
|
+
value: ExtensionSlotValueSchema,
|
|
25797
|
+
sources: array(ExtensionSlotSourceSchema)
|
|
25798
|
+
}), object({
|
|
25799
|
+
state: literal("unreachable"),
|
|
25800
|
+
addonId: string(),
|
|
25801
|
+
reason: string()
|
|
25802
|
+
})]);
|
|
25803
|
+
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
25804
|
+
deviceId: number().int(),
|
|
25805
|
+
name: string(),
|
|
25806
|
+
type: string(),
|
|
25807
|
+
location: string().nullable(),
|
|
25808
|
+
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
25809
|
+
parentName: string().nullable(),
|
|
25810
|
+
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
25811
|
+
suggested: boolean(),
|
|
25812
|
+
/** Why it is suggested ("same location"), null when it is not. */
|
|
25813
|
+
reason: string().nullable()
|
|
25814
|
+
})) });
|
|
25815
|
+
/**
|
|
25816
|
+
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
25817
|
+
* reloaded the host (or, for an accessory child, its parent) because the
|
|
25818
|
+
* write changed what the host REGISTERS (a graft switched on or off, slice 2).
|
|
25819
|
+
*/
|
|
25820
|
+
var ExtensionSetResultSchema = object({
|
|
25821
|
+
applied: literal(true),
|
|
25822
|
+
reload: _enum([
|
|
25823
|
+
"none",
|
|
25824
|
+
"host",
|
|
25825
|
+
"parent"
|
|
25826
|
+
])
|
|
25827
|
+
});
|
|
25828
|
+
var ExtensionSlotRefInputSchema = object({
|
|
25829
|
+
deviceId: number().int(),
|
|
25830
|
+
slotRef: string().min(1)
|
|
25831
|
+
});
|
|
25832
|
+
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
25833
|
+
method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
25834
|
+
kind: "mutation",
|
|
25835
|
+
auth: "admin"
|
|
25836
|
+
});
|
|
25837
|
+
/**
|
|
25262
25838
|
* Optional client-side hints sent at session creation to help the provider
|
|
25263
25839
|
* pick the best native source. All fields optional — a viewer that knows
|
|
25264
25840
|
* nothing still gets a sane default. (Relocated from the retired `webrtc`
|
|
@@ -27047,17 +27623,6 @@ object({
|
|
|
27047
27623
|
deviceId: number(),
|
|
27048
27624
|
status: DeviceStatusSchema
|
|
27049
27625
|
});
|
|
27050
|
-
object({
|
|
27051
|
-
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
27052
|
-
lastPressedAt: number().nullable(),
|
|
27053
|
-
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
27054
|
-
pressCountSinceStart: number()
|
|
27055
|
-
});
|
|
27056
|
-
object({
|
|
27057
|
-
deviceId: number(),
|
|
27058
|
-
timestamp: number()
|
|
27059
|
-
});
|
|
27060
|
-
DeviceType.Button, DeviceType.Camera;
|
|
27061
27626
|
/**
|
|
27062
27627
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
27063
27628
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -30113,7 +30678,7 @@ var HardwareInfoSchema = object({
|
|
|
30113
30678
|
coral: CoralInfoSchema.nullable().optional()
|
|
30114
30679
|
});
|
|
30115
30680
|
var PlatformScoreSchema = object({
|
|
30116
|
-
runtime:
|
|
30681
|
+
runtime: literal("python"),
|
|
30117
30682
|
backend: string(),
|
|
30118
30683
|
format: _enum([
|
|
30119
30684
|
"onnx",
|
|
@@ -30150,7 +30715,7 @@ var ModelRequirementSchema = object({
|
|
|
30150
30715
|
});
|
|
30151
30716
|
var ResolvedInferenceConfigSchema = object({
|
|
30152
30717
|
modelId: string(),
|
|
30153
|
-
runtime:
|
|
30718
|
+
runtime: literal("python"),
|
|
30154
30719
|
backend: string(),
|
|
30155
30720
|
format: ModelFormatSchema,
|
|
30156
30721
|
reason: string()
|
|
@@ -32357,6 +32922,92 @@ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSche
|
|
|
32357
32922
|
kind: "mutation",
|
|
32358
32923
|
auth: "admin"
|
|
32359
32924
|
});
|
|
32925
|
+
/**
|
|
32926
|
+
* Per-stage gating mode applied to the zones a rule references.
|
|
32927
|
+
*
|
|
32928
|
+
* - `include`: the rule contributes to a **whitelist** for its stage.
|
|
32929
|
+
* When at least one `include` rule fires for a stage, only entities
|
|
32930
|
+
* inside one of those zones pass that stage.
|
|
32931
|
+
* - `exclude`: the rule contributes to a **blacklist** for its stage.
|
|
32932
|
+
* Entities inside one of those zones are dropped at that stage.
|
|
32933
|
+
*
|
|
32934
|
+
* `monitor`-style observation (count without filtering) is not a rule
|
|
32935
|
+
* mode — zones without any matching rule are observed naturally by
|
|
32936
|
+
* `zone-analytics` (live snapshot + history), so an "I just want to
|
|
32937
|
+
* count, not filter" use case needs no rule at all.
|
|
32938
|
+
*/
|
|
32939
|
+
var ZoneRuleModeEnum = _enum(["include", "exclude"]);
|
|
32940
|
+
/**
|
|
32941
|
+
* Per-consumer rule that references existing zones (geometry) and
|
|
32942
|
+
* defines how a specific pipeline stage should treat them. Each
|
|
32943
|
+
* consumer addon owns its own `ZoneRule[]` array in its per-device
|
|
32944
|
+
* settings:
|
|
32945
|
+
*
|
|
32946
|
+
* - `addon-motion-wasm` → `motionZoneRules: ZoneRule[]` (motion stage)
|
|
32947
|
+
* - `addon-detection-pipeline` → `detectionZoneRules: ZoneRule[]` (detection stage)
|
|
32948
|
+
* - future: notification rules, audio gating, etc.
|
|
32949
|
+
*
|
|
32950
|
+
* One rule applies to N zones (`zoneIds[]`) so the operator can
|
|
32951
|
+
* express "ignore motion in ALL of {garden, street}" with a single
|
|
32952
|
+
* rule. `classFilter` narrows the rule to specific object classes —
|
|
32953
|
+
* "drop person detections in the street, but keep cars" is one
|
|
32954
|
+
* `exclude` rule with `classFilter: ['person']`.
|
|
32955
|
+
*
|
|
32956
|
+
* `enabled` is a soft toggle — the operator can keep the rule
|
|
32957
|
+
* configured but inert without deleting it.
|
|
32958
|
+
*/
|
|
32959
|
+
var ZoneRuleSchema = object({
|
|
32960
|
+
/** Stable rule id — survives edits, used by the UI for diffing. */
|
|
32961
|
+
id: string(),
|
|
32962
|
+
/** Optional human-readable label rendered in the rule editor. */
|
|
32963
|
+
name: string().optional(),
|
|
32964
|
+
/** Zones this rule targets. The rule's `mode` applies to ALL
|
|
32965
|
+
* listed zones (OR-set: a detection in any one of them counts).
|
|
32966
|
+
* At least one zone id required — a rule with no targets is a
|
|
32967
|
+
* configuration mistake and the form validator rejects it. */
|
|
32968
|
+
zoneIds: array(string()).min(1).readonly(),
|
|
32969
|
+
mode: ZoneRuleModeEnum,
|
|
32970
|
+
/**
|
|
32971
|
+
* Class names this rule applies to. Empty / undefined ⇒ rule
|
|
32972
|
+
* applies to every class. Class strings match the `macroClass`
|
|
32973
|
+
* field on detections (e.g. `person`, `car`, `dog`).
|
|
32974
|
+
*/
|
|
32975
|
+
classFilter: array(string()).readonly().optional(),
|
|
32976
|
+
/**
|
|
32977
|
+
* Minimum bbox/mask overlap (0–1) with any of the rule's zones
|
|
32978
|
+
* required to consider an entity "in the zone". Defaults to the
|
|
32979
|
+
* consumer's stage default when omitted. Kept for back-compat with
|
|
32980
|
+
* existing per-rule overrides; new operators pick the value via
|
|
32981
|
+
* `bboxInclusionPct` (operator-friendly 0–100). Whichever field is
|
|
32982
|
+
* set, the lower-level engine reads it as a 0–1 fraction.
|
|
32983
|
+
*/
|
|
32984
|
+
overlapThreshold: number().min(0).max(1).optional(),
|
|
32985
|
+
/**
|
|
32986
|
+
* Operator-friendly version of `overlapThreshold` — the percentage
|
|
32987
|
+
* of the detection's bbox that must lie inside the zone for the
|
|
32988
|
+
* rule to match. Documented default is 85%; the engine substitutes
|
|
32989
|
+
* that when the field is omitted (kept optional so existing rules
|
|
32990
|
+
* stored without it stay valid).
|
|
32991
|
+
*
|
|
32992
|
+
* When BOTH `overlapThreshold` and `bboxInclusionPct` are set on a
|
|
32993
|
+
* rule, the engine prefers `bboxInclusionPct` because it's the
|
|
32994
|
+
* field exposed in the UI. Internally both feed the same gate.
|
|
32995
|
+
*/
|
|
32996
|
+
bboxInclusionPct: number().min(0).max(100).optional(),
|
|
32997
|
+
/**
|
|
32998
|
+
* When `true` and a detection has a segmentation mask, use the
|
|
32999
|
+
* mask for overlap instead of the bbox. Detection-stage only;
|
|
33000
|
+
* motion rules ignore this field.
|
|
33001
|
+
*/
|
|
33002
|
+
preferMask: boolean().optional(),
|
|
33003
|
+
/**
|
|
33004
|
+
* Soft-toggle: `false` disables the rule without deleting it.
|
|
33005
|
+
* Defaults to `true` so operators creating a rule via the UI
|
|
33006
|
+
* see it active immediately.
|
|
33007
|
+
*/
|
|
33008
|
+
enabled: boolean().default(true)
|
|
33009
|
+
});
|
|
33010
|
+
array(ZoneRuleSchema).readonly();
|
|
32360
33011
|
object({
|
|
32361
33012
|
/** Whether the script is currently executing. */
|
|
32362
33013
|
isRunning: boolean(),
|
|
@@ -33738,42 +34389,6 @@ DeviceType.Camera, method(object({
|
|
|
33738
34389
|
package: array(ZoneRuleSchema).readonly()
|
|
33739
34390
|
});
|
|
33740
34391
|
/**
|
|
33741
|
-
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
33742
|
-
* valutatore puro del suo FRONTE.
|
|
33743
|
-
*
|
|
33744
|
-
* Viveva dentro il builtin virtual-doorbell
|
|
33745
|
-
* (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
|
|
33746
|
-
* predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
|
|
33747
|
-
* `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
|
|
33748
|
-
* tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
|
|
33749
|
-
* fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
|
|
33750
|
-
* SPOSTA qui e il doorbell la ri-esporta.
|
|
33751
|
-
*
|
|
33752
|
-
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
33753
|
-
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
33754
|
-
* regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
|
|
33755
|
-
* booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
|
|
33756
|
-
*/
|
|
33757
|
-
/**
|
|
33758
|
-
* Known binary / switch source caps → the boolean slice field whose
|
|
33759
|
-
* false→true rise counts as ACTIVE. Every entry is "fire on active".
|
|
33760
|
-
* Sensors whose "active" reading is not a plain boolean (presence's string
|
|
33761
|
-
* state, connectivity's connected flag) are deliberately excluded — a
|
|
33762
|
-
* reconnect is not a doorbell press, and it is not a recording either.
|
|
33763
|
-
*/
|
|
33764
|
-
var SOURCE_CAP_ACTIVE_FIELD = {
|
|
33765
|
-
contact: "entryOpen",
|
|
33766
|
-
binary: "on",
|
|
33767
|
-
switch: "on",
|
|
33768
|
-
motion: "detected",
|
|
33769
|
-
flood: "flooded",
|
|
33770
|
-
gas: "detected",
|
|
33771
|
-
smoke: "detected",
|
|
33772
|
-
"carbon-monoxide": "detected",
|
|
33773
|
-
vibration: "detected",
|
|
33774
|
-
tamper: "tampered"
|
|
33775
|
-
};
|
|
33776
|
-
/**
|
|
33777
34392
|
* Accessory device helpers — shared across drivers.
|
|
33778
34393
|
*
|
|
33779
34394
|
* Many vendor-specific drivers register accessory child devices on
|
|
@@ -36573,6 +37188,30 @@ Object.freeze({
|
|
|
36573
37188
|
addonId: null,
|
|
36574
37189
|
access: "create"
|
|
36575
37190
|
},
|
|
37191
|
+
"deviceExtension.listCandidates": {
|
|
37192
|
+
capName: "device-extension",
|
|
37193
|
+
capScope: "device",
|
|
37194
|
+
addonId: null,
|
|
37195
|
+
access: "view"
|
|
37196
|
+
},
|
|
37197
|
+
"deviceExtension.listSlots": {
|
|
37198
|
+
capName: "device-extension",
|
|
37199
|
+
capScope: "device",
|
|
37200
|
+
addonId: null,
|
|
37201
|
+
access: "view"
|
|
37202
|
+
},
|
|
37203
|
+
"deviceExtension.listSources": {
|
|
37204
|
+
capName: "device-extension",
|
|
37205
|
+
capScope: "device",
|
|
37206
|
+
addonId: null,
|
|
37207
|
+
access: "view"
|
|
37208
|
+
},
|
|
37209
|
+
"deviceExtension.setSlot": {
|
|
37210
|
+
capName: "device-extension",
|
|
37211
|
+
capScope: "device",
|
|
37212
|
+
addonId: null,
|
|
37213
|
+
access: "create"
|
|
37214
|
+
},
|
|
36576
37215
|
"deviceManager.addLocation": {
|
|
36577
37216
|
capName: "device-manager",
|
|
36578
37217
|
capScope: "system",
|
|
@@ -37323,6 +37962,12 @@ Object.freeze({
|
|
|
37323
37962
|
addonId: null,
|
|
37324
37963
|
access: "view"
|
|
37325
37964
|
},
|
|
37965
|
+
"embeddingEncoder.resetFailedModels": {
|
|
37966
|
+
capName: "embedding-encoder",
|
|
37967
|
+
capScope: "system",
|
|
37968
|
+
addonId: null,
|
|
37969
|
+
access: "delete"
|
|
37970
|
+
},
|
|
37326
37971
|
"enumSensor.getStatus": {
|
|
37327
37972
|
capName: "enum-sensor",
|
|
37328
37973
|
capScope: "device",
|
|
@@ -38709,6 +39354,12 @@ Object.freeze({
|
|
|
38709
39354
|
addonId: null,
|
|
38710
39355
|
access: "view"
|
|
38711
39356
|
},
|
|
39357
|
+
"notificationRules.previewStateSummary": {
|
|
39358
|
+
capName: "notification-rules",
|
|
39359
|
+
capScope: "system",
|
|
39360
|
+
addonId: null,
|
|
39361
|
+
access: "view"
|
|
39362
|
+
},
|
|
38712
39363
|
"notificationRules.previewTemplate": {
|
|
38713
39364
|
capName: "notification-rules",
|
|
38714
39365
|
capScope: "system",
|
|
@@ -39285,12 +39936,6 @@ Object.freeze({
|
|
|
39285
39936
|
addonId: null,
|
|
39286
39937
|
access: "create"
|
|
39287
39938
|
},
|
|
39288
|
-
"pipelineAnalytics.runReplayFrameProcessor": {
|
|
39289
|
-
capName: "pipeline-analytics",
|
|
39290
|
-
capScope: "device",
|
|
39291
|
-
addonId: null,
|
|
39292
|
-
access: "create"
|
|
39293
|
-
},
|
|
39294
39939
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
39295
39940
|
capName: "pipeline-analytics",
|
|
39296
39941
|
capScope: "device",
|
|
@@ -39657,6 +40302,12 @@ Object.freeze({
|
|
|
39657
40302
|
addonId: null,
|
|
39658
40303
|
access: "view"
|
|
39659
40304
|
},
|
|
40305
|
+
"pipelineOrchestrator.getClusterModelChoice": {
|
|
40306
|
+
capName: "pipeline-orchestrator",
|
|
40307
|
+
capScope: "system",
|
|
40308
|
+
addonId: null,
|
|
40309
|
+
access: "view"
|
|
40310
|
+
},
|
|
39660
40311
|
"pipelineOrchestrator.getDeviceLiveContribution": {
|
|
39661
40312
|
capName: "pipeline-orchestrator",
|
|
39662
40313
|
capScope: "system",
|
|
@@ -42482,6 +43133,26 @@ Object.freeze({
|
|
|
42482
43133
|
form: "single",
|
|
42483
43134
|
optional: false
|
|
42484
43135
|
}],
|
|
43136
|
+
"deviceExtension.listCandidates": [{
|
|
43137
|
+
name: "deviceId",
|
|
43138
|
+
form: "single",
|
|
43139
|
+
optional: false
|
|
43140
|
+
}],
|
|
43141
|
+
"deviceExtension.listSlots": [{
|
|
43142
|
+
name: "deviceId",
|
|
43143
|
+
form: "single",
|
|
43144
|
+
optional: false
|
|
43145
|
+
}],
|
|
43146
|
+
"deviceExtension.listSources": [{
|
|
43147
|
+
name: "deviceId",
|
|
43148
|
+
form: "single",
|
|
43149
|
+
optional: false
|
|
43150
|
+
}],
|
|
43151
|
+
"deviceExtension.setSlot": [{
|
|
43152
|
+
name: "deviceId",
|
|
43153
|
+
form: "single",
|
|
43154
|
+
optional: false
|
|
43155
|
+
}],
|
|
42485
43156
|
"deviceManager.adoptionRelease": [{
|
|
42486
43157
|
name: "camDeviceId",
|
|
42487
43158
|
form: "single",
|
|
@@ -43388,11 +44059,6 @@ Object.freeze({
|
|
|
43388
44059
|
form: "single",
|
|
43389
44060
|
optional: false
|
|
43390
44061
|
}],
|
|
43391
|
-
"pipelineAnalytics.runReplayFrameProcessor": [{
|
|
43392
|
-
name: "deviceId",
|
|
43393
|
-
form: "single",
|
|
43394
|
-
optional: false
|
|
43395
|
-
}],
|
|
43396
44062
|
"pipelineAnalytics.saveRetrainAnnotations": [{
|
|
43397
44063
|
name: "deviceId",
|
|
43398
44064
|
form: "single",
|
|
@@ -44372,6 +45038,98 @@ new Map(Object.entries({
|
|
|
44372
45038
|
"camera-enabled": null
|
|
44373
45039
|
}));
|
|
44374
45040
|
[...NC_SYSTEM_EVENT_FILTER_KEYS];
|
|
45041
|
+
var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
45042
|
+
{
|
|
45043
|
+
id: "device-state",
|
|
45044
|
+
family: "device-events",
|
|
45045
|
+
label: "Device state",
|
|
45046
|
+
kinds: [
|
|
45047
|
+
"device-offline",
|
|
45048
|
+
"device-online",
|
|
45049
|
+
"device-disabled",
|
|
45050
|
+
"device-enabled"
|
|
45051
|
+
]
|
|
45052
|
+
},
|
|
45053
|
+
{
|
|
45054
|
+
id: "streams",
|
|
45055
|
+
family: "device-events",
|
|
45056
|
+
label: "Streams",
|
|
45057
|
+
kinds: ["stream-offline", "stream-online"]
|
|
45058
|
+
},
|
|
45059
|
+
{
|
|
45060
|
+
id: "battery",
|
|
45061
|
+
family: "device-events",
|
|
45062
|
+
label: "Battery",
|
|
45063
|
+
kinds: ["device-battery-low", "device-battery-normal"]
|
|
45064
|
+
},
|
|
45065
|
+
{
|
|
45066
|
+
id: "consumables",
|
|
45067
|
+
family: "device-events",
|
|
45068
|
+
label: "Consumables",
|
|
45069
|
+
kinds: ["device-consumable-low", "device-consumable-normal"]
|
|
45070
|
+
},
|
|
45071
|
+
{
|
|
45072
|
+
id: "tanks",
|
|
45073
|
+
family: "device-events",
|
|
45074
|
+
label: "Tanks",
|
|
45075
|
+
kinds: [
|
|
45076
|
+
"device-tank-low",
|
|
45077
|
+
"device-tank-full",
|
|
45078
|
+
"device-tank-normal"
|
|
45079
|
+
]
|
|
45080
|
+
},
|
|
45081
|
+
{
|
|
45082
|
+
id: "detection-blind",
|
|
45083
|
+
family: "device-events",
|
|
45084
|
+
label: "Detecting nothing",
|
|
45085
|
+
kinds: ["detection-blind"]
|
|
45086
|
+
},
|
|
45087
|
+
{
|
|
45088
|
+
id: "nodes",
|
|
45089
|
+
family: "system",
|
|
45090
|
+
label: "Nodes",
|
|
45091
|
+
kinds: [
|
|
45092
|
+
"node-offline",
|
|
45093
|
+
"node-online",
|
|
45094
|
+
"node-inference-unavailable"
|
|
45095
|
+
]
|
|
45096
|
+
},
|
|
45097
|
+
{
|
|
45098
|
+
id: "addons",
|
|
45099
|
+
family: "system",
|
|
45100
|
+
label: "Addons",
|
|
45101
|
+
kinds: [
|
|
45102
|
+
"addon-crash-loop",
|
|
45103
|
+
"addon-update-available",
|
|
45104
|
+
"addon-updated"
|
|
45105
|
+
]
|
|
45106
|
+
},
|
|
45107
|
+
{
|
|
45108
|
+
id: "updates",
|
|
45109
|
+
family: "system",
|
|
45110
|
+
label: "Server & container updates",
|
|
45111
|
+
kinds: [
|
|
45112
|
+
"server-update-available",
|
|
45113
|
+
"server-updated",
|
|
45114
|
+
"wrapper-update-available"
|
|
45115
|
+
]
|
|
45116
|
+
},
|
|
45117
|
+
{
|
|
45118
|
+
id: "backups-exports",
|
|
45119
|
+
family: "system",
|
|
45120
|
+
label: "Backups & exports",
|
|
45121
|
+
kinds: ["backup-completed", "export-completed"]
|
|
45122
|
+
},
|
|
45123
|
+
{
|
|
45124
|
+
id: "alarm",
|
|
45125
|
+
family: "alarm",
|
|
45126
|
+
label: "Alarm",
|
|
45127
|
+
kinds: NC_ALARM_SYSTEM_EVENT_KINDS
|
|
45128
|
+
}
|
|
45129
|
+
];
|
|
45130
|
+
function systemEventKindsOfFamily(family) {
|
|
45131
|
+
return NC_SYSTEM_EVENT_KIND_GROUP_SPECS.filter((g) => g.family === family).flatMap((g) => g.kinds);
|
|
45132
|
+
}
|
|
44375
45133
|
NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
|
|
44376
45134
|
/**
|
|
44377
45135
|
* WHICH WAY A BOOLEAN SENSOR MOVED — read off the one slice a sensor event
|
|
@@ -44446,7 +45204,183 @@ var DEVICE_EVENTS = [
|
|
|
44446
45204
|
"detection-blind",
|
|
44447
45205
|
...ALARM
|
|
44448
45206
|
];
|
|
44449
|
-
|
|
45207
|
+
/** Every kind a summary may speak about — the two summarisable families. */
|
|
45208
|
+
var SUMMARISABLE = [...systemEventKindsOfFamily("device-events"), ...systemEventKindsOfFamily("system")];
|
|
45209
|
+
/** One per summary SECTION (`NC_STATE_SUMMARY_SECTIONS` in the notification
|
|
45210
|
+
* centre): the section's lines, offered when one of its kinds is selected. */
|
|
45211
|
+
var STATE_SUMMARY_SECTION_VARS = [
|
|
45212
|
+
{
|
|
45213
|
+
name: "summaryDevices",
|
|
45214
|
+
label: "Summary: devices offline / switched off",
|
|
45215
|
+
example: "Garage — offline since 07:12",
|
|
45216
|
+
kinds: [
|
|
45217
|
+
"device-offline",
|
|
45218
|
+
"device-online",
|
|
45219
|
+
"device-disabled",
|
|
45220
|
+
"device-enabled"
|
|
45221
|
+
]
|
|
45222
|
+
},
|
|
45223
|
+
{
|
|
45224
|
+
name: "summaryStreams",
|
|
45225
|
+
label: "Summary: streams offline",
|
|
45226
|
+
example: "Ingresso (high) — since 06:40",
|
|
45227
|
+
kinds: ["stream-offline", "stream-online"]
|
|
45228
|
+
},
|
|
45229
|
+
{
|
|
45230
|
+
name: "summaryBattery",
|
|
45231
|
+
label: "Summary: low batteries",
|
|
45232
|
+
example: "Sensore porta — 8 %",
|
|
45233
|
+
kinds: BATTERY
|
|
45234
|
+
},
|
|
45235
|
+
{
|
|
45236
|
+
name: "summaryConsumables",
|
|
45237
|
+
label: "Summary: consumables",
|
|
45238
|
+
example: "Robot — filter 10 %",
|
|
45239
|
+
kinds: CONSUMABLE
|
|
45240
|
+
},
|
|
45241
|
+
{
|
|
45242
|
+
name: "summaryTanks",
|
|
45243
|
+
label: "Summary: tanks",
|
|
45244
|
+
example: "Robot — clean water low",
|
|
45245
|
+
kinds: TANK
|
|
45246
|
+
},
|
|
45247
|
+
{
|
|
45248
|
+
name: "summaryDetection",
|
|
45249
|
+
label: "Summary: cameras detecting nothing",
|
|
45250
|
+
example: "Ingresso — since 05:10",
|
|
45251
|
+
kinds: ["detection-blind"]
|
|
45252
|
+
},
|
|
45253
|
+
{
|
|
45254
|
+
name: "summaryNodes",
|
|
45255
|
+
label: "Summary: nodes",
|
|
45256
|
+
example: "little-unraid — offline since 03:00",
|
|
45257
|
+
kinds: [
|
|
45258
|
+
"node-offline",
|
|
45259
|
+
"node-online",
|
|
45260
|
+
"node-inference-unavailable"
|
|
45261
|
+
]
|
|
45262
|
+
},
|
|
45263
|
+
{
|
|
45264
|
+
name: "summaryAddons",
|
|
45265
|
+
label: "Summary: addons",
|
|
45266
|
+
example: "@camstack/addon-recorder 1.2.3 → 1.2.4",
|
|
45267
|
+
kinds: [
|
|
45268
|
+
"addon-crash-loop",
|
|
45269
|
+
"addon-update-available",
|
|
45270
|
+
"addon-updated"
|
|
45271
|
+
]
|
|
45272
|
+
},
|
|
45273
|
+
{
|
|
45274
|
+
name: "summaryUpdates",
|
|
45275
|
+
label: "Summary: server & container updates",
|
|
45276
|
+
example: "server 1.2.377 → 1.2.378",
|
|
45277
|
+
kinds: [
|
|
45278
|
+
"server-update-available",
|
|
45279
|
+
"server-updated",
|
|
45280
|
+
"wrapper-update-available"
|
|
45281
|
+
]
|
|
45282
|
+
}
|
|
45283
|
+
];
|
|
45284
|
+
var STATE_SUMMARY_VARS = [
|
|
45285
|
+
{
|
|
45286
|
+
name: "summaryText",
|
|
45287
|
+
label: "Summary: every section",
|
|
45288
|
+
description: "One block per section with something to report, one line per item.",
|
|
45289
|
+
example: "Batterie scariche: Sensore porta — 8 %",
|
|
45290
|
+
group: "system",
|
|
45291
|
+
families: ["rule"],
|
|
45292
|
+
fields: [...RULE_TEXT],
|
|
45293
|
+
kinds: ["system"],
|
|
45294
|
+
systemEventKinds: [...SUMMARISABLE],
|
|
45295
|
+
systemEventDeliveries: ["summary"]
|
|
45296
|
+
},
|
|
45297
|
+
{
|
|
45298
|
+
name: "summaryCount",
|
|
45299
|
+
label: "Summary: items reported",
|
|
45300
|
+
example: "3",
|
|
45301
|
+
group: "system",
|
|
45302
|
+
families: ["rule"],
|
|
45303
|
+
fields: [...RULE_TEXT],
|
|
45304
|
+
kinds: ["system"],
|
|
45305
|
+
systemEventKinds: [...SUMMARISABLE],
|
|
45306
|
+
systemEventDeliveries: ["summary"]
|
|
45307
|
+
},
|
|
45308
|
+
...STATE_SUMMARY_SECTION_VARS.map((v) => ({
|
|
45309
|
+
name: v.name,
|
|
45310
|
+
label: v.label,
|
|
45311
|
+
example: v.example,
|
|
45312
|
+
group: "system",
|
|
45313
|
+
families: ["rule"],
|
|
45314
|
+
fields: [...RULE_TEXT],
|
|
45315
|
+
kinds: ["system"],
|
|
45316
|
+
systemEventKinds: [...v.kinds],
|
|
45317
|
+
systemEventDeliveries: ["summary"]
|
|
45318
|
+
}))
|
|
45319
|
+
];
|
|
45320
|
+
[
|
|
45321
|
+
[...DEVICE_EVENTS],
|
|
45322
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
45323
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
45324
|
+
[...RULE_TEXT],
|
|
45325
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
45326
|
+
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
45327
|
+
[...RULE_TEXT],
|
|
45328
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
45329
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
45330
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
45331
|
+
[...RULE_TEXT],
|
|
45332
|
+
[...RULE_TEXT],
|
|
45333
|
+
[...RULE_TEXT],
|
|
45334
|
+
[...RULE_TEXT],
|
|
45335
|
+
[...RULE_TEXT],
|
|
45336
|
+
[...RULE_TEXT],
|
|
45337
|
+
[...RULE_TEXT],
|
|
45338
|
+
[...RULE_TEXT],
|
|
45339
|
+
[...RULE_BODY_ONLY],
|
|
45340
|
+
[...RULE_TEXT],
|
|
45341
|
+
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
45342
|
+
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
45343
|
+
([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
|
|
45344
|
+
([...RULE_TEXT], [...CONSUMABLE]),
|
|
45345
|
+
([...RULE_TEXT], [...TANK]),
|
|
45346
|
+
[...RULE_TEXT],
|
|
45347
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
45348
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
45349
|
+
[...RULE_TEXT],
|
|
45350
|
+
[...RULE_TEXT],
|
|
45351
|
+
[...RULE_TEXT],
|
|
45352
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
45353
|
+
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
45354
|
+
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
45355
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
45356
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
45357
|
+
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
45358
|
+
[...RULE_TEXT],
|
|
45359
|
+
[...RULE_TEXT],
|
|
45360
|
+
[...RULE_TEXT],
|
|
45361
|
+
[...RULE_TEXT],
|
|
45362
|
+
[...RULE_TEXT],
|
|
45363
|
+
[...RULE_TEXT],
|
|
45364
|
+
[...RULE_TEXT],
|
|
45365
|
+
[...RULE_TEXT],
|
|
45366
|
+
[...RULE_TEXT],
|
|
45367
|
+
[...RULE_TEXT],
|
|
45368
|
+
[...RULE_TEXT],
|
|
45369
|
+
[...RULE_TEXT],
|
|
45370
|
+
[...RULE_TEXT],
|
|
45371
|
+
[...RULE_TEXT],
|
|
45372
|
+
[...RULE_TEXT],
|
|
45373
|
+
[...RULE_TEXT],
|
|
45374
|
+
[...RULE_TEXT],
|
|
45375
|
+
[...RULE_TEXT],
|
|
45376
|
+
[...RULE_TEXT],
|
|
45377
|
+
[...RULE_TEXT],
|
|
45378
|
+
[...RULE_TEXT],
|
|
45379
|
+
[...RULE_TEXT],
|
|
45380
|
+
[...RULE_TEXT],
|
|
45381
|
+
[...RULE_TEXT],
|
|
45382
|
+
...STATE_SUMMARY_VARS
|
|
45383
|
+
];
|
|
44450
45384
|
/**
|
|
44451
45385
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
44452
45386
|
*
|
|
@@ -44678,68 +45612,6 @@ TimelapseRuleInputSchema.extend({
|
|
|
44678
45612
|
createdAt: number(),
|
|
44679
45613
|
updatedAt: number()
|
|
44680
45614
|
});
|
|
44681
|
-
Object.freeze(Object.fromEntries([{
|
|
44682
|
-
stepId: "face-embedding",
|
|
44683
|
-
label: "Face recognition model",
|
|
44684
|
-
defaultModelId: "arcface-r100",
|
|
44685
|
-
indexName: "the enrolled face gallery",
|
|
44686
|
-
options: [
|
|
44687
|
-
{
|
|
44688
|
-
id: "arcface-r100",
|
|
44689
|
-
label: "ArcFace (ResNet34)"
|
|
44690
|
-
},
|
|
44691
|
-
{
|
|
44692
|
-
id: "auraface-r100",
|
|
44693
|
-
label: "AuraFace R100"
|
|
44694
|
-
},
|
|
44695
|
-
{
|
|
44696
|
-
id: "inception-resnet-v1",
|
|
44697
|
-
label: "Inception ResNet V1"
|
|
44698
|
-
}
|
|
44699
|
-
]
|
|
44700
|
-
}, {
|
|
44701
|
-
stepId: "clip-embedding",
|
|
44702
|
-
label: "Semantic search model",
|
|
44703
|
-
defaultModelId: "mobileclip-s1",
|
|
44704
|
-
indexName: "the object semantic-search index",
|
|
44705
|
-
options: [{
|
|
44706
|
-
id: "mobileclip-s1",
|
|
44707
|
-
label: "MobileCLIP S1"
|
|
44708
|
-
}, {
|
|
44709
|
-
id: "mobileclip-s2",
|
|
44710
|
-
label: "MobileCLIP S2"
|
|
44711
|
-
}]
|
|
44712
|
-
}].map((s) => [s.stepId, s.defaultModelId])));
|
|
44713
|
-
string().min(1);
|
|
44714
|
-
var CLUSTER_STEP_SETTING_FIELDS = [{
|
|
44715
|
-
stepId: "face-embedding",
|
|
44716
|
-
key: "minLandmarkFaceSize",
|
|
44717
|
-
label: "Min face size for recognition (detection px)",
|
|
44718
|
-
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.",
|
|
44719
|
-
type: "slider",
|
|
44720
|
-
min: 0,
|
|
44721
|
-
max: 64,
|
|
44722
|
-
step: 2,
|
|
44723
|
-
default: 24
|
|
44724
|
-
}];
|
|
44725
|
-
function clusterStepSettingKey(stepId, fieldKey) {
|
|
44726
|
-
return `clusterStepSetting:${stepId}:${fieldKey}`;
|
|
44727
|
-
}
|
|
44728
|
-
var ClusterSettingNumberSchema = number().finite();
|
|
44729
|
-
function readClusterStepSettings(config) {
|
|
44730
|
-
const out = {};
|
|
44731
|
-
for (const field of CLUSTER_STEP_SETTING_FIELDS) {
|
|
44732
|
-
const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
|
|
44733
|
-
const value = parsed.success ? parsed.data : field.default;
|
|
44734
|
-
const existing = out[field.stepId] ?? {};
|
|
44735
|
-
out[field.stepId] = {
|
|
44736
|
-
...existing,
|
|
44737
|
-
[field.key]: value
|
|
44738
|
-
};
|
|
44739
|
-
}
|
|
44740
|
-
return out;
|
|
44741
|
-
}
|
|
44742
|
-
readClusterStepSettings({});
|
|
44743
45615
|
object({
|
|
44744
45616
|
/**
|
|
44745
45617
|
* Fraction of the box's own size added on EACH side before cutting.
|
|
@@ -44941,7 +45813,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
44941
45813
|
capability: adminUiCapability,
|
|
44942
45814
|
provider: {
|
|
44943
45815
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
44944
|
-
getVersion: async () => ({ version: "1.2.
|
|
45816
|
+
getVersion: async () => ({ version: "1.2.273" })
|
|
44945
45817
|
}
|
|
44946
45818
|
}];
|
|
44947
45819
|
}
|