@camstack/addon-ai 0.4.128 → 0.4.129

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/addon.js +297 -154
  2. package/dist/addon.mjs +297 -154
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -17,7 +17,7 @@ let node_fs_promises = require("node:fs/promises");
17
17
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
18
18
  let node_child_process = require("node:child_process");
19
19
  let node_readline = require("node:readline");
20
- //#region ../types/dist/event-category-C5xZWqz6.mjs
20
+ //#region ../types/dist/event-category-BGmz_oxW.mjs
21
21
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
22
22
  EventCategory["SystemBoot"] = "system.boot";
23
23
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -550,6 +550,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
550
550
  */
551
551
  EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
552
552
  EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
553
+ /**
554
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
555
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
556
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
557
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
558
+ * for a camera with no attached sensor). Providers must not emit
559
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
560
+ * keeps it so (camera-grid is a named, deferred exception).
561
+ */
553
562
  EventCategory["ProviderMotion"] = "provider.motion";
554
563
  EventCategory["ProviderDetection"] = "provider.detection";
555
564
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
@@ -5535,7 +5544,7 @@ function number(params) {
5535
5544
  return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
5536
5545
  }
5537
5546
  //#endregion
5538
- //#region ../types/dist/sleep-gU6hqv4_.mjs
5547
+ //#region ../types/dist/sleep-CDCONfkt.mjs
5539
5548
  /**
5540
5549
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5541
5550
  * window to float samples (D455).
@@ -7623,7 +7632,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7623
7632
  return DeviceRole;
7624
7633
  }({});
7625
7634
  //#endregion
7626
- //#region ../types/dist/composition-Dq42XWp0.mjs
7635
+ //#region ../types/dist/composition-D7ULvLdD.mjs
7627
7636
  /**
7628
7637
  * The ffmpeg build every CamStack node downloads, per platform and arch.
7629
7638
  *
@@ -7677,21 +7686,20 @@ function portable(target) {
7677
7686
  }
7678
7687
  portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
7679
7688
  /**
7680
- * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
7681
- * valutatore puro del suo FRONTE.
7689
+ * THE table "which boolean of this device type counts as HIGH", and the
7690
+ * pure evaluator of its EDGE.
7682
7691
  *
7683
- * Viveva dentro il builtin virtual-doorbell
7684
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
7685
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
7686
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
7687
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
7688
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
7689
- * SPOSTA qui e il doorbell la ri-esporta.
7692
+ * ONE table for everyone who asks "is this device HIGH?": the
7693
+ * recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
7694
+ * sensor markers, the orchestrator's camera-sensors bridge and
7695
+ * the sources of a composite doorbell (`doorbellFeatureSources`, D671).
7696
+ * A second copy would diverge at the first cap added, and the symptom — "the
7697
+ * sensor rings the doorbell but does not record" — is exactly D62.
7690
7698
  *
7691
- * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
7692
- * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
7693
- * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
7694
- * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
7699
+ * ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
7700
+ * two must not be unified: that one answers "what is the state WORD for a
7701
+ * rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
7702
+ * boolean's EDGE counts". Deliberately different vocabularies.
7695
7703
  */
7696
7704
  /**
7697
7705
  * Known binary / switch source caps → the boolean slice field whose
@@ -9298,22 +9306,22 @@ var CLASS_MAP_MACRO_TARGETS = [
9298
9306
  "package"
9299
9307
  ];
9300
9308
  /**
9301
- * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
9302
- * un operatore può selezionare.
9309
+ * The FIRST-LEVEL macro classes: those an object detector emits and that
9310
+ * an operator can select.
9303
9311
  *
9304
- * Sono le tre offerte dallo step `object-detection`
9312
+ * They are the three offered by the `object-detection` step
9305
9313
  * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
9306
- * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
9307
- * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
9308
- * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
9309
- * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
9314
+ * `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
9315
+ * `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
9316
+ * `package-detection`, whose enablement is driven by zones, and offering the
9317
+ * same word twice has already made an operator turn on the COCO proxy
9310
9318
  * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
9311
9319
  *
9312
- * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
9313
- * dello step e una seconda volta come union `FirstLevelMacro`
9314
- * (`types/detection.ts`); una terza copia per il trigger di registrazione
9315
- * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
9316
- * successiva.
9320
+ * ONE list. Before today the same three were hand-written in the step's offer
9321
+ * and a second time as the union `FirstLevelMacro`
9322
+ * (`types/detection.ts`); a third copy for the recording trigger
9323
+ * (`RecordingTriggers.objectClasses`) would have made the later divergence
9324
+ * invisible.
9317
9325
  */
