@camstack/addon-provider-tuya 0.2.31 → 0.2.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +495 -59
- package/dist/addon.mjs +495 -59
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8346,6 +8346,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
8346
8346
|
/** Max rows returned, newest-first. */
|
|
8347
8347
|
limit: number().int().min(1).max(1e3).optional()
|
|
8348
8348
|
});
|
|
8349
|
+
var LabelDefinitionSchema = object({
|
|
8350
|
+
id: string(),
|
|
8351
|
+
name: string(),
|
|
8352
|
+
category: string().optional(),
|
|
8353
|
+
description: string().optional(),
|
|
8354
|
+
icon: string().optional()
|
|
8355
|
+
});
|
|
8356
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
8357
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
8358
|
+
"person",
|
|
8359
|
+
"vehicle",
|
|
8360
|
+
"animal",
|
|
8361
|
+
"package"
|
|
8362
|
+
];
|
|
8363
|
+
/**
|
|
8364
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
8365
|
+
* un operatore può selezionare.
|
|
8366
|
+
*
|
|
8367
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
8368
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
8369
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
8370
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
8371
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
8372
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
8373
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
8374
|
+
*
|
|
8375
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
8376
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
8377
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
8378
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
8379
|
+
* successiva.
|
|
8380
|
+
*/
|
|
8381
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
8382
|
+
"person",
|
|
8383
|
+
"vehicle",
|
|
8384
|
+
"animal"
|
|
8385
|
+
];
|
|
8386
|
+
/**
|
|
8387
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
8388
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8389
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8390
|
+
* detection pipeline executor actually routes.
|
|
8391
|
+
*
|
|
8392
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8393
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8394
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8395
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8396
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8397
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8398
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8399
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8400
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8401
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8402
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8403
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8404
|
+
*/
|
|
8405
|
+
var DetectionCatalogClassMapSchema = object({
|
|
8406
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
8407
|
+
preserveOriginal: boolean()
|
|
8408
|
+
});
|
|
8349
8409
|
/**
|
|
8350
8410
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
8351
8411
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -8368,10 +8428,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
8368
8428
|
"events",
|
|
8369
8429
|
"continuous"
|
|
8370
8430
|
]);
|
|
8431
|
+
/**
|
|
8432
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
8433
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
8434
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
8435
|
+
*/
|
|
8436
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
8437
|
+
/**
|
|
8438
|
+
* True quando `values` non ripete un elemento.
|
|
8439
|
+
*
|
|
8440
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
8441
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
8442
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
8443
|
+
*/
|
|
8444
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
8371
8445
|
/** Which detectors trigger an `events`-mode band. */
|
|
8372
8446
|
var RecordingTriggersSchema = object({
|
|
8373
8447
|
motion: boolean().optional(),
|
|
8374
|
-
audioThresholdDbfs: number().optional()
|
|
8448
|
+
audioThresholdDbfs: number().optional(),
|
|
8449
|
+
/**
|
|
8450
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
8451
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
8452
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
8453
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
8454
|
+
*
|
|
8455
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
8456
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
8457
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
8458
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
8459
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
8460
|
+
*/
|
|
8461
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
8462
|
+
/**
|
|
8463
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
8464
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
8465
|
+
* `objectClasses`.
|
|
8466
|
+
*
|
|
8467
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
8468
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
8469
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
8470
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
8471
|
+
* device (D12) — mai un elenco globale di cap.
|
|
8472
|
+
*
|
|
8473
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
8474
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
8475
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
8476
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8477
|
+
* registrare.
|
|
8478
|
+
*/
|
|
8479
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8375
8480
|
});
|
|
8376
8481
|
/**
|
|
8377
8482
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8823,41 +8928,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8823
8928
|
*/
|
|
8824
8929
|
debug: boolean().optional()
|
|
8825
8930
|
});
|
|
8826
|
-
var LabelDefinitionSchema = object({
|
|
8827
|
-
id: string(),
|
|
8828
|
-
name: string(),
|
|
8829
|
-
category: string().optional(),
|
|
8830
|
-
description: string().optional(),
|
|
8831
|
-
icon: string().optional()
|
|
8832
|
-
});
|
|
8833
|
-
/**
|
|
8834
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8835
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8836
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8837
|
-
* detection pipeline executor actually routes.
|
|
8838
|
-
*
|
|
8839
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8840
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8841
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8842
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8843
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8844
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8845
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8846
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8847
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8848
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8849
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8850
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8851
|
-
*/
|
|
8852
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8853
|
-
mapping: record(string(), _enum([
|
|
8854
|
-
"person",
|
|
8855
|
-
"vehicle",
|
|
8856
|
-
"animal",
|
|
8857
|
-
"package"
|
|
8858
|
-
])),
|
|
8859
|
-
preserveOriginal: boolean()
|
|
8860
|
-
});
|
|
8861
8931
|
var MODEL_FORMATS = [
|
|
8862
8932
|
"onnx",
|
|
8863
8933
|
"coreml",
|
|
@@ -21990,7 +22060,7 @@ var lifecycleJobSchema = object({
|
|
|
21990
22060
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21991
22061
|
* as every other cap.
|
|
21992
22062
|
*/
|
|
21993
|
-
var LogLevelSchema$
|
|
22063
|
+
var LogLevelSchema$2 = _enum([
|
|
21994
22064
|
"debug",
|
|
21995
22065
|
"info",
|
|
21996
22066
|
"warn",
|
|
@@ -22197,7 +22267,7 @@ var CustomActionInputSchema = object({
|
|
|
22197
22267
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
22198
22268
|
addonId: string(),
|
|
22199
22269
|
limit: number().min(1).max(500).default(100),
|
|
22200
|
-
level: LogLevelSchema$
|
|
22270
|
+
level: LogLevelSchema$2.optional()
|
|
22201
22271
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
22202
22272
|
packageName: string(),
|
|
22203
22273
|
version: string().optional()
|
|
@@ -22295,7 +22365,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
22295
22365
|
auth: "admin"
|
|
22296
22366
|
}), method(object({
|
|
22297
22367
|
addonId: string(),
|
|
22298
|
-
level: LogLevelSchema$
|
|
22368
|
+
level: LogLevelSchema$2.optional()
|
|
22299
22369
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
22300
22370
|
/**
|
|
22301
22371
|
* Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
|
|
@@ -24027,6 +24097,35 @@ var FaceFilterEnum = _enum([
|
|
|
24027
24097
|
"identified",
|
|
24028
24098
|
"all"
|
|
24029
24099
|
]);
|
|
24100
|
+
/**
|
|
24101
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
24102
|
+
*
|
|
24103
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
24104
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
24105
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
24106
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
24107
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
24108
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
24109
|
+
*
|
|
24110
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
24111
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
24112
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
24113
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
24114
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
24115
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
24116
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
24117
|
+
* backend's NULL-collation accident.
|
|
24118
|
+
*/
|
|
24119
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
24120
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
24121
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
24122
|
+
* never leaves the server. */
|
|
24123
|
+
var FaceClusterSchema = object({
|
|
24124
|
+
faceIds: array(string()).readonly(),
|
|
24125
|
+
representativeFaceId: string(),
|
|
24126
|
+
size: number().int(),
|
|
24127
|
+
cohesion: number()
|
|
24128
|
+
});
|
|
24030
24129
|
var MediaFileLiteSchema$1 = object({
|
|
24031
24130
|
key: string(),
|
|
24032
24131
|
kind: string(),
|
|
@@ -24073,24 +24172,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24073
24172
|
kind: "mutation",
|
|
24074
24173
|
auth: "admin"
|
|
24075
24174
|
}), method(object({
|
|
24076
|
-
/**
|
|
24175
|
+
/**
|
|
24176
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
24177
|
+
*
|
|
24178
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
24179
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
24180
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
24181
|
+
* present, and this field is then ignored rather than unioned, so
|
|
24182
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
24183
|
+
*/
|
|
24077
24184
|
deviceId: number().int().optional(),
|
|
24185
|
+
/**
|
|
24186
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
24187
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
24188
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
24189
|
+
* about to discard).
|
|
24190
|
+
*
|
|
24191
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
24192
|
+
* "every camera". A request for no devices is a request, not an
|
|
24193
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
24194
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
24195
|
+
*
|
|
24196
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
24197
|
+
*/
|
|
24198
|
+
deviceIds: array(number().int()).optional(),
|
|
24078
24199
|
limit: number().int().positive().optional(),
|
|
24079
24200
|
filter: FaceFilterEnum.optional(),
|
|
24080
24201
|
/**
|
|
24081
|
-
*
|
|
24082
|
-
*
|
|
24202
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24203
|
+
* Absent means no lower bound.
|
|
24204
|
+
*/
|
|
24205
|
+
since: number().int().optional(),
|
|
24206
|
+
/**
|
|
24207
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24208
|
+
* Absent means no upper bound.
|
|
24209
|
+
*/
|
|
24210
|
+
until: number().int().optional(),
|
|
24211
|
+
/**
|
|
24212
|
+
* Order the page by time or by suggestion certainty. Default
|
|
24213
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
24214
|
+
* that does not ask.
|
|
24083
24215
|
*
|
|
24084
|
-
*
|
|
24085
|
-
*
|
|
24086
|
-
* the browser cache the images.
|
|
24216
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
24217
|
+
* does under `'suggestionConfidence'`.
|
|
24087
24218
|
*
|
|
24088
|
-
*
|
|
24089
|
-
*
|
|
24090
|
-
*
|
|
24091
|
-
*
|
|
24092
|
-
*
|
|
24093
|
-
|
|
24219
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
24220
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
24221
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
24222
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
24223
|
+
* with {@link since} / {@link until}.
|
|
24224
|
+
*/
|
|
24225
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
24226
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
24227
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
24228
|
+
/**
|
|
24229
|
+
* Inline the base64 crop on every row.
|
|
24230
|
+
*
|
|
24231
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
24232
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
24233
|
+
* this for every gallery, and which records why the inline shape had
|
|
24234
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
24235
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
24236
|
+
* that describes the old design reads as permission to rely on it.
|
|
24237
|
+
*
|
|
24238
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
24239
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
24240
|
+
* cached and ETagged.
|
|
24094
24241
|
*/
|
|
24095
24242
|
includeCrops: boolean().optional()
|
|
24096
24243
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -24126,13 +24273,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24126
24273
|
}), method(object({
|
|
24127
24274
|
threshold: number().min(0).max(1).optional(),
|
|
24128
24275
|
minClusterSize: number().int().min(2).optional(),
|
|
24129
|
-
|
|
24130
|
-
|
|
24131
|
-
|
|
24132
|
-
|
|
24133
|
-
|
|
24134
|
-
|
|
24135
|
-
|
|
24276
|
+
/**
|
|
24277
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
24278
|
+
* which read as though it bounded the work — it never did.
|
|
24279
|
+
*
|
|
24280
|
+
* Wins over {@link limit} when both are sent.
|
|
24281
|
+
*/
|
|
24282
|
+
maxClusters: number().int().positive().optional(),
|
|
24283
|
+
/**
|
|
24284
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
24285
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
24286
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
24287
|
+
*/
|
|
24288
|
+
limit: number().int().positive().optional(),
|
|
24289
|
+
/**
|
|
24290
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
24291
|
+
* POOL, not the result.
|
|
24292
|
+
*
|
|
24293
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
24294
|
+
* used to read every unassigned face on the hub no matter what the
|
|
24295
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
24296
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
24297
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
24298
|
+
*
|
|
24299
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
24300
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
24301
|
+
* sample it randomly.
|
|
24302
|
+
*
|
|
24303
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
24304
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
24305
|
+
* unbounded scan can never come back as the table grows.
|
|
24306
|
+
*/
|
|
24307
|
+
maxFacesScanned: number().int().positive().optional()
|
|
24308
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
24136
24309
|
/**
|
|
24137
24310
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
24138
24311
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -29074,6 +29247,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
29074
29247
|
latitude: number().min(-90).max(90),
|
|
29075
29248
|
longitude: number().min(-180).max(180)
|
|
29076
29249
|
}).nullable();
|
|
29250
|
+
/**
|
|
29251
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
29252
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
29253
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
29254
|
+
* already prints - never a token, never an `Authorization` header.
|
|
29255
|
+
*/
|
|
29256
|
+
var RequestCensusGroupSchema = object({
|
|
29257
|
+
procedure: string(),
|
|
29258
|
+
userAgent: string(),
|
|
29259
|
+
ip: string(),
|
|
29260
|
+
principal: string(),
|
|
29261
|
+
calls: number(),
|
|
29262
|
+
perMin: number()
|
|
29263
|
+
});
|
|
29264
|
+
/**
|
|
29265
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
29266
|
+
*
|
|
29267
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
29268
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
29269
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
29270
|
+
*/
|
|
29271
|
+
var RequestCensusProcedureSchema = object({
|
|
29272
|
+
procedure: string(),
|
|
29273
|
+
calls: number(),
|
|
29274
|
+
perMin: number()
|
|
29275
|
+
});
|
|
29276
|
+
/**
|
|
29277
|
+
* The census as an operator sees it.
|
|
29278
|
+
*
|
|
29279
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
29280
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
29281
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
29282
|
+
* like one that succeeded.
|
|
29283
|
+
*/
|
|
29284
|
+
var RequestCensusStatusSchema = object({
|
|
29285
|
+
armed: boolean(),
|
|
29286
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
29287
|
+
elapsedMs: number(),
|
|
29288
|
+
/** The window actually armed, after the server clamped the request. */
|
|
29289
|
+
windowMs: number(),
|
|
29290
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29291
|
+
armedUntilMs: number(),
|
|
29292
|
+
httpRequests: number(),
|
|
29293
|
+
batchedRequests: number(),
|
|
29294
|
+
/**
|
|
29295
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
29296
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
29297
|
+
* the number comparable with a store-side call count.
|
|
29298
|
+
*/
|
|
29299
|
+
procedureCalls: number(),
|
|
29300
|
+
/**
|
|
29301
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
29302
|
+
* transport resolves one context per connection - but the number that says
|
|
29303
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
29304
|
+
*/
|
|
29305
|
+
wsConnections: number(),
|
|
29306
|
+
distinctGroups: number(),
|
|
29307
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
29308
|
+
* cardinality bound. */
|
|
29309
|
+
unattributedCalls: number(),
|
|
29310
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
29311
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
29312
|
+
}).extend({ persisted: boolean() });
|
|
29313
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
29314
|
+
var LogLevelSchema$1 = _enum([
|
|
29315
|
+
"debug",
|
|
29316
|
+
"info",
|
|
29317
|
+
"warn",
|
|
29318
|
+
"error"
|
|
29319
|
+
]);
|
|
29320
|
+
/**
|
|
29321
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
29322
|
+
*
|
|
29323
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
29324
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
29325
|
+
*/
|
|
29326
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
29327
|
+
/**
|
|
29328
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
29329
|
+
* layer that carries an explicit value wins.
|
|
29330
|
+
*
|
|
29331
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
29332
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
29333
|
+
* grow later would force every consumer of this document to change with it.
|
|
29334
|
+
* Nothing returns `component` today.
|
|
29335
|
+
*/
|
|
29336
|
+
var LoggingScopeKindSchema = _enum([
|
|
29337
|
+
"cluster",
|
|
29338
|
+
"node",
|
|
29339
|
+
"component"
|
|
29340
|
+
]);
|
|
29341
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
29342
|
+
var LoggingLevelSourceSchema = _enum([
|
|
29343
|
+
"default",
|
|
29344
|
+
"cluster",
|
|
29345
|
+
"node",
|
|
29346
|
+
"component"
|
|
29347
|
+
]);
|
|
29348
|
+
/**
|
|
29349
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
29350
|
+
*
|
|
29351
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
29352
|
+
* difference between "this node is at `info` because I decided it" and
|
|
29353
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
29354
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
29355
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
29356
|
+
*/
|
|
29357
|
+
var LoggingLevelLayerSchema = object({
|
|
29358
|
+
scope: LoggingScopeKindSchema,
|
|
29359
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
29360
|
+
nodeId: string().nullable(),
|
|
29361
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
29362
|
+
level: LogLevelSchema$1.nullable()
|
|
29363
|
+
});
|
|
29364
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
29365
|
+
var LoggingEffectiveSchema = object({
|
|
29366
|
+
level: LogLevelSchema$1,
|
|
29367
|
+
levelSource: LoggingLevelSourceSchema
|
|
29368
|
+
});
|
|
29369
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
29370
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
29371
|
+
/**
|
|
29372
|
+
* An armed diagnostic, with its DEADLINE.
|
|
29373
|
+
*
|
|
29374
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
29375
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
29376
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
29377
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
29378
|
+
*/
|
|
29379
|
+
var DiagnosticWindowSchema = object({
|
|
29380
|
+
id: DiagnosticIdSchema,
|
|
29381
|
+
armed: boolean(),
|
|
29382
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29383
|
+
armedUntilMs: number(),
|
|
29384
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29385
|
+
remainingMs: number(),
|
|
29386
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
29387
|
+
* i.e. whether this window would survive a restart. */
|
|
29388
|
+
persisted: boolean()
|
|
29389
|
+
});
|
|
29390
|
+
/**
|
|
29391
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
29392
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
29393
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
29394
|
+
*/
|
|
29395
|
+
var DiagnosticWindowPatchSchema = object({
|
|
29396
|
+
id: DiagnosticIdSchema,
|
|
29397
|
+
armMs: number().int().min(0),
|
|
29398
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
29399
|
+
reportEveryMs: number().int().positive().optional()
|
|
29400
|
+
});
|
|
29401
|
+
/**
|
|
29402
|
+
* A PATCH, and patches MERGE.
|
|
29403
|
+
*
|
|
29404
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
29405
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
29406
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
29407
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
29408
|
+
* turns into an erased one.
|
|
29409
|
+
*/
|
|
29410
|
+
var LoggingSettingsPatchSchema = object({
|
|
29411
|
+
/**
|
|
29412
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
29413
|
+
* addressed scope so it inherits again. A value sets it.
|
|
29414
|
+
*/
|
|
29415
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
29416
|
+
/**
|
|
29417
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
29418
|
+
* keeps running — a patch is never a full replacement.
|
|
29419
|
+
*/
|
|
29420
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29421
|
+
});
|
|
29422
|
+
/**
|
|
29423
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
29424
|
+
*
|
|
29425
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
29426
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
29427
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
29428
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
29429
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
29430
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
29431
|
+
* layer selector needs a name the transport does not already own.
|
|
29432
|
+
*/
|
|
29433
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
29434
|
+
var SetLoggingSettingsInputSchema = object({
|
|
29435
|
+
scopeNodeId: string().optional(),
|
|
29436
|
+
patch: LoggingSettingsPatchSchema
|
|
29437
|
+
});
|
|
29438
|
+
/**
|
|
29439
|
+
* The whole document, as read and as returned after every write.
|
|
29440
|
+
*
|
|
29441
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
29442
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
29443
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
29444
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
29445
|
+
* survive a restart.
|
|
29446
|
+
*/
|
|
29447
|
+
var LoggingSettingsStateSchema = object({
|
|
29448
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
29449
|
+
scopeNodeId: string().nullable(),
|
|
29450
|
+
effective: LoggingEffectiveSchema,
|
|
29451
|
+
explicit: LoggingExplicitSchema,
|
|
29452
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29453
|
+
persisted: boolean()
|
|
29454
|
+
});
|
|
29077
29455
|
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(), {
|
|
29078
29456
|
kind: "mutation",
|
|
29079
29457
|
auth: "admin"
|
|
@@ -29086,6 +29464,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
29086
29464
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
29087
29465
|
kind: "mutation",
|
|
29088
29466
|
auth: "admin"
|
|
29467
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
29468
|
+
kind: "mutation",
|
|
29469
|
+
auth: "admin"
|
|
29089
29470
|
});
|
|
29090
29471
|
/**
|
|
29091
29472
|
* Tamper / case-open detection sensor. Drives Home Assistant
|
|
@@ -36325,6 +36706,18 @@ Object.freeze({
|
|
|
36325
36706
|
addonId: null,
|
|
36326
36707
|
access: "create"
|
|
36327
36708
|
},
|
|
36709
|
+
"system.getLoggingSettings": {
|
|
36710
|
+
capName: "system",
|
|
36711
|
+
capScope: "system",
|
|
36712
|
+
addonId: null,
|
|
36713
|
+
access: "view"
|
|
36714
|
+
},
|
|
36715
|
+
"system.getRequestCensus": {
|
|
36716
|
+
capName: "system",
|
|
36717
|
+
capScope: "system",
|
|
36718
|
+
addonId: null,
|
|
36719
|
+
access: "view"
|
|
36720
|
+
},
|
|
36328
36721
|
"system.getRetentionConfig": {
|
|
36329
36722
|
capName: "system",
|
|
36330
36723
|
capScope: "system",
|
|
@@ -36355,6 +36748,12 @@ Object.freeze({
|
|
|
36355
36748
|
addonId: null,
|
|
36356
36749
|
access: "view"
|
|
36357
36750
|
},
|
|
36751
|
+
"system.setLoggingSettings": {
|
|
36752
|
+
capName: "system",
|
|
36753
|
+
capScope: "system",
|
|
36754
|
+
addonId: null,
|
|
36755
|
+
access: "create"
|
|
36756
|
+
},
|
|
36358
36757
|
"system.setRetentionConfig": {
|
|
36359
36758
|
capName: "system",
|
|
36360
36759
|
capScope: "system",
|
|
@@ -37510,6 +37909,10 @@ Object.freeze({
|
|
|
37510
37909
|
name: "deviceId",
|
|
37511
37910
|
form: "single",
|
|
37512
37911
|
optional: true
|
|
37912
|
+
}, {
|
|
37913
|
+
name: "deviceIds",
|
|
37914
|
+
form: "array",
|
|
37915
|
+
optional: true
|
|
37513
37916
|
}],
|
|
37514
37917
|
"fanControl.setDirection": [{
|
|
37515
37918
|
name: "deviceId",
|
|
@@ -39120,7 +39523,38 @@ object({
|
|
|
39120
39523
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
39121
39524
|
* reproduce that.
|
|
39122
39525
|
*/
|
|
39123
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
39526
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
39527
|
+
/**
|
|
39528
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
39529
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
39530
|
+
* subject tiles, on frames that detected something.
|
|
39531
|
+
*
|
|
39532
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
39533
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
39534
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
39535
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
39536
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
39537
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
39538
|
+
*
|
|
39539
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
39540
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
39541
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
39542
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
39543
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
39544
|
+
* binds only through a detection burst, where it still covers well past the
|
|
39545
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
39546
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
39547
|
+
* whole shape exists to avoid.
|
|
39548
|
+
*
|
|
39549
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
39550
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
39551
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
39552
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
39553
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
39554
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
39555
|
+
* nothing.
|
|
39556
|
+
*/
|
|
39557
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
39124
39558
|
});
|
|
39125
39559
|
/**
|
|
39126
39560
|
* The values in force when the operator has set nothing.
|
|
@@ -39136,12 +39570,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
39136
39570
|
budgetMb: 1024,
|
|
39137
39571
|
activityMs: 15e3,
|
|
39138
39572
|
tileBudgetMb: 64,
|
|
39573
|
+
sceneBudgetMb: 48,
|
|
39139
39574
|
admission: "inferred"
|
|
39140
39575
|
};
|
|
39141
39576
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
39142
39577
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
39143
39578
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
39144
39579
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
39580
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
39145
39581
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
39146
39582
|
var MB = 1024 * 1024;
|
|
39147
39583
|
1024 * MB, 3072 * MB;
|
package/dist/addon.mjs
CHANGED
|
@@ -8345,6 +8345,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
8345
8345
|
/** Max rows returned, newest-first. */
|
|
8346
8346
|
limit: number().int().min(1).max(1e3).optional()
|
|
8347
8347
|
});
|
|
8348
|
+
var LabelDefinitionSchema = object({
|
|
8349
|
+
id: string(),
|
|
8350
|
+
name: string(),
|
|
8351
|
+
category: string().optional(),
|
|
8352
|
+
description: string().optional(),
|
|
8353
|
+
icon: string().optional()
|
|
8354
|
+
});
|
|
8355
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
8356
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
8357
|
+
"person",
|
|
8358
|
+
"vehicle",
|
|
8359
|
+
"animal",
|
|
8360
|
+
"package"
|
|
8361
|
+
];
|
|
8362
|
+
/**
|
|
8363
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
8364
|
+
* un operatore può selezionare.
|
|
8365
|
+
*
|
|
8366
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
8367
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
8368
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
8369
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
8370
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
8371
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
8372
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
8373
|
+
*
|
|
8374
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
8375
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
8376
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
8377
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
8378
|
+
* successiva.
|
|
8379
|
+
*/
|
|
8380
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
8381
|
+
"person",
|
|
8382
|
+
"vehicle",
|
|
8383
|
+
"animal"
|
|
8384
|
+
];
|
|
8385
|
+
/**
|
|
8386
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
8387
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8388
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8389
|
+
* detection pipeline executor actually routes.
|
|
8390
|
+
*
|
|
8391
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8392
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8393
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8394
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8395
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8396
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8397
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8398
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8399
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8400
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8401
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8402
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8403
|
+
*/
|
|
8404
|
+
var DetectionCatalogClassMapSchema = object({
|
|
8405
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
8406
|
+
preserveOriginal: boolean()
|
|
8407
|
+
});
|
|
8348
8408
|
/**
|
|
8349
8409
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
8350
8410
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -8367,10 +8427,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
8367
8427
|
"events",
|
|
8368
8428
|
"continuous"
|
|
8369
8429
|
]);
|
|
8430
|
+
/**
|
|
8431
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
8432
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
8433
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
8434
|
+
*/
|
|
8435
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
8436
|
+
/**
|
|
8437
|
+
* True quando `values` non ripete un elemento.
|
|
8438
|
+
*
|
|
8439
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
8440
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
8441
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
8442
|
+
*/
|
|
8443
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
8370
8444
|
/** Which detectors trigger an `events`-mode band. */
|
|
8371
8445
|
var RecordingTriggersSchema = object({
|
|
8372
8446
|
motion: boolean().optional(),
|
|
8373
|
-
audioThresholdDbfs: number().optional()
|
|
8447
|
+
audioThresholdDbfs: number().optional(),
|
|
8448
|
+
/**
|
|
8449
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
8450
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
8451
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
8452
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
8453
|
+
*
|
|
8454
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
8455
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
8456
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
8457
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
8458
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
8459
|
+
*/
|
|
8460
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
8461
|
+
/**
|
|
8462
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
8463
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
8464
|
+
* `objectClasses`.
|
|
8465
|
+
*
|
|
8466
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
8467
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
8468
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
8469
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
8470
|
+
* device (D12) — mai un elenco globale di cap.
|
|
8471
|
+
*
|
|
8472
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
8473
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
8474
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
8475
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8476
|
+
* registrare.
|
|
8477
|
+
*/
|
|
8478
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8374
8479
|
});
|
|
8375
8480
|
/**
|
|
8376
8481
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8822,41 +8927,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8822
8927
|
*/
|
|
8823
8928
|
debug: boolean().optional()
|
|
8824
8929
|
});
|
|
8825
|
-
var LabelDefinitionSchema = object({
|
|
8826
|
-
id: string(),
|
|
8827
|
-
name: string(),
|
|
8828
|
-
category: string().optional(),
|
|
8829
|
-
description: string().optional(),
|
|
8830
|
-
icon: string().optional()
|
|
8831
|
-
});
|
|
8832
|
-
/**
|
|
8833
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8834
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8835
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8836
|
-
* detection pipeline executor actually routes.
|
|
8837
|
-
*
|
|
8838
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8839
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8840
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8841
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8842
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8843
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8844
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8845
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8846
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8847
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8848
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8849
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8850
|
-
*/
|
|
8851
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8852
|
-
mapping: record(string(), _enum([
|
|
8853
|
-
"person",
|
|
8854
|
-
"vehicle",
|
|
8855
|
-
"animal",
|
|
8856
|
-
"package"
|
|
8857
|
-
])),
|
|
8858
|
-
preserveOriginal: boolean()
|
|
8859
|
-
});
|
|
8860
8930
|
var MODEL_FORMATS = [
|
|
8861
8931
|
"onnx",
|
|
8862
8932
|
"coreml",
|
|
@@ -21989,7 +22059,7 @@ var lifecycleJobSchema = object({
|
|
|
21989
22059
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21990
22060
|
* as every other cap.
|
|
21991
22061
|
*/
|
|
21992
|
-
var LogLevelSchema$
|
|
22062
|
+
var LogLevelSchema$2 = _enum([
|
|
21993
22063
|
"debug",
|
|
21994
22064
|
"info",
|
|
21995
22065
|
"warn",
|
|
@@ -22196,7 +22266,7 @@ var CustomActionInputSchema = object({
|
|
|
22196
22266
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
22197
22267
|
addonId: string(),
|
|
22198
22268
|
limit: number().min(1).max(500).default(100),
|
|
22199
|
-
level: LogLevelSchema$
|
|
22269
|
+
level: LogLevelSchema$2.optional()
|
|
22200
22270
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
22201
22271
|
packageName: string(),
|
|
22202
22272
|
version: string().optional()
|
|
@@ -22294,7 +22364,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
22294
22364
|
auth: "admin"
|
|
22295
22365
|
}), method(object({
|
|
22296
22366
|
addonId: string(),
|
|
22297
|
-
level: LogLevelSchema$
|
|
22367
|
+
level: LogLevelSchema$2.optional()
|
|
22298
22368
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
22299
22369
|
/**
|
|
22300
22370
|
* Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
|
|
@@ -24026,6 +24096,35 @@ var FaceFilterEnum = _enum([
|
|
|
24026
24096
|
"identified",
|
|
24027
24097
|
"all"
|
|
24028
24098
|
]);
|
|
24099
|
+
/**
|
|
24100
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
24101
|
+
*
|
|
24102
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
24103
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
24104
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
24105
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
24106
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
24107
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
24108
|
+
*
|
|
24109
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
24110
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
24111
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
24112
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
24113
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
24114
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
24115
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
24116
|
+
* backend's NULL-collation accident.
|
|
24117
|
+
*/
|
|
24118
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
24119
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
24120
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
24121
|
+
* never leaves the server. */
|
|
24122
|
+
var FaceClusterSchema = object({
|
|
24123
|
+
faceIds: array(string()).readonly(),
|
|
24124
|
+
representativeFaceId: string(),
|
|
24125
|
+
size: number().int(),
|
|
24126
|
+
cohesion: number()
|
|
24127
|
+
});
|
|
24029
24128
|
var MediaFileLiteSchema$1 = object({
|
|
24030
24129
|
key: string(),
|
|
24031
24130
|
kind: string(),
|
|
@@ -24072,24 +24171,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24072
24171
|
kind: "mutation",
|
|
24073
24172
|
auth: "admin"
|
|
24074
24173
|
}), method(object({
|
|
24075
|
-
/**
|
|
24174
|
+
/**
|
|
24175
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
24176
|
+
*
|
|
24177
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
24178
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
24179
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
24180
|
+
* present, and this field is then ignored rather than unioned, so
|
|
24181
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
24182
|
+
*/
|
|
24076
24183
|
deviceId: number().int().optional(),
|
|
24184
|
+
/**
|
|
24185
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
24186
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
24187
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
24188
|
+
* about to discard).
|
|
24189
|
+
*
|
|
24190
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
24191
|
+
* "every camera". A request for no devices is a request, not an
|
|
24192
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
24193
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
24194
|
+
*
|
|
24195
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
24196
|
+
*/
|
|
24197
|
+
deviceIds: array(number().int()).optional(),
|
|
24077
24198
|
limit: number().int().positive().optional(),
|
|
24078
24199
|
filter: FaceFilterEnum.optional(),
|
|
24079
24200
|
/**
|
|
24080
|
-
*
|
|
24081
|
-
*
|
|
24201
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24202
|
+
* Absent means no lower bound.
|
|
24203
|
+
*/
|
|
24204
|
+
since: number().int().optional(),
|
|
24205
|
+
/**
|
|
24206
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24207
|
+
* Absent means no upper bound.
|
|
24208
|
+
*/
|
|
24209
|
+
until: number().int().optional(),
|
|
24210
|
+
/**
|
|
24211
|
+
* Order the page by time or by suggestion certainty. Default
|
|
24212
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
24213
|
+
* that does not ask.
|
|
24082
24214
|
*
|
|
24083
|
-
*
|
|
24084
|
-
*
|
|
24085
|
-
* the browser cache the images.
|
|
24215
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
24216
|
+
* does under `'suggestionConfidence'`.
|
|
24086
24217
|
*
|
|
24087
|
-
*
|
|
24088
|
-
*
|
|
24089
|
-
*
|
|
24090
|
-
*
|
|
24091
|
-
*
|
|
24092
|
-
|
|
24218
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
24219
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
24220
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
24221
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
24222
|
+
* with {@link since} / {@link until}.
|
|
24223
|
+
*/
|
|
24224
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
24225
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
24226
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
24227
|
+
/**
|
|
24228
|
+
* Inline the base64 crop on every row.
|
|
24229
|
+
*
|
|
24230
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
24231
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
24232
|
+
* this for every gallery, and which records why the inline shape had
|
|
24233
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
24234
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
24235
|
+
* that describes the old design reads as permission to rely on it.
|
|
24236
|
+
*
|
|
24237
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
24238
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
24239
|
+
* cached and ETagged.
|
|
24093
24240
|
*/
|
|
24094
24241
|
includeCrops: boolean().optional()
|
|
24095
24242
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -24125,13 +24272,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24125
24272
|
}), method(object({
|
|
24126
24273
|
threshold: number().min(0).max(1).optional(),
|
|
24127
24274
|
minClusterSize: number().int().min(2).optional(),
|
|
24128
|
-
|
|
24129
|
-
|
|
24130
|
-
|
|
24131
|
-
|
|
24132
|
-
|
|
24133
|
-
|
|
24134
|
-
|
|
24275
|
+
/**
|
|
24276
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
24277
|
+
* which read as though it bounded the work — it never did.
|
|
24278
|
+
*
|
|
24279
|
+
* Wins over {@link limit} when both are sent.
|
|
24280
|
+
*/
|
|
24281
|
+
maxClusters: number().int().positive().optional(),
|
|
24282
|
+
/**
|
|
24283
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
24284
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
24285
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
24286
|
+
*/
|
|
24287
|
+
limit: number().int().positive().optional(),
|
|
24288
|
+
/**
|
|
24289
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
24290
|
+
* POOL, not the result.
|
|
24291
|
+
*
|
|
24292
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
24293
|
+
* used to read every unassigned face on the hub no matter what the
|
|
24294
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
24295
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
24296
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
24297
|
+
*
|
|
24298
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
24299
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
24300
|
+
* sample it randomly.
|
|
24301
|
+
*
|
|
24302
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
24303
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
24304
|
+
* unbounded scan can never come back as the table grows.
|
|
24305
|
+
*/
|
|
24306
|
+
maxFacesScanned: number().int().positive().optional()
|
|
24307
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
24135
24308
|
/**
|
|
24136
24309
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
24137
24310
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -29073,6 +29246,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
29073
29246
|
latitude: number().min(-90).max(90),
|
|
29074
29247
|
longitude: number().min(-180).max(180)
|
|
29075
29248
|
}).nullable();
|
|
29249
|
+
/**
|
|
29250
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
29251
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
29252
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
29253
|
+
* already prints - never a token, never an `Authorization` header.
|
|
29254
|
+
*/
|
|
29255
|
+
var RequestCensusGroupSchema = object({
|
|
29256
|
+
procedure: string(),
|
|
29257
|
+
userAgent: string(),
|
|
29258
|
+
ip: string(),
|
|
29259
|
+
principal: string(),
|
|
29260
|
+
calls: number(),
|
|
29261
|
+
perMin: number()
|
|
29262
|
+
});
|
|
29263
|
+
/**
|
|
29264
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
29265
|
+
*
|
|
29266
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
29267
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
29268
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
29269
|
+
*/
|
|
29270
|
+
var RequestCensusProcedureSchema = object({
|
|
29271
|
+
procedure: string(),
|
|
29272
|
+
calls: number(),
|
|
29273
|
+
perMin: number()
|
|
29274
|
+
});
|
|
29275
|
+
/**
|
|
29276
|
+
* The census as an operator sees it.
|
|
29277
|
+
*
|
|
29278
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
29279
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
29280
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
29281
|
+
* like one that succeeded.
|
|
29282
|
+
*/
|
|
29283
|
+
var RequestCensusStatusSchema = object({
|
|
29284
|
+
armed: boolean(),
|
|
29285
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
29286
|
+
elapsedMs: number(),
|
|
29287
|
+
/** The window actually armed, after the server clamped the request. */
|
|
29288
|
+
windowMs: number(),
|
|
29289
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29290
|
+
armedUntilMs: number(),
|
|
29291
|
+
httpRequests: number(),
|
|
29292
|
+
batchedRequests: number(),
|
|
29293
|
+
/**
|
|
29294
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
29295
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
29296
|
+
* the number comparable with a store-side call count.
|
|
29297
|
+
*/
|
|
29298
|
+
procedureCalls: number(),
|
|
29299
|
+
/**
|
|
29300
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
29301
|
+
* transport resolves one context per connection - but the number that says
|
|
29302
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
29303
|
+
*/
|
|
29304
|
+
wsConnections: number(),
|
|
29305
|
+
distinctGroups: number(),
|
|
29306
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
29307
|
+
* cardinality bound. */
|
|
29308
|
+
unattributedCalls: number(),
|
|
29309
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
29310
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
29311
|
+
}).extend({ persisted: boolean() });
|
|
29312
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
29313
|
+
var LogLevelSchema$1 = _enum([
|
|
29314
|
+
"debug",
|
|
29315
|
+
"info",
|
|
29316
|
+
"warn",
|
|
29317
|
+
"error"
|
|
29318
|
+
]);
|
|
29319
|
+
/**
|
|
29320
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
29321
|
+
*
|
|
29322
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
29323
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
29324
|
+
*/
|
|
29325
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
29326
|
+
/**
|
|
29327
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
29328
|
+
* layer that carries an explicit value wins.
|
|
29329
|
+
*
|
|
29330
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
29331
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
29332
|
+
* grow later would force every consumer of this document to change with it.
|
|
29333
|
+
* Nothing returns `component` today.
|
|
29334
|
+
*/
|
|
29335
|
+
var LoggingScopeKindSchema = _enum([
|
|
29336
|
+
"cluster",
|
|
29337
|
+
"node",
|
|
29338
|
+
"component"
|
|
29339
|
+
]);
|
|
29340
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
29341
|
+
var LoggingLevelSourceSchema = _enum([
|
|
29342
|
+
"default",
|
|
29343
|
+
"cluster",
|
|
29344
|
+
"node",
|
|
29345
|
+
"component"
|
|
29346
|
+
]);
|
|
29347
|
+
/**
|
|
29348
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
29349
|
+
*
|
|
29350
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
29351
|
+
* difference between "this node is at `info` because I decided it" and
|
|
29352
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
29353
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
29354
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
29355
|
+
*/
|
|
29356
|
+
var LoggingLevelLayerSchema = object({
|
|
29357
|
+
scope: LoggingScopeKindSchema,
|
|
29358
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
29359
|
+
nodeId: string().nullable(),
|
|
29360
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
29361
|
+
level: LogLevelSchema$1.nullable()
|
|
29362
|
+
});
|
|
29363
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
29364
|
+
var LoggingEffectiveSchema = object({
|
|
29365
|
+
level: LogLevelSchema$1,
|
|
29366
|
+
levelSource: LoggingLevelSourceSchema
|
|
29367
|
+
});
|
|
29368
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
29369
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
29370
|
+
/**
|
|
29371
|
+
* An armed diagnostic, with its DEADLINE.
|
|
29372
|
+
*
|
|
29373
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
29374
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
29375
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
29376
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
29377
|
+
*/
|
|
29378
|
+
var DiagnosticWindowSchema = object({
|
|
29379
|
+
id: DiagnosticIdSchema,
|
|
29380
|
+
armed: boolean(),
|
|
29381
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29382
|
+
armedUntilMs: number(),
|
|
29383
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29384
|
+
remainingMs: number(),
|
|
29385
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
29386
|
+
* i.e. whether this window would survive a restart. */
|
|
29387
|
+
persisted: boolean()
|
|
29388
|
+
});
|
|
29389
|
+
/**
|
|
29390
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
29391
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
29392
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
29393
|
+
*/
|
|
29394
|
+
var DiagnosticWindowPatchSchema = object({
|
|
29395
|
+
id: DiagnosticIdSchema,
|
|
29396
|
+
armMs: number().int().min(0),
|
|
29397
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
29398
|
+
reportEveryMs: number().int().positive().optional()
|
|
29399
|
+
});
|
|
29400
|
+
/**
|
|
29401
|
+
* A PATCH, and patches MERGE.
|
|
29402
|
+
*
|
|
29403
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
29404
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
29405
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
29406
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
29407
|
+
* turns into an erased one.
|
|
29408
|
+
*/
|
|
29409
|
+
var LoggingSettingsPatchSchema = object({
|
|
29410
|
+
/**
|
|
29411
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
29412
|
+
* addressed scope so it inherits again. A value sets it.
|
|
29413
|
+
*/
|
|
29414
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
29415
|
+
/**
|
|
29416
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
29417
|
+
* keeps running — a patch is never a full replacement.
|
|
29418
|
+
*/
|
|
29419
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29420
|
+
});
|
|
29421
|
+
/**
|
|
29422
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
29423
|
+
*
|
|
29424
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
29425
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
29426
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
29427
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
29428
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
29429
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
29430
|
+
* layer selector needs a name the transport does not already own.
|
|
29431
|
+
*/
|
|
29432
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
29433
|
+
var SetLoggingSettingsInputSchema = object({
|
|
29434
|
+
scopeNodeId: string().optional(),
|
|
29435
|
+
patch: LoggingSettingsPatchSchema
|
|
29436
|
+
});
|
|
29437
|
+
/**
|
|
29438
|
+
* The whole document, as read and as returned after every write.
|
|
29439
|
+
*
|
|
29440
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
29441
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
29442
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
29443
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
29444
|
+
* survive a restart.
|
|
29445
|
+
*/
|
|
29446
|
+
var LoggingSettingsStateSchema = object({
|
|
29447
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
29448
|
+
scopeNodeId: string().nullable(),
|
|
29449
|
+
effective: LoggingEffectiveSchema,
|
|
29450
|
+
explicit: LoggingExplicitSchema,
|
|
29451
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29452
|
+
persisted: boolean()
|
|
29453
|
+
});
|
|
29076
29454
|
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(), {
|
|
29077
29455
|
kind: "mutation",
|
|
29078
29456
|
auth: "admin"
|
|
@@ -29085,6 +29463,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
29085
29463
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
29086
29464
|
kind: "mutation",
|
|
29087
29465
|
auth: "admin"
|
|
29466
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
29467
|
+
kind: "mutation",
|
|
29468
|
+
auth: "admin"
|
|
29088
29469
|
});
|
|
29089
29470
|
/**
|
|
29090
29471
|
* Tamper / case-open detection sensor. Drives Home Assistant
|
|
@@ -36324,6 +36705,18 @@ Object.freeze({
|
|
|
36324
36705
|
addonId: null,
|
|
36325
36706
|
access: "create"
|
|
36326
36707
|
},
|
|
36708
|
+
"system.getLoggingSettings": {
|
|
36709
|
+
capName: "system",
|
|
36710
|
+
capScope: "system",
|
|
36711
|
+
addonId: null,
|
|
36712
|
+
access: "view"
|
|
36713
|
+
},
|
|
36714
|
+
"system.getRequestCensus": {
|
|
36715
|
+
capName: "system",
|
|
36716
|
+
capScope: "system",
|
|
36717
|
+
addonId: null,
|
|
36718
|
+
access: "view"
|
|
36719
|
+
},
|
|
36327
36720
|
"system.getRetentionConfig": {
|
|
36328
36721
|
capName: "system",
|
|
36329
36722
|
capScope: "system",
|
|
@@ -36354,6 +36747,12 @@ Object.freeze({
|
|
|
36354
36747
|
addonId: null,
|
|
36355
36748
|
access: "view"
|
|
36356
36749
|
},
|
|
36750
|
+
"system.setLoggingSettings": {
|
|
36751
|
+
capName: "system",
|
|
36752
|
+
capScope: "system",
|
|
36753
|
+
addonId: null,
|
|
36754
|
+
access: "create"
|
|
36755
|
+
},
|
|
36357
36756
|
"system.setRetentionConfig": {
|
|
36358
36757
|
capName: "system",
|
|
36359
36758
|
capScope: "system",
|
|
@@ -37509,6 +37908,10 @@ Object.freeze({
|
|
|
37509
37908
|
name: "deviceId",
|
|
37510
37909
|
form: "single",
|
|
37511
37910
|
optional: true
|
|
37911
|
+
}, {
|
|
37912
|
+
name: "deviceIds",
|
|
37913
|
+
form: "array",
|
|
37914
|
+
optional: true
|
|
37512
37915
|
}],
|
|
37513
37916
|
"fanControl.setDirection": [{
|
|
37514
37917
|
name: "deviceId",
|
|
@@ -39119,7 +39522,38 @@ object({
|
|
|
39119
39522
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
39120
39523
|
* reproduce that.
|
|
39121
39524
|
*/
|
|
39122
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
39525
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
39526
|
+
/**
|
|
39527
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
39528
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
39529
|
+
* subject tiles, on frames that detected something.
|
|
39530
|
+
*
|
|
39531
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
39532
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
39533
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
39534
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
39535
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
39536
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
39537
|
+
*
|
|
39538
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
39539
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
39540
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
39541
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
39542
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
39543
|
+
* binds only through a detection burst, where it still covers well past the
|
|
39544
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
39545
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
39546
|
+
* whole shape exists to avoid.
|
|
39547
|
+
*
|
|
39548
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
39549
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
39550
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
39551
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
39552
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
39553
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
39554
|
+
* nothing.
|
|
39555
|
+
*/
|
|
39556
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
39123
39557
|
});
|
|
39124
39558
|
/**
|
|
39125
39559
|
* The values in force when the operator has set nothing.
|
|
@@ -39135,12 +39569,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
39135
39569
|
budgetMb: 1024,
|
|
39136
39570
|
activityMs: 15e3,
|
|
39137
39571
|
tileBudgetMb: 64,
|
|
39572
|
+
sceneBudgetMb: 48,
|
|
39138
39573
|
admission: "inferred"
|
|
39139
39574
|
};
|
|
39140
39575
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
39141
39576
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
39142
39577
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
39143
39578
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
39579
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
39144
39580
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
39145
39581
|
var MB = 1024 * 1024;
|
|
39146
39582
|
1024 * MB, 3072 * MB;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.32",
|
|
4
4
|
"description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|