@camstack/addon-tailscale 1.2.12 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7188,8 +7188,31 @@ var AdoptionJobSchema = object({
7188
7188
  error: string().nullable()
7189
7189
  });
7190
7190
  /**
7191
- * Per-camera FUNCTION SWITCHES — the one coherent on/off surface over the
7192
- * pipeline functions an operator thinks in terms of.
7191
+ * Per-camera FUNCTION SWITCHES.
7192
+ *
7193
+ * ## The aggregate group is being withdrawn — the BADGE is not (D113)
7194
+ *
7195
+ * This file shipped as "the one coherent on/off surface over the pipeline
7196
+ * functions an operator thinks in terms of". The operator's verdict on
7197
+ * 2026-08-12 was that the coherent surface bought complexity and no clarity:
7198
+ * every function already had a settings page of its own, and a second place to
7199
+ * turn it off is a second place to look. Each switch is going back to its own
7200
+ * component's original options — detection to the detection-pipeline wrapper
7201
+ * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
7202
+ * (which was always first-class; the switch was a veneer over
7203
+ * `recording.setDeviceConfig`), notifications to a notification-center
7204
+ * per-device setting, the two camera planes to their own components.
7205
+ *
7206
+ * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
7207
+ * thing that lets a status surface say DISABLED instead of BROKEN, recomposed
7208
+ * straight from the authorities with no group in the middle. That rule was
7209
+ * never about a control panel.
7210
+ *
7211
+ * Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
7212
+ * {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
7213
+ * `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
7214
+ * viewers (v1.0.305) and the admin UI still call it. It is deleted when they
7215
+ * stop; nothing new may be built on it.
7193
7216
  *
7194
7217
  * ## This file adds no state
7195
7218
  *
@@ -7540,7 +7563,15 @@ var RecordingConfigSchema = object({
7540
7563
  * Each completed/failed run also lands one durable ops-log row on its owning
7541
7564
  * addon surface.
7542
7565
  */
