@camstack/addon-provider-dreame 0.2.13 → 0.2.14

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 +625 -22
  2. package/dist/addon.mjs +625 -22
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -57724,8 +57724,31 @@ var AdoptionJobSchema = object({
57724
57724
  error: string().nullable()
57725
57725
  });
57726
57726
  /**
57727
- * Per-camera FUNCTION SWITCHES — the one coherent on/off surface over the
57728
- * pipeline functions an operator thinks in terms of.
57727
+ * Per-camera FUNCTION SWITCHES.
57728
+ *
57729
+ * ## The aggregate group is being withdrawn — the BADGE is not (D113)
57730
+ *
57731
+ * This file shipped as "the one coherent on/off surface over the pipeline
57732
+ * functions an operator thinks in terms of". The operator's verdict on
57733
+ * 2026-08-12 was that the coherent surface bought complexity and no clarity:
57734
+ * every function already had a settings page of its own, and a second place to
57735
+ * turn it off is a second place to look. Each switch is going back to its own
57736
+ * component's original options — detection to the detection-pipeline wrapper
57737
+ * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
57738
+ * (which was always first-class; the switch was a veneer over
57739
+ * `recording.setDeviceConfig`), notifications to a notification-center
57740
+ * per-device setting, the two camera planes to their own components.
57741
+ *
57742
+ * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
57743
+ * thing that lets a status surface say DISABLED instead of BROKEN, recomposed
57744
+ * straight from the authorities with no group in the middle. That rule was
57745
+ * never about a control panel.
57746
+ *
57747
+ * Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
57748
+ * {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
57749
+ * `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
57750
+ * viewers (v1.0.305) and the admin UI still call it. It is deleted when they
57751
+ * stop; nothing new may be built on it.
57729
57752
  *
57730
57753
  * ## This file adds no state
57731
57754
  *
@@ -58076,7 +58099,15 @@ var RecordingConfigSchema = object({
58076
58099
  * Each completed/failed run also lands one durable ops-log row on its owning
58077
58100
  * addon surface.
58078
58101
  */
