@camstack/addon-export-hap 1.2.42 → 1.2.43
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/hap-export.addon.js +495 -59
- package/dist/hap-export.addon.mjs +495 -59
- package/package.json +1 -1
package/dist/hap-export.addon.js
CHANGED
|
@@ -8192,6 +8192,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
8192
8192
|
/** Max rows returned, newest-first. */
|
|
8193
8193
|
limit: number().int().min(1).max(1e3).optional()
|
|
8194
8194
|
});
|
|
8195
|
+
var LabelDefinitionSchema = object({
|
|
8196
|
+
id: string(),
|
|
8197
|
+
name: string(),
|
|
8198
|
+
category: string().optional(),
|
|
8199
|
+
description: string().optional(),
|
|
8200
|
+
icon: string().optional()
|
|
8201
|
+
});
|
|
8202
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
8203
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
8204
|
+
"person",
|
|
8205
|
+
"vehicle",
|
|
8206
|
+
"animal",
|
|
8207
|
+
"package"
|
|
8208
|
+
];
|
|
8209
|
+
/**
|
|
8210
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
8211
|
+
* un operatore può selezionare.
|
|
8212
|
+
*
|
|
8213
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
8214
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
8215
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
8216
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
8217
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
8218
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
8219
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
8220
|
+
*
|
|
8221
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
8222
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
8223
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
8224
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
8225
|
+
* successiva.
|
|
8226
|
+
*/
|
|
8227
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
8228
|
+
"person",
|
|
8229
|
+
"vehicle",
|
|
8230
|
+
"animal"
|
|
8231
|
+
];
|
|
8232
|
+
/**
|
|
8233
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
8234
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8235
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8236
|
+
* detection pipeline executor actually routes.
|
|
8237
|
+
*
|
|
8238
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8239
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8240
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8241
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8242
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8243
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8244
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8245
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8246
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8247
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8248
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8249
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8250
|
+
*/
|
|
8251
|
+
var DetectionCatalogClassMapSchema = object({
|
|
8252
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
8253
|
+
preserveOriginal: boolean()
|
|
8254
|
+
});
|
|
8195
8255
|
/**
|
|
8196
8256
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
8197
8257
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -8214,10 +8274,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
8214
8274
|
"events",
|
|
8215
8275
|
"continuous"
|
|
8216
8276
|
]);
|
|
8277
|
+
/**
|
|
8278
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
8279
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
8280
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
8281
|
+
*/
|
|
8282
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
8283
|
+
/**
|
|
8284
|
+
* True quando `values` non ripete un elemento.
|
|
8285
|
+
*
|
|
8286
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
8287
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
8288
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
8289
|
+
*/
|
|
8290
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
8217
8291
|
/** Which detectors trigger an `events`-mode band. */
|
|
8218
8292
|
var RecordingTriggersSchema = object({
|
|
8219
8293
|
motion: boolean().optional(),
|
|
8220
|
-
audioThresholdDbfs: number().optional()
|
|
8294
|
+
audioThresholdDbfs: number().optional(),
|
|
8295
|
+
/**
|
|
8296
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
8297
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
8298
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
8299
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
8300
|
+
*
|
|
8301
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
8302
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
8303
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
8304
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
8305
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
8306
|
+
*/
|
|
8307
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
8308
|
+
/**
|
|
8309
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
8310
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
8311
|
+
* `objectClasses`.
|
|
8312
|
+
*
|
|
8313
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
8314
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
8315
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
8316
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
8317
|
+
* device (D12) — mai un elenco globale di cap.
|
|
8318
|
+
*
|
|
8319
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
8320
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
8321
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
8322
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8323
|
+
* registrare.
|
|
8324
|
+
*/
|
|
8325
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8221
8326
|
});
|
|
8222
8327
|
/**
|
|
8223
8328
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8723,41 +8828,6 @@ function pickClosestResolution(entries, target) {
|
|
|
8723
8828
|
}
|
|
8724
8829
|
return bestAbove?.entry ?? bestBelow?.entry;
|
|
8725
8830
|
}
|
|
8726
|
-
var LabelDefinitionSchema = object({
|
|
8727
|
-
id: string(),
|
|
8728
|
-
name: string(),
|
|
8729
|
-
category: string().optional(),
|
|
8730
|
-
description: string().optional(),
|
|
8731
|
-
icon: string().optional()
|
|
8732
|
-
});
|
|
8733
|
-
/**
|
|
8734
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8735
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8736
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8737
|
-
* detection pipeline executor actually routes.
|
|
8738
|
-
*
|
|
8739
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8740
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8741
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8742
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8743
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8744
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8745
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8746
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8747
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8748
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8749
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8750
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8751
|
-
*/
|
|
8752
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8753
|
-
mapping: record(string(), _enum([
|
|
8754
|
-
"person",
|
|
8755
|
-
"vehicle",
|
|
8756
|
-
"animal",
|
|
8757
|
-
"package"
|
|
8758
|
-
])),
|
|
8759
|
-
preserveOriginal: boolean()
|
|
8760
|
-
});
|
|
8761
8831
|
var MODEL_FORMATS = [
|
|
8762
8832
|
"onnx",
|
|
8763
8833
|
"coreml",
|
|
@@ -21612,7 +21682,7 @@ var lifecycleJobSchema = object({
|
|
|
21612
21682
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21613
21683
|
* as every other cap.
|
|
21614
21684
|
*/
|
|
21615
|
-
var LogLevelSchema$
|
|
21685
|
+
var LogLevelSchema$2 = _enum([
|
|
21616
21686
|
"debug",
|
|
21617
21687
|
"info",
|
|
21618
21688
|
"warn",
|
|
@@ -21819,7 +21889,7 @@ var CustomActionInputSchema = object({
|
|
|
21819
21889
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21820
21890
|
addonId: string(),
|
|
21821
21891
|
limit: number().min(1).max(500).default(100),
|
|
21822
|
-
level: LogLevelSchema$
|
|
21892
|
+
level: LogLevelSchema$2.optional()
|
|
21823
21893
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21824
21894
|
packageName: string(),
|
|
21825
21895
|
version: string().optional()
|
|
@@ -21917,7 +21987,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21917
21987
|
auth: "admin"
|
|
21918
21988
|
}), method(object({
|
|
21919
21989
|
addonId: string(),
|
|
21920
|
-
level: LogLevelSchema$
|
|
21990
|
+
level: LogLevelSchema$2.optional()
|
|
21921
21991
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21922
21992
|
object({
|
|
21923
21993
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22931,6 +23001,35 @@ var FaceFilterEnum = _enum([
|
|
|
22931
23001
|
"identified",
|
|
22932
23002
|
"all"
|
|
22933
23003
|
]);
|
|
23004
|
+
/**
|
|
23005
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
23006
|
+
*
|
|
23007
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
23008
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
23009
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
23010
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
23011
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
23012
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
23013
|
+
*
|
|
23014
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
23015
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
23016
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
23017
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
23018
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
23019
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
23020
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
23021
|
+
* backend's NULL-collation accident.
|
|
23022
|
+
*/
|
|
23023
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
23024
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
23025
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
23026
|
+
* never leaves the server. */
|
|
23027
|
+
var FaceClusterSchema = object({
|
|
23028
|
+
faceIds: array(string()).readonly(),
|
|
23029
|
+
representativeFaceId: string(),
|
|
23030
|
+
size: number().int(),
|
|
23031
|
+
cohesion: number()
|
|
23032
|
+
});
|
|
22934
23033
|
var MediaFileLiteSchema$1 = object({
|
|
22935
23034
|
key: string(),
|
|
22936
23035
|
kind: string(),
|
|
@@ -22977,24 +23076,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22977
23076
|
kind: "mutation",
|
|
22978
23077
|
auth: "admin"
|
|
22979
23078
|
}), method(object({
|
|
22980
|
-
/**
|
|
23079
|
+
/**
|
|
23080
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
23081
|
+
*
|
|
23082
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
23083
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
23084
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
23085
|
+
* present, and this field is then ignored rather than unioned, so
|
|
23086
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
23087
|
+
*/
|
|
22981
23088
|
deviceId: number().int().optional(),
|
|
23089
|
+
/**
|
|
23090
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
23091
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
23092
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
23093
|
+
* about to discard).
|
|
23094
|
+
*
|
|
23095
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
23096
|
+
* "every camera". A request for no devices is a request, not an
|
|
23097
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
23098
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
23099
|
+
*
|
|
23100
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
23101
|
+
*/
|
|
23102
|
+
deviceIds: array(number().int()).optional(),
|
|
22982
23103
|
limit: number().int().positive().optional(),
|
|
22983
23104
|
filter: FaceFilterEnum.optional(),
|
|
22984
23105
|
/**
|
|
22985
|
-
*
|
|
22986
|
-
*
|
|
23106
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23107
|
+
* Absent means no lower bound.
|
|
23108
|
+
*/
|
|
23109
|
+
since: number().int().optional(),
|
|
23110
|
+
/**
|
|
23111
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23112
|
+
* Absent means no upper bound.
|
|
23113
|
+
*/
|
|
23114
|
+
until: number().int().optional(),
|
|
23115
|
+
/**
|
|
23116
|
+
* Order the page by time or by suggestion certainty. Default
|
|
23117
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
23118
|
+
* that does not ask.
|
|
22987
23119
|
*
|
|
22988
|
-
*
|
|
22989
|
-
*
|
|
22990
|
-
* the browser cache the images.
|
|
23120
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
23121
|
+
* does under `'suggestionConfidence'`.
|
|
22991
23122
|
*
|
|
22992
|
-
*
|
|
22993
|
-
*
|
|
22994
|
-
*
|
|
22995
|
-
*
|
|
22996
|
-
*
|
|
22997
|
-
|
|
23123
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
23124
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
23125
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
23126
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
23127
|
+
* with {@link since} / {@link until}.
|
|
23128
|
+
*/
|
|
23129
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
23130
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
23131
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
23132
|
+
/**
|
|
23133
|
+
* Inline the base64 crop on every row.
|
|
23134
|
+
*
|
|
23135
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
23136
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
23137
|
+
* this for every gallery, and which records why the inline shape had
|
|
23138
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
23139
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
23140
|
+
* that describes the old design reads as permission to rely on it.
|
|
23141
|
+
*
|
|
23142
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
23143
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
23144
|
+
* cached and ETagged.
|
|
22998
23145
|
*/
|
|
22999
23146
|
includeCrops: boolean().optional()
|
|
23000
23147
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -23030,13 +23177,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23030
23177
|
}), method(object({
|
|
23031
23178
|
threshold: number().min(0).max(1).optional(),
|
|
23032
23179
|
minClusterSize: number().int().min(2).optional(),
|
|
23033
|
-
|
|
23034
|
-
|
|
23035
|
-
|
|
23036
|
-
|
|
23037
|
-
|
|
23038
|
-
|
|
23039
|
-
|
|
23180
|
+
/**
|
|
23181
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
23182
|
+
* which read as though it bounded the work — it never did.
|
|
23183
|
+
*
|
|
23184
|
+
* Wins over {@link limit} when both are sent.
|
|
23185
|
+
*/
|
|
23186
|
+
maxClusters: number().int().positive().optional(),
|
|
23187
|
+
/**
|
|
23188
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
23189
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
23190
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
23191
|
+
*/
|
|
23192
|
+
limit: number().int().positive().optional(),
|
|
23193
|
+
/**
|
|
23194
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
23195
|
+
* POOL, not the result.
|
|
23196
|
+
*
|
|
23197
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
23198
|
+
* used to read every unassigned face on the hub no matter what the
|
|
23199
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
23200
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
23201
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
23202
|
+
*
|
|
23203
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
23204
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
23205
|
+
* sample it randomly.
|
|
23206
|
+
*
|
|
23207
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
23208
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
23209
|
+
* unbounded scan can never come back as the table grows.
|
|
23210
|
+
*/
|
|
23211
|
+
maxFacesScanned: number().int().positive().optional()
|
|
23212
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
23040
23213
|
/**
|
|
23041
23214
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
23042
23215
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26796,6 +26969,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26796
26969
|
latitude: number().min(-90).max(90),
|
|
26797
26970
|
longitude: number().min(-180).max(180)
|
|
26798
26971
|
}).nullable();
|
|
26972
|
+
/**
|
|
26973
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26974
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26975
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26976
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26977
|
+
*/
|
|
26978
|
+
var RequestCensusGroupSchema = object({
|
|
26979
|
+
procedure: string(),
|
|
26980
|
+
userAgent: string(),
|
|
26981
|
+
ip: string(),
|
|
26982
|
+
principal: string(),
|
|
26983
|
+
calls: number(),
|
|
26984
|
+
perMin: number()
|
|
26985
|
+
});
|
|
26986
|
+
/**
|
|
26987
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26988
|
+
*
|
|
26989
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26990
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26991
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26992
|
+
*/
|
|
26993
|
+
var RequestCensusProcedureSchema = object({
|
|
26994
|
+
procedure: string(),
|
|
26995
|
+
calls: number(),
|
|
26996
|
+
perMin: number()
|
|
26997
|
+
});
|
|
26998
|
+
/**
|
|
26999
|
+
* The census as an operator sees it.
|
|
27000
|
+
*
|
|
27001
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
27002
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
27003
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
27004
|
+
* like one that succeeded.
|
|
27005
|
+
*/
|
|
27006
|
+
var RequestCensusStatusSchema = object({
|
|
27007
|
+
armed: boolean(),
|
|
27008
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
27009
|
+
elapsedMs: number(),
|
|
27010
|
+
/** The window actually armed, after the server clamped the request. */
|
|
27011
|
+
windowMs: number(),
|
|
27012
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
27013
|
+
armedUntilMs: number(),
|
|
27014
|
+
httpRequests: number(),
|
|
27015
|
+
batchedRequests: number(),
|
|
27016
|
+
/**
|
|
27017
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
27018
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
27019
|
+
* the number comparable with a store-side call count.
|
|
27020
|
+
*/
|
|
27021
|
+
procedureCalls: number(),
|
|
27022
|
+
/**
|
|
27023
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
27024
|
+
* transport resolves one context per connection - but the number that says
|
|
27025
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
27026
|
+
*/
|
|
27027
|
+
wsConnections: number(),
|
|
27028
|
+
distinctGroups: number(),
|
|
27029
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
27030
|
+
* cardinality bound. */
|
|
27031
|
+
unattributedCalls: number(),
|
|
27032
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
27033
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
27034
|
+
}).extend({ persisted: boolean() });
|
|
27035
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
27036
|
+
var LogLevelSchema$1 = _enum([
|
|
27037
|
+
"debug",
|
|
27038
|
+
"info",
|
|
27039
|
+
"warn",
|
|
27040
|
+
"error"
|
|
27041
|
+
]);
|
|
27042
|
+
/**
|
|
27043
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
27044
|
+
*
|
|
27045
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
27046
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
27047
|
+
*/
|
|
27048
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
27049
|
+
/**
|
|
27050
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
27051
|
+
* layer that carries an explicit value wins.
|
|
27052
|
+
*
|
|
27053
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
27054
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
27055
|
+
* grow later would force every consumer of this document to change with it.
|
|
27056
|
+
* Nothing returns `component` today.
|
|
27057
|
+
*/
|
|
27058
|
+
var LoggingScopeKindSchema = _enum([
|
|
27059
|
+
"cluster",
|
|
27060
|
+
"node",
|
|
27061
|
+
"component"
|
|
27062
|
+
]);
|
|
27063
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
27064
|
+
var LoggingLevelSourceSchema = _enum([
|
|
27065
|
+
"default",
|
|
27066
|
+
"cluster",
|
|
27067
|
+
"node",
|
|
27068
|
+
"component"
|
|
27069
|
+
]);
|
|
27070
|
+
/**
|
|
27071
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
27072
|
+
*
|
|
27073
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
27074
|
+
* difference between "this node is at `info` because I decided it" and
|
|
27075
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
27076
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
27077
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
27078
|
+
*/
|
|
27079
|
+
var LoggingLevelLayerSchema = object({
|
|
27080
|
+
scope: LoggingScopeKindSchema,
|
|
27081
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
27082
|
+
nodeId: string().nullable(),
|
|
27083
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
27084
|
+
level: LogLevelSchema$1.nullable()
|
|
27085
|
+
});
|
|
27086
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
27087
|
+
var LoggingEffectiveSchema = object({
|
|
27088
|
+
level: LogLevelSchema$1,
|
|
27089
|
+
levelSource: LoggingLevelSourceSchema
|
|
27090
|
+
});
|
|
27091
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
27092
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
27093
|
+
/**
|
|
27094
|
+
* An armed diagnostic, with its DEADLINE.
|
|
27095
|
+
*
|
|
27096
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
27097
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
27098
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
27099
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
27100
|
+
*/
|
|
27101
|
+
var DiagnosticWindowSchema = object({
|
|
27102
|
+
id: DiagnosticIdSchema,
|
|
27103
|
+
armed: boolean(),
|
|
27104
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
27105
|
+
armedUntilMs: number(),
|
|
27106
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
27107
|
+
remainingMs: number(),
|
|
27108
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
27109
|
+
* i.e. whether this window would survive a restart. */
|
|
27110
|
+
persisted: boolean()
|
|
27111
|
+
});
|
|
27112
|
+
/**
|
|
27113
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
27114
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
27115
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
27116
|
+
*/
|
|
27117
|
+
var DiagnosticWindowPatchSchema = object({
|
|
27118
|
+
id: DiagnosticIdSchema,
|
|
27119
|
+
armMs: number().int().min(0),
|
|
27120
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
27121
|
+
reportEveryMs: number().int().positive().optional()
|
|
27122
|
+
});
|
|
27123
|
+
/**
|
|
27124
|
+
* A PATCH, and patches MERGE.
|
|
27125
|
+
*
|
|
27126
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
27127
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
27128
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
27129
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
27130
|
+
* turns into an erased one.
|
|
27131
|
+
*/
|
|
27132
|
+
var LoggingSettingsPatchSchema = object({
|
|
27133
|
+
/**
|
|
27134
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
27135
|
+
* addressed scope so it inherits again. A value sets it.
|
|
27136
|
+
*/
|
|
27137
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
27138
|
+
/**
|
|
27139
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
27140
|
+
* keeps running — a patch is never a full replacement.
|
|
27141
|
+
*/
|
|
27142
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
27143
|
+
});
|
|
27144
|
+
/**
|
|
27145
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
27146
|
+
*
|
|
27147
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
27148
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
27149
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
27150
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
27151
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
27152
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
27153
|
+
* layer selector needs a name the transport does not already own.
|
|
27154
|
+
*/
|
|
27155
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
27156
|
+
var SetLoggingSettingsInputSchema = object({
|
|
27157
|
+
scopeNodeId: string().optional(),
|
|
27158
|
+
patch: LoggingSettingsPatchSchema
|
|
27159
|
+
});
|
|
27160
|
+
/**
|
|
27161
|
+
* The whole document, as read and as returned after every write.
|
|
27162
|
+
*
|
|
27163
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
27164
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
27165
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
27166
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
27167
|
+
* survive a restart.
|
|
27168
|
+
*/
|
|
27169
|
+
var LoggingSettingsStateSchema = object({
|
|
27170
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
27171
|
+
scopeNodeId: string().nullable(),
|
|
27172
|
+
effective: LoggingEffectiveSchema,
|
|
27173
|
+
explicit: LoggingExplicitSchema,
|
|
27174
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
27175
|
+
persisted: boolean()
|
|
27176
|
+
});
|
|
26799
27177
|
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(), {
|
|
26800
27178
|
kind: "mutation",
|
|
26801
27179
|
auth: "admin"
|
|
@@ -26808,6 +27186,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26808
27186
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26809
27187
|
kind: "mutation",
|
|
26810
27188
|
auth: "admin"
|
|
27189
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
27190
|
+
kind: "mutation",
|
|
27191
|
+
auth: "admin"
|
|
26811
27192
|
});
|
|
26812
27193
|
object({
|
|
26813
27194
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -32655,6 +33036,18 @@ Object.freeze({
|
|
|
32655
33036
|
addonId: null,
|
|
32656
33037
|
access: "create"
|
|
32657
33038
|
},
|
|
33039
|
+
"system.getLoggingSettings": {
|
|
33040
|
+
capName: "system",
|
|
33041
|
+
capScope: "system",
|
|
33042
|
+
addonId: null,
|
|
33043
|
+
access: "view"
|
|
33044
|
+
},
|
|
33045
|
+
"system.getRequestCensus": {
|
|
33046
|
+
capName: "system",
|
|
33047
|
+
capScope: "system",
|
|
33048
|
+
addonId: null,
|
|
33049
|
+
access: "view"
|
|
33050
|
+
},
|
|
32658
33051
|
"system.getRetentionConfig": {
|
|
32659
33052
|
capName: "system",
|
|
32660
33053
|
capScope: "system",
|
|
@@ -32685,6 +33078,12 @@ Object.freeze({
|
|
|
32685
33078
|
addonId: null,
|
|
32686
33079
|
access: "view"
|
|
32687
33080
|
},
|
|
33081
|
+
"system.setLoggingSettings": {
|
|
33082
|
+
capName: "system",
|
|
33083
|
+
capScope: "system",
|
|
33084
|
+
addonId: null,
|
|
33085
|
+
access: "create"
|
|
33086
|
+
},
|
|
32688
33087
|
"system.setRetentionConfig": {
|
|
32689
33088
|
capName: "system",
|
|
32690
33089
|
capScope: "system",
|
|
@@ -33840,6 +34239,10 @@ Object.freeze({
|
|
|
33840
34239
|
name: "deviceId",
|
|
33841
34240
|
form: "single",
|
|
33842
34241
|
optional: true
|
|
34242
|
+
}, {
|
|
34243
|
+
name: "deviceIds",
|
|
34244
|
+
form: "array",
|
|
34245
|
+
optional: true
|
|
33843
34246
|
}],
|
|
33844
34247
|
"fanControl.setDirection": [{
|
|
33845
34248
|
name: "deviceId",
|
|
@@ -35450,7 +35853,38 @@ object({
|
|
|
35450
35853
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
35451
35854
|
* reproduce that.
|
|
35452
35855
|
*/
|
|
35453
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
35856
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
35857
|
+
/**
|
|
35858
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35859
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35860
|
+
* subject tiles, on frames that detected something.
|
|
35861
|
+
*
|
|
35862
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35863
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35864
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35865
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35866
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35867
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35868
|
+
*
|
|
35869
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35870
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35871
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35872
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35873
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35874
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35875
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35876
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35877
|
+
* whole shape exists to avoid.
|
|
35878
|
+
*
|
|
35879
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35880
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35881
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35882
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35883
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35884
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35885
|
+
* nothing.
|
|
35886
|
+
*/
|
|
35887
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
35454
35888
|
});
|
|
35455
35889
|
/**
|
|
35456
35890
|
* The values in force when the operator has set nothing.
|
|
@@ -35466,12 +35900,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
35466
35900
|
budgetMb: 1024,
|
|
35467
35901
|
activityMs: 15e3,
|
|
35468
35902
|
tileBudgetMb: 64,
|
|
35903
|
+
sceneBudgetMb: 48,
|
|
35469
35904
|
admission: "inferred"
|
|
35470
35905
|
};
|
|
35471
35906
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
35472
35907
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
35473
35908
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
35474
35909
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35910
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
35475
35911
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
35476
35912
|
var MB = 1024 * 1024;
|
|
35477
35913
|
1024 * MB, 3072 * MB;
|
|
@@ -8180,6 +8180,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
8180
8180
|
/** Max rows returned, newest-first. */
|
|
8181
8181
|
limit: number().int().min(1).max(1e3).optional()
|
|
8182
8182
|
});
|
|
8183
|
+
var LabelDefinitionSchema = object({
|
|
8184
|
+
id: string(),
|
|
8185
|
+
name: string(),
|
|
8186
|
+
category: string().optional(),
|
|
8187
|
+
description: string().optional(),
|
|
8188
|
+
icon: string().optional()
|
|
8189
|
+
});
|
|
8190
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
8191
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
8192
|
+
"person",
|
|
8193
|
+
"vehicle",
|
|
8194
|
+
"animal",
|
|
8195
|
+
"package"
|
|
8196
|
+
];
|
|
8197
|
+
/**
|
|
8198
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
8199
|
+
* un operatore può selezionare.
|
|
8200
|
+
*
|
|
8201
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
8202
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
8203
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
8204
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
8205
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
8206
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
8207
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
8208
|
+
*
|
|
8209
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
8210
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
8211
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
8212
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
8213
|
+
* successiva.
|
|
8214
|
+
*/
|
|
8215
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
8216
|
+
"person",
|
|
8217
|
+
"vehicle",
|
|
8218
|
+
"animal"
|
|
8219
|
+
];
|
|
8220
|
+
/**
|
|
8221
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
8222
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8223
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8224
|
+
* detection pipeline executor actually routes.
|
|
8225
|
+
*
|
|
8226
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8227
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8228
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8229
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8230
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8231
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8232
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8233
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8234
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8235
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8236
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8237
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8238
|
+
*/
|
|
8239
|
+
var DetectionCatalogClassMapSchema = object({
|
|
8240
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
8241
|
+
preserveOriginal: boolean()
|
|
8242
|
+
});
|
|
8183
8243
|
/**
|
|
8184
8244
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
8185
8245
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -8202,10 +8262,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
8202
8262
|
"events",
|
|
8203
8263
|
"continuous"
|
|
8204
8264
|
]);
|
|
8265
|
+
/**
|
|
8266
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
8267
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
8268
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
8269
|
+
*/
|
|
8270
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
8271
|
+
/**
|
|
8272
|
+
* True quando `values` non ripete un elemento.
|
|
8273
|
+
*
|
|
8274
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
8275
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
8276
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
8277
|
+
*/
|
|
8278
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
8205
8279
|
/** Which detectors trigger an `events`-mode band. */
|
|
8206
8280
|
var RecordingTriggersSchema = object({
|
|
8207
8281
|
motion: boolean().optional(),
|
|
8208
|
-
audioThresholdDbfs: number().optional()
|
|
8282
|
+
audioThresholdDbfs: number().optional(),
|
|
8283
|
+
/**
|
|
8284
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
8285
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
8286
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
8287
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
8288
|
+
*
|
|
8289
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
8290
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
8291
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
8292
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
8293
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
8294
|
+
*/
|
|
8295
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
8296
|
+
/**
|
|
8297
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
8298
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
8299
|
+
* `objectClasses`.
|
|
8300
|
+
*
|
|
8301
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
8302
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
8303
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
8304
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
8305
|
+
* device (D12) — mai un elenco globale di cap.
|
|
8306
|
+
*
|
|
8307
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
8308
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
8309
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
8310
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8311
|
+
* registrare.
|
|
8312
|
+
*/
|
|
8313
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8209
8314
|
});
|
|
8210
8315
|
/**
|
|
8211
8316
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8711,41 +8816,6 @@ function pickClosestResolution(entries, target) {
|
|
|
8711
8816
|
}
|
|
8712
8817
|
return bestAbove?.entry ?? bestBelow?.entry;
|
|
8713
8818
|
}
|
|
8714
|
-
var LabelDefinitionSchema = object({
|
|
8715
|
-
id: string(),
|
|
8716
|
-
name: string(),
|
|
8717
|
-
category: string().optional(),
|
|
8718
|
-
description: string().optional(),
|
|
8719
|
-
icon: string().optional()
|
|
8720
|
-
});
|
|
8721
|
-
/**
|
|
8722
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8723
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8724
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8725
|
-
* detection pipeline executor actually routes.
|
|
8726
|
-
*
|
|
8727
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8728
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8729
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8730
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8731
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8732
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8733
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8734
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8735
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8736
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8737
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8738
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8739
|
-
*/
|
|
8740
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8741
|
-
mapping: record(string(), _enum([
|
|
8742
|
-
"person",
|
|
8743
|
-
"vehicle",
|
|
8744
|
-
"animal",
|
|
8745
|
-
"package"
|
|
8746
|
-
])),
|
|
8747
|
-
preserveOriginal: boolean()
|
|
8748
|
-
});
|
|
8749
8819
|
var MODEL_FORMATS = [
|
|
8750
8820
|
"onnx",
|
|
8751
8821
|
"coreml",
|
|
@@ -21600,7 +21670,7 @@ var lifecycleJobSchema = object({
|
|
|
21600
21670
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21601
21671
|
* as every other cap.
|
|
21602
21672
|
*/
|
|
21603
|
-
var LogLevelSchema$
|
|
21673
|
+
var LogLevelSchema$2 = _enum([
|
|
21604
21674
|
"debug",
|
|
21605
21675
|
"info",
|
|
21606
21676
|
"warn",
|
|
@@ -21807,7 +21877,7 @@ var CustomActionInputSchema = object({
|
|
|
21807
21877
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21808
21878
|
addonId: string(),
|
|
21809
21879
|
limit: number().min(1).max(500).default(100),
|
|
21810
|
-
level: LogLevelSchema$
|
|
21880
|
+
level: LogLevelSchema$2.optional()
|
|
21811
21881
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21812
21882
|
packageName: string(),
|
|
21813
21883
|
version: string().optional()
|
|
@@ -21905,7 +21975,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21905
21975
|
auth: "admin"
|
|
21906
21976
|
}), method(object({
|
|
21907
21977
|
addonId: string(),
|
|
21908
|
-
level: LogLevelSchema$
|
|
21978
|
+
level: LogLevelSchema$2.optional()
|
|
21909
21979
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21910
21980
|
object({
|
|
21911
21981
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22919,6 +22989,35 @@ var FaceFilterEnum = _enum([
|
|
|
22919
22989
|
"identified",
|
|
22920
22990
|
"all"
|
|
22921
22991
|
]);
|
|
22992
|
+
/**
|
|
22993
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22994
|
+
*
|
|
22995
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22996
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22997
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22998
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22999
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
23000
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
23001
|
+
*
|
|
23002
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
23003
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
23004
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
23005
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
23006
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
23007
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
23008
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
23009
|
+
* backend's NULL-collation accident.
|
|
23010
|
+
*/
|
|
23011
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
23012
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
23013
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
23014
|
+
* never leaves the server. */
|
|
23015
|
+
var FaceClusterSchema = object({
|
|
23016
|
+
faceIds: array(string()).readonly(),
|
|
23017
|
+
representativeFaceId: string(),
|
|
23018
|
+
size: number().int(),
|
|
23019
|
+
cohesion: number()
|
|
23020
|
+
});
|
|
22922
23021
|
var MediaFileLiteSchema$1 = object({
|
|
22923
23022
|
key: string(),
|
|
22924
23023
|
kind: string(),
|
|
@@ -22965,24 +23064,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22965
23064
|
kind: "mutation",
|
|
22966
23065
|
auth: "admin"
|
|
22967
23066
|
}), method(object({
|
|
22968
|
-
/**
|
|
23067
|
+
/**
|
|
23068
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
23069
|
+
*
|
|
23070
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
23071
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
23072
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
23073
|
+
* present, and this field is then ignored rather than unioned, so
|
|
23074
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
23075
|
+
*/
|
|
22969
23076
|
deviceId: number().int().optional(),
|
|
23077
|
+
/**
|
|
23078
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
23079
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
23080
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
23081
|
+
* about to discard).
|
|
23082
|
+
*
|
|
23083
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
23084
|
+
* "every camera". A request for no devices is a request, not an
|
|
23085
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
23086
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
23087
|
+
*
|
|
23088
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
23089
|
+
*/
|
|
23090
|
+
deviceIds: array(number().int()).optional(),
|
|
22970
23091
|
limit: number().int().positive().optional(),
|
|
22971
23092
|
filter: FaceFilterEnum.optional(),
|
|
22972
23093
|
/**
|
|
22973
|
-
*
|
|
22974
|
-
*
|
|
23094
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23095
|
+
* Absent means no lower bound.
|
|
23096
|
+
*/
|
|
23097
|
+
since: number().int().optional(),
|
|
23098
|
+
/**
|
|
23099
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
23100
|
+
* Absent means no upper bound.
|
|
23101
|
+
*/
|
|
23102
|
+
until: number().int().optional(),
|
|
23103
|
+
/**
|
|
23104
|
+
* Order the page by time or by suggestion certainty. Default
|
|
23105
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
23106
|
+
* that does not ask.
|
|
22975
23107
|
*
|
|
22976
|
-
*
|
|
22977
|
-
*
|
|
22978
|
-
* the browser cache the images.
|
|
23108
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
23109
|
+
* does under `'suggestionConfidence'`.
|
|
22979
23110
|
*
|
|
22980
|
-
*
|
|
22981
|
-
*
|
|
22982
|
-
*
|
|
22983
|
-
*
|
|
22984
|
-
*
|
|
22985
|
-
|
|
23111
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
23112
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
23113
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
23114
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
23115
|
+
* with {@link since} / {@link until}.
|
|
23116
|
+
*/
|
|
23117
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
23118
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
23119
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
23120
|
+
/**
|
|
23121
|
+
* Inline the base64 crop on every row.
|
|
23122
|
+
*
|
|
23123
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
23124
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
23125
|
+
* this for every gallery, and which records why the inline shape had
|
|
23126
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
23127
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
23128
|
+
* that describes the old design reads as permission to rely on it.
|
|
23129
|
+
*
|
|
23130
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
23131
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
23132
|
+
* cached and ETagged.
|
|
22986
23133
|
*/
|
|
22987
23134
|
includeCrops: boolean().optional()
|
|
22988
23135
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -23018,13 +23165,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
23018
23165
|
}), method(object({
|
|
23019
23166
|
threshold: number().min(0).max(1).optional(),
|
|
23020
23167
|
minClusterSize: number().int().min(2).optional(),
|
|
23021
|
-
|
|
23022
|
-
|
|
23023
|
-
|
|
23024
|
-
|
|
23025
|
-
|
|
23026
|
-
|
|
23027
|
-
|
|
23168
|
+
/**
|
|
23169
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
23170
|
+
* which read as though it bounded the work — it never did.
|
|
23171
|
+
*
|
|
23172
|
+
* Wins over {@link limit} when both are sent.
|
|
23173
|
+
*/
|
|
23174
|
+
maxClusters: number().int().positive().optional(),
|
|
23175
|
+
/**
|
|
23176
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
23177
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
23178
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
23179
|
+
*/
|
|
23180
|
+
limit: number().int().positive().optional(),
|
|
23181
|
+
/**
|
|
23182
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
23183
|
+
* POOL, not the result.
|
|
23184
|
+
*
|
|
23185
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
23186
|
+
* used to read every unassigned face on the hub no matter what the
|
|
23187
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
23188
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
23189
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
23190
|
+
*
|
|
23191
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
23192
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
23193
|
+
* sample it randomly.
|
|
23194
|
+
*
|
|
23195
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
23196
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
23197
|
+
* unbounded scan can never come back as the table grows.
|
|
23198
|
+
*/
|
|
23199
|
+
maxFacesScanned: number().int().positive().optional()
|
|
23200
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
23028
23201
|
/**
|
|
23029
23202
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
23030
23203
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26784,6 +26957,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26784
26957
|
latitude: number().min(-90).max(90),
|
|
26785
26958
|
longitude: number().min(-180).max(180)
|
|
26786
26959
|
}).nullable();
|
|
26960
|
+
/**
|
|
26961
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26962
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26963
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26964
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26965
|
+
*/
|
|
26966
|
+
var RequestCensusGroupSchema = object({
|
|
26967
|
+
procedure: string(),
|
|
26968
|
+
userAgent: string(),
|
|
26969
|
+
ip: string(),
|
|
26970
|
+
principal: string(),
|
|
26971
|
+
calls: number(),
|
|
26972
|
+
perMin: number()
|
|
26973
|
+
});
|
|
26974
|
+
/**
|
|
26975
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26976
|
+
*
|
|
26977
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26978
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26979
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26980
|
+
*/
|
|
26981
|
+
var RequestCensusProcedureSchema = object({
|
|
26982
|
+
procedure: string(),
|
|
26983
|
+
calls: number(),
|
|
26984
|
+
perMin: number()
|
|
26985
|
+
});
|
|
26986
|
+
/**
|
|
26987
|
+
* The census as an operator sees it.
|
|
26988
|
+
*
|
|
26989
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26990
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26991
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26992
|
+
* like one that succeeded.
|
|
26993
|
+
*/
|
|
26994
|
+
var RequestCensusStatusSchema = object({
|
|
26995
|
+
armed: boolean(),
|
|
26996
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26997
|
+
elapsedMs: number(),
|
|
26998
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26999
|
+
windowMs: number(),
|
|
27000
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
27001
|
+
armedUntilMs: number(),
|
|
27002
|
+
httpRequests: number(),
|
|
27003
|
+
batchedRequests: number(),
|
|
27004
|
+
/**
|
|
27005
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
27006
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
27007
|
+
* the number comparable with a store-side call count.
|
|
27008
|
+
*/
|
|
27009
|
+
procedureCalls: number(),
|
|
27010
|
+
/**
|
|
27011
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
27012
|
+
* transport resolves one context per connection - but the number that says
|
|
27013
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
27014
|
+
*/
|
|
27015
|
+
wsConnections: number(),
|
|
27016
|
+
distinctGroups: number(),
|
|
27017
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
27018
|
+
* cardinality bound. */
|
|
27019
|
+
unattributedCalls: number(),
|
|
27020
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
27021
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
27022
|
+
}).extend({ persisted: boolean() });
|
|
27023
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
27024
|
+
var LogLevelSchema$1 = _enum([
|
|
27025
|
+
"debug",
|
|
27026
|
+
"info",
|
|
27027
|
+
"warn",
|
|
27028
|
+
"error"
|
|
27029
|
+
]);
|
|
27030
|
+
/**
|
|
27031
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
27032
|
+
*
|
|
27033
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
27034
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
27035
|
+
*/
|
|
27036
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
27037
|
+
/**
|
|
27038
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
27039
|
+
* layer that carries an explicit value wins.
|
|
27040
|
+
*
|
|
27041
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
27042
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
27043
|
+
* grow later would force every consumer of this document to change with it.
|
|
27044
|
+
* Nothing returns `component` today.
|
|
27045
|
+
*/
|
|
27046
|
+
var LoggingScopeKindSchema = _enum([
|
|
27047
|
+
"cluster",
|
|
27048
|
+
"node",
|
|
27049
|
+
"component"
|
|
27050
|
+
]);
|
|
27051
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
27052
|
+
var LoggingLevelSourceSchema = _enum([
|
|
27053
|
+
"default",
|
|
27054
|
+
"cluster",
|
|
27055
|
+
"node",
|
|
27056
|
+
"component"
|
|
27057
|
+
]);
|
|
27058
|
+
/**
|
|
27059
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
27060
|
+
*
|
|
27061
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
27062
|
+
* difference between "this node is at `info` because I decided it" and
|
|
27063
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
27064
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
27065
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
27066
|
+
*/
|
|
27067
|
+
var LoggingLevelLayerSchema = object({
|
|
27068
|
+
scope: LoggingScopeKindSchema,
|
|
27069
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
27070
|
+
nodeId: string().nullable(),
|
|
27071
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
27072
|
+
level: LogLevelSchema$1.nullable()
|
|
27073
|
+
});
|
|
27074
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
27075
|
+
var LoggingEffectiveSchema = object({
|
|
27076
|
+
level: LogLevelSchema$1,
|
|
27077
|
+
levelSource: LoggingLevelSourceSchema
|
|
27078
|
+
});
|
|
27079
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
27080
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
27081
|
+
/**
|
|
27082
|
+
* An armed diagnostic, with its DEADLINE.
|
|
27083
|
+
*
|
|
27084
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
27085
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
27086
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
27087
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
27088
|
+
*/
|
|
27089
|
+
var DiagnosticWindowSchema = object({
|
|
27090
|
+
id: DiagnosticIdSchema,
|
|
27091
|
+
armed: boolean(),
|
|
27092
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
27093
|
+
armedUntilMs: number(),
|
|
27094
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
27095
|
+
remainingMs: number(),
|
|
27096
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
27097
|
+
* i.e. whether this window would survive a restart. */
|
|
27098
|
+
persisted: boolean()
|
|
27099
|
+
});
|
|
27100
|
+
/**
|
|
27101
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
27102
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
27103
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
27104
|
+
*/
|
|
27105
|
+
var DiagnosticWindowPatchSchema = object({
|
|
27106
|
+
id: DiagnosticIdSchema,
|
|
27107
|
+
armMs: number().int().min(0),
|
|
27108
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
27109
|
+
reportEveryMs: number().int().positive().optional()
|
|
27110
|
+
});
|
|
27111
|
+
/**
|
|
27112
|
+
* A PATCH, and patches MERGE.
|
|
27113
|
+
*
|
|
27114
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
27115
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
27116
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
27117
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
27118
|
+
* turns into an erased one.
|
|
27119
|
+
*/
|
|
27120
|
+
var LoggingSettingsPatchSchema = object({
|
|
27121
|
+
/**
|
|
27122
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
27123
|
+
* addressed scope so it inherits again. A value sets it.
|
|
27124
|
+
*/
|
|
27125
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
27126
|
+
/**
|
|
27127
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
27128
|
+
* keeps running — a patch is never a full replacement.
|
|
27129
|
+
*/
|
|
27130
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
27131
|
+
});
|
|
27132
|
+
/**
|
|
27133
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
27134
|
+
*
|
|
27135
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
27136
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
27137
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
27138
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
27139
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
27140
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
27141
|
+
* layer selector needs a name the transport does not already own.
|
|
27142
|
+
*/
|
|
27143
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
27144
|
+
var SetLoggingSettingsInputSchema = object({
|
|
27145
|
+
scopeNodeId: string().optional(),
|
|
27146
|
+
patch: LoggingSettingsPatchSchema
|
|
27147
|
+
});
|
|
27148
|
+
/**
|
|
27149
|
+
* The whole document, as read and as returned after every write.
|
|
27150
|
+
*
|
|
27151
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
27152
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
27153
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
27154
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
27155
|
+
* survive a restart.
|
|
27156
|
+
*/
|
|
27157
|
+
var LoggingSettingsStateSchema = object({
|
|
27158
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
27159
|
+
scopeNodeId: string().nullable(),
|
|
27160
|
+
effective: LoggingEffectiveSchema,
|
|
27161
|
+
explicit: LoggingExplicitSchema,
|
|
27162
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
27163
|
+
persisted: boolean()
|
|
27164
|
+
});
|
|
26787
27165
|
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(), {
|
|
26788
27166
|
kind: "mutation",
|
|
26789
27167
|
auth: "admin"
|
|
@@ -26796,6 +27174,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26796
27174
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26797
27175
|
kind: "mutation",
|
|
26798
27176
|
auth: "admin"
|
|
27177
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
27178
|
+
kind: "mutation",
|
|
27179
|
+
auth: "admin"
|
|
26799
27180
|
});
|
|
26800
27181
|
object({
|
|
26801
27182
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -32643,6 +33024,18 @@ Object.freeze({
|
|
|
32643
33024
|
addonId: null,
|
|
32644
33025
|
access: "create"
|
|
32645
33026
|
},
|
|
33027
|
+
"system.getLoggingSettings": {
|
|
33028
|
+
capName: "system",
|
|
33029
|
+
capScope: "system",
|
|
33030
|
+
addonId: null,
|
|
33031
|
+
access: "view"
|
|
33032
|
+
},
|
|
33033
|
+
"system.getRequestCensus": {
|
|
33034
|
+
capName: "system",
|
|
33035
|
+
capScope: "system",
|
|
33036
|
+
addonId: null,
|
|
33037
|
+
access: "view"
|
|
33038
|
+
},
|
|
32646
33039
|
"system.getRetentionConfig": {
|
|
32647
33040
|
capName: "system",
|
|
32648
33041
|
capScope: "system",
|
|
@@ -32673,6 +33066,12 @@ Object.freeze({
|
|
|
32673
33066
|
addonId: null,
|
|
32674
33067
|
access: "view"
|
|
32675
33068
|
},
|
|
33069
|
+
"system.setLoggingSettings": {
|
|
33070
|
+
capName: "system",
|
|
33071
|
+
capScope: "system",
|
|
33072
|
+
addonId: null,
|
|
33073
|
+
access: "create"
|
|
33074
|
+
},
|
|
32676
33075
|
"system.setRetentionConfig": {
|
|
32677
33076
|
capName: "system",
|
|
32678
33077
|
capScope: "system",
|
|
@@ -33828,6 +34227,10 @@ Object.freeze({
|
|
|
33828
34227
|
name: "deviceId",
|
|
33829
34228
|
form: "single",
|
|
33830
34229
|
optional: true
|
|
34230
|
+
}, {
|
|
34231
|
+
name: "deviceIds",
|
|
34232
|
+
form: "array",
|
|
34233
|
+
optional: true
|
|
33831
34234
|
}],
|
|
33832
34235
|
"fanControl.setDirection": [{
|
|
33833
34236
|
name: "deviceId",
|
|
@@ -35438,7 +35841,38 @@ object({
|
|
|
35438
35841
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
35439
35842
|
* reproduce that.
|
|
35440
35843
|
*/
|
|
35441
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
35844
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
35845
|
+
/**
|
|
35846
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35847
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35848
|
+
* subject tiles, on frames that detected something.
|
|
35849
|
+
*
|
|
35850
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35851
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35852
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35853
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35854
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35855
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35856
|
+
*
|
|
35857
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35858
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35859
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35860
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35861
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35862
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35863
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35864
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35865
|
+
* whole shape exists to avoid.
|
|
35866
|
+
*
|
|
35867
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35868
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35869
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35870
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35871
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35872
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35873
|
+
* nothing.
|
|
35874
|
+
*/
|
|
35875
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
35442
35876
|
});
|
|
35443
35877
|
/**
|
|
35444
35878
|
* The values in force when the operator has set nothing.
|
|
@@ -35454,12 +35888,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
35454
35888
|
budgetMb: 1024,
|
|
35455
35889
|
activityMs: 15e3,
|
|
35456
35890
|
tileBudgetMb: 64,
|
|
35891
|
+
sceneBudgetMb: 48,
|
|
35457
35892
|
admission: "inferred"
|
|
35458
35893
|
};
|
|
35459
35894
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
35460
35895
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
35461
35896
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
35462
35897
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35898
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
35463
35899
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
35464
35900
|
var MB = 1024 * 1024;
|
|
35465
35901
|
1024 * MB, 3072 * MB;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-export-hap",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.43",
|
|
4
4
|
"description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|