@camstack/addon-decoder-nodeav 1.2.11 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +936 -48
  2. package/dist/index.mjs +936 -48
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7205,8 +7205,31 @@ var AdoptionJobSchema = object({
7205
7205
  error: string().nullable()
7206
7206
  });
7207
7207
  /**
7208
- * Per-camera FUNCTION SWITCHES — the one coherent on/off surface over the
7209
- * pipeline functions an operator thinks in terms of.
7208
+ * Per-camera FUNCTION SWITCHES.
7209
+ *
7210
+ * ## The aggregate group is being withdrawn — the BADGE is not (D113)
7211
+ *
7212
+ * This file shipped as "the one coherent on/off surface over the pipeline
7213
+ * functions an operator thinks in terms of". The operator's verdict on
7214
+ * 2026-08-12 was that the coherent surface bought complexity and no clarity:
7215
+ * every function already had a settings page of its own, and a second place to
7216
+ * turn it off is a second place to look. Each switch is going back to its own
7217
+ * component's original options — detection to the detection-pipeline wrapper
7218
+ * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
7219
+ * (which was always first-class; the switch was a veneer over
7220
+ * `recording.setDeviceConfig`), notifications to a notification-center
7221
+ * per-device setting, the two camera planes to their own components.
7222
+ *
7223
+ * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
7224
+ * thing that lets a status surface say DISABLED instead of BROKEN, recomposed
7225
+ * straight from the authorities with no group in the middle. That rule was
7226
+ * never about a control panel.
7227
+ *
7228
+ * Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
7229
+ * {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
7230
+ * `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
7231
+ * viewers (v1.0.305) and the admin UI still call it. It is deleted when they
7232
+ * stop; nothing new may be built on it.
7210
7233
  *
7211
7234
  * ## This file adds no state
7212
7235
  *
@@ -7551,14 +7574,21 @@ var RecordingConfigSchema = object({
7551
7574
  /**
7552
7575
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
7553
7576
  *
7554
- * One shape shared by the recorder's `relocateFootage` (segments) and
7555
- * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7556
- * page renders both movers with one component. Jobs are in-RAM (a restart
7557
- * forgets them re-running is safe by construction: copy-if-absent, delete
7558
- * after verify) and each completed/failed run also lands one durable ops-log
7559
- * row on the owning addon's surface.
7577
+ * One shape shared by the recorder and pipeline-analytics internal movers.
7578
+ * The public admin surface is `storage-migration`; child jobs remain in RAM
7579
+ * because copy-if-absent, verify, delete and index/row repoint are resumable.
7580
+ * Each completed/failed run also lands one durable ops-log row on its owning
7581
+ * addon surface.
7582
+ */
7583
+ /**
7584
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
7585
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
7586
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
7587
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
7588
+ * runs at all.
7560
7589
  */
