@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.mjs CHANGED
@@ -43,7 +43,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
43
43
  }) : target, mod));
44
44
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
45
45
  //#endregion
46
- //#region ../types/dist/event-category-C5xZWqz6.mjs
46
+ //#region ../types/dist/event-category-BGmz_oxW.mjs
47
47
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
48
48
  EventCategory["SystemBoot"] = "system.boot";
49
49
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -576,6 +576,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
576
576
  */
577
577
  EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
578
578
  EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
579
+ /**
580
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
581
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
582
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
583
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
584
+ * for a camera with no attached sensor). Providers must not emit
585
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
586
+ * keeps it so (camera-grid is a named, deferred exception).
587
+ */
579
588
  EventCategory["ProviderMotion"] = "provider.motion";
580
589
  EventCategory["ProviderDetection"] = "provider.detection";
581
590
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
@@ -5561,7 +5570,7 @@ function number(params) {
5561
5570
  return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
5562
5571
  }
5563
5572
  //#endregion
5564
- //#region ../types/dist/sleep-gU6hqv4_.mjs
5573
+ //#region ../types/dist/sleep-CDCONfkt.mjs
5565
5574
  /**
5566
5575
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5567
5576
  * window to float samples (D455).
@@ -7649,7 +7658,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7649
7658
  return DeviceRole;
7650
7659
  }({});
7651
7660
  //#endregion
7652
- //#region ../types/dist/composition-Dq42XWp0.mjs
7661
+ //#region ../types/dist/composition-D7ULvLdD.mjs
7653
7662
  /**
7654
7663
  * The ffmpeg build every CamStack node downloads, per platform and arch.
7655
7664
  *
@@ -7703,21 +7712,20 @@ function portable(target) {
7703
7712
  }
7704
7713
  portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
7705
7714
  /**
7706
- * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
7707
- * valutatore puro del suo FRONTE.
7715
+ * THE table "which boolean of this device type counts as HIGH", and the
7716
+ * pure evaluator of its EDGE.
7708
7717
  *
7709
- * Viveva dentro il builtin virtual-doorbell
7710
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
7711
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
7712
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
7713
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
7714
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
7715
- * SPOSTA qui e il doorbell la ri-esporta.
7718
+ * ONE table for everyone who asks "is this device HIGH?": the
7719
+ * recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
7720
+ * sensor markers, the orchestrator's camera-sensors bridge and
7721
+ * the sources of a composite doorbell (`doorbellFeatureSources`, D671).
7722
+ * A second copy would diverge at the first cap added, and the symptom — "the
7723
+ * sensor rings the doorbell but does not record" — is exactly D62.
7716
7724
  *
7717
- * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
7718
- * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
7719
- * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
7720
- * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
7725
+ * ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
7726
+ * two must not be unified: that one answers "what is the state WORD for a
7727
+ * rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
7728
+ * boolean's EDGE counts". Deliberately different vocabularies.
7721
7729
  */
7722
7730
  /**
7723
7731
  * Known binary / switch source caps → the boolean slice field whose
@@ -9324,22 +9332,22 @@ var CLASS_MAP_MACRO_TARGETS = [
9324
9332
  "package"
9325
9333
  ];
9326
9334
  /**
9327
- * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
9328
- * un operatore può selezionare.
9335
+ * The FIRST-LEVEL macro classes: those an object detector emits and that
9336
+ * an operator can select.
9329
9337
  *
9330
- * Sono le tre offerte dallo step `object-detection`
9338
+ * They are the three offered by the `object-detection` step
9331
9339
  * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
9332
- * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
9333
- * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
9334
- * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
9335
- * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
9340
+ * `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
9341
+ * `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
9342
+ * `package-detection`, whose enablement is driven by zones, and offering the
9343
+ * same word twice has already made an operator turn on the COCO proxy
9336
9344
  * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
9337
9345
  *
9338
- * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
9339
- * dello step e una seconda volta come union `FirstLevelMacro`
9340
- * (`types/detection.ts`); una terza copia per il trigger di registrazione
9341
- * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
9342
- * successiva.
9346
+ * ONE list. Before today the same three were hand-written in the step's offer
9347
+ * and a second time as the union `FirstLevelMacro`
9348
+ * (`types/detection.ts`); a third copy for the recording trigger
9349
+ * (`RecordingTriggers.objectClasses`) would have made the later divergence
9350
+ * invisible.
9343
9351
  */
