@camstack/addon-decoder-nodeav 1.2.116 → 1.2.117

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.
Files changed (3) hide show
  1. package/dist/index.js +836 -234
  2. package/dist/index.mjs +836 -234
  3. package/package.json +1 -3
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { randomUUID } from "node:crypto";
2
- //#region ../types/dist/event-category-C5xZWqz6.mjs
2
+ //#region ../types/dist/event-category-BGmz_oxW.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -532,6 +532,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
532
532
  */
533
533
  EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
534
534
  EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
535
+ /**
536
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
537
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
538
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
539
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
540
+ * for a camera with no attached sensor). Providers must not emit
541
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
542
+ * keeps it so (camera-grid is a named, deferred exception).
543
+ */
535
544
  EventCategory["ProviderMotion"] = "provider.motion";
536
545
  EventCategory["ProviderDetection"] = "provider.detection";
537
546
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
@@ -5370,7 +5379,7 @@ var ZodIssueCode = {
5370
5379
  var ZodFirstPartyTypeKind;
5371
5380
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5372
5381
  //#endregion
5373
- //#region ../types/dist/sleep-gU6hqv4_.mjs
5382
+ //#region ../types/dist/sleep-CDCONfkt.mjs
5374
5383
  /**
5375
5384
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5376
5385
  * window to float samples (D455).
@@ -7409,7 +7418,7 @@ function errMsg(err) {
7409
7418
  return String(err);
7410
7419
  }
7411
7420
  //#endregion
7412
- //#region ../types/dist/composition-Dq42XWp0.mjs
7421
+ //#region ../types/dist/composition-Bzr7GwgP.mjs
7413
7422
  /**
7414
7423
  * The ffmpeg build every CamStack node downloads, per platform and arch.
7415
7424
  *
@@ -7463,21 +7472,20 @@ function portable(target) {
7463
7472
  }
7464
7473
  portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
7465
7474
  /**
7466
- * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
7467
- * valutatore puro del suo FRONTE.
7475
+ * THE table "which boolean of this device type counts as HIGH", and the
7476
+ * pure evaluator of its EDGE.
7468
7477
  *
7469
- * Viveva dentro il builtin virtual-doorbell
7470
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
7471
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
7472
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
7473
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
7474
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
7475
- * SPOSTA qui e il doorbell la ri-esporta.
7478
+ * ONE table for everyone who asks "is this device HIGH?": the
7479
+ * recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
7480
+ * sensor markers, the orchestrator's camera-sensors bridge and
7481
+ * the sources of a composite doorbell (`doorbellFeatureSources`, D671).
7482
+ * A second copy would diverge at the first cap added, and the symptom — "the
7483
+ * sensor rings the doorbell but does not record" — is exactly D62.
7476
7484
  *
7477
- * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
7478
- * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
7479
- * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
7480
- * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
7485
+ * ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
7486
+ * two must not be unified: that one answers "what is the state WORD for a
7487
+ * rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
7488
+ * boolean's EDGE counts". Deliberately different vocabularies.
7481
7489
  */
7482
7490
  /**
7483
7491
  * Known binary / switch source caps → the boolean slice field whose
@@ -7498,6 +7506,8 @@ var SOURCE_CAP_ACTIVE_FIELD = {
7498
7506
  vibration: "detected",
7499
7507
  tamper: "tampered"
7500
7508
  };
7509
+ /** Cap names whose presence in a device's bindings qualify it as a source. */
7510
+ var SOURCE_CAPS = Object.keys(SOURCE_CAP_ACTIVE_FIELD);
7501
7511
  /**
7502
7512
  * Error types for the safe expression engine. Two distinct classes so callers
7503
7513
  * can tell a compile-time (grammar) failure from a runtime (evaluation)
@@ -9084,22 +9094,22 @@ var CLASS_MAP_MACRO_TARGETS = [
9084
9094
  "package"
9085
9095
  ];
9086
9096
  /**
9087
- * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
9088
- * un operatore può selezionare.
9097
+ * The FIRST-LEVEL macro classes: those an object detector emits and that
9098
+ * an operator can select.
9089
9099
  *
9090
- * Sono le tre offerte dallo step `object-detection`
9100
+ * They are the three offered by the `object-detection` step
9091
9101
  * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
9092
- * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
9093
- * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
9094
- * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
9095
- * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
9102
+ * `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
9103
+ * `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
9104
+ * `package-detection`, whose enablement is driven by zones, and offering the
9105
+ * same word twice has already made an operator turn on the COCO proxy
9096
9106
  * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
9097
9107
  *
9098
- * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
9099
- * dello step e una seconda volta come union `FirstLevelMacro`
9100
- * (`types/detection.ts`); una terza copia per il trigger di registrazione
9101
- * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
9102
- * successiva.
9108
+ * ONE list. Before today the same three were hand-written in the step's offer
9109
+ * and a second time as the union `FirstLevelMacro`
9110
+ * (`types/detection.ts`); a third copy for the recording trigger
9111
+ * (`RecordingTriggers.objectClasses`) would have made the later divergence
9112
+ * invisible.
9103
9113
  */
9104
9114
  var FIRST_LEVEL_MACRO_CLASSES = [
9105
9115
  "person",
@@ -9164,17 +9174,17 @@ var RecordingStorageModeSchema = _enum([
9164
9174
  "on-device-decision"
9165
9175
  ]);
9166
9176
  /**
9167
- * Le macro classi che possono aprire una finestra di registrazione — le stesse
9168
- * tre offerte dallo step `object-detection`, da UNA lista
9177
+ * The macro classes that can open a recording window — the same
9178
+ * three offered by the `object-detection` step, from ONE list
9169
9179
  * ({@link FIRST_LEVEL_MACRO_CLASSES}).
9170
9180
  */
9171
9181
  var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
9172
9182
  /**
9173
- * True quando `values` non ripete un elemento.
9183
+ * True when `values` does not repeat an element.
9174
9184
  *
9175
- * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
9176
- * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
9177
- * conterebbe due volte le sue finestre in `segmentMissedByMs`.
9185
+ * A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
9186
+ * becomes a SOURCE in `bandTriggerSources`, and the same source twice
9187
+ * would count its windows twice in `segmentMissedByMs`.
9178
9188
  */
9179
9189
  var noDuplicates = (values) => new Set(values).size === values.length;
9180
9190
  /** Which detectors trigger an `events`-mode band. */
@@ -9182,34 +9192,34 @@ var RecordingTriggersSchema = object({
9182
9192
  motion: boolean().optional(),
9183
9193
  audioThresholdDbfs: number().optional(),
9184
9194
  /**
9185
- * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
9186
- * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
9187
- * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
9188
- * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
9195
+ * The macro classes whose detection opens a window. ABSENT = the source
9196
+ * is not listened to; an EMPTY array is rejected, because "events band, object
9197
+ * trigger on, no class" is the same shape "enabled and records
9198
+ * nothing, forever" that `eventsBandCanEverDemand` is written against.
9189
9199
  *
9190
- * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
9191
- * quelle che hanno attraversato `enabledMacroClasses`, i
9192
- * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
9193
- * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
9194
- * finestre — vedi `recorder/object-trigger.ts`.
9200
+ * The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
9201
+ * those that went through `enabledMacroClasses`, the
9202
+ * `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
9203
+ * (`source: 'onboard'`) goes through none of those gates and does NOT open
9204
+ * windows — see `recorder/object-trigger.ts`.
9195
9205
  */
9196
9206
  objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
9197
9207
  /**
9198
- * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
9199
- * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
9208
+ * The LINKED devices whose RISING EDGE opens a window. Absent = the source
9209
+ * is not listened to; an empty array is rejected for the same reason as
9200
9210
  * `objectClasses`.
9201
9211
  *
9202
- * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
9203
- * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
9204
- * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
9205
- * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9206
- * device (D12) — mai un elenco globale di cap.
9212
+ * These are SOURCE device ids, not cameras: the band names them, so the
9213
+ * hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
9214
+ * does no RPC. The OFFER from which the operator picks them is another question, and
9215
+ * is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9216
+ * device (D12) — never a global list of caps.
9207
9217
  *
9208
- * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
9209
- * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
9210
- * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
9211
- * il livello: un contatto trovato già aperto al riavvio del runner non fa
9212
- * registrare.
9218
+ * What "high" means depends on the device TYPE and is not decided here:
9219
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
9220
+ * the same one as the composite doorbell (D671). And it is the EDGE, not
9221
+ * the level: a contact found already open at runner restart does not
9222
+ * record.
9213
9223
  */
9214
9224
  sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9215
9225
  });
@@ -10286,7 +10296,7 @@ var DecoderSessionConfigSchema = object({
10286
10296
  * - **VALUE** — at which level, for which scope, until when. That stays ONE
10287
10297
  * thing: the logging settings document on the `system` cap. Two authorities
10288
10298
  * over the values is the exact defect
10289
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
10299
+ * `docs/design/plans/2026-08-26-per-component-logging.md` was written to
10290
10300
  * remove; re-introducing it from the cure side would be grotesque.
10291
10301
  *
10292
10302
  * Nothing in this file reads a clock, an env var or a store. The registry is
@@ -12034,7 +12044,7 @@ var BrokerStatusEnum = _enum([
12034
12044
  "unreachable",
12035
12045
  "error"
12036
12046
  ]);
12037
- var BrokerInfoSchema$1 = object({
12047
+ var BrokerInfoSchema = object({
12038
12048
  /** Stable broker id. Persisted; survives addon restarts. */
12039
12049
  id: string(),
12040
12050
  /** Addon id of the provider that OWNS this broker.
@@ -12167,7 +12177,7 @@ var GetStateInputSchema = object({
12167
12177
  * HA: entity_id (returns the cached entity state). */
12168
12178
  key: string()
12169
12179
  });
12170
- method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, BrokerInfoSchema$1.nullable()), method(_void(), array(BrokerProviderInfoSchema), { auth: "admin" }), method(AddInputSchema, AddResultSchema, {
12180
+ method(ListInputSchema, array(BrokerInfoSchema)), method(GetInputSchema, BrokerInfoSchema.nullable()), method(_void(), array(BrokerProviderInfoSchema), { auth: "admin" }), method(AddInputSchema, AddResultSchema, {
12171
12181
  kind: "mutation",
12172
12182
  auth: "admin"
12173
12183
  }), method(RemoveInputSchema, _void(), {
@@ -13776,7 +13786,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
13776
13786
  *
13777
13787
  * ⚠ An earlier version of this comment blamed Zod stripping, and that
13778
13788
  * was wrong — corrected 2026-08-26 after the hop map
13779
- * (`docs/design/2026-08-26-mappa-hop-argomenti.md`) traced the path.
13789
+ * (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
13780
13790
  * There is **no Zod parse at all** between the door and the engine: the
13781
13791
  * dispatcher forwards the payload verbatim and UDS carries it whole. A
13782
13792
  * field declared here reaches `SqliteSettingsBackend` either way.
@@ -14625,7 +14635,17 @@ var SiteZoneSchema = object({
14625
14635
  var ProviderStatusSchema = object({
14626
14636
  connected: boolean(),
14627
14637
  deviceCount: number(),
14628
- error: string().optional()
14638
+ error: string().optional(),
14639
+ /**
14640
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
14641
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
14642
+ * which every provider bundles, so only a provider BUILT from D696-amended
14643
+ * code says it. ABSENT means an older provider that may still write it (raw
14644
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
14645
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
14646
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
14647
+ */
14648
+ motionSliceWriter: literal("orchestrator").optional()
14629
14649
  });
14630
14650
  object({
14631
14651
  externalId: string(),
@@ -15423,28 +15443,10 @@ method(object({
15423
15443
  deviceIds: array(number()).readonly(),
15424
15444
  caps: array(string()).readonly().optional()
15425
15445
  }), record(string(), record(string(), unknown().nullable())));
15426
- object({
15427
- /** Ms epoch of the last press. null = never observed since this provider started. */
15428
- lastPressedAt: number().nullable(),
15429
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
15430
- pressCountSinceStart: number()
15431
- });
15432
- object({
15433
- deviceId: number(),
15434
- timestamp: number()
15435
- });
15436
- /**
15437
- * The `doorbell-source` extension slot's editable value (D648): the camera's
15438
- * virtual-doorbell trigger devices, exactly what the wrapper's
15439
- * `doorbellSources` persists (as `{ deviceId }` records).
15440
- */
15441
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
15446
+ var ExtensionSlotIdSchema = _enum(["linked-devices"]);
15442
15447
  DeviceType.Camera;
15443
- DeviceType.Button, DeviceType.Camera;
15444
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
15445
- DeviceType.Camera, DeviceType.Camera;
15446
15448
  /** A slot's editable value, discriminated on `slot`. */
15447
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15449
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15448
15450
  DeviceType.Camera;
15449
15451
  var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15450
15452
  state: literal("unreachable"),
@@ -15481,10 +15483,11 @@ var ExtensionSlotSourceSchema = object({
15481
15483
  });
15482
15484
  /**
15483
15485
  * A DIFFERENT authority that gates whether the slot's sources do anything —
15484
- * reported read-only, named, never written through this contract (D62). The
15485
- * virtual doorbell's sources ring only while the wrapper is bound to the
15486
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
15487
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
15486
+ * reported read-only, named, never written through this contract (D62) — e.g.
15487
+ * a slot whose sources act only while a wrapper is bound to the host, a
15488
+ * binding that belongs to `deviceManager.setWrapperActive`. No slot reports
15489
+ * one today (`linked-devices` answers `null`). `unknown` means the gate could
15490
+ * not be read; it is not "inactive" (D315).
15488
15491
  */
15489
15492
  var ExtensionSlotActivationSchema = object({
15490
15493
  state: _enum([
@@ -15500,7 +15503,7 @@ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
15500
15503
  /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
15501
15504
  slotRef: string(),
15502
15505
  slot: ExtensionSlotIdSchema,
15503
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
15506
+ /** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
15504
15507
  authority: string(),
15505
15508
  activation: ExtensionSlotActivationSchema.nullable(),
15506
15509
  value: ExtensionSlotValueSchema,
@@ -15778,7 +15781,7 @@ method(object({
15778
15781
  * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
15779
15782
  * ends in a log line, and a log line is the thing the operator asked to stop
15780
15783
  * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
15781
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
15784
+ * 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
15782
15785
  * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
15783
15786
  * media blackout were both diagnosed. The counters stay; this is where they can
15784
15787
  * be READ.
@@ -17154,7 +17157,7 @@ var BrokerStatusSchema$1 = _enum([
17154
17157
  "unreachable",
17155
17158
  "tls-error"
17156
17159
  ]);
17157
- var BrokerInfoSchema = object({
17160
+ var BrokerInfoSchema$1 = object({
17158
17161
  id: string(),
17159
17162
  name: string(),
17160
17163
  url: string(),
@@ -17217,7 +17220,7 @@ var StatusSchema = object({
17217
17220
  brokerCount: number(),
17218
17221
  embeddedRunning: boolean()
17219
17222
  });
17220
- method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
17223
+ method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
17221
17224
  kind: "mutation",
17222
17225
  auth: "admin"
17223
17226
  }), method(IdInputSchema, _void(), {
@@ -19393,78 +19396,16 @@ var NcRuleInputSchema = object({
19393
19396
  */
19394
19397
  confirm: NcConfirmSchema.optional(),
19395
19398
  /**
19396
- * WAIT for face/plate recognition before saying anything.
19397
- *
19398
- * A notification's TEXT is frozen at enqueue and its media is re-resolved at
19399
- * send; the identity is neither. A face is confirmed after `confirmFrames`
19400
- * agreeing observations — p50 **11.4 s** after the track was first seen,
19401
- * measured on this hub — and an `immediate` rule enqueues on the first object
19402
- * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
19403
- * immediate path, and no amount of media re-resolution fixes a sentence.
19404
- *
19405
- * Only two honest answers exist, and this flag picks between them. It has
19406
- * effect ONLY on a rule that declares a recognition scope
19407
- * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
19408
- * other rule there is nothing to wait for and the flag is inert.
19409
- *
19410
- * | value | what happens |
19411
- * | --- | --- |
19412
- * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
19413
- * | 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) |
19414
- *
19415
- * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
19416
- * on the addon cap path, and absent has to keep meaning exactly what every
19417
- * rule authored before this field meant.
19418
- *
19419
- * The cost of `true` is stated here because the editor states it too: a rule
19420
- * that waits also inherits track-close SEMANTICS — its `zones` condition
19421
- * tests every zone the track visited and a `crossing` condition can no longer
19422
- * be satisfied, because a closed track carries no crossing.
19423
- */
19424
- waitForEnhancement: boolean().optional(),
19425
- /**
19426
- * GROUP a burst of subjects into ONE notification that grows.
19427
- *
19428
- * Seconds of quiet after the last matching subject before the burst is
19429
- * considered over. While it is open, the first subject enqueues immediately —
19430
- * **exactly as today, with no added latency** — and every real growth (a new
19431
- * subject, or a name confirmed on one already in it) REPLACES that
19432
- * notification with an updated one naming everybody. The push carries the
19433
- * group's own coalescing tag, so the phone replaces rather than stacks.
19434
- *
19435
- * `0` / absent = off, and off is today's behaviour byte for byte.
19436
- *
19437
- * ### Why an idle cutoff and not a window
19438
- *
19439
- * The measured seven-person arrival on device 590 spans 110 s with every
19440
- * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
19441
- * idle cutoff holds it as one and ends it when the arrival actually ends.
19442
- * 30 s is a widely shipped value for the same decision.
19443
- *
19444
- * ### What it replaces
19445
- *
19446
- * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
19447
- * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
19448
- * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
19449
- * track that did fire and 7 carrying a confirmed identity nobody heard about.
19450
- * A group collapses the same volume by MERGING, so the cooldown becomes a
19451
- * budget over GROUPS — which is what it always meant — and a growth is never
19452
- * throttled by the window its own first member spent.
19453
- *
19454
- * ### Interaction with {@link waitForEnhancement}
19455
- *
19456
- * They compose, and the order matters. `waitForEnhancement` defers the rule to
19457
- * TRACK CLOSE, so with both set the group is opened by the first member to
19458
- * CLOSE — already carrying its name — and grows as later members close. That
19459
- * is later, and complete. With grouping alone the group opens on the first
19460
- * object event and picks up names as they are confirmed, through the growth
19461
- * path. Neither combination fires twice for one subject.
19462
- *
19463
- * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
19464
- * on the addon cap path, so absent must keep meaning what it meant before this
19465
- * field existed.
19399
+ * IMMEDIATE GROUPED (D692): the first matching subject opens a window of this many
19400
+ * seconds; the rule sends ONE message when the window closes — early, once every
19401
+ * subject in it is final, never before {@link NC_GROUPING_MIN_SEC} — naming everybody
19402
+ * the rule matched, with one mosaic tile per subject.
19403
+ * Absent = plain immediate (one message per track, at the first match).
19404
+ * Only an `immediate` DETECTION rule may carry it (`ruleGroupingApplies`, enforced on
19405
+ * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
19406
+ * path does not run Zod defaults.
19466
19407
  */
19467
- groupIdleSec: number().int().min(0).max(600).optional()
19408
+ groupingSec: number().int().min(5).max(60).optional()
19468
19409
  });
19469
19410
  /**
19470
19411
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -19512,9 +19453,10 @@ var NcRuleClearableKeySchema = _enum([
19512
19453
  "targetUsers",
19513
19454
  "snoozeOptions",
19514
19455
  "snoozeAllowGlobal",
19515
- "waitForEnhancement",
19516
19456
  "actions",
19517
19457
  "confirm",
19458
+ "groupingSec",
19459
+ "waitForEnhancement",
19518
19460
  "groupIdleSec"
19519
19461
  ]);
19520
19462
  var NcRuleUpdateInputSchema = object({
@@ -19536,9 +19478,25 @@ var NcRuleSchema = NcRuleInputSchema.extend({
19536
19478
  */
19537
19479
  disabledTargetIds: array(string()).default([])
19538
19480
  });
19481
+ /**
19482
+ * The state-summary SECTIONS (D647 / D698): the D637 kind groups that report a
19483
+ * still-true state. `backups-exports` and `alarm` are not sections — a completed
19484
+ * job is not an open state, and the alarm stays instant.
19485
+ */
19486
+ var NcStateSummarySectionIdSchema = _enum([
19487
+ "device-state",
19488
+ "streams",
19489
+ "battery",
19490
+ "consumables",
19491
+ "tanks",
19492
+ "detection-blind",
19493
+ "nodes",
19494
+ "addons",
19495
+ "updates"
19496
+ ]);
19539
19497
  /** One section of a previewed state summary. `unavailable` = its state could not be read. */
19540
19498
  var NcStateSummaryPreviewSectionSchema = object({
19541
- id: string(),
19499
+ id: NcStateSummarySectionIdSchema,
19542
19500
  status: _enum(["read", "unavailable"]),
19543
19501
  items: number().int().nonnegative(),
19544
19502
  reason: string().optional()
@@ -19548,7 +19506,7 @@ var NcStateSummaryPreviewSectionSchema = object({
19548
19506
  * a `rule` split (no `section`), one section's on a `section` split.
19549
19507
  */
19550
19508
  var NcStateSummaryPreviewRowSchema = object({
19551
- section: string().optional(),
19509
+ section: NcStateSummarySectionIdSchema.optional(),
19552
19510
  /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
19553
19511
  title: string(),
19554
19512
  text: string(),
@@ -19985,6 +19943,29 @@ object({
19985
19943
  firstAt: number(),
19986
19944
  lastAt: number()
19987
19945
  });
19946
+ var NC_ALARM_TRIGGERED_MAX_SEC = 3600;
19947
+ var NcAlarmDelaySecSchema = number().int().min(0).max(600);
19948
+ var NcAlarmTriggeredSecSchema = number().int().min(0).max(NC_ALARM_TRIGGERED_MAX_SEC);
19949
+ var uniqueModes = (entries) => new Set(entries.map((e) => e.mode)).size === entries.length;
19950
+ var NcAlarmModeDelaysListSchema = array(object({
19951
+ mode: AlarmArmModeSchema,
19952
+ exitDelaySec: NcAlarmDelaySecSchema.optional(),
19953
+ entryDelaySec: NcAlarmDelaySecSchema.optional(),
19954
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.optional()
19955
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
19956
+ var NcAlarmModeDelaysEditListSchema = array(object({
19957
+ mode: AlarmArmModeSchema,
19958
+ exitDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
19959
+ entryDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
19960
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional()
19961
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
19962
+ /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
19963
+ var NcAlarmNonBlockingEditSchema = object({
19964
+ mode: AlarmArmModeSchema,
19965
+ deviceId: number().int().positive(),
19966
+ /** true = on the list (may be open, does not block); false = off the list (blocks). */
19967
+ nonBlocking: boolean()
19968
+ });
19988
19969
  /**
19989
19970
  * The per-mode lists, at most one per mode. Two lists for one mode have no
19990
19971
  * meaning a reader could agree on (union? the last one?), so they are refused
@@ -19993,10 +19974,10 @@ object({
19993
19974
  var NcAlarmNonBlockingListSchema = array(object({
19994
19975
  mode: AlarmArmModeSchema,
19995
19976
  deviceIds: array(number().int()).max(200)
19996
- })).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
19977
+ })).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
19997
19978
  /**
19998
- * The three durations the panel's state machine runs on, who hears about its
19999
- * transitions, and which openings each mode tolerates.
19979
+ * The three durations — global, and per mode since D697 — the panel's state
19980
+ * machine runs on, who hears about its transitions, and which openings each mode tolerates.
20000
19981
  *
20001
19982
  * They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
20002
19983
  * `alarm-panel` is `deviceNative` and its other provider mirrors somebody
@@ -20006,15 +19987,15 @@ var NcAlarmNonBlockingListSchema = array(object({
20006
19987
  */
20007
19988
  var NcAlarmSettingsSchema = object({
20008
19989
  /** Grace period between arming and the mode taking effect. 0 = immediate. */
20009
- exitDelaySec: number().int().min(0).max(600),
19990
+ exitDelaySec: NcAlarmDelaySecSchema,
20010
19991
  /** Grace period between a trigger and the alarm firing. 0 = immediate. */
20011
- entryDelaySec: number().int().min(0).max(600),
19992
+ entryDelaySec: NcAlarmDelaySecSchema,
20012
19993
  /**
20013
19994
  * How long `triggered` lasts before the panel re-arms itself.
20014
19995
  * **0 = until an operator disarms it** — the behaviour before this field
20015
19996
  * existed, and therefore what an untouched install keeps doing.
20016
19997
  */
20017
- triggeredDurationSec: number().int().min(0).max(3600),
19998
+ triggeredDurationSec: NcAlarmTriggeredSecSchema,
20018
19999
  /**
20019
20000
  * Deprecated by D630 — every transition is announced. Parsed, never read;
20020
20001
  * remove after one release. Optional so an older admin's patch (which still
@@ -20037,17 +20018,30 @@ var NcAlarmSettingsSchema = object({
20037
20018
  * per mode is meaningful. Defaulted to `[]` so a blob stored before D630
20038
20019
  * parses as "every opening blocks" — the behaviour it was written under.
20039
20020
  */
20040
- nonBlocking: NcAlarmNonBlockingListSchema.default([])
20021
+ nonBlocking: NcAlarmNonBlockingListSchema.default([]),
20022
+ /**
20023
+ * Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
20024
+ * without a field, uses the global value above — so `[]`, the default, is exactly the
20025
+ * behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
20026
+ */
20027
+ modeDelays: NcAlarmModeDelaysListSchema.default([])
20041
20028
  });
20042
20029
  /**
20043
20030
  * Every field optional — a tab edits one control at a time.
20044
20031
  *
20045
- * `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
20046
- * remove an inner `.default()`, so a patch that never named the field would
20047
- * parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
20048
- * (the same trap {@link NcRulePatchSchema} documents).
20032
+ * `nonBlocking` and `modeDelays` are re-declared WITHOUT their defaults:
20033
+ * `.partial()` does not remove an inner `.default()`, so a patch that never
20034
+ * named the field would parse to `[]` and wipe every mode's list on an
20035
+ * unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
20036
+ * `modeDelays` means EDITS, not the stored overrides.
20049
20037
  */
20050
- var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
20038
+ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
20039
+ nonBlocking: NcAlarmNonBlockingListSchema,
20040
+ /** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
20041
+ modeDelays: NcAlarmModeDelaysEditListSchema,
20042
+ /** ONE membership change; the panel applies it to the list it holds at its turn. */
20043
+ nonBlockingEdit: NcAlarmNonBlockingEditSchema
20044
+ }).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" });
20051
20045
  /**
20052
20046
  * What one arm mode actually arms, DERIVED from the enabled rules gated on it.
20053
20047
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
@@ -20147,6 +20141,28 @@ var NcAlarmConfigSchema = object({
20147
20141
  */
20148
20142
  live: NcAlarmLiveSchema.optional()
20149
20143
  });
20144
+ var NcAlarmSensorReadingSchema = _enum([
20145
+ "open",
20146
+ "closed",
20147
+ "unknown",
20148
+ "not-opening"
20149
+ ]);
20150
+ /** One device's state as the alarm reads it — the classifier the arm check uses. */
20151
+ var NcAlarmSensorStateSchema = object({
20152
+ deviceId: number().int().positive(),
20153
+ reading: NcAlarmSensorReadingSchema,
20154
+ /** The word as read (`open`, `closed`, `unlocked`, `stopped`, …); null when unknown / not an opening. */
20155
+ state: string().nullable(),
20156
+ /** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
20157
+ unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
20158
+ /** The device manager's liveness as the centre mirrors it; null = not known. */
20159
+ online: boolean().nullable()
20160
+ });
20161
+ var NcAlarmSensorsInputSchema = object({ deviceIds: array(number().int().positive()).max(500) });
20162
+ var NcAlarmSensorsSchema = object({
20163
+ sensors: array(NcAlarmSensorStateSchema),
20164
+ readAt: number().int().nonnegative()
20165
+ });
20150
20166
  /**
20151
20167
  * ONE rule's demand on ONE camera's clip ring.
20152
20168
  *
@@ -20237,7 +20253,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
20237
20253
  }), method(object({}), NcAlarmConfigSchema, { auth: "admin" }), method(object({ patch: NcAlarmSettingsPatchSchema }), NcAlarmConfigSchema, {
20238
20254
  kind: "mutation",
20239
20255
  auth: "admin"
20240
- });
20256
+ }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
20241
20257
  /**
20242
20258
  * Zod schemas for persisted record types.
20243
20259
  *
@@ -20584,12 +20600,26 @@ var CameraSensorRefSchema = object({
20584
20600
  function cameraSensorRefKey(ref) {
20585
20601
  return `${ref.addonId}/${ref.stableId}`;
20586
20602
  }
20587
- /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20588
- var CameraSensorsModeSchema = _enum(["in-addition"]);
20589
- var CameraSensorsConfigSchema = object({
20590
- mode: CameraSensorsModeSchema,
20591
- sensors: array(CameraSensorRefSchema).min(1).max(8)
20592
- }).superRefine((value, ctx) => {
20603
+ /**
20604
+ * A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
20605
+ * `replace`: its motion is the camera's, and while one is READY the camera's
20606
+ * own motion no longer counts on its own. `confirm`: while one is READY the
20607
+ * camera's own motion counts only while a confirm sensor is active — with or
20608
+ * without a replace sensor (spec C2, the controller's ruling on Q1).
20609
+ */
20610
+ var CameraSensorModeSchema = _enum([
20611
+ "in-addition",
20612
+ "confirm",
20613
+ "replace"
20614
+ ]);
20615
+ /** A stored sensor with no mode — every CS-1 row — is in addition. */
20616
+ var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
20617
+ /**
20618
+ * A camera's attached sensors. A CS-1 row carried an envelope
20619
+ * `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
20620
+ * what the write stores (D672 rule 3), so it is never written again.
20621
+ */
20622
+ var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
20593
20623
  const seen = /* @__PURE__ */ new Set();
20594
20624
  value.sensors.forEach((ref, index) => {
20595
20625
  const key = cameraSensorRefKey(ref);
@@ -20601,39 +20631,41 @@ var CameraSensorsConfigSchema = object({
20601
20631
  seen.add(key);
20602
20632
  });
20603
20633
  });
20604
- var RefFields = {
20634
+ /** Every attachment names its mode; an older orchestrator that does not is in addition. */
20635
+ var AttachmentFields = {
20605
20636
  addonId: string(),
20606
- stableId: string()
20637
+ stableId: string(),
20638
+ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
20607
20639
  };
20608
20640
  var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20609
20641
  object({
20610
- ...RefFields,
20642
+ ...AttachmentFields,
20611
20643
  state: literal("ready"),
20612
20644
  deviceId: number(),
20613
20645
  name: string(),
20614
20646
  caps: array(string()).readonly()
20615
20647
  }),
20616
20648
  object({
20617
- ...RefFields,
20649
+ ...AttachmentFields,
20618
20650
  state: literal("offline"),
20619
20651
  deviceId: number(),
20620
20652
  name: string(),
20621
20653
  reason: _enum(["offline", "disabled"])
20622
20654
  }),
20623
20655
  object({
20624
- ...RefFields,
20656
+ ...AttachmentFields,
20625
20657
  state: literal("missing"),
20626
20658
  reason: string()
20627
20659
  }),
20628
20660
  object({
20629
- ...RefFields,
20661
+ ...AttachmentFields,
20630
20662
  state: literal("unsupported"),
20631
20663
  deviceId: number(),
20632
20664
  name: string(),
20633
20665
  reason: string()
20634
20666
  }),
20635
20667
  object({
20636
- ...RefFields,
20668
+ ...AttachmentFields,
20637
20669
  state: literal("unreadable"),
20638
20670
  reason: string()
20639
20671
  })
@@ -20646,17 +20678,49 @@ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20646
20678
  * say.
20647
20679
  */
20648
20680
  var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
20681
+ /** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
20682
+ var CameraOwnMotionSchema = _enum([
20683
+ "always",
20684
+ "when-confirmed",
20685
+ "never"
20686
+ ]);
20687
+ /** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
20688
+ var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
20689
+ /**
20690
+ * The camera's OWN onboard motion (D696): the raw input the bridge combines,
20691
+ * never the effective value. The camera's `motion` slice is the effective one,
20692
+ * so a view of the camera's own row reads this.
20693
+ * - `atMs`: when the bridge received the camera's last own edge.
20694
+ * - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
20695
+ * AND it is younger than the window the bridge counts the camera's own motion
20696
+ * for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
20697
+ * sends a clear (heartbeats only) therefore reads `false` once no push came
20698
+ * within the window; a status read is a snapshot, so a live view re-asks.
20699
+ * Absent = this orchestrator has not received the camera's own motion since it
20700
+ * started (unknown, never "quiet"), or an orchestrator older than D696.
20701
+ */
20702
+ var CameraRawLevelSchema = object({
20703
+ detected: boolean(),
20704
+ atMs: number()
20705
+ });
20649
20706
  var CameraSensorsStatusSchema = discriminatedUnion("state", [
20650
- object({ state: literal("not-configured") }),
20707
+ object({
20708
+ state: literal("not-configured"),
20709
+ cameraLevel: CameraRawLevelSchema.optional()
20710
+ }),
20651
20711
  object({
20652
20712
  state: literal("unreadable"),
20653
- reason: string()
20713
+ reason: string(),
20714
+ cameraLevel: CameraRawLevelSchema.optional()
20654
20715
  }),
20655
20716
  object({
20656
20717
  state: literal("configured"),
20657
- mode: CameraSensorsModeSchema,
20718
+ cameraLevel: CameraRawLevelSchema.optional(),
20658
20719
  sensors: array(CameraSensorAttachmentSchema).readonly(),
20659
- notForwarded: CameraSensorsNotForwardedSchema.optional()
20720
+ /** Absent = an orchestrator older than CS-2: it does not say (D315). */
20721
+ cameraMotion: CameraOwnMotionSchema.optional(),
20722
+ notForwarded: CameraSensorsNotForwardedSchema.optional(),
20723
+ notEnforced: CameraSensorsNotEnforcedSchema.optional()
20660
20724
  })
20661
20725
  ]);
20662
20726
  Object.freeze({
@@ -21341,14 +21405,14 @@ var TrackSchema = object({
21341
21405
  * `derive-returned-null tile=standin`,
21342
21406
  * `native-tile tile=native no-key-frame-at-close`, …) written at close and
21343
21407
  * CLEARED by the late-keyFrame upgrade when a native tile lands after all.
21344
- * The operator-facing answer to "perché manca l'immagine?" on a track whose
21408
+ * The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
21345
21409
  * tile is a face/plate stand-in, a raster crop, or an icon.
21346
21410
  *
21347
21411
  * **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
21348
21412
  * the TILE ranked below native, so a track whose thumbnail landed natively
21349
21413
  * while its key frame missed carried no reason at all — three of the four
21350
21414
  * `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
21351
- * that shape, and their "niente ultimo" had no cause anywhere on the row.
21415
+ * that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
21352
21416
  * The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
21353
21417
  * lastFrame copy source`), so its absence is now on this line whatever the
21354
21418
  * tile ended up being.
@@ -21435,7 +21499,7 @@ var MotionEventSchema = object({
21435
21499
  /**
21436
21500
  * Ms offsets from `timestamp` (the episode's own first rising edge, so the
21437
21501
  * first entry is always `0`) of every genuine off→on transition the
21438
- * episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
21502
+ * episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
21439
21503
  * push: a firmware source that keepalives at ~1 Hz for the whole burst
21440
21504
  * (Reolink, Hikvision) produces exactly one edge; a source that reports an
21441
21505
  * explicit `false` mid-episode and then resumes before the quiet window
@@ -21959,6 +22023,7 @@ var KeyEventSchema = object({
21959
22023
  bestEventId: string(),
21960
22024
  /** Track lifetime in ms (lastSeen - firstSeen). */
21961
22025
  windowMs: number().optional(),
22026
+ audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
21962
22027
  ...TrackFlagFields,
21963
22028
  ...TrackRetrainFields
21964
22029
  });
@@ -23847,8 +23912,10 @@ var RunnerCameraConfigSchema = object({
23847
23912
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
23848
23913
  * analyzer providers) running on decoded frames in this runner.
23849
23914
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
23850
- * analytics). The provider emits ProviderMotion
23851
- * events; the orchestrator forwards to `reportMotion`.
23915
+ * analytics). The provider emits its raw push as `ProviderMotion`
23916
+ * (D673); the orchestrator's camera-sensors bridge re-emits the camera's
23917
+ * effective motion as `MotionOnMotionChanged`, which is what reaches
23918
+ * `reportMotion`.
23852
23919
  */
23853
23920
  motionSources: MotionSourcesSchema.default(["analyzer"]),
23854
23921
  /**
@@ -24025,7 +24092,15 @@ var RunnerLocalLoadSchema = object({
24025
24092
  hasGpu: boolean(),
24026
24093
  inferenceBackend: string().optional(),
24027
24094
  cpuCores: number().optional()
24028
- })
24095
+ }),
24096
+ /**
24097
+ * Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
24098
+ * runner never writes it. ABSENT = a runner older than D696, which still
24099
+ * writes the slice from its phase machine; the orchestrator does not write
24100
+ * while any runner node is absent-or-unanswered, so one slice never has two
24101
+ * writers.
24102
+ */
24103
+ motionSliceWriter: literal("orchestrator").optional()
24029
24104
  });
24030
24105
  /**
24031
24106
  * Aggregate runtime metrics for the runner's whole local pool. Mirrors the
@@ -26661,7 +26736,7 @@ var ClipPlaybackSchema = object({
26661
26736
  * **One authorised yes is one wake.** `next-natural` — take the clip the next
26662
26737
  * time the camera is awake for its own reasons — is deliberately not a member:
26663
26738
  * it was proposed, it is free on the battery, and the operator declined it on
26664
- * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."*,
26739
+ * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
26665
26740
  * D558 "Considered and not taken").
26666
26741
  */
26667
26742
  var ClipWakeSchema = _enum(["authorised"]);
@@ -26922,7 +26997,7 @@ DeviceType.Camera, method(object({
26922
26997
  * It replaced `sources?: string[]`, a VIEW filter over source ids that
26923
26998
  * assumed the answer was a fan-out over everything a camera has. The
26924
26999
  * operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
26925
- * solo"* — so the list is asked of one provider at a time and there is
27000
+ * solo"* [there is only one user] — so the list is asked of one provider at a time and there is
26926
27001
  * nothing to filter out of it.
26927
27002
  */
26928
27003
  provider: string().min(1)
@@ -28866,6 +28941,17 @@ object({
28866
28941
  deviceId: number(),
28867
28942
  status: DeviceStatusSchema
28868
28943
  });
28944
+ object({
28945
+ /** Ms epoch of the last press. null = never observed since this provider started. */
28946
+ lastPressedAt: number().nullable(),
28947
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
28948
+ pressCountSinceStart: number()
28949
+ });
28950
+ object({
28951
+ deviceId: number(),
28952
+ timestamp: number()
28953
+ });
28954
+ DeviceType.Button, DeviceType.Camera;
28869
28955
  /**
28870
28956
  * Enum-state sensor — a string value picked from a finite option set.
28871
28957
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -30510,9 +30596,9 @@ object({
30510
30596
  /** Ms epoch of the last detected-true observation. Null if never detected. */
30511
30597
  lastDetectedAt: number().nullable(),
30512
30598
  /**
30513
- * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device,
30514
- * `null` while false and on every `Sensor` device (D475) — see that
30515
- * constant's doc for the one-authority rule.
30599
+ * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
30600
+ * orchestrator writes it, D696), `null` while false and on every `Sensor`
30601
+ * device (D475) — see that constant's doc for the one-authority rule.
30516
30602
  *
30517
30603
  * ## Reading this field still arms nothing
30518
30604
  *
@@ -30530,38 +30616,41 @@ object({
30530
30616
  * `addon-export-alexa/src/motion-clear-hold.ts` and
30531
30617
  * `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
30532
30618
  *
30533
- * ## Who writes it
30534
- *
30535
- * - **Cameras** — the runner's phase machine, `active → watching` on
30536
- * `cooldown_expired`, which then writes this slice with
30537
- * `detected: false` (`handlePhaseChanged` in
30538
- * `pipeline-runner/index.ts`). It produces the FALLING edge, which
30539
- * matters most for the sources that only ever push a rising one:
30540
- * Reolink emits `MotionOnMotionChanged { detected: true }` and never
30541
- * a false.
30542
- * - **Sensors** (Home Assistant binary sensors, Homematic) — the
30543
- * provider pushes the false itself, from the upstream system's own
30544
- * state change. No phase machine is involved.
30545
- *
30546
- * ### The phase machine is CANONICAL, not sole — and that is a defect
30547
- *
30548
- * An earlier revision of this docblock (mine, 2026-09-12) claimed the
30549
- * phase machine is the sole writer for a camera. It is not.
30550
- * `hikvision-camera.ts:3464` and `amcrest-camera.ts:445` both call
30551
- * `setCapSlice(motionCapability, …)` on their own rising edge, and
30552
- * Hikvision's comment says why: it read THIS docblock, agreed the
30553
- * runner is canonical, and wrote anyway to avoid per-tick churn. So
30554
- * two authorities can disagree about one slice, which this repo
30555
- * forbids, and the doc said otherwise — which is worse than saying
30556
- * nothing, because it reads as verification.
30557
- *
30558
- * This predates D475 and is not fixed there: the fix touches every
30559
- * camera provider. Recorded in D475's Consequences. Do not restore the
30560
- * "sole writer" wording without also removing the other writers.
30619
+ * ## Who writes it (D696)
30620
+ *
30621
+ * - **Cameras** — the orchestrator, and nothing else. It writes the camera's
30622
+ * EFFECTIVE motion (`addon-pipeline-orchestrator`
30623
+ * `camera-sensors/motion-slice.ts`), alongside the effective
30624
+ * `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
30625
+ * for a split camera, an unsplit emitter's direct event, the analyzer and
30626
+ * device activity, as the camera's `motionSources` counts them. A source
30627
+ * that never sends a clear falls one window after its last `true`.
30628
+ * `lastDetectedAt` moves only on an effective rise. No camera provider
30629
+ * writes this slice (not even a boot seed), and neither does the runner's
30630
+ * phase machine: its phase is "a session is attached" for every on-motion
30631
+ * session, not motion, and it now has its own `DetectionPhaseTransition`.
30632
+ * A provider's `isDetected` answers from the hub's slice.
30633
+ * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
30634
+ * imports) — the provider pushes both edges itself, from the upstream
30635
+ * system's own state change. That is the sensor's own fact.
30636
+ *
30637
+ * `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
30638
+ * `motion` slice; each sensor writer is a named exemption.
30639
+ *
30640
+ * This replaces the D475 §4 rule ("the phase machine is the sole writer").
30641
+ * That rule was never true: Hikvision and Amcrest wrote the slice raw beside
30642
+ * it, every provider seeded it at boot, and every session left it
30643
+ * `detected: true` after its detach.
30561
30644
  */
30562
30645
  autoClearAfterMs: number().nullable()
30563
30646
  });
30564
- object({
30647
+ /**
30648
+ * Payload of `motion.onMotionChanged` event + the corresponding bus
30649
+ * event `EventCategory.MotionOnMotionChanged`. Single source of truth
30650
+ * — both the cap event surface and the bus payload type alias to this
30651
+ * schema.
30652
+ */
30653
+ var MotionOnMotionChangedDataSchema = object({
30565
30654
  deviceId: number(),
30566
30655
  detected: boolean(),
30567
30656
  timestamp: number(),
@@ -33026,7 +33115,7 @@ var ReadGopBytesResultSchema = object({
33026
33115
  /**
33027
33116
  * A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
33028
33117
  * twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
33029
- * replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-clip-su-pipeline.md`):
33118
+ * replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
33030
33119
  * a replay needs several seconds of native pixels, not one frame.
33031
33120
  *
33032
33121
  * `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
@@ -35642,6 +35731,7 @@ DeviceType.Camera, method(object({
35642
35731
  detection: array(ZoneRuleSchema).readonly(),
35643
35732
  package: array(ZoneRuleSchema).readonly()
35644
35733
  });
35734
+ SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
35645
35735
  /**
35646
35736
  * Accessory device helpers — shared across drivers.
35647
35737
  *
@@ -40620,6 +40710,12 @@ Object.freeze({
40620
40710
  addonId: null,
40621
40711
  access: "view"
40622
40712
  },
40713
+ "notificationRules.getAlarmSensors": {
40714
+ capName: "notification-rules",
40715
+ capScope: "system",
40716
+ addonId: null,
40717
+ access: "view"
40718
+ },
40623
40719
  "notificationRules.getClipRetentionAsks": {
40624
40720
  capName: "notification-rules",
40625
40721
  capScope: "system",
@@ -44198,6 +44294,11 @@ Object.freeze({
44198
44294
  }
44199
44295
  });
44200
44296
  Object.freeze({
44297
+ "accessories.getStatus": [{
44298
+ name: "deviceId",
44299
+ form: "single",
44300
+ optional: false
44301
+ }],
44201
44302
  "accessories.setChildHidden": [{
44202
44303
  name: "childDeviceId",
44203
44304
  form: "single",
@@ -44217,6 +44318,11 @@ Object.freeze({
44217
44318
  form: "single",
44218
44319
  optional: false
44219
44320
  }],
44321
+ "airQualitySensor.getStatus": [{
44322
+ name: "deviceId",
44323
+ form: "single",
44324
+ optional: false
44325
+ }],
44220
44326
  "alarmPanel.arm": [{
44221
44327
  name: "deviceId",
44222
44328
  form: "single",
@@ -44227,11 +44333,36 @@ Object.freeze({
44227
44333
  form: "single",
44228
44334
  optional: false
44229
44335
  }],
44336
+ "alarmPanel.getStatus": [{
44337
+ name: "deviceId",
44338
+ form: "single",
44339
+ optional: false
44340
+ }],
44230
44341
  "alarmPanel.trigger": [{
44231
44342
  name: "deviceId",
44232
44343
  form: "single",
44233
44344
  optional: false
44234
44345
  }],
44346
+ "ambientLightSensor.getStatus": [{
44347
+ name: "deviceId",
44348
+ form: "single",
44349
+ optional: false
44350
+ }],
44351
+ "audioAnalysis.applyDeviceSettingsPatch": [{
44352
+ name: "deviceId",
44353
+ form: "single",
44354
+ optional: false
44355
+ }],
44356
+ "audioAnalysis.getDeviceLiveContribution": [{
44357
+ name: "deviceId",
44358
+ form: "single",
44359
+ optional: false
44360
+ }],
44361
+ "audioAnalysis.getDeviceSettingsContribution": [{
44362
+ name: "deviceId",
44363
+ form: "single",
44364
+ optional: false
44365
+ }],
44235
44366
  "audioAnalysis.resolveDeviceSettings": [{
44236
44367
  name: "deviceId",
44237
44368
  form: "single",
@@ -44272,16 +44403,36 @@ Object.freeze({
44272
44403
  form: "single",
44273
44404
  optional: false
44274
44405
  }],
44406
+ "automationControl.getStatus": [{
44407
+ name: "deviceId",
44408
+ form: "single",
44409
+ optional: false
44410
+ }],
44275
44411
  "automationControl.trigger": [{
44276
44412
  name: "deviceId",
44277
44413
  form: "single",
44278
44414
  optional: false
44279
44415
  }],
44416
+ "battery.getStatus": [{
44417
+ name: "deviceId",
44418
+ form: "single",
44419
+ optional: false
44420
+ }],
44280
44421
  "battery.wakeForStream": [{
44281
44422
  name: "deviceId",
44282
44423
  form: "single",
44283
44424
  optional: false
44284
44425
  }],
44426
+ "binary.getStatus": [{
44427
+ name: "deviceId",
44428
+ form: "single",
44429
+ optional: false
44430
+ }],
44431
+ "brightness.getStatus": [{
44432
+ name: "deviceId",
44433
+ form: "single",
44434
+ optional: false
44435
+ }],
44285
44436
  "brightness.setBrightness": [{
44286
44437
  name: "deviceId",
44287
44438
  form: "single",
@@ -44297,6 +44448,26 @@ Object.freeze({
44297
44448
  form: "single",
44298
44449
  optional: false
44299
44450
  }],
44451
+ "cameraCredentials.getStatus": [{
44452
+ name: "deviceId",
44453
+ form: "single",
44454
+ optional: false
44455
+ }],
44456
+ "cameraGridLayout.applyDeviceSettingsPatch": [{
44457
+ name: "deviceId",
44458
+ form: "single",
44459
+ optional: false
44460
+ }],
44461
+ "cameraGridLayout.getDeviceLiveContribution": [{
44462
+ name: "deviceId",
44463
+ form: "single",
44464
+ optional: false
44465
+ }],
44466
+ "cameraGridLayout.getDeviceSettingsContribution": [{
44467
+ name: "deviceId",
44468
+ form: "single",
44469
+ optional: false
44470
+ }],
44300
44471
  "cameraGridLayout.getLayout": [{
44301
44472
  name: "deviceId",
44302
44473
  form: "single",
@@ -44312,6 +44483,21 @@ Object.freeze({
44312
44483
  form: "single",
44313
44484
  optional: false
44314
44485
  }],
44486
+ "cameraPipelineConfig.applyDeviceSettingsPatch": [{
44487
+ name: "deviceId",
44488
+ form: "single",
44489
+ optional: false
44490
+ }],
44491
+ "cameraPipelineConfig.getDeviceLiveContribution": [{
44492
+ name: "deviceId",
44493
+ form: "single",
44494
+ optional: false
44495
+ }],
44496
+ "cameraPipelineConfig.getDeviceSettingsContribution": [{
44497
+ name: "deviceId",
44498
+ form: "single",
44499
+ optional: false
44500
+ }],
44315
44501
  "cameraStreams.getBrokerStreams": [{
44316
44502
  name: "deviceId",
44317
44503
  form: "single",
@@ -44337,6 +44523,16 @@ Object.freeze({
44337
44523
  form: "single",
44338
44524
  optional: false
44339
44525
  }],
44526
+ "carbonMonoxide.getStatus": [{
44527
+ name: "deviceId",
44528
+ form: "single",
44529
+ optional: false
44530
+ }],
44531
+ "climateControl.getStatus": [{
44532
+ name: "deviceId",
44533
+ form: "single",
44534
+ optional: false
44535
+ }],
44340
44536
  "climateControl.setFanMode": [{
44341
44537
  name: "deviceId",
44342
44538
  form: "single",
@@ -44377,16 +44573,41 @@ Object.freeze({
44377
44573
  form: "single",
44378
44574
  optional: false
44379
44575
  }],
44576
+ "color.getStatus": [{
44577
+ name: "deviceId",
44578
+ form: "single",
44579
+ optional: false
44580
+ }],
44380
44581
  "color.setColor": [{
44381
44582
  name: "deviceId",
44382
44583
  form: "single",
44383
44584
  optional: false
44384
44585
  }],
44586
+ "connectivity.getStatus": [{
44587
+ name: "deviceId",
44588
+ form: "single",
44589
+ optional: false
44590
+ }],
44591
+ "consumables.getStatus": [{
44592
+ name: "deviceId",
44593
+ form: "single",
44594
+ optional: false
44595
+ }],
44385
44596
  "consumables.reset": [{
44386
44597
  name: "deviceId",
44387
44598
  form: "single",
44388
44599
  optional: false
44389
44600
  }],
44601
+ "contact.getStatus": [{
44602
+ name: "deviceId",
44603
+ form: "single",
44604
+ optional: false
44605
+ }],
44606
+ "control.getStatus": [{
44607
+ name: "deviceId",
44608
+ form: "single",
44609
+ optional: false
44610
+ }],
44390
44611
  "control.setValue": [{
44391
44612
  name: "deviceId",
44392
44613
  form: "single",
@@ -44397,6 +44618,11 @@ Object.freeze({
44397
44618
  form: "single",
44398
44619
  optional: false
44399
44620
  }],
44621
+ "cover.getStatus": [{
44622
+ name: "deviceId",
44623
+ form: "single",
44624
+ optional: false
44625
+ }],
44400
44626
  "cover.open": [{
44401
44627
  name: "deviceId",
44402
44628
  form: "single",
@@ -44422,6 +44648,11 @@ Object.freeze({
44422
44648
  form: "single",
44423
44649
  optional: false
44424
44650
  }],
44651
+ "dayNight.getStatus": [{
44652
+ name: "deviceId",
44653
+ form: "single",
44654
+ optional: false
44655
+ }],
44425
44656
  "dayNight.setSettings": [{
44426
44657
  name: "deviceId",
44427
44658
  form: "single",
@@ -44432,11 +44663,31 @@ Object.freeze({
44432
44663
  form: "single",
44433
44664
  optional: true
44434
44665
  }],
44666
+ "detectionPipeline.applyDeviceSettingsPatch": [{
44667
+ name: "deviceId",
44668
+ form: "single",
44669
+ optional: false
44670
+ }],
44671
+ "detectionPipeline.getDeviceLiveContribution": [{
44672
+ name: "deviceId",
44673
+ form: "single",
44674
+ optional: false
44675
+ }],
44676
+ "detectionPipeline.getDeviceSettingsContribution": [{
44677
+ name: "deviceId",
44678
+ form: "single",
44679
+ optional: false
44680
+ }],
44435
44681
  "deviceAdminLink.getAdminLink": [{
44436
44682
  name: "deviceId",
44437
44683
  form: "single",
44438
44684
  optional: false
44439
44685
  }],
44686
+ "deviceAdoption.getStatus": [{
44687
+ name: "deviceId",
44688
+ form: "single",
44689
+ optional: false
44690
+ }],
44440
44691
  "deviceAdoption.release": [{
44441
44692
  name: "camDeviceId",
44442
44693
  form: "single",
@@ -44452,6 +44703,11 @@ Object.freeze({
44452
44703
  form: "single",
44453
44704
  optional: false
44454
44705
  }],
44706
+ "deviceDiscovery.getStatus": [{
44707
+ name: "deviceId",
44708
+ form: "single",
44709
+ optional: false
44710
+ }],
44455
44711
  "deviceDiscovery.listDiscovered": [{
44456
44712
  name: "deviceId",
44457
44713
  form: "single",
@@ -44471,6 +44727,21 @@ Object.freeze({
44471
44727
  form: "single",
44472
44728
  optional: false
44473
44729
  }],
44730
+ "deviceExport.applyDeviceSettingsPatch": [{
44731
+ name: "deviceId",
44732
+ form: "single",
44733
+ optional: false
44734
+ }],
44735
+ "deviceExport.getDeviceLiveContribution": [{
44736
+ name: "deviceId",
44737
+ form: "single",
44738
+ optional: false
44739
+ }],
44740
+ "deviceExport.getDeviceSettingsContribution": [{
44741
+ name: "deviceId",
44742
+ form: "single",
44743
+ optional: false
44744
+ }],
44474
44745
  "deviceExtension.listCandidates": [{
44475
44746
  name: "deviceId",
44476
44747
  form: "single",
@@ -44819,6 +45090,26 @@ Object.freeze({
44819
45090
  form: "single",
44820
45091
  optional: false
44821
45092
  }],
45093
+ "deviceStatus.getStatus": [{
45094
+ name: "deviceId",
45095
+ form: "single",
45096
+ optional: false
45097
+ }],
45098
+ "doorbell.getStatus": [{
45099
+ name: "deviceId",
45100
+ form: "single",
45101
+ optional: false
45102
+ }],
45103
+ "enumSensor.getStatus": [{
45104
+ name: "deviceId",
45105
+ form: "single",
45106
+ optional: false
45107
+ }],
45108
+ "eventEmitter.getStatus": [{
45109
+ name: "deviceId",
45110
+ form: "single",
45111
+ optional: false
45112
+ }],
44822
45113
  "faceGallery.getFaceByTrack": [{
44823
45114
  name: "deviceId",
44824
45115
  form: "single",
@@ -44833,6 +45124,11 @@ Object.freeze({
44833
45124
  form: "array",
44834
45125
  optional: true
44835
45126
  }],
45127
+ "fanControl.getStatus": [{
45128
+ name: "deviceId",
45129
+ form: "single",
45130
+ optional: false
45131
+ }],
44836
45132
  "fanControl.setDirection": [{
44837
45133
  name: "deviceId",
44838
45134
  form: "single",
@@ -44853,6 +45149,26 @@ Object.freeze({
44853
45149
  form: "single",
44854
45150
  optional: false
44855
45151
  }],
45152
+ "featureProbe.getStatus": [{
45153
+ name: "deviceId",
45154
+ form: "single",
45155
+ optional: false
45156
+ }],
45157
+ "flood.getStatus": [{
45158
+ name: "deviceId",
45159
+ form: "single",
45160
+ optional: false
45161
+ }],
45162
+ "gas.getStatus": [{
45163
+ name: "deviceId",
45164
+ form: "single",
45165
+ optional: false
45166
+ }],
45167
+ "humidifier.getStatus": [{
45168
+ name: "deviceId",
45169
+ form: "single",
45170
+ optional: false
45171
+ }],
44856
45172
  "humidifier.setMode": [{
44857
45173
  name: "deviceId",
44858
45174
  form: "single",
@@ -44868,11 +45184,26 @@ Object.freeze({
44868
45184
  form: "single",
44869
45185
  optional: false
44870
45186
  }],
45187
+ "humiditySensor.getStatus": [{
45188
+ name: "deviceId",
45189
+ form: "single",
45190
+ optional: false
45191
+ }],
45192
+ "image.getStatus": [{
45193
+ name: "deviceId",
45194
+ form: "single",
45195
+ optional: false
45196
+ }],
44871
45197
  "imageSettings.getOptions": [{
44872
45198
  name: "deviceId",
44873
45199
  form: "single",
44874
45200
  optional: false
44875
45201
  }],
45202
+ "imageSettings.getStatus": [{
45203
+ name: "deviceId",
45204
+ form: "single",
45205
+ optional: false
45206
+ }],
44876
45207
  "imageSettings.setSettings": [{
44877
45208
  name: "deviceId",
44878
45209
  form: "single",
@@ -44883,6 +45214,11 @@ Object.freeze({
44883
45214
  form: "single",
44884
45215
  optional: false
44885
45216
  }],
45217
+ "intercom.getStatus": [{
45218
+ name: "deviceId",
45219
+ form: "single",
45220
+ optional: false
45221
+ }],
44886
45222
  "intercom.handleAnswer": [{
44887
45223
  name: "deviceId",
44888
45224
  form: "single",
@@ -44913,6 +45249,11 @@ Object.freeze({
44913
45249
  form: "single",
44914
45250
  optional: false
44915
45251
  }],
45252
+ "lawnMowerControl.getStatus": [{
45253
+ name: "deviceId",
45254
+ form: "single",
45255
+ optional: false
45256
+ }],
44916
45257
  "lawnMowerControl.pause": [{
44917
45258
  name: "deviceId",
44918
45259
  form: "single",
@@ -44923,6 +45264,11 @@ Object.freeze({
44923
45264
  form: "single",
44924
45265
  optional: false
44925
45266
  }],
45267
+ "lockControl.getStatus": [{
45268
+ name: "deviceId",
45269
+ form: "single",
45270
+ optional: false
45271
+ }],
44926
45272
  "lockControl.lock": [{
44927
45273
  name: "deviceId",
44928
45274
  form: "single",
@@ -44938,6 +45284,11 @@ Object.freeze({
44938
45284
  form: "single",
44939
45285
  optional: false
44940
45286
  }],
45287
+ "mediaPlayer.getStatus": [{
45288
+ name: "deviceId",
45289
+ form: "single",
45290
+ optional: false
45291
+ }],
44941
45292
  "mediaPlayer.next": [{
44942
45293
  name: "deviceId",
44943
45294
  form: "single",
@@ -44998,6 +45349,11 @@ Object.freeze({
44998
45349
  form: "single",
44999
45350
  optional: false
45000
45351
  }],
45352
+ "motion.getStatus": [{
45353
+ name: "deviceId",
45354
+ form: "single",
45355
+ optional: false
45356
+ }],
45001
45357
  "motion.isDetected": [{
45002
45358
  name: "deviceId",
45003
45359
  form: "single",
@@ -45008,11 +45364,31 @@ Object.freeze({
45008
45364
  form: "single",
45009
45365
  optional: false
45010
45366
  }],
45367
+ "motionDetection.applyDeviceSettingsPatch": [{
45368
+ name: "deviceId",
45369
+ form: "single",
45370
+ optional: false
45371
+ }],
45372
+ "motionDetection.getDeviceLiveContribution": [{
45373
+ name: "deviceId",
45374
+ form: "single",
45375
+ optional: false
45376
+ }],
45377
+ "motionDetection.getDeviceSettingsContribution": [{
45378
+ name: "deviceId",
45379
+ form: "single",
45380
+ optional: false
45381
+ }],
45011
45382
  "motionDetection.removeCamera": [{
45012
45383
  name: "deviceId",
45013
45384
  form: "single",
45014
45385
  optional: false
45015
45386
  }],
45387
+ "motionTrigger.getStatus": [{
45388
+ name: "deviceId",
45389
+ form: "single",
45390
+ optional: false
45391
+ }],
45016
45392
  "motionTrigger.setMotionTrigger": [{
45017
45393
  name: "deviceId",
45018
45394
  form: "single",
@@ -45023,6 +45399,11 @@ Object.freeze({
45023
45399
  form: "single",
45024
45400
  optional: false
45025
45401
  }],
45402
+ "motionZones.getStatus": [{
45403
+ name: "deviceId",
45404
+ form: "single",
45405
+ optional: false
45406
+ }],
45026
45407
  "motionZones.setZone": [{
45027
45408
  name: "deviceId",
45028
45409
  form: "single",
@@ -45033,6 +45414,11 @@ Object.freeze({
45033
45414
  form: "single",
45034
45415
  optional: false
45035
45416
  }],
45417
+ "nativeObjectDetection.getStatus": [{
45418
+ name: "deviceId",
45419
+ form: "single",
45420
+ optional: false
45421
+ }],
45036
45422
  "nativeObjectDetection.setEnabled": [{
45037
45423
  name: "deviceId",
45038
45424
  form: "single",
@@ -45048,6 +45434,11 @@ Object.freeze({
45048
45434
  form: "single",
45049
45435
  optional: false
45050
45436
  }],
45437
+ "navigation.getStatus": [{
45438
+ name: "deviceId",
45439
+ form: "single",
45440
+ optional: false
45441
+ }],
45051
45442
  "navigation.goToPoint": [{
45052
45443
  name: "deviceId",
45053
45444
  form: "single",
@@ -45093,6 +45484,11 @@ Object.freeze({
45093
45484
  form: "single",
45094
45485
  optional: false
45095
45486
  }],
45487
+ "networkLink.getStatus": [{
45488
+ name: "deviceId",
45489
+ form: "single",
45490
+ optional: false
45491
+ }],
45096
45492
  "networkQuality.getDeviceStats": [{
45097
45493
  name: "deviceId",
45098
45494
  form: "single",
@@ -45103,6 +45499,11 @@ Object.freeze({
45103
45499
  form: "single",
45104
45500
  optional: false
45105
45501
  }],
45502
+ "notificationRules.getAlarmSensors": [{
45503
+ name: "deviceIds",
45504
+ form: "array",
45505
+ optional: false
45506
+ }],
45106
45507
  "notificationRules.setDeviceMuted": [{
45107
45508
  name: "deviceId",
45108
45509
  form: "single",
@@ -45113,11 +45514,26 @@ Object.freeze({
45113
45514
  form: "single",
45114
45515
  optional: false
45115
45516
  }],
45517
+ "notifier.getStatus": [{
45518
+ name: "deviceId",
45519
+ form: "single",
45520
+ optional: false
45521
+ }],
45116
45522
  "notifier.send": [{
45117
45523
  name: "deviceId",
45118
45524
  form: "single",
45119
45525
  optional: false
45120
45526
  }],
45527
+ "numericSensor.getStatus": [{
45528
+ name: "deviceId",
45529
+ form: "single",
45530
+ optional: false
45531
+ }],
45532
+ "osd.getStatus": [{
45533
+ name: "deviceId",
45534
+ form: "single",
45535
+ optional: false
45536
+ }],
45121
45537
  "osd.setOverlay": [{
45122
45538
  name: "deviceId",
45123
45539
  form: "single",
@@ -45177,6 +45593,11 @@ Object.freeze({
45177
45593
  form: "single",
45178
45594
  optional: false
45179
45595
  }],
45596
+ "petFeeder.getStatus": [{
45597
+ name: "deviceId",
45598
+ form: "single",
45599
+ optional: false
45600
+ }],
45180
45601
  "petFeeder.markFoodReplenished": [{
45181
45602
  name: "deviceId",
45182
45603
  form: "single",
@@ -45212,6 +45633,11 @@ Object.freeze({
45212
45633
  form: "single",
45213
45634
  optional: false
45214
45635
  }],
45636
+ "pipelineAnalytics.applyDeviceSettingsPatch": [{
45637
+ name: "deviceId",
45638
+ form: "single",
45639
+ optional: false
45640
+ }],
45215
45641
  "pipelineAnalytics.clearTrackRelation": [{
45216
45642
  name: "deviceId",
45217
45643
  form: "single",
@@ -45252,6 +45678,16 @@ Object.freeze({
45252
45678
  form: "single",
45253
45679
  optional: false
45254
45680
  }],
45681
+ "pipelineAnalytics.getDeviceLiveContribution": [{
45682
+ name: "deviceId",
45683
+ form: "single",
45684
+ optional: false
45685
+ }],
45686
+ "pipelineAnalytics.getDeviceSettingsContribution": [{
45687
+ name: "deviceId",
45688
+ form: "single",
45689
+ optional: false
45690
+ }],
45255
45691
  "pipelineAnalytics.getEventDensity": [{
45256
45692
  name: "deviceId",
45257
45693
  form: "single",
@@ -45467,6 +45903,11 @@ Object.freeze({
45467
45903
  form: "single",
45468
45904
  optional: true
45469
45905
  }],
45906
+ "pipelineOrchestrator.applyDeviceSettingsPatch": [{
45907
+ name: "deviceId",
45908
+ form: "single",
45909
+ optional: false
45910
+ }],
45470
45911
  "pipelineOrchestrator.assignAudio": [{
45471
45912
  name: "deviceId",
45472
45913
  form: "single",
@@ -45512,6 +45953,16 @@ Object.freeze({
45512
45953
  form: "single",
45513
45954
  optional: false
45514
45955
  }],
45956
+ "pipelineOrchestrator.getDeviceLiveContribution": [{
45957
+ name: "deviceId",
45958
+ form: "single",
45959
+ optional: false
45960
+ }],
45961
+ "pipelineOrchestrator.getDeviceSettingsContribution": [{
45962
+ name: "deviceId",
45963
+ form: "single",
45964
+ optional: false
45965
+ }],
45515
45966
  "pipelineOrchestrator.getPipelineAssignment": [{
45516
45967
  name: "deviceId",
45517
45968
  form: "single",
@@ -45632,11 +46083,31 @@ Object.freeze({
45632
46083
  form: "single",
45633
46084
  optional: true
45634
46085
  }],
46086
+ "powerMeter.getStatus": [{
46087
+ name: "deviceId",
46088
+ form: "single",
46089
+ optional: false
46090
+ }],
46091
+ "presence.getStatus": [{
46092
+ name: "deviceId",
46093
+ form: "single",
46094
+ optional: false
46095
+ }],
46096
+ "pressureSensor.getStatus": [{
46097
+ name: "deviceId",
46098
+ form: "single",
46099
+ optional: false
46100
+ }],
45635
46101
  "privacyMask.getOptions": [{
45636
46102
  name: "deviceId",
45637
46103
  form: "single",
45638
46104
  optional: false
45639
46105
  }],
46106
+ "privacyMask.getStatus": [{
46107
+ name: "deviceId",
46108
+ form: "single",
46109
+ optional: false
46110
+ }],
45640
46111
  "privacyMask.setAudioEnabled": [{
45641
46112
  name: "deviceId",
45642
46113
  form: "single",
@@ -45687,6 +46158,11 @@ Object.freeze({
45687
46158
  form: "single",
45688
46159
  optional: false
45689
46160
  }],
46161
+ "ptz.getStatus": [{
46162
+ name: "deviceId",
46163
+ form: "single",
46164
+ optional: false
46165
+ }],
45690
46166
  "ptz.goHome": [{
45691
46167
  name: "deviceId",
45692
46168
  form: "single",
@@ -45777,6 +46253,11 @@ Object.freeze({
45777
46253
  form: "single",
45778
46254
  optional: false
45779
46255
  }],
46256
+ "recordingArchive.applyDeviceSettingsPatch": [{
46257
+ name: "deviceId",
46258
+ form: "single",
46259
+ optional: false
46260
+ }],
45780
46261
  "recordingArchive.deleteFootprint": [{
45781
46262
  name: "deviceId",
45782
46263
  form: "single",
@@ -45797,6 +46278,21 @@ Object.freeze({
45797
46278
  form: "single",
45798
46279
  optional: false
45799
46280
  }],
46281
+ "recordingArchive.getDeviceLiveContribution": [{
46282
+ name: "deviceId",
46283
+ form: "single",
46284
+ optional: false
46285
+ }],
46286
+ "recordingArchive.getDeviceSettingsContribution": [{
46287
+ name: "deviceId",
46288
+ form: "single",
46289
+ optional: false
46290
+ }],
46291
+ "recordingArchive.getStatus": [{
46292
+ name: "deviceId",
46293
+ form: "single",
46294
+ optional: false
46295
+ }],
45800
46296
  "recordingArchive.listOpsLog": [{
45801
46297
  name: "deviceId",
45802
46298
  form: "single",
@@ -45882,6 +46378,11 @@ Object.freeze({
45882
46378
  form: "single",
45883
46379
  optional: false
45884
46380
  }],
46381
+ "recordingOnboard.getStatus": [{
46382
+ name: "deviceId",
46383
+ form: "single",
46384
+ optional: false
46385
+ }],
45885
46386
  "recordingOnboard.setSettings": [{
45886
46387
  name: "deviceId",
45887
46388
  form: "single",
@@ -45912,6 +46413,11 @@ Object.freeze({
45912
46413
  form: "single",
45913
46414
  optional: false
45914
46415
  }],
46416
+ "sceneMonitor.getStatus": [{
46417
+ name: "deviceId",
46418
+ form: "single",
46419
+ optional: false
46420
+ }],
45915
46421
  "sceneMonitor.listScenes": [{
45916
46422
  name: "deviceId",
45917
46423
  form: "single",
@@ -45937,6 +46443,11 @@ Object.freeze({
45937
46443
  form: "single",
45938
46444
  optional: false
45939
46445
  }],
46446
+ "scriptRunner.getStatus": [{
46447
+ name: "deviceId",
46448
+ form: "single",
46449
+ optional: false
46450
+ }],
45940
46451
  "scriptRunner.run": [{
45941
46452
  name: "deviceId",
45942
46453
  form: "single",
@@ -45947,11 +46458,31 @@ Object.freeze({
45947
46458
  form: "single",
45948
46459
  optional: false
45949
46460
  }],
46461
+ "smoke.getStatus": [{
46462
+ name: "deviceId",
46463
+ form: "single",
46464
+ optional: false
46465
+ }],
46466
+ "snapshot.applyDeviceSettingsPatch": [{
46467
+ name: "deviceId",
46468
+ form: "single",
46469
+ optional: false
46470
+ }],
45950
46471
  "snapshot.getDebugState": [{
45951
46472
  name: "deviceId",
45952
46473
  form: "single",
45953
46474
  optional: false
45954
46475
  }],
46476
+ "snapshot.getDeviceLiveContribution": [{
46477
+ name: "deviceId",
46478
+ form: "single",
46479
+ optional: false
46480
+ }],
46481
+ "snapshot.getDeviceSettingsContribution": [{
46482
+ name: "deviceId",
46483
+ form: "single",
46484
+ optional: false
46485
+ }],
45955
46486
  "snapshot.getSnapshot": [{
45956
46487
  name: "deviceId",
45957
46488
  form: "single",
@@ -45968,6 +46499,11 @@ Object.freeze({
45968
46499
  form: "array",
45969
46500
  optional: false
45970
46501
  }],
46502
+ "snapshot.getStatus": [{
46503
+ name: "deviceId",
46504
+ form: "single",
46505
+ optional: false
46506
+ }],
45971
46507
  "snapshot.invalidateCache": [{
45972
46508
  name: "deviceId",
45973
46509
  form: "single",
@@ -45978,6 +46514,11 @@ Object.freeze({
45978
46514
  form: "single",
45979
46515
  optional: false
45980
46516
  }],
46517
+ "streamBroker.applyDeviceSettingsPatch": [{
46518
+ name: "deviceId",
46519
+ form: "single",
46520
+ optional: false
46521
+ }],
45981
46522
  "streamBroker.assignProfile": [{
45982
46523
  name: "deviceId",
45983
46524
  form: "single",
@@ -45993,6 +46534,16 @@ Object.freeze({
45993
46534
  form: "single",
45994
46535
  optional: false
45995
46536
  }],
46537
+ "streamBroker.getDeviceLiveContribution": [{
46538
+ name: "deviceId",
46539
+ form: "single",
46540
+ optional: false
46541
+ }],
46542
+ "streamBroker.getDeviceSettingsContribution": [{
46543
+ name: "deviceId",
46544
+ form: "single",
46545
+ optional: false
46546
+ }],
45996
46547
  "streamBroker.getStreamWithCodec": [{
45997
46548
  name: "deviceId",
45998
46549
  form: "single",
@@ -46053,16 +46604,46 @@ Object.freeze({
46053
46604
  form: "single",
46054
46605
  optional: false
46055
46606
  }],
46607
+ "streamParams.getStatus": [{
46608
+ name: "deviceId",
46609
+ form: "single",
46610
+ optional: false
46611
+ }],
46056
46612
  "streamParams.setProfile": [{
46057
46613
  name: "deviceId",
46058
46614
  form: "single",
46059
46615
  optional: false
46060
46616
  }],
46617
+ "switch.getStatus": [{
46618
+ name: "deviceId",
46619
+ form: "single",
46620
+ optional: false
46621
+ }],
46061
46622
  "switch.setState": [{
46062
46623
  name: "deviceId",
46063
46624
  form: "single",
46064
46625
  optional: false
46065
46626
  }],
46627
+ "tamper.getStatus": [{
46628
+ name: "deviceId",
46629
+ form: "single",
46630
+ optional: false
46631
+ }],
46632
+ "temperatureSensor.getStatus": [{
46633
+ name: "deviceId",
46634
+ form: "single",
46635
+ optional: false
46636
+ }],
46637
+ "update.getStatus": [{
46638
+ name: "deviceId",
46639
+ form: "single",
46640
+ optional: false
46641
+ }],
46642
+ "vacuumControl.getStatus": [{
46643
+ name: "deviceId",
46644
+ form: "single",
46645
+ optional: false
46646
+ }],
46066
46647
  "vacuumControl.locate": [{
46067
46648
  name: "deviceId",
46068
46649
  form: "single",
@@ -46098,6 +46679,11 @@ Object.freeze({
46098
46679
  form: "single",
46099
46680
  optional: false
46100
46681
  }],
46682
+ "valve.getStatus": [{
46683
+ name: "deviceId",
46684
+ form: "single",
46685
+ optional: false
46686
+ }],
46101
46687
  "valve.open": [{
46102
46688
  name: "deviceId",
46103
46689
  form: "single",
@@ -46113,6 +46699,11 @@ Object.freeze({
46113
46699
  form: "single",
46114
46700
  optional: false
46115
46701
  }],
46702
+ "vibration.getStatus": [{
46703
+ name: "deviceId",
46704
+ form: "single",
46705
+ optional: false
46706
+ }],
46116
46707
  "videoclips.dialClipStream": [{
46117
46708
  name: "deviceId",
46118
46709
  form: "single",
@@ -46148,6 +46739,11 @@ Object.freeze({
46148
46739
  form: "single",
46149
46740
  optional: false
46150
46741
  }],
46742
+ "waterHeater.getStatus": [{
46743
+ name: "deviceId",
46744
+ form: "single",
46745
+ optional: false
46746
+ }],
46151
46747
  "waterHeater.setAway": [{
46152
46748
  name: "deviceId",
46153
46749
  form: "single",
@@ -46163,6 +46759,11 @@ Object.freeze({
46163
46759
  form: "single",
46164
46760
  optional: false
46165
46761
  }],
46762
+ "weather.getStatus": [{
46763
+ name: "deviceId",
46764
+ form: "single",
46765
+ optional: false
46766
+ }],
46166
46767
  "webrtcSession.addIceCandidate": [{
46167
46768
  name: "deviceId",
46168
46769
  form: "single",
@@ -46900,7 +47501,7 @@ var PreviewTextField = string().max(200);
46900
47501
  * Whether the notification's preview is a STILL or a short animation.
46901
47502
  *
46902
47503
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
46903
- * rule)"* — the other rules already offer an animated preview, and a ten-hour
47504
+ * rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
46904
47505
  * night reads better as three seconds of motion than as one frame of it. Both
46905
47506
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
46906
47507
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -47038,6 +47639,7 @@ TimelapseRuleInputSchema.extend({
47038
47639
  createdAt: number(),
47039
47640
  updatedAt: number()
47040
47641
  });
47642
+ MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
47041
47643
  object({
47042
47644
  /**
47043
47645
  * Fraction of the box's own size added on EACH side before cutting.