@camstack/addon-mqtt-broker 1.2.31 → 1.2.32
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/mqtt-broker.addon.js +495 -59
- package/dist/mqtt-broker.addon.mjs +495 -59
- package/package.json +1 -1
|
@@ -7555,6 +7555,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7555
7555
|
/** Max rows returned, newest-first. */
|
|
7556
7556
|
limit: number().int().min(1).max(1e3).optional()
|
|
7557
7557
|
});
|
|
7558
|
+
var LabelDefinitionSchema = object({
|
|
7559
|
+
id: string(),
|
|
7560
|
+
name: string(),
|
|
7561
|
+
category: string().optional(),
|
|
7562
|
+
description: string().optional(),
|
|
7563
|
+
icon: string().optional()
|
|
7564
|
+
});
|
|
7565
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7566
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7567
|
+
"person",
|
|
7568
|
+
"vehicle",
|
|
7569
|
+
"animal",
|
|
7570
|
+
"package"
|
|
7571
|
+
];
|
|
7572
|
+
/**
|
|
7573
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7574
|
+
* un operatore può selezionare.
|
|
7575
|
+
*
|
|
7576
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7577
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7578
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7579
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7580
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7581
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7582
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7583
|
+
*
|
|
7584
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7585
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7586
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7587
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7588
|
+
* successiva.
|
|
7589
|
+
*/
|
|
7590
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7591
|
+
"person",
|
|
7592
|
+
"vehicle",
|
|
7593
|
+
"animal"
|
|
7594
|
+
];
|
|
7595
|
+
/**
|
|
7596
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7597
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7598
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7599
|
+
* detection pipeline executor actually routes.
|
|
7600
|
+
*
|
|
7601
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7602
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7603
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7604
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7605
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7606
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7607
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7608
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7609
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7610
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7611
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7612
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7613
|
+
*/
|
|
7614
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7615
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7616
|
+
preserveOriginal: boolean()
|
|
7617
|
+
});
|
|
7558
7618
|
/**
|
|
7559
7619
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7560
7620
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7577,10 +7637,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7577
7637
|
"events",
|
|
7578
7638
|
"continuous"
|
|
7579
7639
|
]);
|
|
7640
|
+
/**
|
|
7641
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7642
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7643
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7644
|
+
*/
|
|
7645
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7646
|
+
/**
|
|
7647
|
+
* True quando `values` non ripete un elemento.
|
|
7648
|
+
*
|
|
7649
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7650
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7651
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7652
|
+
*/
|
|
7653
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7580
7654
|
/** Which detectors trigger an `events`-mode band. */
|
|
7581
7655
|
var RecordingTriggersSchema = object({
|
|
7582
7656
|
motion: boolean().optional(),
|
|
7583
|
-
audioThresholdDbfs: number().optional()
|
|
7657
|
+
audioThresholdDbfs: number().optional(),
|
|
7658
|
+
/**
|
|
7659
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7660
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7661
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7662
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7663
|
+
*
|
|
7664
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7665
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7666
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7667
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7668
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7669
|
+
*/
|
|
7670
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7671
|
+
/**
|
|
7672
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7673
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7674
|
+
* `objectClasses`.
|
|
7675
|
+
*
|
|
7676
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7677
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7678
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7679
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7680
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7681
|
+
*
|
|
7682
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7683
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7684
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7685
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7686
|
+
* registrare.
|
|
7687
|
+
*/
|
|
7688
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7584
7689
|
});
|
|
7585
7690
|
/**
|
|
7586
7691
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8032,41 +8137,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8032
8137
|
*/
|
|
8033
8138
|
debug: boolean().optional()
|
|
8034
8139
|
});
|
|
8035
|
-
var LabelDefinitionSchema = object({
|
|
8036
|
-
id: string(),
|
|
8037
|
-
name: string(),
|
|
8038
|
-
category: string().optional(),
|
|
8039
|
-
description: string().optional(),
|
|
8040
|
-
icon: string().optional()
|
|
8041
|
-
});
|
|
8042
|
-
/**
|
|
8043
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8044
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8045
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8046
|
-
* detection pipeline executor actually routes.
|
|
8047
|
-
*
|
|
8048
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8049
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8050
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8051
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8052
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8053
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8054
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8055
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8056
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8057
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8058
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8059
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8060
|
-
*/
|
|
8061
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8062
|
-
mapping: record(string(), _enum([
|
|
8063
|
-
"person",
|
|
8064
|
-
"vehicle",
|
|
8065
|
-
"animal",
|
|
8066
|
-
"package"
|
|
8067
|
-
])),
|
|
8068
|
-
preserveOriginal: boolean()
|
|
8069
|
-
});
|
|
8070
8140
|
var MODEL_FORMATS = [
|
|
8071
8141
|
"onnx",
|
|
8072
8142
|
"coreml",
|
|
@@ -20908,7 +20978,7 @@ var lifecycleJobSchema = object({
|
|
|
20908
20978
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
20909
20979
|
* as every other cap.
|
|
20910
20980
|
*/
|
|
20911
|
-
var LogLevelSchema$
|
|
20981
|
+
var LogLevelSchema$2 = _enum([
|
|
20912
20982
|
"debug",
|
|
20913
20983
|
"info",
|
|
20914
20984
|
"warn",
|
|
@@ -21115,7 +21185,7 @@ var CustomActionInputSchema = object({
|
|
|
21115
21185
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21116
21186
|
addonId: string(),
|
|
21117
21187
|
limit: number().min(1).max(500).default(100),
|
|
21118
|
-
level: LogLevelSchema$
|
|
21188
|
+
level: LogLevelSchema$2.optional()
|
|
21119
21189
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21120
21190
|
packageName: string(),
|
|
21121
21191
|
version: string().optional()
|
|
@@ -21213,7 +21283,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21213
21283
|
auth: "admin"
|
|
21214
21284
|
}), method(object({
|
|
21215
21285
|
addonId: string(),
|
|
21216
|
-
level: LogLevelSchema$
|
|
21286
|
+
level: LogLevelSchema$2.optional()
|
|
21217
21287
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21218
21288
|
object({
|
|
21219
21289
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22207,6 +22277,35 @@ var FaceFilterEnum = _enum([
|
|
|
22207
22277
|
"identified",
|
|
22208
22278
|
"all"
|
|
22209
22279
|
]);
|
|
22280
|
+
/**
|
|
22281
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22282
|
+
*
|
|
22283
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22284
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22285
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22286
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22287
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
22288
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
22289
|
+
*
|
|
22290
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
22291
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
22292
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
22293
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
22294
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
22295
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
22296
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
22297
|
+
* backend's NULL-collation accident.
|
|
22298
|
+
*/
|
|
22299
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
22300
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
22301
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
22302
|
+
* never leaves the server. */
|
|
22303
|
+
var FaceClusterSchema = object({
|
|
22304
|
+
faceIds: array(string()).readonly(),
|
|
22305
|
+
representativeFaceId: string(),
|
|
22306
|
+
size: number().int(),
|
|
22307
|
+
cohesion: number()
|
|
22308
|
+
});
|
|
22210
22309
|
var MediaFileLiteSchema$1 = object({
|
|
22211
22310
|
key: string(),
|
|
22212
22311
|
kind: string(),
|
|
@@ -22253,24 +22352,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22253
22352
|
kind: "mutation",
|
|
22254
22353
|
auth: "admin"
|
|
22255
22354
|
}), method(object({
|
|
22256
|
-
/**
|
|
22355
|
+
/**
|
|
22356
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
22357
|
+
*
|
|
22358
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
22359
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
22360
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
22361
|
+
* present, and this field is then ignored rather than unioned, so
|
|
22362
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
22363
|
+
*/
|
|
22257
22364
|
deviceId: number().int().optional(),
|
|
22365
|
+
/**
|
|
22366
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
22367
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
22368
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
22369
|
+
* about to discard).
|
|
22370
|
+
*
|
|
22371
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
22372
|
+
* "every camera". A request for no devices is a request, not an
|
|
22373
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
22374
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
22375
|
+
*
|
|
22376
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
22377
|
+
*/
|
|
22378
|
+
deviceIds: array(number().int()).optional(),
|
|
22258
22379
|
limit: number().int().positive().optional(),
|
|
22259
22380
|
filter: FaceFilterEnum.optional(),
|
|
22260
22381
|
/**
|
|
22261
|
-
*
|
|
22262
|
-
*
|
|
22382
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22383
|
+
* Absent means no lower bound.
|
|
22384
|
+
*/
|
|
22385
|
+
since: number().int().optional(),
|
|
22386
|
+
/**
|
|
22387
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22388
|
+
* Absent means no upper bound.
|
|
22389
|
+
*/
|
|
22390
|
+
until: number().int().optional(),
|
|
22391
|
+
/**
|
|
22392
|
+
* Order the page by time or by suggestion certainty. Default
|
|
22393
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
22394
|
+
* that does not ask.
|
|
22263
22395
|
*
|
|
22264
|
-
*
|
|
22265
|
-
*
|
|
22266
|
-
* the browser cache the images.
|
|
22396
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
22397
|
+
* does under `'suggestionConfidence'`.
|
|
22267
22398
|
*
|
|
22268
|
-
*
|
|
22269
|
-
*
|
|
22270
|
-
*
|
|
22271
|
-
*
|
|
22272
|
-
*
|
|
22273
|
-
|
|
22399
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
22400
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
22401
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
22402
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
22403
|
+
* with {@link since} / {@link until}.
|
|
22404
|
+
*/
|
|
22405
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
22406
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
22407
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
22408
|
+
/**
|
|
22409
|
+
* Inline the base64 crop on every row.
|
|
22410
|
+
*
|
|
22411
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
22412
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
22413
|
+
* this for every gallery, and which records why the inline shape had
|
|
22414
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
22415
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
22416
|
+
* that describes the old design reads as permission to rely on it.
|
|
22417
|
+
*
|
|
22418
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
22419
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
22420
|
+
* cached and ETagged.
|
|
22274
22421
|
*/
|
|
22275
22422
|
includeCrops: boolean().optional()
|
|
22276
22423
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -22306,13 +22453,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22306
22453
|
}), method(object({
|
|
22307
22454
|
threshold: number().min(0).max(1).optional(),
|
|
22308
22455
|
minClusterSize: number().int().min(2).optional(),
|
|
22309
|
-
|
|
22310
|
-
|
|
22311
|
-
|
|
22312
|
-
|
|
22313
|
-
|
|
22314
|
-
|
|
22315
|
-
|
|
22456
|
+
/**
|
|
22457
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
22458
|
+
* which read as though it bounded the work — it never did.
|
|
22459
|
+
*
|
|
22460
|
+
* Wins over {@link limit} when both are sent.
|
|
22461
|
+
*/
|
|
22462
|
+
maxClusters: number().int().positive().optional(),
|
|
22463
|
+
/**
|
|
22464
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
22465
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
22466
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
22467
|
+
*/
|
|
22468
|
+
limit: number().int().positive().optional(),
|
|
22469
|
+
/**
|
|
22470
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
22471
|
+
* POOL, not the result.
|
|
22472
|
+
*
|
|
22473
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
22474
|
+
* used to read every unassigned face on the hub no matter what the
|
|
22475
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
22476
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
22477
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
22478
|
+
*
|
|
22479
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
22480
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
22481
|
+
* sample it randomly.
|
|
22482
|
+
*
|
|
22483
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
22484
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
22485
|
+
* unbounded scan can never come back as the table grows.
|
|
22486
|
+
*/
|
|
22487
|
+
maxFacesScanned: number().int().positive().optional()
|
|
22488
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
22316
22489
|
/**
|
|
22317
22490
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
22318
22491
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26035,6 +26208,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26035
26208
|
latitude: number().min(-90).max(90),
|
|
26036
26209
|
longitude: number().min(-180).max(180)
|
|
26037
26210
|
}).nullable();
|
|
26211
|
+
/**
|
|
26212
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26213
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26214
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26215
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26216
|
+
*/
|
|
26217
|
+
var RequestCensusGroupSchema = object({
|
|
26218
|
+
procedure: string(),
|
|
26219
|
+
userAgent: string(),
|
|
26220
|
+
ip: string(),
|
|
26221
|
+
principal: string(),
|
|
26222
|
+
calls: number(),
|
|
26223
|
+
perMin: number()
|
|
26224
|
+
});
|
|
26225
|
+
/**
|
|
26226
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26227
|
+
*
|
|
26228
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26229
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26230
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26231
|
+
*/
|
|
26232
|
+
var RequestCensusProcedureSchema = object({
|
|
26233
|
+
procedure: string(),
|
|
26234
|
+
calls: number(),
|
|
26235
|
+
perMin: number()
|
|
26236
|
+
});
|
|
26237
|
+
/**
|
|
26238
|
+
* The census as an operator sees it.
|
|
26239
|
+
*
|
|
26240
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26241
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26242
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26243
|
+
* like one that succeeded.
|
|
26244
|
+
*/
|
|
26245
|
+
var RequestCensusStatusSchema = object({
|
|
26246
|
+
armed: boolean(),
|
|
26247
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26248
|
+
elapsedMs: number(),
|
|
26249
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26250
|
+
windowMs: number(),
|
|
26251
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26252
|
+
armedUntilMs: number(),
|
|
26253
|
+
httpRequests: number(),
|
|
26254
|
+
batchedRequests: number(),
|
|
26255
|
+
/**
|
|
26256
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
26257
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
26258
|
+
* the number comparable with a store-side call count.
|
|
26259
|
+
*/
|
|
26260
|
+
procedureCalls: number(),
|
|
26261
|
+
/**
|
|
26262
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26263
|
+
* transport resolves one context per connection - but the number that says
|
|
26264
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
26265
|
+
*/
|
|
26266
|
+
wsConnections: number(),
|
|
26267
|
+
distinctGroups: number(),
|
|
26268
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
26269
|
+
* cardinality bound. */
|
|
26270
|
+
unattributedCalls: number(),
|
|
26271
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26272
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
26273
|
+
}).extend({ persisted: boolean() });
|
|
26274
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
26275
|
+
var LogLevelSchema$1 = _enum([
|
|
26276
|
+
"debug",
|
|
26277
|
+
"info",
|
|
26278
|
+
"warn",
|
|
26279
|
+
"error"
|
|
26280
|
+
]);
|
|
26281
|
+
/**
|
|
26282
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
26283
|
+
*
|
|
26284
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
26285
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
26286
|
+
*/
|
|
26287
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
26288
|
+
/**
|
|
26289
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
26290
|
+
* layer that carries an explicit value wins.
|
|
26291
|
+
*
|
|
26292
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
26293
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
26294
|
+
* grow later would force every consumer of this document to change with it.
|
|
26295
|
+
* Nothing returns `component` today.
|
|
26296
|
+
*/
|
|
26297
|
+
var LoggingScopeKindSchema = _enum([
|
|
26298
|
+
"cluster",
|
|
26299
|
+
"node",
|
|
26300
|
+
"component"
|
|
26301
|
+
]);
|
|
26302
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
26303
|
+
var LoggingLevelSourceSchema = _enum([
|
|
26304
|
+
"default",
|
|
26305
|
+
"cluster",
|
|
26306
|
+
"node",
|
|
26307
|
+
"component"
|
|
26308
|
+
]);
|
|
26309
|
+
/**
|
|
26310
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
26311
|
+
*
|
|
26312
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
26313
|
+
* difference between "this node is at `info` because I decided it" and
|
|
26314
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
26315
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
26316
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
26317
|
+
*/
|
|
26318
|
+
var LoggingLevelLayerSchema = object({
|
|
26319
|
+
scope: LoggingScopeKindSchema,
|
|
26320
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26321
|
+
nodeId: string().nullable(),
|
|
26322
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26323
|
+
level: LogLevelSchema$1.nullable()
|
|
26324
|
+
});
|
|
26325
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
26326
|
+
var LoggingEffectiveSchema = object({
|
|
26327
|
+
level: LogLevelSchema$1,
|
|
26328
|
+
levelSource: LoggingLevelSourceSchema
|
|
26329
|
+
});
|
|
26330
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
26331
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
26332
|
+
/**
|
|
26333
|
+
* An armed diagnostic, with its DEADLINE.
|
|
26334
|
+
*
|
|
26335
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
26336
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
26337
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
26338
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
26339
|
+
*/
|
|
26340
|
+
var DiagnosticWindowSchema = object({
|
|
26341
|
+
id: DiagnosticIdSchema,
|
|
26342
|
+
armed: boolean(),
|
|
26343
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26344
|
+
armedUntilMs: number(),
|
|
26345
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26346
|
+
remainingMs: number(),
|
|
26347
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
26348
|
+
* i.e. whether this window would survive a restart. */
|
|
26349
|
+
persisted: boolean()
|
|
26350
|
+
});
|
|
26351
|
+
/**
|
|
26352
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
26353
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
26354
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
26355
|
+
*/
|
|
26356
|
+
var DiagnosticWindowPatchSchema = object({
|
|
26357
|
+
id: DiagnosticIdSchema,
|
|
26358
|
+
armMs: number().int().min(0),
|
|
26359
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
26360
|
+
reportEveryMs: number().int().positive().optional()
|
|
26361
|
+
});
|
|
26362
|
+
/**
|
|
26363
|
+
* A PATCH, and patches MERGE.
|
|
26364
|
+
*
|
|
26365
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
26366
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
26367
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
26368
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
26369
|
+
* turns into an erased one.
|
|
26370
|
+
*/
|
|
26371
|
+
var LoggingSettingsPatchSchema = object({
|
|
26372
|
+
/**
|
|
26373
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
26374
|
+
* addressed scope so it inherits again. A value sets it.
|
|
26375
|
+
*/
|
|
26376
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
26377
|
+
/**
|
|
26378
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26379
|
+
* keeps running — a patch is never a full replacement.
|
|
26380
|
+
*/
|
|
26381
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26382
|
+
});
|
|
26383
|
+
/**
|
|
26384
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
26385
|
+
*
|
|
26386
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
26387
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
26388
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
26389
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
26390
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
26391
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
26392
|
+
* layer selector needs a name the transport does not already own.
|
|
26393
|
+
*/
|
|
26394
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
26395
|
+
var SetLoggingSettingsInputSchema = object({
|
|
26396
|
+
scopeNodeId: string().optional(),
|
|
26397
|
+
patch: LoggingSettingsPatchSchema
|
|
26398
|
+
});
|
|
26399
|
+
/**
|
|
26400
|
+
* The whole document, as read and as returned after every write.
|
|
26401
|
+
*
|
|
26402
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
26403
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
26404
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
26405
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
26406
|
+
* survive a restart.
|
|
26407
|
+
*/
|
|
26408
|
+
var LoggingSettingsStateSchema = object({
|
|
26409
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26410
|
+
scopeNodeId: string().nullable(),
|
|
26411
|
+
effective: LoggingEffectiveSchema,
|
|
26412
|
+
explicit: LoggingExplicitSchema,
|
|
26413
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26414
|
+
persisted: boolean()
|
|
26415
|
+
});
|
|
26038
26416
|
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(), {
|
|
26039
26417
|
kind: "mutation",
|
|
26040
26418
|
auth: "admin"
|
|
@@ -26047,6 +26425,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26047
26425
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26048
26426
|
kind: "mutation",
|
|
26049
26427
|
auth: "admin"
|
|
26428
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
26429
|
+
kind: "mutation",
|
|
26430
|
+
auth: "admin"
|
|
26050
26431
|
});
|
|
26051
26432
|
object({
|
|
26052
26433
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -31878,6 +32259,18 @@ Object.freeze({
|
|
|
31878
32259
|
addonId: null,
|
|
31879
32260
|
access: "create"
|
|
31880
32261
|
},
|
|
32262
|
+
"system.getLoggingSettings": {
|
|
32263
|
+
capName: "system",
|
|
32264
|
+
capScope: "system",
|
|
32265
|
+
addonId: null,
|
|
32266
|
+
access: "view"
|
|
32267
|
+
},
|
|
32268
|
+
"system.getRequestCensus": {
|
|
32269
|
+
capName: "system",
|
|
32270
|
+
capScope: "system",
|
|
32271
|
+
addonId: null,
|
|
32272
|
+
access: "view"
|
|
32273
|
+
},
|
|
31881
32274
|
"system.getRetentionConfig": {
|
|
31882
32275
|
capName: "system",
|
|
31883
32276
|
capScope: "system",
|
|
@@ -31908,6 +32301,12 @@ Object.freeze({
|
|
|
31908
32301
|
addonId: null,
|
|
31909
32302
|
access: "view"
|
|
31910
32303
|
},
|
|
32304
|
+
"system.setLoggingSettings": {
|
|
32305
|
+
capName: "system",
|
|
32306
|
+
capScope: "system",
|
|
32307
|
+
addonId: null,
|
|
32308
|
+
access: "create"
|
|
32309
|
+
},
|
|
31911
32310
|
"system.setRetentionConfig": {
|
|
31912
32311
|
capName: "system",
|
|
31913
32312
|
capScope: "system",
|
|
@@ -33063,6 +33462,10 @@ Object.freeze({
|
|
|
33063
33462
|
name: "deviceId",
|
|
33064
33463
|
form: "single",
|
|
33065
33464
|
optional: true
|
|
33465
|
+
}, {
|
|
33466
|
+
name: "deviceIds",
|
|
33467
|
+
form: "array",
|
|
33468
|
+
optional: true
|
|
33066
33469
|
}],
|
|
33067
33470
|
"fanControl.setDirection": [{
|
|
33068
33471
|
name: "deviceId",
|
|
@@ -34673,7 +35076,38 @@ object({
|
|
|
34673
35076
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34674
35077
|
* reproduce that.
|
|
34675
35078
|
*/
|
|
34676
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
35079
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
35080
|
+
/**
|
|
35081
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35082
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35083
|
+
* subject tiles, on frames that detected something.
|
|
35084
|
+
*
|
|
35085
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35086
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35087
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35088
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35089
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35090
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35091
|
+
*
|
|
35092
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35093
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35094
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35095
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35096
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35097
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35098
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35099
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35100
|
+
* whole shape exists to avoid.
|
|
35101
|
+
*
|
|
35102
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35103
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35104
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35105
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35106
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35107
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35108
|
+
* nothing.
|
|
35109
|
+
*/
|
|
35110
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
34677
35111
|
});
|
|
34678
35112
|
/**
|
|
34679
35113
|
* The values in force when the operator has set nothing.
|
|
@@ -34689,12 +35123,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
34689
35123
|
budgetMb: 1024,
|
|
34690
35124
|
activityMs: 15e3,
|
|
34691
35125
|
tileBudgetMb: 64,
|
|
35126
|
+
sceneBudgetMb: 48,
|
|
34692
35127
|
admission: "inferred"
|
|
34693
35128
|
};
|
|
34694
35129
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34695
35130
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34696
35131
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34697
35132
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35133
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
34698
35134
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34699
35135
|
var MB = 1024 * 1024;
|
|
34700
35136
|
1024 * MB, 3072 * MB;
|
|
@@ -7550,6 +7550,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7550
7550
|
/** Max rows returned, newest-first. */
|
|
7551
7551
|
limit: number().int().min(1).max(1e3).optional()
|
|
7552
7552
|
});
|
|
7553
|
+
var LabelDefinitionSchema = object({
|
|
7554
|
+
id: string(),
|
|
7555
|
+
name: string(),
|
|
7556
|
+
category: string().optional(),
|
|
7557
|
+
description: string().optional(),
|
|
7558
|
+
icon: string().optional()
|
|
7559
|
+
});
|
|
7560
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7561
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7562
|
+
"person",
|
|
7563
|
+
"vehicle",
|
|
7564
|
+
"animal",
|
|
7565
|
+
"package"
|
|
7566
|
+
];
|
|
7567
|
+
/**
|
|
7568
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7569
|
+
* un operatore può selezionare.
|
|
7570
|
+
*
|
|
7571
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7572
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7573
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7574
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7575
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7576
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7577
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7578
|
+
*
|
|
7579
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7580
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7581
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7582
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7583
|
+
* successiva.
|
|
7584
|
+
*/
|
|
7585
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7586
|
+
"person",
|
|
7587
|
+
"vehicle",
|
|
7588
|
+
"animal"
|
|
7589
|
+
];
|
|
7590
|
+
/**
|
|
7591
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7592
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7593
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7594
|
+
* detection pipeline executor actually routes.
|
|
7595
|
+
*
|
|
7596
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7597
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7598
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7599
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7600
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7601
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7602
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7603
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7604
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7605
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7606
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7607
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7608
|
+
*/
|
|
7609
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7610
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7611
|
+
preserveOriginal: boolean()
|
|
7612
|
+
});
|
|
7553
7613
|
/**
|
|
7554
7614
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7555
7615
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7572,10 +7632,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7572
7632
|
"events",
|
|
7573
7633
|
"continuous"
|
|
7574
7634
|
]);
|
|
7635
|
+
/**
|
|
7636
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7637
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7638
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7639
|
+
*/
|
|
7640
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7641
|
+
/**
|
|
7642
|
+
* True quando `values` non ripete un elemento.
|
|
7643
|
+
*
|
|
7644
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7645
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7646
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7647
|
+
*/
|
|
7648
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7575
7649
|
/** Which detectors trigger an `events`-mode band. */
|
|
7576
7650
|
var RecordingTriggersSchema = object({
|
|
7577
7651
|
motion: boolean().optional(),
|
|
7578
|
-
audioThresholdDbfs: number().optional()
|
|
7652
|
+
audioThresholdDbfs: number().optional(),
|
|
7653
|
+
/**
|
|
7654
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7655
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7656
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7657
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7658
|
+
*
|
|
7659
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7660
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7661
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7662
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7663
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7664
|
+
*/
|
|
7665
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7666
|
+
/**
|
|
7667
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7668
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7669
|
+
* `objectClasses`.
|
|
7670
|
+
*
|
|
7671
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7672
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7673
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7674
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7675
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7676
|
+
*
|
|
7677
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7678
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7679
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7680
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7681
|
+
* registrare.
|
|
7682
|
+
*/
|
|
7683
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7579
7684
|
});
|
|
7580
7685
|
/**
|
|
7581
7686
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8027,41 +8132,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8027
8132
|
*/
|
|
8028
8133
|
debug: boolean().optional()
|
|
8029
8134
|
});
|
|
8030
|
-
var LabelDefinitionSchema = object({
|
|
8031
|
-
id: string(),
|
|
8032
|
-
name: string(),
|
|
8033
|
-
category: string().optional(),
|
|
8034
|
-
description: string().optional(),
|
|
8035
|
-
icon: string().optional()
|
|
8036
|
-
});
|
|
8037
|
-
/**
|
|
8038
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8039
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8040
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8041
|
-
* detection pipeline executor actually routes.
|
|
8042
|
-
*
|
|
8043
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8044
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8045
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8046
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8047
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8048
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8049
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8050
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8051
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8052
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8053
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8054
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8055
|
-
*/
|
|
8056
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8057
|
-
mapping: record(string(), _enum([
|
|
8058
|
-
"person",
|
|
8059
|
-
"vehicle",
|
|
8060
|
-
"animal",
|
|
8061
|
-
"package"
|
|
8062
|
-
])),
|
|
8063
|
-
preserveOriginal: boolean()
|
|
8064
|
-
});
|
|
8065
8135
|
var MODEL_FORMATS = [
|
|
8066
8136
|
"onnx",
|
|
8067
8137
|
"coreml",
|
|
@@ -20903,7 +20973,7 @@ var lifecycleJobSchema = object({
|
|
|
20903
20973
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
20904
20974
|
* as every other cap.
|
|
20905
20975
|
*/
|
|
20906
|
-
var LogLevelSchema$
|
|
20976
|
+
var LogLevelSchema$2 = _enum([
|
|
20907
20977
|
"debug",
|
|
20908
20978
|
"info",
|
|
20909
20979
|
"warn",
|
|
@@ -21110,7 +21180,7 @@ var CustomActionInputSchema = object({
|
|
|
21110
21180
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21111
21181
|
addonId: string(),
|
|
21112
21182
|
limit: number().min(1).max(500).default(100),
|
|
21113
|
-
level: LogLevelSchema$
|
|
21183
|
+
level: LogLevelSchema$2.optional()
|
|
21114
21184
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21115
21185
|
packageName: string(),
|
|
21116
21186
|
version: string().optional()
|
|
@@ -21208,7 +21278,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21208
21278
|
auth: "admin"
|
|
21209
21279
|
}), method(object({
|
|
21210
21280
|
addonId: string(),
|
|
21211
|
-
level: LogLevelSchema$
|
|
21281
|
+
level: LogLevelSchema$2.optional()
|
|
21212
21282
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21213
21283
|
object({
|
|
21214
21284
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22202,6 +22272,35 @@ var FaceFilterEnum = _enum([
|
|
|
22202
22272
|
"identified",
|
|
22203
22273
|
"all"
|
|
22204
22274
|
]);
|
|
22275
|
+
/**
|
|
22276
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22277
|
+
*
|
|
22278
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22279
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22280
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22281
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22282
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
22283
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
22284
|
+
*
|
|
22285
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
22286
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
22287
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
22288
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
22289
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
22290
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
22291
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
22292
|
+
* backend's NULL-collation accident.
|
|
22293
|
+
*/
|
|
22294
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
22295
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
22296
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
22297
|
+
* never leaves the server. */
|
|
22298
|
+
var FaceClusterSchema = object({
|
|
22299
|
+
faceIds: array(string()).readonly(),
|
|
22300
|
+
representativeFaceId: string(),
|
|
22301
|
+
size: number().int(),
|
|
22302
|
+
cohesion: number()
|
|
22303
|
+
});
|
|
22205
22304
|
var MediaFileLiteSchema$1 = object({
|
|
22206
22305
|
key: string(),
|
|
22207
22306
|
kind: string(),
|
|
@@ -22248,24 +22347,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22248
22347
|
kind: "mutation",
|
|
22249
22348
|
auth: "admin"
|
|
22250
22349
|
}), method(object({
|
|
22251
|
-
/**
|
|
22350
|
+
/**
|
|
22351
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
22352
|
+
*
|
|
22353
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
22354
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
22355
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
22356
|
+
* present, and this field is then ignored rather than unioned, so
|
|
22357
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
22358
|
+
*/
|
|
22252
22359
|
deviceId: number().int().optional(),
|
|
22360
|
+
/**
|
|
22361
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
22362
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
22363
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
22364
|
+
* about to discard).
|
|
22365
|
+
*
|
|
22366
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
22367
|
+
* "every camera". A request for no devices is a request, not an
|
|
22368
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
22369
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
22370
|
+
*
|
|
22371
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
22372
|
+
*/
|
|
22373
|
+
deviceIds: array(number().int()).optional(),
|
|
22253
22374
|
limit: number().int().positive().optional(),
|
|
22254
22375
|
filter: FaceFilterEnum.optional(),
|
|
22255
22376
|
/**
|
|
22256
|
-
*
|
|
22257
|
-
*
|
|
22377
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22378
|
+
* Absent means no lower bound.
|
|
22379
|
+
*/
|
|
22380
|
+
since: number().int().optional(),
|
|
22381
|
+
/**
|
|
22382
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22383
|
+
* Absent means no upper bound.
|
|
22384
|
+
*/
|
|
22385
|
+
until: number().int().optional(),
|
|
22386
|
+
/**
|
|
22387
|
+
* Order the page by time or by suggestion certainty. Default
|
|
22388
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
22389
|
+
* that does not ask.
|
|
22258
22390
|
*
|
|
22259
|
-
*
|
|
22260
|
-
*
|
|
22261
|
-
* the browser cache the images.
|
|
22391
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
22392
|
+
* does under `'suggestionConfidence'`.
|
|
22262
22393
|
*
|
|
22263
|
-
*
|
|
22264
|
-
*
|
|
22265
|
-
*
|
|
22266
|
-
*
|
|
22267
|
-
*
|
|
22268
|
-
|
|
22394
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
22395
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
22396
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
22397
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
22398
|
+
* with {@link since} / {@link until}.
|
|
22399
|
+
*/
|
|
22400
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
22401
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
22402
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
22403
|
+
/**
|
|
22404
|
+
* Inline the base64 crop on every row.
|
|
22405
|
+
*
|
|
22406
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
22407
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
22408
|
+
* this for every gallery, and which records why the inline shape had
|
|
22409
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
22410
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
22411
|
+
* that describes the old design reads as permission to rely on it.
|
|
22412
|
+
*
|
|
22413
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
22414
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
22415
|
+
* cached and ETagged.
|
|
22269
22416
|
*/
|
|
22270
22417
|
includeCrops: boolean().optional()
|
|
22271
22418
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -22301,13 +22448,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22301
22448
|
}), method(object({
|
|
22302
22449
|
threshold: number().min(0).max(1).optional(),
|
|
22303
22450
|
minClusterSize: number().int().min(2).optional(),
|
|
22304
|
-
|
|
22305
|
-
|
|
22306
|
-
|
|
22307
|
-
|
|
22308
|
-
|
|
22309
|
-
|
|
22310
|
-
|
|
22451
|
+
/**
|
|
22452
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
22453
|
+
* which read as though it bounded the work — it never did.
|
|
22454
|
+
*
|
|
22455
|
+
* Wins over {@link limit} when both are sent.
|
|
22456
|
+
*/
|
|
22457
|
+
maxClusters: number().int().positive().optional(),
|
|
22458
|
+
/**
|
|
22459
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
22460
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
22461
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
22462
|
+
*/
|
|
22463
|
+
limit: number().int().positive().optional(),
|
|
22464
|
+
/**
|
|
22465
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
22466
|
+
* POOL, not the result.
|
|
22467
|
+
*
|
|
22468
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
22469
|
+
* used to read every unassigned face on the hub no matter what the
|
|
22470
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
22471
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
22472
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
22473
|
+
*
|
|
22474
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
22475
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
22476
|
+
* sample it randomly.
|
|
22477
|
+
*
|
|
22478
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
22479
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
22480
|
+
* unbounded scan can never come back as the table grows.
|
|
22481
|
+
*/
|
|
22482
|
+
maxFacesScanned: number().int().positive().optional()
|
|
22483
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
22311
22484
|
/**
|
|
22312
22485
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
22313
22486
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26030,6 +26203,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26030
26203
|
latitude: number().min(-90).max(90),
|
|
26031
26204
|
longitude: number().min(-180).max(180)
|
|
26032
26205
|
}).nullable();
|
|
26206
|
+
/**
|
|
26207
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26208
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26209
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26210
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26211
|
+
*/
|
|
26212
|
+
var RequestCensusGroupSchema = object({
|
|
26213
|
+
procedure: string(),
|
|
26214
|
+
userAgent: string(),
|
|
26215
|
+
ip: string(),
|
|
26216
|
+
principal: string(),
|
|
26217
|
+
calls: number(),
|
|
26218
|
+
perMin: number()
|
|
26219
|
+
});
|
|
26220
|
+
/**
|
|
26221
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26222
|
+
*
|
|
26223
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26224
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26225
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26226
|
+
*/
|
|
26227
|
+
var RequestCensusProcedureSchema = object({
|
|
26228
|
+
procedure: string(),
|
|
26229
|
+
calls: number(),
|
|
26230
|
+
perMin: number()
|
|
26231
|
+
});
|
|
26232
|
+
/**
|
|
26233
|
+
* The census as an operator sees it.
|
|
26234
|
+
*
|
|
26235
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26236
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26237
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26238
|
+
* like one that succeeded.
|
|
26239
|
+
*/
|
|
26240
|
+
var RequestCensusStatusSchema = object({
|
|
26241
|
+
armed: boolean(),
|
|
26242
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26243
|
+
elapsedMs: number(),
|
|
26244
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26245
|
+
windowMs: number(),
|
|
26246
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26247
|
+
armedUntilMs: number(),
|
|
26248
|
+
httpRequests: number(),
|
|
26249
|
+
batchedRequests: number(),
|
|
26250
|
+
/**
|
|
26251
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
26252
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
26253
|
+
* the number comparable with a store-side call count.
|
|
26254
|
+
*/
|
|
26255
|
+
procedureCalls: number(),
|
|
26256
|
+
/**
|
|
26257
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26258
|
+
* transport resolves one context per connection - but the number that says
|
|
26259
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
26260
|
+
*/
|
|
26261
|
+
wsConnections: number(),
|
|
26262
|
+
distinctGroups: number(),
|
|
26263
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
26264
|
+
* cardinality bound. */
|
|
26265
|
+
unattributedCalls: number(),
|
|
26266
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26267
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
26268
|
+
}).extend({ persisted: boolean() });
|
|
26269
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
26270
|
+
var LogLevelSchema$1 = _enum([
|
|
26271
|
+
"debug",
|
|
26272
|
+
"info",
|
|
26273
|
+
"warn",
|
|
26274
|
+
"error"
|
|
26275
|
+
]);
|
|
26276
|
+
/**
|
|
26277
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
26278
|
+
*
|
|
26279
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
26280
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
26281
|
+
*/
|
|
26282
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
26283
|
+
/**
|
|
26284
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
26285
|
+
* layer that carries an explicit value wins.
|
|
26286
|
+
*
|
|
26287
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
26288
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
26289
|
+
* grow later would force every consumer of this document to change with it.
|
|
26290
|
+
* Nothing returns `component` today.
|
|
26291
|
+
*/
|
|
26292
|
+
var LoggingScopeKindSchema = _enum([
|
|
26293
|
+
"cluster",
|
|
26294
|
+
"node",
|
|
26295
|
+
"component"
|
|
26296
|
+
]);
|
|
26297
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
26298
|
+
var LoggingLevelSourceSchema = _enum([
|
|
26299
|
+
"default",
|
|
26300
|
+
"cluster",
|
|
26301
|
+
"node",
|
|
26302
|
+
"component"
|
|
26303
|
+
]);
|
|
26304
|
+
/**
|
|
26305
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
26306
|
+
*
|
|
26307
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
26308
|
+
* difference between "this node is at `info` because I decided it" and
|
|
26309
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
26310
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
26311
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
26312
|
+
*/
|
|
26313
|
+
var LoggingLevelLayerSchema = object({
|
|
26314
|
+
scope: LoggingScopeKindSchema,
|
|
26315
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26316
|
+
nodeId: string().nullable(),
|
|
26317
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26318
|
+
level: LogLevelSchema$1.nullable()
|
|
26319
|
+
});
|
|
26320
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
26321
|
+
var LoggingEffectiveSchema = object({
|
|
26322
|
+
level: LogLevelSchema$1,
|
|
26323
|
+
levelSource: LoggingLevelSourceSchema
|
|
26324
|
+
});
|
|
26325
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
26326
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
26327
|
+
/**
|
|
26328
|
+
* An armed diagnostic, with its DEADLINE.
|
|
26329
|
+
*
|
|
26330
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
26331
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
26332
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
26333
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
26334
|
+
*/
|
|
26335
|
+
var DiagnosticWindowSchema = object({
|
|
26336
|
+
id: DiagnosticIdSchema,
|
|
26337
|
+
armed: boolean(),
|
|
26338
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26339
|
+
armedUntilMs: number(),
|
|
26340
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26341
|
+
remainingMs: number(),
|
|
26342
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
26343
|
+
* i.e. whether this window would survive a restart. */
|
|
26344
|
+
persisted: boolean()
|
|
26345
|
+
});
|
|
26346
|
+
/**
|
|
26347
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
26348
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
26349
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
26350
|
+
*/
|
|
26351
|
+
var DiagnosticWindowPatchSchema = object({
|
|
26352
|
+
id: DiagnosticIdSchema,
|
|
26353
|
+
armMs: number().int().min(0),
|
|
26354
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
26355
|
+
reportEveryMs: number().int().positive().optional()
|
|
26356
|
+
});
|
|
26357
|
+
/**
|
|
26358
|
+
* A PATCH, and patches MERGE.
|
|
26359
|
+
*
|
|
26360
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
26361
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
26362
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
26363
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
26364
|
+
* turns into an erased one.
|
|
26365
|
+
*/
|
|
26366
|
+
var LoggingSettingsPatchSchema = object({
|
|
26367
|
+
/**
|
|
26368
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
26369
|
+
* addressed scope so it inherits again. A value sets it.
|
|
26370
|
+
*/
|
|
26371
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
26372
|
+
/**
|
|
26373
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26374
|
+
* keeps running — a patch is never a full replacement.
|
|
26375
|
+
*/
|
|
26376
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26377
|
+
});
|
|
26378
|
+
/**
|
|
26379
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
26380
|
+
*
|
|
26381
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
26382
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
26383
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
26384
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
26385
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
26386
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
26387
|
+
* layer selector needs a name the transport does not already own.
|
|
26388
|
+
*/
|
|
26389
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
26390
|
+
var SetLoggingSettingsInputSchema = object({
|
|
26391
|
+
scopeNodeId: string().optional(),
|
|
26392
|
+
patch: LoggingSettingsPatchSchema
|
|
26393
|
+
});
|
|
26394
|
+
/**
|
|
26395
|
+
* The whole document, as read and as returned after every write.
|
|
26396
|
+
*
|
|
26397
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
26398
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
26399
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
26400
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
26401
|
+
* survive a restart.
|
|
26402
|
+
*/
|
|
26403
|
+
var LoggingSettingsStateSchema = object({
|
|
26404
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26405
|
+
scopeNodeId: string().nullable(),
|
|
26406
|
+
effective: LoggingEffectiveSchema,
|
|
26407
|
+
explicit: LoggingExplicitSchema,
|
|
26408
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26409
|
+
persisted: boolean()
|
|
26410
|
+
});
|
|
26033
26411
|
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(), {
|
|
26034
26412
|
kind: "mutation",
|
|
26035
26413
|
auth: "admin"
|
|
@@ -26042,6 +26420,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26042
26420
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26043
26421
|
kind: "mutation",
|
|
26044
26422
|
auth: "admin"
|
|
26423
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
26424
|
+
kind: "mutation",
|
|
26425
|
+
auth: "admin"
|
|
26045
26426
|
});
|
|
26046
26427
|
object({
|
|
26047
26428
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -31873,6 +32254,18 @@ Object.freeze({
|
|
|
31873
32254
|
addonId: null,
|
|
31874
32255
|
access: "create"
|
|
31875
32256
|
},
|
|
32257
|
+
"system.getLoggingSettings": {
|
|
32258
|
+
capName: "system",
|
|
32259
|
+
capScope: "system",
|
|
32260
|
+
addonId: null,
|
|
32261
|
+
access: "view"
|
|
32262
|
+
},
|
|
32263
|
+
"system.getRequestCensus": {
|
|
32264
|
+
capName: "system",
|
|
32265
|
+
capScope: "system",
|
|
32266
|
+
addonId: null,
|
|
32267
|
+
access: "view"
|
|
32268
|
+
},
|
|
31876
32269
|
"system.getRetentionConfig": {
|
|
31877
32270
|
capName: "system",
|
|
31878
32271
|
capScope: "system",
|
|
@@ -31903,6 +32296,12 @@ Object.freeze({
|
|
|
31903
32296
|
addonId: null,
|
|
31904
32297
|
access: "view"
|
|
31905
32298
|
},
|
|
32299
|
+
"system.setLoggingSettings": {
|
|
32300
|
+
capName: "system",
|
|
32301
|
+
capScope: "system",
|
|
32302
|
+
addonId: null,
|
|
32303
|
+
access: "create"
|
|
32304
|
+
},
|
|
31906
32305
|
"system.setRetentionConfig": {
|
|
31907
32306
|
capName: "system",
|
|
31908
32307
|
capScope: "system",
|
|
@@ -33058,6 +33457,10 @@ Object.freeze({
|
|
|
33058
33457
|
name: "deviceId",
|
|
33059
33458
|
form: "single",
|
|
33060
33459
|
optional: true
|
|
33460
|
+
}, {
|
|
33461
|
+
name: "deviceIds",
|
|
33462
|
+
form: "array",
|
|
33463
|
+
optional: true
|
|
33061
33464
|
}],
|
|
33062
33465
|
"fanControl.setDirection": [{
|
|
33063
33466
|
name: "deviceId",
|
|
@@ -34668,7 +35071,38 @@ object({
|
|
|
34668
35071
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34669
35072
|
* reproduce that.
|
|
34670
35073
|
*/
|
|
34671
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
35074
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
35075
|
+
/**
|
|
35076
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35077
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35078
|
+
* subject tiles, on frames that detected something.
|
|
35079
|
+
*
|
|
35080
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35081
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35082
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35083
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35084
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35085
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35086
|
+
*
|
|
35087
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35088
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35089
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35090
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35091
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35092
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35093
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35094
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35095
|
+
* whole shape exists to avoid.
|
|
35096
|
+
*
|
|
35097
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35098
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35099
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35100
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35101
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35102
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35103
|
+
* nothing.
|
|
35104
|
+
*/
|
|
35105
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
34672
35106
|
});
|
|
34673
35107
|
/**
|
|
34674
35108
|
* The values in force when the operator has set nothing.
|
|
@@ -34684,12 +35118,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
34684
35118
|
budgetMb: 1024,
|
|
34685
35119
|
activityMs: 15e3,
|
|
34686
35120
|
tileBudgetMb: 64,
|
|
35121
|
+
sceneBudgetMb: 48,
|
|
34687
35122
|
admission: "inferred"
|
|
34688
35123
|
};
|
|
34689
35124
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34690
35125
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34691
35126
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34692
35127
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35128
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
34693
35129
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34694
35130
|
var MB = 1024 * 1024;
|
|
34695
35131
|
1024 * MB, 3072 * MB;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.32",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|