@camstack/addon-model-studio 1.1.45 → 1.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MotionZonesSettings-BA2jeOR6.mjs → MotionZonesSettings-1fJtqNCr.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-Bf1hFhGN.mjs → PrivacyMaskSettings-Cn6l1jIS.mjs} +4 -4
- package/dist/{SceneMonitorEditor-DcKcwKsJ.mjs → SceneMonitorEditor-CHV4hmwM.mjs} +3 -3
- package/dist/_stub.js +337 -336
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-B-ZMvrf0.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CIlpdOAc.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BEjMiwxz.mjs +26 -0
- package/dist/{hostInit-BZM9cD30.mjs → hostInit-K9hUMwrn.mjs} +3 -3
- package/dist/model-studio.addon.js +577 -59
- package/dist/model-studio.addon.mjs +577 -59
- package/dist/{player-overlays-CUJ2regU.mjs → player-overlays-DH4UacFT.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-pq6YOPGN.mjs → responsive-BApg0Jh0.mjs} +1 -1
- package/dist/{square-BFrlalUj.mjs → square-C2yNIs-0.mjs} +1 -1
- package/dist/{trash-2-KCXgMJqK.mjs → trash-2-CWMg_KtS.mjs} +1 -1
- package/dist/{use-device-snapshot-C9mtUHIM.mjs → use-device-snapshot-BT0s7YBQ.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DlP1RQa1.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Dm6izmNn.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C3sZIjJ6.mjs +0 -26
|
@@ -8188,6 +8188,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
8188
8188
|
/** Max rows returned, newest-first. */
|
|
8189
8189
|
limit: number().int().min(1).max(1e3).optional()
|
|
8190
8190
|
});
|
|
8191
|
+
var LabelDefinitionSchema = object({
|
|
8192
|
+
id: string(),
|
|
8193
|
+
name: string(),
|
|
8194
|
+
category: string().optional(),
|
|
8195
|
+
description: string().optional(),
|
|
8196
|
+
icon: string().optional()
|
|
8197
|
+
});
|
|
8198
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
8199
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
8200
|
+
"person",
|
|
8201
|
+
"vehicle",
|
|
8202
|
+
"animal",
|
|
8203
|
+
"package"
|
|
8204
|
+
];
|
|
8205
|
+
/**
|
|
8206
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
8207
|
+
* un operatore può selezionare.
|
|
8208
|
+
*
|
|
8209
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
8210
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
8211
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
8212
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
8213
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
8214
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
8215
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
8216
|
+
*
|
|
8217
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
8218
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
8219
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
8220
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
8221
|
+
* successiva.
|
|
8222
|
+
*/
|
|
8223
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
8224
|
+
"person",
|
|
8225
|
+
"vehicle",
|
|
8226
|
+
"animal"
|
|
8227
|
+
];
|
|
8228
|
+
/**
|
|
8229
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
8230
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8231
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8232
|
+
* detection pipeline executor actually routes.
|
|
8233
|
+
*
|
|
8234
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8235
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8236
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8237
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8238
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8239
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8240
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8241
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8242
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8243
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8244
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8245
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8246
|
+
*/
|
|
8247
|
+
var DetectionCatalogClassMapSchema = object({
|
|
8248
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
8249
|
+
preserveOriginal: boolean()
|
|
8250
|
+
});
|
|
8191
8251
|
/**
|
|
8192
8252
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
8193
8253
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -8210,10 +8270,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
8210
8270
|
"events",
|
|
8211
8271
|
"continuous"
|
|
8212
8272
|
]);
|
|
8273
|
+
/**
|
|
8274
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
8275
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
8276
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
8277
|
+
*/
|
|
8278
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
8279
|
+
/**
|
|
8280
|
+
* True quando `values` non ripete un elemento.
|
|
8281
|
+
*
|
|
8282
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
8283
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
8284
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
8285
|
+
*/
|
|
8286
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
8213
8287
|
/** Which detectors trigger an `events`-mode band. */
|
|
8214
8288
|
var RecordingTriggersSchema = object({
|
|
8215
8289
|
motion: boolean().optional(),
|
|
8216
|
-
audioThresholdDbfs: number().optional()
|
|
8290
|
+
audioThresholdDbfs: number().optional(),
|
|
8291
|
+
/**
|
|
8292
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
8293
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
8294
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
8295
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
8296
|
+
*
|
|
8297
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
8298
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
8299
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
8300
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
8301
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
8302
|
+
*/
|
|
8303
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
8304
|
+
/**
|
|
8305
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
8306
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
8307
|
+
* `objectClasses`.
|
|
8308
|
+
*
|
|
8309
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
8310
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
8311
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
8312
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
8313
|
+
* device (D12) — mai un elenco globale di cap.
|
|
8314
|
+
*
|
|
8315
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
8316
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
8317
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
8318
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8319
|
+
* registrare.
|
|
8320
|
+
*/
|
|
8321
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8217
8322
|
});
|
|
8218
8323
|
/**
|
|
8219
8324
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8665,41 +8770,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8665
8770
|
*/
|
|
8666
8771
|
debug: boolean().optional()
|
|
8667
8772
|
});
|
|
8668
|
-
var LabelDefinitionSchema = object({
|
|
8669
|
-
id: string(),
|
|
8670
|
-
name: string(),
|
|
8671
|
-
category: string().optional(),
|
|
8672
|
-
description: string().optional(),
|
|
8673
|
-
icon: string().optional()
|
|
8674
|
-
});
|
|
8675
|
-
/**
|
|
8676
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8677
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8678
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8679
|
-
* detection pipeline executor actually routes.
|
|
8680
|
-
*
|
|
8681
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8682
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8683
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8684
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8685
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8686
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8687
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8688
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8689
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8690
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8691
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8692
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8693
|
-
*/
|
|
8694
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8695
|
-
mapping: record(string(), _enum([
|
|
8696
|
-
"person",
|
|
8697
|
-
"vehicle",
|
|
8698
|
-
"animal",
|
|
8699
|
-
"package"
|
|
8700
|
-
])),
|
|
8701
|
-
preserveOriginal: boolean()
|
|
8702
|
-
});
|
|
8703
8773
|
var MODEL_FORMATS = [
|
|
8704
8774
|
"onnx",
|
|
8705
8775
|
"coreml",
|
|
@@ -21535,7 +21605,7 @@ var lifecycleJobSchema = object({
|
|
|
21535
21605
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21536
21606
|
* as every other cap.
|
|
21537
21607
|
*/
|
|
21538
|
-
var LogLevelSchema$
|
|
21608
|
+
var LogLevelSchema$2 = _enum([
|
|
21539
21609
|
"debug",
|
|
21540
21610
|
"info",
|
|
21541
21611
|
"warn",
|
|
@@ -21742,7 +21812,7 @@ var CustomActionInputSchema = object({
|
|
|
21742
21812
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21743
21813
|
addonId: string(),
|
|
21744
21814
|
limit: number().min(1).max(500).default(100),
|
|
21745
|
-
level: LogLevelSchema$
|
|
21815
|
+
level: LogLevelSchema$2.optional()
|
|
21746
21816
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21747
21817
|
packageName: string(),
|
|
21748
21818
|
version: string().optional()
|
|
@@ -21840,7 +21910,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21840
21910
|
auth: "admin"
|
|
21841
21911
|
}), method(object({
|
|
21842
21912
|
addonId: string(),
|
|
21843
|
-
level: LogLevelSchema$
|
|
21913
|
+
level: LogLevelSchema$2.optional()
|
|
21844
21914
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21845
21915
|
object({
|
|
21846
21916
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22834,6 +22904,35 @@ var FaceFilterEnum = _enum([
|
|
|
22834
22904
|
"identified",
|
|
22835
22905
|
"all"
|
|
22836
22906
|
]);
|
|
22907
|
+
/**
|
|
22908
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22909
|
+
*
|
|
22910
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22911
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22912
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22913
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22914
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
22915
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
22916
|
+
*
|
|
22917
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
22918
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
22919
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
22920
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
22921
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
22922
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
22923
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
22924
|
+
* backend's NULL-collation accident.
|
|
22925
|
+
*/
|
|
22926
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
22927
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
22928
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
22929
|
+
* never leaves the server. */
|
|
22930
|
+
var FaceClusterSchema = object({
|
|
22931
|
+
faceIds: array(string()).readonly(),
|
|
22932
|
+
representativeFaceId: string(),
|
|
22933
|
+
size: number().int(),
|
|
22934
|
+
cohesion: number()
|
|
22935
|
+
});
|
|
22837
22936
|
var MediaFileLiteSchema$1 = object({
|
|
22838
22937
|
key: string(),
|
|
22839
22938
|
kind: string(),
|
|
@@ -22880,24 +22979,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22880
22979
|
kind: "mutation",
|
|
22881
22980
|
auth: "admin"
|
|
22882
22981
|
}), method(object({
|
|
22883
|
-
/**
|
|
22982
|
+
/**
|
|
22983
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
22984
|
+
*
|
|
22985
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
22986
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
22987
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
22988
|
+
* present, and this field is then ignored rather than unioned, so
|
|
22989
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
22990
|
+
*/
|
|
22884
22991
|
deviceId: number().int().optional(),
|
|
22992
|
+
/**
|
|
22993
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
22994
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
22995
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
22996
|
+
* about to discard).
|
|
22997
|
+
*
|
|
22998
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
22999
|
+
* "every camera". A request for no devices is a request, not an
|
|
23000
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
23001
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
23002
|
+
*
|
|
23003
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
23004
|
+
*/
|
|
23005
|
+
deviceIds: array(number().int()).optional(),
|
|
22885
23006
|
limit: number().int().positive().optional(),
|
|
22886
23007
|
filter: FaceFilterEnum.optional(),
|
|
22887
23008
|
/**
|
|
22888
|
-
*
|
|
22889
|
-
*
|
|
23009
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23010
|
+
* Absent means no lower bound.
|
|
23011
|
+
*/
|
|
23012
|
+
since: number().int().optional(),
|
|
23013
|
+
/**
|
|
23014
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23015
|
+
* Absent means no upper bound.
|
|
23016
|
+
*/
|
|
23017
|
+
until: number().int().optional(),
|
|
23018
|
+
/**
|
|
23019
|
+
* Order the page by time or by suggestion certainty. Default
|
|
23020
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
23021
|
+
* that does not ask.
|
|
22890
23022
|
*
|
|
22891
|
-
*
|
|
22892
|
-
*
|
|
22893
|
-
* the browser cache the images.
|
|
23023
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
23024
|
+
* does under `'suggestionConfidence'`.
|
|
22894
23025
|
*
|
|
22895
|
-
*
|
|
22896
|
-
*
|
|
22897
|
-
*
|
|
22898
|
-
*
|
|
22899
|
-
*
|
|
22900
|
-
|
|
23026
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
23027
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
23028
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
23029
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
23030
|
+
* with {@link since} / {@link until}.
|
|
23031
|
+
*/
|
|
23032
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
23033
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
23034
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
23035
|
+
/**
|
|
23036
|
+
* Inline the base64 crop on every row.
|
|
23037
|
+
*
|
|
23038
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
23039
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
23040
|
+
* this for every gallery, and which records why the inline shape had
|
|
23041
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
23042
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
23043
|
+
* that describes the old design reads as permission to rely on it.
|
|
23044
|
+
*
|
|
23045
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
23046
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
23047
|
+
* cached and ETagged.
|
|
22901
23048
|
*/
|
|
22902
23049
|
includeCrops: boolean().optional()
|
|
22903
23050
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -22933,13 +23080,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22933
23080
|
}), method(object({
|
|
22934
23081
|
threshold: number().min(0).max(1).optional(),
|
|
22935
23082
|
minClusterSize: number().int().min(2).optional(),
|
|
22936
|
-
|
|
22937
|
-
|
|
22938
|
-
|
|
22939
|
-
|
|
22940
|
-
|
|
22941
|
-
|
|
22942
|
-
|
|
23083
|
+
/**
|
|
23084
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
23085
|
+
* which read as though it bounded the work — it never did.
|
|
23086
|
+
*
|
|
23087
|
+
* Wins over {@link limit} when both are sent.
|
|
23088
|
+
*/
|
|
23089
|
+
maxClusters: number().int().positive().optional(),
|
|
23090
|
+
/**
|
|
23091
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
23092
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
23093
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
23094
|
+
*/
|
|
23095
|
+
limit: number().int().positive().optional(),
|
|
23096
|
+
/**
|
|
23097
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
23098
|
+
* POOL, not the result.
|
|
23099
|
+
*
|
|
23100
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
23101
|
+
* used to read every unassigned face on the hub no matter what the
|
|
23102
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
23103
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
23104
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
23105
|
+
*
|
|
23106
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
23107
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
23108
|
+
* sample it randomly.
|
|
23109
|
+
*
|
|
23110
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
23111
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
23112
|
+
* unbounded scan can never come back as the table grows.
|
|
23113
|
+
*/
|
|
23114
|
+
maxFacesScanned: number().int().positive().optional()
|
|
23115
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
22943
23116
|
/**
|
|
22944
23117
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
22945
23118
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26662,6 +26835,293 @@ var SetSiteLocationInputSchema = object({
|
|
|
26662
26835
|
latitude: number().min(-90).max(90),
|
|
26663
26836
|
longitude: number().min(-180).max(180)
|
|
26664
26837
|
}).nullable();
|
|
26838
|
+
/**
|
|
26839
|
+
* The TRANSPORT a call arrived on.
|
|
26840
|
+
*
|
|
26841
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
26842
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
26843
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
26844
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
26845
|
+
* checkable rather than asserted.
|
|
26846
|
+
*
|
|
26847
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
26848
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
26849
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
26850
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
26851
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
26852
|
+
* never touches a socket and therefore never touched a census.
|
|
26853
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
26854
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
26855
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
26856
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
26857
|
+
*/
|
|
26858
|
+
var TransportPlaneSchema = _enum([
|
|
26859
|
+
"http",
|
|
26860
|
+
"ws",
|
|
26861
|
+
"mesh",
|
|
26862
|
+
"unknown"
|
|
26863
|
+
]);
|
|
26864
|
+
/**
|
|
26865
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
26866
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
26867
|
+
* make an operator wonder about.
|
|
26868
|
+
*/
|
|
26869
|
+
var TransportPlaneCountsSchema = object({
|
|
26870
|
+
http: number(),
|
|
26871
|
+
ws: number(),
|
|
26872
|
+
mesh: number(),
|
|
26873
|
+
unknown: number()
|
|
26874
|
+
});
|
|
26875
|
+
/**
|
|
26876
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
26877
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26878
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26879
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26880
|
+
*
|
|
26881
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
26882
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
26883
|
+
* stream look like a storm.
|
|
26884
|
+
*/
|
|
26885
|
+
var RequestCensusGroupSchema = object({
|
|
26886
|
+
plane: TransportPlaneSchema,
|
|
26887
|
+
procedure: string(),
|
|
26888
|
+
userAgent: string(),
|
|
26889
|
+
ip: string(),
|
|
26890
|
+
principal: string(),
|
|
26891
|
+
calls: number(),
|
|
26892
|
+
subscriptions: number(),
|
|
26893
|
+
perMin: number()
|
|
26894
|
+
});
|
|
26895
|
+
/**
|
|
26896
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26897
|
+
*
|
|
26898
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26899
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26900
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26901
|
+
*/
|
|
26902
|
+
var RequestCensusProcedureSchema = object({
|
|
26903
|
+
procedure: string(),
|
|
26904
|
+
calls: number(),
|
|
26905
|
+
/**
|
|
26906
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
26907
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
26908
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
26909
|
+
*/
|
|
26910
|
+
planes: TransportPlaneCountsSchema,
|
|
26911
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
26912
|
+
subscriptions: number(),
|
|
26913
|
+
perMin: number()
|
|
26914
|
+
});
|
|
26915
|
+
/**
|
|
26916
|
+
* The census as an operator sees it.
|
|
26917
|
+
*
|
|
26918
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26919
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26920
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26921
|
+
* like one that succeeded.
|
|
26922
|
+
*/
|
|
26923
|
+
var RequestCensusStatusSchema = object({
|
|
26924
|
+
armed: boolean(),
|
|
26925
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26926
|
+
elapsedMs: number(),
|
|
26927
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26928
|
+
windowMs: number(),
|
|
26929
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26930
|
+
armedUntilMs: number(),
|
|
26931
|
+
httpRequests: number(),
|
|
26932
|
+
batchedRequests: number(),
|
|
26933
|
+
/**
|
|
26934
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
26935
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
26936
|
+
* the number comparable with a store-side call count.
|
|
26937
|
+
*/
|
|
26938
|
+
procedureCalls: number(),
|
|
26939
|
+
/**
|
|
26940
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
26941
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
26942
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
26943
|
+
*/
|
|
26944
|
+
planes: TransportPlaneCountsSchema,
|
|
26945
|
+
/**
|
|
26946
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
26947
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
26948
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
26949
|
+
*/
|
|
26950
|
+
planesExplainTotal: boolean(),
|
|
26951
|
+
/**
|
|
26952
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26953
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
26954
|
+
* count of zero against 37 open connections says something different from a
|
|
26955
|
+
* plane with no connections at all.
|
|
26956
|
+
*/
|
|
26957
|
+
wsConnections: number(),
|
|
26958
|
+
/**
|
|
26959
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
26960
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
26961
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
26962
|
+
*/
|
|
26963
|
+
wsMessages: number(),
|
|
26964
|
+
/**
|
|
26965
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
26966
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
26967
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
26968
|
+
* masquerade as the storm.
|
|
26969
|
+
*/
|
|
26970
|
+
subscriptions: number(),
|
|
26971
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
26972
|
+
subscriptionStops: number(),
|
|
26973
|
+
distinctGroups: number(),
|
|
26974
|
+
/**
|
|
26975
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
26976
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
26977
|
+
* which transport they arrived on, they just lost their group row.
|
|
26978
|
+
*/
|
|
26979
|
+
unattributedCalls: number(),
|
|
26980
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26981
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
26982
|
+
}).extend({ persisted: boolean() });
|
|
26983
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
26984
|
+
var LogLevelSchema$1 = _enum([
|
|
26985
|
+
"debug",
|
|
26986
|
+
"info",
|
|
26987
|
+
"warn",
|
|
26988
|
+
"error"
|
|
26989
|
+
]);
|
|
26990
|
+
/**
|
|
26991
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
26992
|
+
*
|
|
26993
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
26994
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
26995
|
+
*/
|
|
26996
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
26997
|
+
/**
|
|
26998
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
26999
|
+
* layer that carries an explicit value wins.
|
|
27000
|
+
*
|
|
27001
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
27002
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
27003
|
+
* grow later would force every consumer of this document to change with it.
|
|
27004
|
+
* Nothing returns `component` today.
|
|
27005
|
+
*/
|
|
27006
|
+
var LoggingScopeKindSchema = _enum([
|
|
27007
|
+
"cluster",
|
|
27008
|
+
"node",
|
|
27009
|
+
"component"
|
|
27010
|
+
]);
|
|
27011
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
27012
|
+
var LoggingLevelSourceSchema = _enum([
|
|
27013
|
+
"default",
|
|
27014
|
+
"cluster",
|
|
27015
|
+
"node",
|
|
27016
|
+
"component"
|
|
27017
|
+
]);
|
|
27018
|
+
/**
|
|
27019
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
27020
|
+
*
|
|
27021
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
27022
|
+
* difference between "this node is at `info` because I decided it" and
|
|
27023
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
27024
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
27025
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
27026
|
+
*/
|
|
27027
|
+
var LoggingLevelLayerSchema = object({
|
|
27028
|
+
scope: LoggingScopeKindSchema,
|
|
27029
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
27030
|
+
nodeId: string().nullable(),
|
|
27031
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
27032
|
+
level: LogLevelSchema$1.nullable()
|
|
27033
|
+
});
|
|
27034
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
27035
|
+
var LoggingEffectiveSchema = object({
|
|
27036
|
+
level: LogLevelSchema$1,
|
|
27037
|
+
levelSource: LoggingLevelSourceSchema
|
|
27038
|
+
});
|
|
27039
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
27040
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
27041
|
+
/**
|
|
27042
|
+
* An armed diagnostic, with its DEADLINE.
|
|
27043
|
+
*
|
|
27044
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
27045
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
27046
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
27047
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
27048
|
+
*/
|
|
27049
|
+
var DiagnosticWindowSchema = object({
|
|
27050
|
+
id: DiagnosticIdSchema,
|
|
27051
|
+
armed: boolean(),
|
|
27052
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
27053
|
+
armedUntilMs: number(),
|
|
27054
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
27055
|
+
remainingMs: number(),
|
|
27056
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
27057
|
+
* i.e. whether this window would survive a restart. */
|
|
27058
|
+
persisted: boolean()
|
|
27059
|
+
});
|
|
27060
|
+
/**
|
|
27061
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
27062
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
27063
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
27064
|
+
*/
|
|
27065
|
+
var DiagnosticWindowPatchSchema = object({
|
|
27066
|
+
id: DiagnosticIdSchema,
|
|
27067
|
+
armMs: number().int().min(0),
|
|
27068
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
27069
|
+
reportEveryMs: number().int().positive().optional()
|
|
27070
|
+
});
|
|
27071
|
+
/**
|
|
27072
|
+
* A PATCH, and patches MERGE.
|
|
27073
|
+
*
|
|
27074
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
27075
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
27076
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
27077
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
27078
|
+
* turns into an erased one.
|
|
27079
|
+
*/
|
|
27080
|
+
var LoggingSettingsPatchSchema = object({
|
|
27081
|
+
/**
|
|
27082
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
27083
|
+
* addressed scope so it inherits again. A value sets it.
|
|
27084
|
+
*/
|
|
27085
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
27086
|
+
/**
|
|
27087
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
27088
|
+
* keeps running — a patch is never a full replacement.
|
|
27089
|
+
*/
|
|
27090
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
27091
|
+
});
|
|
27092
|
+
/**
|
|
27093
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
27094
|
+
*
|
|
27095
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
27096
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
27097
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
27098
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
27099
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
27100
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
27101
|
+
* layer selector needs a name the transport does not already own.
|
|
27102
|
+
*/
|
|
27103
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
27104
|
+
var SetLoggingSettingsInputSchema = object({
|
|
27105
|
+
scopeNodeId: string().optional(),
|
|
27106
|
+
patch: LoggingSettingsPatchSchema
|
|
27107
|
+
});
|
|
27108
|
+
/**
|
|
27109
|
+
* The whole document, as read and as returned after every write.
|
|
27110
|
+
*
|
|
27111
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
27112
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
27113
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
27114
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
27115
|
+
* survive a restart.
|
|
27116
|
+
*/
|
|
27117
|
+
var LoggingSettingsStateSchema = object({
|
|
27118
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
27119
|
+
scopeNodeId: string().nullable(),
|
|
27120
|
+
effective: LoggingEffectiveSchema,
|
|
27121
|
+
explicit: LoggingExplicitSchema,
|
|
27122
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
27123
|
+
persisted: boolean()
|
|
27124
|
+
});
|
|
26665
27125
|
method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
|
|
26666
27126
|
kind: "mutation",
|
|
26667
27127
|
auth: "admin"
|
|
@@ -26674,6 +27134,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26674
27134
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26675
27135
|
kind: "mutation",
|
|
26676
27136
|
auth: "admin"
|
|
27137
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
27138
|
+
kind: "mutation",
|
|
27139
|
+
auth: "admin"
|
|
26677
27140
|
});
|
|
26678
27141
|
object({
|
|
26679
27142
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -32505,6 +32968,18 @@ Object.freeze({
|
|
|
32505
32968
|
addonId: null,
|
|
32506
32969
|
access: "create"
|
|
32507
32970
|
},
|
|
32971
|
+
"system.getLoggingSettings": {
|
|
32972
|
+
capName: "system",
|
|
32973
|
+
capScope: "system",
|
|
32974
|
+
addonId: null,
|
|
32975
|
+
access: "view"
|
|
32976
|
+
},
|
|
32977
|
+
"system.getRequestCensus": {
|
|
32978
|
+
capName: "system",
|
|
32979
|
+
capScope: "system",
|
|
32980
|
+
addonId: null,
|
|
32981
|
+
access: "view"
|
|
32982
|
+
},
|
|
32508
32983
|
"system.getRetentionConfig": {
|
|
32509
32984
|
capName: "system",
|
|
32510
32985
|
capScope: "system",
|
|
@@ -32535,6 +33010,12 @@ Object.freeze({
|
|
|
32535
33010
|
addonId: null,
|
|
32536
33011
|
access: "view"
|
|
32537
33012
|
},
|
|
33013
|
+
"system.setLoggingSettings": {
|
|
33014
|
+
capName: "system",
|
|
33015
|
+
capScope: "system",
|
|
33016
|
+
addonId: null,
|
|
33017
|
+
access: "create"
|
|
33018
|
+
},
|
|
32538
33019
|
"system.setRetentionConfig": {
|
|
32539
33020
|
capName: "system",
|
|
32540
33021
|
capScope: "system",
|
|
@@ -33690,6 +34171,10 @@ Object.freeze({
|
|
|
33690
34171
|
name: "deviceId",
|
|
33691
34172
|
form: "single",
|
|
33692
34173
|
optional: true
|
|
34174
|
+
}, {
|
|
34175
|
+
name: "deviceIds",
|
|
34176
|
+
form: "array",
|
|
34177
|
+
optional: true
|
|
33693
34178
|
}],
|
|
33694
34179
|
"fanControl.setDirection": [{
|
|
33695
34180
|
name: "deviceId",
|
|
@@ -35300,7 +35785,38 @@ object({
|
|
|
35300
35785
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
35301
35786
|
* reproduce that.
|
|
35302
35787
|
*/
|
|
35303
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
35788
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
35789
|
+
/**
|
|
35790
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35791
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35792
|
+
* subject tiles, on frames that detected something.
|
|
35793
|
+
*
|
|
35794
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35795
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35796
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35797
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35798
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35799
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35800
|
+
*
|
|
35801
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35802
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35803
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35804
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35805
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35806
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35807
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35808
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35809
|
+
* whole shape exists to avoid.
|
|
35810
|
+
*
|
|
35811
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35812
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35813
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35814
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35815
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35816
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35817
|
+
* nothing.
|
|
35818
|
+
*/
|
|
35819
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
35304
35820
|
});
|
|
35305
35821
|
/**
|
|
35306
35822
|
* The values in force when the operator has set nothing.
|
|
@@ -35316,12 +35832,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
35316
35832
|
budgetMb: 1024,
|
|
35317
35833
|
activityMs: 15e3,
|
|
35318
35834
|
tileBudgetMb: 64,
|
|
35835
|
+
sceneBudgetMb: 48,
|
|
35319
35836
|
admission: "inferred"
|
|
35320
35837
|
};
|
|
35321
35838
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
35322
35839
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
35323
35840
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
35324
35841
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35842
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
35325
35843
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
35326
35844
|
var MB = 1024 * 1024;
|
|
35327
35845
|
1024 * MB, 3072 * MB;
|