@camstack/addon-matter-broker 0.2.12 → 0.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/addon.js +625 -22
  2. package/dist/addon.mjs +625 -22
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -7233,8 +7233,31 @@ var AdoptionJobSchema = object({
7233
7233
  error: string$2().nullable()
7234
7234
  });
7235
7235
  /**
7236
- * Per-camera FUNCTION SWITCHES — the one coherent on/off surface over the
7237
- * pipeline functions an operator thinks in terms of.
7236
+ * Per-camera FUNCTION SWITCHES.
7237
+ *
7238
+ * ## The aggregate group is being withdrawn — the BADGE is not (D113)
7239
+ *
7240
+ * This file shipped as "the one coherent on/off surface over the pipeline
7241
+ * functions an operator thinks in terms of". The operator's verdict on
7242
+ * 2026-08-12 was that the coherent surface bought complexity and no clarity:
7243
+ * every function already had a settings page of its own, and a second place to
7244
+ * turn it off is a second place to look. Each switch is going back to its own
7245
+ * component's original options — detection to the detection-pipeline wrapper
7246
+ * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
7247
+ * (which was always first-class; the switch was a veneer over
7248
+ * `recording.setDeviceConfig`), notifications to a notification-center
7249
+ * per-device setting, the two camera planes to their own components.
7250
+ *
7251
+ * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
7252
+ * thing that lets a status surface say DISABLED instead of BROKEN, recomposed
7253
+ * straight from the authorities with no group in the middle. That rule was
7254
+ * never about a control panel.
7255
+ *
7256
+ * Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
7257
+ * {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
7258
+ * `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
7259
+ * viewers (v1.0.305) and the admin UI still call it. It is deleted when they
7260
+ * stop; nothing new may be built on it.
7238
7261
  *
7239
7262
  * ## This file adds no state
7240
7263
  *
@@ -7585,7 +7608,15 @@ var RecordingConfigSchema = object({
7585
7608
  * Each completed/failed run also lands one durable ops-log row on its owning
7586
7609
  * addon surface.
7587
7610
  */