7561
7590
  var RelocateJobStateSchema = _enum([
7591
+ "queued",
7562
7592
  "running",
7563
7593
  "done",
7564
7594
  "failed",
@@ -7583,19 +7613,109 @@ var RelocateJobSchema = object({
7583
7613
  finishedAt: number().nullable(),
7584
7614
  error: string().nullable()
7585
7615
  });
7616
+ /** Profile-derived footage selection used only by the migration coordinator:
7617
+ * `recordings` owns high+mid; `recordingsLow` owns low. */
7618
+ var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
7586
7619
  var RelocateFootageInputSchema = object({
7587
- deviceId: number().optional(),
7588
7620
  fromLocationId: string(),
7589
7621
  toLocationId: string(),
7590
7622
  entities: array(_enum(["segments"])).optional(),
7623
+ /** Limits relocation to the logical profile class. Omit only for the
7624
+ * pre-orchestration compatibility path. */
7625
+ footageClass: RelocateFootageClassSchema.optional(),
7626
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
7627
+ * is what a whole-disk drain means. The rebalance path always sets it: its
7628
+ * unit is a (camera, profile) pile, not a disk. */
7629
+ deviceId: number().int().optional(),
7630
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
7631
+ * Finer than `footageClass`, which cannot separate high from mid — and the
7632
+ * placement plan assigns those two independently, so a rebalance that could
7633
+ * only say "recordings" would move footage the plan never asked to move. */
7634
+ profiles: array(string()).optional(),
7591
7635
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7592
7636
  * never allowed to starve live writers. */
7593
7637
  throttleMbps: number().min(1).max(1e3).optional()
7594
7638
  });
7595
- var RelocateMediaInputSchema = object({
7596
- deviceId: number().optional(),
7639
+ /** Internal, lease-scoped participant operation. It is intentionally separate
7640
+ * from persistent recording settings: a migration never changes
7641
+ * `RecordingConfig.enabled` or camera wrapper bindings. */
7642
+ var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
7643
+ var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
7644
+ var StorageMigrationMediaMoveInputSchema = object({
7597
7645
  toLocationId: string(),
7598
7646
  throttleMbps: number().min(1).max(1e3).optional()
7647
+ }).extend({ leaseId: string().min(1) });
7648
+ /** The independently selectable logical storage classes. `recordings`
7649
+ * encompasses the high and mid segment profiles; `recordingsLow` is low
7650
+ * segments; `eventMedia` is post-analysis blobs. */
7651
+ var StorageMigrationClassSchema = _enum([
7652
+ "recordings",
7653
+ "recordingsLow",
7654
+ "eventMedia"
7655
+ ]);
7656
+ /** A destination is always an existing, fully-qualified location id. The
7657
+ * migration API intentionally never changes a source location's `basePath`:
7658
+ * callers create a new `<type>:<slug>` location, then select it here. */
7659
+ var StorageMigrationDestinationsSchema = object({
7660
+ recordings: string().min(1).optional(),
7661
+ recordingsLow: string().min(1).optional(),
7662
+ eventMedia: string().min(1).optional()
7663
+ }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
7664
+ /** Shared input for planning and starting an orchestrated storage migration. */
7665
+ var StorageMigrationInputSchema = object({
7666
+ destinations: StorageMigrationDestinationsSchema,
7667
+ throttleMbps: number().min(1).max(1e3).optional()
7668
+ });
7669
+ /** The durable coordinator state machine. The only phase that changes default
7670
+ * locations is `repointing`, after every selected mover has completed and been
7671
+ * verified. */
7672
+ var StorageMigrationPhaseSchema = _enum([
7673
+ "planning",
7674
+ "pausing",
7675
+ "moving",
7676
+ "verifying",
7677
+ "repointing",
7678
+ "refreshing",
7679
+ "resuming",
7680
+ "done",
7681
+ "failed",
7682
+ "cancelled"
7683
+ ]);
7684
+ var StorageMigrationParticipantSchema = _enum([
7685
+ "pipeline",
7686
+ "recorder",
7687
+ "analytics"
7688
+ ]);
7689
+ var StorageMigrationMoveSchema = object({
7690
+ storageClass: StorageMigrationClassSchema,
7691
+ fromLocationId: string(),
7692
+ toLocationId: string(),
7693
+ moverJobId: string().nullable(),
7694
+ state: RelocateJobStateSchema.nullable(),
7695
+ error: string().nullable()
7696
+ });
7697
+ var StorageMigrationJobSchema = object({
7698
+ jobId: string(),
7699
+ phase: StorageMigrationPhaseSchema,
7700
+ destinations: StorageMigrationDestinationsSchema,
7701
+ throttleMbps: number(),
7702
+ moves: array(StorageMigrationMoveSchema),
7703
+ pauseLeaseId: string().nullable(),
7704
+ pausedParticipants: array(StorageMigrationParticipantSchema),
7705
+ repointed: boolean(),
7706
+ cancelRequested: boolean(),
7707
+ startedAt: number(),
7708
+ updatedAt: number(),
7709
+ finishedAt: number().nullable(),
7710
+ error: string().nullable()
7711
+ });
7712
+ var StorageMigrationPlanSchema = object({
7713
+ destinations: StorageMigrationDestinationsSchema,
7714
+ moves: array(object({
7715
+ storageClass: StorageMigrationClassSchema,
7716
+ fromLocationId: string(),
7717
+ toLocationId: string()
7718
+ }))
7599
7719
  });
7600
7720
  /**
7601
7721
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -7647,6 +7767,21 @@ var StorageLocationSchema = object({
7647
7767
  nodeId: string().optional(),
7648
7768
  isDefault: boolean().default(false),
7649
7769
  isSystem: boolean().default(false),
7770
+ /**
7771
+ * Operator opt-in: whether consumers that BALANCE across several locations
7772
+ * of a type may write here. Recordings reads it today; event media and
7773
+ * backups are the next consumers, which is why the flag lives on the
7774
+ * location rather than in any one addon's store — nothing has to be
7775
+ * extended to add the next consumer.
7776
+ *
7777
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
7778
+ * flag existed reads back with no flag and keeps working exactly as before;
7779
+ * that is the whole compat story, and it is why no migration ships with it.
7780
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
7781
+ * disk must not silently start writing to it); the default of a type is
7782
+ * always stamped `true`.
7783
+ */
7784
+ enabled: boolean().optional(),
7650
7785
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7651
7786
  * for node-local locations it can reach) — never persisted, absent when the
7652
7787
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12079,7 +12214,8 @@ method(object({
12079
12214
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12080
12215
  /**
12081
12216
  * filesystem-browse — per-node capability for browsing the node's local
12082
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
12217
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12218
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
12083
12219
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12084
12220
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12085
12221
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -13892,6 +14028,13 @@ var MaskGridDimsSchema = object({
13892
14028
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
13893
14029
  * this one field keeps the schema additive — a rule still declares exactly
13894
14030
  * one trigger.
14031
+ *
14032
+ * AUDIO rules add no member here, for the reason occupancy added none: the
14033
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
14034
+ * mirror.ts` fails the build on a member the app cannot render) and every
14035
+ * member costs a release train. A sustained-sound rule is therefore an
14036
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
14037
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
13895
14038
  */
13896
14039
  var NcDeliverySchema = _enum([
13897
14040
  "immediate",
@@ -13906,15 +14049,32 @@ var NcDeliverySchema = _enum([
13906
14049
  * depend on a provider's raw event name or payload shape.
13907
14050
  */
13908
14051
  var NcSystemEventKindSchema = _enum([
13909
- "camera-online",
13910
- "camera-offline",
14052
+ "device-online",
14053
+ "device-offline",
14054
+ "device-disabled",
14055
+ "device-enabled",
13911
14056
  "stream-online",
13912
14057
  "stream-offline",
13913
14058
  "node-online",
13914
14059
  "node-offline",
13915
14060
  "addon-update-available",
13916
- "server-update-available"
14061
+ "server-update-available",
14062
+ "alarm-triggered",
14063
+ "alarm-armed",
14064
+ "alarm-disarmed",
14065
+ "camera-online",
14066
+ "camera-offline",
14067
+ "camera-disabled",
14068
+ "camera-enabled"
14069
+ ]);
14070
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
14071
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
14072
+ "camera-online",
14073
+ "camera-offline",
14074
+ "camera-disabled",
14075
+ "camera-enabled"
13917
14076
  ]);
14077
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
13918
14078
  /**
13919
14079
  * One coherent system-event condition. `kinds` is the required opt-in safety
13920
14080
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -13923,6 +14083,18 @@ var NcSystemEventKindSchema = _enum([
13923
14083
  var NcSystemEventConditionSchema = object({
13924
14084
  kinds: array(NcSystemEventKindSchema).min(1),
13925
14085
  deviceIds: array(number().int()).min(1).optional(),
14086
+ /**
14087
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
14088
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
14089
+ * is what a liveness rule means when nobody said otherwise.
14090
+ *
14091
+ * This is where "only my cameras" is expressed, and it lives on the rule for
14092
+ * one reason: the intake cannot know which devices this household cares
14093
+ * about, and a producer-side filter is one no operator can change. Fails
14094
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
14095
+ * does not carry) matches no `deviceTypes` list.
14096
+ */
14097
+ deviceTypes: array(string().min(1)).min(1).optional(),
13926
14098
  nodeIds: array(string().min(1)).min(1).optional(),
13927
14099
  packageNames: array(string().min(1)).min(1).optional()
13928
14100
  });
@@ -13973,6 +14145,47 @@ var NcOccupancyConditionSchema = object({
13973
14145
  sustainSeconds: number().int().min(0).max(3600).default(15)
13974
14146
  });
13975
14147
  /**
14148
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14149
+ *
14150
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
14151
+ * reference notifier uses, so an operator moving between them re-uses what
14152
+ * they already know): a rule matches when, over a sampling window of
14153
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14154
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14155
+ *
14156
+ * - `dbThreshold` — its level is at or above this many dBFS (see
14157
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14158
+ * - `labels` — the classifier put at least one of these labels on it.
14159
+ *
14160
+ * Both are OPTIONAL and independent, which is the point of the shape: a
14161
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
14162
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14163
+ * is given** — a window in which every sample is trivially a hit would fire on
14164
+ * silence, so the engine refuses such a condition rather than notifying on
14165
+ * nothing (the schema cannot express "at least one of" without becoming a
14166
+ * ZodEffects the cap path would have to special-case).
14167
+ *
14168
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
14169
+ * must be FULL before it can match — a window that has been open for two
14170
+ * seconds of its ten is 100% of nothing, and firing on it would make
14171
+ * `samplingSeconds` decorative.
14172
+ *
14173
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14174
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
14175
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
14176
+ * an operator who typed `dog` mean the same thing.
14177
+ */
14178
+ var NcAudioConditionSchema = object({
14179
+ /** Audio macro labels; absent = any sound (level-only rule). */
14180
+ labels: array(string().min(1)).min(1).optional(),
14181
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14182
+ dbThreshold: number().min(-96).max(0).optional(),
14183
+ /** Percentage of the window's samples that must be hits (1–100). */
14184
+ hitPercent: number().int().min(1).max(100).default(60),
14185
+ /** Length of the sampling window in seconds. */
14186
+ samplingSeconds: number().int().min(1).max(300).default(10)
14187
+ });
14188
+ /**
13976
14189
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
13977
14190
  *
13978
14191
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14245,7 +14458,33 @@ var NcConditionsSchema = object({
14245
14458
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14246
14459
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14247
14460
  */
14248
- occupancy: NcOccupancyConditionSchema.optional()
14461
+ occupancy: NcOccupancyConditionSchema.optional(),
14462
+ /**
14463
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
14464
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
14465
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
14466
+ * a window that is not full yet, neither filter given). See
14467
+ * {@link NcAudioCondition}.
14468
+ *
14469
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
14470
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
14471
+ * a detection, a track or a device event (the same fail-closed pairing
14472
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
14473
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
14474
+ * (an `immediate` rule naming an `audio-*` class, one notification per
14475
+ * classified sample) stays exactly as it was for rules that already use it.
14476
+ *
14477
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14478
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14479
+ * (`camstack/src/data/notification-center.ts`, guarded by
14480
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14481
+ * condition fields it does not know when a rule is saved from the phone.
14482
+ * Publishing an editor for a condition the app cannot round-trip is how an
14483
+ * operator loses a rule's conditions by opening it — so the descriptor, the
14484
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
14485
+ * does an audio rule become authorable.
14486
+ */
14487
+ audio: NcAudioConditionSchema.optional()
14249
14488
  });
14250
14489
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14251
14490
  var NcRuleTargetSchema = object({
@@ -14359,6 +14598,73 @@ var NcThrottleSchema = object({
14359
14598
  */
14360
14599
  granularity: NcThrottleGranularitySchema.optional()
14361
14600
  });
14601
+ /**
14602
+ * How long the confirm gate may hold ONE notification, and how big the picture
14603
+ * it judges may be.
14604
+ *
14605
+ * The clamp is the product decision, not a coincidence of the model: p50 was
14606
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
14607
+ * arrives after the visitor has gone is not a notification. 448 px was enough
14608
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
14609
+ * tokens for pixels the model pools away.
14610
+ */
14611
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
14612
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
14613
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
14614
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
14615
+ var NcConfirmExpectSchema = object({
14616
+ op: _enum([
14617
+ ">=",
14618
+ ">",
14619
+ "<=",
14620
+ "<",
14621
+ "=="
14622
+ ]),
14623
+ count: number().int().min(0).max(1e3)
14624
+ });
14625
+ /**
14626
+ * AI CONFIRM — a vision model looks at the picture this notification is about
14627
+ * to ship and says whether it agrees with the rule.
14628
+ *
14629
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
14630
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
14631
+ * on the operator's phone is not a verdict about this notification.
14632
+ *
14633
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
14634
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
14635
+ * the default and every fail-open is COUNTED, because a gate that always fails
14636
+ * open looks in the log exactly like a gate that works.
14637
+ *
14638
+ * Every field is `.optional()` rather than relied on as a Zod default at the
14639
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
14640
+ * production failures in one day), so the gate reads absent as the constant
14641
+ * above rather than trusting a parse it may never have seen.
14642
+ */
14643
+ var NcConfirmSchema = object({
14644
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
14645
+ * same thing, and both mean "deliver exactly as before". */
14646
+ enabled: boolean().default(false),
14647
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
14648
+ profileId: string().optional(),
14649
+ /**
14650
+ * The operator's question, in his own words. Absent = a question derived
14651
+ * from the rule (its class and its expectation).
14652
+ *
14653
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
14654
+ * banners, signage and plates as instructions if you let them reach the
14655
+ * prompt — proven live — so the authoritative contract stays in the system
14656
+ * turn and only rule-authored words land here.
14657
+ */
14658
+ prompt: string().max(1e3).optional(),
14659
+ /** Fire only when the model's count satisfies this. Absent = the model's
14660
+ * own boolean verdict decides. */
14661
+ expect: NcConfirmExpectSchema.optional(),
14662
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
14663
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
14664
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
14665
+ /** Longest edge the judged image is downscaled to before it is sent. */
14666
+ maxImagePx: number().int().min(64).max(2048).default(448)
14667
+ });
14362
14668
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14363
14669
  var NcRuleInputSchema = object({
14364
14670
  name: string().min(1).max(200),
@@ -14419,7 +14725,13 @@ var NcRuleInputSchema = object({
14419
14725
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14420
14726
  * shape as every other actuation.
14421
14727
  */
14422
- actions: NcRuleActionsSchema.optional()
14728
+ actions: NcRuleActionsSchema.optional(),
14729
+ /**
14730
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
14731
+ * a rule that predates the gate must keep delivering byte-for-byte as it
14732
+ * did, and absent is the only way to say that without a migration.
14733
+ */
14734
+ confirm: NcConfirmSchema.optional()
14423
14735
  });
14424
14736
  /**
14425
14737
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14430,7 +14742,37 @@ var NcRuleInputSchema = object({
14430
14742
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14431
14743
  * `updateRule` patch.
14432
14744
  */
14433
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
14745
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
14746
+ disabledTargetIds: array(string()).optional(),
14747
+ /**
14748
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
14749
+ *
14750
+ * It makes the key optional to SUPPLY; the parse still materialises the
14751
+ * default when the key is absent. And `NcRuleStore.update` merges with
14752
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
14753
+ * one — which made every partial edit destructive:
14754
+ *
14755
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
14756
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
14757
+ * setEnabled(ruleId, false) → conditions reset to `{}`
14758
+ *
14759
+ * A rule scoped to one camera and one zone silently became a rule that
14760
+ * matches EVERY event on EVERY camera, and lost its `media` policy
14761
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
14762
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
14763
+ * within a minute of a two-field patch.
14764
+ *
14765
+ * So every defaulted field is re-declared here WITHOUT its default. The
14766
+ * inner defaults still apply when the caller DOES send the key — `{}` for
14767
+ * conditions remains a real instruction ("clear them") — and only the
14768
+ * absent key is now genuinely absent.
14769
+ */
14770
+ enabled: boolean().optional(),
14771
+ conditions: NcConditionsSchema.optional(),
14772
+ media: NcMediaPolicySchema.optional(),
14773
+ throttle: NcThrottleSchema.optional(),
14774
+ priority: number().int().min(1).max(5).optional()
14775
+ });
14434
14776
  /** A persisted rule. */
14435
14777
  var NcRuleSchema = NcRuleInputSchema.extend({
14436
14778
  id: string(),
@@ -14731,6 +15073,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
14731
15073
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
14732
15074
  * copy would lie the first time a rule is disabled.
14733
15075
  */
15076
+ /**
15077
+ * Why a device a mode NAMES is nonetheless not armed by it.
15078
+ *
15079
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
15080
+ * per-camera notification switch the Notification Center already owns,
15081
+ * `detection-off` is the device's own detection binding being inactive, and
15082
+ * `offline` is the device manager's liveness. A fourth reason would mean a
15083
+ * fourth authority, and inventing one here is how a panel starts disagreeing
15084
+ * with the switches the operator actually used.
15085
+ */
15086
+ var NcAlarmSkipReasonSchema = _enum([
15087
+ "muted",
15088
+ "detection-off",
15089
+ "offline"
15090
+ ]);
15091
+ var NcAlarmSkippedDeviceSchema = object({
15092
+ deviceId: number().int(),
15093
+ reason: NcAlarmSkipReasonSchema
15094
+ });
14734
15095
  var NcAlarmModeCoverageSchema = object({
14735
15096
  mode: AlarmArmModeSchema,
14736
15097
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -14738,7 +15099,18 @@ var NcAlarmModeCoverageSchema = object({
14738
15099
  /** At least one covering rule has no device scope, so the mode covers all. */
14739
15100
  allDevices: boolean(),
14740
15101
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
14741
- deviceIds: array(number().int())
15102
+ deviceIds: array(number().int()),
15103
+ /**
15104
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
15105
+ * excludes it.
15106
+ *
15107
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
15108
+ * twelve makes it false in exactly the way nobody notices until an incident.
15109
+ * Defaulted to `[]` so a coverage answer computed before this field existed
15110
+ * still parses as "nothing known to be skipped" rather than failing the whole
15111
+ * alarm tab.
15112
+ */
15113
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
14742
15114
  });
14743
15115
  var NcAlarmConfigSchema = object({
14744
15116
  /**
@@ -16101,13 +16473,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16101
16473
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16102
16474
  kind: "mutation",
16103
16475
  auth: "admin"
16104
- }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
16476
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
16105
16477
  kind: "mutation",
16106
16478
  auth: "admin"
16107
- }), method(object({}), array(RelocateJobSchema).readonly(), {
16108
- kind: "query",
16479
+ }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
16480
+ kind: "mutation",
16109
16481
  auth: "admin"
16110
- }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16482
+ }), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
16483
+ kind: "mutation",
16484
+ auth: "admin"
16485
+ }), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
16486
+ kind: "mutation",
16487
+ auth: "admin"
16488
+ }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16111
16489
  kind: "mutation",
16112
16490
  auth: "admin"
16113
16491
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
@@ -17531,9 +17909,16 @@ var CameraStatusSchema = object({
17531
17909
  audio: CameraAudioStatusSchema.nullable(),
17532
17910
  recording: CameraRecordingStatusSchema.nullable(),
17533
17911
  /**
17534
- * Per-camera function switches an OPERATOR has turned off
17912
+ * Per-camera functions an OPERATOR has turned off
17535
17913
  * ([D61](../../../../docs/decisions/adr-0067.md)).
17536
17914
  *
17915
+ * Composed from the AUTHORITIES themselves — the wrapper bindings,
17916
+ * `RecordingConfig.enabled`, the notification mute, the broker's audio
17917
+ * policy, the camera's own microphone — via `composeSwitchedOff`, not from
17918
+ * the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
17919
+ * The badge outlives the control panel: the panel was a convenience, this is
17920
+ * the difference between a camera being off and a camera being dead.
17921
+ *
17537
17922
  * This is the difference between DISABLED and BROKEN. A camera whose
17538
17923
  * `detection` block reports zero fps and whose `switchedOff` contains
17539
17924
  * `'object-detection'` was switched off by a person; the same camera with an
@@ -17604,7 +17989,13 @@ var NodeInferenceDevicesSchema = object({
17604
17989
  reachable: boolean(),
17605
17990
  devices: array(NodeInferenceDeviceSchema).readonly()
17606
17991
  });
17607
- method(object({
17992
+ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
17993
+ kind: "mutation",
17994
+ auth: "admin"
17995
+ }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
17996
+ kind: "mutation",
17997
+ auth: "admin"
17998
+ }), method(object({
17608
17999
  deviceId: number(),
17609
18000
  agentNodeId: string()
17610
18001
  }), object({ success: literal(true) }), {
@@ -18278,6 +18669,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
18278
18669
  locationId: string(),
18279
18670
  targetBytes: number().int().positive()
18280
18671
  }), EvictResultSchema, { kind: "mutation" });
18672
+ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
18673
+ kind: "mutation",
18674
+ auth: "admin"
18675
+ }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
18676
+ kind: "mutation",
18677
+ auth: "admin"
18678
+ });
18281
18679
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
18282
18680
  providerId: string().min(1),
18283
18681
  displayName: string().min(1),
@@ -18381,6 +18779,28 @@ var TerminalProfileInfoSchema = object({
18381
18779
  label: string(),
18382
18780
  description: string().optional()
18383
18781
  });
18782
+ /**
18783
+ * A durable operator-created Terminal instance. Profiles are templates; only
18784
+ * an instance declares a camera.
18785
+ */
18786
+ var TerminalInstanceInfoSchema = object({
18787
+ instanceId: string(),
18788
+ cameraStableId: string(),
18789
+ nodeId: string(),
18790
+ profileId: string(),
18791
+ profileLabel: string(),
18792
+ name: string(),
18793
+ enabled: boolean()
18794
+ });
18795
+ var TerminalLegacyCameraSchema = object({
18796
+ stableId: string(),
18797
+ nodeId: string(),
18798
+ profileId: string(),
18799
+ profileLabel: string(),
18800
+ name: string(),
18801
+ /** Only legacy monitor cameras can retain their historic stable identity. */
18802
+ adoptable: boolean()
18803
+ });
18384
18804
  var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
18385
18805
  seq: number().int().positive(),
18386
18806
  kind: literal("data"),
@@ -18397,7 +18817,29 @@ var TerminalOutputBatchSchema = object({
18397
18817
  snapshot: string().optional(),
18398
18818
  events: array(TerminalOutputEventSchema).readonly()
18399
18819
  });
18400
- method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
18820
+ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
18821
+ targetNodeId: string().min(1),
18822
+ profileId: string().min(1),
18823
+ name: string().trim().min(1).max(160).optional()
18824
+ }), TerminalInstanceInfoSchema, {
18825
+ kind: "mutation",
18826
+ auth: "admin"
18827
+ }), method(object({ instanceId: string().min(1) }), _void(), {
18828
+ kind: "mutation",
18829
+ auth: "admin"
18830
+ }), method(object({
18831
+ instanceId: string().min(1),
18832
+ enabled: boolean()
18833
+ }), TerminalInstanceInfoSchema, {
18834
+ kind: "mutation",
18835
+ auth: "admin"
18836
+ }), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
18837
+ stableId: string().min(1),
18838
+ name: string().trim().min(1).max(160).optional()
18839
+ }), TerminalInstanceInfoSchema, {
18840
+ kind: "mutation",
18841
+ auth: "admin"
18842
+ }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
18401
18843
  profileId: string(),
18402
18844
  cols: number().int().positive(),
18403
18845
  rows: number().int().positive()
@@ -18414,7 +18856,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
18414
18856
  }), method(object({
18415
18857
  sessionId: string(),
18416
18858
  afterSeq: number().int().nonnegative(),
18417
- waitMs: number().int().min(0).max(2e3).default(0)
18859
+ waitMs: number().int().min(0).max(2e3).default(0),
18860
+ /**
18861
+ * Wait when a just-opened session has no output yet. Kept opt-in so a
18862
+ * browser's initial repaint remains immediate; the camera snapshot
18863
+ * relay uses it to avoid encoding a blank startup frame.
18864
+ */
18865
+ waitForOutput: boolean().optional()
18418
18866
  }), TerminalOutputBatchSchema, {
18419
18867
  kind: "mutation",
18420
18868
  auth: "admin",
@@ -20355,6 +20803,7 @@ var FaceInfoSchema = object({
20355
20803
  var FaceFilterEnum = _enum([
20356
20804
  "unassigned",
20357
20805
  "recognized",
20806
+ "identified",
20358
20807
  "all"
20359
20808
  ]);
20360
20809
  var MediaFileLiteSchema$1 = object({
@@ -20383,6 +20832,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
20383
20832
  kind: "mutation",
20384
20833
  auth: "admin"
20385
20834
  }), method(object({
20835
+ /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
20836
+ deviceId: number().int().optional(),
20386
20837
  limit: number().int().positive().optional(),
20387
20838
  filter: FaceFilterEnum.optional(),
20388
20839
  /**
@@ -22148,6 +22599,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
22148
22599
  capName: string().min(1).max(64),
22149
22600
  /** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
22150
22601
  valuePath: string().min(1).max(64)
22602
+ }),
22603
+ object({
22604
+ kind: literal("latest-recognition"),
22605
+ recognition: _enum(["person", "plate"])
22151
22606
  })
22152
22607
  ]);
22153
22608
  var OsdSlotBindingSchema = object({
@@ -22253,6 +22708,15 @@ method(object({ deviceId: number().int() }), object({
22253
22708
  }), object({ success: literal(true) }), {
22254
22709
  kind: "mutation",
22255
22710
  auth: "admin"
22711
+ }), method(object({
22712
+ sourceDeviceId: number().int(),
22713
+ targetDeviceId: number().int()
22714
+ }), object({
22715
+ copied: number().int().nonnegative(),
22716
+ skipped: number().int().nonnegative()
22717
+ }), {
22718
+ kind: "mutation",
22719
+ auth: "admin"
22256
22720
  }), method(object({
22257
22721
  deviceId: number().int(),
22258
22722
  slotId: string().min(1),
@@ -22963,7 +23427,19 @@ var RecordingManifestSchema = object({
22963
23427
  * profiles/subtrees/locations on this node). */
22964
23428
  var RecordingDeviceUsageSchema = object({
22965
23429
  deviceId: number(),
22966
- usedBytes: number()
23430
+ usedBytes: number(),
23431
+ /**
23432
+ * Start of this camera's OLDEST indexed segment, across every profile and
23433
+ * location — the "Oldest footage" column in Recordings → Storage, and the
23434
+ * only honest answer to "is retention actually holding?" per camera.
23435
+ *
23436
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
23437
+ * predates this field omits it entirely, and a hub whose types carry the
23438
+ * field must keep validating that older provider's payload: the framework
23439
+ * (types) and the addon ship on different trains, and the addon is usually
23440
+ * the later of the two.
23441
+ */
23442
+ oldestMs: number().nullable().optional()
22967
23443
  });
22968
23444
  /** Recording storage usage + capacity for one storage location. */
22969
23445
  var RecordingLocationUsageSchema = object({
@@ -22991,6 +23467,57 @@ var RecordingStorageUsageSchema = object({
22991
23467
  locations: array(RecordingLocationUsageSchema)
22992
23468
  });
22993
23469
  /**
23470
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
23471
+ *
23472
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
23473
+ * is the operator asking for the EXISTING archive to be brought into line with
23474
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
23475
+ * location, run FIFO behind the single-flight mover.
23476
+ *
23477
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
23478
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
23479
+ * (empty on the plan).
23480
+ */
23481
+ var RecordingRebalanceMoveSchema = object({
23482
+ deviceId: number(),
23483
+ profile: string(),
23484
+ fromLocationId: string(),
23485
+ toLocationId: string(),
23486
+ bytes: number(),
23487
+ files: number().int()
23488
+ });
23489
+ /** Why a pile that is out of place is staying there. Every refusal is
23490
+ * reported: a rebalance that silently drops a camera reads exactly like one
23491
+ * that had nothing to do. */
23492
+ var RecordingRebalanceSkipReasonSchema = _enum([
23493
+ "unassigned",
23494
+ "target-not-writable",
23495
+ "below-threshold",
23496
+ "no-headroom"
23497
+ ]);
23498
+ var RecordingRebalanceSkipSchema = object({
23499
+ deviceId: number(),
23500
+ profile: string(),
23501
+ fromLocationId: string(),
23502
+ /** The location the plan wants; null when the camera has no assignment. */
23503
+ toLocationId: string().nullable(),
23504
+ bytes: number(),
23505
+ reason: RecordingRebalanceSkipReasonSchema
23506
+ });
23507
+ var RecordingRebalancePlanSchema = object({
23508
+ moves: array(RecordingRebalanceMoveSchema),
23509
+ skipped: array(RecordingRebalanceSkipSchema),
23510
+ bytesToMove: number(),
23511
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
23512
+ jobIds: array(string())
23513
+ });
23514
+ var RecordingRebalanceInputSchema = object({
23515
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
23516
+ throttleMbps: number().min(1).max(1e3).optional(),
23517
+ /** Ignore piles smaller than this (default 1 GB). */
23518
+ minMoveGb: number().min(0).optional()
23519
+ });
23520
+ /**
22994
23521
  * Result of locating footage at a wall-clock instant for one device/profile.
22995
23522
  * `segment` carries the covering segment's window; `gap` reports the forward
22996
23523
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -23138,6 +23665,21 @@ method(object({
23138
23665
  }), {
23139
23666
  kind: "mutation",
23140
23667
  auth: "admin"
23668
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
23669
+ kind: "mutation",
23670
+ auth: "admin"
23671
+ }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
23672
+ kind: "mutation",
23673
+ auth: "admin"
23674
+ }), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
23675
+ kind: "mutation",
23676
+ auth: "admin"
23677
+ }), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
23678
+ kind: "mutation",
23679
+ auth: "admin"
23680
+ }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23681
+ kind: "mutation",
23682
+ auth: "admin"
23141
23683
  }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
23142
23684
  kind: "mutation",
23143
23685
  auth: "admin"
@@ -23147,9 +23689,15 @@ method(object({
23147
23689
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23148
23690
  kind: "mutation",
23149
23691
  auth: "admin"
23692
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23693
+ kind: "query",
23694
+ auth: "admin"
23695
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23696
+ kind: "mutation",
23697
+ auth: "admin"
23150
23698
  });
23151
23699
  /**
23152
- * `recordingExport` cap — render a footage time range into a single downloadable
23700
+ * `recording-export` cap — render a footage time range into a single downloadable
23153
23701
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
23154
23702
  * bounded lifetime with a durable history, auto-expiry, and optional
23155
23703
  * delete-after-download.
@@ -23164,10 +23712,42 @@ method(object({
23164
23712
  */
23165
23713
  /** Playback-speed multiplier for the render (1 = realtime). */
23166
23714
  var ExportSpeedSchema = number().min(.25).max(32);
23715
+ /**
23716
+ * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23717
+ *
23718
+ * Relative and not absolute epoch on purpose: the renderer's frame-select
23719
+ * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23720
+ * playlist. Handing it absolute epochs would make every call site responsible
23721
+ * for the same subtraction, and the one that forgot would emit a filter that
23722
+ * selects nothing — silently, as a uniform timelapse.
23723
+ */
23724
+ var ExportDenseRangeSchema = object({
23725
+ fromSec: number().nonnegative(),
23726
+ toSec: number().nonnegative()
23727
+ }).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
23728
+ /**
23729
+ * Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
23730
+ * listed ranges and at the base `everyMs` everywhere else.
23731
+ *
23732
+ * `everyMs` must be strictly smaller than the base cadence — a dense rate that
23733
+ * is not denser renders a uniform timelapse the operator believes is two-rate.
23734
+ */
23735
+ var ExportDenseSchema = object({
23736
+ everyMs: number().int().positive(),
23737
+ ranges: array(ExportDenseRangeSchema).min(1).max(200)
23738
+ });
23167
23739
  /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
23168
23740
  var ExportTimelapseSchema = object({
23169
23741
  everyMs: number().int().positive(),
23170
- outputFps: number().int().min(1).max(60).optional()
23742
+ outputFps: number().int().min(1).max(60).optional(),
23743
+ /** Optional second, FASTER rate over the intervals that matter. */
23744
+ dense: ExportDenseSchema.optional()
23745
+ }).superRefine((v, ctx) => {
23746
+ if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
23747
+ code: ZodIssueCode.custom,
23748
+ message: "dense.everyMs must be strictly smaller than the base everyMs",
23749
+ path: ["dense", "everyMs"]
23750
+ });
23171
23751
  });
23172
23752
  /**
23173
23753
  * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
@@ -23225,6 +23805,19 @@ var ExportDownloadSchema = object({
23225
23805
  url: string(),
23226
23806
  endpoints: array(string())
23227
23807
  });
23808
+ /**
23809
+ * A finished export's bytes, inline.
23810
+ *
23811
+ * `bytes` is the DECODED length — the number the caller bounds and logs
23812
+ * against, so nobody has to infer it from the base64 length.
23813
+ */
23814
+ var ExportBytesSchema = object({
23815
+ base64: string(),
23816
+ contentType: string(),
23817
+ /** Suggested filename, extension included. */
23818
+ name: string(),
23819
+ bytes: number().int().nonnegative()
23820
+ });
23228
23821
  method(object({
23229
23822
  deviceId: number(),
23230
23823
  profile: string(),
@@ -23249,6 +23842,9 @@ method(object({
23249
23842
  }), method(object({ exportId: string() }), ExportDownloadSchema, {
23250
23843
  kind: "query",
23251
23844
  auth: "protected"
23845
+ }), method(object({ exportId: string() }), ExportBytesSchema, {
23846
+ kind: "query",
23847
+ auth: "protected"
23252
23848
  });
23253
23849
  /**
23254
23850
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -27266,6 +27862,12 @@ Object.freeze({
27266
27862
  addonId: null,
27267
27863
  access: "delete"
27268
27864
  },
27865
+ "osdManager.copyDeviceConfiguration": {
27866
+ capName: "osd-manager",
27867
+ capScope: "system",
27868
+ addonId: null,
27869
+ access: "create"
27870
+ },
27269
27871
  "osdManager.getConditionSupport": {
27270
27872
  capName: "osd-manager",
27271
27873
  capScope: "system",
@@ -27362,7 +27964,7 @@ Object.freeze({
27362
27964
  addonId: null,
27363
27965
  access: "create"
27364
27966
  },
27365
- "pipelineAnalytics.cancelMediaRelocate": {
27967
+ "pipelineAnalytics.cancelStorageMigrationMove": {
27366
27968
  capName: "pipeline-analytics",
27367
27969
  capScope: "device",
27368
27970
  addonId: null,
@@ -27434,12 +28036,6 @@ Object.freeze({
27434
28036
  addonId: null,
27435
28037
  access: "view"
27436
28038
  },
27437
- "pipelineAnalytics.getMediaRelocateStatus": {
27438
- capName: "pipeline-analytics",
27439
- capScope: "device",
27440
- addonId: null,
27441
- access: "view"
27442
- },
27443
28039
  "pipelineAnalytics.getMotionEvents": {
27444
28040
  capName: "pipeline-analytics",
27445
28041
  capScope: "device",
@@ -27476,6 +28072,12 @@ Object.freeze({
27476
28072
  addonId: null,
27477
28073
  access: "view"
27478
28074
  },
28075
+ "pipelineAnalytics.getStorageMigrationMoveStatus": {
28076
+ capName: "pipeline-analytics",
28077
+ capScope: "device",
28078
+ addonId: null,
28079
+ access: "view"
28080
+ },
27479
28081
  "pipelineAnalytics.getTrack": {
27480
28082
  capName: "pipeline-analytics",
27481
28083
  capScope: "device",
@@ -27554,6 +28156,12 @@ Object.freeze({
27554
28156
  addonId: null,
27555
28157
  access: "view"
27556
28158
  },
28159
+ "pipelineAnalytics.pauseForStorageMigration": {
28160
+ capName: "pipeline-analytics",
28161
+ capScope: "device",
28162
+ addonId: null,
28163
+ access: "create"
28164
+ },
27557
28165
  "pipelineAnalytics.proposeRetrainAnnotations": {
27558
28166
  capName: "pipeline-analytics",
27559
28167
  capScope: "device",
@@ -27584,7 +28192,7 @@ Object.freeze({
27584
28192
  addonId: null,
27585
28193
  access: "create"
27586
28194
  },
27587
- "pipelineAnalytics.relocateMedia": {
28195
+ "pipelineAnalytics.refreshStorageLocationsForMigration": {
27588
28196
  capName: "pipeline-analytics",
27589
28197
  capScope: "device",
27590
28198
  addonId: null,
@@ -27596,6 +28204,12 @@ Object.freeze({
27596
28204
  addonId: null,
27597
28205
  access: "create"
27598
28206
  },
28207
+ "pipelineAnalytics.resumeForStorageMigration": {
28208
+ capName: "pipeline-analytics",
28209
+ capScope: "device",
28210
+ addonId: null,
28211
+ access: "create"
28212
+ },
27599
28213
  "pipelineAnalytics.saveRetrainAnnotations": {
27600
28214
  capName: "pipeline-analytics",
27601
28215
  capScope: "device",
@@ -27620,6 +28234,12 @@ Object.freeze({
27620
28234
  addonId: null,
27621
28235
  access: "create"
27622
28236
  },
28237
+ "pipelineAnalytics.startStorageMigrationMove": {
28238
+ capName: "pipeline-analytics",
28239
+ capScope: "device",
28240
+ addonId: null,
28241
+ access: "create"
28242
+ },
27623
28243
  "pipelineAnalytics.wipeAllAnalytics": {
27624
28244
  capName: "pipeline-analytics",
27625
28245
  capScope: "device",
@@ -27986,6 +28606,12 @@ Object.freeze({
27986
28606
  addonId: null,
27987
28607
  access: "view"
27988
28608
  },
28609
+ "pipelineOrchestrator.pauseForStorageMigration": {
28610
+ capName: "pipeline-orchestrator",
28611
+ capScope: "system",
28612
+ addonId: null,
28613
+ access: "create"
28614
+ },
27989
28615
  "pipelineOrchestrator.rebalance": {
27990
28616
  capName: "pipeline-orchestrator",
27991
28617
  capScope: "system",
@@ -28010,6 +28636,12 @@ Object.freeze({
28010
28636
  addonId: null,
28011
28637
  access: "view"
28012
28638
  },
28639
+ "pipelineOrchestrator.resumeForStorageMigration": {
28640
+ capName: "pipeline-orchestrator",
28641
+ capScope: "system",
28642
+ addonId: null,
28643
+ access: "create"
28644
+ },
28013
28645
  "pipelineOrchestrator.saveTemplate": {
28014
28646
  capName: "pipeline-orchestrator",
28015
28647
  capScope: "system",
@@ -28406,7 +29038,13 @@ Object.freeze({
28406
29038
  addonId: null,
28407
29039
  access: "create"
28408
29040
  },
28409
- "recording.cancelRelocate": {
29041
+ "recording.cancelRelocateJob": {
29042
+ capName: "recording",
29043
+ capScope: "system",
29044
+ addonId: null,
29045
+ access: "create"
29046
+ },
29047
+ "recording.cancelStorageMigrationMove": {
28410
29048
  capName: "recording",
28411
29049
  capScope: "system",
28412
29050
  addonId: null,
@@ -28442,7 +29080,7 @@ Object.freeze({
28442
29080
  addonId: null,
28443
29081
  access: "view"
28444
29082
  },
28445
- "recording.getRelocateStatus": {
29083
+ "recording.getStorageMigrationMoveStatus": {
28446
29084
  capName: "recording",
28447
29085
  capScope: "system",
28448
29086
  addonId: null,
@@ -28460,12 +29098,30 @@ Object.freeze({
28460
29098
  addonId: null,
28461
29099
  access: "view"
28462
29100
  },
29101
+ "recording.listRelocateJobs": {
29102
+ capName: "recording",
29103
+ capScope: "system",
29104
+ addonId: null,
29105
+ access: "view"
29106
+ },
28463
29107
  "recording.locateSegment": {
28464
29108
  capName: "recording",
28465
29109
  capScope: "system",
28466
29110
  addonId: null,
28467
29111
  access: "view"
28468
29112
  },
29113
+ "recording.pauseForStorageMigration": {
29114
+ capName: "recording",
29115
+ capScope: "system",
29116
+ addonId: null,
29117
+ access: "create"
29118
+ },
29119
+ "recording.planStorageRebalance": {
29120
+ capName: "recording",
29121
+ capScope: "system",
29122
+ addonId: null,
29123
+ access: "view"
29124
+ },
28469
29125
  "recording.pruneFootage": {
28470
29126
  capName: "recording",
28471
29127
  capScope: "system",
@@ -28484,6 +29140,12 @@ Object.freeze({
28484
29140
  addonId: null,
28485
29141
  access: "view"
28486
29142
  },
29143
+ "recording.refreshStorageLocationsForMigration": {
29144
+ capName: "recording",
29145
+ capScope: "system",
29146
+ addonId: null,
29147
+ access: "create"
29148
+ },
28487
29149
  "recording.relocateFootage": {
28488
29150
  capName: "recording",
28489
29151
  capScope: "system",
@@ -28508,44 +29170,68 @@ Object.freeze({
28508
29170
  addonId: null,
28509
29171
  access: "create"
28510
29172
  },
29173
+ "recording.resumeForStorageMigration": {
29174
+ capName: "recording",
29175
+ capScope: "system",
29176
+ addonId: null,
29177
+ access: "create"
29178
+ },
28511
29179
  "recording.setDeviceConfig": {
28512
29180
  capName: "recording",
28513
29181
  capScope: "system",
28514
29182
  addonId: null,
28515
29183
  access: "create"
28516
29184
  },
29185
+ "recording.startStorageMigrationMove": {
29186
+ capName: "recording",
29187
+ capScope: "system",
29188
+ addonId: null,
29189
+ access: "create"
29190
+ },
29191
+ "recording.startStorageRebalance": {
29192
+ capName: "recording",
29193
+ capScope: "system",
29194
+ addonId: null,
29195
+ access: "create"
29196
+ },
28517
29197
  "recordingExport.cancelExport": {
28518
- capName: "recordingExport",
29198
+ capName: "recording-export",
28519
29199
  capScope: "system",
28520
29200
  addonId: null,
28521
29201
  access: "create"
28522
29202
  },
28523
29203
  "recordingExport.createExport": {
28524
- capName: "recordingExport",
29204
+ capName: "recording-export",
28525
29205
  capScope: "system",
28526
29206
  addonId: null,
28527
29207
  access: "create"
28528
29208
  },
28529
29209
  "recordingExport.deleteExport": {
28530
- capName: "recordingExport",
29210
+ capName: "recording-export",
28531
29211
  capScope: "system",
28532
29212
  addonId: null,
28533
29213
  access: "delete"
28534
29214
  },
28535
29215
  "recordingExport.getDownloadUrl": {
28536
- capName: "recordingExport",
29216
+ capName: "recording-export",
28537
29217
  capScope: "system",
28538
29218
  addonId: null,
28539
29219
  access: "view"
28540
29220
  },
28541
29221
  "recordingExport.getExport": {
28542
- capName: "recordingExport",
29222
+ capName: "recording-export",
28543
29223
  capScope: "system",
28544
29224
  addonId: null,
28545
29225
  access: "view"
28546
29226
  },
28547
29227
  "recordingExport.listExports": {
28548
- capName: "recordingExport",
29228
+ capName: "recording-export",
29229
+ capScope: "system",
29230
+ addonId: null,
29231
+ access: "view"
29232
+ },
29233
+ "recordingExport.readExportBytes": {
29234
+ capName: "recording-export",
28549
29235
  capScope: "system",
28550
29236
  addonId: null,
28551
29237
  access: "view"
@@ -28904,6 +29590,30 @@ Object.freeze({
28904
29590
  addonId: null,
28905
29591
  access: "view"
28906
29592
  },
29593
+ "storageMigration.cancel": {
29594
+ capName: "storage-migration",
29595
+ capScope: "system",
29596
+ addonId: null,
29597
+ access: "create"
29598
+ },
29599
+ "storageMigration.plan": {
29600
+ capName: "storage-migration",
29601
+ capScope: "system",
29602
+ addonId: null,
29603
+ access: "view"
29604
+ },
29605
+ "storageMigration.start": {
29606
+ capName: "storage-migration",
29607
+ capScope: "system",
29608
+ addonId: null,
29609
+ access: "create"
29610
+ },
29611
+ "storageMigration.status": {
29612
+ capName: "storage-migration",
29613
+ capScope: "system",
29614
+ addonId: null,
29615
+ access: "view"
29616
+ },
28907
29617
  "storageProvider.abortUpload": {
28908
29618
  capName: "storage-provider",
28909
29619
  capScope: "system",
@@ -29282,12 +29992,42 @@ Object.freeze({
29282
29992
  addonId: null,
29283
29993
  access: "create"
29284
29994
  },
29995
+ "terminalSession.adoptLegacyMonitor": {
29996
+ capName: "terminal-session",
29997
+ capScope: "system",
29998
+ addonId: null,
29999
+ access: "create"
30000
+ },
29285
30001
  "terminalSession.close": {
29286
30002
  capName: "terminal-session",
29287
30003
  capScope: "system",
29288
30004
  addonId: null,
29289
30005
  access: "create"
29290
30006
  },
30007
+ "terminalSession.createInstance": {
30008
+ capName: "terminal-session",
30009
+ capScope: "system",
30010
+ addonId: null,
30011
+ access: "create"
30012
+ },
30013
+ "terminalSession.deleteInstance": {
30014
+ capName: "terminal-session",
30015
+ capScope: "system",
30016
+ addonId: null,
30017
+ access: "delete"
30018
+ },
30019
+ "terminalSession.listInstances": {
30020
+ capName: "terminal-session",
30021
+ capScope: "system",
30022
+ addonId: null,
30023
+ access: "view"
30024
+ },
30025
+ "terminalSession.listLegacyCameras": {
30026
+ capName: "terminal-session",
30027
+ capScope: "system",
30028
+ addonId: null,
30029
+ access: "view"
30030
+ },
29291
30031
  "terminalSession.listProfiles": {
29292
30032
  capName: "terminal-session",
29293
30033
  capScope: "system",
@@ -29318,6 +30058,12 @@ Object.freeze({
29318
30058
  addonId: null,
29319
30059
  access: "create"
29320
30060
  },
30061
+ "terminalSession.setInstanceEnabled": {
30062
+ capName: "terminal-session",
30063
+ capScope: "system",
30064
+ addonId: null,
30065
+ access: "create"
30066
+ },
29321
30067
  "terminalSession.writeInput": {
29322
30068
  capName: "terminal-session",
29323
30069
  capScope: "system",
@@ -29862,6 +30608,104 @@ var FramerateField = number().int().min(1).max(60);
29862
30608
  var TargetsField = array(NcRuleTargetSchema).min(1);
29863
30609
  var PriorityField = number().int().min(1).max(5);
29864
30610
  /**
30611
+ * Explicit override of the DENSE sampling cadence, seconds.
30612
+ *
30613
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
30614
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
30615
+ * made that same base 3 s and rendered a person pass as two frames.)
30616
+ *
30617
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
30618
+ * `denseCadenceSec` and played at `framerate` occupies
30619
+ *
30620
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
30621
+ *
30622
+ * 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.
30623
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
30624
+ * and therefore the length of a quiet night, does not move.
30625
+ *
30626
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
30627
+ * the recording has them returns the same frames, requested twice. Must be
30628
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
30629
+ * a uniform video the operator believes is two-rate — and upsert refuses it
30630
+ * rather than letting the export cap reject the render hours after the window.
30631
+ */
30632
+ var DenseCadenceSecField = number().min(.1).max(3600);
30633
+ /**
30634
+ * Minimum seconds of OUTPUT video each detection range must occupy.
30635
+ *
30636
+ * The operator-facing form of the arithmetic above: instead of solving for a
30637
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
30638
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
30639
+ * that range every ~583 ms.
30640
+ *
30641
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
30642
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
30643
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
30644
+ * ranges are sampled denser than they need. Per-range cadences require a cap
30645
+ * schema change and are the tracked follow-up.
30646
+ *
30647
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
30648
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
30649
+ * by real footage, never met by duplicating frames into motion that never
30650
+ * happened.
30651
+ */
30652
+ var MinDwellSecField = number().min(0).max(60);
30653
+ /**
30654
+ * Caption burned into the notification's preview frame.
30655
+ *
30656
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
30657
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
30658
+ * templating dialect for one field would be a second thing to explain.
30659
+ *
30660
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
30661
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
30662
+ * the reason this is not `.min(1)`.
30663
+ */
30664
+ var PreviewTextField = string().max(200);
30665
+ /**
30666
+ * Whether the notification's preview is a STILL or a short animation.
30667
+ *
30668
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
30669
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
30670
+ * night reads better as three seconds of motion than as one frame of it. Both
30671
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
30672
+ * simply applies it to a dozen frames sampled across the render and assembles
30673
+ * them.
30674
+ *
30675
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
30676
+ * seeks and a palette pass, and no rule that never asked for one should start
30677
+ * paying that on the deploy that shipped it.
30678
+ *
30679
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
30680
+ */
30681
+ var PreviewModeField = _enum(["image", "gif"]);
30682
+ /**
30683
+ * Which detection classes the notification reports counts for.
30684
+ *
30685
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
30686
+ * plan — no second query — aggregated per class. Absent or empty means "every
30687
+ * class the window actually contained", which is what an operator who never
30688
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
30689
+ * counts cars all night).
30690
+ *
30691
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
30692
+ * …). An unknown name simply never matches and reports nothing — it is not an
30693
+ * error, because a rule may legitimately name a class this camera's model does
30694
+ * not emit.
30695
+ *
30696
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
30697
+ * - `{{detections}}` — total over the reported classes
30698
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
30699
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
30700
+ * one per class, `count_` + the class name
30701
+ *
30702
+ * With NO custom body template the summary is appended to the derived body, and
30703
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
30704
+ * reads. With a custom template the operator owns every word — nothing is
30705
+ * appended, so `{{detectionSummary}}` is how he asks for it.
30706
+ */
30707
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
30708
+ /**
29865
30709
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
29866
30710
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
29867
30711
  * here (see the ownership note above).
@@ -29881,9 +30725,30 @@ var TimelapseRuleInputSchema = object({
29881
30725
  cadenceSec: CadenceSecField.default(15),
29882
30726
  /** Output frames per second of the assembled mp4 (predecessor parity). */
29883
30727
  framerate: FramerateField.default(10),
30728
+ /**
30729
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
30730
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
30731
+ * field gets.
30732
+ */
30733
+ denseCadenceSec: DenseCadenceSecField.optional(),
30734
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
30735
+ minDwellSec: MinDwellSecField.optional(),
29884
30736
  /** `notification-output` targets the finished video/thumbnail is sent to. */
29885
30737
  targets: TargetsField,
29886
30738
  template: TimelapseTemplateSchema.optional(),
30739
+ /**
30740
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
30741
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
30742
+ *
30743
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
30744
+ * the notification's title/body, and clearing it (`template: null`) must not
30745
+ * silently clear the caption too.
30746
+ */
30747
+ previewText: PreviewTextField.optional(),
30748
+ /** Still or animation — see {@link PreviewModeField}. */
30749
+ previewMode: PreviewModeField.default("image"),
30750
+ /** Classes the notification counts — see {@link ReportClassesField}. */
30751
+ reportClasses: ReportClassesField.optional(),
29887
30752
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
29888
30753
  priority: PriorityField.default(3)
29889
30754
  });
@@ -29894,8 +30759,13 @@ object({
29894
30759
  schedule: NcScheduleSchema.optional(),
29895
30760
  cadenceSec: CadenceSecField.optional(),
29896
30761
  framerate: FramerateField.optional(),
30762
+ denseCadenceSec: DenseCadenceSecField.optional(),
30763
+ minDwellSec: MinDwellSecField.optional(),
29897
30764
  targets: TargetsField.optional(),
29898
30765
  template: TimelapseTemplateSchema.nullable().optional(),
30766
+ previewText: PreviewTextField.optional(),
30767
+ previewMode: PreviewModeField.optional(),
30768
+ reportClasses: ReportClassesField.optional(),
29899
30769
  priority: PriorityField.optional()
29900
30770
  });
29901
30771
  TimelapseRuleInputSchema.extend({
@@ -29907,10 +30777,28 @@ TimelapseRuleInputSchema.extend({
29907
30777
  */
29908
30778
  ownerUserId: string().optional(),
29909
30779
  /**
29910
- * Epoch-ms of the last successful generation the 1-hour re-generation
29911
- * guard's durable state (predecessor parity). Absent = never generated.
30780
+ * Epoch-ms of the NEWEST successful generation across every camera of this
30781
+ * rule. What a UI shows, and the compatibility floor for
30782
+ * {@link readTimelapseGeneratedAt}. Absent = never generated.
29912
30783
  */
29913
30784
  lastGeneratedAt: number().optional(),
30785
+ /**
30786
+ * PER-CAMERA generation state, keyed by `String(deviceId)` — the
30787
+ * re-generation guard's real durable state.
30788
+ *
30789
+ * One rule covers several cameras and each renders its own video, so a rule
30790
+ * -wide stamp is wrong in the direction that DESTROYS work: camera A
30791
+ * succeeding at 06:05 tells camera B, whose render failed, that it is
30792
+ * already done — and B's night is gone for good, because the window will not
30793
+ * come back.
30794
+ *
30795
+ * ADDITIVE, so the migration is free: a row written before this field simply
30796
+ * has no map, and {@link readTimelapseGeneratedAt} falls back to
30797
+ * {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
30798
+ * "never generated" would re-render and re-notify every camera of every rule
30799
+ * once, on the deploy that shipped the map.
30800
+ */
30801
+ generatedByDevice: record(string(), number()).optional(),
29914
30802
  /** userId of the caller who created the rule (server-stamped). */
29915
30803
  createdBy: string(),
29916
30804
  createdAt: number(),