@camstack/addon-export-hap 1.2.142 → 1.2.144

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.
@@ -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-C5xZWqz6.mjs
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-gU6hqv4_.mjs
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-Dq42XWp0.mjs
7519
+ //#region ../types/dist/composition-Bzr7GwgP.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
- * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
8160
- * valutatore puro del suo FRONTE.
8168
+ * THE table "which boolean of this device type counts as HIGH", and the
8169
+ * pure evaluator of its EDGE.
8161
8170
  *
8162
- * Viveva dentro il builtin virtual-doorbell
8163
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
8164
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
8165
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
8166
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
8167
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
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
- * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
8171
- * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
8172
- * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
8173
- * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
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
@@ -8191,6 +8199,8 @@ var SOURCE_CAP_ACTIVE_FIELD = {
8191
8199
  vibration: "detected",
8192
8200
  tamper: "tampered"
8193
8201
  };
8202
+ /** Cap names whose presence in a device's bindings qualify it as a source. */
8203
+ var SOURCE_CAPS = Object.keys(SOURCE_CAP_ACTIVE_FIELD);
8194
8204
  /**
8195
8205
  * Error types for the safe expression engine. Two distinct classes so callers
8196
8206
  * can tell a compile-time (grammar) failure from a runtime (evaluation)
@@ -9847,22 +9857,22 @@ var CLASS_MAP_MACRO_TARGETS = [
9847
9857
  "package"
9848
9858
  ];
9849
9859
  /**
9850
- * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
9851
- * un operatore può selezionare.
9860
+ * The FIRST-LEVEL macro classes: those an object detector emits and that
9861
+ * an operator can select.
9852
9862
  *
9853
- * Sono le tre offerte dallo step `object-detection`
9863
+ * They are the three offered by the `object-detection` step
9854
9864
  * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
9855
- * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
9856
- * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
9857
- * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
9858
- * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
9865
+ * `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
9866
+ * `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
9867
+ * `package-detection`, whose enablement is driven by zones, and offering the
9868
+ * same word twice has already made an operator turn on the COCO proxy
9859
9869
  * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
9860
9870
  *
9861
- * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
9862
- * dello step e una seconda volta come union `FirstLevelMacro`
9863
- * (`types/detection.ts`); una terza copia per il trigger di registrazione
9864
- * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
9865
- * successiva.
9871
+ * ONE list. Before today the same three were hand-written in the step's offer
9872
+ * and a second time as the union `FirstLevelMacro`
9873
+ * (`types/detection.ts`); a third copy for the recording trigger
9874
+ * (`RecordingTriggers.objectClasses`) would have made the later divergence
9875
+ * invisible.
9866
9876
  */
