@camstack/addon-notifiers 1.2.35 → 1.2.36
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
|
@@ -7659,6 +7659,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7659
7659
|
/** Max rows returned, newest-first. */
|
|
7660
7660
|
limit: number().int().min(1).max(1e3).optional()
|
|
7661
7661
|
});
|
|
7662
|
+
var LabelDefinitionSchema = object({
|
|
7663
|
+
id: string(),
|
|
7664
|
+
name: string(),
|
|
7665
|
+
category: string().optional(),
|
|
7666
|
+
description: string().optional(),
|
|
7667
|
+
icon: string().optional()
|
|
7668
|
+
});
|
|
7669
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7670
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7671
|
+
"person",
|
|
7672
|
+
"vehicle",
|
|
7673
|
+
"animal",
|
|
7674
|
+
"package"
|
|
7675
|
+
];
|
|
7676
|
+
/**
|
|
7677
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7678
|
+
* un operatore può selezionare.
|
|
7679
|
+
*
|
|
7680
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7681
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7682
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7683
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7684
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7685
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7686
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7687
|
+
*
|
|
7688
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7689
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7690
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7691
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7692
|
+
* successiva.
|
|
7693
|
+
*/
|
|
7694
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7695
|
+
"person",
|
|
7696
|
+
"vehicle",
|
|
7697
|
+
"animal"
|
|
7698
|
+
];
|
|
7699
|
+
/**
|
|
7700
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7701
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7702
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7703
|
+
* detection pipeline executor actually routes.
|
|
7704
|
+
*
|
|
7705
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7706
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7707
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7708
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7709
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7710
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7711
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7712
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7713
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7714
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7715
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7716
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7717
|
+
*/
|
|
7718
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7719
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7720
|
+
preserveOriginal: boolean()
|
|
7721
|
+
});
|
|
7662
7722
|
/**
|
|
7663
7723
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7664
7724
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7681,10 +7741,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7681
7741
|
"events",
|
|
7682
7742
|
"continuous"
|
|
7683
7743
|
]);
|
|
7744
|
+
/**
|
|
7745
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7746
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7747
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7748
|
+
*/
|
|
7749
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7750
|
+
/**
|
|
7751
|
+
* True quando `values` non ripete un elemento.
|
|
7752
|
+
*
|
|
7753
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7754
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7755
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7756
|
+
*/
|
|
7757
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7684
7758
|
/** Which detectors trigger an `events`-mode band. */
|
|
7685
7759
|
var RecordingTriggersSchema = object({
|
|
7686
7760
|
motion: boolean().optional(),
|
|
7687
|
-
audioThresholdDbfs: number().optional()
|
|
7761
|
+
audioThresholdDbfs: number().optional(),
|
|
7762
|
+
/**
|
|
7763
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7764
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7765
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7766
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7767
|
+
*
|
|
7768
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7769
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7770
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7771
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7772
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7773
|
+
*/
|
|
7774
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7775
|
+
/**
|
|
7776
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7777
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7778
|
+
* `objectClasses`.
|
|
7779
|
+
*
|
|
7780
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7781
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7782
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7783
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7784
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7785
|
+
*
|
|
7786
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7787
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7788
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7789
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7790
|
+
* registrare.
|
|
7791
|
+
*/
|
|
7792
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7688
7793
|
});
|
|
7689
7794
|
/**
|
|
7690
7795
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8136,41 +8241,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8136
8241
|
*/
|
|
8137
8242
|
debug: boolean().optional()
|
|
8138
8243
|
});
|
|
8139
|
-
var LabelDefinitionSchema = object({
|
|
8140
|
-
id: string(),
|
|
8141
|
-
name: string(),
|
|
8142
|
-
category: string().optional(),
|
|
8143
|
-
description: string().optional(),
|
|
8144
|
-
icon: string().optional()
|
|
8145
|
-
});
|
|
8146
|
-
/**
|
|
8147
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8148
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8149
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8150
|
-
* detection pipeline executor actually routes.
|
|
8151
|
-
*
|
|
8152
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8153
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8154
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8155
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8156
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8157
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8158
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8159
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8160
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8161
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8162
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8163
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8164
|
-
*/
|
|
8165
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8166
|
-
mapping: record(string(), _enum([
|
|
8167
|
-
"person",
|
|
8168
|
-
"vehicle",
|
|
8169
|
-
"animal",
|
|
8170
|
-
"package"
|
|
8171
|
-
])),
|
|
8172
|
-
preserveOriginal: boolean()
|
|
8173
|
-
});
|
|
8174
8244
|
var MODEL_FORMATS = [
|
|
8175
8245
|
"onnx",
|
|
8176
8246
|
"coreml",
|
|
@@ -20999,7 +21069,7 @@ var lifecycleJobSchema = object({
|
|
|
20999
21069
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21000
21070
|
* as every other cap.
|
|
21001
21071
|
*/
|
|
21002
|
-
var LogLevelSchema$
|
|
21072
|
+
var LogLevelSchema$2 = _enum([
|
|
21003
21073
|
"debug",
|
|
21004
21074
|
"info",
|
|
21005
21075
|
"warn",
|
|
@@ -21206,7 +21276,7 @@ var CustomActionInputSchema = object({
|
|
|
21206
21276
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21207
21277
|
addonId: string(),
|
|
21208
21278
|
limit: number().min(1).max(500).default(100),
|
|
21209
|
-
level: LogLevelSchema$
|
|
21279
|
+
level: LogLevelSchema$2.optional()
|
|
21210
21280
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21211
21281
|
packageName: string(),
|
|
21212
21282
|
version: string().optional()
|
|
@@ -21304,7 +21374,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21304
21374
|
auth: "admin"
|
|
21305
21375
|
}), method(object({
|
|
21306
21376
|
addonId: string(),
|
|
21307
|
-
level: LogLevelSchema$
|
|
21377
|
+
level: LogLevelSchema$2.optional()
|
|
21308
21378
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21309
21379
|
object({
|
|
21310
21380
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22298,6 +22368,35 @@ var FaceFilterEnum = _enum([
|
|
|
22298
22368
|
"identified",
|
|
22299
22369
|
"all"
|
|
22300
22370
|
]);
|
|
22371
|
+
/**
|
|
22372
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22373
|
+
*
|
|
22374
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22375
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22376
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22377
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22378
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
22379
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
22380
|
+
*
|
|
22381
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
22382
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
22383
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
22384
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
22385
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
22386
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
22387
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
22388
|
+
* backend's NULL-collation accident.
|
|
22389
|
+
*/
|
|
22390
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
22391
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
22392
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
22393
|
+
* never leaves the server. */
|
|
22394
|
+
var FaceClusterSchema = object({
|
|
22395
|
+
faceIds: array(string()).readonly(),
|
|
22396
|
+
representativeFaceId: string(),
|
|
22397
|
+
size: number().int(),
|
|
22398
|
+
cohesion: number()
|
|
22399
|
+
});
|
|
22301
22400
|
var MediaFileLiteSchema$1 = object({
|
|
22302
22401
|
key: string(),
|
|
22303
22402
|
kind: string(),
|
|
@@ -22344,24 +22443,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22344
22443
|
kind: "mutation",
|
|
22345
22444
|
auth: "admin"
|
|
22346
22445
|
}), method(object({
|
|
22347
|
-
/**
|
|
22446
|
+
/**
|
|
22447
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
22448
|
+
*
|
|
22449
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
22450
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
22451
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
22452
|
+
* present, and this field is then ignored rather than unioned, so
|
|
22453
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
22454
|
+
*/
|
|
22348
22455
|
deviceId: number().int().optional(),
|
|
22456
|
+
/**
|
|
22457
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
22458
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
22459
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
22460
|
+
* about to discard).
|
|
22461
|
+
*
|
|
22462
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
22463
|
+
* "every camera". A request for no devices is a request, not an
|
|
22464
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
22465
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
22466
|
+
*
|
|
22467
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
22468
|
+
*/
|
|
22469
|
+
deviceIds: array(number().int()).optional(),
|
|
22349
22470
|
limit: number().int().positive().optional(),
|
|
22350
22471
|
filter: FaceFilterEnum.optional(),
|
|
22351
22472
|
/**
|
|
22352
|
-
*
|
|
22353
|
-
*
|
|
22473
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22474
|
+
* Absent means no lower bound.
|
|
22475
|
+
*/
|
|
22476
|
+
since: number().int().optional(),
|
|
22477
|
+
/**
|
|
22478
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22479
|
+
* Absent means no upper bound.
|
|
22480
|
+
*/
|
|
22481
|
+
until: number().int().optional(),
|
|
22482
|
+
/**
|
|
22483
|
+
* Order the page by time or by suggestion certainty. Default
|
|
22484
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
22485
|
+
* that does not ask.
|
|
22354
22486
|
*
|
|
22355
|
-
*
|
|
22356
|
-
*
|
|
22357
|
-
* the browser cache the images.
|
|
22487
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
22488
|
+
* does under `'suggestionConfidence'`.
|
|
22358
22489
|
*
|
|
22359
|
-
*
|
|
22360
|
-
*
|
|
22361
|
-
*
|
|
22362
|
-
*
|
|
22363
|
-
*
|
|
22364
|
-
|
|
22490
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
22491
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
22492
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
22493
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
22494
|
+
* with {@link since} / {@link until}.
|
|
22495
|
+
*/
|
|
22496
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
22497
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
22498
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
22499
|
+
/**
|
|
22500
|
+
* Inline the base64 crop on every row.
|
|
22501
|
+
*
|
|
22502
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
22503
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
22504
|
+
* this for every gallery, and which records why the inline shape had
|
|
22505
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
22506
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
22507
|
+
* that describes the old design reads as permission to rely on it.
|
|
22508
|
+
*
|
|
22509
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
22510
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
22511
|
+
* cached and ETagged.
|
|
22365
22512
|
*/
|
|
22366
22513
|
includeCrops: boolean().optional()
|
|
22367
22514
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -22397,13 +22544,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22397
22544
|
}), method(object({
|
|
22398
22545
|
threshold: number().min(0).max(1).optional(),
|
|
22399
22546
|
minClusterSize: number().int().min(2).optional(),
|
|
22400
|
-
|
|
22401
|
-
|
|
22402
|
-
|
|
22403
|
-
|
|
22404
|
-
|
|
22405
|
-
|
|
22406
|
-
|
|
22547
|
+
/**
|
|
22548
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
22549
|
+
* which read as though it bounded the work — it never did.
|
|
22550
|
+
*
|
|
22551
|
+
* Wins over {@link limit} when both are sent.
|
|
22552
|
+
*/
|
|
22553
|
+
maxClusters: number().int().positive().optional(),
|
|
22554
|
+
/**
|
|
22555
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
22556
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
22557
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
22558
|
+
*/
|
|
22559
|
+
limit: number().int().positive().optional(),
|
|
22560
|
+
/**
|
|
22561
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
22562
|
+
* POOL, not the result.
|
|
22563
|
+
*
|
|
22564
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
22565
|
+
* used to read every unassigned face on the hub no matter what the
|
|
22566
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
22567
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
22568
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
22569
|
+
*
|
|
22570
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
22571
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
22572
|
+
* sample it randomly.
|
|
22573
|
+
*
|
|
22574
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
22575
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
22576
|
+
* unbounded scan can never come back as the table grows.
|
|
22577
|
+
*/
|
|
22578
|
+
maxFacesScanned: number().int().positive().optional()
|
|
22579
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
22407
22580
|
/**
|
|
22408
22581
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
22409
22582
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26126,6 +26299,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26126
26299
|
latitude: number().min(-90).max(90),
|
|
26127
26300
|
longitude: number().min(-180).max(180)
|
|
26128
26301
|
}).nullable();
|
|
26302
|
+
/**
|
|
26303
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26304
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26305
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26306
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26307
|
+
*/
|
|
26308
|
+
var RequestCensusGroupSchema = object({
|
|
26309
|
+
procedure: string(),
|
|
26310
|
+
userAgent: string(),
|
|
26311
|
+
ip: string(),
|
|
26312
|
+
principal: string(),
|
|
26313
|
+
calls: number(),
|
|
26314
|
+
perMin: number()
|
|
26315
|
+
});
|
|
26316
|
+
/**
|
|
26317
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26318
|
+
*
|
|
26319
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26320
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26321
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26322
|
+
*/
|
|
26323
|
+
var RequestCensusProcedureSchema = object({
|
|
26324
|
+
procedure: string(),
|
|
26325
|
+
calls: number(),
|
|
26326
|
+
perMin: number()
|
|
26327
|
+
});
|
|
26328
|
+
/**
|
|
26329
|
+
* The census as an operator sees it.
|
|
26330
|
+
*
|
|
26331
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26332
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26333
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26334
|
+
* like one that succeeded.
|
|
26335
|
+
*/
|
|
26336
|
+
var RequestCensusStatusSchema = object({
|
|
26337
|
+
armed: boolean(),
|
|
26338
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26339
|
+
elapsedMs: number(),
|
|
26340
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26341
|
+
windowMs: number(),
|
|
26342
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26343
|
+
armedUntilMs: number(),
|
|
26344
|
+
httpRequests: number(),
|
|
26345
|
+
batchedRequests: number(),
|
|
26346
|
+
/**
|
|
26347
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
26348
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
26349
|
+
* the number comparable with a store-side call count.
|
|
26350
|
+
*/
|
|
26351
|
+
procedureCalls: number(),
|
|
26352
|
+
/**
|
|
26353
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26354
|
+
* transport resolves one context per connection - but the number that says
|
|
26355
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
26356
|
+
*/
|
|
26357
|
+
wsConnections: number(),
|
|
26358
|
+
distinctGroups: number(),
|
|
26359
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
26360
|
+
* cardinality bound. */
|
|
26361
|
+
unattributedCalls: number(),
|
|
26362
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26363
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
26364
|
+
}).extend({ persisted: boolean() });
|
|
26365
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
26366
|
+
var LogLevelSchema$1 = _enum([
|
|
26367
|
+
"debug",
|
|
26368
|
+
"info",
|
|
26369
|
+
"warn",
|
|
26370
|
+
"error"
|
|
26371
|
+
]);
|
|
26372
|
+
/**
|
|
26373
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
26374
|
+
*
|
|
26375
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
26376
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
26377
|
+
*/
|
|
26378
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
26379
|
+
/**
|
|
26380
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
26381
|
+
* layer that carries an explicit value wins.
|
|
26382
|
+
*
|
|
26383
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
26384
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
26385
|
+
* grow later would force every consumer of this document to change with it.
|
|
26386
|
+
* Nothing returns `component` today.
|
|
26387
|
+
*/
|
|
26388
|
+
var LoggingScopeKindSchema = _enum([
|
|
26389
|
+
"cluster",
|
|
26390
|
+
"node",
|
|
26391
|
+
"component"
|
|
26392
|
+
]);
|
|
26393
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
26394
|
+
var LoggingLevelSourceSchema = _enum([
|
|
26395
|
+
"default",
|
|
26396
|
+
"cluster",
|
|
26397
|
+
"node",
|
|
26398
|
+
"component"
|
|
26399
|
+
]);
|
|
26400
|
+
/**
|
|
26401
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
26402
|
+
*
|
|
26403
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
26404
|
+
* difference between "this node is at `info` because I decided it" and
|
|
26405
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
26406
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
26407
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
26408
|
+
*/
|
|
26409
|
+
var LoggingLevelLayerSchema = object({
|
|
26410
|
+
scope: LoggingScopeKindSchema,
|
|
26411
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26412
|
+
nodeId: string().nullable(),
|
|
26413
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26414
|
+
level: LogLevelSchema$1.nullable()
|
|
26415
|
+
});
|
|
26416
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
26417
|
+
var LoggingEffectiveSchema = object({
|
|
26418
|
+
level: LogLevelSchema$1,
|
|
26419
|
+
levelSource: LoggingLevelSourceSchema
|
|
26420
|
+
});
|
|
26421
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
26422
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
26423
|
+
/**
|
|
26424
|
+
* An armed diagnostic, with its DEADLINE.
|
|
26425
|
+
*
|
|
26426
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
26427
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
26428
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
26429
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
26430
|
+
*/
|
|
26431
|
+
var DiagnosticWindowSchema = object({
|
|
26432
|
+
id: DiagnosticIdSchema,
|
|
26433
|
+
armed: boolean(),
|
|
26434
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26435
|
+
armedUntilMs: number(),
|
|
26436
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26437
|
+
remainingMs: number(),
|
|
26438
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
26439
|
+
* i.e. whether this window would survive a restart. */
|
|
26440
|
+
persisted: boolean()
|
|
26441
|
+
});
|
|
26442
|
+
/**
|
|
26443
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
26444
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
26445
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
26446
|
+
*/
|
|
26447
|
+
var DiagnosticWindowPatchSchema = object({
|
|
26448
|
+
id: DiagnosticIdSchema,
|
|
26449
|
+
armMs: number().int().min(0),
|
|
26450
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
26451
|
+
reportEveryMs: number().int().positive().optional()
|
|
26452
|
+
});
|
|
26453
|
+
/**
|
|
26454
|
+
* A PATCH, and patches MERGE.
|
|
26455
|
+
*
|
|
26456
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
26457
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
26458
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
26459
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
26460
|
+
* turns into an erased one.
|
|
26461
|
+
*/
|
|
26462
|
+
var LoggingSettingsPatchSchema = object({
|
|
26463
|
+
/**
|
|
26464
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
26465
|
+
* addressed scope so it inherits again. A value sets it.
|
|
26466
|
+
*/
|
|
26467
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
26468
|
+
/**
|
|
26469
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26470
|
+
* keeps running — a patch is never a full replacement.
|
|
26471
|
+
*/
|
|
26472
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26473
|
+
});
|
|
26474
|
+
/**
|
|
26475
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
26476
|
+
*
|
|
26477
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
26478
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
26479
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
26480
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
26481
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
26482
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
26483
|
+
* layer selector needs a name the transport does not already own.
|
|
26484
|
+
*/
|
|
26485
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
26486
|
+
var SetLoggingSettingsInputSchema = object({
|
|
26487
|
+
scopeNodeId: string().optional(),
|
|
26488
|
+
patch: LoggingSettingsPatchSchema
|
|
26489
|
+
});
|
|
26490
|
+
/**
|
|
26491
|
+
* The whole document, as read and as returned after every write.
|
|
26492
|
+
*
|
|
26493
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
26494
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
26495
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
26496
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
26497
|
+
* survive a restart.
|
|
26498
|
+
*/
|
|
26499
|
+
var LoggingSettingsStateSchema = object({
|
|
26500
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26501
|
+
scopeNodeId: string().nullable(),
|
|
26502
|
+
effective: LoggingEffectiveSchema,
|
|
26503
|
+
explicit: LoggingExplicitSchema,
|
|
26504
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26505
|
+
persisted: boolean()
|
|
26506
|
+
});
|
|
26129
26507
|
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(), {
|
|
26130
26508
|
kind: "mutation",
|
|
26131
26509
|
auth: "admin"
|
|
@@ -26138,6 +26516,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26138
26516
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26139
26517
|
kind: "mutation",
|
|
26140
26518
|
auth: "admin"
|
|
26519
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
26520
|
+
kind: "mutation",
|
|
26521
|
+
auth: "admin"
|
|
26141
26522
|
});
|
|
26142
26523
|
object({
|
|
26143
26524
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -31969,6 +32350,18 @@ Object.freeze({
|
|
|
31969
32350
|
addonId: null,
|
|
31970
32351
|
access: "create"
|
|
31971
32352
|
},
|
|
32353
|
+
"system.getLoggingSettings": {
|
|
32354
|
+
capName: "system",
|
|
32355
|
+
capScope: "system",
|
|
32356
|
+
addonId: null,
|
|
32357
|
+
access: "view"
|
|
32358
|
+
},
|
|
32359
|
+
"system.getRequestCensus": {
|
|
32360
|
+
capName: "system",
|
|
32361
|
+
capScope: "system",
|
|
32362
|
+
addonId: null,
|
|
32363
|
+
access: "view"
|
|
32364
|
+
},
|
|
31972
32365
|
"system.getRetentionConfig": {
|
|
31973
32366
|
capName: "system",
|
|
31974
32367
|
capScope: "system",
|
|
@@ -31999,6 +32392,12 @@ Object.freeze({
|
|
|
31999
32392
|
addonId: null,
|
|
32000
32393
|
access: "view"
|
|
32001
32394
|
},
|
|
32395
|
+
"system.setLoggingSettings": {
|
|
32396
|
+
capName: "system",
|
|
32397
|
+
capScope: "system",
|
|
32398
|
+
addonId: null,
|
|
32399
|
+
access: "create"
|
|
32400
|
+
},
|
|
32002
32401
|
"system.setRetentionConfig": {
|
|
32003
32402
|
capName: "system",
|
|
32004
32403
|
capScope: "system",
|
|
@@ -33154,6 +33553,10 @@ Object.freeze({
|
|
|
33154
33553
|
name: "deviceId",
|
|
33155
33554
|
form: "single",
|
|
33156
33555
|
optional: true
|
|
33556
|
+
}, {
|
|
33557
|
+
name: "deviceIds",
|
|
33558
|
+
form: "array",
|
|
33559
|
+
optional: true
|
|
33157
33560
|
}],
|
|
33158
33561
|
"fanControl.setDirection": [{
|
|
33159
33562
|
name: "deviceId",
|
|
@@ -34971,7 +35374,38 @@ object({
|
|
|
34971
35374
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34972
35375
|
* reproduce that.
|
|
34973
35376
|
*/
|
|
34974
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
35377
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
35378
|
+
/**
|
|
35379
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35380
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35381
|
+
* subject tiles, on frames that detected something.
|
|
35382
|
+
*
|
|
35383
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35384
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35385
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35386
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35387
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35388
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35389
|
+
*
|
|
35390
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35391
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35392
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35393
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35394
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35395
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35396
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35397
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35398
|
+
* whole shape exists to avoid.
|
|
35399
|
+
*
|
|
35400
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35401
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35402
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35403
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35404
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35405
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35406
|
+
* nothing.
|
|
35407
|
+
*/
|
|
35408
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
34975
35409
|
});
|
|
34976
35410
|
/**
|
|
34977
35411
|
* The values in force when the operator has set nothing.
|
|
@@ -34987,12 +35421,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
34987
35421
|
budgetMb: 1024,
|
|
34988
35422
|
activityMs: 15e3,
|
|
34989
35423
|
tileBudgetMb: 64,
|
|
35424
|
+
sceneBudgetMb: 48,
|
|
34990
35425
|
admission: "inferred"
|
|
34991
35426
|
};
|
|
34992
35427
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34993
35428
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34994
35429
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34995
35430
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35431
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
34996
35432
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34997
35433
|
var MB = 1024 * 1024;
|
|
34998
35434
|
1024 * MB, 3072 * MB;
|
package/dist/addon.mjs
CHANGED
|
@@ -7632,6 +7632,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7632
7632
|
/** Max rows returned, newest-first. */
|
|
7633
7633
|
limit: number().int().min(1).max(1e3).optional()
|
|
7634
7634
|
});
|
|
7635
|
+
var LabelDefinitionSchema = object({
|
|
7636
|
+
id: string(),
|
|
7637
|
+
name: string(),
|
|
7638
|
+
category: string().optional(),
|
|
7639
|
+
description: string().optional(),
|
|
7640
|
+
icon: string().optional()
|
|
7641
|
+
});
|
|
7642
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7643
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7644
|
+
"person",
|
|
7645
|
+
"vehicle",
|
|
7646
|
+
"animal",
|
|
7647
|
+
"package"
|
|
7648
|
+
];
|
|
7649
|
+
/**
|
|
7650
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7651
|
+
* un operatore può selezionare.
|
|
7652
|
+
*
|
|
7653
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7654
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7655
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7656
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7657
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7658
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7659
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7660
|
+
*
|
|
7661
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7662
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7663
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7664
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7665
|
+
* successiva.
|
|
7666
|
+
*/
|
|
7667
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7668
|
+
"person",
|
|
7669
|
+
"vehicle",
|
|
7670
|
+
"animal"
|
|
7671
|
+
];
|
|
7672
|
+
/**
|
|
7673
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7674
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7675
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7676
|
+
* detection pipeline executor actually routes.
|
|
7677
|
+
*
|
|
7678
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7679
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7680
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7681
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7682
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7683
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7684
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7685
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7686
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7687
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7688
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7689
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7690
|
+
*/
|
|
7691
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7692
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7693
|
+
preserveOriginal: boolean()
|
|
7694
|
+
});
|
|
7635
7695
|
/**
|
|
7636
7696
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7637
7697
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7654,10 +7714,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7654
7714
|
"events",
|
|
7655
7715
|
"continuous"
|
|
7656
7716
|
]);
|
|
7717
|
+
/**
|
|
7718
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7719
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7720
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7721
|
+
*/
|
|
7722
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7723
|
+
/**
|
|
7724
|
+
* True quando `values` non ripete un elemento.
|
|
7725
|
+
*
|
|
7726
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7727
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7728
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7729
|
+
*/
|
|
7730
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7657
7731
|
/** Which detectors trigger an `events`-mode band. */
|
|
7658
7732
|
var RecordingTriggersSchema = object({
|
|
7659
7733
|
motion: boolean().optional(),
|
|
7660
|
-
audioThresholdDbfs: number().optional()
|
|
7734
|
+
audioThresholdDbfs: number().optional(),
|
|
7735
|
+
/**
|
|
7736
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7737
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7738
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7739
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7740
|
+
*
|
|
7741
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7742
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7743
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7744
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7745
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7746
|
+
*/
|
|
7747
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7748
|
+
/**
|
|
7749
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7750
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7751
|
+
* `objectClasses`.
|
|
7752
|
+
*
|
|
7753
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7754
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7755
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7756
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7757
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7758
|
+
*
|
|
7759
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7760
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7761
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7762
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7763
|
+
* registrare.
|
|
7764
|
+
*/
|
|
7765
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7661
7766
|
});
|
|
7662
7767
|
/**
|
|
7663
7768
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8109,41 +8214,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8109
8214
|
*/
|
|
8110
8215
|
debug: boolean().optional()
|
|
8111
8216
|
});
|
|
8112
|
-
var LabelDefinitionSchema = object({
|
|
8113
|
-
id: string(),
|
|
8114
|
-
name: string(),
|
|
8115
|
-
category: string().optional(),
|
|
8116
|
-
description: string().optional(),
|
|
8117
|
-
icon: string().optional()
|
|
8118
|
-
});
|
|
8119
|
-
/**
|
|
8120
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8121
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8122
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8123
|
-
* detection pipeline executor actually routes.
|
|
8124
|
-
*
|
|
8125
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8126
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8127
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8128
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8129
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8130
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8131
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8132
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8133
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8134
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8135
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8136
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8137
|
-
*/
|
|
8138
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8139
|
-
mapping: record(string(), _enum([
|
|
8140
|
-
"person",
|
|
8141
|
-
"vehicle",
|
|
8142
|
-
"animal",
|
|
8143
|
-
"package"
|
|
8144
|
-
])),
|
|
8145
|
-
preserveOriginal: boolean()
|
|
8146
|
-
});
|
|
8147
8217
|
var MODEL_FORMATS = [
|
|
8148
8218
|
"onnx",
|
|
8149
8219
|
"coreml",
|
|
@@ -20972,7 +21042,7 @@ var lifecycleJobSchema = object({
|
|
|
20972
21042
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
20973
21043
|
* as every other cap.
|
|
20974
21044
|
*/
|
|
20975
|
-
var LogLevelSchema$
|
|
21045
|
+
var LogLevelSchema$2 = _enum([
|
|
20976
21046
|
"debug",
|
|
20977
21047
|
"info",
|
|
20978
21048
|
"warn",
|
|
@@ -21179,7 +21249,7 @@ var CustomActionInputSchema = object({
|
|
|
21179
21249
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21180
21250
|
addonId: string(),
|
|
21181
21251
|
limit: number().min(1).max(500).default(100),
|
|
21182
|
-
level: LogLevelSchema$
|
|
21252
|
+
level: LogLevelSchema$2.optional()
|
|
21183
21253
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21184
21254
|
packageName: string(),
|
|
21185
21255
|
version: string().optional()
|
|
@@ -21277,7 +21347,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21277
21347
|
auth: "admin"
|
|
21278
21348
|
}), method(object({
|
|
21279
21349
|
addonId: string(),
|
|
21280
|
-
level: LogLevelSchema$
|
|
21350
|
+
level: LogLevelSchema$2.optional()
|
|
21281
21351
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21282
21352
|
object({
|
|
21283
21353
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22271,6 +22341,35 @@ var FaceFilterEnum = _enum([
|
|
|
22271
22341
|
"identified",
|
|
22272
22342
|
"all"
|
|
22273
22343
|
]);
|
|
22344
|
+
/**
|
|
22345
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22346
|
+
*
|
|
22347
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22348
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22349
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22350
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22351
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
22352
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
22353
|
+
*
|
|
22354
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
22355
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
22356
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
22357
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
22358
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
22359
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
22360
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
22361
|
+
* backend's NULL-collation accident.
|
|
22362
|
+
*/
|
|
22363
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
22364
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
22365
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
22366
|
+
* never leaves the server. */
|
|
22367
|
+
var FaceClusterSchema = object({
|
|
22368
|
+
faceIds: array(string()).readonly(),
|
|
22369
|
+
representativeFaceId: string(),
|
|
22370
|
+
size: number().int(),
|
|
22371
|
+
cohesion: number()
|
|
22372
|
+
});
|
|
22274
22373
|
var MediaFileLiteSchema$1 = object({
|
|
22275
22374
|
key: string(),
|
|
22276
22375
|
kind: string(),
|
|
@@ -22317,24 +22416,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22317
22416
|
kind: "mutation",
|
|
22318
22417
|
auth: "admin"
|
|
22319
22418
|
}), method(object({
|
|
22320
|
-
/**
|
|
22419
|
+
/**
|
|
22420
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
22421
|
+
*
|
|
22422
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
22423
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
22424
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
22425
|
+
* present, and this field is then ignored rather than unioned, so
|
|
22426
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
22427
|
+
*/
|
|
22321
22428
|
deviceId: number().int().optional(),
|
|
22429
|
+
/**
|
|
22430
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
22431
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
22432
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
22433
|
+
* about to discard).
|
|
22434
|
+
*
|
|
22435
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
22436
|
+
* "every camera". A request for no devices is a request, not an
|
|
22437
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
22438
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
22439
|
+
*
|
|
22440
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
22441
|
+
*/
|
|
22442
|
+
deviceIds: array(number().int()).optional(),
|
|
22322
22443
|
limit: number().int().positive().optional(),
|
|
22323
22444
|
filter: FaceFilterEnum.optional(),
|
|
22324
22445
|
/**
|
|
22325
|
-
*
|
|
22326
|
-
*
|
|
22446
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22447
|
+
* Absent means no lower bound.
|
|
22448
|
+
*/
|
|
22449
|
+
since: number().int().optional(),
|
|
22450
|
+
/**
|
|
22451
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22452
|
+
* Absent means no upper bound.
|
|
22453
|
+
*/
|
|
22454
|
+
until: number().int().optional(),
|
|
22455
|
+
/**
|
|
22456
|
+
* Order the page by time or by suggestion certainty. Default
|
|
22457
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
22458
|
+
* that does not ask.
|
|
22327
22459
|
*
|
|
22328
|
-
*
|
|
22329
|
-
*
|
|
22330
|
-
* the browser cache the images.
|
|
22460
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
22461
|
+
* does under `'suggestionConfidence'`.
|
|
22331
22462
|
*
|
|
22332
|
-
*
|
|
22333
|
-
*
|
|
22334
|
-
*
|
|
22335
|
-
*
|
|
22336
|
-
*
|
|
22337
|
-
|
|
22463
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
22464
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
22465
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
22466
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
22467
|
+
* with {@link since} / {@link until}.
|
|
22468
|
+
*/
|
|
22469
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
22470
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
22471
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
22472
|
+
/**
|
|
22473
|
+
* Inline the base64 crop on every row.
|
|
22474
|
+
*
|
|
22475
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
22476
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
22477
|
+
* this for every gallery, and which records why the inline shape had
|
|
22478
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
22479
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
22480
|
+
* that describes the old design reads as permission to rely on it.
|
|
22481
|
+
*
|
|
22482
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
22483
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
22484
|
+
* cached and ETagged.
|
|
22338
22485
|
*/
|
|
22339
22486
|
includeCrops: boolean().optional()
|
|
22340
22487
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -22370,13 +22517,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22370
22517
|
}), method(object({
|
|
22371
22518
|
threshold: number().min(0).max(1).optional(),
|
|
22372
22519
|
minClusterSize: number().int().min(2).optional(),
|
|
22373
|
-
|
|
22374
|
-
|
|
22375
|
-
|
|
22376
|
-
|
|
22377
|
-
|
|
22378
|
-
|
|
22379
|
-
|
|
22520
|
+
/**
|
|
22521
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
22522
|
+
* which read as though it bounded the work — it never did.
|
|
22523
|
+
*
|
|
22524
|
+
* Wins over {@link limit} when both are sent.
|
|
22525
|
+
*/
|
|
22526
|
+
maxClusters: number().int().positive().optional(),
|
|
22527
|
+
/**
|
|
22528
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
22529
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
22530
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
22531
|
+
*/
|
|
22532
|
+
limit: number().int().positive().optional(),
|
|
22533
|
+
/**
|
|
22534
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
22535
|
+
* POOL, not the result.
|
|
22536
|
+
*
|
|
22537
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
22538
|
+
* used to read every unassigned face on the hub no matter what the
|
|
22539
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
22540
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
22541
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
22542
|
+
*
|
|
22543
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
22544
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
22545
|
+
* sample it randomly.
|
|
22546
|
+
*
|
|
22547
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
22548
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
22549
|
+
* unbounded scan can never come back as the table grows.
|
|
22550
|
+
*/
|
|
22551
|
+
maxFacesScanned: number().int().positive().optional()
|
|
22552
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
22380
22553
|
/**
|
|
22381
22554
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
22382
22555
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26099,6 +26272,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26099
26272
|
latitude: number().min(-90).max(90),
|
|
26100
26273
|
longitude: number().min(-180).max(180)
|
|
26101
26274
|
}).nullable();
|
|
26275
|
+
/**
|
|
26276
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26277
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26278
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26279
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26280
|
+
*/
|
|
26281
|
+
var RequestCensusGroupSchema = object({
|
|
26282
|
+
procedure: string(),
|
|
26283
|
+
userAgent: string(),
|
|
26284
|
+
ip: string(),
|
|
26285
|
+
principal: string(),
|
|
26286
|
+
calls: number(),
|
|
26287
|
+
perMin: number()
|
|
26288
|
+
});
|
|
26289
|
+
/**
|
|
26290
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26291
|
+
*
|
|
26292
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26293
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26294
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26295
|
+
*/
|
|
26296
|
+
var RequestCensusProcedureSchema = object({
|
|
26297
|
+
procedure: string(),
|
|
26298
|
+
calls: number(),
|
|
26299
|
+
perMin: number()
|
|
26300
|
+
});
|
|
26301
|
+
/**
|
|
26302
|
+
* The census as an operator sees it.
|
|
26303
|
+
*
|
|
26304
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26305
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26306
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26307
|
+
* like one that succeeded.
|
|
26308
|
+
*/
|
|
26309
|
+
var RequestCensusStatusSchema = object({
|
|
26310
|
+
armed: boolean(),
|
|
26311
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26312
|
+
elapsedMs: number(),
|
|
26313
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26314
|
+
windowMs: number(),
|
|
26315
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26316
|
+
armedUntilMs: number(),
|
|
26317
|
+
httpRequests: number(),
|
|
26318
|
+
batchedRequests: number(),
|
|
26319
|
+
/**
|
|
26320
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
26321
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
26322
|
+
* the number comparable with a store-side call count.
|
|
26323
|
+
*/
|
|
26324
|
+
procedureCalls: number(),
|
|
26325
|
+
/**
|
|
26326
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26327
|
+
* transport resolves one context per connection - but the number that says
|
|
26328
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
26329
|
+
*/
|
|
26330
|
+
wsConnections: number(),
|
|
26331
|
+
distinctGroups: number(),
|
|
26332
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
26333
|
+
* cardinality bound. */
|
|
26334
|
+
unattributedCalls: number(),
|
|
26335
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26336
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
26337
|
+
}).extend({ persisted: boolean() });
|
|
26338
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
26339
|
+
var LogLevelSchema$1 = _enum([
|
|
26340
|
+
"debug",
|
|
26341
|
+
"info",
|
|
26342
|
+
"warn",
|
|
26343
|
+
"error"
|
|
26344
|
+
]);
|
|
26345
|
+
/**
|
|
26346
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
26347
|
+
*
|
|
26348
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
26349
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
26350
|
+
*/
|
|
26351
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
26352
|
+
/**
|
|
26353
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
26354
|
+
* layer that carries an explicit value wins.
|
|
26355
|
+
*
|
|
26356
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
26357
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
26358
|
+
* grow later would force every consumer of this document to change with it.
|
|
26359
|
+
* Nothing returns `component` today.
|
|
26360
|
+
*/
|
|
26361
|
+
var LoggingScopeKindSchema = _enum([
|
|
26362
|
+
"cluster",
|
|
26363
|
+
"node",
|
|
26364
|
+
"component"
|
|
26365
|
+
]);
|
|
26366
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
26367
|
+
var LoggingLevelSourceSchema = _enum([
|
|
26368
|
+
"default",
|
|
26369
|
+
"cluster",
|
|
26370
|
+
"node",
|
|
26371
|
+
"component"
|
|
26372
|
+
]);
|
|
26373
|
+
/**
|
|
26374
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
26375
|
+
*
|
|
26376
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
26377
|
+
* difference between "this node is at `info` because I decided it" and
|
|
26378
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
26379
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
26380
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
26381
|
+
*/
|
|
26382
|
+
var LoggingLevelLayerSchema = object({
|
|
26383
|
+
scope: LoggingScopeKindSchema,
|
|
26384
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26385
|
+
nodeId: string().nullable(),
|
|
26386
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26387
|
+
level: LogLevelSchema$1.nullable()
|
|
26388
|
+
});
|
|
26389
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
26390
|
+
var LoggingEffectiveSchema = object({
|
|
26391
|
+
level: LogLevelSchema$1,
|
|
26392
|
+
levelSource: LoggingLevelSourceSchema
|
|
26393
|
+
});
|
|
26394
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
26395
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
26396
|
+
/**
|
|
26397
|
+
* An armed diagnostic, with its DEADLINE.
|
|
26398
|
+
*
|
|
26399
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
26400
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
26401
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
26402
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
26403
|
+
*/
|
|
26404
|
+
var DiagnosticWindowSchema = object({
|
|
26405
|
+
id: DiagnosticIdSchema,
|
|
26406
|
+
armed: boolean(),
|
|
26407
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26408
|
+
armedUntilMs: number(),
|
|
26409
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26410
|
+
remainingMs: number(),
|
|
26411
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
26412
|
+
* i.e. whether this window would survive a restart. */
|
|
26413
|
+
persisted: boolean()
|
|
26414
|
+
});
|
|
26415
|
+
/**
|
|
26416
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
26417
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
26418
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
26419
|
+
*/
|
|
26420
|
+
var DiagnosticWindowPatchSchema = object({
|
|
26421
|
+
id: DiagnosticIdSchema,
|
|
26422
|
+
armMs: number().int().min(0),
|
|
26423
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
26424
|
+
reportEveryMs: number().int().positive().optional()
|
|
26425
|
+
});
|
|
26426
|
+
/**
|
|
26427
|
+
* A PATCH, and patches MERGE.
|
|
26428
|
+
*
|
|
26429
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
26430
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
26431
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
26432
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
26433
|
+
* turns into an erased one.
|
|
26434
|
+
*/
|
|
26435
|
+
var LoggingSettingsPatchSchema = object({
|
|
26436
|
+
/**
|
|
26437
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
26438
|
+
* addressed scope so it inherits again. A value sets it.
|
|
26439
|
+
*/
|
|
26440
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
26441
|
+
/**
|
|
26442
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26443
|
+
* keeps running — a patch is never a full replacement.
|
|
26444
|
+
*/
|
|
26445
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26446
|
+
});
|
|
26447
|
+
/**
|
|
26448
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
26449
|
+
*
|
|
26450
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
26451
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
26452
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
26453
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
26454
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
26455
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
26456
|
+
* layer selector needs a name the transport does not already own.
|
|
26457
|
+
*/
|
|
26458
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
26459
|
+
var SetLoggingSettingsInputSchema = object({
|
|
26460
|
+
scopeNodeId: string().optional(),
|
|
26461
|
+
patch: LoggingSettingsPatchSchema
|
|
26462
|
+
});
|
|
26463
|
+
/**
|
|
26464
|
+
* The whole document, as read and as returned after every write.
|
|
26465
|
+
*
|
|
26466
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
26467
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
26468
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
26469
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
26470
|
+
* survive a restart.
|
|
26471
|
+
*/
|
|
26472
|
+
var LoggingSettingsStateSchema = object({
|
|
26473
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26474
|
+
scopeNodeId: string().nullable(),
|
|
26475
|
+
effective: LoggingEffectiveSchema,
|
|
26476
|
+
explicit: LoggingExplicitSchema,
|
|
26477
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26478
|
+
persisted: boolean()
|
|
26479
|
+
});
|
|
26102
26480
|
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(), {
|
|
26103
26481
|
kind: "mutation",
|
|
26104
26482
|
auth: "admin"
|
|
@@ -26111,6 +26489,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26111
26489
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26112
26490
|
kind: "mutation",
|
|
26113
26491
|
auth: "admin"
|
|
26492
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
26493
|
+
kind: "mutation",
|
|
26494
|
+
auth: "admin"
|
|
26114
26495
|
});
|
|
26115
26496
|
object({
|
|
26116
26497
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -31942,6 +32323,18 @@ Object.freeze({
|
|
|
31942
32323
|
addonId: null,
|
|
31943
32324
|
access: "create"
|
|
31944
32325
|
},
|
|
32326
|
+
"system.getLoggingSettings": {
|
|
32327
|
+
capName: "system",
|
|
32328
|
+
capScope: "system",
|
|
32329
|
+
addonId: null,
|
|
32330
|
+
access: "view"
|
|
32331
|
+
},
|
|
32332
|
+
"system.getRequestCensus": {
|
|
32333
|
+
capName: "system",
|
|
32334
|
+
capScope: "system",
|
|
32335
|
+
addonId: null,
|
|
32336
|
+
access: "view"
|
|
32337
|
+
},
|
|
31945
32338
|
"system.getRetentionConfig": {
|
|
31946
32339
|
capName: "system",
|
|
31947
32340
|
capScope: "system",
|
|
@@ -31972,6 +32365,12 @@ Object.freeze({
|
|
|
31972
32365
|
addonId: null,
|
|
31973
32366
|
access: "view"
|
|
31974
32367
|
},
|
|
32368
|
+
"system.setLoggingSettings": {
|
|
32369
|
+
capName: "system",
|
|
32370
|
+
capScope: "system",
|
|
32371
|
+
addonId: null,
|
|
32372
|
+
access: "create"
|
|
32373
|
+
},
|
|
31975
32374
|
"system.setRetentionConfig": {
|
|
31976
32375
|
capName: "system",
|
|
31977
32376
|
capScope: "system",
|
|
@@ -33127,6 +33526,10 @@ Object.freeze({
|
|
|
33127
33526
|
name: "deviceId",
|
|
33128
33527
|
form: "single",
|
|
33129
33528
|
optional: true
|
|
33529
|
+
}, {
|
|
33530
|
+
name: "deviceIds",
|
|
33531
|
+
form: "array",
|
|
33532
|
+
optional: true
|
|
33130
33533
|
}],
|
|
33131
33534
|
"fanControl.setDirection": [{
|
|
33132
33535
|
name: "deviceId",
|
|
@@ -34944,7 +35347,38 @@ object({
|
|
|
34944
35347
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34945
35348
|
* reproduce that.
|
|
34946
35349
|
*/
|
|
34947
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
35350
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
35351
|
+
/**
|
|
35352
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35353
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35354
|
+
* subject tiles, on frames that detected something.
|
|
35355
|
+
*
|
|
35356
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35357
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35358
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35359
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35360
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35361
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35362
|
+
*
|
|
35363
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35364
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35365
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35366
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35367
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35368
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35369
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35370
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35371
|
+
* whole shape exists to avoid.
|
|
35372
|
+
*
|
|
35373
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35374
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35375
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35376
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35377
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35378
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35379
|
+
* nothing.
|
|
35380
|
+
*/
|
|
35381
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
34948
35382
|
});
|
|
34949
35383
|
/**
|
|
34950
35384
|
* The values in force when the operator has set nothing.
|
|
@@ -34960,12 +35394,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
34960
35394
|
budgetMb: 1024,
|
|
34961
35395
|
activityMs: 15e3,
|
|
34962
35396
|
tileBudgetMb: 64,
|
|
35397
|
+
sceneBudgetMb: 48,
|
|
34963
35398
|
admission: "inferred"
|
|
34964
35399
|
};
|
|
34965
35400
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34966
35401
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34967
35402
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34968
35403
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35404
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
34969
35405
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34970
35406
|
var MB = 1024 * 1024;
|
|
34971
35407
|
1024 * MB, 3072 * MB;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-notifiers",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.36",
|
|
4
4
|
"description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|