@camstack/addon-export-hap 1.2.142 → 1.2.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hap-export.addon.js +300 -157
- package/dist/hap-export.addon.mjs +300 -157
- package/package.json +1 -1
|
@@ -38,7 +38,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
38
38
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
39
39
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
40
40
|
//#endregion
|
|
41
|
-
//#region ../types/dist/event-category-
|
|
41
|
+
//#region ../types/dist/event-category-BGmz_oxW.mjs
|
|
42
42
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
43
43
|
EventCategory["SystemBoot"] = "system.boot";
|
|
44
44
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -571,6 +571,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
571
571
|
*/
|
|
572
572
|
EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
|
|
573
573
|
EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
|
|
574
|
+
/**
|
|
575
|
+
* A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
|
|
576
|
+
* data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
|
|
577
|
+
* consumer is the orchestrator's camera-sensors bridge, which re-emits the
|
|
578
|
+
* camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
|
|
579
|
+
* for a camera with no attached sensor). Providers must not emit
|
|
580
|
+
* `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
|
|
581
|
+
* keeps it so (camera-grid is a named, deferred exception).
|
|
582
|
+
*/
|
|
574
583
|
EventCategory["ProviderMotion"] = "provider.motion";
|
|
575
584
|
EventCategory["ProviderDetection"] = "provider.detection";
|
|
576
585
|
EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
|
|
@@ -5409,7 +5418,7 @@ var ZodIssueCode = {
|
|
|
5409
5418
|
var ZodFirstPartyTypeKind;
|
|
5410
5419
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5411
5420
|
//#endregion
|
|
5412
|
-
//#region ../types/dist/sleep-
|
|
5421
|
+
//#region ../types/dist/sleep-CDCONfkt.mjs
|
|
5413
5422
|
/**
|
|
5414
5423
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5415
5424
|
* window to float samples (D455).
|
|
@@ -7507,7 +7516,7 @@ function errMsg$16(err) {
|
|
|
7507
7516
|
return String(err);
|
|
7508
7517
|
}
|
|
7509
7518
|
//#endregion
|
|
7510
|
-
//#region ../types/dist/composition-
|
|
7519
|
+
//#region ../types/dist/composition-D7ULvLdD.mjs
|
|
7511
7520
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
7512
7521
|
opus: "libopus",
|
|
7513
7522
|
aac: "aac",
|
|
@@ -8156,21 +8165,20 @@ function portable(target) {
|
|
|
8156
8165
|
}
|
|
8157
8166
|
portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
|
|
8158
8167
|
/**
|
|
8159
|
-
*
|
|
8160
|
-
*
|
|
8168
|
+
* THE table "which boolean of this device type counts as HIGH", and the
|
|
8169
|
+
* pure evaluator of its EDGE.
|
|
8161
8170
|
*
|
|
8162
|
-
*
|
|
8163
|
-
*
|
|
8164
|
-
*
|
|
8165
|
-
*
|
|
8166
|
-
*
|
|
8167
|
-
*
|
|
8168
|
-
* SPOSTA qui e il doorbell la ri-esporta.
|
|
8171
|
+
* ONE table for everyone who asks "is this device HIGH?": the
|
|
8172
|
+
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
8173
|
+
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
8174
|
+
* the sources of a composite doorbell (`doorbellFeatureSources`, D671).
|
|
8175
|
+
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
8176
|
+
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
8169
8177
|
*
|
|
8170
|
-
* ⚠
|
|
8171
|
-
*
|
|
8172
|
-
*
|
|
8173
|
-
*
|
|
8178
|
+
* ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
|
|
8179
|
+
* two must not be unified: that one answers "what is the state WORD for a
|
|
8180
|
+
* rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
|
|
8181
|
+
* boolean's EDGE counts". Deliberately different vocabularies.
|
|
8174
8182
|
*/
|
|
8175
8183
|
/**
|
|
8176
8184
|
* Known binary / switch source caps → the boolean slice field whose
|
|
@@ -9847,22 +9855,22 @@ var CLASS_MAP_MACRO_TARGETS = [
|
|
|
9847
9855
|
"package"
|
|
9848
9856
|
];
|
|
9849
9857
|
/**
|
|
9850
|
-
*
|
|
9851
|
-
*
|
|
9858
|
+
* The FIRST-LEVEL macro classes: those an object detector emits and that
|
|
9859
|
+
* an operator can select.
|
|
9852
9860
|
*
|
|
9853
|
-
*
|
|
9861
|
+
* They are the three offered by the `object-detection` step
|
|
9854
9862
|
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
9855
|
-
* `enabledMacroClasses`). `package`
|
|
9856
|
-
* `MACRO_LABELS` —
|
|
9857
|
-
* `package-detection`,
|
|
9858
|
-
*
|
|
9863
|
+
* `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
|
|
9864
|
+
* `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
|
|
9865
|
+
* `package-detection`, whose enablement is driven by zones, and offering the
|
|
9866
|
+
* same word twice has already made an operator turn on the COCO proxy
|
|
9859
9867
|
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
9860
9868
|
*
|
|
9861
|
-
*
|
|
9862
|
-
*
|
|
9863
|
-
* (`types/detection.ts`);
|
|
9864
|
-
* (`RecordingTriggers.objectClasses`)
|
|
9865
|
-
*
|
|
9869
|
+
* ONE list. Before today the same three were hand-written in the step's offer
|
|
9870
|
+
* and a second time as the union `FirstLevelMacro`
|
|
9871
|
+
* (`types/detection.ts`); a third copy for the recording trigger
|
|
9872
|
+
* (`RecordingTriggers.objectClasses`) would have made the later divergence
|
|
9873
|
+
* invisible.
|
|
9866
9874
|
*/
|
|
9867
9875
|
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
9868
9876
|
"person",
|
|
@@ -9927,17 +9935,17 @@ var RecordingStorageModeSchema = _enum([
|
|
|
9927
9935
|
"on-device-decision"
|
|
9928
9936
|
]);
|
|
9929
9937
|
/**
|
|
9930
|
-
*
|
|
9931
|
-
*
|
|
9938
|
+
* The macro classes that can open a recording window — the same
|
|
9939
|
+
* three offered by the `object-detection` step, from ONE list
|
|
9932
9940
|
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
9933
9941
|
*/
|
|
9934
9942
|
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
9935
9943
|
/**
|
|
9936
|
-
* True
|
|
9944
|
+
* True when `values` does not repeat an element.
|
|
9937
9945
|
*
|
|
9938
|
-
*
|
|
9939
|
-
*
|
|
9940
|
-
*
|
|
9946
|
+
* A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
|
|
9947
|
+
* becomes a SOURCE in `bandTriggerSources`, and the same source twice
|
|
9948
|
+
* would count its windows twice in `segmentMissedByMs`.
|
|
9941
9949
|
*/
|
|
9942
9950
|
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
9943
9951
|
/** Which detectors trigger an `events`-mode band. */
|
|
@@ -9945,34 +9953,34 @@ var RecordingTriggersSchema = object({
|
|
|
9945
9953
|
motion: boolean().optional(),
|
|
9946
9954
|
audioThresholdDbfs: number().optional(),
|
|
9947
9955
|
/**
|
|
9948
|
-
*
|
|
9949
|
-
*
|
|
9950
|
-
*
|
|
9951
|
-
*
|
|
9956
|
+
* The macro classes whose detection opens a window. ABSENT = the source
|
|
9957
|
+
* is not listened to; an EMPTY array is rejected, because "events band, object
|
|
9958
|
+
* trigger on, no class" is the same shape "enabled and records
|
|
9959
|
+
* nothing, forever" that `eventsBandCanEverDemand` is written against.
|
|
9952
9960
|
*
|
|
9953
|
-
*
|
|
9954
|
-
*
|
|
9955
|
-
* `minConfidence<Macro>`
|
|
9956
|
-
* (`source: 'onboard'`)
|
|
9957
|
-
*
|
|
9961
|
+
* The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
|
|
9962
|
+
* those that went through `enabledMacroClasses`, the
|
|
9963
|
+
* `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
|
|
9964
|
+
* (`source: 'onboard'`) goes through none of those gates and does NOT open
|
|
9965
|
+
* windows — see `recorder/object-trigger.ts`.
|
|
9958
9966
|
*/
|
|
9959
9967
|
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
9960
9968
|
/**
|
|
9961
|
-
*
|
|
9962
|
-
*
|
|
9969
|
+
* The LINKED devices whose RISING EDGE opens a window. Absent = the source
|
|
9970
|
+
* is not listened to; an empty array is rejected for the same reason as
|
|
9963
9971
|
* `objectClasses`.
|
|
9964
9972
|
*
|
|
9965
|
-
*
|
|
9966
|
-
*
|
|
9967
|
-
*
|
|
9968
|
-
*
|
|
9969
|
-
* device (D12) —
|
|
9973
|
+
* These are SOURCE device ids, not cameras: the band names them, so the
|
|
9974
|
+
* hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
|
|
9975
|
+
* does no RPC. The OFFER from which the operator picks them is another question, and
|
|
9976
|
+
* is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
9977
|
+
* device (D12) — never a global list of caps.
|
|
9970
9978
|
*
|
|
9971
|
-
*
|
|
9972
|
-
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`)
|
|
9973
|
-
*
|
|
9974
|
-
*
|
|
9975
|
-
*
|
|
9979
|
+
* What "high" means depends on the device TYPE and is not decided here:
|
|
9980
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
|
|
9981
|
+
* the same one as the composite doorbell (D671). And it is the EDGE, not
|
|
9982
|
+
* the level: a contact found already open at runner restart does not
|
|
9983
|
+
* record.
|
|
9976
9984
|
*/
|
|
9977
9985
|
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
9978
9986
|
});
|
|
@@ -11115,7 +11123,7 @@ var DecoderSessionConfigSchema = object({
|
|
|
11115
11123
|
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
11116
11124
|
* thing: the logging settings document on the `system` cap. Two authorities
|
|
11117
11125
|
* over the values is the exact defect
|
|
11118
|
-
* `docs/design/plans/2026-08-26-
|
|
11126
|
+
* `docs/design/plans/2026-08-26-per-component-logging.md` was written to
|
|
11119
11127
|
* remove; re-introducing it from the cure side would be grotesque.
|
|
11120
11128
|
*
|
|
11121
11129
|
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
@@ -14656,7 +14664,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
14656
14664
|
*
|
|
14657
14665
|
* ⚠ An earlier version of this comment blamed Zod stripping, and that
|
|
14658
14666
|
* was wrong — corrected 2026-08-26 after the hop map
|
|
14659
|
-
* (`docs/design/2026-08-26-
|
|
14667
|
+
* (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
|
|
14660
14668
|
* There is **no Zod parse at all** between the door and the engine: the
|
|
14661
14669
|
* dispatcher forwards the payload verbatim and UDS carries it whole. A
|
|
14662
14670
|
* field declared here reaches `SqliteSettingsBackend` either way.
|
|
@@ -15493,7 +15501,17 @@ var SiteZoneSchema = object({
|
|
|
15493
15501
|
var ProviderStatusSchema = object({
|
|
15494
15502
|
connected: boolean(),
|
|
15495
15503
|
deviceCount: number(),
|
|
15496
|
-
error: string().optional()
|
|
15504
|
+
error: string().optional(),
|
|
15505
|
+
/**
|
|
15506
|
+
* `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
|
|
15507
|
+
* — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
|
|
15508
|
+
* which every provider bundles, so only a provider BUILT from D696-amended
|
|
15509
|
+
* code says it. ABSENT means an older provider that may still write it (raw
|
|
15510
|
+
* VMD writes, a boot seed), and the orchestrator's provider gate keeps that
|
|
15511
|
+
* provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
|
|
15512
|
+
* — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
|
|
15513
|
+
*/
|
|
15514
|
+
motionSliceWriter: literal("orchestrator").optional()
|
|
15497
15515
|
});
|
|
15498
15516
|
object({
|
|
15499
15517
|
externalId: string(),
|
|
@@ -16291,28 +16309,10 @@ method(object({
|
|
|
16291
16309
|
deviceIds: array(number()).readonly(),
|
|
16292
16310
|
caps: array(string()).readonly().optional()
|
|
16293
16311
|
}), record(string(), record(string(), unknown().nullable())));
|
|
16294
|
-
|
|
16295
|
-
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
16296
|
-
lastPressedAt: number().nullable(),
|
|
16297
|
-
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
16298
|
-
pressCountSinceStart: number()
|
|
16299
|
-
});
|
|
16300
|
-
object({
|
|
16301
|
-
deviceId: number(),
|
|
16302
|
-
timestamp: number()
|
|
16303
|
-
});
|
|
16304
|
-
/**
|
|
16305
|
-
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
16306
|
-
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
16307
|
-
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
16308
|
-
*/
|
|
16309
|
-
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
16312
|
+
var ExtensionSlotIdSchema = _enum(["linked-devices"]);
|
|
16310
16313
|
DeviceType.Camera;
|
|
16311
|
-
DeviceType.Button, DeviceType.Camera;
|
|
16312
|
-
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
16313
|
-
DeviceType.Camera, DeviceType.Camera;
|
|
16314
16314
|
/** A slot's editable value, discriminated on `slot`. */
|
|
16315
|
-
var ExtensionSlotValueSchema = discriminatedUnion("slot", [
|
|
16315
|
+
var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
16316
16316
|
DeviceType.Camera;
|
|
16317
16317
|
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
16318
16318
|
state: literal("unreachable"),
|
|
@@ -16349,10 +16349,11 @@ var ExtensionSlotSourceSchema = object({
|
|
|
16349
16349
|
});
|
|
16350
16350
|
/**
|
|
16351
16351
|
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
16352
|
-
* reported read-only, named, never written through this contract (D62).
|
|
16353
|
-
*
|
|
16354
|
-
*
|
|
16355
|
-
* `unknown` means the gate could
|
|
16352
|
+
* reported read-only, named, never written through this contract (D62) — e.g.
|
|
16353
|
+
* a slot whose sources act only while a wrapper is bound to the host, a
|
|
16354
|
+
* binding that belongs to `deviceManager.setWrapperActive`. No slot reports
|
|
16355
|
+
* one today (`linked-devices` answers `null`). `unknown` means the gate could
|
|
16356
|
+
* not be read; it is not "inactive" (D315).
|
|
16356
16357
|
*/
|
|
16357
16358
|
var ExtensionSlotActivationSchema = object({
|
|
16358
16359
|
state: _enum([
|
|
@@ -16368,7 +16369,7 @@ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
|
16368
16369
|
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
16369
16370
|
slotRef: string(),
|
|
16370
16371
|
slot: ExtensionSlotIdSchema,
|
|
16371
|
-
/** Names the store written (D62), e.g. `
|
|
16372
|
+
/** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
|
|
16372
16373
|
authority: string(),
|
|
16373
16374
|
activation: ExtensionSlotActivationSchema.nullable(),
|
|
16374
16375
|
value: ExtensionSlotValueSchema,
|
|
@@ -16646,7 +16647,7 @@ method(object({
|
|
|
16646
16647
|
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
16647
16648
|
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
16648
16649
|
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
16649
|
-
* ricontrolliamo tutti questi punti"
|
|
16650
|
+
* ricontrolliamo tutti questi punti"* [can we instrument these errors in the meantime? That way next round we recheck all these points]. Reading them meant grepping Loki and
|
|
16650
16651
|
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
16651
16652
|
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
16652
16653
|
* be READ.
|
|
@@ -20853,6 +20854,29 @@ object({
|
|
|
20853
20854
|
firstAt: number(),
|
|
20854
20855
|
lastAt: number()
|
|
20855
20856
|
});
|
|
20857
|
+
var NC_ALARM_TRIGGERED_MAX_SEC = 3600;
|
|
20858
|
+
var NcAlarmDelaySecSchema = number().int().min(0).max(600);
|
|
20859
|
+
var NcAlarmTriggeredSecSchema = number().int().min(0).max(NC_ALARM_TRIGGERED_MAX_SEC);
|
|
20860
|
+
var uniqueModes = (entries) => new Set(entries.map((e) => e.mode)).size === entries.length;
|
|
20861
|
+
var NcAlarmModeDelaysListSchema = array(object({
|
|
20862
|
+
mode: AlarmArmModeSchema,
|
|
20863
|
+
exitDelaySec: NcAlarmDelaySecSchema.optional(),
|
|
20864
|
+
entryDelaySec: NcAlarmDelaySecSchema.optional(),
|
|
20865
|
+
triggeredDurationSec: NcAlarmTriggeredSecSchema.optional()
|
|
20866
|
+
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
20867
|
+
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
20868
|
+
mode: AlarmArmModeSchema,
|
|
20869
|
+
exitDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
|
|
20870
|
+
entryDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
|
|
20871
|
+
triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional()
|
|
20872
|
+
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
20873
|
+
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
20874
|
+
var NcAlarmNonBlockingEditSchema = object({
|
|
20875
|
+
mode: AlarmArmModeSchema,
|
|
20876
|
+
deviceId: number().int().positive(),
|
|
20877
|
+
/** true = on the list (may be open, does not block); false = off the list (blocks). */
|
|
20878
|
+
nonBlocking: boolean()
|
|
20879
|
+
});
|
|
20856
20880
|
/**
|
|
20857
20881
|
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
20858
20882
|
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
@@ -20861,10 +20885,10 @@ object({
|
|
|
20861
20885
|
var NcAlarmNonBlockingListSchema = array(object({
|
|
20862
20886
|
mode: AlarmArmModeSchema,
|
|
20863
20887
|
deviceIds: array(number().int()).max(200)
|
|
20864
|
-
})).max(8).refine(
|
|
20888
|
+
})).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
|
|
20865
20889
|
/**
|
|
20866
|
-
* The three durations
|
|
20867
|
-
* transitions, and which openings each mode tolerates.
|
|
20890
|
+
* The three durations — global, and per mode since D697 — the panel's state
|
|
20891
|
+
* machine runs on, who hears about its transitions, and which openings each mode tolerates.
|
|
20868
20892
|
*
|
|
20869
20893
|
* They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
|
|
20870
20894
|
* `alarm-panel` is `deviceNative` and its other provider mirrors somebody
|
|
@@ -20874,15 +20898,15 @@ var NcAlarmNonBlockingListSchema = array(object({
|
|
|
20874
20898
|
*/
|
|
20875
20899
|
var NcAlarmSettingsSchema = object({
|
|
20876
20900
|
/** Grace period between arming and the mode taking effect. 0 = immediate. */
|
|
20877
|
-
exitDelaySec:
|
|
20901
|
+
exitDelaySec: NcAlarmDelaySecSchema,
|
|
20878
20902
|
/** Grace period between a trigger and the alarm firing. 0 = immediate. */
|
|
20879
|
-
entryDelaySec:
|
|
20903
|
+
entryDelaySec: NcAlarmDelaySecSchema,
|
|
20880
20904
|
/**
|
|
20881
20905
|
* How long `triggered` lasts before the panel re-arms itself.
|
|
20882
20906
|
* **0 = until an operator disarms it** — the behaviour before this field
|
|
20883
20907
|
* existed, and therefore what an untouched install keeps doing.
|
|
20884
20908
|
*/
|
|
20885
|
-
triggeredDurationSec:
|
|
20909
|
+
triggeredDurationSec: NcAlarmTriggeredSecSchema,
|
|
20886
20910
|
/**
|
|
20887
20911
|
* Deprecated by D630 — every transition is announced. Parsed, never read;
|
|
20888
20912
|
* remove after one release. Optional so an older admin's patch (which still
|
|
@@ -20905,17 +20929,30 @@ var NcAlarmSettingsSchema = object({
|
|
|
20905
20929
|
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
20906
20930
|
* parses as "every opening blocks" — the behaviour it was written under.
|
|
20907
20931
|
*/
|
|
20908
|
-
nonBlocking: NcAlarmNonBlockingListSchema.default([])
|
|
20932
|
+
nonBlocking: NcAlarmNonBlockingListSchema.default([]),
|
|
20933
|
+
/**
|
|
20934
|
+
* Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
|
|
20935
|
+
* without a field, uses the global value above — so `[]`, the default, is exactly the
|
|
20936
|
+
* behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
|
|
20937
|
+
*/
|
|
20938
|
+
modeDelays: NcAlarmModeDelaysListSchema.default([])
|
|
20909
20939
|
});
|
|
20910
20940
|
/**
|
|
20911
20941
|
* Every field optional — a tab edits one control at a time.
|
|
20912
20942
|
*
|
|
20913
|
-
* `nonBlocking`
|
|
20914
|
-
* remove an inner `.default()`, so a patch that never
|
|
20915
|
-
* parse to `
|
|
20916
|
-
* (the same trap {@link NcRulePatchSchema} documents).
|
|
20943
|
+
* `nonBlocking` and `modeDelays` are re-declared WITHOUT their defaults:
|
|
20944
|
+
* `.partial()` does not remove an inner `.default()`, so a patch that never
|
|
20945
|
+
* named the field would parse to `[]` and wipe every mode's list on an
|
|
20946
|
+
* unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
|
|
20947
|
+
* `modeDelays` means EDITS, not the stored overrides.
|
|
20917
20948
|
*/
|
|
20918
|
-
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
|
|
20949
|
+
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
|
|
20950
|
+
nonBlocking: NcAlarmNonBlockingListSchema,
|
|
20951
|
+
/** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
|
|
20952
|
+
modeDelays: NcAlarmModeDelaysEditListSchema,
|
|
20953
|
+
/** ONE membership change; the panel applies it to the list it holds at its turn. */
|
|
20954
|
+
nonBlockingEdit: NcAlarmNonBlockingEditSchema
|
|
20955
|
+
}).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" });
|
|
20919
20956
|
/**
|
|
20920
20957
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
20921
20958
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -21015,6 +21052,28 @@ var NcAlarmConfigSchema = object({
|
|
|
21015
21052
|
*/
|
|
21016
21053
|
live: NcAlarmLiveSchema.optional()
|
|
21017
21054
|
});
|
|
21055
|
+
var NcAlarmSensorReadingSchema = _enum([
|
|
21056
|
+
"open",
|
|
21057
|
+
"closed",
|
|
21058
|
+
"unknown",
|
|
21059
|
+
"not-opening"
|
|
21060
|
+
]);
|
|
21061
|
+
/** One device's state as the alarm reads it — the classifier the arm check uses. */
|
|
21062
|
+
var NcAlarmSensorStateSchema = object({
|
|
21063
|
+
deviceId: number().int().positive(),
|
|
21064
|
+
reading: NcAlarmSensorReadingSchema,
|
|
21065
|
+
/** The word as read (`open`, `closed`, `unlocked`, `stopped`, …); null when unknown / not an opening. */
|
|
21066
|
+
state: string().nullable(),
|
|
21067
|
+
/** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
|
|
21068
|
+
unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
|
|
21069
|
+
/** The device manager's liveness as the centre mirrors it; null = not known. */
|
|
21070
|
+
online: boolean().nullable()
|
|
21071
|
+
});
|
|
21072
|
+
var NcAlarmSensorsInputSchema = object({ deviceIds: array(number().int().positive()).max(500) });
|
|
21073
|
+
var NcAlarmSensorsSchema = object({
|
|
21074
|
+
sensors: array(NcAlarmSensorStateSchema),
|
|
21075
|
+
readAt: number().int().nonnegative()
|
|
21076
|
+
});
|
|
21018
21077
|
/**
|
|
21019
21078
|
* ONE rule's demand on ONE camera's clip ring.
|
|
21020
21079
|
*
|
|
@@ -21105,7 +21164,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
21105
21164
|
}), method(object({}), NcAlarmConfigSchema, { auth: "admin" }), method(object({ patch: NcAlarmSettingsPatchSchema }), NcAlarmConfigSchema, {
|
|
21106
21165
|
kind: "mutation",
|
|
21107
21166
|
auth: "admin"
|
|
21108
|
-
});
|
|
21167
|
+
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
21109
21168
|
/**
|
|
21110
21169
|
* Zod schemas for persisted record types.
|
|
21111
21170
|
*
|
|
@@ -21452,12 +21511,26 @@ var CameraSensorRefSchema = object({
|
|
|
21452
21511
|
function cameraSensorRefKey(ref) {
|
|
21453
21512
|
return `${ref.addonId}/${ref.stableId}`;
|
|
21454
21513
|
}
|
|
21455
|
-
/**
|
|
21456
|
-
|
|
21457
|
-
|
|
21458
|
-
|
|
21459
|
-
|
|
21460
|
-
|
|
21514
|
+
/**
|
|
21515
|
+
* A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
|
|
21516
|
+
* `replace`: its motion is the camera's, and while one is READY the camera's
|
|
21517
|
+
* own motion no longer counts on its own. `confirm`: while one is READY the
|
|
21518
|
+
* camera's own motion counts only while a confirm sensor is active — with or
|
|
21519
|
+
* without a replace sensor (spec C2, the controller's ruling on Q1).
|
|
21520
|
+
*/
|
|
21521
|
+
var CameraSensorModeSchema = _enum([
|
|
21522
|
+
"in-addition",
|
|
21523
|
+
"confirm",
|
|
21524
|
+
"replace"
|
|
21525
|
+
]);
|
|
21526
|
+
/** A stored sensor with no mode — every CS-1 row — is in addition. */
|
|
21527
|
+
var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
|
|
21528
|
+
/**
|
|
21529
|
+
* A camera's attached sensors. A CS-1 row carried an envelope
|
|
21530
|
+
* `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
|
|
21531
|
+
* what the write stores (D672 rule 3), so it is never written again.
|
|
21532
|
+
*/
|
|
21533
|
+
var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
|
|
21461
21534
|
const seen = /* @__PURE__ */ new Set();
|
|
21462
21535
|
value.sensors.forEach((ref, index) => {
|
|
21463
21536
|
const key = cameraSensorRefKey(ref);
|
|
@@ -21469,39 +21542,41 @@ var CameraSensorsConfigSchema = object({
|
|
|
21469
21542
|
seen.add(key);
|
|
21470
21543
|
});
|
|
21471
21544
|
});
|
|
21472
|
-
|
|
21545
|
+
/** Every attachment names its mode; an older orchestrator that does not is in addition. */
|
|
21546
|
+
var AttachmentFields = {
|
|
21473
21547
|
addonId: string(),
|
|
21474
|
-
stableId: string()
|
|
21548
|
+
stableId: string(),
|
|
21549
|
+
mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
|
|
21475
21550
|
};
|
|
21476
21551
|
var CameraSensorAttachmentSchema = discriminatedUnion("state", [
|
|
21477
21552
|
object({
|
|
21478
|
-
...
|
|
21553
|
+
...AttachmentFields,
|
|
21479
21554
|
state: literal("ready"),
|
|
21480
21555
|
deviceId: number(),
|
|
21481
21556
|
name: string(),
|
|
21482
21557
|
caps: array(string()).readonly()
|
|
21483
21558
|
}),
|
|
21484
21559
|
object({
|
|
21485
|
-
...
|
|
21560
|
+
...AttachmentFields,
|
|
21486
21561
|
state: literal("offline"),
|
|
21487
21562
|
deviceId: number(),
|
|
21488
21563
|
name: string(),
|
|
21489
21564
|
reason: _enum(["offline", "disabled"])
|
|
21490
21565
|
}),
|
|
21491
21566
|
object({
|
|
21492
|
-
...
|
|
21567
|
+
...AttachmentFields,
|
|
21493
21568
|
state: literal("missing"),
|
|
21494
21569
|
reason: string()
|
|
21495
21570
|
}),
|
|
21496
21571
|
object({
|
|
21497
|
-
...
|
|
21572
|
+
...AttachmentFields,
|
|
21498
21573
|
state: literal("unsupported"),
|
|
21499
21574
|
deviceId: number(),
|
|
21500
21575
|
name: string(),
|
|
21501
21576
|
reason: string()
|
|
21502
21577
|
}),
|
|
21503
21578
|
object({
|
|
21504
|
-
...
|
|
21579
|
+
...AttachmentFields,
|
|
21505
21580
|
state: literal("unreadable"),
|
|
21506
21581
|
reason: string()
|
|
21507
21582
|
})
|
|
@@ -21514,17 +21589,49 @@ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
|
|
|
21514
21589
|
* say.
|
|
21515
21590
|
*/
|
|
21516
21591
|
var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
|
|
21592
|
+
/** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
|
|
21593
|
+
var CameraOwnMotionSchema = _enum([
|
|
21594
|
+
"always",
|
|
21595
|
+
"when-confirmed",
|
|
21596
|
+
"never"
|
|
21597
|
+
]);
|
|
21598
|
+
/** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
|
|
21599
|
+
var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
|
|
21600
|
+
/**
|
|
21601
|
+
* The camera's OWN onboard motion (D696): the raw input the bridge combines,
|
|
21602
|
+
* never the effective value. The camera's `motion` slice is the effective one,
|
|
21603
|
+
* so a view of the camera's own row reads this.
|
|
21604
|
+
* - `atMs`: when the bridge received the camera's last own edge.
|
|
21605
|
+
* - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
|
|
21606
|
+
* AND it is younger than the window the bridge counts the camera's own motion
|
|
21607
|
+
* for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
|
|
21608
|
+
* sends a clear (heartbeats only) therefore reads `false` once no push came
|
|
21609
|
+
* within the window; a status read is a snapshot, so a live view re-asks.
|
|
21610
|
+
* Absent = this orchestrator has not received the camera's own motion since it
|
|
21611
|
+
* started (unknown, never "quiet"), or an orchestrator older than D696.
|
|
21612
|
+
*/
|
|
21613
|
+
var CameraRawLevelSchema = object({
|
|
21614
|
+
detected: boolean(),
|
|
21615
|
+
atMs: number()
|
|
21616
|
+
});
|
|
21517
21617
|
var CameraSensorsStatusSchema = discriminatedUnion("state", [
|
|
21518
|
-
object({
|
|
21618
|
+
object({
|
|
21619
|
+
state: literal("not-configured"),
|
|
21620
|
+
cameraLevel: CameraRawLevelSchema.optional()
|
|
21621
|
+
}),
|
|
21519
21622
|
object({
|
|
21520
21623
|
state: literal("unreadable"),
|
|
21521
|
-
reason: string()
|
|
21624
|
+
reason: string(),
|
|
21625
|
+
cameraLevel: CameraRawLevelSchema.optional()
|
|
21522
21626
|
}),
|
|
21523
21627
|
object({
|
|
21524
21628
|
state: literal("configured"),
|
|
21525
|
-
|
|
21629
|
+
cameraLevel: CameraRawLevelSchema.optional(),
|
|
21526
21630
|
sensors: array(CameraSensorAttachmentSchema).readonly(),
|
|
21527
|
-
|
|
21631
|
+
/** Absent = an orchestrator older than CS-2: it does not say (D315). */
|
|
21632
|
+
cameraMotion: CameraOwnMotionSchema.optional(),
|
|
21633
|
+
notForwarded: CameraSensorsNotForwardedSchema.optional(),
|
|
21634
|
+
notEnforced: CameraSensorsNotEnforcedSchema.optional()
|
|
21528
21635
|
})
|
|
21529
21636
|
]);
|
|
21530
21637
|
Object.freeze({
|
|
@@ -22209,14 +22316,14 @@ var TrackSchema = object({
|
|
|
22209
22316
|
* `derive-returned-null tile=standin`,
|
|
22210
22317
|
* `native-tile tile=native no-key-frame-at-close`, …) written at close and
|
|
22211
22318
|
* CLEARED by the late-keyFrame upgrade when a native tile lands after all.
|
|
22212
|
-
* The operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
22319
|
+
* The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
|
|
22213
22320
|
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
22214
22321
|
*
|
|
22215
22322
|
* **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
|
|
22216
22323
|
* the TILE ranked below native, so a track whose thumbnail landed natively
|
|
22217
22324
|
* while its key frame missed carried no reason at all — three of the four
|
|
22218
22325
|
* `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
|
|
22219
|
-
* that shape, and their "niente ultimo" had no cause anywhere on the row.
|
|
22326
|
+
* that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
|
|
22220
22327
|
* The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
|
|
22221
22328
|
* lastFrame copy source`), so its absence is now on this line whatever the
|
|
22222
22329
|
* tile ended up being.
|
|
@@ -22303,7 +22410,7 @@ var MotionEventSchema = object({
|
|
|
22303
22410
|
/**
|
|
22304
22411
|
* Ms offsets from `timestamp` (the episode's own first rising edge, so the
|
|
22305
22412
|
* first entry is always `0`) of every genuine off→on transition the
|
|
22306
|
-
* episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
|
|
22413
|
+
* episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
|
|
22307
22414
|
* push: a firmware source that keepalives at ~1 Hz for the whole burst
|
|
22308
22415
|
* (Reolink, Hikvision) produces exactly one edge; a source that reports an
|
|
22309
22416
|
* explicit `false` mid-episode and then resumes before the quiet window
|
|
@@ -24715,8 +24822,10 @@ var RunnerCameraConfigSchema = object({
|
|
|
24715
24822
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
24716
24823
|
* analyzer providers) running on decoded frames in this runner.
|
|
24717
24824
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
24718
|
-
* analytics). The provider emits ProviderMotion
|
|
24719
|
-
*
|
|
24825
|
+
* analytics). The provider emits its raw push as `ProviderMotion`
|
|
24826
|
+
* (D673); the orchestrator's camera-sensors bridge re-emits the camera's
|
|
24827
|
+
* effective motion as `MotionOnMotionChanged`, which is what reaches
|
|
24828
|
+
* `reportMotion`.
|
|
24720
24829
|
*/
|
|
24721
24830
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
24722
24831
|
/**
|
|
@@ -24893,7 +25002,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
24893
25002
|
hasGpu: boolean(),
|
|
24894
25003
|
inferenceBackend: string().optional(),
|
|
24895
25004
|
cpuCores: number().optional()
|
|
24896
|
-
})
|
|
25005
|
+
}),
|
|
25006
|
+
/**
|
|
25007
|
+
* Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
|
|
25008
|
+
* runner never writes it. ABSENT = a runner older than D696, which still
|
|
25009
|
+
* writes the slice from its phase machine; the orchestrator does not write
|
|
25010
|
+
* while any runner node is absent-or-unanswered, so one slice never has two
|
|
25011
|
+
* writers.
|
|
25012
|
+
*/
|
|
25013
|
+
motionSliceWriter: literal("orchestrator").optional()
|
|
24897
25014
|
});
|
|
24898
25015
|
/**
|
|
24899
25016
|
* Aggregate runtime metrics for the runner's whole local pool. Mirrors the
|
|
@@ -27529,7 +27646,7 @@ var ClipPlaybackSchema = object({
|
|
|
27529
27646
|
* **One authorised yes is one wake.** `next-natural` — take the clip the next
|
|
27530
27647
|
* time the camera is awake for its own reasons — is deliberately not a member:
|
|
27531
27648
|
* it was proposed, it is free on the battery, and the operator declined it on
|
|
27532
|
-
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."
|
|
27649
|
+
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
|
|
27533
27650
|
* D558 "Considered and not taken").
|
|
27534
27651
|
*/
|
|
27535
27652
|
var ClipWakeSchema = _enum(["authorised"]);
|
|
@@ -27796,7 +27913,7 @@ var videoclipsCapability = {
|
|
|
27796
27913
|
* **It is a SECTION of the Recording tab, at the end of it — not a tab of
|
|
27797
27914
|
* its own.** It shipped as a `clips` top-tab and the operator rejected the
|
|
27798
27915
|
* placement: *"utilizzerei la stessa tab recordings, lì abbiamo già tutto il
|
|
27799
|
-
* necessario, una nuova sezione alla fine per le clips"
|
|
27916
|
+
* necessario, una nuova sezione alla fine per le clips"* [I would use the same recordings tab, there we already have everything necessary, a new section at the end for the clips]. The Recording tab
|
|
27800
27917
|
* already holds the recorder's panel, the schedule bands and the unified
|
|
27801
27918
|
* retention policy; footage the camera itself holds is the same question,
|
|
27802
27919
|
* asked of a different store. `order: 100` puts it after all of them with
|
|
@@ -27857,7 +27974,7 @@ var videoclipsCapability = {
|
|
|
27857
27974
|
* It replaced `sources?: string[]`, a VIEW filter over source ids that
|
|
27858
27975
|
* assumed the answer was a fan-out over everything a camera has. The
|
|
27859
27976
|
* operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
|
|
27860
|
-
* solo"* — so the list is asked of one provider at a time and there is
|
|
27977
|
+
* solo"* [there is only one user] — so the list is asked of one provider at a time and there is
|
|
27861
27978
|
* nothing to filter out of it.
|
|
27862
27979
|
*/
|
|
27863
27980
|
provider: string().min(1)
|
|
@@ -29947,6 +30064,17 @@ object({
|
|
|
29947
30064
|
deviceId: number(),
|
|
29948
30065
|
status: DeviceStatusSchema
|
|
29949
30066
|
});
|
|
30067
|
+
object({
|
|
30068
|
+
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
30069
|
+
lastPressedAt: number().nullable(),
|
|
30070
|
+
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
30071
|
+
pressCountSinceStart: number()
|
|
30072
|
+
});
|
|
30073
|
+
object({
|
|
30074
|
+
deviceId: number(),
|
|
30075
|
+
timestamp: number()
|
|
30076
|
+
});
|
|
30077
|
+
DeviceType.Button, DeviceType.Camera;
|
|
29950
30078
|
/**
|
|
29951
30079
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
29952
30080
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -31607,9 +31735,9 @@ var MotionStatusSchema = object({
|
|
|
31607
31735
|
/** Ms epoch of the last detected-true observation. Null if never detected. */
|
|
31608
31736
|
lastDetectedAt: number().nullable(),
|
|
31609
31737
|
/**
|
|
31610
|
-
* `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device
|
|
31611
|
-
* `null` while false and on every `Sensor`
|
|
31612
|
-
* constant's doc for the one-authority rule.
|
|
31738
|
+
* `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
|
|
31739
|
+
* orchestrator writes it, D696), `null` while false and on every `Sensor`
|
|
31740
|
+
* device (D475) — see that constant's doc for the one-authority rule.
|
|
31613
31741
|
*
|
|
31614
31742
|
* ## Reading this field still arms nothing
|
|
31615
31743
|
*
|
|
@@ -31627,38 +31755,41 @@ var MotionStatusSchema = object({
|
|
|
31627
31755
|
* `addon-export-alexa/src/motion-clear-hold.ts` and
|
|
31628
31756
|
* `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
|
|
31629
31757
|
*
|
|
31630
|
-
* ## Who writes it
|
|
31631
|
-
*
|
|
31632
|
-
* - **Cameras** — the
|
|
31633
|
-
*
|
|
31634
|
-
* `
|
|
31635
|
-
* `
|
|
31636
|
-
*
|
|
31637
|
-
*
|
|
31638
|
-
* a
|
|
31639
|
-
*
|
|
31640
|
-
*
|
|
31641
|
-
*
|
|
31642
|
-
*
|
|
31643
|
-
*
|
|
31644
|
-
*
|
|
31645
|
-
*
|
|
31646
|
-
*
|
|
31647
|
-
*
|
|
31648
|
-
* `
|
|
31649
|
-
*
|
|
31650
|
-
*
|
|
31651
|
-
*
|
|
31652
|
-
*
|
|
31653
|
-
*
|
|
31654
|
-
*
|
|
31655
|
-
* This predates D475 and is not fixed there: the fix touches every
|
|
31656
|
-
* camera provider. Recorded in D475's Consequences. Do not restore the
|
|
31657
|
-
* "sole writer" wording without also removing the other writers.
|
|
31758
|
+
* ## Who writes it (D696)
|
|
31759
|
+
*
|
|
31760
|
+
* - **Cameras** — the orchestrator, and nothing else. It writes the camera's
|
|
31761
|
+
* EFFECTIVE motion (`addon-pipeline-orchestrator`
|
|
31762
|
+
* `camera-sensors/motion-slice.ts`), alongside the effective
|
|
31763
|
+
* `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
|
|
31764
|
+
* for a split camera, an unsplit emitter's direct event, the analyzer and
|
|
31765
|
+
* device activity, as the camera's `motionSources` counts them. A source
|
|
31766
|
+
* that never sends a clear falls one window after its last `true`.
|
|
31767
|
+
* `lastDetectedAt` moves only on an effective rise. No camera provider
|
|
31768
|
+
* writes this slice (not even a boot seed), and neither does the runner's
|
|
31769
|
+
* phase machine: its phase is "a session is attached" for every on-motion
|
|
31770
|
+
* session, not motion, and it now has its own `DetectionPhaseTransition`.
|
|
31771
|
+
* A provider's `isDetected` answers from the hub's slice.
|
|
31772
|
+
* - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
|
|
31773
|
+
* imports) — the provider pushes both edges itself, from the upstream
|
|
31774
|
+
* system's own state change. That is the sensor's own fact.
|
|
31775
|
+
*
|
|
31776
|
+
* `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
|
|
31777
|
+
* `motion` slice; each sensor writer is a named exemption.
|
|
31778
|
+
*
|
|
31779
|
+
* This replaces the D475 §4 rule ("the phase machine is the sole writer").
|
|
31780
|
+
* That rule was never true: Hikvision and Amcrest wrote the slice raw beside
|
|
31781
|
+
* it, every provider seeded it at boot, and every session left it
|
|
31782
|
+
* `detected: true` after its detach.
|
|
31658
31783
|
*/
|
|
31659
31784
|
autoClearAfterMs: number().nullable()
|
|
31660
31785
|
});
|
|
31661
|
-
|
|
31786
|
+
/**
|
|
31787
|
+
* Payload of `motion.onMotionChanged` event + the corresponding bus
|
|
31788
|
+
* event `EventCategory.MotionOnMotionChanged`. Single source of truth
|
|
31789
|
+
* — both the cap event surface and the bus payload type alias to this
|
|
31790
|
+
* schema.
|
|
31791
|
+
*/
|
|
31792
|
+
var MotionOnMotionChangedDataSchema = object({
|
|
31662
31793
|
deviceId: number(),
|
|
31663
31794
|
detected: boolean(),
|
|
31664
31795
|
timestamp: number(),
|
|
@@ -34123,7 +34254,7 @@ var ReadGopBytesResultSchema = object({
|
|
|
34123
34254
|
/**
|
|
34124
34255
|
* A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
|
|
34125
34256
|
* twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
|
|
34126
|
-
* replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-
|
|
34257
|
+
* replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
|
|
34127
34258
|
* a replay needs several seconds of native pixels, not one frame.
|
|
34128
34259
|
*
|
|
34129
34260
|
* `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
|
|
@@ -41742,6 +41873,12 @@ Object.freeze({
|
|
|
41742
41873
|
addonId: null,
|
|
41743
41874
|
access: "view"
|
|
41744
41875
|
},
|
|
41876
|
+
"notificationRules.getAlarmSensors": {
|
|
41877
|
+
capName: "notification-rules",
|
|
41878
|
+
capScope: "system",
|
|
41879
|
+
addonId: null,
|
|
41880
|
+
access: "view"
|
|
41881
|
+
},
|
|
41745
41882
|
"notificationRules.getClipRetentionAsks": {
|
|
41746
41883
|
capName: "notification-rules",
|
|
41747
41884
|
capScope: "system",
|
|
@@ -46225,6 +46362,11 @@ Object.freeze({
|
|
|
46225
46362
|
form: "single",
|
|
46226
46363
|
optional: false
|
|
46227
46364
|
}],
|
|
46365
|
+
"notificationRules.getAlarmSensors": [{
|
|
46366
|
+
name: "deviceIds",
|
|
46367
|
+
form: "array",
|
|
46368
|
+
optional: false
|
|
46369
|
+
}],
|
|
46228
46370
|
"notificationRules.setDeviceMuted": [{
|
|
46229
46371
|
name: "deviceId",
|
|
46230
46372
|
form: "single",
|
|
@@ -48022,7 +48164,7 @@ var PreviewTextField = string().max(200);
|
|
|
48022
48164
|
* Whether the notification's preview is a STILL or a short animation.
|
|
48023
48165
|
*
|
|
48024
48166
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
48025
|
-
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
48167
|
+
* rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
|
|
48026
48168
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
48027
48169
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
48028
48170
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -48160,6 +48302,7 @@ TimelapseRuleInputSchema.extend({
|
|
|
48160
48302
|
createdAt: number(),
|
|
48161
48303
|
updatedAt: number()
|
|
48162
48304
|
});
|
|
48305
|
+
MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
|
|
48163
48306
|
object({
|
|
48164
48307
|
/**
|
|
48165
48308
|
* Fraction of the box's own size added on EACH side before cutting.
|