@camstack/addon-provider-velux 0.2.31 → 0.2.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +495 -59
- package/dist/addon.mjs +495 -59
- package/package.json +1 -1
package/dist/addon.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",
|
|
@@ -21153,7 +21223,7 @@ var lifecycleJobSchema = object({
|
|
|
21153
21223
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21154
21224
|
* as every other cap.
|
|
21155
21225
|
*/
|
|
21156
|
-
var LogLevelSchema$
|
|
21226
|
+
var LogLevelSchema$2 = _enum([
|
|
21157
21227
|
"debug",
|
|
21158
21228
|
"info",
|
|
21159
21229
|
"warn",
|
|
@@ -21360,7 +21430,7 @@ var CustomActionInputSchema = object({
|
|
|
21360
21430
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21361
21431
|
addonId: string(),
|
|
21362
21432
|
limit: number().min(1).max(500).default(100),
|
|
21363
|
-
level: LogLevelSchema$
|
|
21433
|
+
level: LogLevelSchema$2.optional()
|
|
21364
21434
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21365
21435
|
packageName: string(),
|
|
21366
21436
|
version: string().optional()
|
|
@@ -21458,7 +21528,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21458
21528
|
auth: "admin"
|
|
21459
21529
|
}), method(object({
|
|
21460
21530
|
addonId: string(),
|
|
21461
|
-
level: LogLevelSchema$
|
|
21531
|
+
level: LogLevelSchema$2.optional()
|
|
21462
21532
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21463
21533
|
/**
|
|
21464
21534
|
* Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
|
|
@@ -23182,6 +23252,35 @@ var FaceFilterEnum = _enum([
|
|
|
23182
23252
|
"identified",
|
|
23183
23253
|
"all"
|
|
23184
23254
|
]);
|
|
23255
|
+
/**
|
|
23256
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
23257
|
+
*
|
|
23258
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
23259
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
23260
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
23261
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
23262
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
23263
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
23264
|
+
*
|
|
23265
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
23266
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
23267
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
23268
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
23269
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
23270
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
23271
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
23272
|
+
* backend's NULL-collation accident.
|
|
23273
|
+
*/
|
|
23274
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
23275
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
23276
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
23277
|
+
* never leaves the server. */
|
|
23278
|
+
var FaceClusterSchema = object({
|
|
23279
|
+
faceIds: array(string()).readonly(),
|
|
23280
|
+
representativeFaceId: string(),
|
|
23281
|
+
size: number().int(),
|
|
23282
|
+
cohesion: number()
|
|
23283
|
+
});
|
|
23185
23284
|
var MediaFileLiteSchema$1 = object({
|
|
23186
23285
|
key: string(),
|
|
23187
23286
|
kind: string(),
|
|
@@ -23228,24 +23327,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23228
23327
|
kind: "mutation",
|
|
23229
23328
|
auth: "admin"
|
|
23230
23329
|
}), method(object({
|
|
23231
|
-
/**
|
|
23330
|
+
/**
|
|
23331
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
23332
|
+
*
|
|
23333
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
23334
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
23335
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
23336
|
+
* present, and this field is then ignored rather than unioned, so
|
|
23337
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
23338
|
+
*/
|
|
23232
23339
|
deviceId: number().int().optional(),
|
|
23340
|
+
/**
|
|
23341
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
23342
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
23343
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
23344
|
+
* about to discard).
|
|
23345
|
+
*
|
|
23346
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
23347
|
+
* "every camera". A request for no devices is a request, not an
|
|
23348
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
23349
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
23350
|
+
*
|
|
23351
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
23352
|
+
*/
|
|
23353
|
+
deviceIds: array(number().int()).optional(),
|
|
23233
23354
|
limit: number().int().positive().optional(),
|
|
23234
23355
|
filter: FaceFilterEnum.optional(),
|
|
23235
23356
|
/**
|
|
23236
|
-
*
|
|
23237
|
-
*
|
|
23357
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23358
|
+
* Absent means no lower bound.
|
|
23359
|
+
*/
|
|
23360
|
+
since: number().int().optional(),
|
|
23361
|
+
/**
|
|
23362
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23363
|
+
* Absent means no upper bound.
|
|
23364
|
+
*/
|
|
23365
|
+
until: number().int().optional(),
|
|
23366
|
+
/**
|
|
23367
|
+
* Order the page by time or by suggestion certainty. Default
|
|
23368
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
23369
|
+
* that does not ask.
|
|
23238
23370
|
*
|
|
23239
|
-
*
|
|
23240
|
-
*
|
|
23241
|
-
* the browser cache the images.
|
|
23371
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
23372
|
+
* does under `'suggestionConfidence'`.
|
|
23242
23373
|
*
|
|
23243
|
-
*
|
|
23244
|
-
*
|
|
23245
|
-
*
|
|
23246
|
-
*
|
|
23247
|
-
*
|
|
23248
|
-
|
|
23374
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
23375
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
23376
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
23377
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
23378
|
+
* with {@link since} / {@link until}.
|
|
23379
|
+
*/
|
|
23380
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
23381
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
23382
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
23383
|
+
/**
|
|
23384
|
+
* Inline the base64 crop on every row.
|
|
23385
|
+
*
|
|
23386
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
23387
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
23388
|
+
* this for every gallery, and which records why the inline shape had
|
|
23389
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
23390
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
23391
|
+
* that describes the old design reads as permission to rely on it.
|
|
23392
|
+
*
|
|
23393
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
23394
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
23395
|
+
* cached and ETagged.
|
|
23249
23396
|
*/
|
|
23250
23397
|
includeCrops: boolean().optional()
|
|
23251
23398
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -23281,13 +23428,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23281
23428
|
}), method(object({
|
|
23282
23429
|
threshold: number().min(0).max(1).optional(),
|
|
23283
23430
|
minClusterSize: number().int().min(2).optional(),
|
|
23284
|
-
|
|
23285
|
-
|
|
23286
|
-
|
|
23287
|
-
|
|
23288
|
-
|
|
23289
|
-
|
|
23290
|
-
|
|
23431
|
+
/**
|
|
23432
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
23433
|
+
* which read as though it bounded the work — it never did.
|
|
23434
|
+
*
|
|
23435
|
+
* Wins over {@link limit} when both are sent.
|
|
23436
|
+
*/
|
|
23437
|
+
maxClusters: number().int().positive().optional(),
|
|
23438
|
+
/**
|
|
23439
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
23440
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
23441
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
23442
|
+
*/
|
|
23443
|
+
limit: number().int().positive().optional(),
|
|
23444
|
+
/**
|
|
23445
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
23446
|
+
* POOL, not the result.
|
|
23447
|
+
*
|
|
23448
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
23449
|
+
* used to read every unassigned face on the hub no matter what the
|
|
23450
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
23451
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
23452
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
23453
|
+
*
|
|
23454
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
23455
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
23456
|
+
* sample it randomly.
|
|
23457
|
+
*
|
|
23458
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
23459
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
23460
|
+
* unbounded scan can never come back as the table grows.
|
|
23461
|
+
*/
|
|
23462
|
+
maxFacesScanned: number().int().positive().optional()
|
|
23463
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
23291
23464
|
/**
|
|
23292
23465
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
23293
23466
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -28229,6 +28402,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
28229
28402
|
latitude: number().min(-90).max(90),
|
|
28230
28403
|
longitude: number().min(-180).max(180)
|
|
28231
28404
|
}).nullable();
|
|
28405
|
+
/**
|
|
28406
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
28407
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28408
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28409
|
+
* already prints - never a token, never an `Authorization` header.
|
|
28410
|
+
*/
|
|
28411
|
+
var RequestCensusGroupSchema = object({
|
|
28412
|
+
procedure: string(),
|
|
28413
|
+
userAgent: string(),
|
|
28414
|
+
ip: string(),
|
|
28415
|
+
principal: string(),
|
|
28416
|
+
calls: number(),
|
|
28417
|
+
perMin: number()
|
|
28418
|
+
});
|
|
28419
|
+
/**
|
|
28420
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
28421
|
+
*
|
|
28422
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
28423
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
28424
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
28425
|
+
*/
|
|
28426
|
+
var RequestCensusProcedureSchema = object({
|
|
28427
|
+
procedure: string(),
|
|
28428
|
+
calls: number(),
|
|
28429
|
+
perMin: number()
|
|
28430
|
+
});
|
|
28431
|
+
/**
|
|
28432
|
+
* The census as an operator sees it.
|
|
28433
|
+
*
|
|
28434
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
28435
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
28436
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
28437
|
+
* like one that succeeded.
|
|
28438
|
+
*/
|
|
28439
|
+
var RequestCensusStatusSchema = object({
|
|
28440
|
+
armed: boolean(),
|
|
28441
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
28442
|
+
elapsedMs: number(),
|
|
28443
|
+
/** The window actually armed, after the server clamped the request. */
|
|
28444
|
+
windowMs: number(),
|
|
28445
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28446
|
+
armedUntilMs: number(),
|
|
28447
|
+
httpRequests: number(),
|
|
28448
|
+
batchedRequests: number(),
|
|
28449
|
+
/**
|
|
28450
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
28451
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
28452
|
+
* the number comparable with a store-side call count.
|
|
28453
|
+
*/
|
|
28454
|
+
procedureCalls: number(),
|
|
28455
|
+
/**
|
|
28456
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28457
|
+
* transport resolves one context per connection - but the number that says
|
|
28458
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
28459
|
+
*/
|
|
28460
|
+
wsConnections: number(),
|
|
28461
|
+
distinctGroups: number(),
|
|
28462
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
28463
|
+
* cardinality bound. */
|
|
28464
|
+
unattributedCalls: number(),
|
|
28465
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28466
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
28467
|
+
}).extend({ persisted: boolean() });
|
|
28468
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
28469
|
+
var LogLevelSchema$1 = _enum([
|
|
28470
|
+
"debug",
|
|
28471
|
+
"info",
|
|
28472
|
+
"warn",
|
|
28473
|
+
"error"
|
|
28474
|
+
]);
|
|
28475
|
+
/**
|
|
28476
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
28477
|
+
*
|
|
28478
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
28479
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
28480
|
+
*/
|
|
28481
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
28482
|
+
/**
|
|
28483
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
28484
|
+
* layer that carries an explicit value wins.
|
|
28485
|
+
*
|
|
28486
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
28487
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
28488
|
+
* grow later would force every consumer of this document to change with it.
|
|
28489
|
+
* Nothing returns `component` today.
|
|
28490
|
+
*/
|
|
28491
|
+
var LoggingScopeKindSchema = _enum([
|
|
28492
|
+
"cluster",
|
|
28493
|
+
"node",
|
|
28494
|
+
"component"
|
|
28495
|
+
]);
|
|
28496
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
28497
|
+
var LoggingLevelSourceSchema = _enum([
|
|
28498
|
+
"default",
|
|
28499
|
+
"cluster",
|
|
28500
|
+
"node",
|
|
28501
|
+
"component"
|
|
28502
|
+
]);
|
|
28503
|
+
/**
|
|
28504
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
28505
|
+
*
|
|
28506
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
28507
|
+
* difference between "this node is at `info` because I decided it" and
|
|
28508
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
28509
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
28510
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
28511
|
+
*/
|
|
28512
|
+
var LoggingLevelLayerSchema = object({
|
|
28513
|
+
scope: LoggingScopeKindSchema,
|
|
28514
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28515
|
+
nodeId: string().nullable(),
|
|
28516
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28517
|
+
level: LogLevelSchema$1.nullable()
|
|
28518
|
+
});
|
|
28519
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
28520
|
+
var LoggingEffectiveSchema = object({
|
|
28521
|
+
level: LogLevelSchema$1,
|
|
28522
|
+
levelSource: LoggingLevelSourceSchema
|
|
28523
|
+
});
|
|
28524
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
28525
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
28526
|
+
/**
|
|
28527
|
+
* An armed diagnostic, with its DEADLINE.
|
|
28528
|
+
*
|
|
28529
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
28530
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
28531
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
28532
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
28533
|
+
*/
|
|
28534
|
+
var DiagnosticWindowSchema = object({
|
|
28535
|
+
id: DiagnosticIdSchema,
|
|
28536
|
+
armed: boolean(),
|
|
28537
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28538
|
+
armedUntilMs: number(),
|
|
28539
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
28540
|
+
remainingMs: number(),
|
|
28541
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
28542
|
+
* i.e. whether this window would survive a restart. */
|
|
28543
|
+
persisted: boolean()
|
|
28544
|
+
});
|
|
28545
|
+
/**
|
|
28546
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
28547
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
28548
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
28549
|
+
*/
|
|
28550
|
+
var DiagnosticWindowPatchSchema = object({
|
|
28551
|
+
id: DiagnosticIdSchema,
|
|
28552
|
+
armMs: number().int().min(0),
|
|
28553
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
28554
|
+
reportEveryMs: number().int().positive().optional()
|
|
28555
|
+
});
|
|
28556
|
+
/**
|
|
28557
|
+
* A PATCH, and patches MERGE.
|
|
28558
|
+
*
|
|
28559
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
28560
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
28561
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
28562
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
28563
|
+
* turns into an erased one.
|
|
28564
|
+
*/
|
|
28565
|
+
var LoggingSettingsPatchSchema = object({
|
|
28566
|
+
/**
|
|
28567
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
28568
|
+
* addressed scope so it inherits again. A value sets it.
|
|
28569
|
+
*/
|
|
28570
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
28571
|
+
/**
|
|
28572
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28573
|
+
* keeps running — a patch is never a full replacement.
|
|
28574
|
+
*/
|
|
28575
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
28576
|
+
});
|
|
28577
|
+
/**
|
|
28578
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
28579
|
+
*
|
|
28580
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
28581
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
28582
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
28583
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
28584
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
28585
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
28586
|
+
* layer selector needs a name the transport does not already own.
|
|
28587
|
+
*/
|
|
28588
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
28589
|
+
var SetLoggingSettingsInputSchema = object({
|
|
28590
|
+
scopeNodeId: string().optional(),
|
|
28591
|
+
patch: LoggingSettingsPatchSchema
|
|
28592
|
+
});
|
|
28593
|
+
/**
|
|
28594
|
+
* The whole document, as read and as returned after every write.
|
|
28595
|
+
*
|
|
28596
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
28597
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
28598
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
28599
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
28600
|
+
* survive a restart.
|
|
28601
|
+
*/
|
|
28602
|
+
var LoggingSettingsStateSchema = object({
|
|
28603
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28604
|
+
scopeNodeId: string().nullable(),
|
|
28605
|
+
effective: LoggingEffectiveSchema,
|
|
28606
|
+
explicit: LoggingExplicitSchema,
|
|
28607
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
28608
|
+
persisted: boolean()
|
|
28609
|
+
});
|
|
28232
28610
|
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(), {
|
|
28233
28611
|
kind: "mutation",
|
|
28234
28612
|
auth: "admin"
|
|
@@ -28241,6 +28619,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
28241
28619
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
28242
28620
|
kind: "mutation",
|
|
28243
28621
|
auth: "admin"
|
|
28622
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
28623
|
+
kind: "mutation",
|
|
28624
|
+
auth: "admin"
|
|
28244
28625
|
});
|
|
28245
28626
|
/**
|
|
28246
28627
|
* Tamper / case-open detection sensor. Drives Home Assistant
|
|
@@ -35480,6 +35861,18 @@ Object.freeze({
|
|
|
35480
35861
|
addonId: null,
|
|
35481
35862
|
access: "create"
|
|
35482
35863
|
},
|
|
35864
|
+
"system.getLoggingSettings": {
|
|
35865
|
+
capName: "system",
|
|
35866
|
+
capScope: "system",
|
|
35867
|
+
addonId: null,
|
|
35868
|
+
access: "view"
|
|
35869
|
+
},
|
|
35870
|
+
"system.getRequestCensus": {
|
|
35871
|
+
capName: "system",
|
|
35872
|
+
capScope: "system",
|
|
35873
|
+
addonId: null,
|
|
35874
|
+
access: "view"
|
|
35875
|
+
},
|
|
35483
35876
|
"system.getRetentionConfig": {
|
|
35484
35877
|
capName: "system",
|
|
35485
35878
|
capScope: "system",
|
|
@@ -35510,6 +35903,12 @@ Object.freeze({
|
|
|
35510
35903
|
addonId: null,
|
|
35511
35904
|
access: "view"
|
|
35512
35905
|
},
|
|
35906
|
+
"system.setLoggingSettings": {
|
|
35907
|
+
capName: "system",
|
|
35908
|
+
capScope: "system",
|
|
35909
|
+
addonId: null,
|
|
35910
|
+
access: "create"
|
|
35911
|
+
},
|
|
35513
35912
|
"system.setRetentionConfig": {
|
|
35514
35913
|
capName: "system",
|
|
35515
35914
|
capScope: "system",
|
|
@@ -36665,6 +37064,10 @@ Object.freeze({
|
|
|
36665
37064
|
name: "deviceId",
|
|
36666
37065
|
form: "single",
|
|
36667
37066
|
optional: true
|
|
37067
|
+
}, {
|
|
37068
|
+
name: "deviceIds",
|
|
37069
|
+
form: "array",
|
|
37070
|
+
optional: true
|
|
36668
37071
|
}],
|
|
36669
37072
|
"fanControl.setDirection": [{
|
|
36670
37073
|
name: "deviceId",
|
|
@@ -38275,7 +38678,38 @@ object({
|
|
|
38275
38678
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
38276
38679
|
* reproduce that.
|
|
38277
38680
|
*/
|
|
38278
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
38681
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
38682
|
+
/**
|
|
38683
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
38684
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
38685
|
+
* subject tiles, on frames that detected something.
|
|
38686
|
+
*
|
|
38687
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
38688
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
38689
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
38690
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
38691
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
38692
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
38693
|
+
*
|
|
38694
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
38695
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
38696
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
38697
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
38698
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
38699
|
+
* binds only through a detection burst, where it still covers well past the
|
|
38700
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
38701
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
38702
|
+
* whole shape exists to avoid.
|
|
38703
|
+
*
|
|
38704
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
38705
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
38706
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
38707
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
38708
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
38709
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
38710
|
+
* nothing.
|
|
38711
|
+
*/
|
|
38712
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
38279
38713
|
});
|
|
38280
38714
|
/**
|
|
38281
38715
|
* The values in force when the operator has set nothing.
|
|
@@ -38291,12 +38725,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
38291
38725
|
budgetMb: 1024,
|
|
38292
38726
|
activityMs: 15e3,
|
|
38293
38727
|
tileBudgetMb: 64,
|
|
38728
|
+
sceneBudgetMb: 48,
|
|
38294
38729
|
admission: "inferred"
|
|
38295
38730
|
};
|
|
38296
38731
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
38297
38732
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
38298
38733
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
38299
38734
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
38735
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
38300
38736
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
38301
38737
|
var MB = 1024 * 1024;
|
|
38302
38738
|
1024 * MB, 3072 * MB;
|
package/dist/addon.mjs
CHANGED
|
@@ -7525,6 +7525,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7525
7525
|
/** Max rows returned, newest-first. */
|
|
7526
7526
|
limit: number().int().min(1).max(1e3).optional()
|
|
7527
7527
|
});
|
|
7528
|
+
var LabelDefinitionSchema = object({
|
|
7529
|
+
id: string(),
|
|
7530
|
+
name: string(),
|
|
7531
|
+
category: string().optional(),
|
|
7532
|
+
description: string().optional(),
|
|
7533
|
+
icon: string().optional()
|
|
7534
|
+
});
|
|
7535
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7536
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7537
|
+
"person",
|
|
7538
|
+
"vehicle",
|
|
7539
|
+
"animal",
|
|
7540
|
+
"package"
|
|
7541
|
+
];
|
|
7542
|
+
/**
|
|
7543
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7544
|
+
* un operatore può selezionare.
|
|
7545
|
+
*
|
|
7546
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7547
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7548
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7549
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7550
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7551
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7552
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7553
|
+
*
|
|
7554
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7555
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7556
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7557
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7558
|
+
* successiva.
|
|
7559
|
+
*/
|
|
7560
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7561
|
+
"person",
|
|
7562
|
+
"vehicle",
|
|
7563
|
+
"animal"
|
|
7564
|
+
];
|
|
7565
|
+
/**
|
|
7566
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7567
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7568
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7569
|
+
* detection pipeline executor actually routes.
|
|
7570
|
+
*
|
|
7571
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7572
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7573
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7574
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7575
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7576
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7577
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7578
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7579
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7580
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7581
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7582
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7583
|
+
*/
|
|
7584
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7585
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7586
|
+
preserveOriginal: boolean()
|
|
7587
|
+
});
|
|
7528
7588
|
/**
|
|
7529
7589
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7530
7590
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7547,10 +7607,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7547
7607
|
"events",
|
|
7548
7608
|
"continuous"
|
|
7549
7609
|
]);
|
|
7610
|
+
/**
|
|
7611
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7612
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7613
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7614
|
+
*/
|
|
7615
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7616
|
+
/**
|
|
7617
|
+
* True quando `values` non ripete un elemento.
|
|
7618
|
+
*
|
|
7619
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7620
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7621
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7622
|
+
*/
|
|
7623
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7550
7624
|
/** Which detectors trigger an `events`-mode band. */
|
|
7551
7625
|
var RecordingTriggersSchema = object({
|
|
7552
7626
|
motion: boolean().optional(),
|
|
7553
|
-
audioThresholdDbfs: number().optional()
|
|
7627
|
+
audioThresholdDbfs: number().optional(),
|
|
7628
|
+
/**
|
|
7629
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7630
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7631
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7632
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7633
|
+
*
|
|
7634
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7635
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7636
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7637
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7638
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7639
|
+
*/
|
|
7640
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7641
|
+
/**
|
|
7642
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7643
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7644
|
+
* `objectClasses`.
|
|
7645
|
+
*
|
|
7646
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7647
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7648
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7649
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7650
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7651
|
+
*
|
|
7652
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7653
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7654
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7655
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7656
|
+
* registrare.
|
|
7657
|
+
*/
|
|
7658
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7554
7659
|
});
|
|
7555
7660
|
/**
|
|
7556
7661
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8002,41 +8107,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8002
8107
|
*/
|
|
8003
8108
|
debug: boolean().optional()
|
|
8004
8109
|
});
|
|
8005
|
-
var LabelDefinitionSchema = object({
|
|
8006
|
-
id: string(),
|
|
8007
|
-
name: string(),
|
|
8008
|
-
category: string().optional(),
|
|
8009
|
-
description: string().optional(),
|
|
8010
|
-
icon: string().optional()
|
|
8011
|
-
});
|
|
8012
|
-
/**
|
|
8013
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8014
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8015
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8016
|
-
* detection pipeline executor actually routes.
|
|
8017
|
-
*
|
|
8018
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8019
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8020
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8021
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8022
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8023
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8024
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8025
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8026
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8027
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8028
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8029
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8030
|
-
*/
|
|
8031
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8032
|
-
mapping: record(string(), _enum([
|
|
8033
|
-
"person",
|
|
8034
|
-
"vehicle",
|
|
8035
|
-
"animal",
|
|
8036
|
-
"package"
|
|
8037
|
-
])),
|
|
8038
|
-
preserveOriginal: boolean()
|
|
8039
|
-
});
|
|
8040
8110
|
var MODEL_FORMATS = [
|
|
8041
8111
|
"onnx",
|
|
8042
8112
|
"coreml",
|
|
@@ -21152,7 +21222,7 @@ var lifecycleJobSchema = object({
|
|
|
21152
21222
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21153
21223
|
* as every other cap.
|
|
21154
21224
|
*/
|
|
21155
|
-
var LogLevelSchema$
|
|
21225
|
+
var LogLevelSchema$2 = _enum([
|
|
21156
21226
|
"debug",
|
|
21157
21227
|
"info",
|
|
21158
21228
|
"warn",
|
|
@@ -21359,7 +21429,7 @@ var CustomActionInputSchema = object({
|
|
|
21359
21429
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21360
21430
|
addonId: string(),
|
|
21361
21431
|
limit: number().min(1).max(500).default(100),
|
|
21362
|
-
level: LogLevelSchema$
|
|
21432
|
+
level: LogLevelSchema$2.optional()
|
|
21363
21433
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21364
21434
|
packageName: string(),
|
|
21365
21435
|
version: string().optional()
|
|
@@ -21457,7 +21527,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21457
21527
|
auth: "admin"
|
|
21458
21528
|
}), method(object({
|
|
21459
21529
|
addonId: string(),
|
|
21460
|
-
level: LogLevelSchema$
|
|
21530
|
+
level: LogLevelSchema$2.optional()
|
|
21461
21531
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21462
21532
|
/**
|
|
21463
21533
|
* Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
|
|
@@ -23181,6 +23251,35 @@ var FaceFilterEnum = _enum([
|
|
|
23181
23251
|
"identified",
|
|
23182
23252
|
"all"
|
|
23183
23253
|
]);
|
|
23254
|
+
/**
|
|
23255
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
23256
|
+
*
|
|
23257
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
23258
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
23259
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
23260
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
23261
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
23262
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
23263
|
+
*
|
|
23264
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
23265
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
23266
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
23267
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
23268
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
23269
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
23270
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
23271
|
+
* backend's NULL-collation accident.
|
|
23272
|
+
*/
|
|
23273
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
23274
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
23275
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
23276
|
+
* never leaves the server. */
|
|
23277
|
+
var FaceClusterSchema = object({
|
|
23278
|
+
faceIds: array(string()).readonly(),
|
|
23279
|
+
representativeFaceId: string(),
|
|
23280
|
+
size: number().int(),
|
|
23281
|
+
cohesion: number()
|
|
23282
|
+
});
|
|
23184
23283
|
var MediaFileLiteSchema$1 = object({
|
|
23185
23284
|
key: string(),
|
|
23186
23285
|
kind: string(),
|
|
@@ -23227,24 +23326,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23227
23326
|
kind: "mutation",
|
|
23228
23327
|
auth: "admin"
|
|
23229
23328
|
}), method(object({
|
|
23230
|
-
/**
|
|
23329
|
+
/**
|
|
23330
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
23331
|
+
*
|
|
23332
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
23333
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
23334
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
23335
|
+
* present, and this field is then ignored rather than unioned, so
|
|
23336
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
23337
|
+
*/
|
|
23231
23338
|
deviceId: number().int().optional(),
|
|
23339
|
+
/**
|
|
23340
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
23341
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
23342
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
23343
|
+
* about to discard).
|
|
23344
|
+
*
|
|
23345
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
23346
|
+
* "every camera". A request for no devices is a request, not an
|
|
23347
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
23348
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
23349
|
+
*
|
|
23350
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
23351
|
+
*/
|
|
23352
|
+
deviceIds: array(number().int()).optional(),
|
|
23232
23353
|
limit: number().int().positive().optional(),
|
|
23233
23354
|
filter: FaceFilterEnum.optional(),
|
|
23234
23355
|
/**
|
|
23235
|
-
*
|
|
23236
|
-
*
|
|
23356
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23357
|
+
* Absent means no lower bound.
|
|
23358
|
+
*/
|
|
23359
|
+
since: number().int().optional(),
|
|
23360
|
+
/**
|
|
23361
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23362
|
+
* Absent means no upper bound.
|
|
23363
|
+
*/
|
|
23364
|
+
until: number().int().optional(),
|
|
23365
|
+
/**
|
|
23366
|
+
* Order the page by time or by suggestion certainty. Default
|
|
23367
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
23368
|
+
* that does not ask.
|
|
23237
23369
|
*
|
|
23238
|
-
*
|
|
23239
|
-
*
|
|
23240
|
-
* the browser cache the images.
|
|
23370
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
23371
|
+
* does under `'suggestionConfidence'`.
|
|
23241
23372
|
*
|
|
23242
|
-
*
|
|
23243
|
-
*
|
|
23244
|
-
*
|
|
23245
|
-
*
|
|
23246
|
-
*
|
|
23247
|
-
|
|
23373
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
23374
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
23375
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
23376
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
23377
|
+
* with {@link since} / {@link until}.
|
|
23378
|
+
*/
|
|
23379
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
23380
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
23381
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
23382
|
+
/**
|
|
23383
|
+
* Inline the base64 crop on every row.
|
|
23384
|
+
*
|
|
23385
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
23386
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
23387
|
+
* this for every gallery, and which records why the inline shape had
|
|
23388
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
23389
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
23390
|
+
* that describes the old design reads as permission to rely on it.
|
|
23391
|
+
*
|
|
23392
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
23393
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
23394
|
+
* cached and ETagged.
|
|
23248
23395
|
*/
|
|
23249
23396
|
includeCrops: boolean().optional()
|
|
23250
23397
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -23280,13 +23427,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23280
23427
|
}), method(object({
|
|
23281
23428
|
threshold: number().min(0).max(1).optional(),
|
|
23282
23429
|
minClusterSize: number().int().min(2).optional(),
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
|
|
23286
|
-
|
|
23287
|
-
|
|
23288
|
-
|
|
23289
|
-
|
|
23430
|
+
/**
|
|
23431
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
23432
|
+
* which read as though it bounded the work — it never did.
|
|
23433
|
+
*
|
|
23434
|
+
* Wins over {@link limit} when both are sent.
|
|
23435
|
+
*/
|
|
23436
|
+
maxClusters: number().int().positive().optional(),
|
|
23437
|
+
/**
|
|
23438
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
23439
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
23440
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
23441
|
+
*/
|
|
23442
|
+
limit: number().int().positive().optional(),
|
|
23443
|
+
/**
|
|
23444
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
23445
|
+
* POOL, not the result.
|
|
23446
|
+
*
|
|
23447
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
23448
|
+
* used to read every unassigned face on the hub no matter what the
|
|
23449
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
23450
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
23451
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
23452
|
+
*
|
|
23453
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
23454
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
23455
|
+
* sample it randomly.
|
|
23456
|
+
*
|
|
23457
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
23458
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
23459
|
+
* unbounded scan can never come back as the table grows.
|
|
23460
|
+
*/
|
|
23461
|
+
maxFacesScanned: number().int().positive().optional()
|
|
23462
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
23290
23463
|
/**
|
|
23291
23464
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
23292
23465
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -28228,6 +28401,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
28228
28401
|
latitude: number().min(-90).max(90),
|
|
28229
28402
|
longitude: number().min(-180).max(180)
|
|
28230
28403
|
}).nullable();
|
|
28404
|
+
/**
|
|
28405
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
28406
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28407
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28408
|
+
* already prints - never a token, never an `Authorization` header.
|
|
28409
|
+
*/
|
|
28410
|
+
var RequestCensusGroupSchema = object({
|
|
28411
|
+
procedure: string(),
|
|
28412
|
+
userAgent: string(),
|
|
28413
|
+
ip: string(),
|
|
28414
|
+
principal: string(),
|
|
28415
|
+
calls: number(),
|
|
28416
|
+
perMin: number()
|
|
28417
|
+
});
|
|
28418
|
+
/**
|
|
28419
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
28420
|
+
*
|
|
28421
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
28422
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
28423
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
28424
|
+
*/
|
|
28425
|
+
var RequestCensusProcedureSchema = object({
|
|
28426
|
+
procedure: string(),
|
|
28427
|
+
calls: number(),
|
|
28428
|
+
perMin: number()
|
|
28429
|
+
});
|
|
28430
|
+
/**
|
|
28431
|
+
* The census as an operator sees it.
|
|
28432
|
+
*
|
|
28433
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
28434
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
28435
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
28436
|
+
* like one that succeeded.
|
|
28437
|
+
*/
|
|
28438
|
+
var RequestCensusStatusSchema = object({
|
|
28439
|
+
armed: boolean(),
|
|
28440
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
28441
|
+
elapsedMs: number(),
|
|
28442
|
+
/** The window actually armed, after the server clamped the request. */
|
|
28443
|
+
windowMs: number(),
|
|
28444
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28445
|
+
armedUntilMs: number(),
|
|
28446
|
+
httpRequests: number(),
|
|
28447
|
+
batchedRequests: number(),
|
|
28448
|
+
/**
|
|
28449
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
28450
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
28451
|
+
* the number comparable with a store-side call count.
|
|
28452
|
+
*/
|
|
28453
|
+
procedureCalls: number(),
|
|
28454
|
+
/**
|
|
28455
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28456
|
+
* transport resolves one context per connection - but the number that says
|
|
28457
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
28458
|
+
*/
|
|
28459
|
+
wsConnections: number(),
|
|
28460
|
+
distinctGroups: number(),
|
|
28461
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
28462
|
+
* cardinality bound. */
|
|
28463
|
+
unattributedCalls: number(),
|
|
28464
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28465
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
28466
|
+
}).extend({ persisted: boolean() });
|
|
28467
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
28468
|
+
var LogLevelSchema$1 = _enum([
|
|
28469
|
+
"debug",
|
|
28470
|
+
"info",
|
|
28471
|
+
"warn",
|
|
28472
|
+
"error"
|
|
28473
|
+
]);
|
|
28474
|
+
/**
|
|
28475
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
28476
|
+
*
|
|
28477
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
28478
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
28479
|
+
*/
|
|
28480
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
28481
|
+
/**
|
|
28482
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
28483
|
+
* layer that carries an explicit value wins.
|
|
28484
|
+
*
|
|
28485
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
28486
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
28487
|
+
* grow later would force every consumer of this document to change with it.
|
|
28488
|
+
* Nothing returns `component` today.
|
|
28489
|
+
*/
|
|
28490
|
+
var LoggingScopeKindSchema = _enum([
|
|
28491
|
+
"cluster",
|
|
28492
|
+
"node",
|
|
28493
|
+
"component"
|
|
28494
|
+
]);
|
|
28495
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
28496
|
+
var LoggingLevelSourceSchema = _enum([
|
|
28497
|
+
"default",
|
|
28498
|
+
"cluster",
|
|
28499
|
+
"node",
|
|
28500
|
+
"component"
|
|
28501
|
+
]);
|
|
28502
|
+
/**
|
|
28503
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
28504
|
+
*
|
|
28505
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
28506
|
+
* difference between "this node is at `info` because I decided it" and
|
|
28507
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
28508
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
28509
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
28510
|
+
*/
|
|
28511
|
+
var LoggingLevelLayerSchema = object({
|
|
28512
|
+
scope: LoggingScopeKindSchema,
|
|
28513
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28514
|
+
nodeId: string().nullable(),
|
|
28515
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28516
|
+
level: LogLevelSchema$1.nullable()
|
|
28517
|
+
});
|
|
28518
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
28519
|
+
var LoggingEffectiveSchema = object({
|
|
28520
|
+
level: LogLevelSchema$1,
|
|
28521
|
+
levelSource: LoggingLevelSourceSchema
|
|
28522
|
+
});
|
|
28523
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
28524
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
28525
|
+
/**
|
|
28526
|
+
* An armed diagnostic, with its DEADLINE.
|
|
28527
|
+
*
|
|
28528
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
28529
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
28530
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
28531
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
28532
|
+
*/
|
|
28533
|
+
var DiagnosticWindowSchema = object({
|
|
28534
|
+
id: DiagnosticIdSchema,
|
|
28535
|
+
armed: boolean(),
|
|
28536
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28537
|
+
armedUntilMs: number(),
|
|
28538
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
28539
|
+
remainingMs: number(),
|
|
28540
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
28541
|
+
* i.e. whether this window would survive a restart. */
|
|
28542
|
+
persisted: boolean()
|
|
28543
|
+
});
|
|
28544
|
+
/**
|
|
28545
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
28546
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
28547
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
28548
|
+
*/
|
|
28549
|
+
var DiagnosticWindowPatchSchema = object({
|
|
28550
|
+
id: DiagnosticIdSchema,
|
|
28551
|
+
armMs: number().int().min(0),
|
|
28552
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
28553
|
+
reportEveryMs: number().int().positive().optional()
|
|
28554
|
+
});
|
|
28555
|
+
/**
|
|
28556
|
+
* A PATCH, and patches MERGE.
|
|
28557
|
+
*
|
|
28558
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
28559
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
28560
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
28561
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
28562
|
+
* turns into an erased one.
|
|
28563
|
+
*/
|
|
28564
|
+
var LoggingSettingsPatchSchema = object({
|
|
28565
|
+
/**
|
|
28566
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
28567
|
+
* addressed scope so it inherits again. A value sets it.
|
|
28568
|
+
*/
|
|
28569
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
28570
|
+
/**
|
|
28571
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28572
|
+
* keeps running — a patch is never a full replacement.
|
|
28573
|
+
*/
|
|
28574
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
28575
|
+
});
|
|
28576
|
+
/**
|
|
28577
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
28578
|
+
*
|
|
28579
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
28580
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
28581
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
28582
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
28583
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
28584
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
28585
|
+
* layer selector needs a name the transport does not already own.
|
|
28586
|
+
*/
|
|
28587
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
28588
|
+
var SetLoggingSettingsInputSchema = object({
|
|
28589
|
+
scopeNodeId: string().optional(),
|
|
28590
|
+
patch: LoggingSettingsPatchSchema
|
|
28591
|
+
});
|
|
28592
|
+
/**
|
|
28593
|
+
* The whole document, as read and as returned after every write.
|
|
28594
|
+
*
|
|
28595
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
28596
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
28597
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
28598
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
28599
|
+
* survive a restart.
|
|
28600
|
+
*/
|
|
28601
|
+
var LoggingSettingsStateSchema = object({
|
|
28602
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28603
|
+
scopeNodeId: string().nullable(),
|
|
28604
|
+
effective: LoggingEffectiveSchema,
|
|
28605
|
+
explicit: LoggingExplicitSchema,
|
|
28606
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
28607
|
+
persisted: boolean()
|
|
28608
|
+
});
|
|
28231
28609
|
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(), {
|
|
28232
28610
|
kind: "mutation",
|
|
28233
28611
|
auth: "admin"
|
|
@@ -28240,6 +28618,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
28240
28618
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
28241
28619
|
kind: "mutation",
|
|
28242
28620
|
auth: "admin"
|
|
28621
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
28622
|
+
kind: "mutation",
|
|
28623
|
+
auth: "admin"
|
|
28243
28624
|
});
|
|
28244
28625
|
/**
|
|
28245
28626
|
* Tamper / case-open detection sensor. Drives Home Assistant
|
|
@@ -35479,6 +35860,18 @@ Object.freeze({
|
|
|
35479
35860
|
addonId: null,
|
|
35480
35861
|
access: "create"
|
|
35481
35862
|
},
|
|
35863
|
+
"system.getLoggingSettings": {
|
|
35864
|
+
capName: "system",
|
|
35865
|
+
capScope: "system",
|
|
35866
|
+
addonId: null,
|
|
35867
|
+
access: "view"
|
|
35868
|
+
},
|
|
35869
|
+
"system.getRequestCensus": {
|
|
35870
|
+
capName: "system",
|
|
35871
|
+
capScope: "system",
|
|
35872
|
+
addonId: null,
|
|
35873
|
+
access: "view"
|
|
35874
|
+
},
|
|
35482
35875
|
"system.getRetentionConfig": {
|
|
35483
35876
|
capName: "system",
|
|
35484
35877
|
capScope: "system",
|
|
@@ -35509,6 +35902,12 @@ Object.freeze({
|
|
|
35509
35902
|
addonId: null,
|
|
35510
35903
|
access: "view"
|
|
35511
35904
|
},
|
|
35905
|
+
"system.setLoggingSettings": {
|
|
35906
|
+
capName: "system",
|
|
35907
|
+
capScope: "system",
|
|
35908
|
+
addonId: null,
|
|
35909
|
+
access: "create"
|
|
35910
|
+
},
|
|
35512
35911
|
"system.setRetentionConfig": {
|
|
35513
35912
|
capName: "system",
|
|
35514
35913
|
capScope: "system",
|
|
@@ -36664,6 +37063,10 @@ Object.freeze({
|
|
|
36664
37063
|
name: "deviceId",
|
|
36665
37064
|
form: "single",
|
|
36666
37065
|
optional: true
|
|
37066
|
+
}, {
|
|
37067
|
+
name: "deviceIds",
|
|
37068
|
+
form: "array",
|
|
37069
|
+
optional: true
|
|
36667
37070
|
}],
|
|
36668
37071
|
"fanControl.setDirection": [{
|
|
36669
37072
|
name: "deviceId",
|
|
@@ -38274,7 +38677,38 @@ object({
|
|
|
38274
38677
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
38275
38678
|
* reproduce that.
|
|
38276
38679
|
*/
|
|
38277
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
38680
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
38681
|
+
/**
|
|
38682
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
38683
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
38684
|
+
* subject tiles, on frames that detected something.
|
|
38685
|
+
*
|
|
38686
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
38687
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
38688
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
38689
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
38690
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
38691
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
38692
|
+
*
|
|
38693
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
38694
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
38695
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
38696
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
38697
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
38698
|
+
* binds only through a detection burst, where it still covers well past the
|
|
38699
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
38700
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
38701
|
+
* whole shape exists to avoid.
|
|
38702
|
+
*
|
|
38703
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
38704
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
38705
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
38706
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
38707
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
38708
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
38709
|
+
* nothing.
|
|
38710
|
+
*/
|
|
38711
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
38278
38712
|
});
|
|
38279
38713
|
/**
|
|
38280
38714
|
* The values in force when the operator has set nothing.
|
|
@@ -38290,12 +38724,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
38290
38724
|
budgetMb: 1024,
|
|
38291
38725
|
activityMs: 15e3,
|
|
38292
38726
|
tileBudgetMb: 64,
|
|
38727
|
+
sceneBudgetMb: 48,
|
|
38293
38728
|
admission: "inferred"
|
|
38294
38729
|
};
|
|
38295
38730
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
38296
38731
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
38297
38732
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
38298
38733
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
38734
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
38299
38735
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
38300
38736
|
var MB = 1024 * 1024;
|
|
38301
38737
|
1024 * MB, 3072 * MB;
|
package/package.json
CHANGED