@camstack/addon-decoder-ffmpeg 1.2.12 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +625 -22
  2. package/dist/index.mjs +625 -22
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -7202,8 +7202,31 @@ var AdoptionJobSchema = object({
7202
7202
  error: string().nullable()
7203
7203
  });
7204
7204
  /**
7205
- * Per-camera FUNCTION SWITCHES — the one coherent on/off surface over the
7206
- * pipeline functions an operator thinks in terms of.
7205
+ * Per-camera FUNCTION SWITCHES.
7206
+ *
7207
+ * ## The aggregate group is being withdrawn — the BADGE is not (D113)
7208
+ *
7209
+ * This file shipped as "the one coherent on/off surface over the pipeline
7210
+ * functions an operator thinks in terms of". The operator's verdict on
7211
+ * 2026-08-12 was that the coherent surface bought complexity and no clarity:
7212
+ * every function already had a settings page of its own, and a second place to
7213
+ * turn it off is a second place to look. Each switch is going back to its own
7214
+ * component's original options — detection to the detection-pipeline wrapper
7215
+ * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
7216
+ * (which was always first-class; the switch was a veneer over
7217
+ * `recording.setDeviceConfig`), notifications to a notification-center
7218
+ * per-device setting, the two camera planes to their own components.
7219
+ *
7220
+ * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
7221
+ * thing that lets a status surface say DISABLED instead of BROKEN, recomposed
7222
+ * straight from the authorities with no group in the middle. That rule was
7223
+ * never about a control panel.
7224
+ *
7225
+ * Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
7226
+ * {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
7227
+ * `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
7228
+ * viewers (v1.0.305) and the admin UI still call it. It is deleted when they
7229
+ * stop; nothing new may be built on it.
7207
7230
  *
7208
7231
  * ## This file adds no state
7209
7232
  *
@@ -7554,7 +7577,15 @@ var RecordingConfigSchema = object({
7554
7577
  * Each completed/failed run also lands one durable ops-log row on its owning
7555
7578
  * addon surface.
7556
7579
  */