9867
9877
  var FIRST_LEVEL_MACRO_CLASSES = [
9868
9878
  "person",
@@ -9927,17 +9937,17 @@ var RecordingStorageModeSchema = _enum([
9927
9937
  "on-device-decision"
9928
9938
  ]);
9929
9939
  /**
9930
- * Le macro classi che possono aprire una finestra di registrazione — le stesse
9931
- * tre offerte dallo step `object-detection`, da UNA lista
9940
+ * The macro classes that can open a recording window — the same
9941
+ * three offered by the `object-detection` step, from ONE list
9932
9942
  * ({@link FIRST_LEVEL_MACRO_CLASSES}).
9933
9943
  */
9934
9944
  var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
9935
9945
  /**
9936
- * True quando `values` non ripete un elemento.
9946
+ * True when `values` does not repeat an element.
9937
9947
  *
9938
- * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
9939
- * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
9940
- * conterebbe due volte le sue finestre in `segmentMissedByMs`.
9948
+ * A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
9949
+ * becomes a SOURCE in `bandTriggerSources`, and the same source twice
9950
+ * would count its windows twice in `segmentMissedByMs`.
9941
9951
  */
9942
9952
  var noDuplicates = (values) => new Set(values).size === values.length;
9943
9953
  /** Which detectors trigger an `events`-mode band. */
@@ -9945,34 +9955,34 @@ var RecordingTriggersSchema = object({
9945
9955
  motion: boolean().optional(),
9946
9956
  audioThresholdDbfs: number().optional(),
9947
9957
  /**
9948
- * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
9949
- * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
9950
- * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
9951
- * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
9958
+ * The macro classes whose detection opens a window. ABSENT = the source
9959
+ * is not listened to; an EMPTY array is rejected, because "events band, object
9960
+ * trigger on, no class" is the same shape "enabled and records
9961
+ * nothing, forever" that `eventsBandCanEverDemand` is written against.
9952
9962
  *
9953
- * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
9954
- * quelle che hanno attraversato `enabledMacroClasses`, i
9955
- * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
9956
- * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
9957
- * finestre — vedi `recorder/object-trigger.ts`.
9963
+ * The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
9964
+ * those that went through `enabledMacroClasses`, the
9965
+ * `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
9966
+ * (`source: 'onboard'`) goes through none of those gates and does NOT open
9967
+ * windows — see `recorder/object-trigger.ts`.
9958
9968
  */
9959
9969
  objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
9960
9970
  /**
9961
- * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
9962
- * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
9971
+ * The LINKED devices whose RISING EDGE opens a window. Absent = the source
9972
+ * is not listened to; an empty array is rejected for the same reason as
9963
9973
  * `objectClasses`.
9964
9974
  *
9965
- * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
9966
- * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
9967
- * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
9968
- * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9969
- * device (D12) — mai un elenco globale di cap.
9975
+ * These are SOURCE device ids, not cameras: the band names them, so the
9976
+ * hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
9977
+ * does no RPC. The OFFER from which the operator picks them is another question, and
9978
+ * is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9979
+ * device (D12) — never a global list of caps.
9970
9980
  *
9971
- * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
9972
- * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
9973
- * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
9974
- * il livello: un contatto trovato già aperto al riavvio del runner non fa
9975
- * registrare.
9981
+ * What "high" means depends on the device TYPE and is not decided here:
9982
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
9983
+ * the same one as the composite doorbell (D671). And it is the EDGE, not
9984
+ * the level: a contact found already open at runner restart does not
9985
+ * record.
9976
9986
  */
9977
9987
  sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9978
9988
  });
@@ -11115,7 +11125,7 @@ var DecoderSessionConfigSchema = object({
11115
11125
  * - **VALUE** — at which level, for which scope, until when. That stays ONE
11116
11126
  * thing: the logging settings document on the `system` cap. Two authorities
11117
11127
  * over the values is the exact defect
11118
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
11128
+ * `docs/design/plans/2026-08-26-per-component-logging.md` was written to
11119
11129
  * remove; re-introducing it from the cure side would be grotesque.
11120
11130
  *
11121
11131
  * Nothing in this file reads a clock, an env var or a store. The registry is
@@ -12914,7 +12924,7 @@ var BrokerStatusEnum = _enum([
12914
12924
  "unreachable",
12915
12925
  "error"
12916
12926
  ]);
12917
- var BrokerInfoSchema$1 = object({
12927
+ var BrokerInfoSchema = object({
12918
12928
  /** Stable broker id. Persisted; survives addon restarts. */
12919
12929
  id: string(),
12920
12930
  /** Addon id of the provider that OWNS this broker.
@@ -13047,7 +13057,7 @@ var GetStateInputSchema = object({
13047
13057
  * HA: entity_id (returns the cached entity state). */
13048
13058
  key: string()
13049
13059
  });
13050
- method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, BrokerInfoSchema$1.nullable()), method(_void(), array(BrokerProviderInfoSchema), { auth: "admin" }), method(AddInputSchema, AddResultSchema, {
13060
+ method(ListInputSchema, array(BrokerInfoSchema)), method(GetInputSchema, BrokerInfoSchema.nullable()), method(_void(), array(BrokerProviderInfoSchema), { auth: "admin" }), method(AddInputSchema, AddResultSchema, {
13051
13061
  kind: "mutation",
13052
13062
  auth: "admin"
13053
13063
  }), method(RemoveInputSchema, _void(), {
@@ -14656,7 +14666,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
14656
14666
  *
14657
14667
  * ⚠ An earlier version of this comment blamed Zod stripping, and that
14658
14668
  * was wrong — corrected 2026-08-26 after the hop map
14659
- * (`docs/design/2026-08-26-mappa-hop-argomenti.md`) traced the path.
14669
+ * (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
14660
14670
  * There is **no Zod parse at all** between the door and the engine: the
14661
14671
  * dispatcher forwards the payload verbatim and UDS carries it whole. A
14662
14672
  * field declared here reaches `SqliteSettingsBackend` either way.
@@ -15493,7 +15503,17 @@ var SiteZoneSchema = object({
15493
15503
  var ProviderStatusSchema = object({
15494
15504
  connected: boolean(),
15495
15505
  deviceCount: number(),
15496
- error: string().optional()
15506
+ error: string().optional(),
15507
+ /**
15508
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
15509
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
15510
+ * which every provider bundles, so only a provider BUILT from D696-amended
15511
+ * code says it. ABSENT means an older provider that may still write it (raw
15512
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
15513
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
15514
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
15515
+ */
15516
+ motionSliceWriter: literal("orchestrator").optional()
15497
15517
  });
15498
15518
  object({
15499
15519
  externalId: string(),
@@ -16291,28 +16311,10 @@ method(object({
16291
16311
  deviceIds: array(number()).readonly(),
16292
16312
  caps: array(string()).readonly().optional()
16293
16313
  }), record(string(), record(string(), unknown().nullable())));
16294
- object({
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()) });
16314
+ var ExtensionSlotIdSchema = _enum(["linked-devices"]);
16310
16315
  DeviceType.Camera;
16311
- DeviceType.Button, DeviceType.Camera;
16312
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
16313
- DeviceType.Camera, DeviceType.Camera;
16314
16316
  /** A slot's editable value, discriminated on `slot`. */
16315
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
16317
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
16316
16318
  DeviceType.Camera;
16317
16319
  var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
16318
16320
  state: literal("unreachable"),
@@ -16349,10 +16351,11 @@ var ExtensionSlotSourceSchema = object({
16349
16351
  });
16350
16352
  /**
16351
16353
  * A DIFFERENT authority that gates whether the slot's sources do anything —
16352
- * reported read-only, named, never written through this contract (D62). The
16353
- * virtual doorbell's sources ring only while the wrapper is bound to the
16354
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
16355
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
16354
+ * reported read-only, named, never written through this contract (D62) — e.g.
16355
+ * a slot whose sources act only while a wrapper is bound to the host, a
16356
+ * binding that belongs to `deviceManager.setWrapperActive`. No slot reports
16357
+ * one today (`linked-devices` answers `null`). `unknown` means the gate could
16358
+ * not be read; it is not "inactive" (D315).
16356
16359
  */
16357
16360
  var ExtensionSlotActivationSchema = object({
16358
16361
  state: _enum([
@@ -16368,7 +16371,7 @@ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
16368
16371
  /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
16369
16372
  slotRef: string(),
16370
16373
  slot: ExtensionSlotIdSchema,
16371
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
16374
+ /** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
16372
16375
  authority: string(),
16373
16376
  activation: ExtensionSlotActivationSchema.nullable(),
16374
16377
  value: ExtensionSlotValueSchema,
@@ -16646,7 +16649,7 @@ method(object({
16646
16649
  * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
16647
16650
  * ends in a log line, and a log line is the thing the operator asked to stop
16648
16651
  * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
16649
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
16652
+ * 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
16653
  * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
16651
16654
  * media blackout were both diagnosed. The counters stay; this is where they can
16652
16655
  * be READ.
@@ -18022,7 +18025,7 @@ var BrokerStatusSchema$1 = _enum([
18022
18025
  "unreachable",
18023
18026
  "tls-error"
18024
18027
  ]);
18025
- var BrokerInfoSchema = object({
18028
+ var BrokerInfoSchema$1 = object({
18026
18029
  id: string(),
18027
18030
  name: string(),
18028
18031
  url: string(),
@@ -18085,7 +18088,7 @@ var StatusSchema = object({
18085
18088
  brokerCount: number(),
18086
18089
  embeddedRunning: boolean()
18087
18090
  });
18088
- method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
18091
+ method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
18089
18092
  kind: "mutation",
18090
18093
  auth: "admin"
18091
18094
  }), method(IdInputSchema, _void(), {
@@ -20261,78 +20264,16 @@ var NcRuleInputSchema = object({
20261
20264
  */
20262
20265
  confirm: NcConfirmSchema.optional(),
20263
20266
  /**
20264
- * WAIT for face/plate recognition before saying anything.
20265
- *
20266
- * A notification's TEXT is frozen at enqueue and its media is re-resolved at
20267
- * send; the identity is neither. A face is confirmed after `confirmFrames`
20268
- * agreeing observations — p50 **11.4 s** after the track was first seen,
20269
- * measured on this hub — and an `immediate` rule enqueues on the first object
20270
- * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
20271
- * immediate path, and no amount of media re-resolution fixes a sentence.
20272
- *
20273
- * Only two honest answers exist, and this flag picks between them. It has
20274
- * effect ONLY on a rule that declares a recognition scope
20275
- * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
20276
- * other rule there is nothing to wait for and the flag is inert.
20277
- *
20278
- * | value | what happens |
20279
- * | --- | --- |
20280
- * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
20281
- * | absent / `false` | it fires at once WITHOUT the name, and if recognition lands before the track closes a SECOND, "…is Gianluca" notification follows (one per track, per rule, per target) |
20282
- *
20283
- * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
20284
- * on the addon cap path, and absent has to keep meaning exactly what every
20285
- * rule authored before this field meant.
20286
- *
20287
- * The cost of `true` is stated here because the editor states it too: a rule
20288
- * that waits also inherits track-close SEMANTICS — its `zones` condition
20289
- * tests every zone the track visited and a `crossing` condition can no longer
20290
- * be satisfied, because a closed track carries no crossing.
20291
- */
20292
- waitForEnhancement: boolean().optional(),
20293
- /**
20294
- * GROUP a burst of subjects into ONE notification that grows.
20295
- *
20296
- * Seconds of quiet after the last matching subject before the burst is
20297
- * considered over. While it is open, the first subject enqueues immediately —
20298
- * **exactly as today, with no added latency** — and every real growth (a new
20299
- * subject, or a name confirmed on one already in it) REPLACES that
20300
- * notification with an updated one naming everybody. The push carries the
20301
- * group's own coalescing tag, so the phone replaces rather than stacks.
20302
- *
20303
- * `0` / absent = off, and off is today's behaviour byte for byte.
20304
- *
20305
- * ### Why an idle cutoff and not a window
20306
- *
20307
- * The measured seven-person arrival on device 590 spans 110 s with every
20308
- * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
20309
- * idle cutoff holds it as one and ends it when the arrival actually ends.
20310
- * 30 s is a widely shipped value for the same decision.
20311
- *
20312
- * ### What it replaces
20313
- *
20314
- * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
20315
- * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
20316
- * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
20317
- * track that did fire and 7 carrying a confirmed identity nobody heard about.
20318
- * A group collapses the same volume by MERGING, so the cooldown becomes a
20319
- * budget over GROUPS — which is what it always meant — and a growth is never
20320
- * throttled by the window its own first member spent.
20321
- *
20322
- * ### Interaction with {@link waitForEnhancement}
20323
- *
20324
- * They compose, and the order matters. `waitForEnhancement` defers the rule to
20325
- * TRACK CLOSE, so with both set the group is opened by the first member to
20326
- * CLOSE — already carrying its name — and grows as later members close. That
20327
- * is later, and complete. With grouping alone the group opens on the first
20328
- * object event and picks up names as they are confirmed, through the growth
20329
- * path. Neither combination fires twice for one subject.
20330
- *
20331
- * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
20332
- * on the addon cap path, so absent must keep meaning what it meant before this
20333
- * field existed.
20267
+ * IMMEDIATE GROUPED (D692): the first matching subject opens a window of this many
20268
+ * seconds; the rule sends ONE message when the window closes — early, once every
20269
+ * subject in it is final, never before {@link NC_GROUPING_MIN_SEC} — naming everybody
20270
+ * the rule matched, with one mosaic tile per subject.
20271
+ * Absent = plain immediate (one message per track, at the first match).
20272
+ * Only an `immediate` DETECTION rule may carry it (`ruleGroupingApplies`, enforced on
20273
+ * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
20274
+ * path does not run Zod defaults.
20334
20275
  */
20335
- groupIdleSec: number().int().min(0).max(600).optional()
20276
+ groupingSec: number().int().min(5).max(60).optional()
20336
20277
  });
20337
20278
  /**
20338
20279
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -20380,9 +20321,10 @@ var NcRuleClearableKeySchema = _enum([
20380
20321
  "targetUsers",
20381
20322
  "snoozeOptions",
20382
20323
  "snoozeAllowGlobal",
20383
- "waitForEnhancement",
20384
20324
  "actions",
20385
20325
  "confirm",
20326
+ "groupingSec",
20327
+ "waitForEnhancement",
20386
20328
  "groupIdleSec"
20387
20329
  ]);
20388
20330
  var NcRuleUpdateInputSchema = object({
@@ -20404,9 +20346,25 @@ var NcRuleSchema = NcRuleInputSchema.extend({
20404
20346
  */
20405
20347
  disabledTargetIds: array(string()).default([])
20406
20348
  });
20349
+ /**
20350
+ * The state-summary SECTIONS (D647 / D698): the D637 kind groups that report a
20351
+ * still-true state. `backups-exports` and `alarm` are not sections — a completed
20352
+ * job is not an open state, and the alarm stays instant.
20353
+ */
20354
+ var NcStateSummarySectionIdSchema = _enum([
20355
+ "device-state",
20356
+ "streams",
20357
+ "battery",
20358
+ "consumables",
20359
+ "tanks",
20360
+ "detection-blind",
20361
+ "nodes",
20362
+ "addons",
20363
+ "updates"
20364
+ ]);
20407
20365
  /** One section of a previewed state summary. `unavailable` = its state could not be read. */
20408
20366
  var NcStateSummaryPreviewSectionSchema = object({
20409
- id: string(),
20367
+ id: NcStateSummarySectionIdSchema,
20410
20368
  status: _enum(["read", "unavailable"]),
20411
20369
  items: number().int().nonnegative(),
20412
20370
  reason: string().optional()
@@ -20416,7 +20374,7 @@ var NcStateSummaryPreviewSectionSchema = object({
20416
20374
  * a `rule` split (no `section`), one section's on a `section` split.
20417
20375
  */
20418
20376
  var NcStateSummaryPreviewRowSchema = object({
20419
- section: string().optional(),
20377
+ section: NcStateSummarySectionIdSchema.optional(),
20420
20378
  /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
20421
20379
  title: string(),
20422
20380
  text: string(),
@@ -20853,6 +20811,29 @@ object({
20853
20811
  firstAt: number(),
20854
20812
  lastAt: number()
20855
20813
  });
20814
+ var NC_ALARM_TRIGGERED_MAX_SEC = 3600;
20815
+ var NcAlarmDelaySecSchema = number().int().min(0).max(600);
20816
+ var NcAlarmTriggeredSecSchema = number().int().min(0).max(NC_ALARM_TRIGGERED_MAX_SEC);
20817
+ var uniqueModes = (entries) => new Set(entries.map((e) => e.mode)).size === entries.length;
20818
+ var NcAlarmModeDelaysListSchema = array(object({
20819
+ mode: AlarmArmModeSchema,
20820
+ exitDelaySec: NcAlarmDelaySecSchema.optional(),
20821
+ entryDelaySec: NcAlarmDelaySecSchema.optional(),
20822
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.optional()
20823
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
20824
+ var NcAlarmModeDelaysEditListSchema = array(object({
20825
+ mode: AlarmArmModeSchema,
20826
+ exitDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20827
+ entryDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20828
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional()
20829
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
20830
+ /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
20831
+ var NcAlarmNonBlockingEditSchema = object({
20832
+ mode: AlarmArmModeSchema,
20833
+ deviceId: number().int().positive(),
20834
+ /** true = on the list (may be open, does not block); false = off the list (blocks). */
20835
+ nonBlocking: boolean()
20836
+ });
20856
20837
  /**
20857
20838
  * The per-mode lists, at most one per mode. Two lists for one mode have no
20858
20839
  * meaning a reader could agree on (union? the last one?), so they are refused
@@ -20861,10 +20842,10 @@ object({
20861
20842
  var NcAlarmNonBlockingListSchema = array(object({
20862
20843
  mode: AlarmArmModeSchema,
20863
20844
  deviceIds: array(number().int()).max(200)
20864
- })).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
20845
+ })).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
20865
20846
  /**
20866
- * The three durations the panel's state machine runs on, who hears about its
20867
- * transitions, and which openings each mode tolerates.
20847
+ * The three durations — global, and per mode since D697 — the panel's state
20848
+ * machine runs on, who hears about its transitions, and which openings each mode tolerates.
20868
20849
  *
20869
20850
  * They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
20870
20851
  * `alarm-panel` is `deviceNative` and its other provider mirrors somebody
@@ -20874,15 +20855,15 @@ var NcAlarmNonBlockingListSchema = array(object({
20874
20855
  */
20875
20856
  var NcAlarmSettingsSchema = object({
20876
20857
  /** Grace period between arming and the mode taking effect. 0 = immediate. */
20877
- exitDelaySec: number().int().min(0).max(600),
20858
+ exitDelaySec: NcAlarmDelaySecSchema,
20878
20859
  /** Grace period between a trigger and the alarm firing. 0 = immediate. */
20879
- entryDelaySec: number().int().min(0).max(600),
20860
+ entryDelaySec: NcAlarmDelaySecSchema,
20880
20861
  /**
20881
20862
  * How long `triggered` lasts before the panel re-arms itself.
20882
20863
  * **0 = until an operator disarms it** — the behaviour before this field
20883
20864
  * existed, and therefore what an untouched install keeps doing.
20884
20865
  */
20885
- triggeredDurationSec: number().int().min(0).max(3600),
20866
+ triggeredDurationSec: NcAlarmTriggeredSecSchema,
20886
20867
  /**
20887
20868
  * Deprecated by D630 — every transition is announced. Parsed, never read;
20888
20869
  * remove after one release. Optional so an older admin's patch (which still
@@ -20905,17 +20886,30 @@ var NcAlarmSettingsSchema = object({
20905
20886
  * per mode is meaningful. Defaulted to `[]` so a blob stored before D630
20906
20887
  * parses as "every opening blocks" — the behaviour it was written under.
20907
20888
  */
20908
- nonBlocking: NcAlarmNonBlockingListSchema.default([])
20889
+ nonBlocking: NcAlarmNonBlockingListSchema.default([]),
20890
+ /**
20891
+ * Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
20892
+ * without a field, uses the global value above — so `[]`, the default, is exactly the
20893
+ * behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
20894
+ */
20895
+ modeDelays: NcAlarmModeDelaysListSchema.default([])
20909
20896
  });
20910
20897
  /**
20911
20898
  * Every field optional — a tab edits one control at a time.
20912
20899
  *
20913
- * `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
20914
- * remove an inner `.default()`, so a patch that never named the field would
20915
- * parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
20916
- * (the same trap {@link NcRulePatchSchema} documents).
20900
+ * `nonBlocking` and `modeDelays` are re-declared WITHOUT their defaults:
20901
+ * `.partial()` does not remove an inner `.default()`, so a patch that never
20902
+ * named the field would parse to `[]` and wipe every mode's list on an
20903
+ * unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
20904
+ * `modeDelays` means EDITS, not the stored overrides.
20917
20905
  */
20918
- var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
20906
+ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
20907
+ nonBlocking: NcAlarmNonBlockingListSchema,
20908
+ /** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
20909
+ modeDelays: NcAlarmModeDelaysEditListSchema,
20910
+ /** ONE membership change; the panel applies it to the list it holds at its turn. */
20911
+ nonBlockingEdit: NcAlarmNonBlockingEditSchema
20912
+ }).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
20913
  /**
20920
20914
  * What one arm mode actually arms, DERIVED from the enabled rules gated on it.
20921
20915
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
@@ -21015,6 +21009,28 @@ var NcAlarmConfigSchema = object({
21015
21009
  */
21016
21010
  live: NcAlarmLiveSchema.optional()
21017
21011
  });
21012
+ var NcAlarmSensorReadingSchema = _enum([
21013
+ "open",
21014
+ "closed",
21015
+ "unknown",
21016
+ "not-opening"
21017
+ ]);
21018
+ /** One device's state as the alarm reads it — the classifier the arm check uses. */
21019
+ var NcAlarmSensorStateSchema = object({
21020
+ deviceId: number().int().positive(),
21021
+ reading: NcAlarmSensorReadingSchema,
21022
+ /** The word as read (`open`, `closed`, `unlocked`, `stopped`, …); null when unknown / not an opening. */
21023
+ state: string().nullable(),
21024
+ /** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
21025
+ unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
21026
+ /** The device manager's liveness as the centre mirrors it; null = not known. */
21027
+ online: boolean().nullable()
21028
+ });
21029
+ var NcAlarmSensorsInputSchema = object({ deviceIds: array(number().int().positive()).max(500) });
21030
+ var NcAlarmSensorsSchema = object({
21031
+ sensors: array(NcAlarmSensorStateSchema),
21032
+ readAt: number().int().nonnegative()
21033
+ });
21018
21034
  /**
21019
21035
  * ONE rule's demand on ONE camera's clip ring.
21020
21036
  *
@@ -21105,7 +21121,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
21105
21121
  }), method(object({}), NcAlarmConfigSchema, { auth: "admin" }), method(object({ patch: NcAlarmSettingsPatchSchema }), NcAlarmConfigSchema, {
21106
21122
  kind: "mutation",
21107
21123
  auth: "admin"
21108
- });
21124
+ }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
21109
21125
  /**
21110
21126
  * Zod schemas for persisted record types.
21111
21127
  *
@@ -21452,12 +21468,26 @@ var CameraSensorRefSchema = object({
21452
21468
  function cameraSensorRefKey(ref) {
21453
21469
  return `${ref.addonId}/${ref.stableId}`;
21454
21470
  }
21455
- /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
21456
- var CameraSensorsModeSchema = _enum(["in-addition"]);
21457
- var CameraSensorsConfigSchema = object({
21458
- mode: CameraSensorsModeSchema,
21459
- sensors: array(CameraSensorRefSchema).min(1).max(8)
21460
- }).superRefine((value, ctx) => {
21471
+ /**
21472
+ * A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
21473
+ * `replace`: its motion is the camera's, and while one is READY the camera's
21474
+ * own motion no longer counts on its own. `confirm`: while one is READY the
21475
+ * camera's own motion counts only while a confirm sensor is active — with or
21476
+ * without a replace sensor (spec C2, the controller's ruling on Q1).
21477
+ */
21478
+ var CameraSensorModeSchema = _enum([
21479
+ "in-addition",
21480
+ "confirm",
21481
+ "replace"
21482
+ ]);
21483
+ /** A stored sensor with no mode — every CS-1 row — is in addition. */
21484
+ var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
21485
+ /**
21486
+ * A camera's attached sensors. A CS-1 row carried an envelope
21487
+ * `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
21488
+ * what the write stores (D672 rule 3), so it is never written again.
21489
+ */
21490
+ var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
21461
21491
  const seen = /* @__PURE__ */ new Set();
21462
21492
  value.sensors.forEach((ref, index) => {
21463
21493
  const key = cameraSensorRefKey(ref);
@@ -21469,39 +21499,41 @@ var CameraSensorsConfigSchema = object({
21469
21499
  seen.add(key);
21470
21500
  });
21471
21501
  });
21472
- var RefFields = {
21502
+ /** Every attachment names its mode; an older orchestrator that does not is in addition. */
21503
+ var AttachmentFields = {
21473
21504
  addonId: string(),
21474
- stableId: string()
21505
+ stableId: string(),
21506
+ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
21475
21507
  };
21476
21508
  var CameraSensorAttachmentSchema = discriminatedUnion("state", [
21477
21509
  object({
21478
- ...RefFields,
21510
+ ...AttachmentFields,
21479
21511
  state: literal("ready"),
21480
21512
  deviceId: number(),
21481
21513
  name: string(),
21482
21514
  caps: array(string()).readonly()
21483
21515
  }),
21484
21516
  object({
21485
- ...RefFields,
21517
+ ...AttachmentFields,
21486
21518
  state: literal("offline"),
21487
21519
  deviceId: number(),
21488
21520
  name: string(),
21489
21521
  reason: _enum(["offline", "disabled"])
21490
21522
  }),
21491
21523
  object({
21492
- ...RefFields,
21524
+ ...AttachmentFields,
21493
21525
  state: literal("missing"),
21494
21526
  reason: string()
21495
21527
  }),
21496
21528
  object({
21497
- ...RefFields,
21529
+ ...AttachmentFields,
21498
21530
  state: literal("unsupported"),
21499
21531
  deviceId: number(),
21500
21532
  name: string(),
21501
21533
  reason: string()
21502
21534
  }),
21503
21535
  object({
21504
- ...RefFields,
21536
+ ...AttachmentFields,
21505
21537
  state: literal("unreadable"),
21506
21538
  reason: string()
21507
21539
  })
@@ -21514,17 +21546,49 @@ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
21514
21546
  * say.
21515
21547
  */
21516
21548
  var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
21549
+ /** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
21550
+ var CameraOwnMotionSchema = _enum([
21551
+ "always",
21552
+ "when-confirmed",
21553
+ "never"
21554
+ ]);
21555
+ /** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
21556
+ var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
21557
+ /**
21558
+ * The camera's OWN onboard motion (D696): the raw input the bridge combines,
21559
+ * never the effective value. The camera's `motion` slice is the effective one,
21560
+ * so a view of the camera's own row reads this.
21561
+ * - `atMs`: when the bridge received the camera's last own edge.
21562
+ * - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
21563
+ * AND it is younger than the window the bridge counts the camera's own motion
21564
+ * for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
21565
+ * sends a clear (heartbeats only) therefore reads `false` once no push came
21566
+ * within the window; a status read is a snapshot, so a live view re-asks.
21567
+ * Absent = this orchestrator has not received the camera's own motion since it
21568
+ * started (unknown, never "quiet"), or an orchestrator older than D696.
21569
+ */
21570
+ var CameraRawLevelSchema = object({
21571
+ detected: boolean(),
21572
+ atMs: number()
21573
+ });
21517
21574
  var CameraSensorsStatusSchema = discriminatedUnion("state", [
21518
- object({ state: literal("not-configured") }),
21575
+ object({
21576
+ state: literal("not-configured"),
21577
+ cameraLevel: CameraRawLevelSchema.optional()
21578
+ }),
21519
21579
  object({
21520
21580
  state: literal("unreadable"),
21521
- reason: string()
21581
+ reason: string(),
21582
+ cameraLevel: CameraRawLevelSchema.optional()
21522
21583
  }),
21523
21584
  object({
21524
21585
  state: literal("configured"),
21525
- mode: CameraSensorsModeSchema,
21586
+ cameraLevel: CameraRawLevelSchema.optional(),
21526
21587
  sensors: array(CameraSensorAttachmentSchema).readonly(),
21527
- notForwarded: CameraSensorsNotForwardedSchema.optional()
21588
+ /** Absent = an orchestrator older than CS-2: it does not say (D315). */
21589
+ cameraMotion: CameraOwnMotionSchema.optional(),
21590
+ notForwarded: CameraSensorsNotForwardedSchema.optional(),
21591
+ notEnforced: CameraSensorsNotEnforcedSchema.optional()
21528
21592
  })
21529
21593
  ]);
21530
21594
  Object.freeze({
@@ -22209,14 +22273,14 @@ var TrackSchema = object({
22209
22273
  * `derive-returned-null tile=standin`,
22210
22274
  * `native-tile tile=native no-key-frame-at-close`, …) written at close and
22211
22275
  * 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
22276
+ * The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
22213
22277
  * tile is a face/plate stand-in, a raster crop, or an icon.
22214
22278
  *
22215
22279
  * **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
22216
22280
  * the TILE ranked below native, so a track whose thumbnail landed natively
22217
22281
  * while its key frame missed carried no reason at all — three of the four
22218
22282
  * `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.
22283
+ * that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
22220
22284
  * The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
22221
22285
  * lastFrame copy source`), so its absence is now on this line whatever the
22222
22286
  * tile ended up being.
@@ -22303,7 +22367,7 @@ var MotionEventSchema = object({
22303
22367
  /**
22304
22368
  * Ms offsets from `timestamp` (the episode's own first rising edge, so the
22305
22369
  * 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
22370
+ * episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
22307
22371
  * push: a firmware source that keepalives at ~1 Hz for the whole burst
22308
22372
  * (Reolink, Hikvision) produces exactly one edge; a source that reports an
22309
22373
  * explicit `false` mid-episode and then resumes before the quiet window
@@ -22827,6 +22891,7 @@ var KeyEventSchema = object({
22827
22891
  bestEventId: string(),
22828
22892
  /** Track lifetime in ms (lastSeen - firstSeen). */
22829
22893
  windowMs: number().optional(),
22894
+ audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
22830
22895
  ...TrackFlagFields,
22831
22896
  ...TrackRetrainFields
22832
22897
  });
@@ -24715,8 +24780,10 @@ var RunnerCameraConfigSchema = object({
24715
24780
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
24716
24781
  * analyzer providers) running on decoded frames in this runner.
24717
24782
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
24718
- * analytics). The provider emits ProviderMotion
24719
- * events; the orchestrator forwards to `reportMotion`.
24783
+ * analytics). The provider emits its raw push as `ProviderMotion`
24784
+ * (D673); the orchestrator's camera-sensors bridge re-emits the camera's
24785
+ * effective motion as `MotionOnMotionChanged`, which is what reaches
24786
+ * `reportMotion`.
24720
24787
  */
24721
24788
  motionSources: MotionSourcesSchema.default(["analyzer"]),
24722
24789
  /**
@@ -24893,7 +24960,15 @@ var RunnerLocalLoadSchema = object({
24893
24960
  hasGpu: boolean(),
24894
24961
  inferenceBackend: string().optional(),
24895
24962
  cpuCores: number().optional()
24896
- })
24963
+ }),
24964
+ /**
24965
+ * Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
24966
+ * runner never writes it. ABSENT = a runner older than D696, which still
24967
+ * writes the slice from its phase machine; the orchestrator does not write
24968
+ * while any runner node is absent-or-unanswered, so one slice never has two
24969
+ * writers.
24970
+ */
24971
+ motionSliceWriter: literal("orchestrator").optional()
24897
24972
  });
24898
24973
  /**
24899
24974
  * Aggregate runtime metrics for the runner's whole local pool. Mirrors the
@@ -27529,7 +27604,7 @@ var ClipPlaybackSchema = object({
27529
27604
  * **One authorised yes is one wake.** `next-natural` — take the clip the next
27530
27605
  * time the camera is awake for its own reasons — is deliberately not a member:
27531
27606
  * 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."*,
27607
+ * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
27533
27608
  * D558 "Considered and not taken").
27534
27609
  */
27535
27610
  var ClipWakeSchema = _enum(["authorised"]);
@@ -27796,7 +27871,7 @@ var videoclipsCapability = {
27796
27871
  * **It is a SECTION of the Recording tab, at the end of it — not a tab of
27797
27872
  * its own.** It shipped as a `clips` top-tab and the operator rejected the
27798
27873
  * placement: *"utilizzerei la stessa tab recordings, lì abbiamo già tutto il
27799
- * necessario, una nuova sezione alla fine per le clips"*. The Recording tab
27874
+ * 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
27875
  * already holds the recorder's panel, the schedule bands and the unified
27801
27876
  * retention policy; footage the camera itself holds is the same question,
27802
27877
  * asked of a different store. `order: 100` puts it after all of them with
@@ -27857,7 +27932,7 @@ var videoclipsCapability = {
27857
27932
  * It replaced `sources?: string[]`, a VIEW filter over source ids that
27858
27933
  * assumed the answer was a fan-out over everything a camera has. The
27859
27934
  * 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
27935
+ * solo"* [there is only one user] — so the list is asked of one provider at a time and there is
27861
27936
  * nothing to filter out of it.
27862
27937
  */
27863
27938
  provider: string().min(1)
@@ -29947,6 +30022,17 @@ object({
29947
30022
  deviceId: number(),
29948
30023
  status: DeviceStatusSchema
29949
30024
  });
30025
+ object({
30026
+ /** Ms epoch of the last press. null = never observed since this provider started. */
30027
+ lastPressedAt: number().nullable(),
30028
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
30029
+ pressCountSinceStart: number()
30030
+ });
30031
+ object({
30032
+ deviceId: number(),
30033
+ timestamp: number()
30034
+ });
30035
+ DeviceType.Button, DeviceType.Camera;
29950
30036
  /**
29951
30037
  * Enum-state sensor — a string value picked from a finite option set.
29952
30038
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -31607,9 +31693,9 @@ var MotionStatusSchema = object({
31607
31693
  /** Ms epoch of the last detected-true observation. Null if never detected. */
31608
31694
  lastDetectedAt: number().nullable(),
31609
31695
  /**
31610
- * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device,
31611
- * `null` while false and on every `Sensor` device (D475) — see that
31612
- * constant's doc for the one-authority rule.
31696
+ * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
31697
+ * orchestrator writes it, D696), `null` while false and on every `Sensor`
31698
+ * device (D475) — see that constant's doc for the one-authority rule.
31613
31699
  *
31614
31700
  * ## Reading this field still arms nothing
31615
31701
  *
@@ -31627,38 +31713,41 @@ var MotionStatusSchema = object({
31627
31713
  * `addon-export-alexa/src/motion-clear-hold.ts` and
31628
31714
  * `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
31629
31715
  *
31630
- * ## Who writes it
31631
- *
31632
- * - **Cameras** — the runner's phase machine, `active → watching` on
31633
- * `cooldown_expired`, which then writes this slice with
31634
- * `detected: false` (`handlePhaseChanged` in
31635
- * `pipeline-runner/index.ts`). It produces the FALLING edge, which
31636
- * matters most for the sources that only ever push a rising one:
31637
- * Reolink emits `MotionOnMotionChanged { detected: true }` and never
31638
- * a false.
31639
- * - **Sensors** (Home Assistant binary sensors, Homematic) — the
31640
- * provider pushes the false itself, from the upstream system's own
31641
- * state change. No phase machine is involved.
31642
- *
31643
- * ### The phase machine is CANONICAL, not sole — and that is a defect
31644
- *
31645
- * An earlier revision of this docblock (mine, 2026-09-12) claimed the
31646
- * phase machine is the sole writer for a camera. It is not.
31647
- * `hikvision-camera.ts:3464` and `amcrest-camera.ts:445` both call
31648
- * `setCapSlice(motionCapability, …)` on their own rising edge, and
31649
- * Hikvision's comment says why: it read THIS docblock, agreed the
31650
- * runner is canonical, and wrote anyway to avoid per-tick churn. So
31651
- * two authorities can disagree about one slice, which this repo
31652
- * forbids, and the doc said otherwise — which is worse than saying
31653
- * nothing, because it reads as verification.
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.
31716
+ * ## Who writes it (D696)
31717
+ *
31718
+ * - **Cameras** — the orchestrator, and nothing else. It writes the camera's
31719
+ * EFFECTIVE motion (`addon-pipeline-orchestrator`
31720
+ * `camera-sensors/motion-slice.ts`), alongside the effective
31721
+ * `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
31722
+ * for a split camera, an unsplit emitter's direct event, the analyzer and
31723
+ * device activity, as the camera's `motionSources` counts them. A source
31724
+ * that never sends a clear falls one window after its last `true`.
31725
+ * `lastDetectedAt` moves only on an effective rise. No camera provider
31726
+ * writes this slice (not even a boot seed), and neither does the runner's
31727
+ * phase machine: its phase is "a session is attached" for every on-motion
31728
+ * session, not motion, and it now has its own `DetectionPhaseTransition`.
31729
+ * A provider's `isDetected` answers from the hub's slice.
31730
+ * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
31731
+ * imports) — the provider pushes both edges itself, from the upstream
31732
+ * system's own state change. That is the sensor's own fact.
31733
+ *
31734
+ * `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
31735
+ * `motion` slice; each sensor writer is a named exemption.
31736
+ *
31737
+ * This replaces the D475 §4 rule ("the phase machine is the sole writer").
31738
+ * That rule was never true: Hikvision and Amcrest wrote the slice raw beside
31739
+ * it, every provider seeded it at boot, and every session left it
31740
+ * `detected: true` after its detach.
31658
31741
  */
31659
31742
  autoClearAfterMs: number().nullable()
31660
31743
  });
31661
- object({
31744
+ /**
31745
+ * Payload of `motion.onMotionChanged` event + the corresponding bus
31746
+ * event `EventCategory.MotionOnMotionChanged`. Single source of truth
31747
+ * — both the cap event surface and the bus payload type alias to this
31748
+ * schema.
31749
+ */
31750
+ var MotionOnMotionChangedDataSchema = object({
31662
31751
  deviceId: number(),
31663
31752
  detected: boolean(),
31664
31753
  timestamp: number(),
@@ -34123,7 +34212,7 @@ var ReadGopBytesResultSchema = object({
34123
34212
  /**
34124
34213
  * A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
34125
34214
  * twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
34126
- * replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-clip-su-pipeline.md`):
34215
+ * replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
34127
34216
  * a replay needs several seconds of native pixels, not one frame.
34128
34217
  *
34129
34218
  * `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
@@ -36764,6 +36853,7 @@ DeviceType.Camera, method(object({
36764
36853
  detection: array(ZoneRuleSchema).readonly(),
36765
36854
  package: array(ZoneRuleSchema).readonly()
36766
36855
  });
36856
+ SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
36767
36857
  /**
36768
36858
  * Accessory device helpers — shared across drivers.
36769
36859
  *
@@ -41742,6 +41832,12 @@ Object.freeze({
41742
41832
  addonId: null,
41743
41833
  access: "view"
41744
41834
  },
41835
+ "notificationRules.getAlarmSensors": {
41836
+ capName: "notification-rules",
41837
+ capScope: "system",
41838
+ addonId: null,
41839
+ access: "view"
41840
+ },
41745
41841
  "notificationRules.getClipRetentionAsks": {
41746
41842
  capName: "notification-rules",
41747
41843
  capScope: "system",
@@ -45320,6 +45416,11 @@ Object.freeze({
45320
45416
  }
45321
45417
  });
45322
45418
  Object.freeze({
45419
+ "accessories.getStatus": [{
45420
+ name: "deviceId",
45421
+ form: "single",
45422
+ optional: false
45423
+ }],
45323
45424
  "accessories.setChildHidden": [{
45324
45425
  name: "childDeviceId",
45325
45426
  form: "single",
@@ -45339,6 +45440,11 @@ Object.freeze({
45339
45440
  form: "single",
45340
45441
  optional: false
45341
45442
  }],
45443
+ "airQualitySensor.getStatus": [{
45444
+ name: "deviceId",
45445
+ form: "single",
45446
+ optional: false
45447
+ }],
45342
45448
  "alarmPanel.arm": [{
45343
45449
  name: "deviceId",
45344
45450
  form: "single",
@@ -45349,11 +45455,36 @@ Object.freeze({
45349
45455
  form: "single",
45350
45456
  optional: false
45351
45457
  }],
45458
+ "alarmPanel.getStatus": [{
45459
+ name: "deviceId",
45460
+ form: "single",
45461
+ optional: false
45462
+ }],
45352
45463
  "alarmPanel.trigger": [{
45353
45464
  name: "deviceId",
45354
45465
  form: "single",
45355
45466
  optional: false
45356
45467
  }],
45468
+ "ambientLightSensor.getStatus": [{
45469
+ name: "deviceId",
45470
+ form: "single",
45471
+ optional: false
45472
+ }],
45473
+ "audioAnalysis.applyDeviceSettingsPatch": [{
45474
+ name: "deviceId",
45475
+ form: "single",
45476
+ optional: false
45477
+ }],
45478
+ "audioAnalysis.getDeviceLiveContribution": [{
45479
+ name: "deviceId",
45480
+ form: "single",
45481
+ optional: false
45482
+ }],
45483
+ "audioAnalysis.getDeviceSettingsContribution": [{
45484
+ name: "deviceId",
45485
+ form: "single",
45486
+ optional: false
45487
+ }],
45357
45488
  "audioAnalysis.resolveDeviceSettings": [{
45358
45489
  name: "deviceId",
45359
45490
  form: "single",
@@ -45394,16 +45525,36 @@ Object.freeze({
45394
45525
  form: "single",
45395
45526
  optional: false
45396
45527
  }],
45528
+ "automationControl.getStatus": [{
45529
+ name: "deviceId",
45530
+ form: "single",
45531
+ optional: false
45532
+ }],
45397
45533
  "automationControl.trigger": [{
45398
45534
  name: "deviceId",
45399
45535
  form: "single",
45400
45536
  optional: false
45401
45537
  }],
45538
+ "battery.getStatus": [{
45539
+ name: "deviceId",
45540
+ form: "single",
45541
+ optional: false
45542
+ }],
45402
45543
  "battery.wakeForStream": [{
45403
45544
  name: "deviceId",
45404
45545
  form: "single",
45405
45546
  optional: false
45406
45547
  }],
45548
+ "binary.getStatus": [{
45549
+ name: "deviceId",
45550
+ form: "single",
45551
+ optional: false
45552
+ }],
45553
+ "brightness.getStatus": [{
45554
+ name: "deviceId",
45555
+ form: "single",
45556
+ optional: false
45557
+ }],
45407
45558
  "brightness.setBrightness": [{
45408
45559
  name: "deviceId",
45409
45560
  form: "single",
@@ -45419,6 +45570,26 @@ Object.freeze({
45419
45570
  form: "single",
45420
45571
  optional: false
45421
45572
  }],
45573
+ "cameraCredentials.getStatus": [{
45574
+ name: "deviceId",
45575
+ form: "single",
45576
+ optional: false
45577
+ }],
45578
+ "cameraGridLayout.applyDeviceSettingsPatch": [{
45579
+ name: "deviceId",
45580
+ form: "single",
45581
+ optional: false
45582
+ }],
45583
+ "cameraGridLayout.getDeviceLiveContribution": [{
45584
+ name: "deviceId",
45585
+ form: "single",
45586
+ optional: false
45587
+ }],
45588
+ "cameraGridLayout.getDeviceSettingsContribution": [{
45589
+ name: "deviceId",
45590
+ form: "single",
45591
+ optional: false
45592
+ }],
45422
45593
  "cameraGridLayout.getLayout": [{
45423
45594
  name: "deviceId",
45424
45595
  form: "single",
@@ -45434,6 +45605,21 @@ Object.freeze({
45434
45605
  form: "single",
45435
45606
  optional: false
45436
45607
  }],
45608
+ "cameraPipelineConfig.applyDeviceSettingsPatch": [{
45609
+ name: "deviceId",
45610
+ form: "single",
45611
+ optional: false
45612
+ }],
45613
+ "cameraPipelineConfig.getDeviceLiveContribution": [{
45614
+ name: "deviceId",
45615
+ form: "single",
45616
+ optional: false
45617
+ }],
45618
+ "cameraPipelineConfig.getDeviceSettingsContribution": [{
45619
+ name: "deviceId",
45620
+ form: "single",
45621
+ optional: false
45622
+ }],
45437
45623
  "cameraStreams.getBrokerStreams": [{
45438
45624
  name: "deviceId",
45439
45625
  form: "single",
@@ -45459,6 +45645,16 @@ Object.freeze({
45459
45645
  form: "single",
45460
45646
  optional: false
45461
45647
  }],
45648
+ "carbonMonoxide.getStatus": [{
45649
+ name: "deviceId",
45650
+ form: "single",
45651
+ optional: false
45652
+ }],
45653
+ "climateControl.getStatus": [{
45654
+ name: "deviceId",
45655
+ form: "single",
45656
+ optional: false
45657
+ }],
45462
45658
  "climateControl.setFanMode": [{
45463
45659
  name: "deviceId",
45464
45660
  form: "single",
@@ -45499,16 +45695,41 @@ Object.freeze({
45499
45695
  form: "single",
45500
45696
  optional: false
45501
45697
  }],
45698
+ "color.getStatus": [{
45699
+ name: "deviceId",
45700
+ form: "single",
45701
+ optional: false
45702
+ }],
45502
45703
  "color.setColor": [{
45503
45704
  name: "deviceId",
45504
45705
  form: "single",
45505
45706
  optional: false
45506
45707
  }],
45708
+ "connectivity.getStatus": [{
45709
+ name: "deviceId",
45710
+ form: "single",
45711
+ optional: false
45712
+ }],
45713
+ "consumables.getStatus": [{
45714
+ name: "deviceId",
45715
+ form: "single",
45716
+ optional: false
45717
+ }],
45507
45718
  "consumables.reset": [{
45508
45719
  name: "deviceId",
45509
45720
  form: "single",
45510
45721
  optional: false
45511
45722
  }],
45723
+ "contact.getStatus": [{
45724
+ name: "deviceId",
45725
+ form: "single",
45726
+ optional: false
45727
+ }],
45728
+ "control.getStatus": [{
45729
+ name: "deviceId",
45730
+ form: "single",
45731
+ optional: false
45732
+ }],
45512
45733
  "control.setValue": [{
45513
45734
  name: "deviceId",
45514
45735
  form: "single",
@@ -45519,6 +45740,11 @@ Object.freeze({
45519
45740
  form: "single",
45520
45741
  optional: false
45521
45742
  }],
45743
+ "cover.getStatus": [{
45744
+ name: "deviceId",
45745
+ form: "single",
45746
+ optional: false
45747
+ }],
45522
45748
  "cover.open": [{
45523
45749
  name: "deviceId",
45524
45750
  form: "single",
@@ -45544,6 +45770,11 @@ Object.freeze({
45544
45770
  form: "single",
45545
45771
  optional: false
45546
45772
  }],
45773
+ "dayNight.getStatus": [{
45774
+ name: "deviceId",
45775
+ form: "single",
45776
+ optional: false
45777
+ }],
45547
45778
  "dayNight.setSettings": [{
45548
45779
  name: "deviceId",
45549
45780
  form: "single",
@@ -45554,11 +45785,31 @@ Object.freeze({
45554
45785
  form: "single",
45555
45786
  optional: true
45556
45787
  }],
45788
+ "detectionPipeline.applyDeviceSettingsPatch": [{
45789
+ name: "deviceId",
45790
+ form: "single",
45791
+ optional: false
45792
+ }],
45793
+ "detectionPipeline.getDeviceLiveContribution": [{
45794
+ name: "deviceId",
45795
+ form: "single",
45796
+ optional: false
45797
+ }],
45798
+ "detectionPipeline.getDeviceSettingsContribution": [{
45799
+ name: "deviceId",
45800
+ form: "single",
45801
+ optional: false
45802
+ }],
45557
45803
  "deviceAdminLink.getAdminLink": [{
45558
45804
  name: "deviceId",
45559
45805
  form: "single",
45560
45806
  optional: false
45561
45807
  }],
45808
+ "deviceAdoption.getStatus": [{
45809
+ name: "deviceId",
45810
+ form: "single",
45811
+ optional: false
45812
+ }],
45562
45813
  "deviceAdoption.release": [{
45563
45814
  name: "camDeviceId",
45564
45815
  form: "single",
@@ -45574,6 +45825,11 @@ Object.freeze({
45574
45825
  form: "single",
45575
45826
  optional: false
45576
45827
  }],
45828
+ "deviceDiscovery.getStatus": [{
45829
+ name: "deviceId",
45830
+ form: "single",
45831
+ optional: false
45832
+ }],
45577
45833
  "deviceDiscovery.listDiscovered": [{
45578
45834
  name: "deviceId",
45579
45835
  form: "single",
@@ -45593,6 +45849,21 @@ Object.freeze({
45593
45849
  form: "single",
45594
45850
  optional: false
45595
45851
  }],
45852
+ "deviceExport.applyDeviceSettingsPatch": [{
45853
+ name: "deviceId",
45854
+ form: "single",
45855
+ optional: false
45856
+ }],
45857
+ "deviceExport.getDeviceLiveContribution": [{
45858
+ name: "deviceId",
45859
+ form: "single",
45860
+ optional: false
45861
+ }],
45862
+ "deviceExport.getDeviceSettingsContribution": [{
45863
+ name: "deviceId",
45864
+ form: "single",
45865
+ optional: false
45866
+ }],
45596
45867
  "deviceExtension.listCandidates": [{
45597
45868
  name: "deviceId",
45598
45869
  form: "single",
@@ -45941,6 +46212,26 @@ Object.freeze({
45941
46212
  form: "single",
45942
46213
  optional: false
45943
46214
  }],
46215
+ "deviceStatus.getStatus": [{
46216
+ name: "deviceId",
46217
+ form: "single",
46218
+ optional: false
46219
+ }],
46220
+ "doorbell.getStatus": [{
46221
+ name: "deviceId",
46222
+ form: "single",
46223
+ optional: false
46224
+ }],
46225
+ "enumSensor.getStatus": [{
46226
+ name: "deviceId",
46227
+ form: "single",
46228
+ optional: false
46229
+ }],
46230
+ "eventEmitter.getStatus": [{
46231
+ name: "deviceId",
46232
+ form: "single",
46233
+ optional: false
46234
+ }],
45944
46235
  "faceGallery.getFaceByTrack": [{
45945
46236
  name: "deviceId",
45946
46237
  form: "single",
@@ -45955,6 +46246,11 @@ Object.freeze({
45955
46246
  form: "array",
45956
46247
  optional: true
45957
46248
  }],
46249
+ "fanControl.getStatus": [{
46250
+ name: "deviceId",
46251
+ form: "single",
46252
+ optional: false
46253
+ }],
45958
46254
  "fanControl.setDirection": [{
45959
46255
  name: "deviceId",
45960
46256
  form: "single",
@@ -45975,6 +46271,26 @@ Object.freeze({
45975
46271
  form: "single",
45976
46272
  optional: false
45977
46273
  }],
46274
+ "featureProbe.getStatus": [{
46275
+ name: "deviceId",
46276
+ form: "single",
46277
+ optional: false
46278
+ }],
46279
+ "flood.getStatus": [{
46280
+ name: "deviceId",
46281
+ form: "single",
46282
+ optional: false
46283
+ }],
46284
+ "gas.getStatus": [{
46285
+ name: "deviceId",
46286
+ form: "single",
46287
+ optional: false
46288
+ }],
46289
+ "humidifier.getStatus": [{
46290
+ name: "deviceId",
46291
+ form: "single",
46292
+ optional: false
46293
+ }],
45978
46294
  "humidifier.setMode": [{
45979
46295
  name: "deviceId",
45980
46296
  form: "single",
@@ -45990,11 +46306,26 @@ Object.freeze({
45990
46306
  form: "single",
45991
46307
  optional: false
45992
46308
  }],
46309
+ "humiditySensor.getStatus": [{
46310
+ name: "deviceId",
46311
+ form: "single",
46312
+ optional: false
46313
+ }],
46314
+ "image.getStatus": [{
46315
+ name: "deviceId",
46316
+ form: "single",
46317
+ optional: false
46318
+ }],
45993
46319
  "imageSettings.getOptions": [{
45994
46320
  name: "deviceId",
45995
46321
  form: "single",
45996
46322
  optional: false
45997
46323
  }],
46324
+ "imageSettings.getStatus": [{
46325
+ name: "deviceId",
46326
+ form: "single",
46327
+ optional: false
46328
+ }],
45998
46329
  "imageSettings.setSettings": [{
45999
46330
  name: "deviceId",
46000
46331
  form: "single",
@@ -46005,6 +46336,11 @@ Object.freeze({
46005
46336
  form: "single",
46006
46337
  optional: false
46007
46338
  }],
46339
+ "intercom.getStatus": [{
46340
+ name: "deviceId",
46341
+ form: "single",
46342
+ optional: false
46343
+ }],
46008
46344
  "intercom.handleAnswer": [{
46009
46345
  name: "deviceId",
46010
46346
  form: "single",
@@ -46035,6 +46371,11 @@ Object.freeze({
46035
46371
  form: "single",
46036
46372
  optional: false
46037
46373
  }],
46374
+ "lawnMowerControl.getStatus": [{
46375
+ name: "deviceId",
46376
+ form: "single",
46377
+ optional: false
46378
+ }],
46038
46379
  "lawnMowerControl.pause": [{
46039
46380
  name: "deviceId",
46040
46381
  form: "single",
@@ -46045,6 +46386,11 @@ Object.freeze({
46045
46386
  form: "single",
46046
46387
  optional: false
46047
46388
  }],
46389
+ "lockControl.getStatus": [{
46390
+ name: "deviceId",
46391
+ form: "single",
46392
+ optional: false
46393
+ }],
46048
46394
  "lockControl.lock": [{
46049
46395
  name: "deviceId",
46050
46396
  form: "single",
@@ -46060,6 +46406,11 @@ Object.freeze({
46060
46406
  form: "single",
46061
46407
  optional: false
46062
46408
  }],
46409
+ "mediaPlayer.getStatus": [{
46410
+ name: "deviceId",
46411
+ form: "single",
46412
+ optional: false
46413
+ }],
46063
46414
  "mediaPlayer.next": [{
46064
46415
  name: "deviceId",
46065
46416
  form: "single",
@@ -46120,6 +46471,11 @@ Object.freeze({
46120
46471
  form: "single",
46121
46472
  optional: false
46122
46473
  }],
46474
+ "motion.getStatus": [{
46475
+ name: "deviceId",
46476
+ form: "single",
46477
+ optional: false
46478
+ }],
46123
46479
  "motion.isDetected": [{
46124
46480
  name: "deviceId",
46125
46481
  form: "single",
@@ -46130,11 +46486,31 @@ Object.freeze({
46130
46486
  form: "single",
46131
46487
  optional: false
46132
46488
  }],
46489
+ "motionDetection.applyDeviceSettingsPatch": [{
46490
+ name: "deviceId",
46491
+ form: "single",
46492
+ optional: false
46493
+ }],
46494
+ "motionDetection.getDeviceLiveContribution": [{
46495
+ name: "deviceId",
46496
+ form: "single",
46497
+ optional: false
46498
+ }],
46499
+ "motionDetection.getDeviceSettingsContribution": [{
46500
+ name: "deviceId",
46501
+ form: "single",
46502
+ optional: false
46503
+ }],
46133
46504
  "motionDetection.removeCamera": [{
46134
46505
  name: "deviceId",
46135
46506
  form: "single",
46136
46507
  optional: false
46137
46508
  }],
46509
+ "motionTrigger.getStatus": [{
46510
+ name: "deviceId",
46511
+ form: "single",
46512
+ optional: false
46513
+ }],
46138
46514
  "motionTrigger.setMotionTrigger": [{
46139
46515
  name: "deviceId",
46140
46516
  form: "single",
@@ -46145,6 +46521,11 @@ Object.freeze({
46145
46521
  form: "single",
46146
46522
  optional: false
46147
46523
  }],
46524
+ "motionZones.getStatus": [{
46525
+ name: "deviceId",
46526
+ form: "single",
46527
+ optional: false
46528
+ }],
46148
46529
  "motionZones.setZone": [{
46149
46530
  name: "deviceId",
46150
46531
  form: "single",
@@ -46155,6 +46536,11 @@ Object.freeze({
46155
46536
  form: "single",
46156
46537
  optional: false
46157
46538
  }],
46539
+ "nativeObjectDetection.getStatus": [{
46540
+ name: "deviceId",
46541
+ form: "single",
46542
+ optional: false
46543
+ }],
46158
46544
  "nativeObjectDetection.setEnabled": [{
46159
46545
  name: "deviceId",
46160
46546
  form: "single",
@@ -46170,6 +46556,11 @@ Object.freeze({
46170
46556
  form: "single",
46171
46557
  optional: false
46172
46558
  }],
46559
+ "navigation.getStatus": [{
46560
+ name: "deviceId",
46561
+ form: "single",
46562
+ optional: false
46563
+ }],
46173
46564
  "navigation.goToPoint": [{
46174
46565
  name: "deviceId",
46175
46566
  form: "single",
@@ -46215,6 +46606,11 @@ Object.freeze({
46215
46606
  form: "single",
46216
46607
  optional: false
46217
46608
  }],
46609
+ "networkLink.getStatus": [{
46610
+ name: "deviceId",
46611
+ form: "single",
46612
+ optional: false
46613
+ }],
46218
46614
  "networkQuality.getDeviceStats": [{
46219
46615
  name: "deviceId",
46220
46616
  form: "single",
@@ -46225,6 +46621,11 @@ Object.freeze({
46225
46621
  form: "single",
46226
46622
  optional: false
46227
46623
  }],
46624
+ "notificationRules.getAlarmSensors": [{
46625
+ name: "deviceIds",
46626
+ form: "array",
46627
+ optional: false
46628
+ }],
46228
46629
  "notificationRules.setDeviceMuted": [{
46229
46630
  name: "deviceId",
46230
46631
  form: "single",
@@ -46235,11 +46636,26 @@ Object.freeze({
46235
46636
  form: "single",
46236
46637
  optional: false
46237
46638
  }],
46639
+ "notifier.getStatus": [{
46640
+ name: "deviceId",
46641
+ form: "single",
46642
+ optional: false
46643
+ }],
46238
46644
  "notifier.send": [{
46239
46645
  name: "deviceId",
46240
46646
  form: "single",
46241
46647
  optional: false
46242
46648
  }],
46649
+ "numericSensor.getStatus": [{
46650
+ name: "deviceId",
46651
+ form: "single",
46652
+ optional: false
46653
+ }],
46654
+ "osd.getStatus": [{
46655
+ name: "deviceId",
46656
+ form: "single",
46657
+ optional: false
46658
+ }],
46243
46659
  "osd.setOverlay": [{
46244
46660
  name: "deviceId",
46245
46661
  form: "single",
@@ -46299,6 +46715,11 @@ Object.freeze({
46299
46715
  form: "single",
46300
46716
  optional: false
46301
46717
  }],
46718
+ "petFeeder.getStatus": [{
46719
+ name: "deviceId",
46720
+ form: "single",
46721
+ optional: false
46722
+ }],
46302
46723
  "petFeeder.markFoodReplenished": [{
46303
46724
  name: "deviceId",
46304
46725
  form: "single",
@@ -46334,6 +46755,11 @@ Object.freeze({
46334
46755
  form: "single",
46335
46756
  optional: false
46336
46757
  }],
46758
+ "pipelineAnalytics.applyDeviceSettingsPatch": [{
46759
+ name: "deviceId",
46760
+ form: "single",
46761
+ optional: false
46762
+ }],
46337
46763
  "pipelineAnalytics.clearTrackRelation": [{
46338
46764
  name: "deviceId",
46339
46765
  form: "single",
@@ -46374,6 +46800,16 @@ Object.freeze({
46374
46800
  form: "single",
46375
46801
  optional: false
46376
46802
  }],
46803
+ "pipelineAnalytics.getDeviceLiveContribution": [{
46804
+ name: "deviceId",
46805
+ form: "single",
46806
+ optional: false
46807
+ }],
46808
+ "pipelineAnalytics.getDeviceSettingsContribution": [{
46809
+ name: "deviceId",
46810
+ form: "single",
46811
+ optional: false
46812
+ }],
46377
46813
  "pipelineAnalytics.getEventDensity": [{
46378
46814
  name: "deviceId",
46379
46815
  form: "single",
@@ -46589,6 +47025,11 @@ Object.freeze({
46589
47025
  form: "single",
46590
47026
  optional: true
46591
47027
  }],
47028
+ "pipelineOrchestrator.applyDeviceSettingsPatch": [{
47029
+ name: "deviceId",
47030
+ form: "single",
47031
+ optional: false
47032
+ }],
46592
47033
  "pipelineOrchestrator.assignAudio": [{
46593
47034
  name: "deviceId",
46594
47035
  form: "single",
@@ -46634,6 +47075,16 @@ Object.freeze({
46634
47075
  form: "single",
46635
47076
  optional: false
46636
47077
  }],
47078
+ "pipelineOrchestrator.getDeviceLiveContribution": [{
47079
+ name: "deviceId",
47080
+ form: "single",
47081
+ optional: false
47082
+ }],
47083
+ "pipelineOrchestrator.getDeviceSettingsContribution": [{
47084
+ name: "deviceId",
47085
+ form: "single",
47086
+ optional: false
47087
+ }],
46637
47088
  "pipelineOrchestrator.getPipelineAssignment": [{
46638
47089
  name: "deviceId",
46639
47090
  form: "single",
@@ -46754,11 +47205,31 @@ Object.freeze({
46754
47205
  form: "single",
46755
47206
  optional: true
46756
47207
  }],
47208
+ "powerMeter.getStatus": [{
47209
+ name: "deviceId",
47210
+ form: "single",
47211
+ optional: false
47212
+ }],
47213
+ "presence.getStatus": [{
47214
+ name: "deviceId",
47215
+ form: "single",
47216
+ optional: false
47217
+ }],
47218
+ "pressureSensor.getStatus": [{
47219
+ name: "deviceId",
47220
+ form: "single",
47221
+ optional: false
47222
+ }],
46757
47223
  "privacyMask.getOptions": [{
46758
47224
  name: "deviceId",
46759
47225
  form: "single",
46760
47226
  optional: false
46761
47227
  }],
47228
+ "privacyMask.getStatus": [{
47229
+ name: "deviceId",
47230
+ form: "single",
47231
+ optional: false
47232
+ }],
46762
47233
  "privacyMask.setAudioEnabled": [{
46763
47234
  name: "deviceId",
46764
47235
  form: "single",
@@ -46809,6 +47280,11 @@ Object.freeze({
46809
47280
  form: "single",
46810
47281
  optional: false
46811
47282
  }],
47283
+ "ptz.getStatus": [{
47284
+ name: "deviceId",
47285
+ form: "single",
47286
+ optional: false
47287
+ }],
46812
47288
  "ptz.goHome": [{
46813
47289
  name: "deviceId",
46814
47290
  form: "single",
@@ -46899,6 +47375,11 @@ Object.freeze({
46899
47375
  form: "single",
46900
47376
  optional: false
46901
47377
  }],
47378
+ "recordingArchive.applyDeviceSettingsPatch": [{
47379
+ name: "deviceId",
47380
+ form: "single",
47381
+ optional: false
47382
+ }],
46902
47383
  "recordingArchive.deleteFootprint": [{
46903
47384
  name: "deviceId",
46904
47385
  form: "single",
@@ -46919,6 +47400,21 @@ Object.freeze({
46919
47400
  form: "single",
46920
47401
  optional: false
46921
47402
  }],
47403
+ "recordingArchive.getDeviceLiveContribution": [{
47404
+ name: "deviceId",
47405
+ form: "single",
47406
+ optional: false
47407
+ }],
47408
+ "recordingArchive.getDeviceSettingsContribution": [{
47409
+ name: "deviceId",
47410
+ form: "single",
47411
+ optional: false
47412
+ }],
47413
+ "recordingArchive.getStatus": [{
47414
+ name: "deviceId",
47415
+ form: "single",
47416
+ optional: false
47417
+ }],
46922
47418
  "recordingArchive.listOpsLog": [{
46923
47419
  name: "deviceId",
46924
47420
  form: "single",
@@ -47004,6 +47500,11 @@ Object.freeze({
47004
47500
  form: "single",
47005
47501
  optional: false
47006
47502
  }],
47503
+ "recordingOnboard.getStatus": [{
47504
+ name: "deviceId",
47505
+ form: "single",
47506
+ optional: false
47507
+ }],
47007
47508
  "recordingOnboard.setSettings": [{
47008
47509
  name: "deviceId",
47009
47510
  form: "single",
@@ -47034,6 +47535,11 @@ Object.freeze({
47034
47535
  form: "single",
47035
47536
  optional: false
47036
47537
  }],
47538
+ "sceneMonitor.getStatus": [{
47539
+ name: "deviceId",
47540
+ form: "single",
47541
+ optional: false
47542
+ }],
47037
47543
  "sceneMonitor.listScenes": [{
47038
47544
  name: "deviceId",
47039
47545
  form: "single",
@@ -47059,6 +47565,11 @@ Object.freeze({
47059
47565
  form: "single",
47060
47566
  optional: false
47061
47567
  }],
47568
+ "scriptRunner.getStatus": [{
47569
+ name: "deviceId",
47570
+ form: "single",
47571
+ optional: false
47572
+ }],
47062
47573
  "scriptRunner.run": [{
47063
47574
  name: "deviceId",
47064
47575
  form: "single",
@@ -47069,11 +47580,31 @@ Object.freeze({
47069
47580
  form: "single",
47070
47581
  optional: false
47071
47582
  }],
47583
+ "smoke.getStatus": [{
47584
+ name: "deviceId",
47585
+ form: "single",
47586
+ optional: false
47587
+ }],
47588
+ "snapshot.applyDeviceSettingsPatch": [{
47589
+ name: "deviceId",
47590
+ form: "single",
47591
+ optional: false
47592
+ }],
47072
47593
  "snapshot.getDebugState": [{
47073
47594
  name: "deviceId",
47074
47595
  form: "single",
47075
47596
  optional: false
47076
47597
  }],
47598
+ "snapshot.getDeviceLiveContribution": [{
47599
+ name: "deviceId",
47600
+ form: "single",
47601
+ optional: false
47602
+ }],
47603
+ "snapshot.getDeviceSettingsContribution": [{
47604
+ name: "deviceId",
47605
+ form: "single",
47606
+ optional: false
47607
+ }],
47077
47608
  "snapshot.getSnapshot": [{
47078
47609
  name: "deviceId",
47079
47610
  form: "single",
@@ -47090,6 +47621,11 @@ Object.freeze({
47090
47621
  form: "array",
47091
47622
  optional: false
47092
47623
  }],
47624
+ "snapshot.getStatus": [{
47625
+ name: "deviceId",
47626
+ form: "single",
47627
+ optional: false
47628
+ }],
47093
47629
  "snapshot.invalidateCache": [{
47094
47630
  name: "deviceId",
47095
47631
  form: "single",
@@ -47100,6 +47636,11 @@ Object.freeze({
47100
47636
  form: "single",
47101
47637
  optional: false
47102
47638
  }],
47639
+ "streamBroker.applyDeviceSettingsPatch": [{
47640
+ name: "deviceId",
47641
+ form: "single",
47642
+ optional: false
47643
+ }],
47103
47644
  "streamBroker.assignProfile": [{
47104
47645
  name: "deviceId",
47105
47646
  form: "single",
@@ -47115,6 +47656,16 @@ Object.freeze({
47115
47656
  form: "single",
47116
47657
  optional: false
47117
47658
  }],
47659
+ "streamBroker.getDeviceLiveContribution": [{
47660
+ name: "deviceId",
47661
+ form: "single",
47662
+ optional: false
47663
+ }],
47664
+ "streamBroker.getDeviceSettingsContribution": [{
47665
+ name: "deviceId",
47666
+ form: "single",
47667
+ optional: false
47668
+ }],
47118
47669
  "streamBroker.getStreamWithCodec": [{
47119
47670
  name: "deviceId",
47120
47671
  form: "single",
@@ -47175,16 +47726,46 @@ Object.freeze({
47175
47726
  form: "single",
47176
47727
  optional: false
47177
47728
  }],
47729
+ "streamParams.getStatus": [{
47730
+ name: "deviceId",
47731
+ form: "single",
47732
+ optional: false
47733
+ }],
47178
47734
  "streamParams.setProfile": [{
47179
47735
  name: "deviceId",
47180
47736
  form: "single",
47181
47737
  optional: false
47182
47738
  }],
47739
+ "switch.getStatus": [{
47740
+ name: "deviceId",
47741
+ form: "single",
47742
+ optional: false
47743
+ }],
47183
47744
  "switch.setState": [{
47184
47745
  name: "deviceId",
47185
47746
  form: "single",
47186
47747
  optional: false
47187
47748
  }],
47749
+ "tamper.getStatus": [{
47750
+ name: "deviceId",
47751
+ form: "single",
47752
+ optional: false
47753
+ }],
47754
+ "temperatureSensor.getStatus": [{
47755
+ name: "deviceId",
47756
+ form: "single",
47757
+ optional: false
47758
+ }],
47759
+ "update.getStatus": [{
47760
+ name: "deviceId",
47761
+ form: "single",
47762
+ optional: false
47763
+ }],
47764
+ "vacuumControl.getStatus": [{
47765
+ name: "deviceId",
47766
+ form: "single",
47767
+ optional: false
47768
+ }],
47188
47769
  "vacuumControl.locate": [{
47189
47770
  name: "deviceId",
47190
47771
  form: "single",
@@ -47220,6 +47801,11 @@ Object.freeze({
47220
47801
  form: "single",
47221
47802
  optional: false
47222
47803
  }],
47804
+ "valve.getStatus": [{
47805
+ name: "deviceId",
47806
+ form: "single",
47807
+ optional: false
47808
+ }],
47223
47809
  "valve.open": [{
47224
47810
  name: "deviceId",
47225
47811
  form: "single",
@@ -47235,6 +47821,11 @@ Object.freeze({
47235
47821
  form: "single",
47236
47822
  optional: false
47237
47823
  }],
47824
+ "vibration.getStatus": [{
47825
+ name: "deviceId",
47826
+ form: "single",
47827
+ optional: false
47828
+ }],
47238
47829
  "videoclips.dialClipStream": [{
47239
47830
  name: "deviceId",
47240
47831
  form: "single",
@@ -47270,6 +47861,11 @@ Object.freeze({
47270
47861
  form: "single",
47271
47862
  optional: false
47272
47863
  }],
47864
+ "waterHeater.getStatus": [{
47865
+ name: "deviceId",
47866
+ form: "single",
47867
+ optional: false
47868
+ }],
47273
47869
  "waterHeater.setAway": [{
47274
47870
  name: "deviceId",
47275
47871
  form: "single",
@@ -47285,6 +47881,11 @@ Object.freeze({
47285
47881
  form: "single",
47286
47882
  optional: false
47287
47883
  }],
47884
+ "weather.getStatus": [{
47885
+ name: "deviceId",
47886
+ form: "single",
47887
+ optional: false
47888
+ }],
47288
47889
  "webrtcSession.addIceCandidate": [{
47289
47890
  name: "deviceId",
47290
47891
  form: "single",
@@ -48022,7 +48623,7 @@ var PreviewTextField = string().max(200);
48022
48623
  * Whether the notification's preview is a STILL or a short animation.
48023
48624
  *
48024
48625
  * 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
48626
+ * 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
48627
  * night reads better as three seconds of motion than as one frame of it. Both
48027
48628
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
48028
48629
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -48160,6 +48761,7 @@ TimelapseRuleInputSchema.extend({
48160
48761
  createdAt: number(),
48161
48762
  updatedAt: number()
48162
48763
  });
48764
+ MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
48163
48765
  object({
48164
48766
  /**
48165
48767
  * Fraction of the box's own size added on EACH side before cutting.