58102
+ /**
58103
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
58104
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
58105
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
58106
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
58107
+ * runs at all.
58108
+ */
58079
58109
  var RelocateJobStateSchema = _enum([
58110
+ "queued",
58080
58111
  "running",
58081
58112
  "done",
58082
58113
  "failed",
@@ -58111,6 +58142,15 @@ var RelocateFootageInputSchema = object({
58111
58142
  /** Limits relocation to the logical profile class. Omit only for the
58112
58143
  * pre-orchestration compatibility path. */
58113
58144
  footageClass: RelocateFootageClassSchema.optional(),
58145
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
58146
+ * is what a whole-disk drain means. The rebalance path always sets it: its
58147
+ * unit is a (camera, profile) pile, not a disk. */
58148
+ deviceId: number().int().optional(),
58149
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
58150
+ * Finer than `footageClass`, which cannot separate high from mid — and the
58151
+ * placement plan assigns those two independently, so a rebalance that could
58152
+ * only say "recordings" would move footage the plan never asked to move. */
58153
+ profiles: array(string()).optional(),
58114
58154
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
58115
58155
  * never allowed to starve live writers. */
58116
58156
  throttleMbps: number().min(1).max(1e3).optional()
@@ -58246,6 +58286,21 @@ var StorageLocationSchema = object({
58246
58286
  nodeId: string().optional(),
58247
58287
  isDefault: boolean().default(false),
58248
58288
  isSystem: boolean().default(false),
58289
+ /**
58290
+ * Operator opt-in: whether consumers that BALANCE across several locations
58291
+ * of a type may write here. Recordings reads it today; event media and
58292
+ * backups are the next consumers, which is why the flag lives on the
58293
+ * location rather than in any one addon's store — nothing has to be
58294
+ * extended to add the next consumer.
58295
+ *
58296
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
58297
+ * flag existed reads back with no flag and keeps working exactly as before;
58298
+ * that is the whole compat story, and it is why no migration ships with it.
58299
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
58300
+ * disk must not silently start writing to it); the default of a type is
58301
+ * always stamped `true`.
58302
+ */
58303
+ enabled: boolean().optional(),
58249
58304
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
58250
58305
  * for node-local locations it can reach) — never persisted, absent when the
58251
58306
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -62815,7 +62870,8 @@ method(object({
62815
62870
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
62816
62871
  /**
62817
62872
  * filesystem-browse — per-node capability for browsing the node's local
62818
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
62873
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
62874
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
62819
62875
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
62820
62876
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
62821
62877
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -64656,6 +64712,13 @@ var MaskGridDimsSchema = object({
64656
64712
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
64657
64713
  * this one field keeps the schema additive — a rule still declares exactly
64658
64714
  * one trigger.
64715
+ *
64716
+ * AUDIO rules add no member here, for the reason occupancy added none: the
64717
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
64718
+ * mirror.ts` fails the build on a member the app cannot render) and every
64719
+ * member costs a release train. A sustained-sound rule is therefore an
64720
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
64721
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
64659
64722
  */
64660
64723
  var NcDeliverySchema = _enum([
64661
64724
  "immediate",
@@ -64670,15 +64733,32 @@ var NcDeliverySchema = _enum([
64670
64733
  * depend on a provider's raw event name or payload shape.
64671
64734
  */
64672
64735
  var NcSystemEventKindSchema = _enum([
64673
- "camera-online",
64674
- "camera-offline",
64736
+ "device-online",
64737
+ "device-offline",
64738
+ "device-disabled",
64739
+ "device-enabled",
64675
64740
  "stream-online",
64676
64741
  "stream-offline",
64677
64742
  "node-online",
64678
64743
  "node-offline",
64679
64744
  "addon-update-available",
64680
- "server-update-available"
64745
+ "server-update-available",
64746
+ "alarm-triggered",
64747
+ "alarm-armed",
64748
+ "alarm-disarmed",
64749
+ "camera-online",
64750
+ "camera-offline",
64751
+ "camera-disabled",
64752
+ "camera-enabled"
64753
+ ]);
64754
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
64755
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
64756
+ "camera-online",
64757
+ "camera-offline",
64758
+ "camera-disabled",
64759
+ "camera-enabled"
64681
64760
  ]);
64761
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
64682
64762
  /**
64683
64763
  * One coherent system-event condition. `kinds` is the required opt-in safety
64684
64764
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -64687,6 +64767,18 @@ var NcSystemEventKindSchema = _enum([
64687
64767
  var NcSystemEventConditionSchema = object({
64688
64768
  kinds: array(NcSystemEventKindSchema).min(1),
64689
64769
  deviceIds: array(number().int()).min(1).optional(),
64770
+ /**
64771
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
64772
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
64773
+ * is what a liveness rule means when nobody said otherwise.
64774
+ *
64775
+ * This is where "only my cameras" is expressed, and it lives on the rule for
64776
+ * one reason: the intake cannot know which devices this household cares
64777
+ * about, and a producer-side filter is one no operator can change. Fails
64778
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
64779
+ * does not carry) matches no `deviceTypes` list.
64780
+ */
64781
+ deviceTypes: array(string().min(1)).min(1).optional(),
64690
64782
  nodeIds: array(string().min(1)).min(1).optional(),
64691
64783
  packageNames: array(string().min(1)).min(1).optional()
64692
64784
  });
@@ -64737,6 +64829,47 @@ var NcOccupancyConditionSchema = object({
64737
64829
  sustainSeconds: number().int().min(0).max(3600).default(15)
64738
64830
  });
64739
64831
  /**
64832
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
64833
+ *
64834
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
64835
+ * reference notifier uses, so an operator moving between them re-uses what
64836
+ * they already know): a rule matches when, over a sampling window of
64837
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
64838
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
64839
+ *
64840
+ * - `dbThreshold` — its level is at or above this many dBFS (see
64841
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
64842
+ * - `labels` — the classifier put at least one of these labels on it.
64843
+ *
64844
+ * Both are OPTIONAL and independent, which is the point of the shape: a
64845
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
64846
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
64847
+ * is given** — a window in which every sample is trivially a hit would fire on
64848
+ * silence, so the engine refuses such a condition rather than notifying on
64849
+ * nothing (the schema cannot express "at least one of" without becoming a
64850
+ * ZodEffects the cap path would have to special-case).
64851
+ *
64852
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
64853
+ * must be FULL before it can match — a window that has been open for two
64854
+ * seconds of its ten is 100% of nothing, and firing on it would make
64855
+ * `samplingSeconds` decorative.
64856
+ *
64857
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
64858
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
64859
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
64860
+ * an operator who typed `dog` mean the same thing.
64861
+ */
64862
+ var NcAudioConditionSchema = object({
64863
+ /** Audio macro labels; absent = any sound (level-only rule). */
64864
+ labels: array(string().min(1)).min(1).optional(),
64865
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
64866
+ dbThreshold: number().min(-96).max(0).optional(),
64867
+ /** Percentage of the window's samples that must be hits (1–100). */
64868
+ hitPercent: number().int().min(1).max(100).default(60),
64869
+ /** Length of the sampling window in seconds. */
64870
+ samplingSeconds: number().int().min(1).max(300).default(10)
64871
+ });
64872
+ /**
64740
64873
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
64741
64874
  *
64742
64875
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -65009,7 +65142,33 @@ var NcConditionsSchema = object({
65009
65142
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
65010
65143
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
65011
65144
  */
65012
- occupancy: NcOccupancyConditionSchema.optional()
65145
+ occupancy: NcOccupancyConditionSchema.optional(),
65146
+ /**
65147
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
65148
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
65149
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
65150
+ * a window that is not full yet, neither filter given). See
65151
+ * {@link NcAudioCondition}.
65152
+ *
65153
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
65154
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
65155
+ * a detection, a track or a device event (the same fail-closed pairing
65156
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
65157
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
65158
+ * (an `immediate` rule naming an `audio-*` class, one notification per
65159
+ * classified sample) stays exactly as it was for rules that already use it.
65160
+ *
65161
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
65162
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
65163
+ * (`camstack/src/data/notification-center.ts`, guarded by
65164
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
65165
+ * condition fields it does not know when a rule is saved from the phone.
65166
+ * Publishing an editor for a condition the app cannot round-trip is how an
65167
+ * operator loses a rule's conditions by opening it — so the descriptor, the
65168
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
65169
+ * does an audio rule become authorable.
65170
+ */
65171
+ audio: NcAudioConditionSchema.optional()
65013
65172
  });
65014
65173
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
65015
65174
  var NcRuleTargetSchema = object({
@@ -65123,6 +65282,73 @@ var NcThrottleSchema = object({
65123
65282
  */
65124
65283
  granularity: NcThrottleGranularitySchema.optional()
65125
65284
  });
65285
+ /**
65286
+ * How long the confirm gate may hold ONE notification, and how big the picture
65287
+ * it judges may be.
65288
+ *
65289
+ * The clamp is the product decision, not a coincidence of the model: p50 was
65290
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
65291
+ * arrives after the visitor has gone is not a notification. 448 px was enough
65292
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
65293
+ * tokens for pixels the model pools away.
65294
+ */
65295
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
65296
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
65297
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
65298
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
65299
+ var NcConfirmExpectSchema = object({
65300
+ op: _enum([
65301
+ ">=",
65302
+ ">",
65303
+ "<=",
65304
+ "<",
65305
+ "=="
65306
+ ]),
65307
+ count: number().int().min(0).max(1e3)
65308
+ });
65309
+ /**
65310
+ * AI CONFIRM — a vision model looks at the picture this notification is about
65311
+ * to ship and says whether it agrees with the rule.
65312
+ *
65313
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
65314
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
65315
+ * on the operator's phone is not a verdict about this notification.
65316
+ *
65317
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
65318
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
65319
+ * the default and every fail-open is COUNTED, because a gate that always fails
65320
+ * open looks in the log exactly like a gate that works.
65321
+ *
65322
+ * Every field is `.optional()` rather than relied on as a Zod default at the
65323
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
65324
+ * production failures in one day), so the gate reads absent as the constant
65325
+ * above rather than trusting a parse it may never have seen.
65326
+ */
65327
+ var NcConfirmSchema = object({
65328
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
65329
+ * same thing, and both mean "deliver exactly as before". */
65330
+ enabled: boolean().default(false),
65331
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
65332
+ profileId: string().optional(),
65333
+ /**
65334
+ * The operator's question, in his own words. Absent = a question derived
65335
+ * from the rule (its class and its expectation).
65336
+ *
65337
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
65338
+ * banners, signage and plates as instructions if you let them reach the
65339
+ * prompt — proven live — so the authoritative contract stays in the system
65340
+ * turn and only rule-authored words land here.
65341
+ */
65342
+ prompt: string().max(1e3).optional(),
65343
+ /** Fire only when the model's count satisfies this. Absent = the model's
65344
+ * own boolean verdict decides. */
65345
+ expect: NcConfirmExpectSchema.optional(),
65346
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
65347
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
65348
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
65349
+ /** Longest edge the judged image is downscaled to before it is sent. */
65350
+ maxImagePx: number().int().min(64).max(2048).default(448)
65351
+ });
65126
65352
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
65127
65353
  var NcRuleInputSchema = object({
65128
65354
  name: string().min(1).max(200),
@@ -65183,7 +65409,13 @@ var NcRuleInputSchema = object({
65183
65409
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
65184
65410
  * shape as every other actuation.
65185
65411
  */
65186
- actions: NcRuleActionsSchema.optional()
65412
+ actions: NcRuleActionsSchema.optional(),
65413
+ /**
65414
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
65415
+ * a rule that predates the gate must keep delivering byte-for-byte as it
65416
+ * did, and absent is the only way to say that without a migration.
65417
+ */
65418
+ confirm: NcConfirmSchema.optional()
65187
65419
  });
65188
65420
  /**
65189
65421
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -65194,7 +65426,37 @@ var NcRuleInputSchema = object({
65194
65426
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
65195
65427
  * `updateRule` patch.
65196
65428
  */
65197
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
65429
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
65430
+ disabledTargetIds: array(string()).optional(),
65431
+ /**
65432
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
65433
+ *
65434
+ * It makes the key optional to SUPPLY; the parse still materialises the
65435
+ * default when the key is absent. And `NcRuleStore.update` merges with
65436
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
65437
+ * one — which made every partial edit destructive:
65438
+ *
65439
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
65440
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
65441
+ * setEnabled(ruleId, false) → conditions reset to `{}`
65442
+ *
65443
+ * A rule scoped to one camera and one zone silently became a rule that
65444
+ * matches EVERY event on EVERY camera, and lost its `media` policy
65445
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
65446
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
65447
+ * within a minute of a two-field patch.
65448
+ *
65449
+ * So every defaulted field is re-declared here WITHOUT its default. The
65450
+ * inner defaults still apply when the caller DOES send the key — `{}` for
65451
+ * conditions remains a real instruction ("clear them") — and only the
65452
+ * absent key is now genuinely absent.
65453
+ */
65454
+ enabled: boolean().optional(),
65455
+ conditions: NcConditionsSchema.optional(),
65456
+ media: NcMediaPolicySchema.optional(),
65457
+ throttle: NcThrottleSchema.optional(),
65458
+ priority: number().int().min(1).max(5).optional()
65459
+ });
65198
65460
  /** A persisted rule. */
65199
65461
  var NcRuleSchema = NcRuleInputSchema.extend({
65200
65462
  id: string(),
@@ -65495,6 +65757,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
65495
65757
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
65496
65758
  * copy would lie the first time a rule is disabled.
65497
65759
  */
65760
+ /**
65761
+ * Why a device a mode NAMES is nonetheless not armed by it.
65762
+ *
65763
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
65764
+ * per-camera notification switch the Notification Center already owns,
65765
+ * `detection-off` is the device's own detection binding being inactive, and
65766
+ * `offline` is the device manager's liveness. A fourth reason would mean a
65767
+ * fourth authority, and inventing one here is how a panel starts disagreeing
65768
+ * with the switches the operator actually used.
65769
+ */
65770
+ var NcAlarmSkipReasonSchema = _enum([
65771
+ "muted",
65772
+ "detection-off",
65773
+ "offline"
65774
+ ]);
65775
+ var NcAlarmSkippedDeviceSchema = object({
65776
+ deviceId: number().int(),
65777
+ reason: NcAlarmSkipReasonSchema
65778
+ });
65498
65779
  var NcAlarmModeCoverageSchema = object({
65499
65780
  mode: AlarmArmModeSchema,
65500
65781
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -65502,7 +65783,18 @@ var NcAlarmModeCoverageSchema = object({
65502
65783
  /** At least one covering rule has no device scope, so the mode covers all. */
65503
65784
  allDevices: boolean(),
65504
65785
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
65505
- deviceIds: array(number().int())
65786
+ deviceIds: array(number().int()),
65787
+ /**
65788
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
65789
+ * excludes it.
65790
+ *
65791
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
65792
+ * twelve makes it false in exactly the way nobody notices until an incident.
65793
+ * Defaulted to `[]` so a coverage answer computed before this field existed
65794
+ * still parses as "nothing known to be skipped" rather than failing the whole
65795
+ * alarm tab.
65796
+ */
65797
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
65506
65798
  });
65507
65799
  var NcAlarmConfigSchema = object({
65508
65800
  /**
@@ -68334,9 +68626,16 @@ var CameraStatusSchema = object({
68334
68626
  audio: CameraAudioStatusSchema.nullable(),
68335
68627
  recording: CameraRecordingStatusSchema.nullable(),
68336
68628
  /**
68337
- * Per-camera function switches an OPERATOR has turned off
68629
+ * Per-camera functions an OPERATOR has turned off
68338
68630
  * ([D61](../../../../docs/decisions/adr-0067.md)).
68339
68631
  *
68632
+ * Composed from the AUTHORITIES themselves — the wrapper bindings,
68633
+ * `RecordingConfig.enabled`, the notification mute, the broker's audio
68634
+ * policy, the camera's own microphone — via `composeSwitchedOff`, not from
68635
+ * the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
68636
+ * The badge outlives the control panel: the panel was a convenience, this is
68637
+ * the difference between a camera being off and a camera being dead.
68638
+ *
68340
68639
  * This is the difference between DISABLED and BROKEN. A camera whose
68341
68640
  * `detection` block reports zero fps and whose `switchedOff` contains
68342
68641
  * `'object-detection'` was switched off by a person; the same camera with an
@@ -75103,7 +75402,19 @@ var RecordingManifestSchema = object({
75103
75402
  * profiles/subtrees/locations on this node). */
75104
75403
  var RecordingDeviceUsageSchema = object({
75105
75404
  deviceId: number(),
75106
- usedBytes: number()
75405
+ usedBytes: number(),
75406
+ /**
75407
+ * Start of this camera's OLDEST indexed segment, across every profile and
75408
+ * location — the "Oldest footage" column in Recordings → Storage, and the
75409
+ * only honest answer to "is retention actually holding?" per camera.
75410
+ *
75411
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
75412
+ * predates this field omits it entirely, and a hub whose types carry the
75413
+ * field must keep validating that older provider's payload: the framework
75414
+ * (types) and the addon ship on different trains, and the addon is usually
75415
+ * the later of the two.
75416
+ */
75417
+ oldestMs: number().nullable().optional()
75107
75418
  });
75108
75419
  /** Recording storage usage + capacity for one storage location. */
75109
75420
  var RecordingLocationUsageSchema = object({
@@ -75131,6 +75442,57 @@ var RecordingStorageUsageSchema = object({
75131
75442
  locations: array(RecordingLocationUsageSchema)
75132
75443
  });
75133
75444
  /**
75445
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
75446
+ *
75447
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
75448
+ * is the operator asking for the EXISTING archive to be brought into line with
75449
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
75450
+ * location, run FIFO behind the single-flight mover.
75451
+ *
75452
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
75453
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
75454
+ * (empty on the plan).
75455
+ */
75456
+ var RecordingRebalanceMoveSchema = object({
75457
+ deviceId: number(),
75458
+ profile: string(),
75459
+ fromLocationId: string(),
75460
+ toLocationId: string(),
75461
+ bytes: number(),
75462
+ files: number().int()
75463
+ });
75464
+ /** Why a pile that is out of place is staying there. Every refusal is
75465
+ * reported: a rebalance that silently drops a camera reads exactly like one
75466
+ * that had nothing to do. */
75467
+ var RecordingRebalanceSkipReasonSchema = _enum([
75468
+ "unassigned",
75469
+ "target-not-writable",
75470
+ "below-threshold",
75471
+ "no-headroom"
75472
+ ]);
75473
+ var RecordingRebalanceSkipSchema = object({
75474
+ deviceId: number(),
75475
+ profile: string(),
75476
+ fromLocationId: string(),
75477
+ /** The location the plan wants; null when the camera has no assignment. */
75478
+ toLocationId: string().nullable(),
75479
+ bytes: number(),
75480
+ reason: RecordingRebalanceSkipReasonSchema
75481
+ });
75482
+ var RecordingRebalancePlanSchema = object({
75483
+ moves: array(RecordingRebalanceMoveSchema),
75484
+ skipped: array(RecordingRebalanceSkipSchema),
75485
+ bytesToMove: number(),
75486
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
75487
+ jobIds: array(string())
75488
+ });
75489
+ var RecordingRebalanceInputSchema = object({
75490
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
75491
+ throttleMbps: number().min(1).max(1e3).optional(),
75492
+ /** Ignore piles smaller than this (default 1 GB). */
75493
+ minMoveGb: number().min(0).optional()
75494
+ });
75495
+ /**
75134
75496
  * Result of locating footage at a wall-clock instant for one device/profile.
75135
75497
  * `segment` carries the covering segment's window; `gap` reports the forward
75136
75498
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -75293,9 +75655,24 @@ method(object({
75293
75655
  }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
75294
75656
  kind: "mutation",
75295
75657
  auth: "admin"
75658
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
75659
+ kind: "mutation",
75660
+ auth: "admin"
75661
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
75662
+ kind: "query",
75663
+ auth: "admin"
75664
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
75665
+ kind: "mutation",
75666
+ auth: "admin"
75667
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
75668
+ kind: "query",
75669
+ auth: "admin"
75670
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
75671
+ kind: "mutation",
75672
+ auth: "admin"
75296
75673
  });
75297
75674
  /**
75298
- * `recordingExport` cap — render a footage time range into a single downloadable
75675
+ * `recording-export` cap — render a footage time range into a single downloadable
75299
75676
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
75300
75677
  * bounded lifetime with a durable history, auto-expiry, and optional
75301
75678
  * delete-after-download.
@@ -75310,10 +75687,42 @@ method(object({
75310
75687
  */
75311
75688
  /** Playback-speed multiplier for the render (1 = realtime). */
75312
75689
  var ExportSpeedSchema = number().min(.25).max(32);
75690
+ /**
75691
+ * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
75692
+ *
75693
+ * Relative and not absolute epoch on purpose: the renderer's frame-select
75694
+ * expression sees ffmpeg's `t`, which starts at 0 for the export's source
75695
+ * playlist. Handing it absolute epochs would make every call site responsible
75696
+ * for the same subtraction, and the one that forgot would emit a filter that
75697
+ * selects nothing — silently, as a uniform timelapse.
75698
+ */
75699
+ var ExportDenseRangeSchema = object({
75700
+ fromSec: number().nonnegative(),
75701
+ toSec: number().nonnegative()
75702
+ }).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
75703
+ /**
75704
+ * Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
75705
+ * listed ranges and at the base `everyMs` everywhere else.
75706
+ *
75707
+ * `everyMs` must be strictly smaller than the base cadence — a dense rate that
75708
+ * is not denser renders a uniform timelapse the operator believes is two-rate.
75709
+ */
75710
+ var ExportDenseSchema = object({
75711
+ everyMs: number().int().positive(),
75712
+ ranges: array(ExportDenseRangeSchema).min(1).max(200)
75713
+ });
75313
75714
  /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
75314
75715
  var ExportTimelapseSchema = object({
75315
75716
  everyMs: number().int().positive(),
75316
- outputFps: number().int().min(1).max(60).optional()
75717
+ outputFps: number().int().min(1).max(60).optional(),
75718
+ /** Optional second, FASTER rate over the intervals that matter. */
75719
+ dense: ExportDenseSchema.optional()
75720
+ }).superRefine((v, ctx) => {
75721
+ if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
75722
+ code: ZodIssueCode.custom,
75723
+ message: "dense.everyMs must be strictly smaller than the base everyMs",
75724
+ path: ["dense", "everyMs"]
75725
+ });
75317
75726
  });
75318
75727
  /**
75319
75728
  * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
@@ -75371,6 +75780,19 @@ var ExportDownloadSchema = object({
75371
75780
  url: string(),
75372
75781
  endpoints: array(string())
75373
75782
  });
75783
+ /**
75784
+ * A finished export's bytes, inline.
75785
+ *
75786
+ * `bytes` is the DECODED length — the number the caller bounds and logs
75787
+ * against, so nobody has to infer it from the base64 length.
75788
+ */
75789
+ var ExportBytesSchema = object({
75790
+ base64: string(),
75791
+ contentType: string(),
75792
+ /** Suggested filename, extension included. */
75793
+ name: string(),
75794
+ bytes: number().int().nonnegative()
75795
+ });
75374
75796
  method(object({
75375
75797
  deviceId: number(),
75376
75798
  profile: string(),
@@ -75395,6 +75817,9 @@ method(object({
75395
75817
  }), method(object({ exportId: string() }), ExportDownloadSchema, {
75396
75818
  kind: "query",
75397
75819
  auth: "protected"
75820
+ }), method(object({ exportId: string() }), ExportBytesSchema, {
75821
+ kind: "query",
75822
+ auth: "protected"
75398
75823
  });
75399
75824
  /**
75400
75825
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -82072,6 +82497,12 @@ Object.freeze({
82072
82497
  addonId: null,
82073
82498
  access: "create"
82074
82499
  },
82500
+ "recording.cancelRelocateJob": {
82501
+ capName: "recording",
82502
+ capScope: "system",
82503
+ addonId: null,
82504
+ access: "create"
82505
+ },
82075
82506
  "recording.cancelStorageMigrationMove": {
82076
82507
  capName: "recording",
82077
82508
  capScope: "system",
@@ -82126,6 +82557,12 @@ Object.freeze({
82126
82557
  addonId: null,
82127
82558
  access: "view"
82128
82559
  },
82560
+ "recording.listRelocateJobs": {
82561
+ capName: "recording",
82562
+ capScope: "system",
82563
+ addonId: null,
82564
+ access: "view"
82565
+ },
82129
82566
  "recording.locateSegment": {
82130
82567
  capName: "recording",
82131
82568
  capScope: "system",
@@ -82138,6 +82575,12 @@ Object.freeze({
82138
82575
  addonId: null,
82139
82576
  access: "create"
82140
82577
  },
82578
+ "recording.planStorageRebalance": {
82579
+ capName: "recording",
82580
+ capScope: "system",
82581
+ addonId: null,
82582
+ access: "view"
82583
+ },
82141
82584
  "recording.pruneFootage": {
82142
82585
  capName: "recording",
82143
82586
  capScope: "system",
@@ -82162,6 +82605,12 @@ Object.freeze({
82162
82605
  addonId: null,
82163
82606
  access: "create"
82164
82607
  },
82608
+ "recording.relocateFootage": {
82609
+ capName: "recording",
82610
+ capScope: "system",
82611
+ addonId: null,
82612
+ access: "create"
82613
+ },
82165
82614
  "recording.renderClip": {
82166
82615
  capName: "recording",
82167
82616
  capScope: "system",
@@ -82198,38 +82647,50 @@ Object.freeze({
82198
82647
  addonId: null,
82199
82648
  access: "create"
82200
82649
  },
82650
+ "recording.startStorageRebalance": {
82651
+ capName: "recording",
82652
+ capScope: "system",
82653
+ addonId: null,
82654
+ access: "create"
82655
+ },
82201
82656
  "recordingExport.cancelExport": {
82202
- capName: "recordingExport",
82657
+ capName: "recording-export",
82203
82658
  capScope: "system",
82204
82659
  addonId: null,
82205
82660
  access: "create"
82206
82661
  },
82207
82662
  "recordingExport.createExport": {
82208
- capName: "recordingExport",
82663
+ capName: "recording-export",
82209
82664
  capScope: "system",
82210
82665
  addonId: null,
82211
82666
  access: "create"
82212
82667
  },
82213
82668
  "recordingExport.deleteExport": {
82214
- capName: "recordingExport",
82669
+ capName: "recording-export",
82215
82670
  capScope: "system",
82216
82671
  addonId: null,
82217
82672
  access: "delete"
82218
82673
  },
82219
82674
  "recordingExport.getDownloadUrl": {
82220
- capName: "recordingExport",
82675
+ capName: "recording-export",
82221
82676
  capScope: "system",
82222
82677
  addonId: null,
82223
82678
  access: "view"
82224
82679
  },
82225
82680
  "recordingExport.getExport": {
82226
- capName: "recordingExport",
82681
+ capName: "recording-export",
82227
82682
  capScope: "system",
82228
82683
  addonId: null,
82229
82684
  access: "view"
82230
82685
  },
82231
82686
  "recordingExport.listExports": {
82232
- capName: "recordingExport",
82687
+ capName: "recording-export",
82688
+ capScope: "system",
82689
+ addonId: null,
82690
+ access: "view"
82691
+ },
82692
+ "recordingExport.readExportBytes": {
82693
+ capName: "recording-export",
82233
82694
  capScope: "system",
82234
82695
  addonId: null,
82235
82696
  access: "view"
@@ -83606,6 +84067,104 @@ var FramerateField = number().int().min(1).max(60);
83606
84067
  var TargetsField = array(NcRuleTargetSchema).min(1);
83607
84068
  var PriorityField = number().int().min(1).max(5);
83608
84069
  /**
84070
+ * Explicit override of the DENSE sampling cadence, seconds.
84071
+ *
84072
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
84073
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
84074
+ * made that same base 3 s and rendered a person pass as two frames.)
84075
+ *
84076
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
84077
+ * `denseCadenceSec` and played at `framerate` occupies
84078
+ *
84079
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
84080
+ *
84081
+ * 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.
84082
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
84083
+ * and therefore the length of a quiet night, does not move.
84084
+ *
84085
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
84086
+ * the recording has them returns the same frames, requested twice. Must be
84087
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
84088
+ * a uniform video the operator believes is two-rate — and upsert refuses it
84089
+ * rather than letting the export cap reject the render hours after the window.
84090
+ */
84091
+ var DenseCadenceSecField = number().min(.1).max(3600);
84092
+ /**
84093
+ * Minimum seconds of OUTPUT video each detection range must occupy.
84094
+ *
84095
+ * The operator-facing form of the arithmetic above: instead of solving for a
84096
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
84097
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
84098
+ * that range every ~583 ms.
84099
+ *
84100
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
84101
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
84102
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
84103
+ * ranges are sampled denser than they need. Per-range cadences require a cap
84104
+ * schema change and are the tracked follow-up.
84105
+ *
84106
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
84107
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
84108
+ * by real footage, never met by duplicating frames into motion that never
84109
+ * happened.
84110
+ */
84111
+ var MinDwellSecField = number().min(0).max(60);
84112
+ /**
84113
+ * Caption burned into the notification's preview frame.
84114
+ *
84115
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
84116
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
84117
+ * templating dialect for one field would be a second thing to explain.
84118
+ *
84119
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
84120
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
84121
+ * the reason this is not `.min(1)`.
84122
+ */
84123
+ var PreviewTextField = string().max(200);
84124
+ /**
84125
+ * Whether the notification's preview is a STILL or a short animation.
84126
+ *
84127
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
84128
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
84129
+ * night reads better as three seconds of motion than as one frame of it. Both
84130
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
84131
+ * simply applies it to a dozen frames sampled across the render and assembles
84132
+ * them.
84133
+ *
84134
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
84135
+ * seeks and a palette pass, and no rule that never asked for one should start
84136
+ * paying that on the deploy that shipped it.
84137
+ *
84138
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
84139
+ */
84140
+ var PreviewModeField = _enum(["image", "gif"]);
84141
+ /**
84142
+ * Which detection classes the notification reports counts for.
84143
+ *
84144
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
84145
+ * plan — no second query — aggregated per class. Absent or empty means "every
84146
+ * class the window actually contained", which is what an operator who never
84147
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
84148
+ * counts cars all night).
84149
+ *
84150
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
84151
+ * …). An unknown name simply never matches and reports nothing — it is not an
84152
+ * error, because a rule may legitimately name a class this camera's model does
84153
+ * not emit.
84154
+ *
84155
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
84156
+ * - `{{detections}}` — total over the reported classes
84157
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
84158
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
84159
+ * one per class, `count_` + the class name
84160
+ *
84161
+ * With NO custom body template the summary is appended to the derived body, and
84162
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
84163
+ * reads. With a custom template the operator owns every word — nothing is
84164
+ * appended, so `{{detectionSummary}}` is how he asks for it.
84165
+ */
84166
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
84167
+ /**
83609
84168
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
83610
84169
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
83611
84170
  * here (see the ownership note above).
@@ -83625,9 +84184,30 @@ var TimelapseRuleInputSchema = object({
83625
84184
  cadenceSec: CadenceSecField.default(15),
83626
84185
  /** Output frames per second of the assembled mp4 (predecessor parity). */
83627
84186
  framerate: FramerateField.default(10),
84187
+ /**
84188
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
84189
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
84190
+ * field gets.
84191
+ */
84192
+ denseCadenceSec: DenseCadenceSecField.optional(),
84193
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
84194
+ minDwellSec: MinDwellSecField.optional(),
83628
84195
  /** `notification-output` targets the finished video/thumbnail is sent to. */
83629
84196
  targets: TargetsField,
83630
84197
  template: TimelapseTemplateSchema.optional(),
84198
+ /**
84199
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
84200
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
84201
+ *
84202
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
84203
+ * the notification's title/body, and clearing it (`template: null`) must not
84204
+ * silently clear the caption too.
84205
+ */
84206
+ previewText: PreviewTextField.optional(),
84207
+ /** Still or animation — see {@link PreviewModeField}. */
84208
+ previewMode: PreviewModeField.default("image"),
84209
+ /** Classes the notification counts — see {@link ReportClassesField}. */
84210
+ reportClasses: ReportClassesField.optional(),
83631
84211
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
83632
84212
  priority: PriorityField.default(3)
83633
84213
  });
@@ -83638,8 +84218,13 @@ object({
83638
84218
  schedule: NcScheduleSchema.optional(),
83639
84219
  cadenceSec: CadenceSecField.optional(),
83640
84220
  framerate: FramerateField.optional(),
84221
+ denseCadenceSec: DenseCadenceSecField.optional(),
84222
+ minDwellSec: MinDwellSecField.optional(),
83641
84223
  targets: TargetsField.optional(),
83642
84224
  template: TimelapseTemplateSchema.nullable().optional(),
84225
+ previewText: PreviewTextField.optional(),
84226
+ previewMode: PreviewModeField.optional(),
84227
+ reportClasses: ReportClassesField.optional(),
83643
84228
  priority: PriorityField.optional()
83644
84229
  });
83645
84230
  TimelapseRuleInputSchema.extend({
@@ -83651,10 +84236,28 @@ TimelapseRuleInputSchema.extend({
83651
84236
  */
83652
84237
  ownerUserId: string().optional(),
83653
84238
  /**
83654
- * Epoch-ms of the last successful generation the 1-hour re-generation
83655
- * guard's durable state (predecessor parity). Absent = never generated.
84239
+ * Epoch-ms of the NEWEST successful generation across every camera of this
84240
+ * rule. What a UI shows, and the compatibility floor for
84241
+ * {@link readTimelapseGeneratedAt}. Absent = never generated.
83656
84242
  */
83657
84243
  lastGeneratedAt: number().optional(),
84244
+ /**
84245
+ * PER-CAMERA generation state, keyed by `String(deviceId)` — the
84246
+ * re-generation guard's real durable state.
84247
+ *
84248
+ * One rule covers several cameras and each renders its own video, so a rule
84249
+ * -wide stamp is wrong in the direction that DESTROYS work: camera A
84250
+ * succeeding at 06:05 tells camera B, whose render failed, that it is
84251
+ * already done — and B's night is gone for good, because the window will not
84252
+ * come back.
84253
+ *
84254
+ * ADDITIVE, so the migration is free: a row written before this field simply
84255
+ * has no map, and {@link readTimelapseGeneratedAt} falls back to
84256
+ * {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
84257
+ * "never generated" would re-render and re-notify every camera of every rule
84258
+ * once, on the deploy that shipped the map.
84259
+ */
84260
+ generatedByDevice: record(string(), number()).optional(),
83658
84261
  /** userId of the caller who created the rule (server-stamped). */
83659
84262
  createdBy: string(),
83660
84263
  createdAt: number(),