@camstack/addon-ai 0.4.24 → 0.4.25
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
|
@@ -7732,6 +7732,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7732
7732
|
/** Max rows returned, newest-first. */
|
|
7733
7733
|
limit: number$1().int().min(1).max(1e3).optional()
|
|
7734
7734
|
});
|
|
7735
|
+
var LabelDefinitionSchema = object({
|
|
7736
|
+
id: string(),
|
|
7737
|
+
name: string(),
|
|
7738
|
+
category: string().optional(),
|
|
7739
|
+
description: string().optional(),
|
|
7740
|
+
icon: string().optional()
|
|
7741
|
+
});
|
|
7742
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7743
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7744
|
+
"person",
|
|
7745
|
+
"vehicle",
|
|
7746
|
+
"animal",
|
|
7747
|
+
"package"
|
|
7748
|
+
];
|
|
7749
|
+
/**
|
|
7750
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7751
|
+
* un operatore può selezionare.
|
|
7752
|
+
*
|
|
7753
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7754
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7755
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7756
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7757
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7758
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7759
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7760
|
+
*
|
|
7761
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7762
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7763
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7764
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7765
|
+
* successiva.
|
|
7766
|
+
*/
|
|
7767
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7768
|
+
"person",
|
|
7769
|
+
"vehicle",
|
|
7770
|
+
"animal"
|
|
7771
|
+
];
|
|
7772
|
+
/**
|
|
7773
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7774
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7775
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7776
|
+
* detection pipeline executor actually routes.
|
|
7777
|
+
*
|
|
7778
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7779
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7780
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7781
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7782
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7783
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7784
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7785
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7786
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7787
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7788
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7789
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7790
|
+
*/
|
|
7791
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7792
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7793
|
+
preserveOriginal: boolean()
|
|
7794
|
+
});
|
|
7735
7795
|
/**
|
|
7736
7796
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7737
7797
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7754,10 +7814,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7754
7814
|
"events",
|
|
7755
7815
|
"continuous"
|
|
7756
7816
|
]);
|
|
7817
|
+
/**
|
|
7818
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7819
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7820
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7821
|
+
*/
|
|
7822
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7823
|
+
/**
|
|
7824
|
+
* True quando `values` non ripete un elemento.
|
|
7825
|
+
*
|
|
7826
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7827
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7828
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7829
|
+
*/
|
|
7830
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7757
7831
|
/** Which detectors trigger an `events`-mode band. */
|
|
7758
7832
|
var RecordingTriggersSchema = object({
|
|
7759
7833
|
motion: boolean().optional(),
|
|
7760
|
-
audioThresholdDbfs: number$1().optional()
|
|
7834
|
+
audioThresholdDbfs: number$1().optional(),
|
|
7835
|
+
/**
|
|
7836
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7837
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7838
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7839
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7840
|
+
*
|
|
7841
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7842
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7843
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7844
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7845
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7846
|
+
*/
|
|
7847
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7848
|
+
/**
|
|
7849
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7850
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7851
|
+
* `objectClasses`.
|
|
7852
|
+
*
|
|
7853
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7854
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7855
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7856
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7857
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7858
|
+
*
|
|
7859
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7860
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7861
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7862
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7863
|
+
* registrare.
|
|
7864
|
+
*/
|
|
7865
|
+
sensorDeviceIds: array(number$1().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7761
7866
|
});
|
|
7762
7867
|
/**
|
|
7763
7868
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8209,41 +8314,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8209
8314
|
*/
|
|
8210
8315
|
debug: boolean().optional()
|
|
8211
8316
|
});
|
|
8212
|
-
var LabelDefinitionSchema = object({
|
|
8213
|
-
id: string(),
|
|
8214
|
-
name: string(),
|
|
8215
|
-
category: string().optional(),
|
|
8216
|
-
description: string().optional(),
|
|
8217
|
-
icon: string().optional()
|
|
8218
|
-
});
|
|
8219
|
-
/**
|
|
8220
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8221
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8222
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8223
|
-
* detection pipeline executor actually routes.
|
|
8224
|
-
*
|
|
8225
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8226
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8227
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8228
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8229
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8230
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8231
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8232
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8233
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8234
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8235
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8236
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8237
|
-
*/
|
|
8238
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8239
|
-
mapping: record(string(), _enum([
|
|
8240
|
-
"person",
|
|
8241
|
-
"vehicle",
|
|
8242
|
-
"animal",
|
|
8243
|
-
"package"
|
|
8244
|
-
])),
|
|
8245
|
-
preserveOriginal: boolean()
|
|
8246
|
-
});
|
|
8247
8317
|
var MODEL_FORMATS = [
|
|
8248
8318
|
"onnx",
|
|
8249
8319
|
"coreml",
|
|
@@ -21111,7 +21181,7 @@ var lifecycleJobSchema = object({
|
|
|
21111
21181
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21112
21182
|
* as every other cap.
|
|
21113
21183
|
*/
|
|
21114
|
-
var LogLevelSchema$
|
|
21184
|
+
var LogLevelSchema$2 = _enum([
|
|
21115
21185
|
"debug",
|
|
21116
21186
|
"info",
|
|
21117
21187
|
"warn",
|
|
@@ -21318,7 +21388,7 @@ var CustomActionInputSchema = object({
|
|
|
21318
21388
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21319
21389
|
addonId: string(),
|
|
21320
21390
|
limit: number$1().min(1).max(500).default(100),
|
|
21321
|
-
level: LogLevelSchema$
|
|
21391
|
+
level: LogLevelSchema$2.optional()
|
|
21322
21392
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21323
21393
|
packageName: string(),
|
|
21324
21394
|
version: string().optional()
|
|
@@ -21416,7 +21486,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21416
21486
|
auth: "admin"
|
|
21417
21487
|
}), method(object({
|
|
21418
21488
|
addonId: string(),
|
|
21419
|
-
level: LogLevelSchema$
|
|
21489
|
+
level: LogLevelSchema$2.optional()
|
|
21420
21490
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21421
21491
|
object({
|
|
21422
21492
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22410,6 +22480,35 @@ var FaceFilterEnum = _enum([
|
|
|
22410
22480
|
"identified",
|
|
22411
22481
|
"all"
|
|
22412
22482
|
]);
|
|
22483
|
+
/**
|
|
22484
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22485
|
+
*
|
|
22486
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22487
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22488
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22489
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22490
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
22491
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
22492
|
+
*
|
|
22493
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
22494
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
22495
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
22496
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
22497
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
22498
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
22499
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
22500
|
+
* backend's NULL-collation accident.
|
|
22501
|
+
*/
|
|
22502
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
22503
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
22504
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
22505
|
+
* never leaves the server. */
|
|
22506
|
+
var FaceClusterSchema = object({
|
|
22507
|
+
faceIds: array(string()).readonly(),
|
|
22508
|
+
representativeFaceId: string(),
|
|
22509
|
+
size: number$1().int(),
|
|
22510
|
+
cohesion: number$1()
|
|
22511
|
+
});
|
|
22413
22512
|
var MediaFileLiteSchema$1 = object({
|
|
22414
22513
|
key: string(),
|
|
22415
22514
|
kind: string(),
|
|
@@ -22456,24 +22555,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22456
22555
|
kind: "mutation",
|
|
22457
22556
|
auth: "admin"
|
|
22458
22557
|
}), method(object({
|
|
22459
|
-
/**
|
|
22558
|
+
/**
|
|
22559
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
22560
|
+
*
|
|
22561
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
22562
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
22563
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
22564
|
+
* present, and this field is then ignored rather than unioned, so
|
|
22565
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
22566
|
+
*/
|
|
22460
22567
|
deviceId: number$1().int().optional(),
|
|
22568
|
+
/**
|
|
22569
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
22570
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
22571
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
22572
|
+
* about to discard).
|
|
22573
|
+
*
|
|
22574
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
22575
|
+
* "every camera". A request for no devices is a request, not an
|
|
22576
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
22577
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
22578
|
+
*
|
|
22579
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
22580
|
+
*/
|
|
22581
|
+
deviceIds: array(number$1().int()).optional(),
|
|
22461
22582
|
limit: number$1().int().positive().optional(),
|
|
22462
22583
|
filter: FaceFilterEnum.optional(),
|
|
22463
22584
|
/**
|
|
22464
|
-
*
|
|
22465
|
-
*
|
|
22585
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22586
|
+
* Absent means no lower bound.
|
|
22587
|
+
*/
|
|
22588
|
+
since: number$1().int().optional(),
|
|
22589
|
+
/**
|
|
22590
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22591
|
+
* Absent means no upper bound.
|
|
22592
|
+
*/
|
|
22593
|
+
until: number$1().int().optional(),
|
|
22594
|
+
/**
|
|
22595
|
+
* Order the page by time or by suggestion certainty. Default
|
|
22596
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
22597
|
+
* that does not ask.
|
|
22466
22598
|
*
|
|
22467
|
-
*
|
|
22468
|
-
*
|
|
22469
|
-
* the browser cache the images.
|
|
22599
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
22600
|
+
* does under `'suggestionConfidence'`.
|
|
22470
22601
|
*
|
|
22471
|
-
*
|
|
22472
|
-
*
|
|
22473
|
-
*
|
|
22474
|
-
*
|
|
22475
|
-
*
|
|
22476
|
-
|
|
22602
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
22603
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
22604
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
22605
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
22606
|
+
* with {@link since} / {@link until}.
|
|
22607
|
+
*/
|
|
22608
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
22609
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
22610
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
22611
|
+
/**
|
|
22612
|
+
* Inline the base64 crop on every row.
|
|
22613
|
+
*
|
|
22614
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
22615
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
22616
|
+
* this for every gallery, and which records why the inline shape had
|
|
22617
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
22618
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
22619
|
+
* that describes the old design reads as permission to rely on it.
|
|
22620
|
+
*
|
|
22621
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
22622
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
22623
|
+
* cached and ETagged.
|
|
22477
22624
|
*/
|
|
22478
22625
|
includeCrops: boolean().optional()
|
|
22479
22626
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -22509,13 +22656,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22509
22656
|
}), method(object({
|
|
22510
22657
|
threshold: number$1().min(0).max(1).optional(),
|
|
22511
22658
|
minClusterSize: number$1().int().min(2).optional(),
|
|
22512
|
-
|
|
22513
|
-
|
|
22514
|
-
|
|
22515
|
-
|
|
22516
|
-
|
|
22517
|
-
|
|
22518
|
-
|
|
22659
|
+
/**
|
|
22660
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
22661
|
+
* which read as though it bounded the work — it never did.
|
|
22662
|
+
*
|
|
22663
|
+
* Wins over {@link limit} when both are sent.
|
|
22664
|
+
*/
|
|
22665
|
+
maxClusters: number$1().int().positive().optional(),
|
|
22666
|
+
/**
|
|
22667
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
22668
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
22669
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
22670
|
+
*/
|
|
22671
|
+
limit: number$1().int().positive().optional(),
|
|
22672
|
+
/**
|
|
22673
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
22674
|
+
* POOL, not the result.
|
|
22675
|
+
*
|
|
22676
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
22677
|
+
* used to read every unassigned face on the hub no matter what the
|
|
22678
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
22679
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
22680
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
22681
|
+
*
|
|
22682
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
22683
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
22684
|
+
* sample it randomly.
|
|
22685
|
+
*
|
|
22686
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
22687
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
22688
|
+
* unbounded scan can never come back as the table grows.
|
|
22689
|
+
*/
|
|
22690
|
+
maxFacesScanned: number$1().int().positive().optional()
|
|
22691
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
22519
22692
|
/**
|
|
22520
22693
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
22521
22694
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26238,6 +26411,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26238
26411
|
latitude: number$1().min(-90).max(90),
|
|
26239
26412
|
longitude: number$1().min(-180).max(180)
|
|
26240
26413
|
}).nullable();
|
|
26414
|
+
/**
|
|
26415
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26416
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26417
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26418
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26419
|
+
*/
|
|
26420
|
+
var RequestCensusGroupSchema = object({
|
|
26421
|
+
procedure: string(),
|
|
26422
|
+
userAgent: string(),
|
|
26423
|
+
ip: string(),
|
|
26424
|
+
principal: string(),
|
|
26425
|
+
calls: number$1(),
|
|
26426
|
+
perMin: number$1()
|
|
26427
|
+
});
|
|
26428
|
+
/**
|
|
26429
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26430
|
+
*
|
|
26431
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26432
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26433
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26434
|
+
*/
|
|
26435
|
+
var RequestCensusProcedureSchema = object({
|
|
26436
|
+
procedure: string(),
|
|
26437
|
+
calls: number$1(),
|
|
26438
|
+
perMin: number$1()
|
|
26439
|
+
});
|
|
26440
|
+
/**
|
|
26441
|
+
* The census as an operator sees it.
|
|
26442
|
+
*
|
|
26443
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26444
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26445
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26446
|
+
* like one that succeeded.
|
|
26447
|
+
*/
|
|
26448
|
+
var RequestCensusStatusSchema = object({
|
|
26449
|
+
armed: boolean(),
|
|
26450
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26451
|
+
elapsedMs: number$1(),
|
|
26452
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26453
|
+
windowMs: number$1(),
|
|
26454
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26455
|
+
armedUntilMs: number$1(),
|
|
26456
|
+
httpRequests: number$1(),
|
|
26457
|
+
batchedRequests: number$1(),
|
|
26458
|
+
/**
|
|
26459
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
26460
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
26461
|
+
* the number comparable with a store-side call count.
|
|
26462
|
+
*/
|
|
26463
|
+
procedureCalls: number$1(),
|
|
26464
|
+
/**
|
|
26465
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26466
|
+
* transport resolves one context per connection - but the number that says
|
|
26467
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
26468
|
+
*/
|
|
26469
|
+
wsConnections: number$1(),
|
|
26470
|
+
distinctGroups: number$1(),
|
|
26471
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
26472
|
+
* cardinality bound. */
|
|
26473
|
+
unattributedCalls: number$1(),
|
|
26474
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26475
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
26476
|
+
}).extend({ persisted: boolean() });
|
|
26477
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
26478
|
+
var LogLevelSchema$1 = _enum([
|
|
26479
|
+
"debug",
|
|
26480
|
+
"info",
|
|
26481
|
+
"warn",
|
|
26482
|
+
"error"
|
|
26483
|
+
]);
|
|
26484
|
+
/**
|
|
26485
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
26486
|
+
*
|
|
26487
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
26488
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
26489
|
+
*/
|
|
26490
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
26491
|
+
/**
|
|
26492
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
26493
|
+
* layer that carries an explicit value wins.
|
|
26494
|
+
*
|
|
26495
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
26496
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
26497
|
+
* grow later would force every consumer of this document to change with it.
|
|
26498
|
+
* Nothing returns `component` today.
|
|
26499
|
+
*/
|
|
26500
|
+
var LoggingScopeKindSchema = _enum([
|
|
26501
|
+
"cluster",
|
|
26502
|
+
"node",
|
|
26503
|
+
"component"
|
|
26504
|
+
]);
|
|
26505
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
26506
|
+
var LoggingLevelSourceSchema = _enum([
|
|
26507
|
+
"default",
|
|
26508
|
+
"cluster",
|
|
26509
|
+
"node",
|
|
26510
|
+
"component"
|
|
26511
|
+
]);
|
|
26512
|
+
/**
|
|
26513
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
26514
|
+
*
|
|
26515
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
26516
|
+
* difference between "this node is at `info` because I decided it" and
|
|
26517
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
26518
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
26519
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
26520
|
+
*/
|
|
26521
|
+
var LoggingLevelLayerSchema = object({
|
|
26522
|
+
scope: LoggingScopeKindSchema,
|
|
26523
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26524
|
+
nodeId: string().nullable(),
|
|
26525
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26526
|
+
level: LogLevelSchema$1.nullable()
|
|
26527
|
+
});
|
|
26528
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
26529
|
+
var LoggingEffectiveSchema = object({
|
|
26530
|
+
level: LogLevelSchema$1,
|
|
26531
|
+
levelSource: LoggingLevelSourceSchema
|
|
26532
|
+
});
|
|
26533
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
26534
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
26535
|
+
/**
|
|
26536
|
+
* An armed diagnostic, with its DEADLINE.
|
|
26537
|
+
*
|
|
26538
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
26539
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
26540
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
26541
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
26542
|
+
*/
|
|
26543
|
+
var DiagnosticWindowSchema = object({
|
|
26544
|
+
id: DiagnosticIdSchema,
|
|
26545
|
+
armed: boolean(),
|
|
26546
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26547
|
+
armedUntilMs: number$1(),
|
|
26548
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26549
|
+
remainingMs: number$1(),
|
|
26550
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
26551
|
+
* i.e. whether this window would survive a restart. */
|
|
26552
|
+
persisted: boolean()
|
|
26553
|
+
});
|
|
26554
|
+
/**
|
|
26555
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
26556
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
26557
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
26558
|
+
*/
|
|
26559
|
+
var DiagnosticWindowPatchSchema = object({
|
|
26560
|
+
id: DiagnosticIdSchema,
|
|
26561
|
+
armMs: number$1().int().min(0),
|
|
26562
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
26563
|
+
reportEveryMs: number$1().int().positive().optional()
|
|
26564
|
+
});
|
|
26565
|
+
/**
|
|
26566
|
+
* A PATCH, and patches MERGE.
|
|
26567
|
+
*
|
|
26568
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
26569
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
26570
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
26571
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
26572
|
+
* turns into an erased one.
|
|
26573
|
+
*/
|
|
26574
|
+
var LoggingSettingsPatchSchema = object({
|
|
26575
|
+
/**
|
|
26576
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
26577
|
+
* addressed scope so it inherits again. A value sets it.
|
|
26578
|
+
*/
|
|
26579
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
26580
|
+
/**
|
|
26581
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26582
|
+
* keeps running — a patch is never a full replacement.
|
|
26583
|
+
*/
|
|
26584
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26585
|
+
});
|
|
26586
|
+
/**
|
|
26587
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
26588
|
+
*
|
|
26589
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
26590
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
26591
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
26592
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
26593
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
26594
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
26595
|
+
* layer selector needs a name the transport does not already own.
|
|
26596
|
+
*/
|
|
26597
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
26598
|
+
var SetLoggingSettingsInputSchema = object({
|
|
26599
|
+
scopeNodeId: string().optional(),
|
|
26600
|
+
patch: LoggingSettingsPatchSchema
|
|
26601
|
+
});
|
|
26602
|
+
/**
|
|
26603
|
+
* The whole document, as read and as returned after every write.
|
|
26604
|
+
*
|
|
26605
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
26606
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
26607
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
26608
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
26609
|
+
* survive a restart.
|
|
26610
|
+
*/
|
|
26611
|
+
var LoggingSettingsStateSchema = object({
|
|
26612
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26613
|
+
scopeNodeId: string().nullable(),
|
|
26614
|
+
effective: LoggingEffectiveSchema,
|
|
26615
|
+
explicit: LoggingExplicitSchema,
|
|
26616
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26617
|
+
persisted: boolean()
|
|
26618
|
+
});
|
|
26241
26619
|
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(), {
|
|
26242
26620
|
kind: "mutation",
|
|
26243
26621
|
auth: "admin"
|
|
@@ -26250,6 +26628,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26250
26628
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26251
26629
|
kind: "mutation",
|
|
26252
26630
|
auth: "admin"
|
|
26631
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
26632
|
+
kind: "mutation",
|
|
26633
|
+
auth: "admin"
|
|
26253
26634
|
});
|
|
26254
26635
|
object({
|
|
26255
26636
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -32081,6 +32462,18 @@ Object.freeze({
|
|
|
32081
32462
|
addonId: null,
|
|
32082
32463
|
access: "create"
|
|
32083
32464
|
},
|
|
32465
|
+
"system.getLoggingSettings": {
|
|
32466
|
+
capName: "system",
|
|
32467
|
+
capScope: "system",
|
|
32468
|
+
addonId: null,
|
|
32469
|
+
access: "view"
|
|
32470
|
+
},
|
|
32471
|
+
"system.getRequestCensus": {
|
|
32472
|
+
capName: "system",
|
|
32473
|
+
capScope: "system",
|
|
32474
|
+
addonId: null,
|
|
32475
|
+
access: "view"
|
|
32476
|
+
},
|
|
32084
32477
|
"system.getRetentionConfig": {
|
|
32085
32478
|
capName: "system",
|
|
32086
32479
|
capScope: "system",
|
|
@@ -32111,6 +32504,12 @@ Object.freeze({
|
|
|
32111
32504
|
addonId: null,
|
|
32112
32505
|
access: "view"
|
|
32113
32506
|
},
|
|
32507
|
+
"system.setLoggingSettings": {
|
|
32508
|
+
capName: "system",
|
|
32509
|
+
capScope: "system",
|
|
32510
|
+
addonId: null,
|
|
32511
|
+
access: "create"
|
|
32512
|
+
},
|
|
32114
32513
|
"system.setRetentionConfig": {
|
|
32115
32514
|
capName: "system",
|
|
32116
32515
|
capScope: "system",
|
|
@@ -33266,6 +33665,10 @@ Object.freeze({
|
|
|
33266
33665
|
name: "deviceId",
|
|
33267
33666
|
form: "single",
|
|
33268
33667
|
optional: true
|
|
33668
|
+
}, {
|
|
33669
|
+
name: "deviceIds",
|
|
33670
|
+
form: "array",
|
|
33671
|
+
optional: true
|
|
33269
33672
|
}],
|
|
33270
33673
|
"fanControl.setDirection": [{
|
|
33271
33674
|
name: "deviceId",
|
|
@@ -34876,7 +35279,38 @@ object({
|
|
|
34876
35279
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34877
35280
|
* reproduce that.
|
|
34878
35281
|
*/
|
|
34879
|
-
tileBudgetMb: number$1().int().min(0).max(1024)
|
|
35282
|
+
tileBudgetMb: number$1().int().min(0).max(1024),
|
|
35283
|
+
/**
|
|
35284
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35285
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35286
|
+
* subject tiles, on frames that detected something.
|
|
35287
|
+
*
|
|
35288
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35289
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35290
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35291
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35292
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35293
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35294
|
+
*
|
|
35295
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35296
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35297
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35298
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35299
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35300
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35301
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35302
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35303
|
+
* whole shape exists to avoid.
|
|
35304
|
+
*
|
|
35305
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35306
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35307
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35308
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35309
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35310
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35311
|
+
* nothing.
|
|
35312
|
+
*/
|
|
35313
|
+
sceneBudgetMb: number$1().int().min(0).max(1024)
|
|
34880
35314
|
});
|
|
34881
35315
|
/**
|
|
34882
35316
|
* The values in force when the operator has set nothing.
|
|
@@ -34892,12 +35326,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
34892
35326
|
budgetMb: 1024,
|
|
34893
35327
|
activityMs: 15e3,
|
|
34894
35328
|
tileBudgetMb: 64,
|
|
35329
|
+
sceneBudgetMb: 48,
|
|
34895
35330
|
admission: "inferred"
|
|
34896
35331
|
};
|
|
34897
35332
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34898
35333
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34899
35334
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34900
35335
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35336
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
34901
35337
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34902
35338
|
var MB = 1024 * 1024;
|
|
34903
35339
|
1024 * MB, 3072 * MB;
|
package/dist/addon.mjs
CHANGED
|
@@ -7758,6 +7758,66 @@ var OpsLogQueryInputSchema = object({
|
|
|
7758
7758
|
/** Max rows returned, newest-first. */
|
|
7759
7759
|
limit: number$1().int().min(1).max(1e3).optional()
|
|
7760
7760
|
});
|
|
7761
|
+
var LabelDefinitionSchema = object({
|
|
7762
|
+
id: string(),
|
|
7763
|
+
name: string(),
|
|
7764
|
+
category: string().optional(),
|
|
7765
|
+
description: string().optional(),
|
|
7766
|
+
icon: string().optional()
|
|
7767
|
+
});
|
|
7768
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
7769
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
7770
|
+
"person",
|
|
7771
|
+
"vehicle",
|
|
7772
|
+
"animal",
|
|
7773
|
+
"package"
|
|
7774
|
+
];
|
|
7775
|
+
/**
|
|
7776
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
7777
|
+
* un operatore può selezionare.
|
|
7778
|
+
*
|
|
7779
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
7780
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
7781
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
7782
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
7783
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
7784
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
7785
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
7786
|
+
*
|
|
7787
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
7788
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
7789
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
7790
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
7791
|
+
* successiva.
|
|
7792
|
+
*/
|
|
7793
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
7794
|
+
"person",
|
|
7795
|
+
"vehicle",
|
|
7796
|
+
"animal"
|
|
7797
|
+
];
|
|
7798
|
+
/**
|
|
7799
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
7800
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
7801
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
7802
|
+
* detection pipeline executor actually routes.
|
|
7803
|
+
*
|
|
7804
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
7805
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
7806
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
7807
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
7808
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
7809
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
7810
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
7811
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
7812
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
7813
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
7814
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
7815
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
7816
|
+
*/
|
|
7817
|
+
var DetectionCatalogClassMapSchema = object({
|
|
7818
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
7819
|
+
preserveOriginal: boolean()
|
|
7820
|
+
});
|
|
7761
7821
|
/**
|
|
7762
7822
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7763
7823
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -7780,10 +7840,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
7780
7840
|
"events",
|
|
7781
7841
|
"continuous"
|
|
7782
7842
|
]);
|
|
7843
|
+
/**
|
|
7844
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
7845
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
7846
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
7847
|
+
*/
|
|
7848
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
7849
|
+
/**
|
|
7850
|
+
* True quando `values` non ripete un elemento.
|
|
7851
|
+
*
|
|
7852
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
7853
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
7854
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
7855
|
+
*/
|
|
7856
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
7783
7857
|
/** Which detectors trigger an `events`-mode band. */
|
|
7784
7858
|
var RecordingTriggersSchema = object({
|
|
7785
7859
|
motion: boolean().optional(),
|
|
7786
|
-
audioThresholdDbfs: number$1().optional()
|
|
7860
|
+
audioThresholdDbfs: number$1().optional(),
|
|
7861
|
+
/**
|
|
7862
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
7863
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
7864
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
7865
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
7866
|
+
*
|
|
7867
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
7868
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
7869
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
7870
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
7871
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
7872
|
+
*/
|
|
7873
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
7874
|
+
/**
|
|
7875
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
7876
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
7877
|
+
* `objectClasses`.
|
|
7878
|
+
*
|
|
7879
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
7880
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
7881
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
7882
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
7883
|
+
* device (D12) — mai un elenco globale di cap.
|
|
7884
|
+
*
|
|
7885
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
7886
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
7887
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
7888
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7889
|
+
* registrare.
|
|
7890
|
+
*/
|
|
7891
|
+
sensorDeviceIds: array(number$1().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7787
7892
|
});
|
|
7788
7893
|
/**
|
|
7789
7894
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8235,41 +8340,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
8235
8340
|
*/
|
|
8236
8341
|
debug: boolean().optional()
|
|
8237
8342
|
});
|
|
8238
|
-
var LabelDefinitionSchema = object({
|
|
8239
|
-
id: string(),
|
|
8240
|
-
name: string(),
|
|
8241
|
-
category: string().optional(),
|
|
8242
|
-
description: string().optional(),
|
|
8243
|
-
icon: string().optional()
|
|
8244
|
-
});
|
|
8245
|
-
/**
|
|
8246
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
8247
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8248
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8249
|
-
* detection pipeline executor actually routes.
|
|
8250
|
-
*
|
|
8251
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8252
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8253
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8254
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8255
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8256
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8257
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8258
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8259
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8260
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8261
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8262
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8263
|
-
*/
|
|
8264
|
-
var DetectionCatalogClassMapSchema = object({
|
|
8265
|
-
mapping: record(string(), _enum([
|
|
8266
|
-
"person",
|
|
8267
|
-
"vehicle",
|
|
8268
|
-
"animal",
|
|
8269
|
-
"package"
|
|
8270
|
-
])),
|
|
8271
|
-
preserveOriginal: boolean()
|
|
8272
|
-
});
|
|
8273
8343
|
var MODEL_FORMATS = [
|
|
8274
8344
|
"onnx",
|
|
8275
8345
|
"coreml",
|
|
@@ -21137,7 +21207,7 @@ var lifecycleJobSchema = object({
|
|
|
21137
21207
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
21138
21208
|
* as every other cap.
|
|
21139
21209
|
*/
|
|
21140
|
-
var LogLevelSchema$
|
|
21210
|
+
var LogLevelSchema$2 = _enum([
|
|
21141
21211
|
"debug",
|
|
21142
21212
|
"info",
|
|
21143
21213
|
"warn",
|
|
@@ -21344,7 +21414,7 @@ var CustomActionInputSchema = object({
|
|
|
21344
21414
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
21345
21415
|
addonId: string(),
|
|
21346
21416
|
limit: number$1().min(1).max(500).default(100),
|
|
21347
|
-
level: LogLevelSchema$
|
|
21417
|
+
level: LogLevelSchema$2.optional()
|
|
21348
21418
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
21349
21419
|
packageName: string(),
|
|
21350
21420
|
version: string().optional()
|
|
@@ -21442,7 +21512,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
21442
21512
|
auth: "admin"
|
|
21443
21513
|
}), method(object({
|
|
21444
21514
|
addonId: string(),
|
|
21445
|
-
level: LogLevelSchema$
|
|
21515
|
+
level: LogLevelSchema$2.optional()
|
|
21446
21516
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
21447
21517
|
object({
|
|
21448
21518
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -22436,6 +22506,35 @@ var FaceFilterEnum = _enum([
|
|
|
22436
22506
|
"identified",
|
|
22437
22507
|
"all"
|
|
22438
22508
|
]);
|
|
22509
|
+
/**
|
|
22510
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
22511
|
+
*
|
|
22512
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
22513
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
22514
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
22515
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
22516
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
22517
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
22518
|
+
*
|
|
22519
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
22520
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
22521
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
22522
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
22523
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
22524
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
22525
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
22526
|
+
* backend's NULL-collation accident.
|
|
22527
|
+
*/
|
|
22528
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
22529
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
22530
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
22531
|
+
* never leaves the server. */
|
|
22532
|
+
var FaceClusterSchema = object({
|
|
22533
|
+
faceIds: array(string()).readonly(),
|
|
22534
|
+
representativeFaceId: string(),
|
|
22535
|
+
size: number$1().int(),
|
|
22536
|
+
cohesion: number$1()
|
|
22537
|
+
});
|
|
22439
22538
|
var MediaFileLiteSchema$1 = object({
|
|
22440
22539
|
key: string(),
|
|
22441
22540
|
kind: string(),
|
|
@@ -22482,24 +22581,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22482
22581
|
kind: "mutation",
|
|
22483
22582
|
auth: "admin"
|
|
22484
22583
|
}), method(object({
|
|
22485
|
-
/**
|
|
22584
|
+
/**
|
|
22585
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
22586
|
+
*
|
|
22587
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
22588
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
22589
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
22590
|
+
* present, and this field is then ignored rather than unioned, so
|
|
22591
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
22592
|
+
*/
|
|
22486
22593
|
deviceId: number$1().int().optional(),
|
|
22594
|
+
/**
|
|
22595
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
22596
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
22597
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
22598
|
+
* about to discard).
|
|
22599
|
+
*
|
|
22600
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
22601
|
+
* "every camera". A request for no devices is a request, not an
|
|
22602
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
22603
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
22604
|
+
*
|
|
22605
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
22606
|
+
*/
|
|
22607
|
+
deviceIds: array(number$1().int()).optional(),
|
|
22487
22608
|
limit: number$1().int().positive().optional(),
|
|
22488
22609
|
filter: FaceFilterEnum.optional(),
|
|
22489
22610
|
/**
|
|
22490
|
-
*
|
|
22491
|
-
*
|
|
22611
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22612
|
+
* Absent means no lower bound.
|
|
22613
|
+
*/
|
|
22614
|
+
since: number$1().int().optional(),
|
|
22615
|
+
/**
|
|
22616
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
22617
|
+
* Absent means no upper bound.
|
|
22618
|
+
*/
|
|
22619
|
+
until: number$1().int().optional(),
|
|
22620
|
+
/**
|
|
22621
|
+
* Order the page by time or by suggestion certainty. Default
|
|
22622
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
22623
|
+
* that does not ask.
|
|
22492
22624
|
*
|
|
22493
|
-
*
|
|
22494
|
-
*
|
|
22495
|
-
* the browser cache the images.
|
|
22625
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
22626
|
+
* does under `'suggestionConfidence'`.
|
|
22496
22627
|
*
|
|
22497
|
-
*
|
|
22498
|
-
*
|
|
22499
|
-
*
|
|
22500
|
-
*
|
|
22501
|
-
*
|
|
22502
|
-
|
|
22628
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
22629
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
22630
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
22631
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
22632
|
+
* with {@link since} / {@link until}.
|
|
22633
|
+
*/
|
|
22634
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
22635
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
22636
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
22637
|
+
/**
|
|
22638
|
+
* Inline the base64 crop on every row.
|
|
22639
|
+
*
|
|
22640
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
22641
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
22642
|
+
* this for every gallery, and which records why the inline shape had
|
|
22643
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
22644
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
22645
|
+
* that describes the old design reads as permission to rely on it.
|
|
22646
|
+
*
|
|
22647
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
22648
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
22649
|
+
* cached and ETagged.
|
|
22503
22650
|
*/
|
|
22504
22651
|
includeCrops: boolean().optional()
|
|
22505
22652
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -22535,13 +22682,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
22535
22682
|
}), method(object({
|
|
22536
22683
|
threshold: number$1().min(0).max(1).optional(),
|
|
22537
22684
|
minClusterSize: number$1().int().min(2).optional(),
|
|
22538
|
-
|
|
22539
|
-
|
|
22540
|
-
|
|
22541
|
-
|
|
22542
|
-
|
|
22543
|
-
|
|
22544
|
-
|
|
22685
|
+
/**
|
|
22686
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
22687
|
+
* which read as though it bounded the work — it never did.
|
|
22688
|
+
*
|
|
22689
|
+
* Wins over {@link limit} when both are sent.
|
|
22690
|
+
*/
|
|
22691
|
+
maxClusters: number$1().int().positive().optional(),
|
|
22692
|
+
/**
|
|
22693
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
22694
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
22695
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
22696
|
+
*/
|
|
22697
|
+
limit: number$1().int().positive().optional(),
|
|
22698
|
+
/**
|
|
22699
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
22700
|
+
* POOL, not the result.
|
|
22701
|
+
*
|
|
22702
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
22703
|
+
* used to read every unassigned face on the hub no matter what the
|
|
22704
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
22705
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
22706
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
22707
|
+
*
|
|
22708
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
22709
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
22710
|
+
* sample it randomly.
|
|
22711
|
+
*
|
|
22712
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
22713
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
22714
|
+
* unbounded scan can never come back as the table grows.
|
|
22715
|
+
*/
|
|
22716
|
+
maxFacesScanned: number$1().int().positive().optional()
|
|
22717
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
22545
22718
|
/**
|
|
22546
22719
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
22547
22720
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -26264,6 +26437,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
26264
26437
|
latitude: number$1().min(-90).max(90),
|
|
26265
26438
|
longitude: number$1().min(-180).max(180)
|
|
26266
26439
|
}).nullable();
|
|
26440
|
+
/**
|
|
26441
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
26442
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26443
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26444
|
+
* already prints - never a token, never an `Authorization` header.
|
|
26445
|
+
*/
|
|
26446
|
+
var RequestCensusGroupSchema = object({
|
|
26447
|
+
procedure: string(),
|
|
26448
|
+
userAgent: string(),
|
|
26449
|
+
ip: string(),
|
|
26450
|
+
principal: string(),
|
|
26451
|
+
calls: number$1(),
|
|
26452
|
+
perMin: number$1()
|
|
26453
|
+
});
|
|
26454
|
+
/**
|
|
26455
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
26456
|
+
*
|
|
26457
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
26458
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
26459
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
26460
|
+
*/
|
|
26461
|
+
var RequestCensusProcedureSchema = object({
|
|
26462
|
+
procedure: string(),
|
|
26463
|
+
calls: number$1(),
|
|
26464
|
+
perMin: number$1()
|
|
26465
|
+
});
|
|
26466
|
+
/**
|
|
26467
|
+
* The census as an operator sees it.
|
|
26468
|
+
*
|
|
26469
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
26470
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
26471
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
26472
|
+
* like one that succeeded.
|
|
26473
|
+
*/
|
|
26474
|
+
var RequestCensusStatusSchema = object({
|
|
26475
|
+
armed: boolean(),
|
|
26476
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
26477
|
+
elapsedMs: number$1(),
|
|
26478
|
+
/** The window actually armed, after the server clamped the request. */
|
|
26479
|
+
windowMs: number$1(),
|
|
26480
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26481
|
+
armedUntilMs: number$1(),
|
|
26482
|
+
httpRequests: number$1(),
|
|
26483
|
+
batchedRequests: number$1(),
|
|
26484
|
+
/**
|
|
26485
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
26486
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
26487
|
+
* the number comparable with a store-side call count.
|
|
26488
|
+
*/
|
|
26489
|
+
procedureCalls: number$1(),
|
|
26490
|
+
/**
|
|
26491
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26492
|
+
* transport resolves one context per connection - but the number that says
|
|
26493
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
26494
|
+
*/
|
|
26495
|
+
wsConnections: number$1(),
|
|
26496
|
+
distinctGroups: number$1(),
|
|
26497
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
26498
|
+
* cardinality bound. */
|
|
26499
|
+
unattributedCalls: number$1(),
|
|
26500
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26501
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
26502
|
+
}).extend({ persisted: boolean() });
|
|
26503
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
26504
|
+
var LogLevelSchema$1 = _enum([
|
|
26505
|
+
"debug",
|
|
26506
|
+
"info",
|
|
26507
|
+
"warn",
|
|
26508
|
+
"error"
|
|
26509
|
+
]);
|
|
26510
|
+
/**
|
|
26511
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
26512
|
+
*
|
|
26513
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
26514
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
26515
|
+
*/
|
|
26516
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
26517
|
+
/**
|
|
26518
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
26519
|
+
* layer that carries an explicit value wins.
|
|
26520
|
+
*
|
|
26521
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
26522
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
26523
|
+
* grow later would force every consumer of this document to change with it.
|
|
26524
|
+
* Nothing returns `component` today.
|
|
26525
|
+
*/
|
|
26526
|
+
var LoggingScopeKindSchema = _enum([
|
|
26527
|
+
"cluster",
|
|
26528
|
+
"node",
|
|
26529
|
+
"component"
|
|
26530
|
+
]);
|
|
26531
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
26532
|
+
var LoggingLevelSourceSchema = _enum([
|
|
26533
|
+
"default",
|
|
26534
|
+
"cluster",
|
|
26535
|
+
"node",
|
|
26536
|
+
"component"
|
|
26537
|
+
]);
|
|
26538
|
+
/**
|
|
26539
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
26540
|
+
*
|
|
26541
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
26542
|
+
* difference between "this node is at `info` because I decided it" and
|
|
26543
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
26544
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
26545
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
26546
|
+
*/
|
|
26547
|
+
var LoggingLevelLayerSchema = object({
|
|
26548
|
+
scope: LoggingScopeKindSchema,
|
|
26549
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26550
|
+
nodeId: string().nullable(),
|
|
26551
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26552
|
+
level: LogLevelSchema$1.nullable()
|
|
26553
|
+
});
|
|
26554
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
26555
|
+
var LoggingEffectiveSchema = object({
|
|
26556
|
+
level: LogLevelSchema$1,
|
|
26557
|
+
levelSource: LoggingLevelSourceSchema
|
|
26558
|
+
});
|
|
26559
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
26560
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
26561
|
+
/**
|
|
26562
|
+
* An armed diagnostic, with its DEADLINE.
|
|
26563
|
+
*
|
|
26564
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
26565
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
26566
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
26567
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
26568
|
+
*/
|
|
26569
|
+
var DiagnosticWindowSchema = object({
|
|
26570
|
+
id: DiagnosticIdSchema,
|
|
26571
|
+
armed: boolean(),
|
|
26572
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26573
|
+
armedUntilMs: number$1(),
|
|
26574
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26575
|
+
remainingMs: number$1(),
|
|
26576
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
26577
|
+
* i.e. whether this window would survive a restart. */
|
|
26578
|
+
persisted: boolean()
|
|
26579
|
+
});
|
|
26580
|
+
/**
|
|
26581
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
26582
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
26583
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
26584
|
+
*/
|
|
26585
|
+
var DiagnosticWindowPatchSchema = object({
|
|
26586
|
+
id: DiagnosticIdSchema,
|
|
26587
|
+
armMs: number$1().int().min(0),
|
|
26588
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
26589
|
+
reportEveryMs: number$1().int().positive().optional()
|
|
26590
|
+
});
|
|
26591
|
+
/**
|
|
26592
|
+
* A PATCH, and patches MERGE.
|
|
26593
|
+
*
|
|
26594
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
26595
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
26596
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
26597
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
26598
|
+
* turns into an erased one.
|
|
26599
|
+
*/
|
|
26600
|
+
var LoggingSettingsPatchSchema = object({
|
|
26601
|
+
/**
|
|
26602
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
26603
|
+
* addressed scope so it inherits again. A value sets it.
|
|
26604
|
+
*/
|
|
26605
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
26606
|
+
/**
|
|
26607
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26608
|
+
* keeps running — a patch is never a full replacement.
|
|
26609
|
+
*/
|
|
26610
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26611
|
+
});
|
|
26612
|
+
/**
|
|
26613
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
26614
|
+
*
|
|
26615
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
26616
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
26617
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
26618
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
26619
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
26620
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
26621
|
+
* layer selector needs a name the transport does not already own.
|
|
26622
|
+
*/
|
|
26623
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
26624
|
+
var SetLoggingSettingsInputSchema = object({
|
|
26625
|
+
scopeNodeId: string().optional(),
|
|
26626
|
+
patch: LoggingSettingsPatchSchema
|
|
26627
|
+
});
|
|
26628
|
+
/**
|
|
26629
|
+
* The whole document, as read and as returned after every write.
|
|
26630
|
+
*
|
|
26631
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
26632
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
26633
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
26634
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
26635
|
+
* survive a restart.
|
|
26636
|
+
*/
|
|
26637
|
+
var LoggingSettingsStateSchema = object({
|
|
26638
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26639
|
+
scopeNodeId: string().nullable(),
|
|
26640
|
+
effective: LoggingEffectiveSchema,
|
|
26641
|
+
explicit: LoggingExplicitSchema,
|
|
26642
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26643
|
+
persisted: boolean()
|
|
26644
|
+
});
|
|
26267
26645
|
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(), {
|
|
26268
26646
|
kind: "mutation",
|
|
26269
26647
|
auth: "admin"
|
|
@@ -26276,6 +26654,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
26276
26654
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
26277
26655
|
kind: "mutation",
|
|
26278
26656
|
auth: "admin"
|
|
26657
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
26658
|
+
kind: "mutation",
|
|
26659
|
+
auth: "admin"
|
|
26279
26660
|
});
|
|
26280
26661
|
object({
|
|
26281
26662
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -32107,6 +32488,18 @@ Object.freeze({
|
|
|
32107
32488
|
addonId: null,
|
|
32108
32489
|
access: "create"
|
|
32109
32490
|
},
|
|
32491
|
+
"system.getLoggingSettings": {
|
|
32492
|
+
capName: "system",
|
|
32493
|
+
capScope: "system",
|
|
32494
|
+
addonId: null,
|
|
32495
|
+
access: "view"
|
|
32496
|
+
},
|
|
32497
|
+
"system.getRequestCensus": {
|
|
32498
|
+
capName: "system",
|
|
32499
|
+
capScope: "system",
|
|
32500
|
+
addonId: null,
|
|
32501
|
+
access: "view"
|
|
32502
|
+
},
|
|
32110
32503
|
"system.getRetentionConfig": {
|
|
32111
32504
|
capName: "system",
|
|
32112
32505
|
capScope: "system",
|
|
@@ -32137,6 +32530,12 @@ Object.freeze({
|
|
|
32137
32530
|
addonId: null,
|
|
32138
32531
|
access: "view"
|
|
32139
32532
|
},
|
|
32533
|
+
"system.setLoggingSettings": {
|
|
32534
|
+
capName: "system",
|
|
32535
|
+
capScope: "system",
|
|
32536
|
+
addonId: null,
|
|
32537
|
+
access: "create"
|
|
32538
|
+
},
|
|
32140
32539
|
"system.setRetentionConfig": {
|
|
32141
32540
|
capName: "system",
|
|
32142
32541
|
capScope: "system",
|
|
@@ -33292,6 +33691,10 @@ Object.freeze({
|
|
|
33292
33691
|
name: "deviceId",
|
|
33293
33692
|
form: "single",
|
|
33294
33693
|
optional: true
|
|
33694
|
+
}, {
|
|
33695
|
+
name: "deviceIds",
|
|
33696
|
+
form: "array",
|
|
33697
|
+
optional: true
|
|
33295
33698
|
}],
|
|
33296
33699
|
"fanControl.setDirection": [{
|
|
33297
33700
|
name: "deviceId",
|
|
@@ -34902,7 +35305,38 @@ object({
|
|
|
34902
35305
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34903
35306
|
* reproduce that.
|
|
34904
35307
|
*/
|
|
34905
|
-
tileBudgetMb: number$1().int().min(0).max(1024)
|
|
35308
|
+
tileBudgetMb: number$1().int().min(0).max(1024),
|
|
35309
|
+
/**
|
|
35310
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
35311
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
35312
|
+
* subject tiles, on frames that detected something.
|
|
35313
|
+
*
|
|
35314
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
35315
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
35316
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
35317
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
35318
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
35319
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
35320
|
+
*
|
|
35321
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
35322
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
35323
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
35324
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
35325
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
35326
|
+
* binds only through a detection burst, where it still covers well past the
|
|
35327
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
35328
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
35329
|
+
* whole shape exists to avoid.
|
|
35330
|
+
*
|
|
35331
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
35332
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
35333
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
35334
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
35335
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
35336
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
35337
|
+
* nothing.
|
|
35338
|
+
*/
|
|
35339
|
+
sceneBudgetMb: number$1().int().min(0).max(1024)
|
|
34906
35340
|
});
|
|
34907
35341
|
/**
|
|
34908
35342
|
* The values in force when the operator has set nothing.
|
|
@@ -34918,12 +35352,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
34918
35352
|
budgetMb: 1024,
|
|
34919
35353
|
activityMs: 15e3,
|
|
34920
35354
|
tileBudgetMb: 64,
|
|
35355
|
+
sceneBudgetMb: 48,
|
|
34921
35356
|
admission: "inferred"
|
|
34922
35357
|
};
|
|
34923
35358
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34924
35359
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34925
35360
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34926
35361
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
35362
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
34927
35363
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34928
35364
|
var MB = 1024 * 1024;
|
|
34929
35365
|
1024 * MB, 3072 * MB;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-ai",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.25",
|
|
4
4
|
"description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|