7611
+ /**
7612
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
7613
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
7614
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
7615
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
7616
+ * runs at all.
7617
+ */
7588
7618
  var RelocateJobStateSchema = _enum([
7619
+ "queued",
7589
7620
  "running",
7590
7621
  "done",
7591
7622
  "failed",
@@ -7620,6 +7651,15 @@ var RelocateFootageInputSchema = object({
7620
7651
  /** Limits relocation to the logical profile class. Omit only for the
7621
7652
  * pre-orchestration compatibility path. */
7622
7653
  footageClass: RelocateFootageClassSchema.optional(),
7654
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
7655
+ * is what a whole-disk drain means. The rebalance path always sets it: its
7656
+ * unit is a (camera, profile) pile, not a disk. */
7657
+ deviceId: number().int().optional(),
7658
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
7659
+ * Finer than `footageClass`, which cannot separate high from mid — and the
7660
+ * placement plan assigns those two independently, so a rebalance that could
7661
+ * only say "recordings" would move footage the plan never asked to move. */
7662
+ profiles: array(string$2()).optional(),
7623
7663
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7624
7664
  * never allowed to starve live writers. */
7625
7665
  throttleMbps: number().min(1).max(1e3).optional()
@@ -7755,6 +7795,21 @@ var StorageLocationSchema = object({
7755
7795
  nodeId: string$2().optional(),
7756
7796
  isDefault: boolean().default(false),
7757
7797
  isSystem: boolean().default(false),
7798
+ /**
7799
+ * Operator opt-in: whether consumers that BALANCE across several locations
7800
+ * of a type may write here. Recordings reads it today; event media and
7801
+ * backups are the next consumers, which is why the flag lives on the
7802
+ * location rather than in any one addon's store — nothing has to be
7803
+ * extended to add the next consumer.
7804
+ *
7805
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
7806
+ * flag existed reads back with no flag and keeps working exactly as before;
7807
+ * that is the whole compat story, and it is why no migration ships with it.
7808
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
7809
+ * disk must not silently start writing to it); the default of a type is
7810
+ * always stamped `true`.
7811
+ */
7812
+ enabled: boolean().optional(),
7758
7813
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7759
7814
  * for node-local locations it can reach) — never persisted, absent when the
7760
7815
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12373,7 +12428,8 @@ method(object({
12373
12428
  }), EmbeddingResultSchema), method(object({ text: string$2() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12374
12429
  /**
12375
12430
  * filesystem-browse — per-node capability for browsing the node's local
12376
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
12431
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12432
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
12377
12433
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12378
12434
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12379
12435
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -14214,6 +14270,13 @@ var MaskGridDimsSchema = object({
14214
14270
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
14215
14271
  * this one field keeps the schema additive — a rule still declares exactly
14216
14272
  * one trigger.
14273
+ *
14274
+ * AUDIO rules add no member here, for the reason occupancy added none: the
14275
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
14276
+ * mirror.ts` fails the build on a member the app cannot render) and every
14277
+ * member costs a release train. A sustained-sound rule is therefore an
14278
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
14279
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
14217
14280
  */
14218
14281
  var NcDeliverySchema = _enum([
14219
14282
  "immediate",
@@ -14228,15 +14291,32 @@ var NcDeliverySchema = _enum([
14228
14291
  * depend on a provider's raw event name or payload shape.
14229
14292
  */
14230
14293
  var NcSystemEventKindSchema = _enum([
14231
- "camera-online",
14232
- "camera-offline",
14294
+ "device-online",
14295
+ "device-offline",
14296
+ "device-disabled",
14297
+ "device-enabled",
14233
14298
  "stream-online",
14234
14299
  "stream-offline",
14235
14300
  "node-online",
14236
14301
  "node-offline",
14237
14302
  "addon-update-available",
14238
- "server-update-available"
14303
+ "server-update-available",
14304
+ "alarm-triggered",
14305
+ "alarm-armed",
14306
+ "alarm-disarmed",
14307
+ "camera-online",
14308
+ "camera-offline",
14309
+ "camera-disabled",
14310
+ "camera-enabled"
14239
14311
  ]);
14312
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
14313
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
14314
+ "camera-online",
14315
+ "camera-offline",
14316
+ "camera-disabled",
14317
+ "camera-enabled"
14318
+ ]);
14319
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
14240
14320
  /**
14241
14321
  * One coherent system-event condition. `kinds` is the required opt-in safety
14242
14322
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -14245,6 +14325,18 @@ var NcSystemEventKindSchema = _enum([
14245
14325
  var NcSystemEventConditionSchema = object({
14246
14326
  kinds: array(NcSystemEventKindSchema).min(1),
14247
14327
  deviceIds: array(number().int()).min(1).optional(),
14328
+ /**
14329
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
14330
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
14331
+ * is what a liveness rule means when nobody said otherwise.
14332
+ *
14333
+ * This is where "only my cameras" is expressed, and it lives on the rule for
14334
+ * one reason: the intake cannot know which devices this household cares
14335
+ * about, and a producer-side filter is one no operator can change. Fails
14336
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
14337
+ * does not carry) matches no `deviceTypes` list.
14338
+ */
14339
+ deviceTypes: array(string$2().min(1)).min(1).optional(),
14248
14340
  nodeIds: array(string$2().min(1)).min(1).optional(),
14249
14341
  packageNames: array(string$2().min(1)).min(1).optional()
14250
14342
  });
@@ -14295,6 +14387,47 @@ var NcOccupancyConditionSchema = object({
14295
14387
  sustainSeconds: number().int().min(0).max(3600).default(15)
14296
14388
  });
14297
14389
  /**
14390
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14391
+ *
14392
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
14393
+ * reference notifier uses, so an operator moving between them re-uses what
14394
+ * they already know): a rule matches when, over a sampling window of
14395
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14396
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14397
+ *
14398
+ * - `dbThreshold` — its level is at or above this many dBFS (see
14399
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14400
+ * - `labels` — the classifier put at least one of these labels on it.
14401
+ *
14402
+ * Both are OPTIONAL and independent, which is the point of the shape: a
14403
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
14404
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14405
+ * is given** — a window in which every sample is trivially a hit would fire on
14406
+ * silence, so the engine refuses such a condition rather than notifying on
14407
+ * nothing (the schema cannot express "at least one of" without becoming a
14408
+ * ZodEffects the cap path would have to special-case).
14409
+ *
14410
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
14411
+ * must be FULL before it can match — a window that has been open for two
14412
+ * seconds of its ten is 100% of nothing, and firing on it would make
14413
+ * `samplingSeconds` decorative.
14414
+ *
14415
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14416
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
14417
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
14418
+ * an operator who typed `dog` mean the same thing.
14419
+ */
14420
+ var NcAudioConditionSchema = object({
14421
+ /** Audio macro labels; absent = any sound (level-only rule). */
14422
+ labels: array(string$2().min(1)).min(1).optional(),
14423
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14424
+ dbThreshold: number().min(-96).max(0).optional(),
14425
+ /** Percentage of the window's samples that must be hits (1–100). */
14426
+ hitPercent: number().int().min(1).max(100).default(60),
14427
+ /** Length of the sampling window in seconds. */
14428
+ samplingSeconds: number().int().min(1).max(300).default(10)
14429
+ });
14430
+ /**
14298
14431
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
14299
14432
  *
14300
14433
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14567,7 +14700,33 @@ var NcConditionsSchema = object({
14567
14700
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14568
14701
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14569
14702
  */
14570
- occupancy: NcOccupancyConditionSchema.optional()
14703
+ occupancy: NcOccupancyConditionSchema.optional(),
14704
+ /**
14705
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
14706
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
14707
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
14708
+ * a window that is not full yet, neither filter given). See
14709
+ * {@link NcAudioCondition}.
14710
+ *
14711
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
14712
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
14713
+ * a detection, a track or a device event (the same fail-closed pairing
14714
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
14715
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
14716
+ * (an `immediate` rule naming an `audio-*` class, one notification per
14717
+ * classified sample) stays exactly as it was for rules that already use it.
14718
+ *
14719
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14720
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14721
+ * (`camstack/src/data/notification-center.ts`, guarded by
14722
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14723
+ * condition fields it does not know when a rule is saved from the phone.
14724
+ * Publishing an editor for a condition the app cannot round-trip is how an
14725
+ * operator loses a rule's conditions by opening it — so the descriptor, the
14726
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
14727
+ * does an audio rule become authorable.
14728
+ */
14729
+ audio: NcAudioConditionSchema.optional()
14571
14730
  });
14572
14731
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14573
14732
  var NcRuleTargetSchema = object({
@@ -14681,6 +14840,73 @@ var NcThrottleSchema = object({
14681
14840
  */
14682
14841
  granularity: NcThrottleGranularitySchema.optional()
14683
14842
  });
14843
+ /**
14844
+ * How long the confirm gate may hold ONE notification, and how big the picture
14845
+ * it judges may be.
14846
+ *
14847
+ * The clamp is the product decision, not a coincidence of the model: p50 was
14848
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
14849
+ * arrives after the visitor has gone is not a notification. 448 px was enough
14850
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
14851
+ * tokens for pixels the model pools away.
14852
+ */
14853
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
14854
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
14855
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
14856
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
14857
+ var NcConfirmExpectSchema = object({
14858
+ op: _enum([
14859
+ ">=",
14860
+ ">",
14861
+ "<=",
14862
+ "<",
14863
+ "=="
14864
+ ]),
14865
+ count: number().int().min(0).max(1e3)
14866
+ });
14867
+ /**
14868
+ * AI CONFIRM — a vision model looks at the picture this notification is about
14869
+ * to ship and says whether it agrees with the rule.
14870
+ *
14871
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
14872
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
14873
+ * on the operator's phone is not a verdict about this notification.
14874
+ *
14875
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
14876
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
14877
+ * the default and every fail-open is COUNTED, because a gate that always fails
14878
+ * open looks in the log exactly like a gate that works.
14879
+ *
14880
+ * Every field is `.optional()` rather than relied on as a Zod default at the
14881
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
14882
+ * production failures in one day), so the gate reads absent as the constant
14883
+ * above rather than trusting a parse it may never have seen.
14884
+ */
14885
+ var NcConfirmSchema = object({
14886
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
14887
+ * same thing, and both mean "deliver exactly as before". */
14888
+ enabled: boolean().default(false),
14889
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
14890
+ profileId: string$2().optional(),
14891
+ /**
14892
+ * The operator's question, in his own words. Absent = a question derived
14893
+ * from the rule (its class and its expectation).
14894
+ *
14895
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
14896
+ * banners, signage and plates as instructions if you let them reach the
14897
+ * prompt — proven live — so the authoritative contract stays in the system
14898
+ * turn and only rule-authored words land here.
14899
+ */
14900
+ prompt: string$2().max(1e3).optional(),
14901
+ /** Fire only when the model's count satisfies this. Absent = the model's
14902
+ * own boolean verdict decides. */
14903
+ expect: NcConfirmExpectSchema.optional(),
14904
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
14905
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
14906
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
14907
+ /** Longest edge the judged image is downscaled to before it is sent. */
14908
+ maxImagePx: number().int().min(64).max(2048).default(448)
14909
+ });
14684
14910
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14685
14911
  var NcRuleInputSchema = object({
14686
14912
  name: string$2().min(1).max(200),
@@ -14741,7 +14967,13 @@ var NcRuleInputSchema = object({
14741
14967
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14742
14968
  * shape as every other actuation.
14743
14969
  */
14744
- actions: NcRuleActionsSchema.optional()
14970
+ actions: NcRuleActionsSchema.optional(),
14971
+ /**
14972
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
14973
+ * a rule that predates the gate must keep delivering byte-for-byte as it
14974
+ * did, and absent is the only way to say that without a migration.
14975
+ */
14976
+ confirm: NcConfirmSchema.optional()
14745
14977
  });
14746
14978
  /**
14747
14979
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14752,7 +14984,37 @@ var NcRuleInputSchema = object({
14752
14984
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14753
14985
  * `updateRule` patch.
14754
14986
  */
14755
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string$2()).optional() });
14987
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
14988
+ disabledTargetIds: array(string$2()).optional(),
14989
+ /**
14990
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
14991
+ *
14992
+ * It makes the key optional to SUPPLY; the parse still materialises the
14993
+ * default when the key is absent. And `NcRuleStore.update` merges with
14994
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
14995
+ * one — which made every partial edit destructive:
14996
+ *
14997
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
14998
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
14999
+ * setEnabled(ruleId, false) → conditions reset to `{}`
15000
+ *
15001
+ * A rule scoped to one camera and one zone silently became a rule that
15002
+ * matches EVERY event on EVERY camera, and lost its `media` policy
15003
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
15004
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
15005
+ * within a minute of a two-field patch.
15006
+ *
15007
+ * So every defaulted field is re-declared here WITHOUT its default. The
15008
+ * inner defaults still apply when the caller DOES send the key — `{}` for
15009
+ * conditions remains a real instruction ("clear them") — and only the
15010
+ * absent key is now genuinely absent.
15011
+ */
15012
+ enabled: boolean().optional(),
15013
+ conditions: NcConditionsSchema.optional(),
15014
+ media: NcMediaPolicySchema.optional(),
15015
+ throttle: NcThrottleSchema.optional(),
15016
+ priority: number().int().min(1).max(5).optional()
15017
+ });
14756
15018
  /** A persisted rule. */
14757
15019
  var NcRuleSchema = NcRuleInputSchema.extend({
14758
15020
  id: string$2(),
@@ -15053,6 +15315,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
15053
15315
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
15054
15316
  * copy would lie the first time a rule is disabled.
15055
15317
  */
15318
+ /**
15319
+ * Why a device a mode NAMES is nonetheless not armed by it.
15320
+ *
15321
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
15322
+ * per-camera notification switch the Notification Center already owns,
15323
+ * `detection-off` is the device's own detection binding being inactive, and
15324
+ * `offline` is the device manager's liveness. A fourth reason would mean a
15325
+ * fourth authority, and inventing one here is how a panel starts disagreeing
15326
+ * with the switches the operator actually used.
15327
+ */
15328
+ var NcAlarmSkipReasonSchema = _enum([
15329
+ "muted",
15330
+ "detection-off",
15331
+ "offline"
15332
+ ]);
15333
+ var NcAlarmSkippedDeviceSchema = object({
15334
+ deviceId: number().int(),
15335
+ reason: NcAlarmSkipReasonSchema
15336
+ });
15056
15337
  var NcAlarmModeCoverageSchema = object({
15057
15338
  mode: AlarmArmModeSchema,
15058
15339
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -15060,7 +15341,18 @@ var NcAlarmModeCoverageSchema = object({
15060
15341
  /** At least one covering rule has no device scope, so the mode covers all. */
15061
15342
  allDevices: boolean(),
15062
15343
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
15063
- deviceIds: array(number().int())
15344
+ deviceIds: array(number().int()),
15345
+ /**
15346
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
15347
+ * excludes it.
15348
+ *
15349
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
15350
+ * twelve makes it false in exactly the way nobody notices until an incident.
15351
+ * Defaulted to `[]` so a coverage answer computed before this field existed
15352
+ * still parses as "nothing known to be skipped" rather than failing the whole
15353
+ * alarm tab.
15354
+ */
15355
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
15064
15356
  });
15065
15357
  var NcAlarmConfigSchema = object({
15066
15358
  /**
@@ -17892,9 +18184,16 @@ var CameraStatusSchema = object({
17892
18184
  audio: CameraAudioStatusSchema.nullable(),
17893
18185
  recording: CameraRecordingStatusSchema.nullable(),
17894
18186
  /**
17895
- * Per-camera function switches an OPERATOR has turned off
18187
+ * Per-camera functions an OPERATOR has turned off
17896
18188
  * ([D61](../../../../docs/decisions/adr-0067.md)).
17897
18189
  *
18190
+ * Composed from the AUTHORITIES themselves — the wrapper bindings,
18191
+ * `RecordingConfig.enabled`, the notification mute, the broker's audio
18192
+ * policy, the camera's own microphone — via `composeSwitchedOff`, not from
18193
+ * the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
18194
+ * The badge outlives the control panel: the panel was a convenience, this is
18195
+ * the difference between a camera being off and a camera being dead.
18196
+ *
17898
18197
  * This is the difference between DISABLED and BROKEN. A camera whose
17899
18198
  * `detection` block reports zero fps and whose `switchedOff` contains
17900
18199
  * `'object-detection'` was switched off by a person; the same camera with an
@@ -24653,7 +24952,19 @@ var RecordingManifestSchema = object({
24653
24952
  * profiles/subtrees/locations on this node). */
24654
24953
  var RecordingDeviceUsageSchema = object({
24655
24954
  deviceId: number(),
24656
- usedBytes: number()
24955
+ usedBytes: number(),
24956
+ /**
24957
+ * Start of this camera's OLDEST indexed segment, across every profile and
24958
+ * location — the "Oldest footage" column in Recordings → Storage, and the
24959
+ * only honest answer to "is retention actually holding?" per camera.
24960
+ *
24961
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
24962
+ * predates this field omits it entirely, and a hub whose types carry the
24963
+ * field must keep validating that older provider's payload: the framework
24964
+ * (types) and the addon ship on different trains, and the addon is usually
24965
+ * the later of the two.
24966
+ */
24967
+ oldestMs: number().nullable().optional()
24657
24968
  });
24658
24969
  /** Recording storage usage + capacity for one storage location. */
24659
24970
  var RecordingLocationUsageSchema = object({
@@ -24681,6 +24992,57 @@ var RecordingStorageUsageSchema = object({
24681
24992
  locations: array(RecordingLocationUsageSchema)
24682
24993
  });
24683
24994
  /**
24995
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
24996
+ *
24997
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
24998
+ * is the operator asking for the EXISTING archive to be brought into line with
24999
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
25000
+ * location, run FIFO behind the single-flight mover.
25001
+ *
25002
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
25003
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
25004
+ * (empty on the plan).
25005
+ */
25006
+ var RecordingRebalanceMoveSchema = object({
25007
+ deviceId: number(),
25008
+ profile: string$2(),
25009
+ fromLocationId: string$2(),
25010
+ toLocationId: string$2(),
25011
+ bytes: number(),
25012
+ files: number().int()
25013
+ });
25014
+ /** Why a pile that is out of place is staying there. Every refusal is
25015
+ * reported: a rebalance that silently drops a camera reads exactly like one
25016
+ * that had nothing to do. */
25017
+ var RecordingRebalanceSkipReasonSchema = _enum([
25018
+ "unassigned",
25019
+ "target-not-writable",
25020
+ "below-threshold",
25021
+ "no-headroom"
25022
+ ]);
25023
+ var RecordingRebalanceSkipSchema = object({
25024
+ deviceId: number(),
25025
+ profile: string$2(),
25026
+ fromLocationId: string$2(),
25027
+ /** The location the plan wants; null when the camera has no assignment. */
25028
+ toLocationId: string$2().nullable(),
25029
+ bytes: number(),
25030
+ reason: RecordingRebalanceSkipReasonSchema
25031
+ });
25032
+ var RecordingRebalancePlanSchema = object({
25033
+ moves: array(RecordingRebalanceMoveSchema),
25034
+ skipped: array(RecordingRebalanceSkipSchema),
25035
+ bytesToMove: number(),
25036
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
25037
+ jobIds: array(string$2())
25038
+ });
25039
+ var RecordingRebalanceInputSchema = object({
25040
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
25041
+ throttleMbps: number().min(1).max(1e3).optional(),
25042
+ /** Ignore piles smaller than this (default 1 GB). */
25043
+ minMoveGb: number().min(0).optional()
25044
+ });
25045
+ /**
24684
25046
  * Result of locating footage at a wall-clock instant for one device/profile.
24685
25047
  * `segment` carries the covering segment's window; `gap` reports the forward
24686
25048
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -24843,9 +25205,24 @@ method(object({
24843
25205
  }), method(object({ jobId: string$2() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string$2() }), object({ cancelled: boolean() }), {
24844
25206
  kind: "mutation",
24845
25207
  auth: "admin"
25208
+ }), method(RelocateFootageInputSchema, object({ jobId: string$2() }), {
25209
+ kind: "mutation",
25210
+ auth: "admin"
25211
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
25212
+ kind: "query",
25213
+ auth: "admin"
25214
+ }), method(object({ jobId: string$2() }), object({ cancelled: boolean() }), {
25215
+ kind: "mutation",
25216
+ auth: "admin"
25217
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25218
+ kind: "query",
25219
+ auth: "admin"
25220
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25221
+ kind: "mutation",
25222
+ auth: "admin"
24846
25223
  });
24847
25224
  /**
24848
- * `recordingExport` cap — render a footage time range into a single downloadable
25225
+ * `recording-export` cap — render a footage time range into a single downloadable
24849
25226
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
24850
25227
  * bounded lifetime with a durable history, auto-expiry, and optional
24851
25228
  * delete-after-download.
@@ -24860,10 +25237,42 @@ method(object({
24860
25237
  */
24861
25238
  /** Playback-speed multiplier for the render (1 = realtime). */
24862
25239
  var ExportSpeedSchema = number().min(.25).max(32);
25240
+ /**
25241
+ * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
25242
+ *
25243
+ * Relative and not absolute epoch on purpose: the renderer's frame-select
25244
+ * expression sees ffmpeg's `t`, which starts at 0 for the export's source
25245
+ * playlist. Handing it absolute epochs would make every call site responsible
25246
+ * for the same subtraction, and the one that forgot would emit a filter that
25247
+ * selects nothing — silently, as a uniform timelapse.
25248
+ */
25249
+ var ExportDenseRangeSchema = object({
25250
+ fromSec: number().nonnegative(),
25251
+ toSec: number().nonnegative()
25252
+ }).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
25253
+ /**
25254
+ * Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
25255
+ * listed ranges and at the base `everyMs` everywhere else.
25256
+ *
25257
+ * `everyMs` must be strictly smaller than the base cadence — a dense rate that
25258
+ * is not denser renders a uniform timelapse the operator believes is two-rate.
25259
+ */
25260
+ var ExportDenseSchema = object({
25261
+ everyMs: number().int().positive(),
25262
+ ranges: array(ExportDenseRangeSchema).min(1).max(200)
25263
+ });
24863
25264
  /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
24864
25265
  var ExportTimelapseSchema = object({
24865
25266
  everyMs: number().int().positive(),
24866
- outputFps: number().int().min(1).max(60).optional()
25267
+ outputFps: number().int().min(1).max(60).optional(),
25268
+ /** Optional second, FASTER rate over the intervals that matter. */
25269
+ dense: ExportDenseSchema.optional()
25270
+ }).superRefine((v, ctx) => {
25271
+ if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
25272
+ code: ZodIssueCode.custom,
25273
+ message: "dense.everyMs must be strictly smaller than the base everyMs",
25274
+ path: ["dense", "everyMs"]
25275
+ });
24867
25276
  });
24868
25277
  /**
24869
25278
  * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
@@ -24921,6 +25330,19 @@ var ExportDownloadSchema = object({
24921
25330
  url: string$2(),
24922
25331
  endpoints: array(string$2())
24923
25332
  });
25333
+ /**
25334
+ * A finished export's bytes, inline.
25335
+ *
25336
+ * `bytes` is the DECODED length — the number the caller bounds and logs
25337
+ * against, so nobody has to infer it from the base64 length.
25338
+ */
25339
+ var ExportBytesSchema = object({
25340
+ base64: string$2(),
25341
+ contentType: string$2(),
25342
+ /** Suggested filename, extension included. */
25343
+ name: string$2(),
25344
+ bytes: number().int().nonnegative()
25345
+ });
24924
25346
  method(object({
24925
25347
  deviceId: number(),
24926
25348
  profile: string$2(),
@@ -24945,6 +25367,9 @@ method(object({
24945
25367
  }), method(object({ exportId: string$2() }), ExportDownloadSchema, {
24946
25368
  kind: "query",
24947
25369
  auth: "protected"
25370
+ }), method(object({ exportId: string$2() }), ExportBytesSchema, {
25371
+ kind: "query",
25372
+ auth: "protected"
24948
25373
  });
24949
25374
  /**
24950
25375
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -31622,6 +32047,12 @@ Object.freeze({
31622
32047
  addonId: null,
31623
32048
  access: "create"
31624
32049
  },
32050
+ "recording.cancelRelocateJob": {
32051
+ capName: "recording",
32052
+ capScope: "system",
32053
+ addonId: null,
32054
+ access: "create"
32055
+ },
31625
32056
  "recording.cancelStorageMigrationMove": {
31626
32057
  capName: "recording",
31627
32058
  capScope: "system",
@@ -31676,6 +32107,12 @@ Object.freeze({
31676
32107
  addonId: null,
31677
32108
  access: "view"
31678
32109
  },
32110
+ "recording.listRelocateJobs": {
32111
+ capName: "recording",
32112
+ capScope: "system",
32113
+ addonId: null,
32114
+ access: "view"
32115
+ },
31679
32116
  "recording.locateSegment": {
31680
32117
  capName: "recording",
31681
32118
  capScope: "system",
@@ -31688,6 +32125,12 @@ Object.freeze({
31688
32125
  addonId: null,
31689
32126
  access: "create"
31690
32127
  },
32128
+ "recording.planStorageRebalance": {
32129
+ capName: "recording",
32130
+ capScope: "system",
32131
+ addonId: null,
32132
+ access: "view"
32133
+ },
31691
32134
  "recording.pruneFootage": {
31692
32135
  capName: "recording",
31693
32136
  capScope: "system",
@@ -31712,6 +32155,12 @@ Object.freeze({
31712
32155
  addonId: null,
31713
32156
  access: "create"
31714
32157
  },
32158
+ "recording.relocateFootage": {
32159
+ capName: "recording",
32160
+ capScope: "system",
32161
+ addonId: null,
32162
+ access: "create"
32163
+ },
31715
32164
  "recording.renderClip": {
31716
32165
  capName: "recording",
31717
32166
  capScope: "system",
@@ -31748,38 +32197,50 @@ Object.freeze({
31748
32197
  addonId: null,
31749
32198
  access: "create"
31750
32199
  },
32200
+ "recording.startStorageRebalance": {
32201
+ capName: "recording",
32202
+ capScope: "system",
32203
+ addonId: null,
32204
+ access: "create"
32205
+ },
31751
32206
  "recordingExport.cancelExport": {
31752
- capName: "recordingExport",
32207
+ capName: "recording-export",
31753
32208
  capScope: "system",
31754
32209
  addonId: null,
31755
32210
  access: "create"
31756
32211
  },
31757
32212
  "recordingExport.createExport": {
31758
- capName: "recordingExport",
32213
+ capName: "recording-export",
31759
32214
  capScope: "system",
31760
32215
  addonId: null,
31761
32216
  access: "create"
31762
32217
  },
31763
32218
  "recordingExport.deleteExport": {
31764
- capName: "recordingExport",
32219
+ capName: "recording-export",
31765
32220
  capScope: "system",
31766
32221
  addonId: null,
31767
32222
  access: "delete"
31768
32223
  },
31769
32224
  "recordingExport.getDownloadUrl": {
31770
- capName: "recordingExport",
32225
+ capName: "recording-export",
31771
32226
  capScope: "system",
31772
32227
  addonId: null,
31773
32228
  access: "view"
31774
32229
  },
31775
32230
  "recordingExport.getExport": {
31776
- capName: "recordingExport",
32231
+ capName: "recording-export",
31777
32232
  capScope: "system",
31778
32233
  addonId: null,
31779
32234
  access: "view"
31780
32235
  },
31781
32236
  "recordingExport.listExports": {
31782
- capName: "recordingExport",
32237
+ capName: "recording-export",
32238
+ capScope: "system",
32239
+ addonId: null,
32240
+ access: "view"
32241
+ },
32242
+ "recordingExport.readExportBytes": {
32243
+ capName: "recording-export",
31783
32244
  capScope: "system",
31784
32245
  addonId: null,
31785
32246
  access: "view"
@@ -33156,6 +33617,104 @@ var FramerateField = number().int().min(1).max(60);
33156
33617
  var TargetsField = array(NcRuleTargetSchema).min(1);
33157
33618
  var PriorityField = number().int().min(1).max(5);
33158
33619
  /**
33620
+ * Explicit override of the DENSE sampling cadence, seconds.
33621
+ *
33622
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
33623
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
33624
+ * made that same base 3 s and rendered a person pass as two frames.)
33625
+ *
33626
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
33627
+ * `denseCadenceSec` and played at `framerate` occupies
33628
+ *
33629
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
33630
+ *
33631
+ * 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.
33632
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
33633
+ * and therefore the length of a quiet night, does not move.
33634
+ *
33635
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
33636
+ * the recording has them returns the same frames, requested twice. Must be
33637
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
33638
+ * a uniform video the operator believes is two-rate — and upsert refuses it
33639
+ * rather than letting the export cap reject the render hours after the window.
33640
+ */
33641
+ var DenseCadenceSecField = number().min(.1).max(3600);
33642
+ /**
33643
+ * Minimum seconds of OUTPUT video each detection range must occupy.
33644
+ *
33645
+ * The operator-facing form of the arithmetic above: instead of solving for a
33646
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
33647
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
33648
+ * that range every ~583 ms.
33649
+ *
33650
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
33651
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
33652
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
33653
+ * ranges are sampled denser than they need. Per-range cadences require a cap
33654
+ * schema change and are the tracked follow-up.
33655
+ *
33656
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
33657
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
33658
+ * by real footage, never met by duplicating frames into motion that never
33659
+ * happened.
33660
+ */
33661
+ var MinDwellSecField = number().min(0).max(60);
33662
+ /**
33663
+ * Caption burned into the notification's preview frame.
33664
+ *
33665
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
33666
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
33667
+ * templating dialect for one field would be a second thing to explain.
33668
+ *
33669
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
33670
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
33671
+ * the reason this is not `.min(1)`.
33672
+ */
33673
+ var PreviewTextField = string$2().max(200);
33674
+ /**
33675
+ * Whether the notification's preview is a STILL or a short animation.
33676
+ *
33677
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
33678
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
33679
+ * night reads better as three seconds of motion than as one frame of it. Both
33680
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
33681
+ * simply applies it to a dozen frames sampled across the render and assembles
33682
+ * them.
33683
+ *
33684
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
33685
+ * seeks and a palette pass, and no rule that never asked for one should start
33686
+ * paying that on the deploy that shipped it.
33687
+ *
33688
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
33689
+ */
33690
+ var PreviewModeField = _enum(["image", "gif"]);
33691
+ /**
33692
+ * Which detection classes the notification reports counts for.
33693
+ *
33694
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
33695
+ * plan — no second query — aggregated per class. Absent or empty means "every
33696
+ * class the window actually contained", which is what an operator who never
33697
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
33698
+ * counts cars all night).
33699
+ *
33700
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
33701
+ * …). An unknown name simply never matches and reports nothing — it is not an
33702
+ * error, because a rule may legitimately name a class this camera's model does
33703
+ * not emit.
33704
+ *
33705
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
33706
+ * - `{{detections}}` — total over the reported classes
33707
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
33708
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
33709
+ * one per class, `count_` + the class name
33710
+ *
33711
+ * With NO custom body template the summary is appended to the derived body, and
33712
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
33713
+ * reads. With a custom template the operator owns every word — nothing is
33714
+ * appended, so `{{detectionSummary}}` is how he asks for it.
33715
+ */
33716
+ var ReportClassesField = array(string$2().min(1).max(40)).max(20);
33717
+ /**
33159
33718
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
33160
33719
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
33161
33720
  * here (see the ownership note above).
@@ -33175,9 +33734,30 @@ var TimelapseRuleInputSchema = object({
33175
33734
  cadenceSec: CadenceSecField.default(15),
33176
33735
  /** Output frames per second of the assembled mp4 (predecessor parity). */
33177
33736
  framerate: FramerateField.default(10),
33737
+ /**
33738
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
33739
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
33740
+ * field gets.
33741
+ */
33742
+ denseCadenceSec: DenseCadenceSecField.optional(),
33743
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
33744
+ minDwellSec: MinDwellSecField.optional(),
33178
33745
  /** `notification-output` targets the finished video/thumbnail is sent to. */
33179
33746
  targets: TargetsField,
33180
33747
  template: TimelapseTemplateSchema.optional(),
33748
+ /**
33749
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
33750
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
33751
+ *
33752
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
33753
+ * the notification's title/body, and clearing it (`template: null`) must not
33754
+ * silently clear the caption too.
33755
+ */
33756
+ previewText: PreviewTextField.optional(),
33757
+ /** Still or animation — see {@link PreviewModeField}. */
33758
+ previewMode: PreviewModeField.default("image"),
33759
+ /** Classes the notification counts — see {@link ReportClassesField}. */
33760
+ reportClasses: ReportClassesField.optional(),
33181
33761
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
33182
33762
  priority: PriorityField.default(3)
33183
33763
  });
@@ -33188,8 +33768,13 @@ object({
33188
33768
  schedule: NcScheduleSchema.optional(),
33189
33769
  cadenceSec: CadenceSecField.optional(),
33190
33770
  framerate: FramerateField.optional(),
33771
+ denseCadenceSec: DenseCadenceSecField.optional(),
33772
+ minDwellSec: MinDwellSecField.optional(),
33191
33773
  targets: TargetsField.optional(),
33192
33774
  template: TimelapseTemplateSchema.nullable().optional(),
33775
+ previewText: PreviewTextField.optional(),
33776
+ previewMode: PreviewModeField.optional(),
33777
+ reportClasses: ReportClassesField.optional(),
33193
33778
  priority: PriorityField.optional()
33194
33779
  });
33195
33780
  TimelapseRuleInputSchema.extend({
@@ -33201,10 +33786,28 @@ TimelapseRuleInputSchema.extend({
33201
33786
  */
33202
33787
  ownerUserId: string$2().optional(),
33203
33788
  /**
33204
- * Epoch-ms of the last successful generation — the 1-hour re-generation
33205
- * guard's durable state (predecessor parity). Absent = never generated.
33789
+ * Epoch-ms of the NEWEST successful generation across every camera of this
33790
+ * rule. What a UI shows, and the compatibility floor for
33791
+ * {@link readTimelapseGeneratedAt}. Absent = never generated.
33206
33792
  */
33207
33793
  lastGeneratedAt: number().optional(),
33794
+ /**
33795
+ * PER-CAMERA generation state, keyed by `String(deviceId)` — the
33796
+ * re-generation guard's real durable state.
33797
+ *
33798
+ * One rule covers several cameras and each renders its own video, so a rule
33799
+ * -wide stamp is wrong in the direction that DESTROYS work: camera A
33800
+ * succeeding at 06:05 tells camera B, whose render failed, that it is
33801
+ * already done — and B's night is gone for good, because the window will not
33802
+ * come back.
33803
+ *
33804
+ * ADDITIVE, so the migration is free: a row written before this field simply
33805
+ * has no map, and {@link readTimelapseGeneratedAt} falls back to
33806
+ * {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
33807
+ * "never generated" would re-render and re-notify every camera of every rule
33808
+ * once, on the deploy that shipped the map.
33809
+ */
33810
+ generatedByDevice: record(string$2(), number()).optional(),
33208
33811
  /** userId of the caller who created the rule (server-stamped). */
33209
33812
  createdBy: string$2(),
33210
33813
  createdAt: number(),