7580
+ /**
7581
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
7582
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
7583
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
7584
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
7585
+ * runs at all.
7586
+ */
7557
7587
  var RelocateJobStateSchema = _enum([
7588
+ "queued",
7558
7589
  "running",
7559
7590
  "done",
7560
7591
  "failed",
@@ -7589,6 +7620,15 @@ var RelocateFootageInputSchema = object({
7589
7620
  /** Limits relocation to the logical profile class. Omit only for the
7590
7621
  * pre-orchestration compatibility path. */
7591
7622
  footageClass: RelocateFootageClassSchema.optional(),
7623
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
7624
+ * is what a whole-disk drain means. The rebalance path always sets it: its
7625
+ * unit is a (camera, profile) pile, not a disk. */
7626
+ deviceId: number().int().optional(),
7627
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
7628
+ * Finer than `footageClass`, which cannot separate high from mid — and the
7629
+ * placement plan assigns those two independently, so a rebalance that could
7630
+ * only say "recordings" would move footage the plan never asked to move. */
7631
+ profiles: array(string()).optional(),
7592
7632
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7593
7633
  * never allowed to starve live writers. */
7594
7634
  throttleMbps: number().min(1).max(1e3).optional()
@@ -7724,6 +7764,21 @@ var StorageLocationSchema = object({
7724
7764
  nodeId: string().optional(),
7725
7765
  isDefault: boolean().default(false),
7726
7766
  isSystem: boolean().default(false),
7767
+ /**
7768
+ * Operator opt-in: whether consumers that BALANCE across several locations
7769
+ * of a type may write here. Recordings reads it today; event media and
7770
+ * backups are the next consumers, which is why the flag lives on the
7771
+ * location rather than in any one addon's store — nothing has to be
7772
+ * extended to add the next consumer.
7773
+ *
7774
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
7775
+ * flag existed reads back with no flag and keeps working exactly as before;
7776
+ * that is the whole compat story, and it is why no migration ships with it.
7777
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
7778
+ * disk must not silently start writing to it); the default of a type is
7779
+ * always stamped `true`.
7780
+ */
7781
+ enabled: boolean().optional(),
7727
7782
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7728
7783
  * for node-local locations it can reach) — never persisted, absent when the
7729
7784
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12156,7 +12211,8 @@ method(object({
12156
12211
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12157
12212
  /**
12158
12213
  * filesystem-browse — per-node capability for browsing the node's local
12159
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
12214
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12215
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
12160
12216
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12161
12217
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12162
12218
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -13969,6 +14025,13 @@ var MaskGridDimsSchema = object({
13969
14025
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
13970
14026
  * this one field keeps the schema additive — a rule still declares exactly
13971
14027
  * one trigger.
14028
+ *
14029
+ * AUDIO rules add no member here, for the reason occupancy added none: the
14030
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
14031
+ * mirror.ts` fails the build on a member the app cannot render) and every
14032
+ * member costs a release train. A sustained-sound rule is therefore an
14033
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
14034
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
13972
14035
  */
13973
14036
  var NcDeliverySchema = _enum([
13974
14037
  "immediate",
@@ -13983,15 +14046,32 @@ var NcDeliverySchema = _enum([
13983
14046
  * depend on a provider's raw event name or payload shape.
13984
14047
  */
13985
14048
  var NcSystemEventKindSchema = _enum([
13986
- "camera-online",
13987
- "camera-offline",
14049
+ "device-online",
14050
+ "device-offline",
14051
+ "device-disabled",
14052
+ "device-enabled",
13988
14053
  "stream-online",
13989
14054
  "stream-offline",
13990
14055
  "node-online",
13991
14056
  "node-offline",
13992
14057
  "addon-update-available",
13993
- "server-update-available"
14058
+ "server-update-available",
14059
+ "alarm-triggered",
14060
+ "alarm-armed",
14061
+ "alarm-disarmed",
14062
+ "camera-online",
14063
+ "camera-offline",
14064
+ "camera-disabled",
14065
+ "camera-enabled"
14066
+ ]);
14067
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
14068
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
14069
+ "camera-online",
14070
+ "camera-offline",
14071
+ "camera-disabled",
14072
+ "camera-enabled"
13994
14073
  ]);
14074
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
13995
14075
  /**
13996
14076
  * One coherent system-event condition. `kinds` is the required opt-in safety
13997
14077
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -14000,6 +14080,18 @@ var NcSystemEventKindSchema = _enum([
14000
14080
  var NcSystemEventConditionSchema = object({
14001
14081
  kinds: array(NcSystemEventKindSchema).min(1),
14002
14082
  deviceIds: array(number().int()).min(1).optional(),
14083
+ /**
14084
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
14085
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
14086
+ * is what a liveness rule means when nobody said otherwise.
14087
+ *
14088
+ * This is where "only my cameras" is expressed, and it lives on the rule for
14089
+ * one reason: the intake cannot know which devices this household cares
14090
+ * about, and a producer-side filter is one no operator can change. Fails
14091
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
14092
+ * does not carry) matches no `deviceTypes` list.
14093
+ */
14094
+ deviceTypes: array(string().min(1)).min(1).optional(),
14003
14095
  nodeIds: array(string().min(1)).min(1).optional(),
14004
14096
  packageNames: array(string().min(1)).min(1).optional()
14005
14097
  });
@@ -14050,6 +14142,47 @@ var NcOccupancyConditionSchema = object({
14050
14142
  sustainSeconds: number().int().min(0).max(3600).default(15)
14051
14143
  });
14052
14144
  /**
14145
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14146
+ *
14147
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
14148
+ * reference notifier uses, so an operator moving between them re-uses what
14149
+ * they already know): a rule matches when, over a sampling window of
14150
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14151
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14152
+ *
14153
+ * - `dbThreshold` — its level is at or above this many dBFS (see
14154
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14155
+ * - `labels` — the classifier put at least one of these labels on it.
14156
+ *
14157
+ * Both are OPTIONAL and independent, which is the point of the shape: a
14158
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
14159
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14160
+ * is given** — a window in which every sample is trivially a hit would fire on
14161
+ * silence, so the engine refuses such a condition rather than notifying on
14162
+ * nothing (the schema cannot express "at least one of" without becoming a
14163
+ * ZodEffects the cap path would have to special-case).
14164
+ *
14165
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
14166
+ * must be FULL before it can match — a window that has been open for two
14167
+ * seconds of its ten is 100% of nothing, and firing on it would make
14168
+ * `samplingSeconds` decorative.
14169
+ *
14170
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14171
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
14172
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
14173
+ * an operator who typed `dog` mean the same thing.
14174
+ */
14175
+ var NcAudioConditionSchema = object({
14176
+ /** Audio macro labels; absent = any sound (level-only rule). */
14177
+ labels: array(string().min(1)).min(1).optional(),
14178
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14179
+ dbThreshold: number().min(-96).max(0).optional(),
14180
+ /** Percentage of the window's samples that must be hits (1–100). */
14181
+ hitPercent: number().int().min(1).max(100).default(60),
14182
+ /** Length of the sampling window in seconds. */
14183
+ samplingSeconds: number().int().min(1).max(300).default(10)
14184
+ });
14185
+ /**
14053
14186
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
14054
14187
  *
14055
14188
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14322,7 +14455,33 @@ var NcConditionsSchema = object({
14322
14455
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14323
14456
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14324
14457
  */
14325
- occupancy: NcOccupancyConditionSchema.optional()
14458
+ occupancy: NcOccupancyConditionSchema.optional(),
14459
+ /**
14460
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
14461
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
14462
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
14463
+ * a window that is not full yet, neither filter given). See
14464
+ * {@link NcAudioCondition}.
14465
+ *
14466
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
14467
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
14468
+ * a detection, a track or a device event (the same fail-closed pairing
14469
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
14470
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
14471
+ * (an `immediate` rule naming an `audio-*` class, one notification per
14472
+ * classified sample) stays exactly as it was for rules that already use it.
14473
+ *
14474
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14475
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14476
+ * (`camstack/src/data/notification-center.ts`, guarded by
14477
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14478
+ * condition fields it does not know when a rule is saved from the phone.
14479
+ * Publishing an editor for a condition the app cannot round-trip is how an
14480
+ * operator loses a rule's conditions by opening it — so the descriptor, the
14481
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
14482
+ * does an audio rule become authorable.
14483
+ */
14484
+ audio: NcAudioConditionSchema.optional()
14326
14485
  });
14327
14486
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14328
14487
  var NcRuleTargetSchema = object({
@@ -14436,6 +14595,73 @@ var NcThrottleSchema = object({
14436
14595
  */
14437
14596
  granularity: NcThrottleGranularitySchema.optional()
14438
14597
  });
14598
+ /**
14599
+ * How long the confirm gate may hold ONE notification, and how big the picture
14600
+ * it judges may be.
14601
+ *
14602
+ * The clamp is the product decision, not a coincidence of the model: p50 was
14603
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
14604
+ * arrives after the visitor has gone is not a notification. 448 px was enough
14605
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
14606
+ * tokens for pixels the model pools away.
14607
+ */
14608
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
14609
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
14610
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
14611
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
14612
+ var NcConfirmExpectSchema = object({
14613
+ op: _enum([
14614
+ ">=",
14615
+ ">",
14616
+ "<=",
14617
+ "<",
14618
+ "=="
14619
+ ]),
14620
+ count: number().int().min(0).max(1e3)
14621
+ });
14622
+ /**
14623
+ * AI CONFIRM — a vision model looks at the picture this notification is about
14624
+ * to ship and says whether it agrees with the rule.
14625
+ *
14626
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
14627
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
14628
+ * on the operator's phone is not a verdict about this notification.
14629
+ *
14630
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
14631
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
14632
+ * the default and every fail-open is COUNTED, because a gate that always fails
14633
+ * open looks in the log exactly like a gate that works.
14634
+ *
14635
+ * Every field is `.optional()` rather than relied on as a Zod default at the
14636
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
14637
+ * production failures in one day), so the gate reads absent as the constant
14638
+ * above rather than trusting a parse it may never have seen.
14639
+ */
14640
+ var NcConfirmSchema = object({
14641
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
14642
+ * same thing, and both mean "deliver exactly as before". */
14643
+ enabled: boolean().default(false),
14644
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
14645
+ profileId: string().optional(),
14646
+ /**
14647
+ * The operator's question, in his own words. Absent = a question derived
14648
+ * from the rule (its class and its expectation).
14649
+ *
14650
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
14651
+ * banners, signage and plates as instructions if you let them reach the
14652
+ * prompt — proven live — so the authoritative contract stays in the system
14653
+ * turn and only rule-authored words land here.
14654
+ */
14655
+ prompt: string().max(1e3).optional(),
14656
+ /** Fire only when the model's count satisfies this. Absent = the model's
14657
+ * own boolean verdict decides. */
14658
+ expect: NcConfirmExpectSchema.optional(),
14659
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
14660
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
14661
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
14662
+ /** Longest edge the judged image is downscaled to before it is sent. */
14663
+ maxImagePx: number().int().min(64).max(2048).default(448)
14664
+ });
14439
14665
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14440
14666
  var NcRuleInputSchema = object({
14441
14667
  name: string().min(1).max(200),
@@ -14496,7 +14722,13 @@ var NcRuleInputSchema = object({
14496
14722
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14497
14723
  * shape as every other actuation.
14498
14724
  */
14499
- actions: NcRuleActionsSchema.optional()
14725
+ actions: NcRuleActionsSchema.optional(),
14726
+ /**
14727
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
14728
+ * a rule that predates the gate must keep delivering byte-for-byte as it
14729
+ * did, and absent is the only way to say that without a migration.
14730
+ */
14731
+ confirm: NcConfirmSchema.optional()
14500
14732
  });
14501
14733
  /**
14502
14734
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14507,7 +14739,37 @@ var NcRuleInputSchema = object({
14507
14739
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14508
14740
  * `updateRule` patch.
14509
14741
  */
14510
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
14742
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
14743
+ disabledTargetIds: array(string()).optional(),
14744
+ /**
14745
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
14746
+ *
14747
+ * It makes the key optional to SUPPLY; the parse still materialises the
14748
+ * default when the key is absent. And `NcRuleStore.update` merges with
14749
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
14750
+ * one — which made every partial edit destructive:
14751
+ *
14752
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
14753
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
14754
+ * setEnabled(ruleId, false) → conditions reset to `{}`
14755
+ *
14756
+ * A rule scoped to one camera and one zone silently became a rule that
14757
+ * matches EVERY event on EVERY camera, and lost its `media` policy
14758
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
14759
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
14760
+ * within a minute of a two-field patch.
14761
+ *
14762
+ * So every defaulted field is re-declared here WITHOUT its default. The
14763
+ * inner defaults still apply when the caller DOES send the key — `{}` for
14764
+ * conditions remains a real instruction ("clear them") — and only the
14765
+ * absent key is now genuinely absent.
14766
+ */
14767
+ enabled: boolean().optional(),
14768
+ conditions: NcConditionsSchema.optional(),
14769
+ media: NcMediaPolicySchema.optional(),
14770
+ throttle: NcThrottleSchema.optional(),
14771
+ priority: number().int().min(1).max(5).optional()
14772
+ });
14511
14773
  /** A persisted rule. */
14512
14774
  var NcRuleSchema = NcRuleInputSchema.extend({
14513
14775
  id: string(),
@@ -14808,6 +15070,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
14808
15070
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
14809
15071
  * copy would lie the first time a rule is disabled.
14810
15072
  */
15073
+ /**
15074
+ * Why a device a mode NAMES is nonetheless not armed by it.
15075
+ *
15076
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
15077
+ * per-camera notification switch the Notification Center already owns,
15078
+ * `detection-off` is the device's own detection binding being inactive, and
15079
+ * `offline` is the device manager's liveness. A fourth reason would mean a
15080
+ * fourth authority, and inventing one here is how a panel starts disagreeing
15081
+ * with the switches the operator actually used.
15082
+ */
15083
+ var NcAlarmSkipReasonSchema = _enum([
15084
+ "muted",
15085
+ "detection-off",
15086
+ "offline"
15087
+ ]);
15088
+ var NcAlarmSkippedDeviceSchema = object({
15089
+ deviceId: number().int(),
15090
+ reason: NcAlarmSkipReasonSchema
15091
+ });
14811
15092
  var NcAlarmModeCoverageSchema = object({
14812
15093
  mode: AlarmArmModeSchema,
14813
15094
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -14815,7 +15096,18 @@ var NcAlarmModeCoverageSchema = object({
14815
15096
  /** At least one covering rule has no device scope, so the mode covers all. */
14816
15097
  allDevices: boolean(),
14817
15098
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
14818
- deviceIds: array(number().int())
15099
+ deviceIds: array(number().int()),
15100
+ /**
15101
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
15102
+ * excludes it.
15103
+ *
15104
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
15105
+ * twelve makes it false in exactly the way nobody notices until an incident.
15106
+ * Defaulted to `[]` so a coverage answer computed before this field existed
15107
+ * still parses as "nothing known to be skipped" rather than failing the whole
15108
+ * alarm tab.
15109
+ */
15110
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
14819
15111
  });
14820
15112
  var NcAlarmConfigSchema = object({
14821
15113
  /**
@@ -17614,9 +17906,16 @@ var CameraStatusSchema = object({
17614
17906
  audio: CameraAudioStatusSchema.nullable(),
17615
17907
  recording: CameraRecordingStatusSchema.nullable(),
17616
17908
  /**
17617
- * Per-camera function switches an OPERATOR has turned off
17909
+ * Per-camera functions an OPERATOR has turned off
17618
17910
  * ([D61](../../../../docs/decisions/adr-0067.md)).
17619
17911
  *
17912
+ * Composed from the AUTHORITIES themselves — the wrapper bindings,
17913
+ * `RecordingConfig.enabled`, the notification mute, the broker's audio
17914
+ * policy, the camera's own microphone — via `composeSwitchedOff`, not from
17915
+ * the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
17916
+ * The badge outlives the control panel: the panel was a convenience, this is
17917
+ * the difference between a camera being off and a camera being dead.
17918
+ *
17620
17919
  * This is the difference between DISABLED and BROKEN. A camera whose
17621
17920
  * `detection` block reports zero fps and whose `switchedOff` contains
17622
17921
  * `'object-detection'` was switched off by a person; the same camera with an
@@ -23125,7 +23424,19 @@ var RecordingManifestSchema = object({
23125
23424
  * profiles/subtrees/locations on this node). */
23126
23425
  var RecordingDeviceUsageSchema = object({
23127
23426
  deviceId: number(),
23128
- usedBytes: number()
23427
+ usedBytes: number(),
23428
+ /**
23429
+ * Start of this camera's OLDEST indexed segment, across every profile and
23430
+ * location — the "Oldest footage" column in Recordings → Storage, and the
23431
+ * only honest answer to "is retention actually holding?" per camera.
23432
+ *
23433
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
23434
+ * predates this field omits it entirely, and a hub whose types carry the
23435
+ * field must keep validating that older provider's payload: the framework
23436
+ * (types) and the addon ship on different trains, and the addon is usually
23437
+ * the later of the two.
23438
+ */
23439
+ oldestMs: number().nullable().optional()
23129
23440
  });
23130
23441
  /** Recording storage usage + capacity for one storage location. */
23131
23442
  var RecordingLocationUsageSchema = object({
@@ -23153,6 +23464,57 @@ var RecordingStorageUsageSchema = object({
23153
23464
  locations: array(RecordingLocationUsageSchema)
23154
23465
  });
23155
23466
  /**
23467
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
23468
+ *
23469
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
23470
+ * is the operator asking for the EXISTING archive to be brought into line with
23471
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
23472
+ * location, run FIFO behind the single-flight mover.
23473
+ *
23474
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
23475
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
23476
+ * (empty on the plan).
23477
+ */
23478
+ var RecordingRebalanceMoveSchema = object({
23479
+ deviceId: number(),
23480
+ profile: string(),
23481
+ fromLocationId: string(),
23482
+ toLocationId: string(),
23483
+ bytes: number(),
23484
+ files: number().int()
23485
+ });
23486
+ /** Why a pile that is out of place is staying there. Every refusal is
23487
+ * reported: a rebalance that silently drops a camera reads exactly like one
23488
+ * that had nothing to do. */
23489
+ var RecordingRebalanceSkipReasonSchema = _enum([
23490
+ "unassigned",
23491
+ "target-not-writable",
23492
+ "below-threshold",
23493
+ "no-headroom"
23494
+ ]);
23495
+ var RecordingRebalanceSkipSchema = object({
23496
+ deviceId: number(),
23497
+ profile: string(),
23498
+ fromLocationId: string(),
23499
+ /** The location the plan wants; null when the camera has no assignment. */
23500
+ toLocationId: string().nullable(),
23501
+ bytes: number(),
23502
+ reason: RecordingRebalanceSkipReasonSchema
23503
+ });
23504
+ var RecordingRebalancePlanSchema = object({
23505
+ moves: array(RecordingRebalanceMoveSchema),
23506
+ skipped: array(RecordingRebalanceSkipSchema),
23507
+ bytesToMove: number(),
23508
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
23509
+ jobIds: array(string())
23510
+ });
23511
+ var RecordingRebalanceInputSchema = object({
23512
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
23513
+ throttleMbps: number().min(1).max(1e3).optional(),
23514
+ /** Ignore piles smaller than this (default 1 GB). */
23515
+ minMoveGb: number().min(0).optional()
23516
+ });
23517
+ /**
23156
23518
  * Result of locating footage at a wall-clock instant for one device/profile.
23157
23519
  * `segment` carries the covering segment's window; `gap` reports the forward
23158
23520
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -23315,9 +23677,24 @@ method(object({
23315
23677
  }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23316
23678
  kind: "mutation",
23317
23679
  auth: "admin"
23680
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
23681
+ kind: "mutation",
23682
+ auth: "admin"
23683
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
23684
+ kind: "query",
23685
+ auth: "admin"
23686
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23687
+ kind: "mutation",
23688
+ auth: "admin"
23689
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23690
+ kind: "query",
23691
+ auth: "admin"
23692
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23693
+ kind: "mutation",
23694
+ auth: "admin"
23318
23695
  });
23319
23696
  /**
23320
- * `recordingExport` cap — render a footage time range into a single downloadable
23697
+ * `recording-export` cap — render a footage time range into a single downloadable
23321
23698
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
23322
23699
  * bounded lifetime with a durable history, auto-expiry, and optional
23323
23700
  * delete-after-download.
@@ -23332,10 +23709,42 @@ method(object({
23332
23709
  */
23333
23710
  /** Playback-speed multiplier for the render (1 = realtime). */
23334
23711
  var ExportSpeedSchema = number().min(.25).max(32);
23712
+ /**
23713
+ * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23714
+ *
23715
+ * Relative and not absolute epoch on purpose: the renderer's frame-select
23716
+ * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23717
+ * playlist. Handing it absolute epochs would make every call site responsible
23718
+ * for the same subtraction, and the one that forgot would emit a filter that
23719
+ * selects nothing — silently, as a uniform timelapse.
23720
+ */
23721
+ var ExportDenseRangeSchema = object({
23722
+ fromSec: number().nonnegative(),
23723
+ toSec: number().nonnegative()
23724
+ }).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
23725
+ /**
23726
+ * Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
23727
+ * listed ranges and at the base `everyMs` everywhere else.
23728
+ *
23729
+ * `everyMs` must be strictly smaller than the base cadence — a dense rate that
23730
+ * is not denser renders a uniform timelapse the operator believes is two-rate.
23731
+ */
23732
+ var ExportDenseSchema = object({
23733
+ everyMs: number().int().positive(),
23734
+ ranges: array(ExportDenseRangeSchema).min(1).max(200)
23735
+ });
23335
23736
  /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
23336
23737
  var ExportTimelapseSchema = object({
23337
23738
  everyMs: number().int().positive(),
23338
- outputFps: number().int().min(1).max(60).optional()
23739
+ outputFps: number().int().min(1).max(60).optional(),
23740
+ /** Optional second, FASTER rate over the intervals that matter. */
23741
+ dense: ExportDenseSchema.optional()
23742
+ }).superRefine((v, ctx) => {
23743
+ if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
23744
+ code: ZodIssueCode.custom,
23745
+ message: "dense.everyMs must be strictly smaller than the base everyMs",
23746
+ path: ["dense", "everyMs"]
23747
+ });
23339
23748
  });
23340
23749
  /**
23341
23750
  * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
@@ -23393,6 +23802,19 @@ var ExportDownloadSchema = object({
23393
23802
  url: string(),
23394
23803
  endpoints: array(string())
23395
23804
  });
23805
+ /**
23806
+ * A finished export's bytes, inline.
23807
+ *
23808
+ * `bytes` is the DECODED length — the number the caller bounds and logs
23809
+ * against, so nobody has to infer it from the base64 length.
23810
+ */
23811
+ var ExportBytesSchema = object({
23812
+ base64: string(),
23813
+ contentType: string(),
23814
+ /** Suggested filename, extension included. */
23815
+ name: string(),
23816
+ bytes: number().int().nonnegative()
23817
+ });
23396
23818
  method(object({
23397
23819
  deviceId: number(),
23398
23820
  profile: string(),
@@ -23417,6 +23839,9 @@ method(object({
23417
23839
  }), method(object({ exportId: string() }), ExportDownloadSchema, {
23418
23840
  kind: "query",
23419
23841
  auth: "protected"
23842
+ }), method(object({ exportId: string() }), ExportBytesSchema, {
23843
+ kind: "query",
23844
+ auth: "protected"
23420
23845
  });
23421
23846
  /**
23422
23847
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -28610,6 +29035,12 @@ Object.freeze({
28610
29035
  addonId: null,
28611
29036
  access: "create"
28612
29037
  },
29038
+ "recording.cancelRelocateJob": {
29039
+ capName: "recording",
29040
+ capScope: "system",
29041
+ addonId: null,
29042
+ access: "create"
29043
+ },
28613
29044
  "recording.cancelStorageMigrationMove": {
28614
29045
  capName: "recording",
28615
29046
  capScope: "system",
@@ -28664,6 +29095,12 @@ Object.freeze({
28664
29095
  addonId: null,
28665
29096
  access: "view"
28666
29097
  },
29098
+ "recording.listRelocateJobs": {
29099
+ capName: "recording",
29100
+ capScope: "system",
29101
+ addonId: null,
29102
+ access: "view"
29103
+ },
28667
29104
  "recording.locateSegment": {
28668
29105
  capName: "recording",
28669
29106
  capScope: "system",
@@ -28676,6 +29113,12 @@ Object.freeze({
28676
29113
  addonId: null,
28677
29114
  access: "create"
28678
29115
  },
29116
+ "recording.planStorageRebalance": {
29117
+ capName: "recording",
29118
+ capScope: "system",
29119
+ addonId: null,
29120
+ access: "view"
29121
+ },
28679
29122
  "recording.pruneFootage": {
28680
29123
  capName: "recording",
28681
29124
  capScope: "system",
@@ -28700,6 +29143,12 @@ Object.freeze({
28700
29143
  addonId: null,
28701
29144
  access: "create"
28702
29145
  },
29146
+ "recording.relocateFootage": {
29147
+ capName: "recording",
29148
+ capScope: "system",
29149
+ addonId: null,
29150
+ access: "create"
29151
+ },
28703
29152
  "recording.renderClip": {
28704
29153
  capName: "recording",
28705
29154
  capScope: "system",
@@ -28736,38 +29185,50 @@ Object.freeze({
28736
29185
  addonId: null,
28737
29186
  access: "create"
28738
29187
  },
29188
+ "recording.startStorageRebalance": {
29189
+ capName: "recording",
29190
+ capScope: "system",
29191
+ addonId: null,
29192
+ access: "create"
29193
+ },
28739
29194
  "recordingExport.cancelExport": {
28740
- capName: "recordingExport",
29195
+ capName: "recording-export",
28741
29196
  capScope: "system",
28742
29197
  addonId: null,
28743
29198
  access: "create"
28744
29199
  },
28745
29200
  "recordingExport.createExport": {
28746
- capName: "recordingExport",
29201
+ capName: "recording-export",
28747
29202
  capScope: "system",
28748
29203
  addonId: null,
28749
29204
  access: "create"
28750
29205
  },
28751
29206
  "recordingExport.deleteExport": {
28752
- capName: "recordingExport",
29207
+ capName: "recording-export",
28753
29208
  capScope: "system",
28754
29209
  addonId: null,
28755
29210
  access: "delete"
28756
29211
  },
28757
29212
  "recordingExport.getDownloadUrl": {
28758
- capName: "recordingExport",
29213
+ capName: "recording-export",
28759
29214
  capScope: "system",
28760
29215
  addonId: null,
28761
29216
  access: "view"
28762
29217
  },
28763
29218
  "recordingExport.getExport": {
28764
- capName: "recordingExport",
29219
+ capName: "recording-export",
28765
29220
  capScope: "system",
28766
29221
  addonId: null,
28767
29222
  access: "view"
28768
29223
  },
28769
29224
  "recordingExport.listExports": {
28770
- capName: "recordingExport",
29225
+ capName: "recording-export",
29226
+ capScope: "system",
29227
+ addonId: null,
29228
+ access: "view"
29229
+ },
29230
+ "recordingExport.readExportBytes": {
29231
+ capName: "recording-export",
28771
29232
  capScope: "system",
28772
29233
  addonId: null,
28773
29234
  access: "view"
@@ -30144,6 +30605,104 @@ var FramerateField = number().int().min(1).max(60);
30144
30605
  var TargetsField = array(NcRuleTargetSchema).min(1);
30145
30606
  var PriorityField = number().int().min(1).max(5);
30146
30607
  /**
30608
+ * Explicit override of the DENSE sampling cadence, seconds.
30609
+ *
30610
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
30611
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
30612
+ * made that same base 3 s and rendered a person pass as two frames.)
30613
+ *
30614
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
30615
+ * `denseCadenceSec` and played at `framerate` occupies
30616
+ *
30617
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
30618
+ *
30619
+ * so a 7 s pass at 1 s / 12 fps is 0.58 s of video, and at 0.5 s it is 1.17 s.
30620
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
30621
+ * and therefore the length of a quiet night, does not move.
30622
+ *
30623
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
30624
+ * the recording has them returns the same frames, requested twice. Must be
30625
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
30626
+ * a uniform video the operator believes is two-rate — and upsert refuses it
30627
+ * rather than letting the export cap reject the render hours after the window.
30628
+ */
30629
+ var DenseCadenceSecField = number().min(.1).max(3600);
30630
+ /**
30631
+ * Minimum seconds of OUTPUT video each detection range must occupy.
30632
+ *
30633
+ * The operator-facing form of the arithmetic above: instead of solving for a
30634
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
30635
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
30636
+ * that range every ~583 ms.
30637
+ *
30638
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
30639
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
30640
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
30641
+ * ranges are sampled denser than they need. Per-range cadences require a cap
30642
+ * schema change and are the tracked follow-up.
30643
+ *
30644
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
30645
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
30646
+ * by real footage, never met by duplicating frames into motion that never
30647
+ * happened.
30648
+ */
30649
+ var MinDwellSecField = number().min(0).max(60);
30650
+ /**
30651
+ * Caption burned into the notification's preview frame.
30652
+ *
30653
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
30654
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
30655
+ * templating dialect for one field would be a second thing to explain.
30656
+ *
30657
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
30658
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
30659
+ * the reason this is not `.min(1)`.
30660
+ */
30661
+ var PreviewTextField = string().max(200);
30662
+ /**
30663
+ * Whether the notification's preview is a STILL or a short animation.
30664
+ *
30665
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
30666
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
30667
+ * night reads better as three seconds of motion than as one frame of it. Both
30668
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
30669
+ * simply applies it to a dozen frames sampled across the render and assembles
30670
+ * them.
30671
+ *
30672
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
30673
+ * seeks and a palette pass, and no rule that never asked for one should start
30674
+ * paying that on the deploy that shipped it.
30675
+ *
30676
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
30677
+ */
30678
+ var PreviewModeField = _enum(["image", "gif"]);
30679
+ /**
30680
+ * Which detection classes the notification reports counts for.
30681
+ *
30682
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
30683
+ * plan — no second query — aggregated per class. Absent or empty means "every
30684
+ * class the window actually contained", which is what an operator who never
30685
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
30686
+ * counts cars all night).
30687
+ *
30688
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
30689
+ * …). An unknown name simply never matches and reports nothing — it is not an
30690
+ * error, because a rule may legitimately name a class this camera's model does
30691
+ * not emit.
30692
+ *
30693
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
30694
+ * - `{{detections}}` — total over the reported classes
30695
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
30696
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
30697
+ * one per class, `count_` + the class name
30698
+ *
30699
+ * With NO custom body template the summary is appended to the derived body, and
30700
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
30701
+ * reads. With a custom template the operator owns every word — nothing is
30702
+ * appended, so `{{detectionSummary}}` is how he asks for it.
30703
+ */
30704
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
30705
+ /**
30147
30706
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
30148
30707
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
30149
30708
  * here (see the ownership note above).
@@ -30163,9 +30722,30 @@ var TimelapseRuleInputSchema = object({
30163
30722
  cadenceSec: CadenceSecField.default(15),
30164
30723
  /** Output frames per second of the assembled mp4 (predecessor parity). */
30165
30724
  framerate: FramerateField.default(10),
30725
+ /**
30726
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
30727
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
30728
+ * field gets.
30729
+ */
30730
+ denseCadenceSec: DenseCadenceSecField.optional(),
30731
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
30732
+ minDwellSec: MinDwellSecField.optional(),
30166
30733
  /** `notification-output` targets the finished video/thumbnail is sent to. */
30167
30734
  targets: TargetsField,
30168
30735
  template: TimelapseTemplateSchema.optional(),
30736
+ /**
30737
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
30738
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
30739
+ *
30740
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
30741
+ * the notification's title/body, and clearing it (`template: null`) must not
30742
+ * silently clear the caption too.
30743
+ */
30744
+ previewText: PreviewTextField.optional(),
30745
+ /** Still or animation — see {@link PreviewModeField}. */
30746
+ previewMode: PreviewModeField.default("image"),
30747
+ /** Classes the notification counts — see {@link ReportClassesField}. */
30748
+ reportClasses: ReportClassesField.optional(),
30169
30749
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
30170
30750
  priority: PriorityField.default(3)
30171
30751
  });
@@ -30176,8 +30756,13 @@ object({
30176
30756
  schedule: NcScheduleSchema.optional(),
30177
30757
  cadenceSec: CadenceSecField.optional(),
30178
30758
  framerate: FramerateField.optional(),
30759
+ denseCadenceSec: DenseCadenceSecField.optional(),
30760
+ minDwellSec: MinDwellSecField.optional(),
30179
30761
  targets: TargetsField.optional(),
30180
30762
  template: TimelapseTemplateSchema.nullable().optional(),
30763
+ previewText: PreviewTextField.optional(),
30764
+ previewMode: PreviewModeField.optional(),
30765
+ reportClasses: ReportClassesField.optional(),
30181
30766
  priority: PriorityField.optional()
30182
30767
  });
30183
30768
  TimelapseRuleInputSchema.extend({
@@ -30189,10 +30774,28 @@ TimelapseRuleInputSchema.extend({
30189
30774
  */
30190
30775
  ownerUserId: string().optional(),
30191
30776
  /**
30192
- * Epoch-ms of the last successful generation the 1-hour re-generation
30193
- * guard's durable state (predecessor parity). Absent = never generated.
30777
+ * Epoch-ms of the NEWEST successful generation across every camera of this
30778
+ * rule. What a UI shows, and the compatibility floor for
30779
+ * {@link readTimelapseGeneratedAt}. Absent = never generated.
30194
30780
  */
30195
30781
  lastGeneratedAt: number().optional(),
30782
+ /**
30783
+ * PER-CAMERA generation state, keyed by `String(deviceId)` — the
30784
+ * re-generation guard's real durable state.
30785
+ *
30786
+ * One rule covers several cameras and each renders its own video, so a rule
30787
+ * -wide stamp is wrong in the direction that DESTROYS work: camera A
30788
+ * succeeding at 06:05 tells camera B, whose render failed, that it is
30789
+ * already done — and B's night is gone for good, because the window will not
30790
+ * come back.
30791
+ *
30792
+ * ADDITIVE, so the migration is free: a row written before this field simply
30793
+ * has no map, and {@link readTimelapseGeneratedAt} falls back to
30794
+ * {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
30795
+ * "never generated" would re-render and re-notify every camera of every rule
30796
+ * once, on the deploy that shipped the map.
30797
+ */
30798
+ generatedByDevice: record(string(), number()).optional(),
30196
30799
  /** userId of the caller who created the rule (server-stamped). */
30197
30800
  createdBy: string(),
30198
30801
  createdAt: number(),