@camstack/addon-provider-rademacher 0.2.30 → 0.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/addon.js +495 -59
- package/dist/addon.mjs +495 -59
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8511,6 +8511,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
8511
8511
|
/** Max rows returned, newest-first. */
|
|
8512
8512
|
limit: number().int().min(1).max(1e3).optional()
|
|
8513
8513
|
});
|
|
8514
|
+
var LabelDefinitionSchema = object({
|
|
8515
|
+
id: string(),
|
|
8516
|
+
name: string(),
|
|
8517
|
+
category: string().optional(),
|
|
8518
|
+
description: string().optional(),
|
|
8519
|
+
icon: string().optional()
|
|
8520
|
+
});
|
|
8521
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
8522
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
8523
|
+
"person",
|
|
8524
|
+
"vehicle",
|
|
8525
|
+
"animal",
|
|
8526
|
+
"package"
|
|
8527
|
+
];
|
|
8528
|
+
/**
|
|
8529
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
8530
|
+
* un operatore può selezionare.
|
|
8531
|
+
*
|
|
8532
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
8533
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
8534
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
8535
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
8536
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
8537
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
8538
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
8539
|
+
*
|
|
8540
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
8541
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
8542
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
8543
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
8544
|
+
* successiva.
|
|
8545
|
+
*/
|
|
8546
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
8547
|
+
"person",
|
|
8548
|
+
"vehicle",
|
|
8549
|
+
"animal"
|
|
8550
|
+
];
|
|
8551
|
+
/**
|
|
8552
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
8553
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8554
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8555
|
+
* detection pipeline executor actually routes.
|
|
8556
|
+
*
|
|
8557
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8558
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8559
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8560
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8561
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8562
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8563
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8564
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8565
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8566
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8567
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8568
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8569
|
+
*/
|
|
8570
|
+
var DetectionCatalogClassMapSchema = object({
|
|
8571
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
8572
|
+
preserveOriginal: boolean()
|
|
8573
|
+
});
|
|
8514
8574
|
/**
|
|
8515
8575
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
8516
8576
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -8533,10 +8593,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
8533
8593
|
"events",
|
|
8534
8594
|
"continuous"
|
|
8535
8595
|
]);
|
|
8596
|
+
/**
|
|
8597
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
8598
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
8599
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
8600
|
+
*/
|
|
8601
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
8602
|
+
/**
|
|
8603
|
+
* True quando `values` non ripete un elemento.
|
|
8604
|
+
*
|
|
8605
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
8606
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
8607
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
8608
|
+
*/
|
|
8609
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
8536
8610
|
/** Which detectors trigger an `events`-mode band. */
|
|
8537
8611
|
var RecordingTriggersSchema = object({
|
|
8538
8612
|
motion: boolean().optional(),
|
|
8539
|
-
audioThresholdDbfs: number().optional()
|
|
8613
|
+
audioThresholdDbfs: number().optional(),
|
|
8614
|
+
/**
|
|
8615
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
8616
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
8617
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
8618
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
8619
|
+
*
|
|
8620
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
8621
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
8622
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
8623
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
8624
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
8625
|
+
*/
|
|
8626
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
8627
|
+
/**
|
|
8628
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
8629
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
8630
|
+
* `objectClasses`.
|
|
8631
|
+
*
|
|
8632
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
8633
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
8634
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
8635
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
8636
|
+
* device (D12) — mai un elenco globale di cap.
|
|
8637
|
+
*
|
|
8638
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
8639
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
8640
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
8641
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8642
|
+
* registrare.
|
|
8643
|
+
*/
|
|
8644
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8540
8645
|
});
|
|
8541
8646
|
/**
|
|
8542
8647
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8988,41 +9093,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8988
9093
|
*/
|
|
8989
9094
|
debug: boolean().optional()
|
|
8990
9095
|
});
|
|
8991
|
-
var LabelDefinitionSchema = object({
|
|
8992
|
-
id: string(),
|
|
8993
|
-
name: string(),
|
|
8994
|
-
category: string().optional(),
|
|
8995
|
-
description: string().optional(),
|
|
8996
|
-
icon: string().optional()
|
|
8997
|
-
});
|
|
8998
|
-
/**
|
|
8999
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
9000
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
9001
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
9002
|
-
* detection pipeline executor actually routes.
|
|
9003
|
-
*
|
|
9004
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
9005
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
9006
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
9007
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
9008
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
9009
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
9010
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
9011
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
9012
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
9013
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
9014
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
9015
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
9016
|
-
*/
|
|
9017
|
-
var DetectionCatalogClassMapSchema = object({
|
|
9018
|
-
mapping: record(string(), _enum([
|
|
9019
|
-
"person",
|
|
9020
|
-
"vehicle",
|
|
9021
|
-
"animal",
|
|
9022
|
-
"package"
|
|
9023
|
-
])),
|
|
9024
|
-
preserveOriginal: boolean()
|
|
9025
|
-
});
|
|
9026
9096
|
var MODEL_FORMATS = [
|
|
9027
9097
|
"onnx",
|
|
9028
9098
|
"coreml",
|
|
@@ -22138,7 +22208,7 @@ var lifecycleJobSchema = object({
|
|
|
22138
22208
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
22139
22209
|
* as every other cap.
|
|
22140
22210
|
*/
|
|
22141
|
-
var LogLevelSchema$
|
|
22211
|
+
var LogLevelSchema$2 = _enum([
|
|
22142
22212
|
"debug",
|
|
22143
22213
|
"info",
|
|
22144
22214
|
"warn",
|
|
@@ -22345,7 +22415,7 @@ var CustomActionInputSchema = object({
|
|
|
22345
22415
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
22346
22416
|
addonId: string(),
|
|
22347
22417
|
limit: number().min(1).max(500).default(100),
|
|
22348
|
-
level: LogLevelSchema$
|
|
22418
|
+
level: LogLevelSchema$2.optional()
|
|
22349
22419
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
22350
22420
|
packageName: string(),
|
|
22351
22421
|
version: string().optional()
|
|
@@ -22443,7 +22513,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
22443
22513
|
auth: "admin"
|
|
22444
22514
|
}), method(object({
|
|
22445
22515
|
addonId: string(),
|
|
22446
|
-
level: LogLevelSchema$
|
|
22516
|
+
level: LogLevelSchema$2.optional()
|
|
22447
22517
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
22448
22518
|
/**
|
|
22449
22519
|
* Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
|
|
@@ -24167,6 +24237,35 @@ var FaceFilterEnum = _enum([
|
|
|
24167
24237
|
"identified",
|
|
24168
24238
|
"all"
|
|
24169
24239
|
]);
|
|
24240
|
+
/**
|
|
24241
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
24242
|
+
*
|
|
24243
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
24244
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
24245
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
24246
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
24247
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
24248
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
24249
|
+
*
|
|
24250
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
24251
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
24252
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
24253
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
24254
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
24255
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
24256
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
24257
|
+
* backend's NULL-collation accident.
|
|
24258
|
+
*/
|
|
24259
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
24260
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
24261
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
24262
|
+
* never leaves the server. */
|
|
24263
|
+
var FaceClusterSchema = object({
|
|
24264
|
+
faceIds: array(string()).readonly(),
|
|
24265
|
+
representativeFaceId: string(),
|
|
24266
|
+
size: number().int(),
|
|
24267
|
+
cohesion: number()
|
|
24268
|
+
});
|
|
24170
24269
|
var MediaFileLiteSchema$1 = object({
|
|
24171
24270
|
key: string(),
|
|
24172
24271
|
kind: string(),
|
|
@@ -24213,24 +24312,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24213
24312
|
kind: "mutation",
|
|
24214
24313
|
auth: "admin"
|
|
24215
24314
|
}), method(object({
|
|
24216
|
-
/**
|
|
24315
|
+
/**
|
|
24316
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
24317
|
+
*
|
|
24318
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
24319
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
24320
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
24321
|
+
* present, and this field is then ignored rather than unioned, so
|
|
24322
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
24323
|
+
*/
|
|
24217
24324
|
deviceId: number().int().optional(),
|
|
24325
|
+
/**
|
|
24326
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
24327
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
24328
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
24329
|
+
* about to discard).
|
|
24330
|
+
*
|
|
24331
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
24332
|
+
* "every camera". A request for no devices is a request, not an
|
|
24333
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
24334
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
24335
|
+
*
|
|
24336
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
24337
|
+
*/
|
|
24338
|
+
deviceIds: array(number().int()).optional(),
|
|
24218
24339
|
limit: number().int().positive().optional(),
|
|
24219
24340
|
filter: FaceFilterEnum.optional(),
|
|
24220
24341
|
/**
|
|
24221
|
-
*
|
|
24222
|
-
*
|
|
24342
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24343
|
+
* Absent means no lower bound.
|
|
24344
|
+
*/
|
|
24345
|
+
since: number().int().optional(),
|
|
24346
|
+
/**
|
|
24347
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24348
|
+
* Absent means no upper bound.
|
|
24349
|
+
*/
|
|
24350
|
+
until: number().int().optional(),
|
|
24351
|
+
/**
|
|
24352
|
+
* Order the page by time or by suggestion certainty. Default
|
|
24353
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
24354
|
+
* that does not ask.
|
|
24223
24355
|
*
|
|
24224
|
-
*
|
|
24225
|
-
*
|
|
24226
|
-
* the browser cache the images.
|
|
24356
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
24357
|
+
* does under `'suggestionConfidence'`.
|
|
24227
24358
|
*
|
|
24228
|
-
*
|
|
24229
|
-
*
|
|
24230
|
-
*
|
|
24231
|
-
*
|
|
24232
|
-
*
|
|
24233
|
-
|
|
24359
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
24360
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
24361
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
24362
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
24363
|
+
* with {@link since} / {@link until}.
|
|
24364
|
+
*/
|
|
24365
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
24366
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
24367
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
24368
|
+
/**
|
|
24369
|
+
* Inline the base64 crop on every row.
|
|
24370
|
+
*
|
|
24371
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
24372
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
24373
|
+
* this for every gallery, and which records why the inline shape had
|
|
24374
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
24375
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
24376
|
+
* that describes the old design reads as permission to rely on it.
|
|
24377
|
+
*
|
|
24378
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
24379
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
24380
|
+
* cached and ETagged.
|
|
24234
24381
|
*/
|
|
24235
24382
|
includeCrops: boolean().optional()
|
|
24236
24383
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -24266,13 +24413,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24266
24413
|
}), method(object({
|
|
24267
24414
|
threshold: number().min(0).max(1).optional(),
|
|
24268
24415
|
minClusterSize: number().int().min(2).optional(),
|
|
24269
|
-
|
|
24270
|
-
|
|
24271
|
-
|
|
24272
|
-
|
|
24273
|
-
|
|
24274
|
-
|
|
24275
|
-
|
|
24416
|
+
/**
|
|
24417
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
24418
|
+
* which read as though it bounded the work — it never did.
|
|
24419
|
+
*
|
|
24420
|
+
* Wins over {@link limit} when both are sent.
|
|
24421
|
+
*/
|
|
24422
|
+
maxClusters: number().int().positive().optional(),
|
|
24423
|
+
/**
|
|
24424
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
24425
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
24426
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
24427
|
+
*/
|
|
24428
|
+
limit: number().int().positive().optional(),
|
|
24429
|
+
/**
|
|
24430
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
24431
|
+
* POOL, not the result.
|
|
24432
|
+
*
|
|
24433
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
24434
|
+
* used to read every unassigned face on the hub no matter what the
|
|
24435
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
24436
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
24437
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
24438
|
+
*
|
|
24439
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
24440
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
24441
|
+
* sample it randomly.
|
|
24442
|
+
*
|
|
24443
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
24444
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
24445
|
+
* unbounded scan can never come back as the table grows.
|
|
24446
|
+
*/
|
|
24447
|
+
maxFacesScanned: number().int().positive().optional()
|
|
24448
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
24276
24449
|
/**
|
|
24277
24450
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
24278
24451
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -29214,6 +29387,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
29214
29387
|
latitude: number().min(-90).max(90),
|
|
29215
29388
|
longitude: number().min(-180).max(180)
|
|
29216
29389
|
}).nullable();
|
|
29390
|
+
/**
|
|
29391
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
29392
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
29393
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
29394
|
+
* already prints - never a token, never an `Authorization` header.
|
|
29395
|
+
*/
|
|
29396
|
+
var RequestCensusGroupSchema = object({
|
|
29397
|
+
procedure: string(),
|
|
29398
|
+
userAgent: string(),
|
|
29399
|
+
ip: string(),
|
|
29400
|
+
principal: string(),
|
|
29401
|
+
calls: number(),
|
|
29402
|
+
perMin: number()
|
|
29403
|
+
});
|
|
29404
|
+
/**
|
|
29405
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
29406
|
+
*
|
|
29407
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
29408
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
29409
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
29410
|
+
*/
|
|
29411
|
+
var RequestCensusProcedureSchema = object({
|
|
29412
|
+
procedure: string(),
|
|
29413
|
+
calls: number(),
|
|
29414
|
+
perMin: number()
|
|
29415
|
+
});
|
|
29416
|
+
/**
|
|
29417
|
+
* The census as an operator sees it.
|
|
29418
|
+
*
|
|
29419
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
29420
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
29421
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
29422
|
+
* like one that succeeded.
|
|
29423
|
+
*/
|
|
29424
|
+
var RequestCensusStatusSchema = object({
|
|
29425
|
+
armed: boolean(),
|
|
29426
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
29427
|
+
elapsedMs: number(),
|
|
29428
|
+
/** The window actually armed, after the server clamped the request. */
|
|
29429
|
+
windowMs: number(),
|
|
29430
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29431
|
+
armedUntilMs: number(),
|
|
29432
|
+
httpRequests: number(),
|
|
29433
|
+
batchedRequests: number(),
|
|
29434
|
+
/**
|
|
29435
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
29436
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
29437
|
+
* the number comparable with a store-side call count.
|
|
29438
|
+
*/
|
|
29439
|
+
procedureCalls: number(),
|
|
29440
|
+
/**
|
|
29441
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
29442
|
+
* transport resolves one context per connection - but the number that says
|
|
29443
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
29444
|
+
*/
|
|
29445
|
+
wsConnections: number(),
|
|
29446
|
+
distinctGroups: number(),
|
|
29447
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
29448
|
+
* cardinality bound. */
|
|
29449
|
+
unattributedCalls: number(),
|
|
29450
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
29451
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
29452
|
+
}).extend({ persisted: boolean() });
|
|
29453
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
29454
|
+
var LogLevelSchema$1 = _enum([
|
|
29455
|
+
"debug",
|
|
29456
|
+
"info",
|
|
29457
|
+
"warn",
|
|
29458
|
+
"error"
|
|
29459
|
+
]);
|
|
29460
|
+
/**
|
|
29461
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
29462
|
+
*
|
|
29463
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
29464
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
29465
|
+
*/
|
|
29466
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
29467
|
+
/**
|
|
29468
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
29469
|
+
* layer that carries an explicit value wins.
|
|
29470
|
+
*
|
|
29471
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
29472
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
29473
|
+
* grow later would force every consumer of this document to change with it.
|
|
29474
|
+
* Nothing returns `component` today.
|
|
29475
|
+
*/
|
|
29476
|
+
var LoggingScopeKindSchema = _enum([
|
|
29477
|
+
"cluster",
|
|
29478
|
+
"node",
|
|
29479
|
+
"component"
|
|
29480
|
+
]);
|
|
29481
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
29482
|
+
var LoggingLevelSourceSchema = _enum([
|
|
29483
|
+
"default",
|
|
29484
|
+
"cluster",
|
|
29485
|
+
"node",
|
|
29486
|
+
"component"
|
|
29487
|
+
]);
|
|
29488
|
+
/**
|
|
29489
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
29490
|
+
*
|
|
29491
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
29492
|
+
* difference between "this node is at `info` because I decided it" and
|
|
29493
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
29494
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
29495
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
29496
|
+
*/
|
|
29497
|
+
var LoggingLevelLayerSchema = object({
|
|
29498
|
+
scope: LoggingScopeKindSchema,
|
|
29499
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
29500
|
+
nodeId: string().nullable(),
|
|
29501
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
29502
|
+
level: LogLevelSchema$1.nullable()
|
|
29503
|
+
});
|
|
29504
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
29505
|
+
var LoggingEffectiveSchema = object({
|
|
29506
|
+
level: LogLevelSchema$1,
|
|
29507
|
+
levelSource: LoggingLevelSourceSchema
|
|
29508
|
+
});
|
|
29509
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
29510
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
29511
|
+
/**
|
|
29512
|
+
* An armed diagnostic, with its DEADLINE.
|
|
29513
|
+
*
|
|
29514
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
29515
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
29516
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
29517
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
29518
|
+
*/
|
|
29519
|
+
var DiagnosticWindowSchema = object({
|
|
29520
|
+
id: DiagnosticIdSchema,
|
|
29521
|
+
armed: boolean(),
|
|
29522
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29523
|
+
armedUntilMs: number(),
|
|
29524
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29525
|
+
remainingMs: number(),
|
|
29526
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
29527
|
+
* i.e. whether this window would survive a restart. */
|
|
29528
|
+
persisted: boolean()
|
|
29529
|
+
});
|
|
29530
|
+
/**
|
|
29531
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
29532
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
29533
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
29534
|
+
*/
|
|
29535
|
+
var DiagnosticWindowPatchSchema = object({
|
|
29536
|
+
id: DiagnosticIdSchema,
|
|
29537
|
+
armMs: number().int().min(0),
|
|
29538
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
29539
|
+
reportEveryMs: number().int().positive().optional()
|
|
29540
|
+
});
|
|
29541
|
+
/**
|
|
29542
|
+
* A PATCH, and patches MERGE.
|
|
29543
|
+
*
|
|
29544
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
29545
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
29546
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
29547
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
29548
|
+
* turns into an erased one.
|
|
29549
|
+
*/
|
|
29550
|
+
var LoggingSettingsPatchSchema = object({
|
|
29551
|
+
/**
|
|
29552
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
29553
|
+
* addressed scope so it inherits again. A value sets it.
|
|
29554
|
+
*/
|
|
29555
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
29556
|
+
/**
|
|
29557
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
29558
|
+
* keeps running — a patch is never a full replacement.
|
|
29559
|
+
*/
|
|
29560
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29561
|
+
});
|
|
29562
|
+
/**
|
|
29563
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
29564
|
+
*
|
|
29565
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
29566
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
29567
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
29568
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
29569
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
29570
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
29571
|
+
* layer selector needs a name the transport does not already own.
|
|
29572
|
+
*/
|
|
29573
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
29574
|
+
var SetLoggingSettingsInputSchema = object({
|
|
29575
|
+
scopeNodeId: string().optional(),
|
|
29576
|
+
patch: LoggingSettingsPatchSchema
|
|
29577
|
+
});
|
|
29578
|
+
/**
|
|
29579
|
+
* The whole document, as read and as returned after every write.
|
|
29580
|
+
*
|
|
29581
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
29582
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
29583
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
29584
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
29585
|
+
* survive a restart.
|
|
29586
|
+
*/
|
|
29587
|
+
var LoggingSettingsStateSchema = object({
|
|
29588
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
29589
|
+
scopeNodeId: string().nullable(),
|
|
29590
|
+
effective: LoggingEffectiveSchema,
|
|
29591
|
+
explicit: LoggingExplicitSchema,
|
|
29592
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29593
|
+
persisted: boolean()
|
|
29594
|
+
});
|
|
29217
29595
|
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(), {
|
|
29218
29596
|
kind: "mutation",
|
|
29219
29597
|
auth: "admin"
|
|
@@ -29226,6 +29604,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
29226
29604
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
29227
29605
|
kind: "mutation",
|
|
29228
29606
|
auth: "admin"
|
|
29607
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
29608
|
+
kind: "mutation",
|
|
29609
|
+
auth: "admin"
|
|
29229
29610
|
});
|
|
29230
29611
|
/**
|
|
29231
29612
|
* Tamper / case-open detection sensor. Drives Home Assistant
|
|
@@ -36465,6 +36846,18 @@ Object.freeze({
|
|
|
36465
36846
|
addonId: null,
|
|
36466
36847
|
access: "create"
|
|
36467
36848
|
},
|
|
36849
|
+
"system.getLoggingSettings": {
|
|
36850
|
+
capName: "system",
|
|
36851
|
+
capScope: "system",
|
|
36852
|
+
addonId: null,
|
|
36853
|
+
access: "view"
|
|
36854
|
+
},
|
|
36855
|
+
"system.getRequestCensus": {
|
|
36856
|
+
capName: "system",
|
|
36857
|
+
capScope: "system",
|
|
36858
|
+
addonId: null,
|
|
36859
|
+
access: "view"
|
|
36860
|
+
},
|
|
36468
36861
|
"system.getRetentionConfig": {
|
|
36469
36862
|
capName: "system",
|
|
36470
36863
|
capScope: "system",
|
|
@@ -36495,6 +36888,12 @@ Object.freeze({
|
|
|
36495
36888
|
addonId: null,
|
|
36496
36889
|
access: "view"
|
|
36497
36890
|
},
|
|
36891
|
+
"system.setLoggingSettings": {
|
|
36892
|
+
capName: "system",
|
|
36893
|
+
capScope: "system",
|
|
36894
|
+
addonId: null,
|
|
36895
|
+
access: "create"
|
|
36896
|
+
},
|
|
36498
36897
|
"system.setRetentionConfig": {
|
|
36499
36898
|
capName: "system",
|
|
36500
36899
|
capScope: "system",
|
|
@@ -37650,6 +38049,10 @@ Object.freeze({
|
|
|
37650
38049
|
name: "deviceId",
|
|
37651
38050
|
form: "single",
|
|
37652
38051
|
optional: true
|
|
38052
|
+
}, {
|
|
38053
|
+
name: "deviceIds",
|
|
38054
|
+
form: "array",
|
|
38055
|
+
optional: true
|
|
37653
38056
|
}],
|
|
37654
38057
|
"fanControl.setDirection": [{
|
|
37655
38058
|
name: "deviceId",
|
|
@@ -39260,7 +39663,38 @@ object({
|
|
|
39260
39663
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
39261
39664
|
* reproduce that.
|
|
39262
39665
|
*/
|
|
39263
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
39666
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
39667
|
+
/**
|
|
39668
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
39669
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
39670
|
+
* subject tiles, on frames that detected something.
|
|
39671
|
+
*
|
|
39672
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
39673
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
39674
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
39675
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
39676
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
39677
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
39678
|
+
*
|
|
39679
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
39680
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
39681
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
39682
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
39683
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
39684
|
+
* binds only through a detection burst, where it still covers well past the
|
|
39685
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
39686
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
39687
|
+
* whole shape exists to avoid.
|
|
39688
|
+
*
|
|
39689
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
39690
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
39691
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
39692
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
39693
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
39694
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
39695
|
+
* nothing.
|
|
39696
|
+
*/
|
|
39697
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
39264
39698
|
});
|
|
39265
39699
|
/**
|
|
39266
39700
|
* The values in force when the operator has set nothing.
|
|
@@ -39276,12 +39710,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
39276
39710
|
budgetMb: 1024,
|
|
39277
39711
|
activityMs: 15e3,
|
|
39278
39712
|
tileBudgetMb: 64,
|
|
39713
|
+
sceneBudgetMb: 48,
|
|
39279
39714
|
admission: "inferred"
|
|
39280
39715
|
};
|
|
39281
39716
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
39282
39717
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
39283
39718
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
39284
39719
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
39720
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
39285
39721
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
39286
39722
|
var MB = 1024 * 1024;
|
|
39287
39723
|
1024 * MB, 3072 * MB;
|
package/dist/addon.mjs
CHANGED
|
@@ -8510,6 +8510,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
8510
8510
|
/** Max rows returned, newest-first. */
|
|
8511
8511
|
limit: number().int().min(1).max(1e3).optional()
|
|
8512
8512
|
});
|
|
8513
|
+
var LabelDefinitionSchema = object({
|
|
8514
|
+
id: string(),
|
|
8515
|
+
name: string(),
|
|
8516
|
+
category: string().optional(),
|
|
8517
|
+
description: string().optional(),
|
|
8518
|
+
icon: string().optional()
|
|
8519
|
+
});
|
|
8520
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
8521
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
8522
|
+
"person",
|
|
8523
|
+
"vehicle",
|
|
8524
|
+
"animal",
|
|
8525
|
+
"package"
|
|
8526
|
+
];
|
|
8527
|
+
/**
|
|
8528
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
8529
|
+
* un operatore può selezionare.
|
|
8530
|
+
*
|
|
8531
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
8532
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
8533
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
8534
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
8535
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
8536
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
8537
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
8538
|
+
*
|
|
8539
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
8540
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
8541
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
8542
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
8543
|
+
* successiva.
|
|
8544
|
+
*/
|
|
8545
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
8546
|
+
"person",
|
|
8547
|
+
"vehicle",
|
|
8548
|
+
"animal"
|
|
8549
|
+
];
|
|
8550
|
+
/**
|
|
8551
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
8552
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8553
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8554
|
+
* detection pipeline executor actually routes.
|
|
8555
|
+
*
|
|
8556
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8557
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8558
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8559
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8560
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8561
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8562
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8563
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8564
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8565
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8566
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8567
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8568
|
+
*/
|
|
8569
|
+
var DetectionCatalogClassMapSchema = object({
|
|
8570
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
8571
|
+
preserveOriginal: boolean()
|
|
8572
|
+
});
|
|
8513
8573
|
/**
|
|
8514
8574
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
8515
8575
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -8532,10 +8592,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
8532
8592
|
"events",
|
|
8533
8593
|
"continuous"
|
|
8534
8594
|
]);
|
|
8595
|
+
/**
|
|
8596
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
8597
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
8598
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
8599
|
+
*/
|
|
8600
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
8601
|
+
/**
|
|
8602
|
+
* True quando `values` non ripete un elemento.
|
|
8603
|
+
*
|
|
8604
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
8605
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
8606
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
8607
|
+
*/
|
|
8608
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
8535
8609
|
/** Which detectors trigger an `events`-mode band. */
|
|
8536
8610
|
var RecordingTriggersSchema = object({
|
|
8537
8611
|
motion: boolean().optional(),
|
|
8538
|
-
audioThresholdDbfs: number().optional()
|
|
8612
|
+
audioThresholdDbfs: number().optional(),
|
|
8613
|
+
/**
|
|
8614
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
8615
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
8616
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
8617
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
8618
|
+
*
|
|
8619
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
8620
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
8621
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
8622
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
8623
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
8624
|
+
*/
|
|
8625
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
8626
|
+
/**
|
|
8627
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
8628
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
8629
|
+
* `objectClasses`.
|
|
8630
|
+
*
|
|
8631
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
8632
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
8633
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
8634
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
8635
|
+
* device (D12) — mai un elenco globale di cap.
|
|
8636
|
+
*
|
|
8637
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
8638
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
8639
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
8640
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8641
|
+
* registrare.
|
|
8642
|
+
*/
|
|
8643
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8539
8644
|
});
|
|
8540
8645
|
/**
|
|
8541
8646
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8987,41 +9092,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8987
9092
|
*/
|
|
8988
9093
|
debug: boolean().optional()
|
|
8989
9094
|
});
|
|
8990
|
-
var LabelDefinitionSchema = object({
|
|
8991
|
-
id: string(),
|
|
8992
|
-
name: string(),
|
|
8993
|
-
category: string().optional(),
|
|
8994
|
-
description: string().optional(),
|
|
8995
|
-
icon: string().optional()
|
|
8996
|
-
});
|
|
8997
|
-
/**
|
|
8998
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8999
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
9000
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
9001
|
-
* detection pipeline executor actually routes.
|
|
9002
|
-
*
|
|
9003
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
9004
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
9005
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
9006
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
9007
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
9008
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
9009
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
9010
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
9011
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
9012
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
9013
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
9014
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
9015
|
-
*/
|
|
9016
|
-
var DetectionCatalogClassMapSchema = object({
|
|
9017
|
-
mapping: record(string(), _enum([
|
|
9018
|
-
"person",
|
|
9019
|
-
"vehicle",
|
|
9020
|
-
"animal",
|
|
9021
|
-
"package"
|
|
9022
|
-
])),
|
|
9023
|
-
preserveOriginal: boolean()
|
|
9024
|
-
});
|
|
9025
9095
|
var MODEL_FORMATS = [
|
|
9026
9096
|
"onnx",
|
|
9027
9097
|
"coreml",
|
|
@@ -22137,7 +22207,7 @@ var lifecycleJobSchema = object({
|
|
|
22137
22207
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
22138
22208
|
* as every other cap.
|
|
22139
22209
|
*/
|
|
22140
|
-
var LogLevelSchema$
|
|
22210
|
+
var LogLevelSchema$2 = _enum([
|
|
22141
22211
|
"debug",
|
|
22142
22212
|
"info",
|
|
22143
22213
|
"warn",
|
|
@@ -22344,7 +22414,7 @@ var CustomActionInputSchema = object({
|
|
|
22344
22414
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
22345
22415
|
addonId: string(),
|
|
22346
22416
|
limit: number().min(1).max(500).default(100),
|
|
22347
|
-
level: LogLevelSchema$
|
|
22417
|
+
level: LogLevelSchema$2.optional()
|
|
22348
22418
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
22349
22419
|
packageName: string(),
|
|
22350
22420
|
version: string().optional()
|
|
@@ -22442,7 +22512,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
22442
22512
|
auth: "admin"
|
|
22443
22513
|
}), method(object({
|
|
22444
22514
|
addonId: string(),
|
|
22445
|
-
level: LogLevelSchema$
|
|
22515
|
+
level: LogLevelSchema$2.optional()
|
|
22446
22516
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
22447
22517
|
/**
|
|
22448
22518
|
* Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
|
|
@@ -24166,6 +24236,35 @@ var FaceFilterEnum = _enum([
|
|
|
24166
24236
|
"identified",
|
|
24167
24237
|
"all"
|
|
24168
24238
|
]);
|
|
24239
|
+
/**
|
|
24240
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
24241
|
+
*
|
|
24242
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
24243
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
24244
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
24245
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
24246
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
24247
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
24248
|
+
*
|
|
24249
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
24250
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
24251
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
24252
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
24253
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
24254
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
24255
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
24256
|
+
* backend's NULL-collation accident.
|
|
24257
|
+
*/
|
|
24258
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
24259
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
24260
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
24261
|
+
* never leaves the server. */
|
|
24262
|
+
var FaceClusterSchema = object({
|
|
24263
|
+
faceIds: array(string()).readonly(),
|
|
24264
|
+
representativeFaceId: string(),
|
|
24265
|
+
size: number().int(),
|
|
24266
|
+
cohesion: number()
|
|
24267
|
+
});
|
|
24169
24268
|
var MediaFileLiteSchema$1 = object({
|
|
24170
24269
|
key: string(),
|
|
24171
24270
|
kind: string(),
|
|
@@ -24212,24 +24311,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24212
24311
|
kind: "mutation",
|
|
24213
24312
|
auth: "admin"
|
|
24214
24313
|
}), method(object({
|
|
24215
|
-
/**
|
|
24314
|
+
/**
|
|
24315
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
24316
|
+
*
|
|
24317
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
24318
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
24319
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
24320
|
+
* present, and this field is then ignored rather than unioned, so
|
|
24321
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
24322
|
+
*/
|
|
24216
24323
|
deviceId: number().int().optional(),
|
|
24324
|
+
/**
|
|
24325
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
24326
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
24327
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
24328
|
+
* about to discard).
|
|
24329
|
+
*
|
|
24330
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
24331
|
+
* "every camera". A request for no devices is a request, not an
|
|
24332
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
24333
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
24334
|
+
*
|
|
24335
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
24336
|
+
*/
|
|
24337
|
+
deviceIds: array(number().int()).optional(),
|
|
24217
24338
|
limit: number().int().positive().optional(),
|
|
24218
24339
|
filter: FaceFilterEnum.optional(),
|
|
24219
24340
|
/**
|
|
24220
|
-
*
|
|
24221
|
-
*
|
|
24341
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24342
|
+
* Absent means no lower bound.
|
|
24343
|
+
*/
|
|
24344
|
+
since: number().int().optional(),
|
|
24345
|
+
/**
|
|
24346
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24347
|
+
* Absent means no upper bound.
|
|
24348
|
+
*/
|
|
24349
|
+
until: number().int().optional(),
|
|
24350
|
+
/**
|
|
24351
|
+
* Order the page by time or by suggestion certainty. Default
|
|
24352
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
24353
|
+
* that does not ask.
|
|
24222
24354
|
*
|
|
24223
|
-
*
|
|
24224
|
-
*
|
|
24225
|
-
* the browser cache the images.
|
|
24355
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
24356
|
+
* does under `'suggestionConfidence'`.
|
|
24226
24357
|
*
|
|
24227
|
-
*
|
|
24228
|
-
*
|
|
24229
|
-
*
|
|
24230
|
-
*
|
|
24231
|
-
*
|
|
24232
|
-
|
|
24358
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
24359
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
24360
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
24361
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
24362
|
+
* with {@link since} / {@link until}.
|
|
24363
|
+
*/
|
|
24364
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
24365
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
24366
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
24367
|
+
/**
|
|
24368
|
+
* Inline the base64 crop on every row.
|
|
24369
|
+
*
|
|
24370
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
24371
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
24372
|
+
* this for every gallery, and which records why the inline shape had
|
|
24373
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
24374
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
24375
|
+
* that describes the old design reads as permission to rely on it.
|
|
24376
|
+
*
|
|
24377
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
24378
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
24379
|
+
* cached and ETagged.
|
|
24233
24380
|
*/
|
|
24234
24381
|
includeCrops: boolean().optional()
|
|
24235
24382
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -24265,13 +24412,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24265
24412
|
}), method(object({
|
|
24266
24413
|
threshold: number().min(0).max(1).optional(),
|
|
24267
24414
|
minClusterSize: number().int().min(2).optional(),
|
|
24268
|
-
|
|
24269
|
-
|
|
24270
|
-
|
|
24271
|
-
|
|
24272
|
-
|
|
24273
|
-
|
|
24274
|
-
|
|
24415
|
+
/**
|
|
24416
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
24417
|
+
* which read as though it bounded the work — it never did.
|
|
24418
|
+
*
|
|
24419
|
+
* Wins over {@link limit} when both are sent.
|
|
24420
|
+
*/
|
|
24421
|
+
maxClusters: number().int().positive().optional(),
|
|
24422
|
+
/**
|
|
24423
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
24424
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
24425
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
24426
|
+
*/
|
|
24427
|
+
limit: number().int().positive().optional(),
|
|
24428
|
+
/**
|
|
24429
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
24430
|
+
* POOL, not the result.
|
|
24431
|
+
*
|
|
24432
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
24433
|
+
* used to read every unassigned face on the hub no matter what the
|
|
24434
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
24435
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
24436
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
24437
|
+
*
|
|
24438
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
24439
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
24440
|
+
* sample it randomly.
|
|
24441
|
+
*
|
|
24442
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
24443
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
24444
|
+
* unbounded scan can never come back as the table grows.
|
|
24445
|
+
*/
|
|
24446
|
+
maxFacesScanned: number().int().positive().optional()
|
|
24447
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
24275
24448
|
/**
|
|
24276
24449
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
24277
24450
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -29213,6 +29386,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
29213
29386
|
latitude: number().min(-90).max(90),
|
|
29214
29387
|
longitude: number().min(-180).max(180)
|
|
29215
29388
|
}).nullable();
|
|
29389
|
+
/**
|
|
29390
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
29391
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
29392
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
29393
|
+
* already prints - never a token, never an `Authorization` header.
|
|
29394
|
+
*/
|
|
29395
|
+
var RequestCensusGroupSchema = object({
|
|
29396
|
+
procedure: string(),
|
|
29397
|
+
userAgent: string(),
|
|
29398
|
+
ip: string(),
|
|
29399
|
+
principal: string(),
|
|
29400
|
+
calls: number(),
|
|
29401
|
+
perMin: number()
|
|
29402
|
+
});
|
|
29403
|
+
/**
|
|
29404
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
29405
|
+
*
|
|
29406
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
29407
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
29408
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
29409
|
+
*/
|
|
29410
|
+
var RequestCensusProcedureSchema = object({
|
|
29411
|
+
procedure: string(),
|
|
29412
|
+
calls: number(),
|
|
29413
|
+
perMin: number()
|
|
29414
|
+
});
|
|
29415
|
+
/**
|
|
29416
|
+
* The census as an operator sees it.
|
|
29417
|
+
*
|
|
29418
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
29419
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
29420
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
29421
|
+
* like one that succeeded.
|
|
29422
|
+
*/
|
|
29423
|
+
var RequestCensusStatusSchema = object({
|
|
29424
|
+
armed: boolean(),
|
|
29425
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
29426
|
+
elapsedMs: number(),
|
|
29427
|
+
/** The window actually armed, after the server clamped the request. */
|
|
29428
|
+
windowMs: number(),
|
|
29429
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29430
|
+
armedUntilMs: number(),
|
|
29431
|
+
httpRequests: number(),
|
|
29432
|
+
batchedRequests: number(),
|
|
29433
|
+
/**
|
|
29434
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
29435
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
29436
|
+
* the number comparable with a store-side call count.
|
|
29437
|
+
*/
|
|
29438
|
+
procedureCalls: number(),
|
|
29439
|
+
/**
|
|
29440
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
29441
|
+
* transport resolves one context per connection - but the number that says
|
|
29442
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
29443
|
+
*/
|
|
29444
|
+
wsConnections: number(),
|
|
29445
|
+
distinctGroups: number(),
|
|
29446
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
29447
|
+
* cardinality bound. */
|
|
29448
|
+
unattributedCalls: number(),
|
|
29449
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
29450
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
29451
|
+
}).extend({ persisted: boolean() });
|
|
29452
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
29453
|
+
var LogLevelSchema$1 = _enum([
|
|
29454
|
+
"debug",
|
|
29455
|
+
"info",
|
|
29456
|
+
"warn",
|
|
29457
|
+
"error"
|
|
29458
|
+
]);
|
|
29459
|
+
/**
|
|
29460
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
29461
|
+
*
|
|
29462
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
29463
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
29464
|
+
*/
|
|
29465
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
29466
|
+
/**
|
|
29467
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
29468
|
+
* layer that carries an explicit value wins.
|
|
29469
|
+
*
|
|
29470
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
29471
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
29472
|
+
* grow later would force every consumer of this document to change with it.
|
|
29473
|
+
* Nothing returns `component` today.
|
|
29474
|
+
*/
|
|
29475
|
+
var LoggingScopeKindSchema = _enum([
|
|
29476
|
+
"cluster",
|
|
29477
|
+
"node",
|
|
29478
|
+
"component"
|
|
29479
|
+
]);
|
|
29480
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
29481
|
+
var LoggingLevelSourceSchema = _enum([
|
|
29482
|
+
"default",
|
|
29483
|
+
"cluster",
|
|
29484
|
+
"node",
|
|
29485
|
+
"component"
|
|
29486
|
+
]);
|
|
29487
|
+
/**
|
|
29488
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
29489
|
+
*
|
|
29490
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
29491
|
+
* difference between "this node is at `info` because I decided it" and
|
|
29492
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
29493
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
29494
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
29495
|
+
*/
|
|
29496
|
+
var LoggingLevelLayerSchema = object({
|
|
29497
|
+
scope: LoggingScopeKindSchema,
|
|
29498
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
29499
|
+
nodeId: string().nullable(),
|
|
29500
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
29501
|
+
level: LogLevelSchema$1.nullable()
|
|
29502
|
+
});
|
|
29503
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
29504
|
+
var LoggingEffectiveSchema = object({
|
|
29505
|
+
level: LogLevelSchema$1,
|
|
29506
|
+
levelSource: LoggingLevelSourceSchema
|
|
29507
|
+
});
|
|
29508
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
29509
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
29510
|
+
/**
|
|
29511
|
+
* An armed diagnostic, with its DEADLINE.
|
|
29512
|
+
*
|
|
29513
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
29514
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
29515
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
29516
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
29517
|
+
*/
|
|
29518
|
+
var DiagnosticWindowSchema = object({
|
|
29519
|
+
id: DiagnosticIdSchema,
|
|
29520
|
+
armed: boolean(),
|
|
29521
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29522
|
+
armedUntilMs: number(),
|
|
29523
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29524
|
+
remainingMs: number(),
|
|
29525
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
29526
|
+
* i.e. whether this window would survive a restart. */
|
|
29527
|
+
persisted: boolean()
|
|
29528
|
+
});
|
|
29529
|
+
/**
|
|
29530
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
29531
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
29532
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
29533
|
+
*/
|
|
29534
|
+
var DiagnosticWindowPatchSchema = object({
|
|
29535
|
+
id: DiagnosticIdSchema,
|
|
29536
|
+
armMs: number().int().min(0),
|
|
29537
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
29538
|
+
reportEveryMs: number().int().positive().optional()
|
|
29539
|
+
});
|
|
29540
|
+
/**
|
|
29541
|
+
* A PATCH, and patches MERGE.
|
|
29542
|
+
*
|
|
29543
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
29544
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
29545
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
29546
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
29547
|
+
* turns into an erased one.
|
|
29548
|
+
*/
|
|
29549
|
+
var LoggingSettingsPatchSchema = object({
|
|
29550
|
+
/**
|
|
29551
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
29552
|
+
* addressed scope so it inherits again. A value sets it.
|
|
29553
|
+
*/
|
|
29554
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
29555
|
+
/**
|
|
29556
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
29557
|
+
* keeps running — a patch is never a full replacement.
|
|
29558
|
+
*/
|
|
29559
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29560
|
+
});
|
|
29561
|
+
/**
|
|
29562
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
29563
|
+
*
|
|
29564
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
29565
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
29566
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
29567
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
29568
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
29569
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
29570
|
+
* layer selector needs a name the transport does not already own.
|
|
29571
|
+
*/
|
|
29572
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
29573
|
+
var SetLoggingSettingsInputSchema = object({
|
|
29574
|
+
scopeNodeId: string().optional(),
|
|
29575
|
+
patch: LoggingSettingsPatchSchema
|
|
29576
|
+
});
|
|
29577
|
+
/**
|
|
29578
|
+
* The whole document, as read and as returned after every write.
|
|
29579
|
+
*
|
|
29580
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
29581
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
29582
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
29583
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
29584
|
+
* survive a restart.
|
|
29585
|
+
*/
|
|
29586
|
+
var LoggingSettingsStateSchema = object({
|
|
29587
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
29588
|
+
scopeNodeId: string().nullable(),
|
|
29589
|
+
effective: LoggingEffectiveSchema,
|
|
29590
|
+
explicit: LoggingExplicitSchema,
|
|
29591
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29592
|
+
persisted: boolean()
|
|
29593
|
+
});
|
|
29216
29594
|
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(), {
|
|
29217
29595
|
kind: "mutation",
|
|
29218
29596
|
auth: "admin"
|
|
@@ -29225,6 +29603,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
29225
29603
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
29226
29604
|
kind: "mutation",
|
|
29227
29605
|
auth: "admin"
|
|
29606
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
29607
|
+
kind: "mutation",
|
|
29608
|
+
auth: "admin"
|
|
29228
29609
|
});
|
|
29229
29610
|
/**
|
|
29230
29611
|
* Tamper / case-open detection sensor. Drives Home Assistant
|
|
@@ -36464,6 +36845,18 @@ Object.freeze({
|
|
|
36464
36845
|
addonId: null,
|
|
36465
36846
|
access: "create"
|
|
36466
36847
|
},
|
|
36848
|
+
"system.getLoggingSettings": {
|
|
36849
|
+
capName: "system",
|
|
36850
|
+
capScope: "system",
|
|
36851
|
+
addonId: null,
|
|
36852
|
+
access: "view"
|
|
36853
|
+
},
|
|
36854
|
+
"system.getRequestCensus": {
|
|
36855
|
+
capName: "system",
|
|
36856
|
+
capScope: "system",
|
|
36857
|
+
addonId: null,
|
|
36858
|
+
access: "view"
|
|
36859
|
+
},
|
|
36467
36860
|
"system.getRetentionConfig": {
|
|
36468
36861
|
capName: "system",
|
|
36469
36862
|
capScope: "system",
|
|
@@ -36494,6 +36887,12 @@ Object.freeze({
|
|
|
36494
36887
|
addonId: null,
|
|
36495
36888
|
access: "view"
|
|
36496
36889
|
},
|
|
36890
|
+
"system.setLoggingSettings": {
|
|
36891
|
+
capName: "system",
|
|
36892
|
+
capScope: "system",
|
|
36893
|
+
addonId: null,
|
|
36894
|
+
access: "create"
|
|
36895
|
+
},
|
|
36497
36896
|
"system.setRetentionConfig": {
|
|
36498
36897
|
capName: "system",
|
|
36499
36898
|
capScope: "system",
|
|
@@ -37649,6 +38048,10 @@ Object.freeze({
|
|
|
37649
38048
|
name: "deviceId",
|
|
37650
38049
|
form: "single",
|
|
37651
38050
|
optional: true
|
|
38051
|
+
}, {
|
|
38052
|
+
name: "deviceIds",
|
|
38053
|
+
form: "array",
|
|
38054
|
+
optional: true
|
|
37652
38055
|
}],
|
|
37653
38056
|
"fanControl.setDirection": [{
|
|
37654
38057
|
name: "deviceId",
|
|
@@ -39259,7 +39662,38 @@ object({
|
|
|
39259
39662
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
39260
39663
|
* reproduce that.
|
|
39261
39664
|
*/
|
|
39262
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
39665
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
39666
|
+
/**
|
|
39667
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
39668
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
39669
|
+
* subject tiles, on frames that detected something.
|
|
39670
|
+
*
|
|
39671
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
39672
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
39673
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
39674
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
39675
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
39676
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
39677
|
+
*
|
|
39678
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
39679
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
39680
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
39681
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
39682
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
39683
|
+
* binds only through a detection burst, where it still covers well past the
|
|
39684
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
39685
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
39686
|
+
* whole shape exists to avoid.
|
|
39687
|
+
*
|
|
39688
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
39689
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
39690
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
39691
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
39692
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
39693
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
39694
|
+
* nothing.
|
|
39695
|
+
*/
|
|
39696
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
39263
39697
|
});
|
|
39264
39698
|
/**
|
|
39265
39699
|
* The values in force when the operator has set nothing.
|
|
@@ -39275,12 +39709,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
39275
39709
|
budgetMb: 1024,
|
|
39276
39710
|
activityMs: 15e3,
|
|
39277
39711
|
tileBudgetMb: 64,
|
|
39712
|
+
sceneBudgetMb: 48,
|
|
39278
39713
|
admission: "inferred"
|
|
39279
39714
|
};
|
|
39280
39715
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
39281
39716
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
39282
39717
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
39283
39718
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
39719
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
39284
39720
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
39285
39721
|
var MB = 1024 * 1024;
|
|
39286
39722
|
1024 * MB, 3072 * MB;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-rademacher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.31",
|
|
4
4
|
"description": "Rademacher HomePilot device-provider addon for CamStack — wraps the @apocaliss92/noderademacher local-hub client (roller shutters over the cover cap)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|