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