@camstack/addon-provider-amcrest 0.2.32 → 0.2.33
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
|
@@ -7519,6 +7519,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7519
7519
|
/** Max rows returned, newest-first. */
|
|
7520
7520
|
limit: number().int().min(1).max(1e3).optional()
|
|
7521
7521
|
});
|
|
7522
|
+
var LabelDefinitionSchema = object({
|
|
7523
|
+
id: string(),
|
|
7524
|
+
name: string(),
|
|
7525
|
+
category: string().optional(),
|
|
7526
|
+
description: string().optional(),
|
|
7527
|
+
icon: string().optional()
|
|
7528
|
+
});
|
|
7529
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7530
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7531
|
+
"person",
|
|
7532
|
+
"vehicle",
|
|
7533
|
+
"animal",
|
|
7534
|
+
"package"
|
|
7535
|
+
];
|
|
7536
|
+
/**
|
|
7537
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7538
|
+
* un operatore può selezionare.
|
|
7539
|
+
*
|
|
7540
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7541
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7542
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7543
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7544
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7545
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7546
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7547
|
+
*
|
|
7548
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7549
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7550
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7551
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7552
|
+
* successiva.
|
|
7553
|
+
*/
|
|
7554
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7555
|
+
"person",
|
|
7556
|
+
"vehicle",
|
|
7557
|
+
"animal"
|
|
7558
|
+
];
|
|
7559
|
+
/**
|
|
7560
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7561
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7562
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7563
|
+
* detection pipeline executor actually routes.
|
|
7564
|
+
*
|
|
7565
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7566
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7567
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7568
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7569
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7570
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7571
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7572
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7573
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7574
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7575
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7576
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7577
|
+
*/
|
|
7578
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7579
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7580
|
+
preserveOriginal: boolean()
|
|
7581
|
+
});
|
|
7522
7582
|
/**
|
|
7523
7583
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7524
7584
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7541,10 +7601,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7541
7601
|
"events",
|
|
7542
7602
|
"continuous"
|
|
7543
7603
|
]);
|
|
7604
|
+
/**
|
|
7605
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7606
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7607
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7608
|
+
*/
|
|
7609
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7610
|
+
/**
|
|
7611
|
+
* True quando `values` non ripete un elemento.
|
|
7612
|
+
*
|
|
7613
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7614
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7615
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7616
|
+
*/
|
|
7617
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7544
7618
|
/** Which detectors trigger an `events`-mode band. */
|
|
7545
7619
|
var RecordingTriggersSchema = object({
|
|
7546
7620
|
motion: boolean().optional(),
|
|
7547
|
-
audioThresholdDbfs: number().optional()
|
|
7621
|
+
audioThresholdDbfs: number().optional(),
|
|
7622
|
+
/**
|
|
7623
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7624
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7625
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7626
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7627
|
+
*
|
|
7628
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7629
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7630
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7631
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7632
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7633
|
+
*/
|
|
7634
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7635
|
+
/**
|
|
7636
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7637
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7638
|
+
* `objectClasses`.
|
|
7639
|
+
*
|
|
7640
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7641
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7642
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7643
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7644
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7645
|
+
*
|
|
7646
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7647
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7648
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7649
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7650
|
+
* registrare.
|
|
7651
|
+
*/
|
|
7652
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7548
7653
|
});
|
|
7549
7654
|
/**
|
|
7550
7655
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -7996,41 +8101,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
7996
8101
|
*/
|
|
7997
8102
|
debug: boolean().optional()
|
|
7998
8103
|
});
|
|
7999
|
-
var LabelDefinitionSchema = object({
|
|
8000
|
-
id: string(),
|
|
8001
|
-
name: string(),
|
|
8002
|
-
category: string().optional(),
|
|
8003
|
-
description: string().optional(),
|
|
8004
|
-
icon: string().optional()
|
|
8005
|
-
});
|
|
8006
|
-
/**
|
|
8007
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8008
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8009
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8010
|
-
* detection pipeline executor actually routes.
|
|
8011
|
-
*
|
|
8012
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8013
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8014
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8015
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8016
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8017
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8018
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8019
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8020
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8021
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8022
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8023
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8024
|
-
*/
|
|
8025
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8026
|
-
mapping: record(string(), _enum([
|
|
8027
|
-
"person",
|
|
8028
|
-
"vehicle",
|
|
8029
|
-
"animal",
|
|
8030
|
-
"package"
|
|
8031
|
-
])),
|
|
8032
|
-
preserveOriginal: boolean()
|
|
8033
|
-
});
|
|
8034
8104
|
var MODEL_FORMATS = [
|
|
8035
8105
|
"onnx",
|
|
8036
8106
|
"coreml",
|
|
@@ -21250,7 +21320,7 @@ var lifecycleJobSchema = object({
|
|
|
21250
21320
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21251
21321
|
* as every other cap.
|
|
21252
21322
|
*/
|
|
21253
|
-
var LogLevelSchema$
|
|
21323
|
+
var LogLevelSchema$2 = _enum([
|
|
21254
21324
|
"debug",
|
|
21255
21325
|
"info",
|
|
21256
21326
|
"warn",
|
|
@@ -21457,7 +21527,7 @@ var CustomActionInputSchema = object({
|
|
|
21457
21527
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21458
21528
|
addonId: string(),
|
|
21459
21529
|
limit: number().min(1).max(500).default(100),
|
|
21460
|
-
level: LogLevelSchema$
|
|
21530
|
+
level: LogLevelSchema$2.optional()
|
|
21461
21531
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21462
21532
|
packageName: string(),
|
|
21463
21533
|
version: string().optional()
|
|
@@ -21555,7 +21625,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21555
21625
|
auth: "admin"
|
|
21556
21626
|
}), method(object({
|
|
21557
21627
|
addonId: string(),
|
|
21558
|
-
level: LogLevelSchema$
|
|
21628
|
+
level: LogLevelSchema$2.optional()
|
|
21559
21629
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21560
21630
|
/**
|
|
21561
21631
|
* Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
|
|
@@ -23279,6 +23349,35 @@ var FaceFilterEnum = _enum([
|
|
|
23279
23349
|
"identified",
|
|
23280
23350
|
"all"
|
|
23281
23351
|
]);
|
|
23352
|
+
/**
|
|
23353
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
23354
|
+
*
|
|
23355
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
23356
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
23357
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
23358
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
23359
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
23360
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
23361
|
+
*
|
|
23362
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
23363
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
23364
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
23365
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
23366
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
23367
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
23368
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
23369
|
+
* backend's NULL-collation accident.
|
|
23370
|
+
*/
|
|
23371
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
23372
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
23373
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
23374
|
+
* never leaves the server. */
|
|
23375
|
+
var FaceClusterSchema = object({
|
|
23376
|
+
faceIds: array(string()).readonly(),
|
|
23377
|
+
representativeFaceId: string(),
|
|
23378
|
+
size: number().int(),
|
|
23379
|
+
cohesion: number()
|
|
23380
|
+
});
|
|
23282
23381
|
var MediaFileLiteSchema$1 = object({
|
|
23283
23382
|
key: string(),
|
|
23284
23383
|
kind: string(),
|
|
@@ -23325,24 +23424,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23325
23424
|
kind: "mutation",
|
|
23326
23425
|
auth: "admin"
|
|
23327
23426
|
}), method(object({
|
|
23328
|
-
/**
|
|
23427
|
+
/**
|
|
23428
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
23429
|
+
*
|
|
23430
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
23431
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
23432
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
23433
|
+
* present, and this field is then ignored rather than unioned, so
|
|
23434
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
23435
|
+
*/
|
|
23329
23436
|
deviceId: number().int().optional(),
|
|
23437
|
+
/**
|
|
23438
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
23439
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
23440
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
23441
|
+
* about to discard).
|
|
23442
|
+
*
|
|
23443
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
23444
|
+
* "every camera". A request for no devices is a request, not an
|
|
23445
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
23446
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
23447
|
+
*
|
|
23448
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
23449
|
+
*/
|
|
23450
|
+
deviceIds: array(number().int()).optional(),
|
|
23330
23451
|
limit: number().int().positive().optional(),
|
|
23331
23452
|
filter: FaceFilterEnum.optional(),
|
|
23332
23453
|
/**
|
|
23333
|
-
*
|
|
23334
|
-
*
|
|
23454
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23455
|
+
* Absent means no lower bound.
|
|
23456
|
+
*/
|
|
23457
|
+
since: number().int().optional(),
|
|
23458
|
+
/**
|
|
23459
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23460
|
+
* Absent means no upper bound.
|
|
23461
|
+
*/
|
|
23462
|
+
until: number().int().optional(),
|
|
23463
|
+
/**
|
|
23464
|
+
* Order the page by time or by suggestion certainty. Default
|
|
23465
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
23466
|
+
* that does not ask.
|
|
23335
23467
|
*
|
|
23336
|
-
*
|
|
23337
|
-
*
|
|
23338
|
-
* the browser cache the images.
|
|
23468
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
23469
|
+
* does under `'suggestionConfidence'`.
|
|
23339
23470
|
*
|
|
23340
|
-
*
|
|
23341
|
-
*
|
|
23342
|
-
*
|
|
23343
|
-
*
|
|
23344
|
-
*
|
|
23345
|
-
|
|
23471
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
23472
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
23473
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
23474
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
23475
|
+
* with {@link since} / {@link until}.
|
|
23476
|
+
*/
|
|
23477
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
23478
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
23479
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
23480
|
+
/**
|
|
23481
|
+
* Inline the base64 crop on every row.
|
|
23482
|
+
*
|
|
23483
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
23484
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
23485
|
+
* this for every gallery, and which records why the inline shape had
|
|
23486
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
23487
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
23488
|
+
* that describes the old design reads as permission to rely on it.
|
|
23489
|
+
*
|
|
23490
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
23491
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
23492
|
+
* cached and ETagged.
|
|
23346
23493
|
*/
|
|
23347
23494
|
includeCrops: boolean().optional()
|
|
23348
23495
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -23378,13 +23525,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23378
23525
|
}), method(object({
|
|
23379
23526
|
threshold: number().min(0).max(1).optional(),
|
|
23380
23527
|
minClusterSize: number().int().min(2).optional(),
|
|
23381
|
-
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23528
|
+
/**
|
|
23529
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
23530
|
+
* which read as though it bounded the work — it never did.
|
|
23531
|
+
*
|
|
23532
|
+
* Wins over {@link limit} when both are sent.
|
|
23533
|
+
*/
|
|
23534
|
+
maxClusters: number().int().positive().optional(),
|
|
23535
|
+
/**
|
|
23536
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
23537
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
23538
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
23539
|
+
*/
|
|
23540
|
+
limit: number().int().positive().optional(),
|
|
23541
|
+
/**
|
|
23542
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
23543
|
+
* POOL, not the result.
|
|
23544
|
+
*
|
|
23545
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
23546
|
+
* used to read every unassigned face on the hub no matter what the
|
|
23547
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
23548
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
23549
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
23550
|
+
*
|
|
23551
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
23552
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
23553
|
+
* sample it randomly.
|
|
23554
|
+
*
|
|
23555
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
23556
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
23557
|
+
* unbounded scan can never come back as the table grows.
|
|
23558
|
+
*/
|
|
23559
|
+
maxFacesScanned: number().int().positive().optional()
|
|
23560
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
23388
23561
|
/**
|
|
23389
23562
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
23390
23563
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -28612,6 +28785,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
28612
28785
|
latitude: number().min(-90).max(90),
|
|
28613
28786
|
longitude: number().min(-180).max(180)
|
|
28614
28787
|
}).nullable();
|
|
28788
|
+
/**
|
|
28789
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
28790
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28791
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28792
|
+
* already prints - never a token, never an `Authorization` header.
|
|
28793
|
+
*/
|
|
28794
|
+
var RequestCensusGroupSchema = object({
|
|
28795
|
+
procedure: string(),
|
|
28796
|
+
userAgent: string(),
|
|
28797
|
+
ip: string(),
|
|
28798
|
+
principal: string(),
|
|
28799
|
+
calls: number(),
|
|
28800
|
+
perMin: number()
|
|
28801
|
+
});
|
|
28802
|
+
/**
|
|
28803
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
28804
|
+
*
|
|
28805
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
28806
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
28807
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
28808
|
+
*/
|
|
28809
|
+
var RequestCensusProcedureSchema = object({
|
|
28810
|
+
procedure: string(),
|
|
28811
|
+
calls: number(),
|
|
28812
|
+
perMin: number()
|
|
28813
|
+
});
|
|
28814
|
+
/**
|
|
28815
|
+
* The census as an operator sees it.
|
|
28816
|
+
*
|
|
28817
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
28818
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
28819
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
28820
|
+
* like one that succeeded.
|
|
28821
|
+
*/
|
|
28822
|
+
var RequestCensusStatusSchema = object({
|
|
28823
|
+
armed: boolean(),
|
|
28824
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
28825
|
+
elapsedMs: number(),
|
|
28826
|
+
/** The window actually armed, after the server clamped the request. */
|
|
28827
|
+
windowMs: number(),
|
|
28828
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28829
|
+
armedUntilMs: number(),
|
|
28830
|
+
httpRequests: number(),
|
|
28831
|
+
batchedRequests: number(),
|
|
28832
|
+
/**
|
|
28833
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
28834
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
28835
|
+
* the number comparable with a store-side call count.
|
|
28836
|
+
*/
|
|
28837
|
+
procedureCalls: number(),
|
|
28838
|
+
/**
|
|
28839
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28840
|
+
* transport resolves one context per connection - but the number that says
|
|
28841
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
28842
|
+
*/
|
|
28843
|
+
wsConnections: number(),
|
|
28844
|
+
distinctGroups: number(),
|
|
28845
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
28846
|
+
* cardinality bound. */
|
|
28847
|
+
unattributedCalls: number(),
|
|
28848
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28849
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
28850
|
+
}).extend({ persisted: boolean() });
|
|
28851
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
28852
|
+
var LogLevelSchema$1 = _enum([
|
|
28853
|
+
"debug",
|
|
28854
|
+
"info",
|
|
28855
|
+
"warn",
|
|
28856
|
+
"error"
|
|
28857
|
+
]);
|
|
28858
|
+
/**
|
|
28859
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
28860
|
+
*
|
|
28861
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
28862
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
28863
|
+
*/
|
|
28864
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
28865
|
+
/**
|
|
28866
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
28867
|
+
* layer that carries an explicit value wins.
|
|
28868
|
+
*
|
|
28869
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
28870
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
28871
|
+
* grow later would force every consumer of this document to change with it.
|
|
28872
|
+
* Nothing returns `component` today.
|
|
28873
|
+
*/
|
|
28874
|
+
var LoggingScopeKindSchema = _enum([
|
|
28875
|
+
"cluster",
|
|
28876
|
+
"node",
|
|
28877
|
+
"component"
|
|
28878
|
+
]);
|
|
28879
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
28880
|
+
var LoggingLevelSourceSchema = _enum([
|
|
28881
|
+
"default",
|
|
28882
|
+
"cluster",
|
|
28883
|
+
"node",
|
|
28884
|
+
"component"
|
|
28885
|
+
]);
|
|
28886
|
+
/**
|
|
28887
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
28888
|
+
*
|
|
28889
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
28890
|
+
* difference between "this node is at `info` because I decided it" and
|
|
28891
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
28892
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
28893
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
28894
|
+
*/
|
|
28895
|
+
var LoggingLevelLayerSchema = object({
|
|
28896
|
+
scope: LoggingScopeKindSchema,
|
|
28897
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28898
|
+
nodeId: string().nullable(),
|
|
28899
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28900
|
+
level: LogLevelSchema$1.nullable()
|
|
28901
|
+
});
|
|
28902
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
28903
|
+
var LoggingEffectiveSchema = object({
|
|
28904
|
+
level: LogLevelSchema$1,
|
|
28905
|
+
levelSource: LoggingLevelSourceSchema
|
|
28906
|
+
});
|
|
28907
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
28908
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
28909
|
+
/**
|
|
28910
|
+
* An armed diagnostic, with its DEADLINE.
|
|
28911
|
+
*
|
|
28912
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
28913
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
28914
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
28915
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
28916
|
+
*/
|
|
28917
|
+
var DiagnosticWindowSchema = object({
|
|
28918
|
+
id: DiagnosticIdSchema,
|
|
28919
|
+
armed: boolean(),
|
|
28920
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28921
|
+
armedUntilMs: number(),
|
|
28922
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
28923
|
+
remainingMs: number(),
|
|
28924
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
28925
|
+
* i.e. whether this window would survive a restart. */
|
|
28926
|
+
persisted: boolean()
|
|
28927
|
+
});
|
|
28928
|
+
/**
|
|
28929
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
28930
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
28931
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
28932
|
+
*/
|
|
28933
|
+
var DiagnosticWindowPatchSchema = object({
|
|
28934
|
+
id: DiagnosticIdSchema,
|
|
28935
|
+
armMs: number().int().min(0),
|
|
28936
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
28937
|
+
reportEveryMs: number().int().positive().optional()
|
|
28938
|
+
});
|
|
28939
|
+
/**
|
|
28940
|
+
* A PATCH, and patches MERGE.
|
|
28941
|
+
*
|
|
28942
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
28943
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
28944
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
28945
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
28946
|
+
* turns into an erased one.
|
|
28947
|
+
*/
|
|
28948
|
+
var LoggingSettingsPatchSchema = object({
|
|
28949
|
+
/**
|
|
28950
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
28951
|
+
* addressed scope so it inherits again. A value sets it.
|
|
28952
|
+
*/
|
|
28953
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
28954
|
+
/**
|
|
28955
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28956
|
+
* keeps running — a patch is never a full replacement.
|
|
28957
|
+
*/
|
|
28958
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
28959
|
+
});
|
|
28960
|
+
/**
|
|
28961
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
28962
|
+
*
|
|
28963
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
28964
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
28965
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
28966
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
28967
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
28968
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
28969
|
+
* layer selector needs a name the transport does not already own.
|
|
28970
|
+
*/
|
|
28971
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
28972
|
+
var SetLoggingSettingsInputSchema = object({
|
|
28973
|
+
scopeNodeId: string().optional(),
|
|
28974
|
+
patch: LoggingSettingsPatchSchema
|
|
28975
|
+
});
|
|
28976
|
+
/**
|
|
28977
|
+
* The whole document, as read and as returned after every write.
|
|
28978
|
+
*
|
|
28979
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
28980
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
28981
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
28982
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
28983
|
+
* survive a restart.
|
|
28984
|
+
*/
|
|
28985
|
+
var LoggingSettingsStateSchema = object({
|
|
28986
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28987
|
+
scopeNodeId: string().nullable(),
|
|
28988
|
+
effective: LoggingEffectiveSchema,
|
|
28989
|
+
explicit: LoggingExplicitSchema,
|
|
28990
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
28991
|
+
persisted: boolean()
|
|
28992
|
+
});
|
|
28615
28993
|
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(), {
|
|
28616
28994
|
kind: "mutation",
|
|
28617
28995
|
auth: "admin"
|
|
@@ -28624,6 +29002,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
28624
29002
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
28625
29003
|
kind: "mutation",
|
|
28626
29004
|
auth: "admin"
|
|
29005
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
29006
|
+
kind: "mutation",
|
|
29007
|
+
auth: "admin"
|
|
28627
29008
|
});
|
|
28628
29009
|
/**
|
|
28629
29010
|
* Tamper / case-open detection sensor. Drives Home Assistant
|
|
@@ -36069,6 +36450,18 @@ Object.freeze({
|
|
|
36069
36450
|
addonId: null,
|
|
36070
36451
|
access: "create"
|
|
36071
36452
|
},
|
|
36453
|
+
"system.getLoggingSettings": {
|
|
36454
|
+
capName: "system",
|
|
36455
|
+
capScope: "system",
|
|
36456
|
+
addonId: null,
|
|
36457
|
+
access: "view"
|
|
36458
|
+
},
|
|
36459
|
+
"system.getRequestCensus": {
|
|
36460
|
+
capName: "system",
|
|
36461
|
+
capScope: "system",
|
|
36462
|
+
addonId: null,
|
|
36463
|
+
access: "view"
|
|
36464
|
+
},
|
|
36072
36465
|
"system.getRetentionConfig": {
|
|
36073
36466
|
capName: "system",
|
|
36074
36467
|
capScope: "system",
|
|
@@ -36099,6 +36492,12 @@ Object.freeze({
|
|
|
36099
36492
|
addonId: null,
|
|
36100
36493
|
access: "view"
|
|
36101
36494
|
},
|
|
36495
|
+
"system.setLoggingSettings": {
|
|
36496
|
+
capName: "system",
|
|
36497
|
+
capScope: "system",
|
|
36498
|
+
addonId: null,
|
|
36499
|
+
access: "create"
|
|
36500
|
+
},
|
|
36102
36501
|
"system.setRetentionConfig": {
|
|
36103
36502
|
capName: "system",
|
|
36104
36503
|
capScope: "system",
|
|
@@ -37254,6 +37653,10 @@ Object.freeze({
|
|
|
37254
37653
|
name: "deviceId",
|
|
37255
37654
|
form: "single",
|
|
37256
37655
|
optional: true
|
|
37656
|
+
}, {
|
|
37657
|
+
name: "deviceIds",
|
|
37658
|
+
form: "array",
|
|
37659
|
+
optional: true
|
|
37257
37660
|
}],
|
|
37258
37661
|
"fanControl.setDirection": [{
|
|
37259
37662
|
name: "deviceId",
|
|
@@ -38864,7 +39267,38 @@ object({
|
|
|
38864
39267
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
38865
39268
|
* reproduce that.
|
|
38866
39269
|
*/
|
|
38867
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
39270
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
39271
|
+
/**
|
|
39272
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
39273
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
39274
|
+
* subject tiles, on frames that detected something.
|
|
39275
|
+
*
|
|
39276
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
39277
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
39278
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
39279
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
39280
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
39281
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
39282
|
+
*
|
|
39283
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
39284
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
39285
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
39286
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
39287
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
39288
|
+
* binds only through a detection burst, where it still covers well past the
|
|
39289
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
39290
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
39291
|
+
* whole shape exists to avoid.
|
|
39292
|
+
*
|
|
39293
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
39294
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
39295
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
39296
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
39297
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
39298
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
39299
|
+
* nothing.
|
|
39300
|
+
*/
|
|
39301
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
38868
39302
|
});
|
|
38869
39303
|
/**
|
|
38870
39304
|
* The values in force when the operator has set nothing.
|
|
@@ -38880,12 +39314,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
38880
39314
|
budgetMb: 1024,
|
|
38881
39315
|
activityMs: 15e3,
|
|
38882
39316
|
tileBudgetMb: 64,
|
|
39317
|
+
sceneBudgetMb: 48,
|
|
38883
39318
|
admission: "inferred"
|
|
38884
39319
|
};
|
|
38885
39320
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
38886
39321
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
38887
39322
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
38888
39323
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
39324
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
38889
39325
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
38890
39326
|
var MB = 1024 * 1024;
|
|
38891
39327
|
1024 * MB, 3072 * MB;
|
package/dist/addon.mjs
CHANGED
|
@@ -7520,6 +7520,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7520
7520
|
/** Max rows returned, newest-first. */
|
|
7521
7521
|
limit: number().int().min(1).max(1e3).optional()
|
|
7522
7522
|
});
|
|
7523
|
+
var LabelDefinitionSchema = object({
|
|
7524
|
+
id: string(),
|
|
7525
|
+
name: string(),
|
|
7526
|
+
category: string().optional(),
|
|
7527
|
+
description: string().optional(),
|
|
7528
|
+
icon: string().optional()
|
|
7529
|
+
});
|
|
7530
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7531
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7532
|
+
"person",
|
|
7533
|
+
"vehicle",
|
|
7534
|
+
"animal",
|
|
7535
|
+
"package"
|
|
7536
|
+
];
|
|
7537
|
+
/**
|
|
7538
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7539
|
+
* un operatore può selezionare.
|
|
7540
|
+
*
|
|
7541
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7542
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7543
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7544
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7545
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7546
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7547
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7548
|
+
*
|
|
7549
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7550
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7551
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7552
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7553
|
+
* successiva.
|
|
7554
|
+
*/
|
|
7555
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7556
|
+
"person",
|
|
7557
|
+
"vehicle",
|
|
7558
|
+
"animal"
|
|
7559
|
+
];
|
|
7560
|
+
/**
|
|
7561
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7562
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7563
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7564
|
+
* detection pipeline executor actually routes.
|
|
7565
|
+
*
|
|
7566
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7567
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7568
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7569
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7570
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7571
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7572
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7573
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7574
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7575
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7576
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7577
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7578
|
+
*/
|
|
7579
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7580
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7581
|
+
preserveOriginal: boolean()
|
|
7582
|
+
});
|
|
7523
7583
|
/**
|
|
7524
7584
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7525
7585
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7542,10 +7602,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7542
7602
|
"events",
|
|
7543
7603
|
"continuous"
|
|
7544
7604
|
]);
|
|
7605
|
+
/**
|
|
7606
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7607
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7608
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7609
|
+
*/
|
|
7610
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7611
|
+
/**
|
|
7612
|
+
* True quando `values` non ripete un elemento.
|
|
7613
|
+
*
|
|
7614
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7615
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7616
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7617
|
+
*/
|
|
7618
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7545
7619
|
/** Which detectors trigger an `events`-mode band. */
|
|
7546
7620
|
var RecordingTriggersSchema = object({
|
|
7547
7621
|
motion: boolean().optional(),
|
|
7548
|
-
audioThresholdDbfs: number().optional()
|
|
7622
|
+
audioThresholdDbfs: number().optional(),
|
|
7623
|
+
/**
|
|
7624
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7625
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7626
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7627
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7628
|
+
*
|
|
7629
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7630
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7631
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7632
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7633
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7634
|
+
*/
|
|
7635
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7636
|
+
/**
|
|
7637
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7638
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7639
|
+
* `objectClasses`.
|
|
7640
|
+
*
|
|
7641
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7642
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7643
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7644
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7645
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7646
|
+
*
|
|
7647
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7648
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7649
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7650
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7651
|
+
* registrare.
|
|
7652
|
+
*/
|
|
7653
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7549
7654
|
});
|
|
7550
7655
|
/**
|
|
7551
7656
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -7997,41 +8102,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
7997
8102
|
*/
|
|
7998
8103
|
debug: boolean().optional()
|
|
7999
8104
|
});
|
|
8000
|
-
var LabelDefinitionSchema = object({
|
|
8001
|
-
id: string(),
|
|
8002
|
-
name: string(),
|
|
8003
|
-
category: string().optional(),
|
|
8004
|
-
description: string().optional(),
|
|
8005
|
-
icon: string().optional()
|
|
8006
|
-
});
|
|
8007
|
-
/**
|
|
8008
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8009
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8010
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8011
|
-
* detection pipeline executor actually routes.
|
|
8012
|
-
*
|
|
8013
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8014
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8015
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8016
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8017
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8018
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8019
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8020
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8021
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8022
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8023
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8024
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8025
|
-
*/
|
|
8026
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8027
|
-
mapping: record(string(), _enum([
|
|
8028
|
-
"person",
|
|
8029
|
-
"vehicle",
|
|
8030
|
-
"animal",
|
|
8031
|
-
"package"
|
|
8032
|
-
])),
|
|
8033
|
-
preserveOriginal: boolean()
|
|
8034
|
-
});
|
|
8035
8105
|
var MODEL_FORMATS = [
|
|
8036
8106
|
"onnx",
|
|
8037
8107
|
"coreml",
|
|
@@ -21251,7 +21321,7 @@ var lifecycleJobSchema = object({
|
|
|
21251
21321
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21252
21322
|
* as every other cap.
|
|
21253
21323
|
*/
|
|
21254
|
-
var LogLevelSchema$
|
|
21324
|
+
var LogLevelSchema$2 = _enum([
|
|
21255
21325
|
"debug",
|
|
21256
21326
|
"info",
|
|
21257
21327
|
"warn",
|
|
@@ -21458,7 +21528,7 @@ var CustomActionInputSchema = object({
|
|
|
21458
21528
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21459
21529
|
addonId: string(),
|
|
21460
21530
|
limit: number().min(1).max(500).default(100),
|
|
21461
|
-
level: LogLevelSchema$
|
|
21531
|
+
level: LogLevelSchema$2.optional()
|
|
21462
21532
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21463
21533
|
packageName: string(),
|
|
21464
21534
|
version: string().optional()
|
|
@@ -21556,7 +21626,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21556
21626
|
auth: "admin"
|
|
21557
21627
|
}), method(object({
|
|
21558
21628
|
addonId: string(),
|
|
21559
|
-
level: LogLevelSchema$
|
|
21629
|
+
level: LogLevelSchema$2.optional()
|
|
21560
21630
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21561
21631
|
/**
|
|
21562
21632
|
* Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
|
|
@@ -23280,6 +23350,35 @@ var FaceFilterEnum = _enum([
|
|
|
23280
23350
|
"identified",
|
|
23281
23351
|
"all"
|
|
23282
23352
|
]);
|
|
23353
|
+
/**
|
|
23354
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
23355
|
+
*
|
|
23356
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
23357
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
23358
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
23359
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
23360
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
23361
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
23362
|
+
*
|
|
23363
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
23364
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
23365
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
23366
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
23367
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
23368
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
23369
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
23370
|
+
* backend's NULL-collation accident.
|
|
23371
|
+
*/
|
|
23372
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
23373
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
23374
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
23375
|
+
* never leaves the server. */
|
|
23376
|
+
var FaceClusterSchema = object({
|
|
23377
|
+
faceIds: array(string()).readonly(),
|
|
23378
|
+
representativeFaceId: string(),
|
|
23379
|
+
size: number().int(),
|
|
23380
|
+
cohesion: number()
|
|
23381
|
+
});
|
|
23283
23382
|
var MediaFileLiteSchema$1 = object({
|
|
23284
23383
|
key: string(),
|
|
23285
23384
|
kind: string(),
|
|
@@ -23326,24 +23425,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23326
23425
|
kind: "mutation",
|
|
23327
23426
|
auth: "admin"
|
|
23328
23427
|
}), method(object({
|
|
23329
|
-
/**
|
|
23428
|
+
/**
|
|
23429
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
23430
|
+
*
|
|
23431
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
23432
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
23433
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
23434
|
+
* present, and this field is then ignored rather than unioned, so
|
|
23435
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
23436
|
+
*/
|
|
23330
23437
|
deviceId: number().int().optional(),
|
|
23438
|
+
/**
|
|
23439
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
23440
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
23441
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
23442
|
+
* about to discard).
|
|
23443
|
+
*
|
|
23444
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
23445
|
+
* "every camera". A request for no devices is a request, not an
|
|
23446
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
23447
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
23448
|
+
*
|
|
23449
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
23450
|
+
*/
|
|
23451
|
+
deviceIds: array(number().int()).optional(),
|
|
23331
23452
|
limit: number().int().positive().optional(),
|
|
23332
23453
|
filter: FaceFilterEnum.optional(),
|
|
23333
23454
|
/**
|
|
23334
|
-
*
|
|
23335
|
-
*
|
|
23455
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23456
|
+
* Absent means no lower bound.
|
|
23457
|
+
*/
|
|
23458
|
+
since: number().int().optional(),
|
|
23459
|
+
/**
|
|
23460
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23461
|
+
* Absent means no upper bound.
|
|
23462
|
+
*/
|
|
23463
|
+
until: number().int().optional(),
|
|
23464
|
+
/**
|
|
23465
|
+
* Order the page by time or by suggestion certainty. Default
|
|
23466
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
23467
|
+
* that does not ask.
|
|
23336
23468
|
*
|
|
23337
|
-
*
|
|
23338
|
-
*
|
|
23339
|
-
* the browser cache the images.
|
|
23469
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
23470
|
+
* does under `'suggestionConfidence'`.
|
|
23340
23471
|
*
|
|
23341
|
-
*
|
|
23342
|
-
*
|
|
23343
|
-
*
|
|
23344
|
-
*
|
|
23345
|
-
*
|
|
23346
|
-
|
|
23472
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
23473
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
23474
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
23475
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
23476
|
+
* with {@link since} / {@link until}.
|
|
23477
|
+
*/
|
|
23478
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
23479
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
23480
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
23481
|
+
/**
|
|
23482
|
+
* Inline the base64 crop on every row.
|
|
23483
|
+
*
|
|
23484
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
23485
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
23486
|
+
* this for every gallery, and which records why the inline shape had
|
|
23487
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
23488
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
23489
|
+
* that describes the old design reads as permission to rely on it.
|
|
23490
|
+
*
|
|
23491
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
23492
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
23493
|
+
* cached and ETagged.
|
|
23347
23494
|
*/
|
|
23348
23495
|
includeCrops: boolean().optional()
|
|
23349
23496
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -23379,13 +23526,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23379
23526
|
}), method(object({
|
|
23380
23527
|
threshold: number().min(0).max(1).optional(),
|
|
23381
23528
|
minClusterSize: number().int().min(2).optional(),
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23388
|
-
|
|
23529
|
+
/**
|
|
23530
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
23531
|
+
* which read as though it bounded the work — it never did.
|
|
23532
|
+
*
|
|
23533
|
+
* Wins over {@link limit} when both are sent.
|
|
23534
|
+
*/
|
|
23535
|
+
maxClusters: number().int().positive().optional(),
|
|
23536
|
+
/**
|
|
23537
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
23538
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
23539
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
23540
|
+
*/
|
|
23541
|
+
limit: number().int().positive().optional(),
|
|
23542
|
+
/**
|
|
23543
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
23544
|
+
* POOL, not the result.
|
|
23545
|
+
*
|
|
23546
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
23547
|
+
* used to read every unassigned face on the hub no matter what the
|
|
23548
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
23549
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
23550
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
23551
|
+
*
|
|
23552
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
23553
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
23554
|
+
* sample it randomly.
|
|
23555
|
+
*
|
|
23556
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
23557
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
23558
|
+
* unbounded scan can never come back as the table grows.
|
|
23559
|
+
*/
|
|
23560
|
+
maxFacesScanned: number().int().positive().optional()
|
|
23561
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
23389
23562
|
/**
|
|
23390
23563
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
23391
23564
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -28613,6 +28786,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
28613
28786
|
latitude: number().min(-90).max(90),
|
|
28614
28787
|
longitude: number().min(-180).max(180)
|
|
28615
28788
|
}).nullable();
|
|
28789
|
+
/**
|
|
28790
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
28791
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28792
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28793
|
+
* already prints - never a token, never an `Authorization` header.
|
|
28794
|
+
*/
|
|
28795
|
+
var RequestCensusGroupSchema = object({
|
|
28796
|
+
procedure: string(),
|
|
28797
|
+
userAgent: string(),
|
|
28798
|
+
ip: string(),
|
|
28799
|
+
principal: string(),
|
|
28800
|
+
calls: number(),
|
|
28801
|
+
perMin: number()
|
|
28802
|
+
});
|
|
28803
|
+
/**
|
|
28804
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
28805
|
+
*
|
|
28806
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
28807
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
28808
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
28809
|
+
*/
|
|
28810
|
+
var RequestCensusProcedureSchema = object({
|
|
28811
|
+
procedure: string(),
|
|
28812
|
+
calls: number(),
|
|
28813
|
+
perMin: number()
|
|
28814
|
+
});
|
|
28815
|
+
/**
|
|
28816
|
+
* The census as an operator sees it.
|
|
28817
|
+
*
|
|
28818
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
28819
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
28820
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
28821
|
+
* like one that succeeded.
|
|
28822
|
+
*/
|
|
28823
|
+
var RequestCensusStatusSchema = object({
|
|
28824
|
+
armed: boolean(),
|
|
28825
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
28826
|
+
elapsedMs: number(),
|
|
28827
|
+
/** The window actually armed, after the server clamped the request. */
|
|
28828
|
+
windowMs: number(),
|
|
28829
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28830
|
+
armedUntilMs: number(),
|
|
28831
|
+
httpRequests: number(),
|
|
28832
|
+
batchedRequests: number(),
|
|
28833
|
+
/**
|
|
28834
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
28835
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
28836
|
+
* the number comparable with a store-side call count.
|
|
28837
|
+
*/
|
|
28838
|
+
procedureCalls: number(),
|
|
28839
|
+
/**
|
|
28840
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28841
|
+
* transport resolves one context per connection - but the number that says
|
|
28842
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
28843
|
+
*/
|
|
28844
|
+
wsConnections: number(),
|
|
28845
|
+
distinctGroups: number(),
|
|
28846
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
28847
|
+
* cardinality bound. */
|
|
28848
|
+
unattributedCalls: number(),
|
|
28849
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28850
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
28851
|
+
}).extend({ persisted: boolean() });
|
|
28852
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
28853
|
+
var LogLevelSchema$1 = _enum([
|
|
28854
|
+
"debug",
|
|
28855
|
+
"info",
|
|
28856
|
+
"warn",
|
|
28857
|
+
"error"
|
|
28858
|
+
]);
|
|
28859
|
+
/**
|
|
28860
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
28861
|
+
*
|
|
28862
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
28863
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
28864
|
+
*/
|
|
28865
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
28866
|
+
/**
|
|
28867
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
28868
|
+
* layer that carries an explicit value wins.
|
|
28869
|
+
*
|
|
28870
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
28871
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
28872
|
+
* grow later would force every consumer of this document to change with it.
|
|
28873
|
+
* Nothing returns `component` today.
|
|
28874
|
+
*/
|
|
28875
|
+
var LoggingScopeKindSchema = _enum([
|
|
28876
|
+
"cluster",
|
|
28877
|
+
"node",
|
|
28878
|
+
"component"
|
|
28879
|
+
]);
|
|
28880
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
28881
|
+
var LoggingLevelSourceSchema = _enum([
|
|
28882
|
+
"default",
|
|
28883
|
+
"cluster",
|
|
28884
|
+
"node",
|
|
28885
|
+
"component"
|
|
28886
|
+
]);
|
|
28887
|
+
/**
|
|
28888
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
28889
|
+
*
|
|
28890
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
28891
|
+
* difference between "this node is at `info` because I decided it" and
|
|
28892
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
28893
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
28894
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
28895
|
+
*/
|
|
28896
|
+
var LoggingLevelLayerSchema = object({
|
|
28897
|
+
scope: LoggingScopeKindSchema,
|
|
28898
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28899
|
+
nodeId: string().nullable(),
|
|
28900
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28901
|
+
level: LogLevelSchema$1.nullable()
|
|
28902
|
+
});
|
|
28903
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
28904
|
+
var LoggingEffectiveSchema = object({
|
|
28905
|
+
level: LogLevelSchema$1,
|
|
28906
|
+
levelSource: LoggingLevelSourceSchema
|
|
28907
|
+
});
|
|
28908
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
28909
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
28910
|
+
/**
|
|
28911
|
+
* An armed diagnostic, with its DEADLINE.
|
|
28912
|
+
*
|
|
28913
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
28914
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
28915
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
28916
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
28917
|
+
*/
|
|
28918
|
+
var DiagnosticWindowSchema = object({
|
|
28919
|
+
id: DiagnosticIdSchema,
|
|
28920
|
+
armed: boolean(),
|
|
28921
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28922
|
+
armedUntilMs: number(),
|
|
28923
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
28924
|
+
remainingMs: number(),
|
|
28925
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
28926
|
+
* i.e. whether this window would survive a restart. */
|
|
28927
|
+
persisted: boolean()
|
|
28928
|
+
});
|
|
28929
|
+
/**
|
|
28930
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
28931
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
28932
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
28933
|
+
*/
|
|
28934
|
+
var DiagnosticWindowPatchSchema = object({
|
|
28935
|
+
id: DiagnosticIdSchema,
|
|
28936
|
+
armMs: number().int().min(0),
|
|
28937
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
28938
|
+
reportEveryMs: number().int().positive().optional()
|
|
28939
|
+
});
|
|
28940
|
+
/**
|
|
28941
|
+
* A PATCH, and patches MERGE.
|
|
28942
|
+
*
|
|
28943
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
28944
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
28945
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
28946
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
28947
|
+
* turns into an erased one.
|
|
28948
|
+
*/
|
|
28949
|
+
var LoggingSettingsPatchSchema = object({
|
|
28950
|
+
/**
|
|
28951
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
28952
|
+
* addressed scope so it inherits again. A value sets it.
|
|
28953
|
+
*/
|
|
28954
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
28955
|
+
/**
|
|
28956
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28957
|
+
* keeps running — a patch is never a full replacement.
|
|
28958
|
+
*/
|
|
28959
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
28960
|
+
});
|
|
28961
|
+
/**
|
|
28962
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
28963
|
+
*
|
|
28964
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
28965
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
28966
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
28967
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
28968
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
28969
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
28970
|
+
* layer selector needs a name the transport does not already own.
|
|
28971
|
+
*/
|
|
28972
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
28973
|
+
var SetLoggingSettingsInputSchema = object({
|
|
28974
|
+
scopeNodeId: string().optional(),
|
|
28975
|
+
patch: LoggingSettingsPatchSchema
|
|
28976
|
+
});
|
|
28977
|
+
/**
|
|
28978
|
+
* The whole document, as read and as returned after every write.
|
|
28979
|
+
*
|
|
28980
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
28981
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
28982
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
28983
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
28984
|
+
* survive a restart.
|
|
28985
|
+
*/
|
|
28986
|
+
var LoggingSettingsStateSchema = object({
|
|
28987
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28988
|
+
scopeNodeId: string().nullable(),
|
|
28989
|
+
effective: LoggingEffectiveSchema,
|
|
28990
|
+
explicit: LoggingExplicitSchema,
|
|
28991
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
28992
|
+
persisted: boolean()
|
|
28993
|
+
});
|
|
28616
28994
|
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(), {
|
|
28617
28995
|
kind: "mutation",
|
|
28618
28996
|
auth: "admin"
|
|
@@ -28625,6 +29003,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
28625
29003
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
28626
29004
|
kind: "mutation",
|
|
28627
29005
|
auth: "admin"
|
|
29006
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
29007
|
+
kind: "mutation",
|
|
29008
|
+
auth: "admin"
|
|
28628
29009
|
});
|
|
28629
29010
|
/**
|
|
28630
29011
|
* Tamper / case-open detection sensor. Drives Home Assistant
|
|
@@ -36070,6 +36451,18 @@ Object.freeze({
|
|
|
36070
36451
|
addonId: null,
|
|
36071
36452
|
access: "create"
|
|
36072
36453
|
},
|
|
36454
|
+
"system.getLoggingSettings": {
|
|
36455
|
+
capName: "system",
|
|
36456
|
+
capScope: "system",
|
|
36457
|
+
addonId: null,
|
|
36458
|
+
access: "view"
|
|
36459
|
+
},
|
|
36460
|
+
"system.getRequestCensus": {
|
|
36461
|
+
capName: "system",
|
|
36462
|
+
capScope: "system",
|
|
36463
|
+
addonId: null,
|
|
36464
|
+
access: "view"
|
|
36465
|
+
},
|
|
36073
36466
|
"system.getRetentionConfig": {
|
|
36074
36467
|
capName: "system",
|
|
36075
36468
|
capScope: "system",
|
|
@@ -36100,6 +36493,12 @@ Object.freeze({
|
|
|
36100
36493
|
addonId: null,
|
|
36101
36494
|
access: "view"
|
|
36102
36495
|
},
|
|
36496
|
+
"system.setLoggingSettings": {
|
|
36497
|
+
capName: "system",
|
|
36498
|
+
capScope: "system",
|
|
36499
|
+
addonId: null,
|
|
36500
|
+
access: "create"
|
|
36501
|
+
},
|
|
36103
36502
|
"system.setRetentionConfig": {
|
|
36104
36503
|
capName: "system",
|
|
36105
36504
|
capScope: "system",
|
|
@@ -37255,6 +37654,10 @@ Object.freeze({
|
|
|
37255
37654
|
name: "deviceId",
|
|
37256
37655
|
form: "single",
|
|
37257
37656
|
optional: true
|
|
37657
|
+
}, {
|
|
37658
|
+
name: "deviceIds",
|
|
37659
|
+
form: "array",
|
|
37660
|
+
optional: true
|
|
37258
37661
|
}],
|
|
37259
37662
|
"fanControl.setDirection": [{
|
|
37260
37663
|
name: "deviceId",
|
|
@@ -38865,7 +39268,38 @@ object({
|
|
|
38865
39268
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
38866
39269
|
* reproduce that.
|
|
38867
39270
|
*/
|
|
38868
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
39271
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
39272
|
+
/**
|
|
39273
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
39274
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
39275
|
+
* subject tiles, on frames that detected something.
|
|
39276
|
+
*
|
|
39277
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
39278
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
39279
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
39280
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
39281
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
39282
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
39283
|
+
*
|
|
39284
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
39285
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
39286
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
39287
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
39288
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
39289
|
+
* binds only through a detection burst, where it still covers well past the
|
|
39290
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
39291
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
39292
|
+
* whole shape exists to avoid.
|
|
39293
|
+
*
|
|
39294
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
39295
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
39296
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
39297
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
39298
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
39299
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
39300
|
+
* nothing.
|
|
39301
|
+
*/
|
|
39302
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
38869
39303
|
});
|
|
38870
39304
|
/**
|
|
38871
39305
|
* The values in force when the operator has set nothing.
|
|
@@ -38881,12 +39315,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
38881
39315
|
budgetMb: 1024,
|
|
38882
39316
|
activityMs: 15e3,
|
|
38883
39317
|
tileBudgetMb: 64,
|
|
39318
|
+
sceneBudgetMb: 48,
|
|
38884
39319
|
admission: "inferred"
|
|
38885
39320
|
};
|
|
38886
39321
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
38887
39322
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
38888
39323
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
38889
39324
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
39325
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
38890
39326
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
38891
39327
|
var MB = 1024 * 1024;
|
|
38892
39328
|
1024 * MB, 3072 * MB;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-amcrest",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.33",
|
|
4
4
|
"description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|