@camstack/addon-decoder-nodeav 1.2.30 → 1.2.31
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/index.js +495 -59
- package/dist/index.mjs +495 -59
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7526,6 +7526,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7526
7526
|
/** Max rows returned, newest-first. */
|
|
7527
7527
|
limit: number().int().min(1).max(1e3).optional()
|
|
7528
7528
|
});
|
|
7529
|
+
var LabelDefinitionSchema = object({
|
|
7530
|
+
id: string(),
|
|
7531
|
+
name: string(),
|
|
7532
|
+
category: string().optional(),
|
|
7533
|
+
description: string().optional(),
|
|
7534
|
+
icon: string().optional()
|
|
7535
|
+
});
|
|
7536
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7537
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7538
|
+
"person",
|
|
7539
|
+
"vehicle",
|
|
7540
|
+
"animal",
|
|
7541
|
+
"package"
|
|
7542
|
+
];
|
|
7543
|
+
/**
|
|
7544
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7545
|
+
* un operatore può selezionare.
|
|
7546
|
+
*
|
|
7547
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7548
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7549
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7550
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7551
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7552
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7553
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7554
|
+
*
|
|
7555
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7556
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7557
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7558
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7559
|
+
* successiva.
|
|
7560
|
+
*/
|
|
7561
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7562
|
+
"person",
|
|
7563
|
+
"vehicle",
|
|
7564
|
+
"animal"
|
|
7565
|
+
];
|
|
7566
|
+
/**
|
|
7567
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7568
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7569
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7570
|
+
* detection pipeline executor actually routes.
|
|
7571
|
+
*
|
|
7572
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7573
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7574
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7575
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7576
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7577
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7578
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7579
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7580
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7581
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7582
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7583
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7584
|
+
*/
|
|
7585
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7586
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7587
|
+
preserveOriginal: boolean()
|
|
7588
|
+
});
|
|
7529
7589
|
/**
|
|
7530
7590
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7531
7591
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7548,10 +7608,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7548
7608
|
"events",
|
|
7549
7609
|
"continuous"
|
|
7550
7610
|
]);
|
|
7611
|
+
/**
|
|
7612
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7613
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7614
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7615
|
+
*/
|
|
7616
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7617
|
+
/**
|
|
7618
|
+
* True quando `values` non ripete un elemento.
|
|
7619
|
+
*
|
|
7620
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7621
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7622
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7623
|
+
*/
|
|
7624
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7551
7625
|
/** Which detectors trigger an `events`-mode band. */
|
|
7552
7626
|
var RecordingTriggersSchema = object({
|
|
7553
7627
|
motion: boolean().optional(),
|
|
7554
|
-
audioThresholdDbfs: number().optional()
|
|
7628
|
+
audioThresholdDbfs: number().optional(),
|
|
7629
|
+
/**
|
|
7630
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7631
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7632
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7633
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7634
|
+
*
|
|
7635
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7636
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7637
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7638
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7639
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7640
|
+
*/
|
|
7641
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7642
|
+
/**
|
|
7643
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7644
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7645
|
+
* `objectClasses`.
|
|
7646
|
+
*
|
|
7647
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7648
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7649
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7650
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7651
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7652
|
+
*
|
|
7653
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7654
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7655
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7656
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7657
|
+
* registrare.
|
|
7658
|
+
*/
|
|
7659
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7555
7660
|
});
|
|
7556
7661
|
/**
|
|
7557
7662
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8003,41 +8108,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8003
8108
|
*/
|
|
8004
8109
|
debug: boolean().optional()
|
|
8005
8110
|
});
|
|
8006
|
-
var LabelDefinitionSchema = object({
|
|
8007
|
-
id: string(),
|
|
8008
|
-
name: string(),
|
|
8009
|
-
category: string().optional(),
|
|
8010
|
-
description: string().optional(),
|
|
8011
|
-
icon: string().optional()
|
|
8012
|
-
});
|
|
8013
|
-
/**
|
|
8014
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8015
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8016
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8017
|
-
* detection pipeline executor actually routes.
|
|
8018
|
-
*
|
|
8019
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8020
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8021
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8022
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8023
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8024
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8025
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8026
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8027
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8028
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8029
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8030
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8031
|
-
*/
|
|
8032
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8033
|
-
mapping: record(string(), _enum([
|
|
8034
|
-
"person",
|
|
8035
|
-
"vehicle",
|
|
8036
|
-
"animal",
|
|
8037
|
-
"package"
|
|
8038
|
-
])),
|
|
8039
|
-
preserveOriginal: boolean()
|
|
8040
|
-
});
|
|
8041
8111
|
var MODEL_FORMATS = [
|
|
8042
8112
|
"onnx",
|
|
8043
8113
|
"coreml",
|
|
@@ -20941,7 +21011,7 @@ var lifecycleJobSchema = object({
|
|
|
20941
21011
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
20942
21012
|
* as every other cap.
|
|
20943
21013
|
*/
|
|
20944
|
-
var LogLevelSchema$
|
|
21014
|
+
var LogLevelSchema$2 = _enum([
|
|
20945
21015
|
"debug",
|
|
20946
21016
|
"info",
|
|
20947
21017
|
"warn",
|
|
@@ -21148,7 +21218,7 @@ var CustomActionInputSchema = object({
|
|
|
21148
21218
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21149
21219
|
addonId: string(),
|
|
21150
21220
|
limit: number().min(1).max(500).default(100),
|
|
21151
|
-
level: LogLevelSchema$
|
|
21221
|
+
level: LogLevelSchema$2.optional()
|
|
21152
21222
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21153
21223
|
packageName: string(),
|
|
21154
21224
|
version: string().optional()
|
|
@@ -21246,7 +21316,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21246
21316
|
auth: "admin"
|
|
21247
21317
|
}), method(object({
|
|
21248
21318
|
addonId: string(),
|
|
21249
|
-
level: LogLevelSchema$
|
|
21319
|
+
level: LogLevelSchema$2.optional()
|
|
21250
21320
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21251
21321
|
object({
|
|
21252
21322
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22240,6 +22310,35 @@ var FaceFilterEnum = _enum([
|
|
|
22240
22310
|
"identified",
|
|
22241
22311
|
"all"
|
|
22242
22312
|
]);
|
|
22313
|
+
/**
|
|
22314
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22315
|
+
*
|
|
22316
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22317
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22318
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22319
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22320
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
22321
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
22322
|
+
*
|
|
22323
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
22324
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
22325
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
22326
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
22327
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
22328
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
22329
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
22330
|
+
* backend's NULL-collation accident.
|
|
22331
|
+
*/
|
|
22332
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
22333
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
22334
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
22335
|
+
* never leaves the server. */
|
|
22336
|
+
var FaceClusterSchema = object({
|
|
22337
|
+
faceIds: array(string()).readonly(),
|
|
22338
|
+
representativeFaceId: string(),
|
|
22339
|
+
size: number().int(),
|
|
22340
|
+
cohesion: number()
|
|
22341
|
+
});
|
|
22243
22342
|
var MediaFileLiteSchema$1 = object({
|
|
22244
22343
|
key: string(),
|
|
22245
22344
|
kind: string(),
|
|
@@ -22286,24 +22385,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22286
22385
|
kind: "mutation",
|
|
22287
22386
|
auth: "admin"
|
|
22288
22387
|
}), method(object({
|
|
22289
|
-
/**
|
|
22388
|
+
/**
|
|
22389
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
22390
|
+
*
|
|
22391
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
22392
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
22393
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
22394
|
+
* present, and this field is then ignored rather than unioned, so
|
|
22395
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
22396
|
+
*/
|
|
22290
22397
|
deviceId: number().int().optional(),
|
|
22398
|
+
/**
|
|
22399
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
22400
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
22401
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
22402
|
+
* about to discard).
|
|
22403
|
+
*
|
|
22404
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
22405
|
+
* "every camera". A request for no devices is a request, not an
|
|
22406
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
22407
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
22408
|
+
*
|
|
22409
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
22410
|
+
*/
|
|
22411
|
+
deviceIds: array(number().int()).optional(),
|
|
22291
22412
|
limit: number().int().positive().optional(),
|
|
22292
22413
|
filter: FaceFilterEnum.optional(),
|
|
22293
22414
|
/**
|
|
22294
|
-
*
|
|
22295
|
-
*
|
|
22415
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22416
|
+
* Absent means no lower bound.
|
|
22417
|
+
*/
|
|
22418
|
+
since: number().int().optional(),
|
|
22419
|
+
/**
|
|
22420
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22421
|
+
* Absent means no upper bound.
|
|
22422
|
+
*/
|
|
22423
|
+
until: number().int().optional(),
|
|
22424
|
+
/**
|
|
22425
|
+
* Order the page by time or by suggestion certainty. Default
|
|
22426
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
22427
|
+
* that does not ask.
|
|
22296
22428
|
*
|
|
22297
|
-
*
|
|
22298
|
-
*
|
|
22299
|
-
* the browser cache the images.
|
|
22429
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
22430
|
+
* does under `'suggestionConfidence'`.
|
|
22300
22431
|
*
|
|
22301
|
-
*
|
|
22302
|
-
*
|
|
22303
|
-
*
|
|
22304
|
-
*
|
|
22305
|
-
*
|
|
22306
|
-
|
|
22432
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
22433
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
22434
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
22435
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
22436
|
+
* with {@link since} / {@link until}.
|
|
22437
|
+
*/
|
|
22438
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
22439
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
22440
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
22441
|
+
/**
|
|
22442
|
+
* Inline the base64 crop on every row.
|
|
22443
|
+
*
|
|
22444
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
22445
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
22446
|
+
* this for every gallery, and which records why the inline shape had
|
|
22447
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
22448
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
22449
|
+
* that describes the old design reads as permission to rely on it.
|
|
22450
|
+
*
|
|
22451
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
22452
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
22453
|
+
* cached and ETagged.
|
|
22307
22454
|
*/
|
|
22308
22455
|
includeCrops: boolean().optional()
|
|
22309
22456
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -22339,13 +22486,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22339
22486
|
}), method(object({
|
|
22340
22487
|
threshold: number().min(0).max(1).optional(),
|
|
22341
22488
|
minClusterSize: number().int().min(2).optional(),
|
|
22342
|
-
|
|
22343
|
-
|
|
22344
|
-
|
|
22345
|
-
|
|
22346
|
-
|
|
22347
|
-
|
|
22348
|
-
|
|
22489
|
+
/**
|
|
22490
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
22491
|
+
* which read as though it bounded the work — it never did.
|
|
22492
|
+
*
|
|
22493
|
+
* Wins over {@link limit} when both are sent.
|
|
22494
|
+
*/
|
|
22495
|
+
maxClusters: number().int().positive().optional(),
|
|
22496
|
+
/**
|
|
22497
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
22498
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
22499
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
22500
|
+
*/
|
|
22501
|
+
limit: number().int().positive().optional(),
|
|
22502
|
+
/**
|
|
22503
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
22504
|
+
* POOL, not the result.
|
|
22505
|
+
*
|
|
22506
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
22507
|
+
* used to read every unassigned face on the hub no matter what the
|
|
22508
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
22509
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
22510
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
22511
|
+
*
|
|
22512
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
22513
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
22514
|
+
* sample it randomly.
|
|
22515
|
+
*
|
|
22516
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
22517
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
22518
|
+
* unbounded scan can never come back as the table grows.
|
|
22519
|
+
*/
|
|
22520
|
+
maxFacesScanned: number().int().positive().optional()
|
|
22521
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
22349
22522
|
/**
|
|
22350
22523
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
22351
22524
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26068,6 +26241,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26068
26241
|
latitude: number().min(-90).max(90),
|
|
26069
26242
|
longitude: number().min(-180).max(180)
|
|
26070
26243
|
}).nullable();
|
|
26244
|
+
/**
|
|
26245
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26246
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26247
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26248
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26249
|
+
*/
|
|
26250
|
+
var RequestCensusGroupSchema = object({
|
|
26251
|
+
procedure: string(),
|
|
26252
|
+
userAgent: string(),
|
|
26253
|
+
ip: string(),
|
|
26254
|
+
principal: string(),
|
|
26255
|
+
calls: number(),
|
|
26256
|
+
perMin: number()
|
|
26257
|
+
});
|
|
26258
|
+
/**
|
|
26259
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26260
|
+
*
|
|
26261
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26262
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26263
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26264
|
+
*/
|
|
26265
|
+
var RequestCensusProcedureSchema = object({
|
|
26266
|
+
procedure: string(),
|
|
26267
|
+
calls: number(),
|
|
26268
|
+
perMin: number()
|
|
26269
|
+
});
|
|
26270
|
+
/**
|
|
26271
|
+
* The census as an operator sees it.
|
|
26272
|
+
*
|
|
26273
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26274
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26275
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26276
|
+
* like one that succeeded.
|
|
26277
|
+
*/
|
|
26278
|
+
var RequestCensusStatusSchema = object({
|
|
26279
|
+
armed: boolean(),
|
|
26280
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26281
|
+
elapsedMs: number(),
|
|
26282
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26283
|
+
windowMs: number(),
|
|
26284
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26285
|
+
armedUntilMs: number(),
|
|
26286
|
+
httpRequests: number(),
|
|
26287
|
+
batchedRequests: number(),
|
|
26288
|
+
/**
|
|
26289
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
26290
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
26291
|
+
* the number comparable with a store-side call count.
|
|
26292
|
+
*/
|
|
26293
|
+
procedureCalls: number(),
|
|
26294
|
+
/**
|
|
26295
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26296
|
+
* transport resolves one context per connection - but the number that says
|
|
26297
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
26298
|
+
*/
|
|
26299
|
+
wsConnections: number(),
|
|
26300
|
+
distinctGroups: number(),
|
|
26301
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
26302
|
+
* cardinality bound. */
|
|
26303
|
+
unattributedCalls: number(),
|
|
26304
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26305
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
26306
|
+
}).extend({ persisted: boolean() });
|
|
26307
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
26308
|
+
var LogLevelSchema$1 = _enum([
|
|
26309
|
+
"debug",
|
|
26310
|
+
"info",
|
|
26311
|
+
"warn",
|
|
26312
|
+
"error"
|
|
26313
|
+
]);
|
|
26314
|
+
/**
|
|
26315
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
26316
|
+
*
|
|
26317
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
26318
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
26319
|
+
*/
|
|
26320
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
26321
|
+
/**
|
|
26322
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
26323
|
+
* layer that carries an explicit value wins.
|
|
26324
|
+
*
|
|
26325
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
26326
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
26327
|
+
* grow later would force every consumer of this document to change with it.
|
|
26328
|
+
* Nothing returns `component` today.
|
|
26329
|
+
*/
|
|
26330
|
+
var LoggingScopeKindSchema = _enum([
|
|
26331
|
+
"cluster",
|
|
26332
|
+
"node",
|
|
26333
|
+
"component"
|
|
26334
|
+
]);
|
|
26335
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
26336
|
+
var LoggingLevelSourceSchema = _enum([
|
|
26337
|
+
"default",
|
|
26338
|
+
"cluster",
|
|
26339
|
+
"node",
|
|
26340
|
+
"component"
|
|
26341
|
+
]);
|
|
26342
|
+
/**
|
|
26343
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
26344
|
+
*
|
|
26345
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
26346
|
+
* difference between "this node is at `info` because I decided it" and
|
|
26347
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
26348
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
26349
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
26350
|
+
*/
|
|
26351
|
+
var LoggingLevelLayerSchema = object({
|
|
26352
|
+
scope: LoggingScopeKindSchema,
|
|
26353
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26354
|
+
nodeId: string().nullable(),
|
|
26355
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26356
|
+
level: LogLevelSchema$1.nullable()
|
|
26357
|
+
});
|
|
26358
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
26359
|
+
var LoggingEffectiveSchema = object({
|
|
26360
|
+
level: LogLevelSchema$1,
|
|
26361
|
+
levelSource: LoggingLevelSourceSchema
|
|
26362
|
+
});
|
|
26363
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
26364
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
26365
|
+
/**
|
|
26366
|
+
* An armed diagnostic, with its DEADLINE.
|
|
26367
|
+
*
|
|
26368
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
26369
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
26370
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
26371
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
26372
|
+
*/
|
|
26373
|
+
var DiagnosticWindowSchema = object({
|
|
26374
|
+
id: DiagnosticIdSchema,
|
|
26375
|
+
armed: boolean(),
|
|
26376
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26377
|
+
armedUntilMs: number(),
|
|
26378
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26379
|
+
remainingMs: number(),
|
|
26380
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
26381
|
+
* i.e. whether this window would survive a restart. */
|
|
26382
|
+
persisted: boolean()
|
|
26383
|
+
});
|
|
26384
|
+
/**
|
|
26385
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
26386
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
26387
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
26388
|
+
*/
|
|
26389
|
+
var DiagnosticWindowPatchSchema = object({
|
|
26390
|
+
id: DiagnosticIdSchema,
|
|
26391
|
+
armMs: number().int().min(0),
|
|
26392
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
26393
|
+
reportEveryMs: number().int().positive().optional()
|
|
26394
|
+
});
|
|
26395
|
+
/**
|
|
26396
|
+
* A PATCH, and patches MERGE.
|
|
26397
|
+
*
|
|
26398
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
26399
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
26400
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
26401
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
26402
|
+
* turns into an erased one.
|
|
26403
|
+
*/
|
|
26404
|
+
var LoggingSettingsPatchSchema = object({
|
|
26405
|
+
/**
|
|
26406
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
26407
|
+
* addressed scope so it inherits again. A value sets it.
|
|
26408
|
+
*/
|
|
26409
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
26410
|
+
/**
|
|
26411
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26412
|
+
* keeps running — a patch is never a full replacement.
|
|
26413
|
+
*/
|
|
26414
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26415
|
+
});
|
|
26416
|
+
/**
|
|
26417
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
26418
|
+
*
|
|
26419
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
26420
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
26421
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
26422
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
26423
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
26424
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
26425
|
+
* layer selector needs a name the transport does not already own.
|
|
26426
|
+
*/
|
|
26427
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
26428
|
+
var SetLoggingSettingsInputSchema = object({
|
|
26429
|
+
scopeNodeId: string().optional(),
|
|
26430
|
+
patch: LoggingSettingsPatchSchema
|
|
26431
|
+
});
|
|
26432
|
+
/**
|
|
26433
|
+
* The whole document, as read and as returned after every write.
|
|
26434
|
+
*
|
|
26435
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
26436
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
26437
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
26438
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
26439
|
+
* survive a restart.
|
|
26440
|
+
*/
|
|
26441
|
+
var LoggingSettingsStateSchema = object({
|
|
26442
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26443
|
+
scopeNodeId: string().nullable(),
|
|
26444
|
+
effective: LoggingEffectiveSchema,
|
|
26445
|
+
explicit: LoggingExplicitSchema,
|
|
26446
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26447
|
+
persisted: boolean()
|
|
26448
|
+
});
|
|
26071
26449
|
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(), {
|
|
26072
26450
|
kind: "mutation",
|
|
26073
26451
|
auth: "admin"
|
|
@@ -26080,6 +26458,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26080
26458
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26081
26459
|
kind: "mutation",
|
|
26082
26460
|
auth: "admin"
|
|
26461
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
26462
|
+
kind: "mutation",
|
|
26463
|
+
auth: "admin"
|
|
26083
26464
|
});
|
|
26084
26465
|
object({
|
|
26085
26466
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -31911,6 +32292,18 @@ Object.freeze({
|
|
|
31911
32292
|
addonId: null,
|
|
31912
32293
|
access: "create"
|
|
31913
32294
|
},
|
|
32295
|
+
"system.getLoggingSettings": {
|
|
32296
|
+
capName: "system",
|
|
32297
|
+
capScope: "system",
|
|
32298
|
+
addonId: null,
|
|
32299
|
+
access: "view"
|
|
32300
|
+
},
|
|
32301
|
+
"system.getRequestCensus": {
|
|
32302
|
+
capName: "system",
|
|
32303
|
+
capScope: "system",
|
|
32304
|
+
addonId: null,
|
|
32305
|
+
access: "view"
|
|
32306
|
+
},
|
|
31914
32307
|
"system.getRetentionConfig": {
|
|
31915
32308
|
capName: "system",
|
|
31916
32309
|
capScope: "system",
|
|
@@ -31941,6 +32334,12 @@ Object.freeze({
|
|
|
31941
32334
|
addonId: null,
|
|
31942
32335
|
access: "view"
|
|
31943
32336
|
},
|
|
32337
|
+
"system.setLoggingSettings": {
|
|
32338
|
+
capName: "system",
|
|
32339
|
+
capScope: "system",
|
|
32340
|
+
addonId: null,
|
|
32341
|
+
access: "create"
|
|
32342
|
+
},
|
|
31944
32343
|
"system.setRetentionConfig": {
|
|
31945
32344
|
capName: "system",
|
|
31946
32345
|
capScope: "system",
|
|
@@ -33096,6 +33495,10 @@ Object.freeze({
|
|
|
33096
33495
|
name: "deviceId",
|
|
33097
33496
|
form: "single",
|
|
33098
33497
|
optional: true
|
|
33498
|
+
}, {
|
|
33499
|
+
name: "deviceIds",
|
|
33500
|
+
form: "array",
|
|
33501
|
+
optional: true
|
|
33099
33502
|
}],
|
|
33100
33503
|
"fanControl.setDirection": [{
|
|
33101
33504
|
name: "deviceId",
|
|
@@ -34706,7 +35109,38 @@ object({
|
|
|
34706
35109
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34707
35110
|
* reproduce that.
|
|
34708
35111
|
*/
|
|
34709
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
35112
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
35113
|
+
/**
|
|
35114
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35115
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35116
|
+
* subject tiles, on frames that detected something.
|
|
35117
|
+
*
|
|
35118
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35119
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35120
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35121
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35122
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35123
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35124
|
+
*
|
|
35125
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35126
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35127
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35128
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35129
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35130
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35131
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35132
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35133
|
+
* whole shape exists to avoid.
|
|
35134
|
+
*
|
|
35135
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35136
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35137
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35138
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35139
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35140
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35141
|
+
* nothing.
|
|
35142
|
+
*/
|
|
35143
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
34710
35144
|
});
|
|
34711
35145
|
/**
|
|
34712
35146
|
* The values in force when the operator has set nothing.
|
|
@@ -34722,12 +35156,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
34722
35156
|
budgetMb: 1024,
|
|
34723
35157
|
activityMs: 15e3,
|
|
34724
35158
|
tileBudgetMb: 64,
|
|
35159
|
+
sceneBudgetMb: 48,
|
|
34725
35160
|
admission: "inferred"
|
|
34726
35161
|
};
|
|
34727
35162
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34728
35163
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34729
35164
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34730
35165
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35166
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
34731
35167
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34732
35168
|
var MB = 1024 * 1024;
|
|
34733
35169
|
1024 * MB, 3072 * MB;
|
package/dist/index.mjs
CHANGED
|
@@ -7522,6 +7522,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7522
7522
|
/** Max rows returned, newest-first. */
|
|
7523
7523
|
limit: number().int().min(1).max(1e3).optional()
|
|
7524
7524
|
});
|
|
7525
|
+
var LabelDefinitionSchema = object({
|
|
7526
|
+
id: string(),
|
|
7527
|
+
name: string(),
|
|
7528
|
+
category: string().optional(),
|
|
7529
|
+
description: string().optional(),
|
|
7530
|
+
icon: string().optional()
|
|
7531
|
+
});
|
|
7532
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7533
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7534
|
+
"person",
|
|
7535
|
+
"vehicle",
|
|
7536
|
+
"animal",
|
|
7537
|
+
"package"
|
|
7538
|
+
];
|
|
7539
|
+
/**
|
|
7540
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7541
|
+
* un operatore può selezionare.
|
|
7542
|
+
*
|
|
7543
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7544
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7545
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7546
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7547
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7548
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7549
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7550
|
+
*
|
|
7551
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7552
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7553
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7554
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7555
|
+
* successiva.
|
|
7556
|
+
*/
|
|
7557
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7558
|
+
"person",
|
|
7559
|
+
"vehicle",
|
|
7560
|
+
"animal"
|
|
7561
|
+
];
|
|
7562
|
+
/**
|
|
7563
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7564
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7565
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7566
|
+
* detection pipeline executor actually routes.
|
|
7567
|
+
*
|
|
7568
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7569
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7570
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7571
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7572
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7573
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7574
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7575
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7576
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7577
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7578
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7579
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7580
|
+
*/
|
|
7581
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7582
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7583
|
+
preserveOriginal: boolean()
|
|
7584
|
+
});
|
|
7525
7585
|
/**
|
|
7526
7586
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7527
7587
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7544,10 +7604,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7544
7604
|
"events",
|
|
7545
7605
|
"continuous"
|
|
7546
7606
|
]);
|
|
7607
|
+
/**
|
|
7608
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7609
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7610
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7611
|
+
*/
|
|
7612
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7613
|
+
/**
|
|
7614
|
+
* True quando `values` non ripete un elemento.
|
|
7615
|
+
*
|
|
7616
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7617
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7618
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7619
|
+
*/
|
|
7620
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7547
7621
|
/** Which detectors trigger an `events`-mode band. */
|
|
7548
7622
|
var RecordingTriggersSchema = object({
|
|
7549
7623
|
motion: boolean().optional(),
|
|
7550
|
-
audioThresholdDbfs: number().optional()
|
|
7624
|
+
audioThresholdDbfs: number().optional(),
|
|
7625
|
+
/**
|
|
7626
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7627
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7628
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7629
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7630
|
+
*
|
|
7631
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7632
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7633
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7634
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7635
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7636
|
+
*/
|
|
7637
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7638
|
+
/**
|
|
7639
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7640
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7641
|
+
* `objectClasses`.
|
|
7642
|
+
*
|
|
7643
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7644
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7645
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7646
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7647
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7648
|
+
*
|
|
7649
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7650
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7651
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7652
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7653
|
+
* registrare.
|
|
7654
|
+
*/
|
|
7655
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7551
7656
|
});
|
|
7552
7657
|
/**
|
|
7553
7658
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -7999,41 +8104,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
7999
8104
|
*/
|
|
8000
8105
|
debug: boolean().optional()
|
|
8001
8106
|
});
|
|
8002
|
-
var LabelDefinitionSchema = object({
|
|
8003
|
-
id: string(),
|
|
8004
|
-
name: string(),
|
|
8005
|
-
category: string().optional(),
|
|
8006
|
-
description: string().optional(),
|
|
8007
|
-
icon: string().optional()
|
|
8008
|
-
});
|
|
8009
|
-
/**
|
|
8010
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8011
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8012
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8013
|
-
* detection pipeline executor actually routes.
|
|
8014
|
-
*
|
|
8015
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8016
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8017
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8018
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8019
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8020
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8021
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8022
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8023
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8024
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8025
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8026
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8027
|
-
*/
|
|
8028
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8029
|
-
mapping: record(string(), _enum([
|
|
8030
|
-
"person",
|
|
8031
|
-
"vehicle",
|
|
8032
|
-
"animal",
|
|
8033
|
-
"package"
|
|
8034
|
-
])),
|
|
8035
|
-
preserveOriginal: boolean()
|
|
8036
|
-
});
|
|
8037
8107
|
var MODEL_FORMATS = [
|
|
8038
8108
|
"onnx",
|
|
8039
8109
|
"coreml",
|
|
@@ -20937,7 +21007,7 @@ var lifecycleJobSchema = object({
|
|
|
20937
21007
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
20938
21008
|
* as every other cap.
|
|
20939
21009
|
*/
|
|
20940
|
-
var LogLevelSchema$
|
|
21010
|
+
var LogLevelSchema$2 = _enum([
|
|
20941
21011
|
"debug",
|
|
20942
21012
|
"info",
|
|
20943
21013
|
"warn",
|
|
@@ -21144,7 +21214,7 @@ var CustomActionInputSchema = object({
|
|
|
21144
21214
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21145
21215
|
addonId: string(),
|
|
21146
21216
|
limit: number().min(1).max(500).default(100),
|
|
21147
|
-
level: LogLevelSchema$
|
|
21217
|
+
level: LogLevelSchema$2.optional()
|
|
21148
21218
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21149
21219
|
packageName: string(),
|
|
21150
21220
|
version: string().optional()
|
|
@@ -21242,7 +21312,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21242
21312
|
auth: "admin"
|
|
21243
21313
|
}), method(object({
|
|
21244
21314
|
addonId: string(),
|
|
21245
|
-
level: LogLevelSchema$
|
|
21315
|
+
level: LogLevelSchema$2.optional()
|
|
21246
21316
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21247
21317
|
object({
|
|
21248
21318
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22236,6 +22306,35 @@ var FaceFilterEnum = _enum([
|
|
|
22236
22306
|
"identified",
|
|
22237
22307
|
"all"
|
|
22238
22308
|
]);
|
|
22309
|
+
/**
|
|
22310
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22311
|
+
*
|
|
22312
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22313
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22314
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22315
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22316
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
22317
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
22318
|
+
*
|
|
22319
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
22320
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
22321
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
22322
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
22323
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
22324
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
22325
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
22326
|
+
* backend's NULL-collation accident.
|
|
22327
|
+
*/
|
|
22328
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
22329
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
22330
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
22331
|
+
* never leaves the server. */
|
|
22332
|
+
var FaceClusterSchema = object({
|
|
22333
|
+
faceIds: array(string()).readonly(),
|
|
22334
|
+
representativeFaceId: string(),
|
|
22335
|
+
size: number().int(),
|
|
22336
|
+
cohesion: number()
|
|
22337
|
+
});
|
|
22239
22338
|
var MediaFileLiteSchema$1 = object({
|
|
22240
22339
|
key: string(),
|
|
22241
22340
|
kind: string(),
|
|
@@ -22282,24 +22381,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22282
22381
|
kind: "mutation",
|
|
22283
22382
|
auth: "admin"
|
|
22284
22383
|
}), method(object({
|
|
22285
|
-
/**
|
|
22384
|
+
/**
|
|
22385
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
22386
|
+
*
|
|
22387
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
22388
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
22389
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
22390
|
+
* present, and this field is then ignored rather than unioned, so
|
|
22391
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
22392
|
+
*/
|
|
22286
22393
|
deviceId: number().int().optional(),
|
|
22394
|
+
/**
|
|
22395
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
22396
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
22397
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
22398
|
+
* about to discard).
|
|
22399
|
+
*
|
|
22400
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
22401
|
+
* "every camera". A request for no devices is a request, not an
|
|
22402
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
22403
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
22404
|
+
*
|
|
22405
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
22406
|
+
*/
|
|
22407
|
+
deviceIds: array(number().int()).optional(),
|
|
22287
22408
|
limit: number().int().positive().optional(),
|
|
22288
22409
|
filter: FaceFilterEnum.optional(),
|
|
22289
22410
|
/**
|
|
22290
|
-
*
|
|
22291
|
-
*
|
|
22411
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22412
|
+
* Absent means no lower bound.
|
|
22413
|
+
*/
|
|
22414
|
+
since: number().int().optional(),
|
|
22415
|
+
/**
|
|
22416
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22417
|
+
* Absent means no upper bound.
|
|
22418
|
+
*/
|
|
22419
|
+
until: number().int().optional(),
|
|
22420
|
+
/**
|
|
22421
|
+
* Order the page by time or by suggestion certainty. Default
|
|
22422
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
22423
|
+
* that does not ask.
|
|
22292
22424
|
*
|
|
22293
|
-
*
|
|
22294
|
-
*
|
|
22295
|
-
* the browser cache the images.
|
|
22425
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
22426
|
+
* does under `'suggestionConfidence'`.
|
|
22296
22427
|
*
|
|
22297
|
-
*
|
|
22298
|
-
*
|
|
22299
|
-
*
|
|
22300
|
-
*
|
|
22301
|
-
*
|
|
22302
|
-
|
|
22428
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
22429
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
22430
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
22431
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
22432
|
+
* with {@link since} / {@link until}.
|
|
22433
|
+
*/
|
|
22434
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
22435
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
22436
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
22437
|
+
/**
|
|
22438
|
+
* Inline the base64 crop on every row.
|
|
22439
|
+
*
|
|
22440
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
22441
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
22442
|
+
* this for every gallery, and which records why the inline shape had
|
|
22443
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
22444
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
22445
|
+
* that describes the old design reads as permission to rely on it.
|
|
22446
|
+
*
|
|
22447
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
22448
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
22449
|
+
* cached and ETagged.
|
|
22303
22450
|
*/
|
|
22304
22451
|
includeCrops: boolean().optional()
|
|
22305
22452
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -22335,13 +22482,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22335
22482
|
}), method(object({
|
|
22336
22483
|
threshold: number().min(0).max(1).optional(),
|
|
22337
22484
|
minClusterSize: number().int().min(2).optional(),
|
|
22338
|
-
|
|
22339
|
-
|
|
22340
|
-
|
|
22341
|
-
|
|
22342
|
-
|
|
22343
|
-
|
|
22344
|
-
|
|
22485
|
+
/**
|
|
22486
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
22487
|
+
* which read as though it bounded the work — it never did.
|
|
22488
|
+
*
|
|
22489
|
+
* Wins over {@link limit} when both are sent.
|
|
22490
|
+
*/
|
|
22491
|
+
maxClusters: number().int().positive().optional(),
|
|
22492
|
+
/**
|
|
22493
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
22494
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
22495
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
22496
|
+
*/
|
|
22497
|
+
limit: number().int().positive().optional(),
|
|
22498
|
+
/**
|
|
22499
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
22500
|
+
* POOL, not the result.
|
|
22501
|
+
*
|
|
22502
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
22503
|
+
* used to read every unassigned face on the hub no matter what the
|
|
22504
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
22505
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
22506
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
22507
|
+
*
|
|
22508
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
22509
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
22510
|
+
* sample it randomly.
|
|
22511
|
+
*
|
|
22512
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
22513
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
22514
|
+
* unbounded scan can never come back as the table grows.
|
|
22515
|
+
*/
|
|
22516
|
+
maxFacesScanned: number().int().positive().optional()
|
|
22517
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
22345
22518
|
/**
|
|
22346
22519
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
22347
22520
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26064,6 +26237,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26064
26237
|
latitude: number().min(-90).max(90),
|
|
26065
26238
|
longitude: number().min(-180).max(180)
|
|
26066
26239
|
}).nullable();
|
|
26240
|
+
/**
|
|
26241
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26242
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26243
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26244
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26245
|
+
*/
|
|
26246
|
+
var RequestCensusGroupSchema = object({
|
|
26247
|
+
procedure: string(),
|
|
26248
|
+
userAgent: string(),
|
|
26249
|
+
ip: string(),
|
|
26250
|
+
principal: string(),
|
|
26251
|
+
calls: number(),
|
|
26252
|
+
perMin: number()
|
|
26253
|
+
});
|
|
26254
|
+
/**
|
|
26255
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26256
|
+
*
|
|
26257
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26258
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26259
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26260
|
+
*/
|
|
26261
|
+
var RequestCensusProcedureSchema = object({
|
|
26262
|
+
procedure: string(),
|
|
26263
|
+
calls: number(),
|
|
26264
|
+
perMin: number()
|
|
26265
|
+
});
|
|
26266
|
+
/**
|
|
26267
|
+
* The census as an operator sees it.
|
|
26268
|
+
*
|
|
26269
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26270
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26271
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26272
|
+
* like one that succeeded.
|
|
26273
|
+
*/
|
|
26274
|
+
var RequestCensusStatusSchema = object({
|
|
26275
|
+
armed: boolean(),
|
|
26276
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26277
|
+
elapsedMs: number(),
|
|
26278
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26279
|
+
windowMs: number(),
|
|
26280
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26281
|
+
armedUntilMs: number(),
|
|
26282
|
+
httpRequests: number(),
|
|
26283
|
+
batchedRequests: number(),
|
|
26284
|
+
/**
|
|
26285
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
26286
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
26287
|
+
* the number comparable with a store-side call count.
|
|
26288
|
+
*/
|
|
26289
|
+
procedureCalls: number(),
|
|
26290
|
+
/**
|
|
26291
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26292
|
+
* transport resolves one context per connection - but the number that says
|
|
26293
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
26294
|
+
*/
|
|
26295
|
+
wsConnections: number(),
|
|
26296
|
+
distinctGroups: number(),
|
|
26297
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
26298
|
+
* cardinality bound. */
|
|
26299
|
+
unattributedCalls: number(),
|
|
26300
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26301
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
26302
|
+
}).extend({ persisted: boolean() });
|
|
26303
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
26304
|
+
var LogLevelSchema$1 = _enum([
|
|
26305
|
+
"debug",
|
|
26306
|
+
"info",
|
|
26307
|
+
"warn",
|
|
26308
|
+
"error"
|
|
26309
|
+
]);
|
|
26310
|
+
/**
|
|
26311
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
26312
|
+
*
|
|
26313
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
26314
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
26315
|
+
*/
|
|
26316
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
26317
|
+
/**
|
|
26318
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
26319
|
+
* layer that carries an explicit value wins.
|
|
26320
|
+
*
|
|
26321
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
26322
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
26323
|
+
* grow later would force every consumer of this document to change with it.
|
|
26324
|
+
* Nothing returns `component` today.
|
|
26325
|
+
*/
|
|
26326
|
+
var LoggingScopeKindSchema = _enum([
|
|
26327
|
+
"cluster",
|
|
26328
|
+
"node",
|
|
26329
|
+
"component"
|
|
26330
|
+
]);
|
|
26331
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
26332
|
+
var LoggingLevelSourceSchema = _enum([
|
|
26333
|
+
"default",
|
|
26334
|
+
"cluster",
|
|
26335
|
+
"node",
|
|
26336
|
+
"component"
|
|
26337
|
+
]);
|
|
26338
|
+
/**
|
|
26339
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
26340
|
+
*
|
|
26341
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
26342
|
+
* difference between "this node is at `info` because I decided it" and
|
|
26343
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
26344
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
26345
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
26346
|
+
*/
|
|
26347
|
+
var LoggingLevelLayerSchema = object({
|
|
26348
|
+
scope: LoggingScopeKindSchema,
|
|
26349
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26350
|
+
nodeId: string().nullable(),
|
|
26351
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26352
|
+
level: LogLevelSchema$1.nullable()
|
|
26353
|
+
});
|
|
26354
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
26355
|
+
var LoggingEffectiveSchema = object({
|
|
26356
|
+
level: LogLevelSchema$1,
|
|
26357
|
+
levelSource: LoggingLevelSourceSchema
|
|
26358
|
+
});
|
|
26359
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
26360
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
26361
|
+
/**
|
|
26362
|
+
* An armed diagnostic, with its DEADLINE.
|
|
26363
|
+
*
|
|
26364
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
26365
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
26366
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
26367
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
26368
|
+
*/
|
|
26369
|
+
var DiagnosticWindowSchema = object({
|
|
26370
|
+
id: DiagnosticIdSchema,
|
|
26371
|
+
armed: boolean(),
|
|
26372
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26373
|
+
armedUntilMs: number(),
|
|
26374
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26375
|
+
remainingMs: number(),
|
|
26376
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
26377
|
+
* i.e. whether this window would survive a restart. */
|
|
26378
|
+
persisted: boolean()
|
|
26379
|
+
});
|
|
26380
|
+
/**
|
|
26381
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
26382
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
26383
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
26384
|
+
*/
|
|
26385
|
+
var DiagnosticWindowPatchSchema = object({
|
|
26386
|
+
id: DiagnosticIdSchema,
|
|
26387
|
+
armMs: number().int().min(0),
|
|
26388
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
26389
|
+
reportEveryMs: number().int().positive().optional()
|
|
26390
|
+
});
|
|
26391
|
+
/**
|
|
26392
|
+
* A PATCH, and patches MERGE.
|
|
26393
|
+
*
|
|
26394
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
26395
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
26396
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
26397
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
26398
|
+
* turns into an erased one.
|
|
26399
|
+
*/
|
|
26400
|
+
var LoggingSettingsPatchSchema = object({
|
|
26401
|
+
/**
|
|
26402
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
26403
|
+
* addressed scope so it inherits again. A value sets it.
|
|
26404
|
+
*/
|
|
26405
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
26406
|
+
/**
|
|
26407
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26408
|
+
* keeps running — a patch is never a full replacement.
|
|
26409
|
+
*/
|
|
26410
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26411
|
+
});
|
|
26412
|
+
/**
|
|
26413
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
26414
|
+
*
|
|
26415
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
26416
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
26417
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
26418
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
26419
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
26420
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
26421
|
+
* layer selector needs a name the transport does not already own.
|
|
26422
|
+
*/
|
|
26423
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
26424
|
+
var SetLoggingSettingsInputSchema = object({
|
|
26425
|
+
scopeNodeId: string().optional(),
|
|
26426
|
+
patch: LoggingSettingsPatchSchema
|
|
26427
|
+
});
|
|
26428
|
+
/**
|
|
26429
|
+
* The whole document, as read and as returned after every write.
|
|
26430
|
+
*
|
|
26431
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
26432
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
26433
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
26434
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
26435
|
+
* survive a restart.
|
|
26436
|
+
*/
|
|
26437
|
+
var LoggingSettingsStateSchema = object({
|
|
26438
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26439
|
+
scopeNodeId: string().nullable(),
|
|
26440
|
+
effective: LoggingEffectiveSchema,
|
|
26441
|
+
explicit: LoggingExplicitSchema,
|
|
26442
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26443
|
+
persisted: boolean()
|
|
26444
|
+
});
|
|
26067
26445
|
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(), {
|
|
26068
26446
|
kind: "mutation",
|
|
26069
26447
|
auth: "admin"
|
|
@@ -26076,6 +26454,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26076
26454
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26077
26455
|
kind: "mutation",
|
|
26078
26456
|
auth: "admin"
|
|
26457
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
26458
|
+
kind: "mutation",
|
|
26459
|
+
auth: "admin"
|
|
26079
26460
|
});
|
|
26080
26461
|
object({
|
|
26081
26462
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -31907,6 +32288,18 @@ Object.freeze({
|
|
|
31907
32288
|
addonId: null,
|
|
31908
32289
|
access: "create"
|
|
31909
32290
|
},
|
|
32291
|
+
"system.getLoggingSettings": {
|
|
32292
|
+
capName: "system",
|
|
32293
|
+
capScope: "system",
|
|
32294
|
+
addonId: null,
|
|
32295
|
+
access: "view"
|
|
32296
|
+
},
|
|
32297
|
+
"system.getRequestCensus": {
|
|
32298
|
+
capName: "system",
|
|
32299
|
+
capScope: "system",
|
|
32300
|
+
addonId: null,
|
|
32301
|
+
access: "view"
|
|
32302
|
+
},
|
|
31910
32303
|
"system.getRetentionConfig": {
|
|
31911
32304
|
capName: "system",
|
|
31912
32305
|
capScope: "system",
|
|
@@ -31937,6 +32330,12 @@ Object.freeze({
|
|
|
31937
32330
|
addonId: null,
|
|
31938
32331
|
access: "view"
|
|
31939
32332
|
},
|
|
32333
|
+
"system.setLoggingSettings": {
|
|
32334
|
+
capName: "system",
|
|
32335
|
+
capScope: "system",
|
|
32336
|
+
addonId: null,
|
|
32337
|
+
access: "create"
|
|
32338
|
+
},
|
|
31940
32339
|
"system.setRetentionConfig": {
|
|
31941
32340
|
capName: "system",
|
|
31942
32341
|
capScope: "system",
|
|
@@ -33092,6 +33491,10 @@ Object.freeze({
|
|
|
33092
33491
|
name: "deviceId",
|
|
33093
33492
|
form: "single",
|
|
33094
33493
|
optional: true
|
|
33494
|
+
}, {
|
|
33495
|
+
name: "deviceIds",
|
|
33496
|
+
form: "array",
|
|
33497
|
+
optional: true
|
|
33095
33498
|
}],
|
|
33096
33499
|
"fanControl.setDirection": [{
|
|
33097
33500
|
name: "deviceId",
|
|
@@ -34702,7 +35105,38 @@ object({
|
|
|
34702
35105
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34703
35106
|
* reproduce that.
|
|
34704
35107
|
*/
|
|
34705
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
35108
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
35109
|
+
/**
|
|
35110
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35111
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35112
|
+
* subject tiles, on frames that detected something.
|
|
35113
|
+
*
|
|
35114
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35115
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35116
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35117
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35118
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35119
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35120
|
+
*
|
|
35121
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35122
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35123
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35124
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35125
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35126
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35127
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35128
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35129
|
+
* whole shape exists to avoid.
|
|
35130
|
+
*
|
|
35131
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35132
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35133
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35134
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35135
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35136
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35137
|
+
* nothing.
|
|
35138
|
+
*/
|
|
35139
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
34706
35140
|
});
|
|
34707
35141
|
/**
|
|
34708
35142
|
* The values in force when the operator has set nothing.
|
|
@@ -34718,12 +35152,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
34718
35152
|
budgetMb: 1024,
|
|
34719
35153
|
activityMs: 15e3,
|
|
34720
35154
|
tileBudgetMb: 64,
|
|
35155
|
+
sceneBudgetMb: 48,
|
|
34721
35156
|
admission: "inferred"
|
|
34722
35157
|
};
|
|
34723
35158
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34724
35159
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34725
35160
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34726
35161
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35162
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
34727
35163
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34728
35164
|
var MB = 1024 * 1024;
|
|
34729
35165
|
1024 * MB, 3072 * MB;
|