@camstack/addon-pipeline 1.2.132 → 1.2.133
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-utils-DzCn6z7v.js → addon-utils-FV2O25id.js} +1 -1
- package/dist/audio-analyzer/index.js +3 -3
- package/dist/audio-analyzer/index.mjs +2 -2
- package/dist/detection-pipeline/index.js +5 -5
- package/dist/detection-pipeline/index.mjs +3 -3
- package/dist/{dist-BZYUUBUx.mjs → dist-7Uc6NdFm.mjs} +653 -65
- package/dist/{dist-DBP47QOz.js → dist-DsnZUYTs.js} +670 -64
- package/dist/{event-loop-stall-monitor-CiH_MHfO.js → event-loop-stall-monitor-D86J6d2c.js} +1 -1
- package/dist/{event-loop-stall-monitor-IACE22fK.mjs → event-loop-stall-monitor-XzDMVU9d.mjs} +1 -1
- package/dist/{lazy-sharp-B_kETjyQ.js → lazy-sharp-UzEUL79V.js} +1 -1
- package/dist/motion-wasm/index.js +2 -2
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/pipeline-runner/index.js +4 -4
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/{process-memory-C7rsraCR.mjs → process-memory-Ci90-zF_.mjs} +1 -1
- package/dist/{process-memory-CtXQAA3d.js → process-memory-Co59RQIK.js} +1 -1
- package/dist/recorder/index.js +446 -86
- package/dist/recorder/index.mjs +445 -85
- package/dist/{segment-demux-js-BL1UDdiI.mjs → segment-demux-js-0NZ9TXro.mjs} +1 -1
- package/dist/{segment-demux-js-wTzFi5UW.js → segment-demux-js-DKcc0bxA.js} +1 -1
- package/dist/session-decode/decode-worker-child.js +195 -13
- package/dist/session-decode/decode-worker-child.mjs +194 -12
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DlKJZ-_M.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Dqj2f3H7.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CVBnNONy.mjs +26 -0
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BUw_aTfK.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-77rGxv1J.mjs} +1 -1
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-kDKgfUjp.mjs → hostInit-DnwyBL4I.mjs} +3 -3
- package/dist/stream-broker/index.js +2 -2
- package/dist/stream-broker/index.mjs +2 -2
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/{worker-protocol-Cut8984B.mjs → worker-protocol-CMDUAqvX.mjs} +12 -6
- package/dist/{worker-protocol-C3zaz0Jv.js → worker-protocol-DzRUHIcM.js} +12 -6
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DXKTNEae.mjs +0 -26
|
@@ -8494,6 +8494,74 @@ var OpsLogQueryInputSchema = object({
|
|
|
8494
8494
|
/** Max rows returned, newest-first. */
|
|
8495
8495
|
limit: number().int().min(1).max(1e3).optional()
|
|
8496
8496
|
});
|
|
8497
|
+
var LabelDefinitionSchema = object({
|
|
8498
|
+
id: string(),
|
|
8499
|
+
name: string(),
|
|
8500
|
+
category: string().optional(),
|
|
8501
|
+
description: string().optional(),
|
|
8502
|
+
icon: string().optional()
|
|
8503
|
+
});
|
|
8504
|
+
/** Detection-macro targets a catalog `classMap` may resolve to. */
|
|
8505
|
+
var CLASS_MAP_MACRO_TARGETS = [
|
|
8506
|
+
"person",
|
|
8507
|
+
"vehicle",
|
|
8508
|
+
"animal",
|
|
8509
|
+
"package"
|
|
8510
|
+
];
|
|
8511
|
+
/**
|
|
8512
|
+
* Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
|
|
8513
|
+
* un operatore può selezionare.
|
|
8514
|
+
*
|
|
8515
|
+
* Sono le tre offerte dallo step `object-detection`
|
|
8516
|
+
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
8517
|
+
* `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
|
|
8518
|
+
* `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
|
|
8519
|
+
* `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
|
|
8520
|
+
* stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
|
|
8521
|
+
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
8522
|
+
*
|
|
8523
|
+
* UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
|
|
8524
|
+
* dello step e una seconda volta come union `FirstLevelMacro`
|
|
8525
|
+
* (`types/detection.ts`); una terza copia per il trigger di registrazione
|
|
8526
|
+
* (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
|
|
8527
|
+
* successiva.
|
|
8528
|
+
*/
|
|
8529
|
+
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
8530
|
+
"person",
|
|
8531
|
+
"vehicle",
|
|
8532
|
+
"animal"
|
|
8533
|
+
];
|
|
8534
|
+
/**
|
|
8535
|
+
* True quando `value` è una macro di primo livello. Type guard, non cast: un
|
|
8536
|
+
* `className` che arriva dal bus è una stringa qualunque finché non passa di
|
|
8537
|
+
* qui.
|
|
8538
|
+
*/
|
|
8539
|
+
function isFirstLevelMacroClass(value) {
|
|
8540
|
+
return FIRST_LEVEL_MACRO_CLASSES.some((macro) => macro === value);
|
|
8541
|
+
}
|
|
8542
|
+
/**
|
|
8543
|
+
* Wire schema for a per-model CATALOG classMap override
|
|
8544
|
+
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
8545
|
+
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
8546
|
+
* detection pipeline executor actually routes.
|
|
8547
|
+
*
|
|
8548
|
+
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
8549
|
+
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
8550
|
+
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
8551
|
+
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
8552
|
+
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
8553
|
+
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
8554
|
+
* are not: it is two different concepts colliding on a name. Keep this type
|
|
8555
|
+
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
8556
|
+
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
8557
|
+
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
8558
|
+
* schema exists for (see the "rejects a classMap whose target is not a
|
|
8559
|
+
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
8560
|
+
*/
|
|
8561
|
+
var DetectionCatalogClassMapSchema = object({
|
|
8562
|
+
mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
|
|
8563
|
+
preserveOriginal: boolean()
|
|
8564
|
+
});
|
|
8497
8565
|
/**
|
|
8498
8566
|
* THE canonical event-clip pad: the time window a single-timestamp analytics
|
|
8499
8567
|
* event expands to when joined with footage (clip window = `[timestamp - preMs,
|
|
@@ -8535,10 +8603,55 @@ var RecordingStorageModeSchema = _enum([
|
|
|
8535
8603
|
"events",
|
|
8536
8604
|
"continuous"
|
|
8537
8605
|
]);
|
|
8606
|
+
/**
|
|
8607
|
+
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
8608
|
+
* tre offerte dallo step `object-detection`, da UNA lista
|
|
8609
|
+
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
8610
|
+
*/
|
|
8611
|
+
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
8612
|
+
/**
|
|
8613
|
+
* True quando `values` non ripete un elemento.
|
|
8614
|
+
*
|
|
8615
|
+
* Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
|
|
8616
|
+
* diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
|
|
8617
|
+
* conterebbe due volte le sue finestre in `segmentMissedByMs`.
|
|
8618
|
+
*/
|
|
8619
|
+
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
8538
8620
|
/** Which detectors trigger an `events`-mode band. */
|
|
8539
8621
|
var RecordingTriggersSchema = object({
|
|
8540
8622
|
motion: boolean().optional(),
|
|
8541
|
-
audioThresholdDbfs: number().optional()
|
|
8623
|
+
audioThresholdDbfs: number().optional(),
|
|
8624
|
+
/**
|
|
8625
|
+
* Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
|
|
8626
|
+
* non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
|
|
8627
|
+
* object acceso, nessuna classe" è la stessa forma "abilitata e non registra
|
|
8628
|
+
* nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
|
|
8629
|
+
*
|
|
8630
|
+
* Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
|
|
8631
|
+
* quelle che hanno attraversato `enabledMacroClasses`, i
|
|
8632
|
+
* `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
|
|
8633
|
+
* (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
|
|
8634
|
+
* finestre — vedi `recorder/object-trigger.ts`.
|
|
8635
|
+
*/
|
|
8636
|
+
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
8637
|
+
/**
|
|
8638
|
+
* I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
|
|
8639
|
+
* non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
|
|
8640
|
+
* `objectClasses`.
|
|
8641
|
+
*
|
|
8642
|
+
* Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
|
|
8643
|
+
* percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
|
|
8644
|
+
* non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
|
|
8645
|
+
* si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
8646
|
+
* device (D12) — mai un elenco globale di cap.
|
|
8647
|
+
*
|
|
8648
|
+
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
8649
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
8650
|
+
* la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
|
|
8651
|
+
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8652
|
+
* registrare.
|
|
8653
|
+
*/
|
|
8654
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8542
8655
|
});
|
|
8543
8656
|
/**
|
|
8544
8657
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -9064,41 +9177,6 @@ var DecoderSessionConfigSchema = object({
|
|
|
9064
9177
|
*/
|
|
9065
9178
|
debug: boolean().optional()
|
|
9066
9179
|
});
|
|
9067
|
-
var LabelDefinitionSchema = object({
|
|
9068
|
-
id: string(),
|
|
9069
|
-
name: string(),
|
|
9070
|
-
category: string().optional(),
|
|
9071
|
-
description: string().optional(),
|
|
9072
|
-
icon: string().optional()
|
|
9073
|
-
});
|
|
9074
|
-
/**
|
|
9075
|
-
* Wire schema for a per-model CATALOG classMap override
|
|
9076
|
-
* (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
|
|
9077
|
-
* restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
|
|
9078
|
-
* detection pipeline executor actually routes.
|
|
9079
|
-
*
|
|
9080
|
-
* This is deliberately a DIFFERENT, narrower shape than the general-purpose
|
|
9081
|
-
* `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
|
|
9082
|
-
* and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
|
|
9083
|
-
* enum) — the two used to share the name `ClassMapDefinition`/
|
|
9084
|
-
* `ClassMapDefinitionSchema`, which made the schema-type-twin guard
|
|
9085
|
-
* (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
|
|
9086
|
-
* are not: it is two different concepts colliding on a name. Keep this type
|
|
9087
|
-
* under its own name rather than reusing `ClassMapDefinition` — reusing it
|
|
9088
|
-
* would either narrow every `ClassMapDefinition` consumer to the four
|
|
9089
|
-
* detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
|
|
9090
|
-
* schema exists for (see the "rejects a classMap whose target is not a
|
|
9091
|
-
* detection macro" test in `model-catalog-schema.test.ts`).
|
|
9092
|
-
*/
|
|
9093
|
-
var DetectionCatalogClassMapSchema = object({
|
|
9094
|
-
mapping: record(string(), _enum([
|
|
9095
|
-
"person",
|
|
9096
|
-
"vehicle",
|
|
9097
|
-
"animal",
|
|
9098
|
-
"package"
|
|
9099
|
-
])),
|
|
9100
|
-
preserveOriginal: boolean()
|
|
9101
|
-
});
|
|
9102
9180
|
var MODEL_FORMATS = [
|
|
9103
9181
|
"onnx",
|
|
9104
9182
|
"coreml",
|
|
@@ -23119,7 +23197,7 @@ var lifecycleJobSchema = object({
|
|
|
23119
23197
|
* `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
|
|
23120
23198
|
* as every other cap.
|
|
23121
23199
|
*/
|
|
23122
|
-
var LogLevelSchema$
|
|
23200
|
+
var LogLevelSchema$2 = _enum([
|
|
23123
23201
|
"debug",
|
|
23124
23202
|
"info",
|
|
23125
23203
|
"warn",
|
|
@@ -23326,7 +23404,7 @@ var CustomActionInputSchema = object({
|
|
|
23326
23404
|
method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
23327
23405
|
addonId: string(),
|
|
23328
23406
|
limit: number().min(1).max(500).default(100),
|
|
23329
|
-
level: LogLevelSchema$
|
|
23407
|
+
level: LogLevelSchema$2.optional()
|
|
23330
23408
|
}), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
|
|
23331
23409
|
packageName: string(),
|
|
23332
23410
|
version: string().optional()
|
|
@@ -23424,7 +23502,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
|
|
|
23424
23502
|
auth: "admin"
|
|
23425
23503
|
}), method(object({
|
|
23426
23504
|
addonId: string(),
|
|
23427
|
-
level: LogLevelSchema$
|
|
23505
|
+
level: LogLevelSchema$2.optional()
|
|
23428
23506
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
23429
23507
|
object({
|
|
23430
23508
|
/** Carbon dioxide concentration in ppm. */
|
|
@@ -24485,6 +24563,35 @@ var FaceFilterEnum = _enum([
|
|
|
24485
24563
|
"identified",
|
|
24486
24564
|
"all"
|
|
24487
24565
|
]);
|
|
24566
|
+
/**
|
|
24567
|
+
* What a `listRecentFaces` page is ORDERED BY.
|
|
24568
|
+
*
|
|
24569
|
+
* - `timestamp` — when the face was seen. The historical (and default) order.
|
|
24570
|
+
* - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
|
|
24571
|
+
* cosine of the face's SUGGESTED identity. This is the "review by certainty"
|
|
24572
|
+
* order: it puts the suggestions an operator can confirm with one tap at the
|
|
24573
|
+
* top, and it is the reason this enum exists — a client that ranked a capped
|
|
24574
|
+
* page client-side was ranking the newest N, never the most certain N.
|
|
24575
|
+
*
|
|
24576
|
+
* A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
|
|
24577
|
+
* auto-assigned face, or a face below the suggestion band) has no certainty to
|
|
24578
|
+
* compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
|
|
24579
|
+
* — flipping the direction reorders the rows that HAVE a certainty and never
|
|
24580
|
+
* floods the page with the ones that do not. `addon-post-analysis`'s
|
|
24581
|
+
* `store/face-sort.ts` is the single implementation, tiebreaks newest-first
|
|
24582
|
+
* then by faceId, and is what makes this a total order instead of the
|
|
24583
|
+
* backend's NULL-collation accident.
|
|
24584
|
+
*/
|
|
24585
|
+
var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
|
|
24586
|
+
var FaceSortDirectionEnum = _enum(["asc", "desc"]);
|
|
24587
|
+
/** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
|
|
24588
|
+
* never leaves the server. */
|
|
24589
|
+
var FaceClusterSchema = object({
|
|
24590
|
+
faceIds: array(string()).readonly(),
|
|
24591
|
+
representativeFaceId: string(),
|
|
24592
|
+
size: number().int(),
|
|
24593
|
+
cohesion: number()
|
|
24594
|
+
});
|
|
24488
24595
|
var MediaFileLiteSchema$1 = object({
|
|
24489
24596
|
key: string(),
|
|
24490
24597
|
kind: string(),
|
|
@@ -24531,24 +24638,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24531
24638
|
kind: "mutation",
|
|
24532
24639
|
auth: "admin"
|
|
24533
24640
|
}), method(object({
|
|
24534
|
-
/**
|
|
24641
|
+
/**
|
|
24642
|
+
* Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
|
|
24643
|
+
*
|
|
24644
|
+
* The legacy single-camera form, kept verbatim for every caller that
|
|
24645
|
+
* already sends it. A caller that wants a SET sends {@link deviceIds}
|
|
24646
|
+
* instead — never both: `deviceIds` is the authority whenever it is
|
|
24647
|
+
* present, and this field is then ignored rather than unioned, so
|
|
24648
|
+
* there is exactly one answer to "which cameras did I ask for".
|
|
24649
|
+
*/
|
|
24535
24650
|
deviceId: number().int().optional(),
|
|
24651
|
+
/**
|
|
24652
|
+
* Restrict to a SET of cameras — the review UI's camera filter, which
|
|
24653
|
+
* until now had to fetch the cluster-wide page and drop rows in the
|
|
24654
|
+
* client (so the `limit` it asked for was spent on cameras it was
|
|
24655
|
+
* about to discard).
|
|
24656
|
+
*
|
|
24657
|
+
* An **empty array reads NOTHING** — `[]` is an empty page, never
|
|
24658
|
+
* "every camera". A request for no devices is a request, not an
|
|
24659
|
+
* omission; same contract as `deviceManager.listFleet` and
|
|
24660
|
+
* `pipelineAnalytics.listRecentTracks`.
|
|
24661
|
+
*
|
|
24662
|
+
* Absent (`undefined`) is the omission, and keeps the cluster-wide view.
|
|
24663
|
+
*/
|
|
24664
|
+
deviceIds: array(number().int()).optional(),
|
|
24536
24665
|
limit: number().int().positive().optional(),
|
|
24537
24666
|
filter: FaceFilterEnum.optional(),
|
|
24538
24667
|
/**
|
|
24539
|
-
*
|
|
24540
|
-
*
|
|
24668
|
+
* Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24669
|
+
* Absent means no lower bound.
|
|
24670
|
+
*/
|
|
24671
|
+
since: number().int().optional(),
|
|
24672
|
+
/**
|
|
24673
|
+
* Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
|
|
24674
|
+
* Absent means no upper bound.
|
|
24675
|
+
*/
|
|
24676
|
+
until: number().int().optional(),
|
|
24677
|
+
/**
|
|
24678
|
+
* Order the page by time or by suggestion certainty. Default
|
|
24679
|
+
* `'timestamp'` — the historical order, unchanged for every caller
|
|
24680
|
+
* that does not ask.
|
|
24541
24681
|
*
|
|
24542
|
-
*
|
|
24543
|
-
*
|
|
24544
|
-
* the browser cache the images.
|
|
24682
|
+
* See {@link FaceSortFieldEnum} for what a row with no suggestion
|
|
24683
|
+
* does under `'suggestionConfidence'`.
|
|
24545
24684
|
*
|
|
24546
|
-
*
|
|
24547
|
-
*
|
|
24548
|
-
*
|
|
24549
|
-
*
|
|
24550
|
-
*
|
|
24551
|
-
|
|
24685
|
+
* Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
|
|
24686
|
+
* index and stops reading as soon as `limit` rows have PASSED the
|
|
24687
|
+
* filter. `'suggestionConfidence'` cannot stop early — the most
|
|
24688
|
+
* certain row may be the oldest — so it walks the window. Narrow it
|
|
24689
|
+
* with {@link since} / {@link until}.
|
|
24690
|
+
*/
|
|
24691
|
+
sortBy: FaceSortFieldEnum.optional(),
|
|
24692
|
+
/** Sort direction for {@link sortBy}. Default `'desc'`. */
|
|
24693
|
+
sortDirection: FaceSortDirectionEnum.optional(),
|
|
24694
|
+
/**
|
|
24695
|
+
* Inline the base64 crop on every row.
|
|
24696
|
+
*
|
|
24697
|
+
* Default `false` since the 2026-08-25 inversion — see
|
|
24698
|
+
* `include-crops-default.ts`, which is the ONE place that resolves
|
|
24699
|
+
* this for every gallery, and which records why the inline shape had
|
|
24700
|
+
* to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
|
|
24701
|
+
* The doc here used to still say `true`; it was wrong, and a leftover
|
|
24702
|
+
* that describes the old design reads as permission to rely on it.
|
|
24703
|
+
*
|
|
24704
|
+
* Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
|
|
24705
|
+
* which the browser fetches off the `event-media` plane in parallel,
|
|
24706
|
+
* cached and ETagged.
|
|
24552
24707
|
*/
|
|
24553
24708
|
includeCrops: boolean().optional()
|
|
24554
24709
|
}).optional(), array(FaceInfoSchema).readonly()), method(object({
|
|
@@ -24584,13 +24739,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
|
|
|
24584
24739
|
}), method(object({
|
|
24585
24740
|
threshold: number().min(0).max(1).optional(),
|
|
24586
24741
|
minClusterSize: number().int().min(2).optional(),
|
|
24587
|
-
|
|
24588
|
-
|
|
24589
|
-
|
|
24590
|
-
|
|
24591
|
-
|
|
24592
|
-
|
|
24593
|
-
|
|
24742
|
+
/**
|
|
24743
|
+
* Cap on the number of CLUSTERS returned. Renamed from `limit`,
|
|
24744
|
+
* which read as though it bounded the work — it never did.
|
|
24745
|
+
*
|
|
24746
|
+
* Wins over {@link limit} when both are sent.
|
|
24747
|
+
*/
|
|
24748
|
+
maxClusters: number().int().positive().optional(),
|
|
24749
|
+
/**
|
|
24750
|
+
* @deprecated Ambiguous name for {@link maxClusters} — it cuts the
|
|
24751
|
+
* RESULT, not the scan. Kept so existing callers keep working; send
|
|
24752
|
+
* `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
|
|
24753
|
+
*/
|
|
24754
|
+
limit: number().int().positive().optional(),
|
|
24755
|
+
/**
|
|
24756
|
+
* Cap on the number of unassigned faces READ AND CLUSTERED — the
|
|
24757
|
+
* POOL, not the result.
|
|
24758
|
+
*
|
|
24759
|
+
* This is the knob {@link maxClusters} was mistaken for. Clustering
|
|
24760
|
+
* used to read every unassigned face on the hub no matter what the
|
|
24761
|
+
* caller asked for, because the only bound cut the finished clusters
|
|
24762
|
+
* afterwards; a UI showing a window of 100 paid for a scan of the
|
|
24763
|
+
* whole corpus, on an addon whose disk is under contention.
|
|
24764
|
+
*
|
|
24765
|
+
* The pool is the NEWEST matching faces first — the same order the
|
|
24766
|
+
* gallery shows — so a bound here shortens the horizon, it does not
|
|
24767
|
+
* sample it randomly.
|
|
24768
|
+
*
|
|
24769
|
+
* Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
|
|
24770
|
+
* so the live corpus — 372 face rows — is unaffected while the
|
|
24771
|
+
* unbounded scan can never come back as the table grows.
|
|
24772
|
+
*/
|
|
24773
|
+
maxFacesScanned: number().int().positive().optional()
|
|
24774
|
+
}).optional(), array(FaceClusterSchema).readonly());
|
|
24594
24775
|
/**
|
|
24595
24776
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
24596
24777
|
* speed percentage, preset modes, ceiling-fan direction, and
|
|
@@ -28472,6 +28653,211 @@ var SetSiteLocationInputSchema = object({
|
|
|
28472
28653
|
latitude: number().min(-90).max(90),
|
|
28473
28654
|
longitude: number().min(-180).max(180)
|
|
28474
28655
|
}).nullable();
|
|
28656
|
+
/**
|
|
28657
|
+
* One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
|
|
28658
|
+
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28659
|
+
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28660
|
+
* already prints - never a token, never an `Authorization` header.
|
|
28661
|
+
*/
|
|
28662
|
+
var RequestCensusGroupSchema = object({
|
|
28663
|
+
procedure: string(),
|
|
28664
|
+
userAgent: string(),
|
|
28665
|
+
ip: string(),
|
|
28666
|
+
principal: string(),
|
|
28667
|
+
calls: number(),
|
|
28668
|
+
perMin: number()
|
|
28669
|
+
});
|
|
28670
|
+
/**
|
|
28671
|
+
* A procedure's TOTAL over the window, across every caller.
|
|
28672
|
+
*
|
|
28673
|
+
* This block, not the group list, is what answers "did these calls arrive over
|
|
28674
|
+
* HTTP at all". A total far BELOW what a store-side census counted over the
|
|
28675
|
+
* same window excludes the HTTP plane, which is a result, not a failure.
|
|
28676
|
+
*/
|
|
28677
|
+
var RequestCensusProcedureSchema = object({
|
|
28678
|
+
procedure: string(),
|
|
28679
|
+
calls: number(),
|
|
28680
|
+
perMin: number()
|
|
28681
|
+
});
|
|
28682
|
+
/**
|
|
28683
|
+
* The census as an operator sees it.
|
|
28684
|
+
*
|
|
28685
|
+
* `persisted` is the honest answer to "will this survive the restart I am
|
|
28686
|
+
* about to do": the arm deadline is written to `system-settings` so a window
|
|
28687
|
+
* armed now can measure the NEXT boot, and a write that failed must not look
|
|
28688
|
+
* like one that succeeded.
|
|
28689
|
+
*/
|
|
28690
|
+
var RequestCensusStatusSchema = object({
|
|
28691
|
+
armed: boolean(),
|
|
28692
|
+
/** How long the current - or just-closed - window collected, in ms. */
|
|
28693
|
+
elapsedMs: number(),
|
|
28694
|
+
/** The window actually armed, after the server clamped the request. */
|
|
28695
|
+
windowMs: number(),
|
|
28696
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28697
|
+
armedUntilMs: number(),
|
|
28698
|
+
httpRequests: number(),
|
|
28699
|
+
batchedRequests: number(),
|
|
28700
|
+
/**
|
|
28701
|
+
* Procedure invocations. Higher than `httpRequests` whenever tRPC batching
|
|
28702
|
+
* is in play (`?batch=1` carries several procedures in one request); this is
|
|
28703
|
+
* the number comparable with a store-side call count.
|
|
28704
|
+
*/
|
|
28705
|
+
procedureCalls: number(),
|
|
28706
|
+
/**
|
|
28707
|
+
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28708
|
+
* transport resolves one context per connection - but the number that says
|
|
28709
|
+
* whether a plane this census cannot see was busy while HTTP was quiet.
|
|
28710
|
+
*/
|
|
28711
|
+
wsConnections: number(),
|
|
28712
|
+
distinctGroups: number(),
|
|
28713
|
+
/** Calls counted in the totals whose group attribution was shed at the
|
|
28714
|
+
* cardinality bound. */
|
|
28715
|
+
unattributedCalls: number(),
|
|
28716
|
+
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28717
|
+
groups: array(RequestCensusGroupSchema).readonly()
|
|
28718
|
+
}).extend({ persisted: boolean() });
|
|
28719
|
+
/** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
|
|
28720
|
+
var LogLevelSchema$1 = _enum([
|
|
28721
|
+
"debug",
|
|
28722
|
+
"info",
|
|
28723
|
+
"warn",
|
|
28724
|
+
"error"
|
|
28725
|
+
]);
|
|
28726
|
+
/**
|
|
28727
|
+
* The diagnostics that can be ARMED for a window. Exactly one today.
|
|
28728
|
+
*
|
|
28729
|
+
* A diagnostic is anything whose cost is only worth paying while a question is
|
|
28730
|
+
* open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
|
|
28731
|
+
*/
|
|
28732
|
+
var DiagnosticIdSchema = _enum(["request-census"]);
|
|
28733
|
+
/**
|
|
28734
|
+
* The layers of the level hierarchy, general → specific. The most specific
|
|
28735
|
+
* layer that carries an explicit value wins.
|
|
28736
|
+
*
|
|
28737
|
+
* `component` is DECLARED and not yet resolvable: the per-component channels
|
|
28738
|
+
* are a later slice of the same plan, and a `levelSource` enum that has to
|
|
28739
|
+
* grow later would force every consumer of this document to change with it.
|
|
28740
|
+
* Nothing returns `component` today.
|
|
28741
|
+
*/
|
|
28742
|
+
var LoggingScopeKindSchema = _enum([
|
|
28743
|
+
"cluster",
|
|
28744
|
+
"node",
|
|
28745
|
+
"component"
|
|
28746
|
+
]);
|
|
28747
|
+
/** Where an effective level came from. `default` = nothing is set anywhere. */
|
|
28748
|
+
var LoggingLevelSourceSchema = _enum([
|
|
28749
|
+
"default",
|
|
28750
|
+
"cluster",
|
|
28751
|
+
"node",
|
|
28752
|
+
"component"
|
|
28753
|
+
]);
|
|
28754
|
+
/**
|
|
28755
|
+
* One layer of the hierarchy as it actually STANDS.
|
|
28756
|
+
*
|
|
28757
|
+
* `level: null` is the whole reason this array is returned: it is the
|
|
28758
|
+
* difference between "this node is at `info` because I decided it" and
|
|
28759
|
+
* "...because it inherits". An operator who clears an override believing they
|
|
28760
|
+
* are clearing an inherited value has been handed the same defect as the two
|
|
28761
|
+
* contradicting knobs this document exists to remove, moved one floor up.
|
|
28762
|
+
*/
|
|
28763
|
+
var LoggingLevelLayerSchema = object({
|
|
28764
|
+
scope: LoggingScopeKindSchema,
|
|
28765
|
+
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28766
|
+
nodeId: string().nullable(),
|
|
28767
|
+
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28768
|
+
level: LogLevelSchema$1.nullable()
|
|
28769
|
+
});
|
|
28770
|
+
/** What a line is judged against, and WHICH layer decided it. */
|
|
28771
|
+
var LoggingEffectiveSchema = object({
|
|
28772
|
+
level: LogLevelSchema$1,
|
|
28773
|
+
levelSource: LoggingLevelSourceSchema
|
|
28774
|
+
});
|
|
28775
|
+
/** Every layer, general → specific. Never collapsed into the effective value. */
|
|
28776
|
+
var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
|
|
28777
|
+
/**
|
|
28778
|
+
* An armed diagnostic, with its DEADLINE.
|
|
28779
|
+
*
|
|
28780
|
+
* The shape of ADR-0244: what is stored is a deadline and never a flag, so a
|
|
28781
|
+
* diagnostic somebody forgot expires by itself, and a boot-window measurement
|
|
28782
|
+
* survives the restart it exists to measure. `remainingMs` is 0 whenever
|
|
28783
|
+
* `armed` is false — a window is never reported as slightly expired.
|
|
28784
|
+
*/
|
|
28785
|
+
var DiagnosticWindowSchema = object({
|
|
28786
|
+
id: DiagnosticIdSchema,
|
|
28787
|
+
armed: boolean(),
|
|
28788
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28789
|
+
armedUntilMs: number(),
|
|
28790
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
28791
|
+
remainingMs: number(),
|
|
28792
|
+
/** Whether the stored deadline is the one the live diagnostic is running —
|
|
28793
|
+
* i.e. whether this window would survive a restart. */
|
|
28794
|
+
persisted: boolean()
|
|
28795
|
+
});
|
|
28796
|
+
/**
|
|
28797
|
+
* `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
|
|
28798
|
+
* server — there is no maximum here on purpose: a bound repeated in a schema
|
|
28799
|
+
* is a second knob that disagrees with the first the day one of them moves.
|
|
28800
|
+
*/
|
|
28801
|
+
var DiagnosticWindowPatchSchema = object({
|
|
28802
|
+
id: DiagnosticIdSchema,
|
|
28803
|
+
armMs: number().int().min(0),
|
|
28804
|
+
/** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
|
|
28805
|
+
reportEveryMs: number().int().positive().optional()
|
|
28806
|
+
});
|
|
28807
|
+
/**
|
|
28808
|
+
* A PATCH, and patches MERGE.
|
|
28809
|
+
*
|
|
28810
|
+
* A field absent from the patch is left exactly as it was — arming a
|
|
28811
|
+
* diagnostic never resets a level, and setting a level never disarms a window.
|
|
28812
|
+
* The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
|
|
28813
|
+
* `setAll` already merges, and rebuilding the object is how an absent field
|
|
28814
|
+
* turns into an erased one.
|
|
28815
|
+
*/
|
|
28816
|
+
var LoggingSettingsPatchSchema = object({
|
|
28817
|
+
/**
|
|
28818
|
+
* Absent leaves the level untouched. `null` CLEARS the explicit value at the
|
|
28819
|
+
* addressed scope so it inherits again. A value sets it.
|
|
28820
|
+
*/
|
|
28821
|
+
level: LogLevelSchema$1.nullable().optional(),
|
|
28822
|
+
/**
|
|
28823
|
+
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28824
|
+
* keeps running — a patch is never a full replacement.
|
|
28825
|
+
*/
|
|
28826
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
28827
|
+
});
|
|
28828
|
+
/**
|
|
28829
|
+
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
28830
|
+
*
|
|
28831
|
+
* Deliberately NOT called `nodeId`: that key is reserved on every cap method
|
|
28832
|
+
* input — the generated router strips it and uses it to resolve the PROVIDER
|
|
28833
|
+
* on that node (`resolveProvider(cap, nodeId, …)`). A document about
|
|
28834
|
+
* `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
|
|
28835
|
+
* by an agent that holds no cluster document at all. The hub is the single
|
|
28836
|
+
* authority over the whole hierarchy and answers for every layer, so the
|
|
28837
|
+
* layer selector needs a name the transport does not already own.
|
|
28838
|
+
*/
|
|
28839
|
+
var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
|
|
28840
|
+
var SetLoggingSettingsInputSchema = object({
|
|
28841
|
+
scopeNodeId: string().optional(),
|
|
28842
|
+
patch: LoggingSettingsPatchSchema
|
|
28843
|
+
});
|
|
28844
|
+
/**
|
|
28845
|
+
* The whole document, as read and as returned after every write.
|
|
28846
|
+
*
|
|
28847
|
+
* `persisted: false` means the settings store could not be read or written.
|
|
28848
|
+
* The in-memory mirror still governs behaviour and is unchanged by the
|
|
28849
|
+
* failure — a read that fails neither switches a level nor disarms a window
|
|
28850
|
+
* (D49) — but the operator is told that what they are looking at would not
|
|
28851
|
+
* survive a restart.
|
|
28852
|
+
*/
|
|
28853
|
+
var LoggingSettingsStateSchema = object({
|
|
28854
|
+
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28855
|
+
scopeNodeId: string().nullable(),
|
|
28856
|
+
effective: LoggingEffectiveSchema,
|
|
28857
|
+
explicit: LoggingExplicitSchema,
|
|
28858
|
+
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
28859
|
+
persisted: boolean()
|
|
28860
|
+
});
|
|
28475
28861
|
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(), {
|
|
28476
28862
|
kind: "mutation",
|
|
28477
28863
|
auth: "admin"
|
|
@@ -28484,6 +28870,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
28484
28870
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
28485
28871
|
kind: "mutation",
|
|
28486
28872
|
auth: "admin"
|
|
28873
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
28874
|
+
kind: "mutation",
|
|
28875
|
+
auth: "admin"
|
|
28487
28876
|
});
|
|
28488
28877
|
object({
|
|
28489
28878
|
/** True when the device's tamper switch / case-open contact is
|
|
@@ -29112,6 +29501,146 @@ DeviceType.Camera, method(object({
|
|
|
29112
29501
|
detection: array(ZoneRuleSchema).readonly(),
|
|
29113
29502
|
package: array(ZoneRuleSchema).readonly()
|
|
29114
29503
|
});
|
|
29504
|
+
/**
|
|
29505
|
+
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
29506
|
+
* valutatore puro del suo FRONTE.
|
|
29507
|
+
*
|
|
29508
|
+
* Viveva dentro il builtin virtual-doorbell
|
|
29509
|
+
* (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
|
|
29510
|
+
* predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
|
|
29511
|
+
* `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
|
|
29512
|
+
* tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
|
|
29513
|
+
* fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
|
|
29514
|
+
* SPOSTA qui e il doorbell la ri-esporta.
|
|
29515
|
+
*
|
|
29516
|
+
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
29517
|
+
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
29518
|
+
* regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
|
|
29519
|
+
* booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
|
|
29520
|
+
*/
|
|
29521
|
+
/**
|
|
29522
|
+
* Known binary / switch source caps → the boolean slice field whose
|
|
29523
|
+
* false→true rise counts as ACTIVE. Every entry is "fire on active".
|
|
29524
|
+
* Sensors whose "active" reading is not a plain boolean (presence's string
|
|
29525
|
+
* state, connectivity's connected flag) are deliberately excluded — a
|
|
29526
|
+
* reconnect is not a doorbell press, and it is not a recording either.
|
|
29527
|
+
*/
|
|
29528
|
+
var SOURCE_CAP_ACTIVE_FIELD = {
|
|
29529
|
+
contact: "entryOpen",
|
|
29530
|
+
binary: "on",
|
|
29531
|
+
switch: "on",
|
|
29532
|
+
motion: "detected",
|
|
29533
|
+
flood: "flooded",
|
|
29534
|
+
gas: "detected",
|
|
29535
|
+
smoke: "detected",
|
|
29536
|
+
"carbon-monoxide": "detected",
|
|
29537
|
+
vibration: "detected",
|
|
29538
|
+
tamper: "tampered"
|
|
29539
|
+
};
|
|
29540
|
+
/**
|
|
29541
|
+
* The same caps → the slice field carrying the ms-epoch timestamp of the
|
|
29542
|
+
* last transition. Every source cap MUST appear here (guarded by a spec):
|
|
29543
|
+
* without a transition timestamp the evaluator cannot tell a genuine rise
|
|
29544
|
+
* from a boot-time hydration when the FIRST slice it ever sees is already
|
|
29545
|
+
* active, and errs towards silence — swallowing the rise.
|
|
29546
|
+
*
|
|
29547
|
+
* These timestamps are UPSTREAM ones, not ingest ones: the Home Assistant
|
|
29548
|
+
* provider derives them from `state.last_changed`, so they survive our own
|
|
29549
|
+
* restarts and correctly read as "hours ago" for a state that has been
|
|
29550
|
+
* active for hours. `motion` names its rise timestamp `lastDetectedAt`.
|
|
29551
|
+
*/
|
|
29552
|
+
var SOURCE_CAP_CHANGED_AT_FIELD = {
|
|
29553
|
+
contact: "lastChangedAt",
|
|
29554
|
+
binary: "lastChangedAt",
|
|
29555
|
+
switch: "lastChangedAt",
|
|
29556
|
+
motion: "lastDetectedAt",
|
|
29557
|
+
flood: "lastChangedAt",
|
|
29558
|
+
gas: "lastChangedAt",
|
|
29559
|
+
smoke: "lastChangedAt",
|
|
29560
|
+
"carbon-monoxide": "lastChangedAt",
|
|
29561
|
+
vibration: "lastChangedAt",
|
|
29562
|
+
tamper: "lastChangedAt"
|
|
29563
|
+
};
|
|
29564
|
+
/** True when a cap is a recognised binary/switch source. */
|
|
29565
|
+
function isSourceCap(capName) {
|
|
29566
|
+
return Object.prototype.hasOwnProperty.call(SOURCE_CAP_ACTIVE_FIELD, capName);
|
|
29567
|
+
}
|
|
29568
|
+
/** Extract the "active" boolean a source cap's slice carries, or null when
|
|
29569
|
+
* the cap is unknown or the field is missing / non-boolean. */
|
|
29570
|
+
function sliceActiveValue(capName, slice) {
|
|
29571
|
+
const field = SOURCE_CAP_ACTIVE_FIELD[capName];
|
|
29572
|
+
if (field === void 0) return null;
|
|
29573
|
+
const raw = slice[field];
|
|
29574
|
+
return typeof raw === "boolean" ? raw : null;
|
|
29575
|
+
}
|
|
29576
|
+
/** Ms-epoch transition timestamp a source cap's slice carries, or null when
|
|
29577
|
+
* it is absent, non-numeric or the zero "never observed" sentinel. */
|
|
29578
|
+
function sliceChangedAt(capName, slice) {
|
|
29579
|
+
const field = SOURCE_CAP_CHANGED_AT_FIELD[capName];
|
|
29580
|
+
if (field === void 0) return null;
|
|
29581
|
+
const raw = slice[field];
|
|
29582
|
+
if (typeof raw !== "number" || !Number.isFinite(raw) || raw <= 0) return null;
|
|
29583
|
+
return raw;
|
|
29584
|
+
}
|
|
29585
|
+
/**
|
|
29586
|
+
* How recent a source's own transition timestamp must be for a FIRST
|
|
29587
|
+
* sighting that is already active to count as a genuine rise rather than a
|
|
29588
|
+
* hydration of long-standing state.
|
|
29589
|
+
*/
|
|
29590
|
+
var DEFAULT_FIRST_SIGHTING_FRESHNESS_MS = 3e4;
|
|
29591
|
+
/**
|
|
29592
|
+
* IL fronte. Puro: nessun orologio proprio, nessuna memoria — il chiamante
|
|
29593
|
+
* porta `prior`, `nowMs` e il proprio `startedAtMs`.
|
|
29594
|
+
*
|
|
29595
|
+
* Il caso della PRIMA slice già attiva è trattato esplicitamente e vale come
|
|
29596
|
+
* fronte solo se il timestamp UPSTREAM della transizione è posteriore a
|
|
29597
|
+
* `startedAtMs` **e** entro `firstSightingFreshnessMs`. Entrambe le metà
|
|
29598
|
+
* servono: la sola freschezza scatterebbe su un'idratazione al boot di uno
|
|
29599
|
+
* stato flippato pochi secondi prima del riavvio, e il solo "dopo che abbiamo
|
|
29600
|
+
* iniziato" scatterebbe, su un processo di lunga vita, per una sorgente
|
|
29601
|
+
* adottata oggi il cui stato è cambiato ieri. Il caso ambiguo ERRA VERSO IL
|
|
29602
|
+
* SILENZIO e lo dichiara (`baseline-seeded-stale-active`).
|
|
29603
|
+
*/
|
|
29604
|
+
function evaluateSensorEdge(input) {
|
|
29605
|
+
const value = sliceActiveValue(input.capName, input.slice);
|
|
29606
|
+
if (value === null) return {
|
|
29607
|
+
edge: "none",
|
|
29608
|
+
value: null,
|
|
29609
|
+
reason: isSourceCap(input.capName) ? "non-boolean-value" : "unknown-cap"
|
|
29610
|
+
};
|
|
29611
|
+
if (input.prior === void 0) {
|
|
29612
|
+
if (!value) return {
|
|
29613
|
+
edge: "none",
|
|
29614
|
+
value,
|
|
29615
|
+
reason: "baseline-seeded-inactive"
|
|
29616
|
+
};
|
|
29617
|
+
const changedAt = sliceChangedAt(input.capName, input.slice);
|
|
29618
|
+
const floor = Math.max(input.startedAtMs, input.nowMs - input.firstSightingFreshnessMs);
|
|
29619
|
+
if (changedAt === null || changedAt < floor) return {
|
|
29620
|
+
edge: "none",
|
|
29621
|
+
value,
|
|
29622
|
+
reason: "baseline-seeded-stale-active"
|
|
29623
|
+
};
|
|
29624
|
+
return {
|
|
29625
|
+
edge: "rising",
|
|
29626
|
+
value: true
|
|
29627
|
+
};
|
|
29628
|
+
}
|
|
29629
|
+
if (input.prior === value) return {
|
|
29630
|
+
edge: "none",
|
|
29631
|
+
value,
|
|
29632
|
+
reason: "no-change"
|
|
29633
|
+
};
|
|
29634
|
+
if (!value) return {
|
|
29635
|
+
edge: "none",
|
|
29636
|
+
value,
|
|
29637
|
+
reason: "falling-edge"
|
|
29638
|
+
};
|
|
29639
|
+
return {
|
|
29640
|
+
edge: "rising",
|
|
29641
|
+
value: true
|
|
29642
|
+
};
|
|
29643
|
+
}
|
|
29115
29644
|
var HF_BASE_URL = `https://huggingface.co/camstack/camstack-models/resolve/main`;
|
|
29116
29645
|
/**
|
|
29117
29646
|
* Accessory device helpers — shared across drivers.
|
|
@@ -29152,9 +29681,6 @@ var AccessoryKind = {
|
|
|
29152
29681
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
29153
29682
|
};
|
|
29154
29683
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
29155
|
-
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder;
|
|
29156
|
-
new Set(Object.values(DeviceType));
|
|
29157
|
-
DeviceFeature.BatteryOperated;
|
|
29158
29684
|
/**
|
|
29159
29685
|
* THE derivation. One crop rectangle, one presence verdict — see D52 for why
|
|
29160
29686
|
* this repo insists a derived value has exactly one implementation.
|
|
@@ -29173,6 +29699,9 @@ function deriveBatteryPresence(input) {
|
|
|
29173
29699
|
const budget = input.unreachableAfterMs ?? 216e5;
|
|
29174
29700
|
return input.nowMs - lastContactAt > budget ? "unreachable" : "sleeping";
|
|
29175
29701
|
}
|
|
29702
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder;
|
|
29703
|
+
new Set(Object.values(DeviceType));
|
|
29704
|
+
DeviceFeature.BatteryOperated;
|
|
29176
29705
|
Object.freeze({
|
|
29177
29706
|
"accessories.setChildHidden": {
|
|
29178
29707
|
capName: "accessories",
|
|
@@ -34334,6 +34863,18 @@ Object.freeze({
|
|
|
34334
34863
|
addonId: null,
|
|
34335
34864
|
access: "create"
|
|
34336
34865
|
},
|
|
34866
|
+
"system.getLoggingSettings": {
|
|
34867
|
+
capName: "system",
|
|
34868
|
+
capScope: "system",
|
|
34869
|
+
addonId: null,
|
|
34870
|
+
access: "view"
|
|
34871
|
+
},
|
|
34872
|
+
"system.getRequestCensus": {
|
|
34873
|
+
capName: "system",
|
|
34874
|
+
capScope: "system",
|
|
34875
|
+
addonId: null,
|
|
34876
|
+
access: "view"
|
|
34877
|
+
},
|
|
34337
34878
|
"system.getRetentionConfig": {
|
|
34338
34879
|
capName: "system",
|
|
34339
34880
|
capScope: "system",
|
|
@@ -34364,6 +34905,12 @@ Object.freeze({
|
|
|
34364
34905
|
addonId: null,
|
|
34365
34906
|
access: "view"
|
|
34366
34907
|
},
|
|
34908
|
+
"system.setLoggingSettings": {
|
|
34909
|
+
capName: "system",
|
|
34910
|
+
capScope: "system",
|
|
34911
|
+
addonId: null,
|
|
34912
|
+
access: "create"
|
|
34913
|
+
},
|
|
34367
34914
|
"system.setRetentionConfig": {
|
|
34368
34915
|
capName: "system",
|
|
34369
34916
|
capScope: "system",
|
|
@@ -35519,6 +36066,10 @@ Object.freeze({
|
|
|
35519
36066
|
name: "deviceId",
|
|
35520
36067
|
form: "single",
|
|
35521
36068
|
optional: true
|
|
36069
|
+
}, {
|
|
36070
|
+
name: "deviceIds",
|
|
36071
|
+
form: "array",
|
|
36072
|
+
optional: true
|
|
35522
36073
|
}],
|
|
35523
36074
|
"fanControl.setDirection": [{
|
|
35524
36075
|
name: "deviceId",
|
|
@@ -37349,6 +37900,7 @@ var NATIVE_LEASE_BUDGET_KEY = "nativeLeaseBudgetMb";
|
|
|
37349
37900
|
var NATIVE_LEASE_ACTIVITY_KEY = "nativeLeaseActivityMs";
|
|
37350
37901
|
var NATIVE_LEASE_ADMISSION_KEY = "nativeLeaseAdmission";
|
|
37351
37902
|
var NATIVE_LEASE_TILE_BUDGET_KEY = "nativeTileBudgetMb";
|
|
37903
|
+
var NATIVE_LEASE_SCENE_BUDGET_KEY = "nativeSceneBudgetMb";
|
|
37352
37904
|
/**
|
|
37353
37905
|
* WHICH delivered frames the decode worker retains a native copy of.
|
|
37354
37906
|
*
|
|
@@ -37443,7 +37995,38 @@ var NativeLeaseSettingsSchema = object({
|
|
|
37443
37995
|
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
37444
37996
|
* reproduce that.
|
|
37445
37997
|
*/
|
|
37446
|
-
tileBudgetMb: number().int().min(0).max(1024)
|
|
37998
|
+
tileBudgetMb: number().int().min(0).max(1024),
|
|
37999
|
+
/**
|
|
38000
|
+
* RAM ceiling per decode worker, in MB, for the SCENE TILES — one
|
|
38001
|
+
* JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
|
|
38002
|
+
* subject tiles, on frames that detected something.
|
|
38003
|
+
*
|
|
38004
|
+
* It exists because a subject tile cannot answer a FULL-FRAME request:
|
|
38005
|
+
* containment is strict by design, so the native `keyFrame`, the detail
|
|
38006
|
+
* plane's `frameJpeg` rung and the display-crop fallback had no rung at all
|
|
38007
|
+
* below the hold. Measured on the live cluster: 23.3% of key-frame captures
|
|
38008
|
+
* missed, 95.7% of them with `worker-lease-gone` — the raster released one
|
|
38009
|
+
* frame-time after delivery, with the request only p50 367 ms behind it.
|
|
38010
|
+
*
|
|
38011
|
+
* Sizing, and why this is a budget and not a duration: a scene tile is
|
|
38012
|
+
* ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
|
|
38013
|
+
* ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
|
|
38014
|
+
* camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
|
|
38015
|
+
* frames, i.e. the store's 30 s TTL binds at the steady state and the budget
|
|
38016
|
+
* binds only through a detection burst, where it still covers well past the
|
|
38017
|
+
* measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
|
|
38018
|
+
* would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
|
|
38019
|
+
* whole shape exists to avoid.
|
|
38020
|
+
*
|
|
38021
|
+
* A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
|
|
38022
|
+
* subject tile, so one shared budget would let a busy camera's key frames
|
|
38023
|
+
* evict the face/plate tiles the recognisers depend on. Two budgets make that
|
|
38024
|
+
* impossible rather than unlikely. `0` DISABLES scene tiles and restores the
|
|
38025
|
+
* pre-existing behaviour, where a late full-frame request had nothing but the
|
|
38026
|
+
* ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
|
|
38027
|
+
* nothing.
|
|
38028
|
+
*/
|
|
38029
|
+
sceneBudgetMb: number().int().min(0).max(1024)
|
|
37447
38030
|
});
|
|
37448
38031
|
/**
|
|
37449
38032
|
* The values in force when the operator has set nothing.
|
|
@@ -37459,12 +38042,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
|
37459
38042
|
budgetMb: 1024,
|
|
37460
38043
|
activityMs: 15e3,
|
|
37461
38044
|
tileBudgetMb: 64,
|
|
38045
|
+
sceneBudgetMb: 48,
|
|
37462
38046
|
admission: "inferred"
|
|
37463
38047
|
};
|
|
37464
38048
|
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
37465
38049
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
37466
38050
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
37467
38051
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
38052
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
37468
38053
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
37469
38054
|
/**
|
|
37470
38055
|
* Parse one knob, reporting `null` for absent, junk, out-of-bounds — AND for a
|
|
@@ -37513,12 +38098,14 @@ function readNativeLeaseOverride(config) {
|
|
|
37513
38098
|
const activityMs = readKnob("activityMs", config[NATIVE_LEASE_ACTIVITY_KEY]);
|
|
37514
38099
|
const admission = readAdmissionKnob(config[NATIVE_LEASE_ADMISSION_KEY]);
|
|
37515
38100
|
const tileBudgetMb = readKnob("tileBudgetMb", config[NATIVE_LEASE_TILE_BUDGET_KEY]);
|
|
38101
|
+
const sceneBudgetMb = readKnob("sceneBudgetMb", config[NATIVE_LEASE_SCENE_BUDGET_KEY]);
|
|
37516
38102
|
return {
|
|
37517
38103
|
...holdFrames === null ? {} : { holdFrames },
|
|
37518
38104
|
...budgetMb === null ? {} : { budgetMb },
|
|
37519
38105
|
...activityMs === null ? {} : { activityMs },
|
|
37520
38106
|
...admission === null ? {} : { admission },
|
|
37521
|
-
...tileBudgetMb === null ? {} : { tileBudgetMb }
|
|
38107
|
+
...tileBudgetMb === null ? {} : { tileBudgetMb },
|
|
38108
|
+
...sceneBudgetMb === null ? {} : { sceneBudgetMb }
|
|
37522
38109
|
};
|
|
37523
38110
|
}
|
|
37524
38111
|
function isHydratedField(entry) {
|
|
@@ -37529,7 +38116,8 @@ var LEASE_KEYS = [
|
|
|
37529
38116
|
NATIVE_LEASE_BUDGET_KEY,
|
|
37530
38117
|
NATIVE_LEASE_ACTIVITY_KEY,
|
|
37531
38118
|
NATIVE_LEASE_ADMISSION_KEY,
|
|
37532
|
-
NATIVE_LEASE_TILE_BUDGET_KEY
|
|
38119
|
+
NATIVE_LEASE_TILE_BUDGET_KEY,
|
|
38120
|
+
NATIVE_LEASE_SCENE_BUDGET_KEY
|
|
37533
38121
|
];
|
|
37534
38122
|
/**
|
|
37535
38123
|
* Extract the operator's lease overrides from an
|
|
@@ -38335,6 +38923,12 @@ Object.defineProperty(exports, "DEFAULT_EVENTS_BAND_BUFFER_SEC", {
|
|
|
38335
38923
|
return DEFAULT_EVENTS_BAND_BUFFER_SEC;
|
|
38336
38924
|
}
|
|
38337
38925
|
});
|
|
38926
|
+
Object.defineProperty(exports, "DEFAULT_FIRST_SIGHTING_FRESHNESS_MS", {
|
|
38927
|
+
enumerable: true,
|
|
38928
|
+
get: function() {
|
|
38929
|
+
return DEFAULT_FIRST_SIGHTING_FRESHNESS_MS;
|
|
38930
|
+
}
|
|
38931
|
+
});
|
|
38338
38932
|
Object.defineProperty(exports, "DEFAULT_NATIVE_LEASE_SETTINGS", {
|
|
38339
38933
|
enumerable: true,
|
|
38340
38934
|
get: function() {
|
|
@@ -38611,6 +39205,12 @@ Object.defineProperty(exports, "errMsg", {
|
|
|
38611
39205
|
return errMsg;
|
|
38612
39206
|
}
|
|
38613
39207
|
});
|
|
39208
|
+
Object.defineProperty(exports, "evaluateSensorEdge", {
|
|
39209
|
+
enumerable: true,
|
|
39210
|
+
get: function() {
|
|
39211
|
+
return evaluateSensorEdge;
|
|
39212
|
+
}
|
|
39213
|
+
});
|
|
38614
39214
|
Object.defineProperty(exports, "evaluateZoneRules", {
|
|
38615
39215
|
enumerable: true,
|
|
38616
39216
|
get: function() {
|
|
@@ -38647,6 +39247,12 @@ Object.defineProperty(exports, "isEvent", {
|
|
|
38647
39247
|
return isEvent;
|
|
38648
39248
|
}
|
|
38649
39249
|
});
|
|
39250
|
+
Object.defineProperty(exports, "isFirstLevelMacroClass", {
|
|
39251
|
+
enumerable: true,
|
|
39252
|
+
get: function() {
|
|
39253
|
+
return isFirstLevelMacroClass;
|
|
39254
|
+
}
|
|
39255
|
+
});
|
|
38650
39256
|
Object.defineProperty(exports, "isSoftwareDecode", {
|
|
38651
39257
|
enumerable: true,
|
|
38652
39258
|
get: function() {
|