9344
9352
  var FIRST_LEVEL_MACRO_CLASSES = [
9345
9353
  "person",
@@ -9404,17 +9412,17 @@ var RecordingStorageModeSchema = _enum([
9404
9412
  "on-device-decision"
9405
9413
  ]);
9406
9414
  /**
9407
- * Le macro classi che possono aprire una finestra di registrazione — le stesse
9408
- * tre offerte dallo step `object-detection`, da UNA lista
9415
+ * The macro classes that can open a recording window — the same
9416
+ * three offered by the `object-detection` step, from ONE list
9409
9417
  * ({@link FIRST_LEVEL_MACRO_CLASSES}).
9410
9418
  */
9411
9419
  var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
9412
9420
  /**
9413
- * True quando `values` non ripete un elemento.
9421
+ * True when `values` does not repeat an element.
9414
9422
  *
9415
- * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
9416
- * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
9417
- * conterebbe due volte le sue finestre in `segmentMissedByMs`.
9423
+ * A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
9424
+ * becomes a SOURCE in `bandTriggerSources`, and the same source twice
9425
+ * would count its windows twice in `segmentMissedByMs`.
9418
9426
  */
9419
9427
  var noDuplicates = (values) => new Set(values).size === values.length;
9420
9428
  /** Which detectors trigger an `events`-mode band. */
@@ -9422,34 +9430,34 @@ var RecordingTriggersSchema = object({
9422
9430
  motion: boolean().optional(),
9423
9431
  audioThresholdDbfs: number$1().optional(),
9424
9432
  /**
9425
- * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
9426
- * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
9427
- * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
9428
- * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
9433
+ * The macro classes whose detection opens a window. ABSENT = the source
9434
+ * is not listened to; an EMPTY array is rejected, because "events band, object
9435
+ * trigger on, no class" is the same shape "enabled and records
9436
+ * nothing, forever" that `eventsBandCanEverDemand` is written against.
9429
9437
  *
9430
- * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
9431
- * quelle che hanno attraversato `enabledMacroClasses`, i
9432
- * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
9433
- * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
9434
- * finestre — vedi `recorder/object-trigger.ts`.
9438
+ * The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
9439
+ * those that went through `enabledMacroClasses`, the
9440
+ * `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
9441
+ * (`source: 'onboard'`) goes through none of those gates and does NOT open
9442
+ * windows — see `recorder/object-trigger.ts`.
9435
9443
  */
9436
9444
  objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
9437
9445
  /**
9438
- * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
9439
- * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
9446
+ * The LINKED devices whose RISING EDGE opens a window. Absent = the source
9447
+ * is not listened to; an empty array is rejected for the same reason as
9440
9448
  * `objectClasses`.
9441
9449
  *
9442
- * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
9443
- * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
9444
- * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
9445
- * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9446
- * device (D12) — mai un elenco globale di cap.
9450
+ * These are SOURCE device ids, not cameras: the band names them, so the
9451
+ * hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
9452
+ * does no RPC. The OFFER from which the operator picks them is another question, and
9453
+ * is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9454
+ * device (D12) — never a global list of caps.
9447
9455
  *
9448
- * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
9449
- * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
9450
- * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
9451
- * il livello: un contatto trovato già aperto al riavvio del runner non fa
9452
- * registrare.
9456
+ * What "high" means depends on the device TYPE and is not decided here:
9457
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
9458
+ * the same one as the composite doorbell (D671). And it is the EDGE, not
9459
+ * the level: a contact found already open at runner restart does not
9460
+ * record.
9453
9461
  */
9454
9462
  sensorDeviceIds: array(number$1().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9455
9463
  });
@@ -10526,7 +10534,7 @@ var DecoderSessionConfigSchema = object({
10526
10534
  * - **VALUE** — at which level, for which scope, until when. That stays ONE
10527
10535
  * thing: the logging settings document on the `system` cap. Two authorities
10528
10536
  * over the values is the exact defect
10529
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
10537
+ * `docs/design/plans/2026-08-26-per-component-logging.md` was written to
10530
10538
  * remove; re-introducing it from the cure side would be grotesque.
10531
10539
  *
10532
10540
  * Nothing in this file reads a clock, an env var or a store. The registry is
@@ -13979,7 +13987,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
13979
13987
  *
13980
13988
  * ⚠ An earlier version of this comment blamed Zod stripping, and that
13981
13989
  * was wrong — corrected 2026-08-26 after the hop map
13982
- * (`docs/design/2026-08-26-mappa-hop-argomenti.md`) traced the path.
13990
+ * (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
13983
13991
  * There is **no Zod parse at all** between the door and the engine: the
13984
13992
  * dispatcher forwards the payload verbatim and UDS carries it whole. A
13985
13993
  * field declared here reaches `SqliteSettingsBackend` either way.
@@ -14735,7 +14743,17 @@ var SiteZoneSchema = object({
14735
14743
  var ProviderStatusSchema = object({
14736
14744
  connected: boolean(),
14737
14745
  deviceCount: number$1(),
14738
- error: string().optional()
14746
+ error: string().optional(),
14747
+ /**
14748
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
14749
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
14750
+ * which every provider bundles, so only a provider BUILT from D696-amended
14751
+ * code says it. ABSENT means an older provider that may still write it (raw
14752
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
14753
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
14754
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
14755
+ */
14756
+ motionSliceWriter: literal("orchestrator").optional()
14739
14757
  });
14740
14758
  object({
14741
14759
  externalId: string(),
@@ -15533,28 +15551,10 @@ method(object({
15533
15551
  deviceIds: array(number$1()).readonly(),
15534
15552
  caps: array(string()).readonly().optional()
15535
15553
  }), record(string(), record(string(), unknown().nullable())));
15536
- object({
15537
- /** Ms epoch of the last press. null = never observed since this provider started. */
15538
- lastPressedAt: number$1().nullable(),
15539
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
15540
- pressCountSinceStart: number$1()
15541
- });
15542
- object({
15543
- deviceId: number$1(),
15544
- timestamp: number$1()
15545
- });
15546
- /**
15547
- * The `doorbell-source` extension slot's editable value (D648): the camera's
15548
- * virtual-doorbell trigger devices, exactly what the wrapper's
15549
- * `doorbellSources` persists (as `{ deviceId }` records).
15550
- */
15551
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number$1().int().positive()) });
15554
+ var ExtensionSlotIdSchema = _enum(["linked-devices"]);
15552
15555
  DeviceType.Camera;
15553
- DeviceType.Button, DeviceType.Camera;
15554
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
15555
- DeviceType.Camera, DeviceType.Camera;
15556
15556
  /** A slot's editable value, discriminated on `slot`. */
15557
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15557
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15558
15558
  DeviceType.Camera;
15559
15559
  var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15560
15560
  state: literal("unreachable"),
@@ -15591,10 +15591,11 @@ var ExtensionSlotSourceSchema = object({
15591
15591
  });
15592
15592
  /**
15593
15593
  * A DIFFERENT authority that gates whether the slot's sources do anything —
15594
- * reported read-only, named, never written through this contract (D62). The
15595
- * virtual doorbell's sources ring only while the wrapper is bound to the
15596
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
15597
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
15594
+ * reported read-only, named, never written through this contract (D62) — e.g.
15595
+ * a slot whose sources act only while a wrapper is bound to the host, a
15596
+ * binding that belongs to `deviceManager.setWrapperActive`. No slot reports
15597
+ * one today (`linked-devices` answers `null`). `unknown` means the gate could
15598
+ * not be read; it is not "inactive" (D315).
15598
15599
  */
15599
15600
  var ExtensionSlotActivationSchema = object({
15600
15601
  state: _enum([
@@ -15610,7 +15611,7 @@ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
15610
15611
  /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
15611
15612
  slotRef: string(),
15612
15613
  slot: ExtensionSlotIdSchema,
15613
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
15614
+ /** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
15614
15615
  authority: string(),
15615
15616
  activation: ExtensionSlotActivationSchema.nullable(),
15616
15617
  value: ExtensionSlotValueSchema,
@@ -15888,7 +15889,7 @@ method(object({
15888
15889
  * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
15889
15890
  * ends in a log line, and a log line is the thing the operator asked to stop
15890
15891
  * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
15891
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
15892
+ * 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
15892
15893
  * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
15893
15894
  * media blackout were both diagnosed. The counters stay; this is where they can
15894
15895
  * be READ.
@@ -20203,6 +20204,29 @@ object({
20203
20204
  firstAt: number$1(),
20204
20205
  lastAt: number$1()
20205
20206
  });
20207
+ var NC_ALARM_TRIGGERED_MAX_SEC = 3600;
20208
+ var NcAlarmDelaySecSchema = number$1().int().min(0).max(600);
20209
+ var NcAlarmTriggeredSecSchema = number$1().int().min(0).max(NC_ALARM_TRIGGERED_MAX_SEC);
20210
+ var uniqueModes = (entries) => new Set(entries.map((e) => e.mode)).size === entries.length;
20211
+ var NcAlarmModeDelaysListSchema = array(object({
20212
+ mode: AlarmArmModeSchema,
20213
+ exitDelaySec: NcAlarmDelaySecSchema.optional(),
20214
+ entryDelaySec: NcAlarmDelaySecSchema.optional(),
20215
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.optional()
20216
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
20217
+ var NcAlarmModeDelaysEditListSchema = array(object({
20218
+ mode: AlarmArmModeSchema,
20219
+ exitDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20220
+ entryDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20221
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional()
20222
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
20223
+ /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
20224
+ var NcAlarmNonBlockingEditSchema = object({
20225
+ mode: AlarmArmModeSchema,
20226
+ deviceId: number$1().int().positive(),
20227
+ /** true = on the list (may be open, does not block); false = off the list (blocks). */
20228
+ nonBlocking: boolean()
20229
+ });
20206
20230
  /**
20207
20231
  * The per-mode lists, at most one per mode. Two lists for one mode have no
20208
20232
  * meaning a reader could agree on (union? the last one?), so they are refused
@@ -20211,10 +20235,10 @@ object({
20211
20235
  var NcAlarmNonBlockingListSchema = array(object({
20212
20236
  mode: AlarmArmModeSchema,
20213
20237
  deviceIds: array(number$1().int()).max(200)
20214
- })).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
20238
+ })).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
20215
20239
  /**
20216
- * The three durations the panel's state machine runs on, who hears about its
20217
- * transitions, and which openings each mode tolerates.
20240
+ * The three durations — global, and per mode since D697 — the panel's state
20241
+ * machine runs on, who hears about its transitions, and which openings each mode tolerates.
20218
20242
  *
20219
20243
  * They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
20220
20244
  * `alarm-panel` is `deviceNative` and its other provider mirrors somebody
@@ -20224,15 +20248,15 @@ var NcAlarmNonBlockingListSchema = array(object({
20224
20248
  */
20225
20249
  var NcAlarmSettingsSchema = object({
20226
20250
  /** Grace period between arming and the mode taking effect. 0 = immediate. */
20227
- exitDelaySec: number$1().int().min(0).max(600),
20251
+ exitDelaySec: NcAlarmDelaySecSchema,
20228
20252
  /** Grace period between a trigger and the alarm firing. 0 = immediate. */
20229
- entryDelaySec: number$1().int().min(0).max(600),
20253
+ entryDelaySec: NcAlarmDelaySecSchema,
20230
20254
  /**
20231
20255
  * How long `triggered` lasts before the panel re-arms itself.
20232
20256
  * **0 = until an operator disarms it** — the behaviour before this field
20233
20257
  * existed, and therefore what an untouched install keeps doing.
20234
20258
  */
20235
- triggeredDurationSec: number$1().int().min(0).max(3600),
20259
+ triggeredDurationSec: NcAlarmTriggeredSecSchema,
20236
20260
  /**
20237
20261
  * Deprecated by D630 — every transition is announced. Parsed, never read;
20238
20262
  * remove after one release. Optional so an older admin's patch (which still
@@ -20255,17 +20279,30 @@ var NcAlarmSettingsSchema = object({
20255
20279
  * per mode is meaningful. Defaulted to `[]` so a blob stored before D630
20256
20280
  * parses as "every opening blocks" — the behaviour it was written under.
20257
20281
  */
20258
- nonBlocking: NcAlarmNonBlockingListSchema.default([])
20282
+ nonBlocking: NcAlarmNonBlockingListSchema.default([]),
20283
+ /**
20284
+ * Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
20285
+ * without a field, uses the global value above — so `[]`, the default, is exactly the
20286
+ * behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
20287
+ */
20288
+ modeDelays: NcAlarmModeDelaysListSchema.default([])
20259
20289
  });
20260
20290
  /**
20261
20291
  * Every field optional — a tab edits one control at a time.
20262
20292
  *
20263
- * `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
20264
- * remove an inner `.default()`, so a patch that never named the field would
20265
- * parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
20266
- * (the same trap {@link NcRulePatchSchema} documents).
20293
+ * `nonBlocking` and `modeDelays` are re-declared WITHOUT their defaults:
20294
+ * `.partial()` does not remove an inner `.default()`, so a patch that never
20295
+ * named the field would parse to `[]` and wipe every mode's list on an
20296
+ * unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
20297
+ * `modeDelays` means EDITS, not the stored overrides.
20267
20298
  */
20268
- var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
20299
+ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
20300
+ nonBlocking: NcAlarmNonBlockingListSchema,
20301
+ /** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
20302
+ modeDelays: NcAlarmModeDelaysEditListSchema,
20303
+ /** ONE membership change; the panel applies it to the list it holds at its turn. */
20304
+ nonBlockingEdit: NcAlarmNonBlockingEditSchema
20305
+ }).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" });
20269
20306
  /**
20270
20307
  * What one arm mode actually arms, DERIVED from the enabled rules gated on it.
20271
20308
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
@@ -20365,6 +20402,28 @@ var NcAlarmConfigSchema = object({
20365
20402
  */
20366
20403
  live: NcAlarmLiveSchema.optional()
20367
20404
  });
20405
+ var NcAlarmSensorReadingSchema = _enum([
20406
+ "open",
20407
+ "closed",
20408
+ "unknown",
20409
+ "not-opening"
20410
+ ]);
20411
+ /** One device's state as the alarm reads it — the classifier the arm check uses. */
20412
+ var NcAlarmSensorStateSchema = object({
20413
+ deviceId: number$1().int().positive(),
20414
+ reading: NcAlarmSensorReadingSchema,
20415
+ /** The word as read (`open`, `closed`, `unlocked`, `stopped`, …); null when unknown / not an opening. */
20416
+ state: string().nullable(),
20417
+ /** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
20418
+ unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
20419
+ /** The device manager's liveness as the centre mirrors it; null = not known. */
20420
+ online: boolean().nullable()
20421
+ });
20422
+ var NcAlarmSensorsInputSchema = object({ deviceIds: array(number$1().int().positive()).max(500) });
20423
+ var NcAlarmSensorsSchema = object({
20424
+ sensors: array(NcAlarmSensorStateSchema),
20425
+ readAt: number$1().int().nonnegative()
20426
+ });
20368
20427
  /**
20369
20428
  * ONE rule's demand on ONE camera's clip ring.
20370
20429
  *
@@ -20455,7 +20514,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
20455
20514
  }), method(object({}), NcAlarmConfigSchema, { auth: "admin" }), method(object({ patch: NcAlarmSettingsPatchSchema }), NcAlarmConfigSchema, {
20456
20515
  kind: "mutation",
20457
20516
  auth: "admin"
20458
- });
20517
+ }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
20459
20518
  /**
20460
20519
  * Zod schemas for persisted record types.
20461
20520
  *
@@ -20802,12 +20861,26 @@ var CameraSensorRefSchema = object({
20802
20861
  function cameraSensorRefKey(ref) {
20803
20862
  return `${ref.addonId}/${ref.stableId}`;
20804
20863
  }
20805
- /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20806
- var CameraSensorsModeSchema = _enum(["in-addition"]);
20807
- var CameraSensorsConfigSchema = object({
20808
- mode: CameraSensorsModeSchema,
20809
- sensors: array(CameraSensorRefSchema).min(1).max(8)
20810
- }).superRefine((value, ctx) => {
20864
+ /**
20865
+ * A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
20866
+ * `replace`: its motion is the camera's, and while one is READY the camera's
20867
+ * own motion no longer counts on its own. `confirm`: while one is READY the
20868
+ * camera's own motion counts only while a confirm sensor is active — with or
20869
+ * without a replace sensor (spec C2, the controller's ruling on Q1).
20870
+ */
20871
+ var CameraSensorModeSchema = _enum([
20872
+ "in-addition",
20873
+ "confirm",
20874
+ "replace"
20875
+ ]);
20876
+ /** A stored sensor with no mode — every CS-1 row — is in addition. */
20877
+ var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
20878
+ /**
20879
+ * A camera's attached sensors. A CS-1 row carried an envelope
20880
+ * `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
20881
+ * what the write stores (D672 rule 3), so it is never written again.
20882
+ */
20883
+ var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
20811
20884
  const seen = /* @__PURE__ */ new Set();
20812
20885
  value.sensors.forEach((ref, index) => {
20813
20886
  const key = cameraSensorRefKey(ref);
@@ -20819,39 +20892,41 @@ var CameraSensorsConfigSchema = object({
20819
20892
  seen.add(key);
20820
20893
  });
20821
20894
  });
20822
- var RefFields = {
20895
+ /** Every attachment names its mode; an older orchestrator that does not is in addition. */
20896
+ var AttachmentFields = {
20823
20897
  addonId: string(),
20824
- stableId: string()
20898
+ stableId: string(),
20899
+ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
20825
20900
  };
20826
20901
  var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20827
20902
  object({
20828
- ...RefFields,
20903
+ ...AttachmentFields,
20829
20904
  state: literal("ready"),
20830
20905
  deviceId: number$1(),
20831
20906
  name: string(),
20832
20907
  caps: array(string()).readonly()
20833
20908
  }),
20834
20909
  object({
20835
- ...RefFields,
20910
+ ...AttachmentFields,
20836
20911
  state: literal("offline"),
20837
20912
  deviceId: number$1(),
20838
20913
  name: string(),
20839
20914
  reason: _enum(["offline", "disabled"])
20840
20915
  }),
20841
20916
  object({
20842
- ...RefFields,
20917
+ ...AttachmentFields,
20843
20918
  state: literal("missing"),
20844
20919
  reason: string()
20845
20920
  }),
20846
20921
  object({
20847
- ...RefFields,
20922
+ ...AttachmentFields,
20848
20923
  state: literal("unsupported"),
20849
20924
  deviceId: number$1(),
20850
20925
  name: string(),
20851
20926
  reason: string()
20852
20927
  }),
20853
20928
  object({
20854
- ...RefFields,
20929
+ ...AttachmentFields,
20855
20930
  state: literal("unreadable"),
20856
20931
  reason: string()
20857
20932
  })
@@ -20864,17 +20939,49 @@ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20864
20939
  * say.
20865
20940
  */
20866
20941
  var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
20942
+ /** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
20943
+ var CameraOwnMotionSchema = _enum([
20944
+ "always",
20945
+ "when-confirmed",
20946
+ "never"
20947
+ ]);
20948
+ /** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
20949
+ var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
20950
+ /**
20951
+ * The camera's OWN onboard motion (D696): the raw input the bridge combines,
20952
+ * never the effective value. The camera's `motion` slice is the effective one,
20953
+ * so a view of the camera's own row reads this.
20954
+ * - `atMs`: when the bridge received the camera's last own edge.
20955
+ * - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
20956
+ * AND it is younger than the window the bridge counts the camera's own motion
20957
+ * for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
20958
+ * sends a clear (heartbeats only) therefore reads `false` once no push came
20959
+ * within the window; a status read is a snapshot, so a live view re-asks.
20960
+ * Absent = this orchestrator has not received the camera's own motion since it
20961
+ * started (unknown, never "quiet"), or an orchestrator older than D696.
20962
+ */
20963
+ var CameraRawLevelSchema = object({
20964
+ detected: boolean(),
20965
+ atMs: number$1()
20966
+ });
20867
20967
  var CameraSensorsStatusSchema = discriminatedUnion("state", [
20868
- object({ state: literal("not-configured") }),
20968
+ object({
20969
+ state: literal("not-configured"),
20970
+ cameraLevel: CameraRawLevelSchema.optional()
20971
+ }),
20869
20972
  object({
20870
20973
  state: literal("unreadable"),
20871
- reason: string()
20974
+ reason: string(),
20975
+ cameraLevel: CameraRawLevelSchema.optional()
20872
20976
  }),
20873
20977
  object({
20874
20978
  state: literal("configured"),
20875
- mode: CameraSensorsModeSchema,
20979
+ cameraLevel: CameraRawLevelSchema.optional(),
20876
20980
  sensors: array(CameraSensorAttachmentSchema).readonly(),
20877
- notForwarded: CameraSensorsNotForwardedSchema.optional()
20981
+ /** Absent = an orchestrator older than CS-2: it does not say (D315). */
20982
+ cameraMotion: CameraOwnMotionSchema.optional(),
20983
+ notForwarded: CameraSensorsNotForwardedSchema.optional(),
20984
+ notEnforced: CameraSensorsNotEnforcedSchema.optional()
20878
20985
  })
20879
20986
  ]);
20880
20987
  Object.freeze({
@@ -21559,14 +21666,14 @@ var TrackSchema = object({
21559
21666
  * `derive-returned-null tile=standin`,
21560
21667
  * `native-tile tile=native no-key-frame-at-close`, …) written at close and
21561
21668
  * CLEARED by the late-keyFrame upgrade when a native tile lands after all.
21562
- * The operator-facing answer to "perché manca l'immagine?" on a track whose
21669
+ * The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
21563
21670
  * tile is a face/plate stand-in, a raster crop, or an icon.
21564
21671
  *
21565
21672
  * **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
21566
21673
  * the TILE ranked below native, so a track whose thumbnail landed natively
21567
21674
  * while its key frame missed carried no reason at all — three of the four
21568
21675
  * `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
21569
- * that shape, and their "niente ultimo" had no cause anywhere on the row.
21676
+ * that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
21570
21677
  * The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
21571
21678
  * lastFrame copy source`), so its absence is now on this line whatever the
21572
21679
  * tile ended up being.
@@ -21653,7 +21760,7 @@ var MotionEventSchema = object({
21653
21760
  /**
21654
21761
  * Ms offsets from `timestamp` (the episode's own first rising edge, so the
21655
21762
  * first entry is always `0`) of every genuine off→on transition the
21656
- * episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
21763
+ * episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
21657
21764
  * push: a firmware source that keepalives at ~1 Hz for the whole burst
21658
21765
  * (Reolink, Hikvision) produces exactly one edge; a source that reports an
21659
21766
  * explicit `false` mid-episode and then resumes before the quiet window
@@ -24065,8 +24172,10 @@ var RunnerCameraConfigSchema = object({
24065
24172
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
24066
24173
  * analyzer providers) running on decoded frames in this runner.
24067
24174
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
24068
- * analytics). The provider emits ProviderMotion
24069
- * events; the orchestrator forwards to `reportMotion`.
24175
+ * analytics). The provider emits its raw push as `ProviderMotion`
24176
+ * (D673); the orchestrator's camera-sensors bridge re-emits the camera's
24177
+ * effective motion as `MotionOnMotionChanged`, which is what reaches
24178
+ * `reportMotion`.
24070
24179
  */
24071
24180
  motionSources: MotionSourcesSchema.default(["analyzer"]),
24072
24181
  /**
@@ -24243,7 +24352,15 @@ var RunnerLocalLoadSchema = object({
24243
24352
  hasGpu: boolean(),
24244
24353
  inferenceBackend: string().optional(),
24245
24354
  cpuCores: number$1().optional()
24246
- })
24355
+ }),
24356
+ /**
24357
+ * Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
24358
+ * runner never writes it. ABSENT = a runner older than D696, which still
24359
+ * writes the slice from its phase machine; the orchestrator does not write
24360
+ * while any runner node is absent-or-unanswered, so one slice never has two
24361
+ * writers.
24362
+ */
24363
+ motionSliceWriter: literal("orchestrator").optional()
24247
24364
  });
24248
24365
  /**
24249
24366
  * Aggregate runtime metrics for the runner's whole local pool. Mirrors the
@@ -26879,7 +26996,7 @@ var ClipPlaybackSchema = object({
26879
26996
  * **One authorised yes is one wake.** `next-natural` — take the clip the next
26880
26997
  * time the camera is awake for its own reasons — is deliberately not a member:
26881
26998
  * it was proposed, it is free on the battery, and the operator declined it on
26882
- * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."*,
26999
+ * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
26883
27000
  * D558 "Considered and not taken").
26884
27001
  */
26885
27002
  var ClipWakeSchema = _enum(["authorised"]);
@@ -27140,7 +27257,7 @@ DeviceType.Camera, method(object({
27140
27257
  * It replaced `sources?: string[]`, a VIEW filter over source ids that
27141
27258
  * assumed the answer was a fan-out over everything a camera has. The
27142
27259
  * operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
27143
- * solo"* — so the list is asked of one provider at a time and there is
27260
+ * solo"* [there is only one user] — so the list is asked of one provider at a time and there is
27144
27261
  * nothing to filter out of it.
27145
27262
  */
27146
27263
  provider: string().min(1)
@@ -29084,6 +29201,17 @@ object({
29084
29201
  deviceId: number$1(),
29085
29202
  status: DeviceStatusSchema
29086
29203
  });
29204
+ object({
29205
+ /** Ms epoch of the last press. null = never observed since this provider started. */
29206
+ lastPressedAt: number$1().nullable(),
29207
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
29208
+ pressCountSinceStart: number$1()
29209
+ });
29210
+ object({
29211
+ deviceId: number$1(),
29212
+ timestamp: number$1()
29213
+ });
29214
+ DeviceType.Button, DeviceType.Camera;
29087
29215
  /**
29088
29216
  * Enum-state sensor — a string value picked from a finite option set.
29089
29217
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -30728,9 +30856,9 @@ object({
30728
30856
  /** Ms epoch of the last detected-true observation. Null if never detected. */
30729
30857
  lastDetectedAt: number$1().nullable(),
30730
30858
  /**
30731
- * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device,
30732
- * `null` while false and on every `Sensor` device (D475) — see that
30733
- * constant's doc for the one-authority rule.
30859
+ * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
30860
+ * orchestrator writes it, D696), `null` while false and on every `Sensor`
30861
+ * device (D475) — see that constant's doc for the one-authority rule.
30734
30862
  *
30735
30863
  * ## Reading this field still arms nothing
30736
30864
  *
@@ -30748,38 +30876,41 @@ object({
30748
30876
  * `addon-export-alexa/src/motion-clear-hold.ts` and
30749
30877
  * `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
30750
30878
  *
30751
- * ## Who writes it
30752
- *
30753
- * - **Cameras** — the runner's phase machine, `active → watching` on
30754
- * `cooldown_expired`, which then writes this slice with
30755
- * `detected: false` (`handlePhaseChanged` in
30756
- * `pipeline-runner/index.ts`). It produces the FALLING edge, which
30757
- * matters most for the sources that only ever push a rising one:
30758
- * Reolink emits `MotionOnMotionChanged { detected: true }` and never
30759
- * a false.
30760
- * - **Sensors** (Home Assistant binary sensors, Homematic) — the
30761
- * provider pushes the false itself, from the upstream system's own
30762
- * state change. No phase machine is involved.
30879
+ * ## Who writes it (D696)
30763
30880
  *
30764
- * ### The phase machine is CANONICAL, not sole — and that is a defect
30881
+ * - **Cameras** — the orchestrator, and nothing else. It writes the camera's
30882
+ * EFFECTIVE motion (`addon-pipeline-orchestrator`
30883
+ * `camera-sensors/motion-slice.ts`), alongside the effective
30884
+ * `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
30885
+ * for a split camera, an unsplit emitter's direct event, the analyzer and
30886
+ * device activity, as the camera's `motionSources` counts them. A source
30887
+ * that never sends a clear falls one window after its last `true`.
30888
+ * `lastDetectedAt` moves only on an effective rise. No camera provider
30889
+ * writes this slice (not even a boot seed), and neither does the runner's
30890
+ * phase machine: its phase is "a session is attached" for every on-motion
30891
+ * session, not motion, and it now has its own `DetectionPhaseTransition`.
30892
+ * A provider's `isDetected` answers from the hub's slice.
30893
+ * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
30894
+ * imports) — the provider pushes both edges itself, from the upstream
30895
+ * system's own state change. That is the sensor's own fact.
30765
30896
  *
30766
- * An earlier revision of this docblock (mine, 2026-09-12) claimed the
30767
- * phase machine is the sole writer for a camera. It is not.
30768
- * `hikvision-camera.ts:3464` and `amcrest-camera.ts:445` both call
30769
- * `setCapSlice(motionCapability, …)` on their own rising edge, and
30770
- * Hikvision's comment says why: it read THIS docblock, agreed the
30771
- * runner is canonical, and wrote anyway to avoid per-tick churn. So
30772
- * two authorities can disagree about one slice, which this repo
30773
- * forbids, and the doc said otherwise — which is worse than saying
30774
- * nothing, because it reads as verification.
30897
+ * `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
30898
+ * `motion` slice; each sensor writer is a named exemption.
30775
30899
  *
30776
- * This predates D475 and is not fixed there: the fix touches every
30777
- * camera provider. Recorded in D475's Consequences. Do not restore the
30778
- * "sole writer" wording without also removing the other writers.
30900
+ * This replaces the D475 §4 rule ("the phase machine is the sole writer").
30901
+ * That rule was never true: Hikvision and Amcrest wrote the slice raw beside
30902
+ * it, every provider seeded it at boot, and every session left it
30903
+ * `detected: true` after its detach.
30779
30904
  */
30780
30905
  autoClearAfterMs: number$1().nullable()
30781
30906
  });
30782
- object({
30907
+ /**
30908
+ * Payload of `motion.onMotionChanged` event + the corresponding bus
30909
+ * event `EventCategory.MotionOnMotionChanged`. Single source of truth
30910
+ * — both the cap event surface and the bus payload type alias to this
30911
+ * schema.
30912
+ */
30913
+ var MotionOnMotionChangedDataSchema = object({
30783
30914
  deviceId: number$1(),
30784
30915
  detected: boolean(),
30785
30916
  timestamp: number$1(),
@@ -33244,7 +33375,7 @@ var ReadGopBytesResultSchema = object({
33244
33375
  /**
33245
33376
  * A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
33246
33377
  * twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
33247
- * replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-clip-su-pipeline.md`):
33378
+ * replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
33248
33379
  * a replay needs several seconds of native pixels, not one frame.
33249
33380
  *
33250
33381
  * `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
@@ -40838,6 +40969,12 @@ Object.freeze({
40838
40969
  addonId: null,
40839
40970
  access: "view"
40840
40971
  },
40972
+ "notificationRules.getAlarmSensors": {
40973
+ capName: "notification-rules",
40974
+ capScope: "system",
40975
+ addonId: null,
40976
+ access: "view"
40977
+ },
40841
40978
  "notificationRules.getClipRetentionAsks": {
40842
40979
  capName: "notification-rules",
40843
40980
  capScope: "system",
@@ -45321,6 +45458,11 @@ Object.freeze({
45321
45458
  form: "single",
45322
45459
  optional: false
45323
45460
  }],
45461
+ "notificationRules.getAlarmSensors": [{
45462
+ name: "deviceIds",
45463
+ form: "array",
45464
+ optional: false
45465
+ }],
45324
45466
  "notificationRules.setDeviceMuted": [{
45325
45467
  name: "deviceId",
45326
45468
  form: "single",
@@ -47118,7 +47260,7 @@ var PreviewTextField = string().max(200);
47118
47260
  * Whether the notification's preview is a STILL or a short animation.
47119
47261
  *
47120
47262
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
47121
- * rule)"* — the other rules already offer an animated preview, and a ten-hour
47263
+ * rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
47122
47264
  * night reads better as three seconds of motion than as one frame of it. Both
47123
47265
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
47124
47266
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -47256,6 +47398,7 @@ TimelapseRuleInputSchema.extend({
47256
47398
  createdAt: number$1(),
47257
47399
  updatedAt: number$1()
47258
47400
  });
47401
+ MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
47259
47402
  object({
47260
47403
  /**
47261
47404
  * Fraction of the box's own size added on EACH side before cutting.
@@ -83024,7 +83167,7 @@ function messagesFor(request) {
83024
83167
  * `RetryError` is the wrapper the library returns when the attempts are spent;
83025
83168
  * the interesting error is the LAST one inside it, so the envelope is unwrapped
83026
83169
  * before anything is classified (§2.3, "chi classifica gli errori deve
83027
- * scartare l'involucro").
83170
+ * scartare l'involucro" [whoever classifies errors must discard the envelope]).
83028
83171
  */
83029
83172
  function mapLibraryError(error) {
83030
83173
  if (RetryError.isInstance(error)) {