9318
9326
  var FIRST_LEVEL_MACRO_CLASSES = [
9319
9327
  "person",
@@ -9378,17 +9386,17 @@ var RecordingStorageModeSchema = _enum([
9378
9386
  "on-device-decision"
9379
9387
  ]);
9380
9388
  /**
9381
- * Le macro classi che possono aprire una finestra di registrazione — le stesse
9382
- * tre offerte dallo step `object-detection`, da UNA lista
9389
+ * The macro classes that can open a recording window — the same
9390
+ * three offered by the `object-detection` step, from ONE list
9383
9391
  * ({@link FIRST_LEVEL_MACRO_CLASSES}).
9384
9392
  */
9385
9393
  var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
9386
9394
  /**
9387
- * True quando `values` non ripete un elemento.
9395
+ * True when `values` does not repeat an element.
9388
9396
  *
9389
- * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
9390
- * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
9391
- * conterebbe due volte le sue finestre in `segmentMissedByMs`.
9397
+ * A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
9398
+ * becomes a SOURCE in `bandTriggerSources`, and the same source twice
9399
+ * would count its windows twice in `segmentMissedByMs`.
9392
9400
  */
9393
9401
  var noDuplicates = (values) => new Set(values).size === values.length;
9394
9402
  /** Which detectors trigger an `events`-mode band. */
@@ -9396,34 +9404,34 @@ var RecordingTriggersSchema = object({
9396
9404
  motion: boolean().optional(),
9397
9405
  audioThresholdDbfs: number$1().optional(),
9398
9406
  /**
9399
- * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
9400
- * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
9401
- * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
9402
- * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
9407
+ * The macro classes whose detection opens a window. ABSENT = the source
9408
+ * is not listened to; an EMPTY array is rejected, because "events band, object
9409
+ * trigger on, no class" is the same shape "enabled and records
9410
+ * nothing, forever" that `eventsBandCanEverDemand` is written against.
9403
9411
  *
9404
- * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
9405
- * quelle che hanno attraversato `enabledMacroClasses`, i
9406
- * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
9407
- * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
9408
- * finestre — vedi `recorder/object-trigger.ts`.
9412
+ * The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
9413
+ * those that went through `enabledMacroClasses`, the
9414
+ * `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
9415
+ * (`source: 'onboard'`) goes through none of those gates and does NOT open
9416
+ * windows — see `recorder/object-trigger.ts`.
9409
9417
  */
9410
9418
  objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
9411
9419
  /**
9412
- * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
9413
- * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
9420
+ * The LINKED devices whose RISING EDGE opens a window. Absent = the source
9421
+ * is not listened to; an empty array is rejected for the same reason as
9414
9422
  * `objectClasses`.
9415
9423
  *
9416
- * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
9417
- * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
9418
- * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
9419
- * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9420
- * device (D12) — mai un elenco globale di cap.
9424
+ * These are SOURCE device ids, not cameras: the band names them, so the
9425
+ * hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
9426
+ * does no RPC. The OFFER from which the operator picks them is another question, and
9427
+ * is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9428
+ * device (D12) — never a global list of caps.
9421
9429
  *
9422
- * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
9423
- * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
9424
- * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
9425
- * il livello: un contatto trovato già aperto al riavvio del runner non fa
9426
- * registrare.
9430
+ * What "high" means depends on the device TYPE and is not decided here:
9431
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
9432
+ * the same one as the composite doorbell (D671). And it is the EDGE, not
9433
+ * the level: a contact found already open at runner restart does not
9434
+ * record.
9427
9435
  */
9428
9436
  sensorDeviceIds: array(number$1().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9429
9437
  });
@@ -10500,7 +10508,7 @@ var DecoderSessionConfigSchema = object({
10500
10508
  * - **VALUE** — at which level, for which scope, until when. That stays ONE
10501
10509
  * thing: the logging settings document on the `system` cap. Two authorities
10502
10510
  * over the values is the exact defect
10503
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
10511
+ * `docs/design/plans/2026-08-26-per-component-logging.md` was written to
10504
10512
  * remove; re-introducing it from the cure side would be grotesque.
10505
10513
  *
10506
10514
  * Nothing in this file reads a clock, an env var or a store. The registry is
@@ -13953,7 +13961,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
13953
13961
  *
13954
13962
  * ⚠ An earlier version of this comment blamed Zod stripping, and that
13955
13963
  * was wrong — corrected 2026-08-26 after the hop map
13956
- * (`docs/design/2026-08-26-mappa-hop-argomenti.md`) traced the path.
13964
+ * (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
13957
13965
  * There is **no Zod parse at all** between the door and the engine: the
13958
13966
  * dispatcher forwards the payload verbatim and UDS carries it whole. A
13959
13967
  * field declared here reaches `SqliteSettingsBackend` either way.
@@ -14709,7 +14717,17 @@ var SiteZoneSchema = object({
14709
14717
  var ProviderStatusSchema = object({
14710
14718
  connected: boolean(),
14711
14719
  deviceCount: number$1(),
14712
- error: string().optional()
14720
+ error: string().optional(),
14721
+ /**
14722
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
14723
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
14724
+ * which every provider bundles, so only a provider BUILT from D696-amended
14725
+ * code says it. ABSENT means an older provider that may still write it (raw
14726
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
14727
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
14728
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
14729
+ */
14730
+ motionSliceWriter: literal("orchestrator").optional()
14713
14731
  });
14714
14732
  object({
14715
14733
  externalId: string(),
@@ -15507,28 +15525,10 @@ method(object({
15507
15525
  deviceIds: array(number$1()).readonly(),
15508
15526
  caps: array(string()).readonly().optional()
15509
15527
  }), record(string(), record(string(), unknown().nullable())));
15510
- object({
15511
- /** Ms epoch of the last press. null = never observed since this provider started. */
15512
- lastPressedAt: number$1().nullable(),
15513
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
15514
- pressCountSinceStart: number$1()
15515
- });
15516
- object({
15517
- deviceId: number$1(),
15518
- timestamp: number$1()
15519
- });
15520
- /**
15521
- * The `doorbell-source` extension slot's editable value (D648): the camera's
15522
- * virtual-doorbell trigger devices, exactly what the wrapper's
15523
- * `doorbellSources` persists (as `{ deviceId }` records).
15524
- */
15525
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number$1().int().positive()) });
15528
+ var ExtensionSlotIdSchema = _enum(["linked-devices"]);
15526
15529
  DeviceType.Camera;
15527
- DeviceType.Button, DeviceType.Camera;
15528
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
15529
- DeviceType.Camera, DeviceType.Camera;
15530
15530
  /** A slot's editable value, discriminated on `slot`. */
15531
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15531
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15532
15532
  DeviceType.Camera;
15533
15533
  var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15534
15534
  state: literal("unreachable"),
@@ -15565,10 +15565,11 @@ var ExtensionSlotSourceSchema = object({
15565
15565
  });
15566
15566
  /**
15567
15567
  * A DIFFERENT authority that gates whether the slot's sources do anything —
15568
- * reported read-only, named, never written through this contract (D62). The
15569
- * virtual doorbell's sources ring only while the wrapper is bound to the
15570
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
15571
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
15568
+ * reported read-only, named, never written through this contract (D62) — e.g.
15569
+ * a slot whose sources act only while a wrapper is bound to the host, a
15570
+ * binding that belongs to `deviceManager.setWrapperActive`. No slot reports
15571
+ * one today (`linked-devices` answers `null`). `unknown` means the gate could
15572
+ * not be read; it is not "inactive" (D315).
15572
15573
  */
15573
15574
  var ExtensionSlotActivationSchema = object({
15574
15575
  state: _enum([
@@ -15584,7 +15585,7 @@ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
15584
15585
  /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
15585
15586
  slotRef: string(),
15586
15587
  slot: ExtensionSlotIdSchema,
15587
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
15588
+ /** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
15588
15589
  authority: string(),
15589
15590
  activation: ExtensionSlotActivationSchema.nullable(),
15590
15591
  value: ExtensionSlotValueSchema,
@@ -15862,7 +15863,7 @@ method(object({
15862
15863
  * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
15863
15864
  * ends in a log line, and a log line is the thing the operator asked to stop
15864
15865
  * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
15865
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
15866
+ * 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
15866
15867
  * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
15867
15868
  * media blackout were both diagnosed. The counters stay; this is where they can
15868
15869
  * be READ.
@@ -20177,6 +20178,29 @@ object({
20177
20178
  firstAt: number$1(),
20178
20179
  lastAt: number$1()
20179
20180
  });
20181
+ var NC_ALARM_TRIGGERED_MAX_SEC = 3600;
20182
+ var NcAlarmDelaySecSchema = number$1().int().min(0).max(600);
20183
+ var NcAlarmTriggeredSecSchema = number$1().int().min(0).max(NC_ALARM_TRIGGERED_MAX_SEC);
20184
+ var uniqueModes = (entries) => new Set(entries.map((e) => e.mode)).size === entries.length;
20185
+ var NcAlarmModeDelaysListSchema = array(object({
20186
+ mode: AlarmArmModeSchema,
20187
+ exitDelaySec: NcAlarmDelaySecSchema.optional(),
20188
+ entryDelaySec: NcAlarmDelaySecSchema.optional(),
20189
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.optional()
20190
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
20191
+ var NcAlarmModeDelaysEditListSchema = array(object({
20192
+ mode: AlarmArmModeSchema,
20193
+ exitDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20194
+ entryDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20195
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional()
20196
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
20197
+ /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
20198
+ var NcAlarmNonBlockingEditSchema = object({
20199
+ mode: AlarmArmModeSchema,
20200
+ deviceId: number$1().int().positive(),
20201
+ /** true = on the list (may be open, does not block); false = off the list (blocks). */
20202
+ nonBlocking: boolean()
20203
+ });
20180
20204
  /**
20181
20205
  * The per-mode lists, at most one per mode. Two lists for one mode have no
20182
20206
  * meaning a reader could agree on (union? the last one?), so they are refused
@@ -20185,10 +20209,10 @@ object({
20185
20209
  var NcAlarmNonBlockingListSchema = array(object({
20186
20210
  mode: AlarmArmModeSchema,
20187
20211
  deviceIds: array(number$1().int()).max(200)
20188
- })).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
20212
+ })).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
20189
20213
  /**
20190
- * The three durations the panel's state machine runs on, who hears about its
20191
- * transitions, and which openings each mode tolerates.
20214
+ * The three durations — global, and per mode since D697 — the panel's state
20215
+ * machine runs on, who hears about its transitions, and which openings each mode tolerates.
20192
20216
  *
20193
20217
  * They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
20194
20218
  * `alarm-panel` is `deviceNative` and its other provider mirrors somebody
@@ -20198,15 +20222,15 @@ var NcAlarmNonBlockingListSchema = array(object({
20198
20222
  */
20199
20223
  var NcAlarmSettingsSchema = object({
20200
20224
  /** Grace period between arming and the mode taking effect. 0 = immediate. */
20201
- exitDelaySec: number$1().int().min(0).max(600),
20225
+ exitDelaySec: NcAlarmDelaySecSchema,
20202
20226
  /** Grace period between a trigger and the alarm firing. 0 = immediate. */
20203
- entryDelaySec: number$1().int().min(0).max(600),
20227
+ entryDelaySec: NcAlarmDelaySecSchema,
20204
20228
  /**
20205
20229
  * How long `triggered` lasts before the panel re-arms itself.
20206
20230
  * **0 = until an operator disarms it** — the behaviour before this field
20207
20231
  * existed, and therefore what an untouched install keeps doing.
20208
20232
  */
20209
- triggeredDurationSec: number$1().int().min(0).max(3600),
20233
+ triggeredDurationSec: NcAlarmTriggeredSecSchema,
20210
20234
  /**
20211
20235
  * Deprecated by D630 — every transition is announced. Parsed, never read;
20212
20236
  * remove after one release. Optional so an older admin's patch (which still
@@ -20229,17 +20253,30 @@ var NcAlarmSettingsSchema = object({
20229
20253
  * per mode is meaningful. Defaulted to `[]` so a blob stored before D630
20230
20254
  * parses as "every opening blocks" — the behaviour it was written under.
20231
20255
  */
20232
- nonBlocking: NcAlarmNonBlockingListSchema.default([])
20256
+ nonBlocking: NcAlarmNonBlockingListSchema.default([]),
20257
+ /**
20258
+ * Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
20259
+ * without a field, uses the global value above — so `[]`, the default, is exactly the
20260
+ * behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
20261
+ */
20262
+ modeDelays: NcAlarmModeDelaysListSchema.default([])
20233
20263
  });
20234
20264
  /**
20235
20265
  * Every field optional — a tab edits one control at a time.
20236
20266
  *
20237
- * `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
20238
- * remove an inner `.default()`, so a patch that never named the field would
20239
- * parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
20240
- * (the same trap {@link NcRulePatchSchema} documents).
20267
+ * `nonBlocking` and `modeDelays` are re-declared WITHOUT their defaults:
20268
+ * `.partial()` does not remove an inner `.default()`, so a patch that never
20269
+ * named the field would parse to `[]` and wipe every mode's list on an
20270
+ * unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
20271
+ * `modeDelays` means EDITS, not the stored overrides.
20241
20272
  */
20242
- var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
20273
+ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
20274
+ nonBlocking: NcAlarmNonBlockingListSchema,
20275
+ /** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
20276
+ modeDelays: NcAlarmModeDelaysEditListSchema,
20277
+ /** ONE membership change; the panel applies it to the list it holds at its turn. */
20278
+ nonBlockingEdit: NcAlarmNonBlockingEditSchema
20279
+ }).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" });
20243
20280
  /**
20244
20281
  * What one arm mode actually arms, DERIVED from the enabled rules gated on it.
20245
20282
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
@@ -20339,6 +20376,28 @@ var NcAlarmConfigSchema = object({
20339
20376
  */
20340
20377
  live: NcAlarmLiveSchema.optional()
20341
20378
  });
20379
+ var NcAlarmSensorReadingSchema = _enum([
20380
+ "open",
20381
+ "closed",
20382
+ "unknown",
20383
+ "not-opening"
20384
+ ]);
20385
+ /** One device's state as the alarm reads it — the classifier the arm check uses. */
20386
+ var NcAlarmSensorStateSchema = object({
20387
+ deviceId: number$1().int().positive(),
20388
+ reading: NcAlarmSensorReadingSchema,
20389
+ /** The word as read (`open`, `closed`, `unlocked`, `stopped`, …); null when unknown / not an opening. */
20390
+ state: string().nullable(),
20391
+ /** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
20392
+ unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
20393
+ /** The device manager's liveness as the centre mirrors it; null = not known. */
20394
+ online: boolean().nullable()
20395
+ });
20396
+ var NcAlarmSensorsInputSchema = object({ deviceIds: array(number$1().int().positive()).max(500) });
20397
+ var NcAlarmSensorsSchema = object({
20398
+ sensors: array(NcAlarmSensorStateSchema),
20399
+ readAt: number$1().int().nonnegative()
20400
+ });
20342
20401
  /**
20343
20402
  * ONE rule's demand on ONE camera's clip ring.
20344
20403
  *
@@ -20429,7 +20488,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
20429
20488
  }), method(object({}), NcAlarmConfigSchema, { auth: "admin" }), method(object({ patch: NcAlarmSettingsPatchSchema }), NcAlarmConfigSchema, {
20430
20489
  kind: "mutation",
20431
20490
  auth: "admin"
20432
- });
20491
+ }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
20433
20492
  /**
20434
20493
  * Zod schemas for persisted record types.
20435
20494
  *
@@ -20776,12 +20835,26 @@ var CameraSensorRefSchema = object({
20776
20835
  function cameraSensorRefKey(ref) {
20777
20836
  return `${ref.addonId}/${ref.stableId}`;
20778
20837
  }
20779
- /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20780
- var CameraSensorsModeSchema = _enum(["in-addition"]);
20781
- var CameraSensorsConfigSchema = object({
20782
- mode: CameraSensorsModeSchema,
20783
- sensors: array(CameraSensorRefSchema).min(1).max(8)
20784
- }).superRefine((value, ctx) => {
20838
+ /**
20839
+ * A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
20840
+ * `replace`: its motion is the camera's, and while one is READY the camera's
20841
+ * own motion no longer counts on its own. `confirm`: while one is READY the
20842
+ * camera's own motion counts only while a confirm sensor is active — with or
20843
+ * without a replace sensor (spec C2, the controller's ruling on Q1).
20844
+ */
20845
+ var CameraSensorModeSchema = _enum([
20846
+ "in-addition",
20847
+ "confirm",
20848
+ "replace"
20849
+ ]);
20850
+ /** A stored sensor with no mode — every CS-1 row — is in addition. */
20851
+ var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
20852
+ /**
20853
+ * A camera's attached sensors. A CS-1 row carried an envelope
20854
+ * `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
20855
+ * what the write stores (D672 rule 3), so it is never written again.
20856
+ */
20857
+ var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
20785
20858
  const seen = /* @__PURE__ */ new Set();
20786
20859
  value.sensors.forEach((ref, index) => {
20787
20860
  const key = cameraSensorRefKey(ref);
@@ -20793,39 +20866,41 @@ var CameraSensorsConfigSchema = object({
20793
20866
  seen.add(key);
20794
20867
  });
20795
20868
  });
20796
- var RefFields = {
20869
+ /** Every attachment names its mode; an older orchestrator that does not is in addition. */
20870
+ var AttachmentFields = {
20797
20871
  addonId: string(),
20798
- stableId: string()
20872
+ stableId: string(),
20873
+ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
20799
20874
  };
20800
20875
  var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20801
20876
  object({
20802
- ...RefFields,
20877
+ ...AttachmentFields,
20803
20878
  state: literal("ready"),
20804
20879
  deviceId: number$1(),
20805
20880
  name: string(),
20806
20881
  caps: array(string()).readonly()
20807
20882
  }),
20808
20883
  object({
20809
- ...RefFields,
20884
+ ...AttachmentFields,
20810
20885
  state: literal("offline"),
20811
20886
  deviceId: number$1(),
20812
20887
  name: string(),
20813
20888
  reason: _enum(["offline", "disabled"])
20814
20889
  }),
20815
20890
  object({
20816
- ...RefFields,
20891
+ ...AttachmentFields,
20817
20892
  state: literal("missing"),
20818
20893
  reason: string()
20819
20894
  }),
20820
20895
  object({
20821
- ...RefFields,
20896
+ ...AttachmentFields,
20822
20897
  state: literal("unsupported"),
20823
20898
  deviceId: number$1(),
20824
20899
  name: string(),
20825
20900
  reason: string()
20826
20901
  }),
20827
20902
  object({
20828
- ...RefFields,
20903
+ ...AttachmentFields,
20829
20904
  state: literal("unreadable"),
20830
20905
  reason: string()
20831
20906
  })
@@ -20838,17 +20913,49 @@ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20838
20913
  * say.
20839
20914
  */
20840
20915
  var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
20916
+ /** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
20917
+ var CameraOwnMotionSchema = _enum([
20918
+ "always",
20919
+ "when-confirmed",
20920
+ "never"
20921
+ ]);
20922
+ /** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
20923
+ var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
20924
+ /**
20925
+ * The camera's OWN onboard motion (D696): the raw input the bridge combines,
20926
+ * never the effective value. The camera's `motion` slice is the effective one,
20927
+ * so a view of the camera's own row reads this.
20928
+ * - `atMs`: when the bridge received the camera's last own edge.
20929
+ * - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
20930
+ * AND it is younger than the window the bridge counts the camera's own motion
20931
+ * for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
20932
+ * sends a clear (heartbeats only) therefore reads `false` once no push came
20933
+ * within the window; a status read is a snapshot, so a live view re-asks.
20934
+ * Absent = this orchestrator has not received the camera's own motion since it
20935
+ * started (unknown, never "quiet"), or an orchestrator older than D696.
20936
+ */
20937
+ var CameraRawLevelSchema = object({
20938
+ detected: boolean(),
20939
+ atMs: number$1()
20940
+ });
20841
20941
  var CameraSensorsStatusSchema = discriminatedUnion("state", [
20842
- object({ state: literal("not-configured") }),
20942
+ object({
20943
+ state: literal("not-configured"),
20944
+ cameraLevel: CameraRawLevelSchema.optional()
20945
+ }),
20843
20946
  object({
20844
20947
  state: literal("unreadable"),
20845
- reason: string()
20948
+ reason: string(),
20949
+ cameraLevel: CameraRawLevelSchema.optional()
20846
20950
  }),
20847
20951
  object({
20848
20952
  state: literal("configured"),
20849
- mode: CameraSensorsModeSchema,
20953
+ cameraLevel: CameraRawLevelSchema.optional(),
20850
20954
  sensors: array(CameraSensorAttachmentSchema).readonly(),
20851
- notForwarded: CameraSensorsNotForwardedSchema.optional()
20955
+ /** Absent = an orchestrator older than CS-2: it does not say (D315). */
20956
+ cameraMotion: CameraOwnMotionSchema.optional(),
20957
+ notForwarded: CameraSensorsNotForwardedSchema.optional(),
20958
+ notEnforced: CameraSensorsNotEnforcedSchema.optional()
20852
20959
  })
20853
20960
  ]);
20854
20961
  Object.freeze({
@@ -21533,14 +21640,14 @@ var TrackSchema = object({
21533
21640
  * `derive-returned-null tile=standin`,
21534
21641
  * `native-tile tile=native no-key-frame-at-close`, …) written at close and
21535
21642
  * CLEARED by the late-keyFrame upgrade when a native tile lands after all.
21536
- * The operator-facing answer to "perché manca l'immagine?" on a track whose
21643
+ * The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
21537
21644
  * tile is a face/plate stand-in, a raster crop, or an icon.
21538
21645
  *
21539
21646
  * **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
21540
21647
  * the TILE ranked below native, so a track whose thumbnail landed natively
21541
21648
  * while its key frame missed carried no reason at all — three of the four
21542
21649
  * `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
21543
- * that shape, and their "niente ultimo" had no cause anywhere on the row.
21650
+ * that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
21544
21651
  * The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
21545
21652
  * lastFrame copy source`), so its absence is now on this line whatever the
21546
21653
  * tile ended up being.
@@ -21627,7 +21734,7 @@ var MotionEventSchema = object({
21627
21734
  /**
21628
21735
  * Ms offsets from `timestamp` (the episode's own first rising edge, so the
21629
21736
  * first entry is always `0`) of every genuine off→on transition the
21630
- * episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
21737
+ * episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
21631
21738
  * push: a firmware source that keepalives at ~1 Hz for the whole burst
21632
21739
  * (Reolink, Hikvision) produces exactly one edge; a source that reports an
21633
21740
  * explicit `false` mid-episode and then resumes before the quiet window
@@ -24039,8 +24146,10 @@ var RunnerCameraConfigSchema = object({
24039
24146
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
24040
24147
  * analyzer providers) running on decoded frames in this runner.
24041
24148
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
24042
- * analytics). The provider emits ProviderMotion
24043
- * events; the orchestrator forwards to `reportMotion`.
24149
+ * analytics). The provider emits its raw push as `ProviderMotion`
24150
+ * (D673); the orchestrator's camera-sensors bridge re-emits the camera's
24151
+ * effective motion as `MotionOnMotionChanged`, which is what reaches
24152
+ * `reportMotion`.
24044
24153
  */
24045
24154
  motionSources: MotionSourcesSchema.default(["analyzer"]),
24046
24155
  /**
@@ -24217,7 +24326,15 @@ var RunnerLocalLoadSchema = object({
24217
24326
  hasGpu: boolean(),
24218
24327
  inferenceBackend: string().optional(),
24219
24328
  cpuCores: number$1().optional()
24220
- })
24329
+ }),
24330
+ /**
24331
+ * Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
24332
+ * runner never writes it. ABSENT = a runner older than D696, which still
24333
+ * writes the slice from its phase machine; the orchestrator does not write
24334
+ * while any runner node is absent-or-unanswered, so one slice never has two
24335
+ * writers.
24336
+ */
24337
+ motionSliceWriter: literal("orchestrator").optional()
24221
24338
  });
24222
24339
  /**
24223
24340
  * Aggregate runtime metrics for the runner's whole local pool. Mirrors the
@@ -26853,7 +26970,7 @@ var ClipPlaybackSchema = object({
26853
26970
  * **One authorised yes is one wake.** `next-natural` — take the clip the next
26854
26971
  * time the camera is awake for its own reasons — is deliberately not a member:
26855
26972
  * it was proposed, it is free on the battery, and the operator declined it on
26856
- * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."*,
26973
+ * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
26857
26974
  * D558 "Considered and not taken").
26858
26975
  */
26859
26976
  var ClipWakeSchema = _enum(["authorised"]);
@@ -27114,7 +27231,7 @@ DeviceType.Camera, method(object({
27114
27231
  * It replaced `sources?: string[]`, a VIEW filter over source ids that
27115
27232
  * assumed the answer was a fan-out over everything a camera has. The
27116
27233
  * operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
27117
- * solo"* — so the list is asked of one provider at a time and there is
27234
+ * solo"* [there is only one user] — so the list is asked of one provider at a time and there is
27118
27235
  * nothing to filter out of it.
27119
27236
  */
27120
27237
  provider: string().min(1)
@@ -29058,6 +29175,17 @@ object({
29058
29175
  deviceId: number$1(),
29059
29176
  status: DeviceStatusSchema
29060
29177
  });
29178
+ object({
29179
+ /** Ms epoch of the last press. null = never observed since this provider started. */
29180
+ lastPressedAt: number$1().nullable(),
29181
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
29182
+ pressCountSinceStart: number$1()
29183
+ });
29184
+ object({
29185
+ deviceId: number$1(),
29186
+ timestamp: number$1()
29187
+ });
29188
+ DeviceType.Button, DeviceType.Camera;
29061
29189
  /**
29062
29190
  * Enum-state sensor — a string value picked from a finite option set.
29063
29191
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -30702,9 +30830,9 @@ object({
30702
30830
  /** Ms epoch of the last detected-true observation. Null if never detected. */
30703
30831
  lastDetectedAt: number$1().nullable(),
30704
30832
  /**
30705
- * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device,
30706
- * `null` while false and on every `Sensor` device (D475) — see that
30707
- * constant's doc for the one-authority rule.
30833
+ * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
30834
+ * orchestrator writes it, D696), `null` while false and on every `Sensor`
30835
+ * device (D475) — see that constant's doc for the one-authority rule.
30708
30836
  *
30709
30837
  * ## Reading this field still arms nothing
30710
30838
  *
@@ -30722,38 +30850,41 @@ object({
30722
30850
  * `addon-export-alexa/src/motion-clear-hold.ts` and
30723
30851
  * `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
30724
30852
  *
30725
- * ## Who writes it
30726
- *
30727
- * - **Cameras** — the runner's phase machine, `active → watching` on
30728
- * `cooldown_expired`, which then writes this slice with
30729
- * `detected: false` (`handlePhaseChanged` in
30730
- * `pipeline-runner/index.ts`). It produces the FALLING edge, which
30731
- * matters most for the sources that only ever push a rising one:
30732
- * Reolink emits `MotionOnMotionChanged { detected: true }` and never
30733
- * a false.
30734
- * - **Sensors** (Home Assistant binary sensors, Homematic) — the
30735
- * provider pushes the false itself, from the upstream system's own
30736
- * state change. No phase machine is involved.
30853
+ * ## Who writes it (D696)
30737
30854
  *
30738
- * ### The phase machine is CANONICAL, not sole — and that is a defect
30855
+ * - **Cameras** — the orchestrator, and nothing else. It writes the camera's
30856
+ * EFFECTIVE motion (`addon-pipeline-orchestrator`
30857
+ * `camera-sensors/motion-slice.ts`), alongside the effective
30858
+ * `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
30859
+ * for a split camera, an unsplit emitter's direct event, the analyzer and
30860
+ * device activity, as the camera's `motionSources` counts them. A source
30861
+ * that never sends a clear falls one window after its last `true`.
30862
+ * `lastDetectedAt` moves only on an effective rise. No camera provider
30863
+ * writes this slice (not even a boot seed), and neither does the runner's
30864
+ * phase machine: its phase is "a session is attached" for every on-motion
30865
+ * session, not motion, and it now has its own `DetectionPhaseTransition`.
30866
+ * A provider's `isDetected` answers from the hub's slice.
30867
+ * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
30868
+ * imports) — the provider pushes both edges itself, from the upstream
30869
+ * system's own state change. That is the sensor's own fact.
30739
30870
  *
30740
- * An earlier revision of this docblock (mine, 2026-09-12) claimed the
30741
- * phase machine is the sole writer for a camera. It is not.
30742
- * `hikvision-camera.ts:3464` and `amcrest-camera.ts:445` both call
30743
- * `setCapSlice(motionCapability, …)` on their own rising edge, and
30744
- * Hikvision's comment says why: it read THIS docblock, agreed the
30745
- * runner is canonical, and wrote anyway to avoid per-tick churn. So
30746
- * two authorities can disagree about one slice, which this repo
30747
- * forbids, and the doc said otherwise — which is worse than saying
30748
- * nothing, because it reads as verification.
30871
+ * `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
30872
+ * `motion` slice; each sensor writer is a named exemption.
30749
30873
  *
30750
- * This predates D475 and is not fixed there: the fix touches every
30751
- * camera provider. Recorded in D475's Consequences. Do not restore the
30752
- * "sole writer" wording without also removing the other writers.
30874
+ * This replaces the D475 §4 rule ("the phase machine is the sole writer").
30875
+ * That rule was never true: Hikvision and Amcrest wrote the slice raw beside
30876
+ * it, every provider seeded it at boot, and every session left it
30877
+ * `detected: true` after its detach.
30753
30878
  */
30754
30879
  autoClearAfterMs: number$1().nullable()
30755
30880
  });
30756
- object({
30881
+ /**
30882
+ * Payload of `motion.onMotionChanged` event + the corresponding bus
30883
+ * event `EventCategory.MotionOnMotionChanged`. Single source of truth
30884
+ * — both the cap event surface and the bus payload type alias to this
30885
+ * schema.
30886
+ */
30887
+ var MotionOnMotionChangedDataSchema = object({
30757
30888
  deviceId: number$1(),
30758
30889
  detected: boolean(),
30759
30890
  timestamp: number$1(),
@@ -33218,7 +33349,7 @@ var ReadGopBytesResultSchema = object({
33218
33349
  /**
33219
33350
  * A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
33220
33351
  * twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
33221
- * replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-clip-su-pipeline.md`):
33352
+ * replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
33222
33353
  * a replay needs several seconds of native pixels, not one frame.
33223
33354
  *
33224
33355
  * `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
@@ -40812,6 +40943,12 @@ Object.freeze({
40812
40943
  addonId: null,
40813
40944
  access: "view"
40814
40945
  },
40946
+ "notificationRules.getAlarmSensors": {
40947
+ capName: "notification-rules",
40948
+ capScope: "system",
40949
+ addonId: null,
40950
+ access: "view"
40951
+ },
40815
40952
  "notificationRules.getClipRetentionAsks": {
40816
40953
  capName: "notification-rules",
40817
40954
  capScope: "system",
@@ -45295,6 +45432,11 @@ Object.freeze({
45295
45432
  form: "single",
45296
45433
  optional: false
45297
45434
  }],
45435
+ "notificationRules.getAlarmSensors": [{
45436
+ name: "deviceIds",
45437
+ form: "array",
45438
+ optional: false
45439
+ }],
45298
45440
  "notificationRules.setDeviceMuted": [{
45299
45441
  name: "deviceId",
45300
45442
  form: "single",
@@ -47092,7 +47234,7 @@ var PreviewTextField = string().max(200);
47092
47234
  * Whether the notification's preview is a STILL or a short animation.
47093
47235
  *
47094
47236
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
47095
- * rule)"* — the other rules already offer an animated preview, and a ten-hour
47237
+ * rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
47096
47238
  * night reads better as three seconds of motion than as one frame of it. Both
47097
47239
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
47098
47240
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -47230,6 +47372,7 @@ TimelapseRuleInputSchema.extend({
47230
47372
  createdAt: number$1(),
47231
47373
  updatedAt: number$1()
47232
47374
  });
47375
+ MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
47233
47376
  object({
47234
47377
  /**
47235
47378
  * Fraction of the box's own size added on EACH side before cutting.
@@ -82998,7 +83141,7 @@ function messagesFor(request) {
82998
83141
  * `RetryError` is the wrapper the library returns when the attempts are spent;
82999
83142
  * the interesting error is the LAST one inside it, so the envelope is unwrapped
83000
83143
  * before anything is classified (§2.3, "chi classifica gli errori deve
83001
- * scartare l'involucro").
83144
+ * scartare l'involucro" [whoever classifies errors must discard the envelope]).
83002
83145
  */
83003
83146
  function mapLibraryError(error) {
83004
83147
  if (RetryError.isInstance(error)) {