7566
+ /**
7567
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
7568
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
7569
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
7570
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
7571
+ * runs at all.
7572
+ */
7543
7573
  var RelocateJobStateSchema = _enum([
7574
+ "queued",
7544
7575
  "running",
7545
7576
  "done",
7546
7577
  "failed",
@@ -7575,6 +7606,15 @@ var RelocateFootageInputSchema = object({
7575
7606
  /** Limits relocation to the logical profile class. Omit only for the
7576
7607
  * pre-orchestration compatibility path. */
7577
7608
  footageClass: RelocateFootageClassSchema.optional(),
7609
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
7610
+ * is what a whole-disk drain means. The rebalance path always sets it: its
7611
+ * unit is a (camera, profile) pile, not a disk. */
7612
+ deviceId: number().int().optional(),
7613
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
7614
+ * Finer than `footageClass`, which cannot separate high from mid — and the
7615
+ * placement plan assigns those two independently, so a rebalance that could
7616
+ * only say "recordings" would move footage the plan never asked to move. */
7617
+ profiles: array(string()).optional(),
7578
7618
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7579
7619
  * never allowed to starve live writers. */
7580
7620
  throttleMbps: number().min(1).max(1e3).optional()
@@ -7710,6 +7750,21 @@ var StorageLocationSchema = object({
7710
7750
  nodeId: string().optional(),
7711
7751
  isDefault: boolean().default(false),
7712
7752
  isSystem: boolean().default(false),
7753
+ /**
7754
+ * Operator opt-in: whether consumers that BALANCE across several locations
7755
+ * of a type may write here. Recordings reads it today; event media and
7756
+ * backups are the next consumers, which is why the flag lives on the
7757
+ * location rather than in any one addon's store — nothing has to be
7758
+ * extended to add the next consumer.
7759
+ *
7760
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
7761
+ * flag existed reads back with no flag and keeps working exactly as before;
7762
+ * that is the whole compat story, and it is why no migration ships with it.
7763
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
7764
+ * disk must not silently start writing to it); the default of a type is
7765
+ * always stamped `true`.
7766
+ */
7767
+ enabled: boolean().optional(),
7713
7768
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7714
7769
  * for node-local locations it can reach) — never persisted, absent when the
7715
7770
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12012,7 +12067,8 @@ method(object({
12012
12067
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12013
12068
  /**
12014
12069
  * filesystem-browse — per-node capability for browsing the node's local
12015
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
12070
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12071
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
12016
12072
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12017
12073
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12018
12074
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -13842,6 +13898,13 @@ var MaskGridDimsSchema = object({
13842
13898
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
13843
13899
  * this one field keeps the schema additive — a rule still declares exactly
13844
13900
  * one trigger.
13901
+ *
13902
+ * AUDIO rules add no member here, for the reason occupancy added none: the
13903
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
13904
+ * mirror.ts` fails the build on a member the app cannot render) and every
13905
+ * member costs a release train. A sustained-sound rule is therefore an
13906
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
13907
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
13845
13908
  */
13846
13909
  var NcDeliverySchema = _enum([
13847
13910
  "immediate",
@@ -13856,15 +13919,32 @@ var NcDeliverySchema = _enum([
13856
13919
  * depend on a provider's raw event name or payload shape.
13857
13920
  */
13858
13921
  var NcSystemEventKindSchema = _enum([
13859
- "camera-online",
13860
- "camera-offline",
13922
+ "device-online",
13923
+ "device-offline",
13924
+ "device-disabled",
13925
+ "device-enabled",
13861
13926
  "stream-online",
13862
13927
  "stream-offline",
13863
13928
  "node-online",
13864
13929
  "node-offline",
13865
13930
  "addon-update-available",
13866
- "server-update-available"
13931
+ "server-update-available",
13932
+ "alarm-triggered",
13933
+ "alarm-armed",
13934
+ "alarm-disarmed",
13935
+ "camera-online",
13936
+ "camera-offline",
13937
+ "camera-disabled",
13938
+ "camera-enabled"
13939
+ ]);
13940
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
13941
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
13942
+ "camera-online",
13943
+ "camera-offline",
13944
+ "camera-disabled",
13945
+ "camera-enabled"
13867
13946
  ]);
13947
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
13868
13948
  /**
13869
13949
  * One coherent system-event condition. `kinds` is the required opt-in safety
13870
13950
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -13873,6 +13953,18 @@ var NcSystemEventKindSchema = _enum([
13873
13953
  var NcSystemEventConditionSchema = object({
13874
13954
  kinds: array(NcSystemEventKindSchema).min(1),
13875
13955
  deviceIds: array(number().int()).min(1).optional(),
13956
+ /**
13957
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
13958
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
13959
+ * is what a liveness rule means when nobody said otherwise.
13960
+ *
13961
+ * This is where "only my cameras" is expressed, and it lives on the rule for
13962
+ * one reason: the intake cannot know which devices this household cares
13963
+ * about, and a producer-side filter is one no operator can change. Fails
13964
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
13965
+ * does not carry) matches no `deviceTypes` list.
13966
+ */
13967
+ deviceTypes: array(string().min(1)).min(1).optional(),
13876
13968
  nodeIds: array(string().min(1)).min(1).optional(),
13877
13969
  packageNames: array(string().min(1)).min(1).optional()
13878
13970
  });
@@ -13923,6 +14015,47 @@ var NcOccupancyConditionSchema = object({
13923
14015
  sustainSeconds: number().int().min(0).max(3600).default(15)
13924
14016
  });
13925
14017
  /**
14018
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14019
+ *
14020
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
14021
+ * reference notifier uses, so an operator moving between them re-uses what
14022
+ * they already know): a rule matches when, over a sampling window of
14023
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14024
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14025
+ *
14026
+ * - `dbThreshold` — its level is at or above this many dBFS (see
14027
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14028
+ * - `labels` — the classifier put at least one of these labels on it.
14029
+ *
14030
+ * Both are OPTIONAL and independent, which is the point of the shape: a
14031
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
14032
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14033
+ * is given** — a window in which every sample is trivially a hit would fire on
14034
+ * silence, so the engine refuses such a condition rather than notifying on
14035
+ * nothing (the schema cannot express "at least one of" without becoming a
14036
+ * ZodEffects the cap path would have to special-case).
14037
+ *
14038
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
14039
+ * must be FULL before it can match — a window that has been open for two
14040
+ * seconds of its ten is 100% of nothing, and firing on it would make
14041
+ * `samplingSeconds` decorative.
14042
+ *
14043
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14044
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
14045
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
14046
+ * an operator who typed `dog` mean the same thing.
14047
+ */
14048
+ var NcAudioConditionSchema = object({
14049
+ /** Audio macro labels; absent = any sound (level-only rule). */
14050
+ labels: array(string().min(1)).min(1).optional(),
14051
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14052
+ dbThreshold: number().min(-96).max(0).optional(),
14053
+ /** Percentage of the window's samples that must be hits (1–100). */
14054
+ hitPercent: number().int().min(1).max(100).default(60),
14055
+ /** Length of the sampling window in seconds. */
14056
+ samplingSeconds: number().int().min(1).max(300).default(10)
14057
+ });
14058
+ /**
13926
14059
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
13927
14060
  *
13928
14061
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14195,7 +14328,33 @@ var NcConditionsSchema = object({
14195
14328
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14196
14329
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14197
14330
  */
14198
- occupancy: NcOccupancyConditionSchema.optional()
14331
+ occupancy: NcOccupancyConditionSchema.optional(),
14332
+ /**
14333
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
14334
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
14335
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
14336
+ * a window that is not full yet, neither filter given). See
14337
+ * {@link NcAudioCondition}.
14338
+ *
14339
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
14340
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
14341
+ * a detection, a track or a device event (the same fail-closed pairing
14342
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
14343
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
14344
+ * (an `immediate` rule naming an `audio-*` class, one notification per
14345
+ * classified sample) stays exactly as it was for rules that already use it.
14346
+ *
14347
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14348
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14349
+ * (`camstack/src/data/notification-center.ts`, guarded by
14350
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14351
+ * condition fields it does not know when a rule is saved from the phone.
14352
+ * Publishing an editor for a condition the app cannot round-trip is how an
14353
+ * operator loses a rule's conditions by opening it — so the descriptor, the
14354
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
14355
+ * does an audio rule become authorable.
14356
+ */
14357
+ audio: NcAudioConditionSchema.optional()
14199
14358
  });
14200
14359
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14201
14360
  var NcRuleTargetSchema = object({
@@ -14309,6 +14468,73 @@ var NcThrottleSchema = object({
14309
14468
  */
14310
14469
  granularity: NcThrottleGranularitySchema.optional()
14311
14470
  });
14471
+ /**
14472
+ * How long the confirm gate may hold ONE notification, and how big the picture
14473
+ * it judges may be.
14474
+ *
14475
+ * The clamp is the product decision, not a coincidence of the model: p50 was
14476
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
14477
+ * arrives after the visitor has gone is not a notification. 448 px was enough
14478
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
14479
+ * tokens for pixels the model pools away.
14480
+ */
14481
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
14482
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
14483
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
14484
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
14485
+ var NcConfirmExpectSchema = object({
14486
+ op: _enum([
14487
+ ">=",
14488
+ ">",
14489
+ "<=",
14490
+ "<",
14491
+ "=="
14492
+ ]),
14493
+ count: number().int().min(0).max(1e3)
14494
+ });
14495
+ /**
14496
+ * AI CONFIRM — a vision model looks at the picture this notification is about
14497
+ * to ship and says whether it agrees with the rule.
14498
+ *
14499
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
14500
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
14501
+ * on the operator's phone is not a verdict about this notification.
14502
+ *
14503
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
14504
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
14505
+ * the default and every fail-open is COUNTED, because a gate that always fails
14506
+ * open looks in the log exactly like a gate that works.
14507
+ *
14508
+ * Every field is `.optional()` rather than relied on as a Zod default at the
14509
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
14510
+ * production failures in one day), so the gate reads absent as the constant
14511
+ * above rather than trusting a parse it may never have seen.
14512
+ */
14513
+ var NcConfirmSchema = object({
14514
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
14515
+ * same thing, and both mean "deliver exactly as before". */
14516
+ enabled: boolean().default(false),
14517
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
14518
+ profileId: string().optional(),
14519
+ /**
14520
+ * The operator's question, in his own words. Absent = a question derived
14521
+ * from the rule (its class and its expectation).
14522
+ *
14523
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
14524
+ * banners, signage and plates as instructions if you let them reach the
14525
+ * prompt — proven live — so the authoritative contract stays in the system
14526
+ * turn and only rule-authored words land here.
14527
+ */
14528
+ prompt: string().max(1e3).optional(),
14529
+ /** Fire only when the model's count satisfies this. Absent = the model's
14530
+ * own boolean verdict decides. */
14531
+ expect: NcConfirmExpectSchema.optional(),
14532
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
14533
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
14534
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
14535
+ /** Longest edge the judged image is downscaled to before it is sent. */
14536
+ maxImagePx: number().int().min(64).max(2048).default(448)
14537
+ });
14312
14538
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14313
14539
  var NcRuleInputSchema = object({
14314
14540
  name: string().min(1).max(200),
@@ -14369,7 +14595,13 @@ var NcRuleInputSchema = object({
14369
14595
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14370
14596
  * shape as every other actuation.
14371
14597
  */
14372
- actions: NcRuleActionsSchema.optional()
14598
+ actions: NcRuleActionsSchema.optional(),
14599
+ /**
14600
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
14601
+ * a rule that predates the gate must keep delivering byte-for-byte as it
14602
+ * did, and absent is the only way to say that without a migration.
14603
+ */
14604
+ confirm: NcConfirmSchema.optional()
14373
14605
  });
14374
14606
  /**
14375
14607
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14380,7 +14612,37 @@ var NcRuleInputSchema = object({
14380
14612
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14381
14613
  * `updateRule` patch.
14382
14614
  */
14383
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
14615
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
14616
+ disabledTargetIds: array(string()).optional(),
14617
+ /**
14618
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
14619
+ *
14620
+ * It makes the key optional to SUPPLY; the parse still materialises the
14621
+ * default when the key is absent. And `NcRuleStore.update` merges with
14622
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
14623
+ * one — which made every partial edit destructive:
14624
+ *
14625
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
14626
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
14627
+ * setEnabled(ruleId, false) → conditions reset to `{}`
14628
+ *
14629
+ * A rule scoped to one camera and one zone silently became a rule that
14630
+ * matches EVERY event on EVERY camera, and lost its `media` policy
14631
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
14632
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
14633
+ * within a minute of a two-field patch.
14634
+ *
14635
+ * So every defaulted field is re-declared here WITHOUT its default. The
14636
+ * inner defaults still apply when the caller DOES send the key — `{}` for
14637
+ * conditions remains a real instruction ("clear them") — and only the
14638
+ * absent key is now genuinely absent.
14639
+ */
14640
+ enabled: boolean().optional(),
14641
+ conditions: NcConditionsSchema.optional(),
14642
+ media: NcMediaPolicySchema.optional(),
14643
+ throttle: NcThrottleSchema.optional(),
14644
+ priority: number().int().min(1).max(5).optional()
14645
+ });
14384
14646
  /** A persisted rule. */
14385
14647
  var NcRuleSchema = NcRuleInputSchema.extend({
14386
14648
  id: string(),
@@ -14681,6 +14943,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
14681
14943
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
14682
14944
  * copy would lie the first time a rule is disabled.
14683
14945
  */
14946
+ /**
14947
+ * Why a device a mode NAMES is nonetheless not armed by it.
14948
+ *
14949
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
14950
+ * per-camera notification switch the Notification Center already owns,
14951
+ * `detection-off` is the device's own detection binding being inactive, and
14952
+ * `offline` is the device manager's liveness. A fourth reason would mean a
14953
+ * fourth authority, and inventing one here is how a panel starts disagreeing
14954
+ * with the switches the operator actually used.
14955
+ */
14956
+ var NcAlarmSkipReasonSchema = _enum([
14957
+ "muted",
14958
+ "detection-off",
14959
+ "offline"
14960
+ ]);
14961
+ var NcAlarmSkippedDeviceSchema = object({
14962
+ deviceId: number().int(),
14963
+ reason: NcAlarmSkipReasonSchema
14964
+ });
14684
14965
  var NcAlarmModeCoverageSchema = object({
14685
14966
  mode: AlarmArmModeSchema,
14686
14967
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -14688,7 +14969,18 @@ var NcAlarmModeCoverageSchema = object({
14688
14969
  /** At least one covering rule has no device scope, so the mode covers all. */
14689
14970
  allDevices: boolean(),
14690
14971
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
14691
- deviceIds: array(number().int())
14972
+ deviceIds: array(number().int()),
14973
+ /**
14974
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
14975
+ * excludes it.
14976
+ *
14977
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
14978
+ * twelve makes it false in exactly the way nobody notices until an incident.
14979
+ * Defaulted to `[]` so a coverage answer computed before this field existed
14980
+ * still parses as "nothing known to be skipped" rather than failing the whole
14981
+ * alarm tab.
14982
+ */
14983
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
14692
14984
  });
14693
14985
  var NcAlarmConfigSchema = object({
14694
14986
  /**
@@ -17487,9 +17779,16 @@ var CameraStatusSchema = object({
17487
17779
  audio: CameraAudioStatusSchema.nullable(),
17488
17780
  recording: CameraRecordingStatusSchema.nullable(),
17489
17781
  /**
17490
- * Per-camera function switches an OPERATOR has turned off
17782
+ * Per-camera functions an OPERATOR has turned off
17491
17783
  * ([D61](../../../../docs/decisions/adr-0067.md)).
17492
17784
  *
17785
+ * Composed from the AUTHORITIES themselves — the wrapper bindings,
17786
+ * `RecordingConfig.enabled`, the notification mute, the broker's audio
17787
+ * policy, the camera's own microphone — via `composeSwitchedOff`, not from
17788
+ * the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
17789
+ * The badge outlives the control panel: the panel was a convenience, this is
17790
+ * the difference between a camera being off and a camera being dead.
17791
+ *
17493
17792
  * This is the difference between DISABLED and BROKEN. A camera whose
17494
17793
  * `detection` block reports zero fps and whose `switchedOff` contains
17495
17794
  * `'object-detection'` was switched off by a person; the same camera with an
@@ -23059,7 +23358,19 @@ var RecordingManifestSchema = object({
23059
23358
  * profiles/subtrees/locations on this node). */
23060
23359
  var RecordingDeviceUsageSchema = object({
23061
23360
  deviceId: number(),
23062
- usedBytes: number()
23361
+ usedBytes: number(),
23362
+ /**
23363
+ * Start of this camera's OLDEST indexed segment, across every profile and
23364
+ * location — the "Oldest footage" column in Recordings → Storage, and the
23365
+ * only honest answer to "is retention actually holding?" per camera.
23366
+ *
23367
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
23368
+ * predates this field omits it entirely, and a hub whose types carry the
23369
+ * field must keep validating that older provider's payload: the framework
23370
+ * (types) and the addon ship on different trains, and the addon is usually
23371
+ * the later of the two.
23372
+ */
23373
+ oldestMs: number().nullable().optional()
23063
23374
  });
23064
23375
  /** Recording storage usage + capacity for one storage location. */
23065
23376
  var RecordingLocationUsageSchema = object({
@@ -23087,6 +23398,57 @@ var RecordingStorageUsageSchema = object({
23087
23398
  locations: array(RecordingLocationUsageSchema)
23088
23399
  });
23089
23400
  /**
23401
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
23402
+ *
23403
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
23404
+ * is the operator asking for the EXISTING archive to be brought into line with
23405
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
23406
+ * location, run FIFO behind the single-flight mover.
23407
+ *
23408
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
23409
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
23410
+ * (empty on the plan).
23411
+ */
23412
+ var RecordingRebalanceMoveSchema = object({
23413
+ deviceId: number(),
23414
+ profile: string(),
23415
+ fromLocationId: string(),
23416
+ toLocationId: string(),
23417
+ bytes: number(),
23418
+ files: number().int()
23419
+ });
23420
+ /** Why a pile that is out of place is staying there. Every refusal is
23421
+ * reported: a rebalance that silently drops a camera reads exactly like one
23422
+ * that had nothing to do. */
23423
+ var RecordingRebalanceSkipReasonSchema = _enum([
23424
+ "unassigned",
23425
+ "target-not-writable",
23426
+ "below-threshold",
23427
+ "no-headroom"
23428
+ ]);
23429
+ var RecordingRebalanceSkipSchema = object({
23430
+ deviceId: number(),
23431
+ profile: string(),
23432
+ fromLocationId: string(),
23433
+ /** The location the plan wants; null when the camera has no assignment. */
23434
+ toLocationId: string().nullable(),
23435
+ bytes: number(),
23436
+ reason: RecordingRebalanceSkipReasonSchema
23437
+ });
23438
+ var RecordingRebalancePlanSchema = object({
23439
+ moves: array(RecordingRebalanceMoveSchema),
23440
+ skipped: array(RecordingRebalanceSkipSchema),
23441
+ bytesToMove: number(),
23442
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
23443
+ jobIds: array(string())
23444
+ });
23445
+ var RecordingRebalanceInputSchema = object({
23446
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
23447
+ throttleMbps: number().min(1).max(1e3).optional(),
23448
+ /** Ignore piles smaller than this (default 1 GB). */
23449
+ minMoveGb: number().min(0).optional()
23450
+ });
23451
+ /**
23090
23452
  * Result of locating footage at a wall-clock instant for one device/profile.
23091
23453
  * `segment` carries the covering segment's window; `gap` reports the forward
23092
23454
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -23249,9 +23611,24 @@ method(object({
23249
23611
  }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23250
23612
  kind: "mutation",
23251
23613
  auth: "admin"
23614
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
23615
+ kind: "mutation",
23616
+ auth: "admin"
23617
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
23618
+ kind: "query",
23619
+ auth: "admin"
23620
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23621
+ kind: "mutation",
23622
+ auth: "admin"
23623
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23624
+ kind: "query",
23625
+ auth: "admin"
23626
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23627
+ kind: "mutation",
23628
+ auth: "admin"
23252
23629
  });
23253
23630
  /**
23254
- * `recordingExport` cap — render a footage time range into a single downloadable
23631
+ * `recording-export` cap — render a footage time range into a single downloadable
23255
23632
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
23256
23633
  * bounded lifetime with a durable history, auto-expiry, and optional
23257
23634
  * delete-after-download.
@@ -23266,10 +23643,42 @@ method(object({
23266
23643
  */
23267
23644
  /** Playback-speed multiplier for the render (1 = realtime). */
23268
23645
  var ExportSpeedSchema = number().min(.25).max(32);
23646
+ /**
23647
+ * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23648
+ *
23649
+ * Relative and not absolute epoch on purpose: the renderer's frame-select
23650
+ * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23651
+ * playlist. Handing it absolute epochs would make every call site responsible
23652
+ * for the same subtraction, and the one that forgot would emit a filter that
23653
+ * selects nothing — silently, as a uniform timelapse.
23654
+ */
23655
+ var ExportDenseRangeSchema = object({
23656
+ fromSec: number().nonnegative(),
23657
+ toSec: number().nonnegative()
23658
+ }).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
23659
+ /**
23660
+ * Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
23661
+ * listed ranges and at the base `everyMs` everywhere else.
23662
+ *
23663
+ * `everyMs` must be strictly smaller than the base cadence — a dense rate that
23664
+ * is not denser renders a uniform timelapse the operator believes is two-rate.
23665
+ */
23666
+ var ExportDenseSchema = object({
23667
+ everyMs: number().int().positive(),
23668
+ ranges: array(ExportDenseRangeSchema).min(1).max(200)
23669
+ });
23269
23670
  /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
23270
23671
  var ExportTimelapseSchema = object({
23271
23672
  everyMs: number().int().positive(),
23272
- outputFps: number().int().min(1).max(60).optional()
23673
+ outputFps: number().int().min(1).max(60).optional(),
23674
+ /** Optional second, FASTER rate over the intervals that matter. */
23675
+ dense: ExportDenseSchema.optional()
23676
+ }).superRefine((v, ctx) => {
23677
+ if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
23678
+ code: ZodIssueCode.custom,
23679
+ message: "dense.everyMs must be strictly smaller than the base everyMs",
23680
+ path: ["dense", "everyMs"]
23681
+ });
23273
23682
  });
23274
23683
  /**
23275
23684
  * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
@@ -23327,6 +23736,19 @@ var ExportDownloadSchema = object({
23327
23736
  url: string(),
23328
23737
  endpoints: array(string())
23329
23738
  });
23739
+ /**
23740
+ * A finished export's bytes, inline.
23741
+ *
23742
+ * `bytes` is the DECODED length — the number the caller bounds and logs
23743
+ * against, so nobody has to infer it from the base64 length.
23744
+ */
23745
+ var ExportBytesSchema = object({
23746
+ base64: string(),
23747
+ contentType: string(),
23748
+ /** Suggested filename, extension included. */
23749
+ name: string(),
23750
+ bytes: number().int().nonnegative()
23751
+ });
23330
23752
  method(object({
23331
23753
  deviceId: number(),
23332
23754
  profile: string(),
@@ -23351,6 +23773,9 @@ method(object({
23351
23773
  }), method(object({ exportId: string() }), ExportDownloadSchema, {
23352
23774
  kind: "query",
23353
23775
  auth: "protected"
23776
+ }), method(object({ exportId: string() }), ExportBytesSchema, {
23777
+ kind: "query",
23778
+ auth: "protected"
23354
23779
  });
23355
23780
  /**
23356
23781
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -28544,6 +28969,12 @@ Object.freeze({
28544
28969
  addonId: null,
28545
28970
  access: "create"
28546
28971
  },
28972
+ "recording.cancelRelocateJob": {
28973
+ capName: "recording",
28974
+ capScope: "system",
28975
+ addonId: null,
28976
+ access: "create"
28977
+ },
28547
28978
  "recording.cancelStorageMigrationMove": {
28548
28979
  capName: "recording",
28549
28980
  capScope: "system",
@@ -28598,6 +29029,12 @@ Object.freeze({
28598
29029
  addonId: null,
28599
29030
  access: "view"
28600
29031
  },
29032
+ "recording.listRelocateJobs": {
29033
+ capName: "recording",
29034
+ capScope: "system",
29035
+ addonId: null,
29036
+ access: "view"
29037
+ },
28601
29038
  "recording.locateSegment": {
28602
29039
  capName: "recording",
28603
29040
  capScope: "system",
@@ -28610,6 +29047,12 @@ Object.freeze({
28610
29047
  addonId: null,
28611
29048
  access: "create"
28612
29049
  },
29050
+ "recording.planStorageRebalance": {
29051
+ capName: "recording",
29052
+ capScope: "system",
29053
+ addonId: null,
29054
+ access: "view"
29055
+ },
28613
29056
  "recording.pruneFootage": {
28614
29057
  capName: "recording",
28615
29058
  capScope: "system",
@@ -28634,6 +29077,12 @@ Object.freeze({
28634
29077
  addonId: null,
28635
29078
  access: "create"
28636
29079
  },
29080
+ "recording.relocateFootage": {
29081
+ capName: "recording",
29082
+ capScope: "system",
29083
+ addonId: null,
29084
+ access: "create"
29085
+ },
28637
29086
  "recording.renderClip": {
28638
29087
  capName: "recording",
28639
29088
  capScope: "system",
@@ -28670,38 +29119,50 @@ Object.freeze({
28670
29119
  addonId: null,
28671
29120
  access: "create"
28672
29121
  },
29122
+ "recording.startStorageRebalance": {
29123
+ capName: "recording",
29124
+ capScope: "system",
29125
+ addonId: null,
29126
+ access: "create"
29127
+ },
28673
29128
  "recordingExport.cancelExport": {
28674
- capName: "recordingExport",
29129
+ capName: "recording-export",
28675
29130
  capScope: "system",
28676
29131
  addonId: null,
28677
29132
  access: "create"
28678
29133
  },
28679
29134
  "recordingExport.createExport": {
28680
- capName: "recordingExport",
29135
+ capName: "recording-export",
28681
29136
  capScope: "system",
28682
29137
  addonId: null,
28683
29138
  access: "create"
28684
29139
  },
28685
29140
  "recordingExport.deleteExport": {
28686
- capName: "recordingExport",
29141
+ capName: "recording-export",
28687
29142
  capScope: "system",
28688
29143
  addonId: null,
28689
29144
  access: "delete"
28690
29145
  },
28691
29146
  "recordingExport.getDownloadUrl": {
28692
- capName: "recordingExport",
29147
+ capName: "recording-export",
28693
29148
  capScope: "system",
28694
29149
  addonId: null,
28695
29150
  access: "view"
28696
29151
  },
28697
29152
  "recordingExport.getExport": {
28698
- capName: "recordingExport",
29153
+ capName: "recording-export",
28699
29154
  capScope: "system",
28700
29155
  addonId: null,
28701
29156
  access: "view"
28702
29157
  },
28703
29158
  "recordingExport.listExports": {
28704
- capName: "recordingExport",
29159
+ capName: "recording-export",
29160
+ capScope: "system",
29161
+ addonId: null,
29162
+ access: "view"
29163
+ },
29164
+ "recordingExport.readExportBytes": {
29165
+ capName: "recording-export",
28705
29166
  capScope: "system",
28706
29167
  addonId: null,
28707
29168
  access: "view"
@@ -30078,6 +30539,104 @@ var FramerateField = number().int().min(1).max(60);
30078
30539
  var TargetsField = array(NcRuleTargetSchema).min(1);
30079
30540
  var PriorityField = number().int().min(1).max(5);
30080
30541
  /**
30542
+ * Explicit override of the DENSE sampling cadence, seconds.
30543
+ *
30544
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
30545
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
30546
+ * made that same base 3 s and rendered a person pass as two frames.)
30547
+ *
30548
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
30549
+ * `denseCadenceSec` and played at `framerate` occupies
30550
+ *
30551
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
30552
+ *
30553
+ * 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.
30554
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
30555
+ * and therefore the length of a quiet night, does not move.
30556
+ *
30557
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
30558
+ * the recording has them returns the same frames, requested twice. Must be
30559
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
30560
+ * a uniform video the operator believes is two-rate — and upsert refuses it
30561
+ * rather than letting the export cap reject the render hours after the window.
30562
+ */
30563
+ var DenseCadenceSecField = number().min(.1).max(3600);
30564
+ /**
30565
+ * Minimum seconds of OUTPUT video each detection range must occupy.
30566
+ *
30567
+ * The operator-facing form of the arithmetic above: instead of solving for a
30568
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
30569
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
30570
+ * that range every ~583 ms.
30571
+ *
30572
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
30573
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
30574
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
30575
+ * ranges are sampled denser than they need. Per-range cadences require a cap
30576
+ * schema change and are the tracked follow-up.
30577
+ *
30578
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
30579
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
30580
+ * by real footage, never met by duplicating frames into motion that never
30581
+ * happened.
30582
+ */
30583
+ var MinDwellSecField = number().min(0).max(60);
30584
+ /**
30585
+ * Caption burned into the notification's preview frame.
30586
+ *
30587
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
30588
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
30589
+ * templating dialect for one field would be a second thing to explain.
30590
+ *
30591
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
30592
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
30593
+ * the reason this is not `.min(1)`.
30594
+ */
30595
+ var PreviewTextField = string().max(200);
30596
+ /**
30597
+ * Whether the notification's preview is a STILL or a short animation.
30598
+ *
30599
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
30600
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
30601
+ * night reads better as three seconds of motion than as one frame of it. Both
30602
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
30603
+ * simply applies it to a dozen frames sampled across the render and assembles
30604
+ * them.
30605
+ *
30606
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
30607
+ * seeks and a palette pass, and no rule that never asked for one should start
30608
+ * paying that on the deploy that shipped it.
30609
+ *
30610
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
30611
+ */
30612
+ var PreviewModeField = _enum(["image", "gif"]);
30613
+ /**
30614
+ * Which detection classes the notification reports counts for.
30615
+ *
30616
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
30617
+ * plan — no second query — aggregated per class. Absent or empty means "every
30618
+ * class the window actually contained", which is what an operator who never
30619
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
30620
+ * counts cars all night).
30621
+ *
30622
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
30623
+ * …). An unknown name simply never matches and reports nothing — it is not an
30624
+ * error, because a rule may legitimately name a class this camera's model does
30625
+ * not emit.
30626
+ *
30627
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
30628
+ * - `{{detections}}` — total over the reported classes
30629
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
30630
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
30631
+ * one per class, `count_` + the class name
30632
+ *
30633
+ * With NO custom body template the summary is appended to the derived body, and
30634
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
30635
+ * reads. With a custom template the operator owns every word — nothing is
30636
+ * appended, so `{{detectionSummary}}` is how he asks for it.
30637
+ */
30638
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
30639
+ /**
30081
30640
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
30082
30641
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
30083
30642
  * here (see the ownership note above).
@@ -30097,9 +30656,30 @@ var TimelapseRuleInputSchema = object({
30097
30656
  cadenceSec: CadenceSecField.default(15),
30098
30657
  /** Output frames per second of the assembled mp4 (predecessor parity). */
30099
30658
  framerate: FramerateField.default(10),
30659
+ /**
30660
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
30661
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
30662
+ * field gets.
30663
+ */
30664
+ denseCadenceSec: DenseCadenceSecField.optional(),
30665
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
30666
+ minDwellSec: MinDwellSecField.optional(),
30100
30667
  /** `notification-output` targets the finished video/thumbnail is sent to. */
30101
30668
  targets: TargetsField,
30102
30669
  template: TimelapseTemplateSchema.optional(),
30670
+ /**
30671
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
30672
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
30673
+ *
30674
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
30675
+ * the notification's title/body, and clearing it (`template: null`) must not
30676
+ * silently clear the caption too.
30677
+ */
30678
+ previewText: PreviewTextField.optional(),
30679
+ /** Still or animation — see {@link PreviewModeField}. */
30680
+ previewMode: PreviewModeField.default("image"),
30681
+ /** Classes the notification counts — see {@link ReportClassesField}. */
30682
+ reportClasses: ReportClassesField.optional(),
30103
30683
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
30104
30684
  priority: PriorityField.default(3)
30105
30685
  });
@@ -30110,8 +30690,13 @@ object({
30110
30690
  schedule: NcScheduleSchema.optional(),
30111
30691
  cadenceSec: CadenceSecField.optional(),
30112
30692
  framerate: FramerateField.optional(),
30693
+ denseCadenceSec: DenseCadenceSecField.optional(),
30694
+ minDwellSec: MinDwellSecField.optional(),
30113
30695
  targets: TargetsField.optional(),
30114
30696
  template: TimelapseTemplateSchema.nullable().optional(),
30697
+ previewText: PreviewTextField.optional(),
30698
+ previewMode: PreviewModeField.optional(),
30699
+ reportClasses: ReportClassesField.optional(),
30115
30700
  priority: PriorityField.optional()
30116
30701
  });
30117
30702
  TimelapseRuleInputSchema.extend({
@@ -30123,10 +30708,28 @@ TimelapseRuleInputSchema.extend({
30123
30708
  */
30124
30709
  ownerUserId: string().optional(),
30125
30710
  /**
30126
- * Epoch-ms of the last successful generation — the 1-hour re-generation
30127
- * guard's durable state (predecessor parity). Absent = never generated.
30711
+ * Epoch-ms of the NEWEST successful generation across every camera of this
30712
+ * rule. What a UI shows, and the compatibility floor for
30713
+ * {@link readTimelapseGeneratedAt}. Absent = never generated.
30128
30714
  */
30129
30715
  lastGeneratedAt: number().optional(),
30716
+ /**
30717
+ * PER-CAMERA generation state, keyed by `String(deviceId)` — the
30718
+ * re-generation guard's real durable state.
30719
+ *
30720
+ * One rule covers several cameras and each renders its own video, so a rule
30721
+ * -wide stamp is wrong in the direction that DESTROYS work: camera A
30722
+ * succeeding at 06:05 tells camera B, whose render failed, that it is
30723
+ * already done — and B's night is gone for good, because the window will not
30724
+ * come back.
30725
+ *
30726
+ * ADDITIVE, so the migration is free: a row written before this field simply
30727
+ * has no map, and {@link readTimelapseGeneratedAt} falls back to
30728
+ * {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
30729
+ * "never generated" would re-render and re-notify every camera of every rule
30730
+ * once, on the deploy that shipped the map.
30731
+ */
30732
+ generatedByDevice: record(string(), number()).optional(),
30130
30733
  /** userId of the caller who created the rule (server-stamped). */
30131
30734
  createdBy: string(),
30132
30735
  createdAt: number(),