@camstack/addon-provider-ecowitt 0.2.11 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +936 -48
  2. package/dist/addon.mjs +936 -48
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -7221,8 +7221,31 @@ var AdoptionJobSchema = object({
7221
7221
  error: string().nullable()
7222
7222
  });
7223
7223
  /**
7224
- * Per-camera FUNCTION SWITCHES — the one coherent on/off surface over the
7225
- * pipeline functions an operator thinks in terms of.
7224
+ * Per-camera FUNCTION SWITCHES.
7225
+ *
7226
+ * ## The aggregate group is being withdrawn — the BADGE is not (D113)
7227
+ *
7228
+ * This file shipped as "the one coherent on/off surface over the pipeline
7229
+ * functions an operator thinks in terms of". The operator's verdict on
7230
+ * 2026-08-12 was that the coherent surface bought complexity and no clarity:
7231
+ * every function already had a settings page of its own, and a second place to
7232
+ * turn it off is a second place to look. Each switch is going back to its own
7233
+ * component's original options — detection to the detection-pipeline wrapper
7234
+ * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
7235
+ * (which was always first-class; the switch was a veneer over
7236
+ * `recording.setDeviceConfig`), notifications to a notification-center
7237
+ * per-device setting, the two camera planes to their own components.
7238
+ *
7239
+ * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
7240
+ * thing that lets a status surface say DISABLED instead of BROKEN, recomposed
7241
+ * straight from the authorities with no group in the middle. That rule was
7242
+ * never about a control panel.
7243
+ *
7244
+ * Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
7245
+ * {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
7246
+ * `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
7247
+ * viewers (v1.0.305) and the admin UI still call it. It is deleted when they
7248
+ * stop; nothing new may be built on it.
7226
7249
  *
7227
7250
  * ## This file adds no state
7228
7251
  *
@@ -7567,14 +7590,21 @@ var RecordingConfigSchema = object({
7567
7590
  /**
7568
7591
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
7569
7592
  *
7570
- * One shape shared by the recorder's `relocateFootage` (segments) and
7571
- * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7572
- * page renders both movers with one component. Jobs are in-RAM (a restart
7573
- * forgets them re-running is safe by construction: copy-if-absent, delete
7574
- * after verify) and each completed/failed run also lands one durable ops-log
7575
- * row on the owning addon's surface.
7593
+ * One shape shared by the recorder and pipeline-analytics internal movers.
7594
+ * The public admin surface is `storage-migration`; child jobs remain in RAM
7595
+ * because copy-if-absent, verify, delete and index/row repoint are resumable.
7596
+ * Each completed/failed run also lands one durable ops-log row on its owning
7597
+ * addon surface.
7598
+ */
7599
+ /**
7600
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
7601
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
7602
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
7603
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
7604
+ * runs at all.
7576
7605
  */
7577
7606
  var RelocateJobStateSchema = _enum([
7607
+ "queued",
7578
7608
  "running",
7579
7609
  "done",
7580
7610
  "failed",
@@ -7599,19 +7629,109 @@ var RelocateJobSchema = object({
7599
7629
  finishedAt: number().nullable(),
7600
7630
  error: string().nullable()
7601
7631
  });
7632
+ /** Profile-derived footage selection used only by the migration coordinator:
7633
+ * `recordings` owns high+mid; `recordingsLow` owns low. */
7634
+ var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
7602
7635
  var RelocateFootageInputSchema = object({
7603
- deviceId: number().optional(),
7604
7636
  fromLocationId: string(),
7605
7637
  toLocationId: string(),
7606
7638
  entities: array(_enum(["segments"])).optional(),
7639
+ /** Limits relocation to the logical profile class. Omit only for the
7640
+ * pre-orchestration compatibility path. */
7641
+ footageClass: RelocateFootageClassSchema.optional(),
7642
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
7643
+ * is what a whole-disk drain means. The rebalance path always sets it: its
7644
+ * unit is a (camera, profile) pile, not a disk. */
7645
+ deviceId: number().int().optional(),
7646
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
7647
+ * Finer than `footageClass`, which cannot separate high from mid — and the
7648
+ * placement plan assigns those two independently, so a rebalance that could
7649
+ * only say "recordings" would move footage the plan never asked to move. */
7650
+ profiles: array(string()).optional(),
7607
7651
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7608
7652
  * never allowed to starve live writers. */
7609
7653
  throttleMbps: number().min(1).max(1e3).optional()
7610
7654
  });
7611
- var RelocateMediaInputSchema = object({
7612
- deviceId: number().optional(),
7655
+ /** Internal, lease-scoped participant operation. It is intentionally separate
7656
+ * from persistent recording settings: a migration never changes
7657
+ * `RecordingConfig.enabled` or camera wrapper bindings. */
7658
+ var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
7659
+ var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
7660
+ var StorageMigrationMediaMoveInputSchema = object({
7613
7661
  toLocationId: string(),
7614
7662
  throttleMbps: number().min(1).max(1e3).optional()
7663
+ }).extend({ leaseId: string().min(1) });
7664
+ /** The independently selectable logical storage classes. `recordings`
7665
+ * encompasses the high and mid segment profiles; `recordingsLow` is low
7666
+ * segments; `eventMedia` is post-analysis blobs. */
7667
+ var StorageMigrationClassSchema = _enum([
7668
+ "recordings",
7669
+ "recordingsLow",
7670
+ "eventMedia"
7671
+ ]);
7672
+ /** A destination is always an existing, fully-qualified location id. The
7673
+ * migration API intentionally never changes a source location's `basePath`:
7674
+ * callers create a new `<type>:<slug>` location, then select it here. */
7675
+ var StorageMigrationDestinationsSchema = object({
7676
+ recordings: string().min(1).optional(),
7677
+ recordingsLow: string().min(1).optional(),
7678
+ eventMedia: string().min(1).optional()
7679
+ }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
7680
+ /** Shared input for planning and starting an orchestrated storage migration. */
7681
+ var StorageMigrationInputSchema = object({
7682
+ destinations: StorageMigrationDestinationsSchema,
7683
+ throttleMbps: number().min(1).max(1e3).optional()
7684
+ });
7685
+ /** The durable coordinator state machine. The only phase that changes default
7686
+ * locations is `repointing`, after every selected mover has completed and been
7687
+ * verified. */
7688
+ var StorageMigrationPhaseSchema = _enum([
7689
+ "planning",
7690
+ "pausing",
7691
+ "moving",
7692
+ "verifying",
7693
+ "repointing",
7694
+ "refreshing",
7695
+ "resuming",
7696
+ "done",
7697
+ "failed",
7698
+ "cancelled"
7699
+ ]);
7700
+ var StorageMigrationParticipantSchema = _enum([
7701
+ "pipeline",
7702
+ "recorder",
7703
+ "analytics"
7704
+ ]);
7705
+ var StorageMigrationMoveSchema = object({
7706
+ storageClass: StorageMigrationClassSchema,
7707
+ fromLocationId: string(),
7708
+ toLocationId: string(),
7709
+ moverJobId: string().nullable(),
7710
+ state: RelocateJobStateSchema.nullable(),
7711
+ error: string().nullable()
7712
+ });
7713
+ var StorageMigrationJobSchema = object({
7714
+ jobId: string(),
7715
+ phase: StorageMigrationPhaseSchema,
7716
+ destinations: StorageMigrationDestinationsSchema,
7717
+ throttleMbps: number(),
7718
+ moves: array(StorageMigrationMoveSchema),
7719
+ pauseLeaseId: string().nullable(),
7720
+ pausedParticipants: array(StorageMigrationParticipantSchema),
7721
+ repointed: boolean(),
7722
+ cancelRequested: boolean(),
7723
+ startedAt: number(),
7724
+ updatedAt: number(),
7725
+ finishedAt: number().nullable(),
7726
+ error: string().nullable()
7727
+ });
7728
+ var StorageMigrationPlanSchema = object({
7729
+ destinations: StorageMigrationDestinationsSchema,
7730
+ moves: array(object({
7731
+ storageClass: StorageMigrationClassSchema,
7732
+ fromLocationId: string(),
7733
+ toLocationId: string()
7734
+ }))
7615
7735
  });
7616
7736
  /**
7617
7737
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -7663,6 +7783,21 @@ var StorageLocationSchema = object({
7663
7783
  nodeId: string().optional(),
7664
7784
  isDefault: boolean().default(false),
7665
7785
  isSystem: boolean().default(false),
7786
+ /**
7787
+ * Operator opt-in: whether consumers that BALANCE across several locations
7788
+ * of a type may write here. Recordings reads it today; event media and
7789
+ * backups are the next consumers, which is why the flag lives on the
7790
+ * location rather than in any one addon's store — nothing has to be
7791
+ * extended to add the next consumer.
7792
+ *
7793
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
7794
+ * flag existed reads back with no flag and keeps working exactly as before;
7795
+ * that is the whole compat story, and it is why no migration ships with it.
7796
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
7797
+ * disk must not silently start writing to it); the default of a type is
7798
+ * always stamped `true`.
7799
+ */
7800
+ enabled: boolean().optional(),
7666
7801
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7667
7802
  * for node-local locations it can reach) — never persisted, absent when the
7668
7803
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12215,7 +12350,8 @@ method(object({
12215
12350
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12216
12351
  /**
12217
12352
  * filesystem-browse — per-node capability for browsing the node's local
12218
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
12353
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12354
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
12219
12355
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12220
12356
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12221
12357
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -14056,6 +14192,13 @@ var MaskGridDimsSchema = object({
14056
14192
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
14057
14193
  * this one field keeps the schema additive — a rule still declares exactly
14058
14194
  * one trigger.
14195
+ *
14196
+ * AUDIO rules add no member here, for the reason occupancy added none: the
14197
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
14198
+ * mirror.ts` fails the build on a member the app cannot render) and every
14199
+ * member costs a release train. A sustained-sound rule is therefore an
14200
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
14201
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
14059
14202
  */
14060
14203
  var NcDeliverySchema = _enum([
14061
14204
  "immediate",
@@ -14070,15 +14213,32 @@ var NcDeliverySchema = _enum([
14070
14213
  * depend on a provider's raw event name or payload shape.
14071
14214
  */
14072
14215
  var NcSystemEventKindSchema = _enum([
14073
- "camera-online",
14074
- "camera-offline",
14216
+ "device-online",
14217
+ "device-offline",
14218
+ "device-disabled",
14219
+ "device-enabled",
14075
14220
  "stream-online",
14076
14221
  "stream-offline",
14077
14222
  "node-online",
14078
14223
  "node-offline",
14079
14224
  "addon-update-available",
14080
- "server-update-available"
14225
+ "server-update-available",
14226
+ "alarm-triggered",
14227
+ "alarm-armed",
14228
+ "alarm-disarmed",
14229
+ "camera-online",
14230
+ "camera-offline",
14231
+ "camera-disabled",
14232
+ "camera-enabled"
14233
+ ]);
14234
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
14235
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
14236
+ "camera-online",
14237
+ "camera-offline",
14238
+ "camera-disabled",
14239
+ "camera-enabled"
14081
14240
  ]);
14241
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
14082
14242
  /**
14083
14243
  * One coherent system-event condition. `kinds` is the required opt-in safety
14084
14244
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -14087,6 +14247,18 @@ var NcSystemEventKindSchema = _enum([
14087
14247
  var NcSystemEventConditionSchema = object({
14088
14248
  kinds: array(NcSystemEventKindSchema).min(1),
14089
14249
  deviceIds: array(number().int()).min(1).optional(),
14250
+ /**
14251
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
14252
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
14253
+ * is what a liveness rule means when nobody said otherwise.
14254
+ *
14255
+ * This is where "only my cameras" is expressed, and it lives on the rule for
14256
+ * one reason: the intake cannot know which devices this household cares
14257
+ * about, and a producer-side filter is one no operator can change. Fails
14258
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
14259
+ * does not carry) matches no `deviceTypes` list.
14260
+ */
14261
+ deviceTypes: array(string().min(1)).min(1).optional(),
14090
14262
  nodeIds: array(string().min(1)).min(1).optional(),
14091
14263
  packageNames: array(string().min(1)).min(1).optional()
14092
14264
  });
@@ -14137,6 +14309,47 @@ var NcOccupancyConditionSchema = object({
14137
14309
  sustainSeconds: number().int().min(0).max(3600).default(15)
14138
14310
  });
14139
14311
  /**
14312
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14313
+ *
14314
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
14315
+ * reference notifier uses, so an operator moving between them re-uses what
14316
+ * they already know): a rule matches when, over a sampling window of
14317
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14318
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14319
+ *
14320
+ * - `dbThreshold` — its level is at or above this many dBFS (see
14321
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14322
+ * - `labels` — the classifier put at least one of these labels on it.
14323
+ *
14324
+ * Both are OPTIONAL and independent, which is the point of the shape: a
14325
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
14326
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14327
+ * is given** — a window in which every sample is trivially a hit would fire on
14328
+ * silence, so the engine refuses such a condition rather than notifying on
14329
+ * nothing (the schema cannot express "at least one of" without becoming a
14330
+ * ZodEffects the cap path would have to special-case).
14331
+ *
14332
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
14333
+ * must be FULL before it can match — a window that has been open for two
14334
+ * seconds of its ten is 100% of nothing, and firing on it would make
14335
+ * `samplingSeconds` decorative.
14336
+ *
14337
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14338
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
14339
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
14340
+ * an operator who typed `dog` mean the same thing.
14341
+ */
14342
+ var NcAudioConditionSchema = object({
14343
+ /** Audio macro labels; absent = any sound (level-only rule). */
14344
+ labels: array(string().min(1)).min(1).optional(),
14345
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14346
+ dbThreshold: number().min(-96).max(0).optional(),
14347
+ /** Percentage of the window's samples that must be hits (1–100). */
14348
+ hitPercent: number().int().min(1).max(100).default(60),
14349
+ /** Length of the sampling window in seconds. */
14350
+ samplingSeconds: number().int().min(1).max(300).default(10)
14351
+ });
14352
+ /**
14140
14353
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
14141
14354
  *
14142
14355
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14409,7 +14622,33 @@ var NcConditionsSchema = object({
14409
14622
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14410
14623
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14411
14624
  */
14412
- occupancy: NcOccupancyConditionSchema.optional()
14625
+ occupancy: NcOccupancyConditionSchema.optional(),
14626
+ /**
14627
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
14628
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
14629
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
14630
+ * a window that is not full yet, neither filter given). See
14631
+ * {@link NcAudioCondition}.
14632
+ *
14633
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
14634
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
14635
+ * a detection, a track or a device event (the same fail-closed pairing
14636
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
14637
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
14638
+ * (an `immediate` rule naming an `audio-*` class, one notification per
14639
+ * classified sample) stays exactly as it was for rules that already use it.
14640
+ *
14641
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14642
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14643
+ * (`camstack/src/data/notification-center.ts`, guarded by
14644
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14645
+ * condition fields it does not know when a rule is saved from the phone.
14646
+ * Publishing an editor for a condition the app cannot round-trip is how an
14647
+ * operator loses a rule's conditions by opening it — so the descriptor, the
14648
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
14649
+ * does an audio rule become authorable.
14650
+ */
14651
+ audio: NcAudioConditionSchema.optional()
14413
14652
  });
14414
14653
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14415
14654
  var NcRuleTargetSchema = object({
@@ -14523,6 +14762,73 @@ var NcThrottleSchema = object({
14523
14762
  */
14524
14763
  granularity: NcThrottleGranularitySchema.optional()
14525
14764
  });
14765
+ /**
14766
+ * How long the confirm gate may hold ONE notification, and how big the picture
14767
+ * it judges may be.
14768
+ *
14769
+ * The clamp is the product decision, not a coincidence of the model: p50 was
14770
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
14771
+ * arrives after the visitor has gone is not a notification. 448 px was enough
14772
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
14773
+ * tokens for pixels the model pools away.
14774
+ */
14775
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
14776
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
14777
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
14778
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
14779
+ var NcConfirmExpectSchema = object({
14780
+ op: _enum([
14781
+ ">=",
14782
+ ">",
14783
+ "<=",
14784
+ "<",
14785
+ "=="
14786
+ ]),
14787
+ count: number().int().min(0).max(1e3)
14788
+ });
14789
+ /**
14790
+ * AI CONFIRM — a vision model looks at the picture this notification is about
14791
+ * to ship and says whether it agrees with the rule.
14792
+ *
14793
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
14794
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
14795
+ * on the operator's phone is not a verdict about this notification.
14796
+ *
14797
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
14798
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
14799
+ * the default and every fail-open is COUNTED, because a gate that always fails
14800
+ * open looks in the log exactly like a gate that works.
14801
+ *
14802
+ * Every field is `.optional()` rather than relied on as a Zod default at the
14803
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
14804
+ * production failures in one day), so the gate reads absent as the constant
14805
+ * above rather than trusting a parse it may never have seen.
14806
+ */
14807
+ var NcConfirmSchema = object({
14808
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
14809
+ * same thing, and both mean "deliver exactly as before". */
14810
+ enabled: boolean().default(false),
14811
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
14812
+ profileId: string().optional(),
14813
+ /**
14814
+ * The operator's question, in his own words. Absent = a question derived
14815
+ * from the rule (its class and its expectation).
14816
+ *
14817
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
14818
+ * banners, signage and plates as instructions if you let them reach the
14819
+ * prompt — proven live — so the authoritative contract stays in the system
14820
+ * turn and only rule-authored words land here.
14821
+ */
14822
+ prompt: string().max(1e3).optional(),
14823
+ /** Fire only when the model's count satisfies this. Absent = the model's
14824
+ * own boolean verdict decides. */
14825
+ expect: NcConfirmExpectSchema.optional(),
14826
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
14827
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
14828
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
14829
+ /** Longest edge the judged image is downscaled to before it is sent. */
14830
+ maxImagePx: number().int().min(64).max(2048).default(448)
14831
+ });
14526
14832
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14527
14833
  var NcRuleInputSchema = object({
14528
14834
  name: string().min(1).max(200),
@@ -14583,7 +14889,13 @@ var NcRuleInputSchema = object({
14583
14889
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14584
14890
  * shape as every other actuation.
14585
14891
  */
14586
- actions: NcRuleActionsSchema.optional()
14892
+ actions: NcRuleActionsSchema.optional(),
14893
+ /**
14894
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
14895
+ * a rule that predates the gate must keep delivering byte-for-byte as it
14896
+ * did, and absent is the only way to say that without a migration.
14897
+ */
14898
+ confirm: NcConfirmSchema.optional()
14587
14899
  });
14588
14900
  /**
14589
14901
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14594,7 +14906,37 @@ var NcRuleInputSchema = object({
14594
14906
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14595
14907
  * `updateRule` patch.
14596
14908
  */
14597
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
14909
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
14910
+ disabledTargetIds: array(string()).optional(),
14911
+ /**
14912
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
14913
+ *
14914
+ * It makes the key optional to SUPPLY; the parse still materialises the
14915
+ * default when the key is absent. And `NcRuleStore.update` merges with
14916
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
14917
+ * one — which made every partial edit destructive:
14918
+ *
14919
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
14920
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
14921
+ * setEnabled(ruleId, false) → conditions reset to `{}`
14922
+ *
14923
+ * A rule scoped to one camera and one zone silently became a rule that
14924
+ * matches EVERY event on EVERY camera, and lost its `media` policy
14925
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
14926
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
14927
+ * within a minute of a two-field patch.
14928
+ *
14929
+ * So every defaulted field is re-declared here WITHOUT its default. The
14930
+ * inner defaults still apply when the caller DOES send the key — `{}` for
14931
+ * conditions remains a real instruction ("clear them") — and only the
14932
+ * absent key is now genuinely absent.
14933
+ */
14934
+ enabled: boolean().optional(),
14935
+ conditions: NcConditionsSchema.optional(),
14936
+ media: NcMediaPolicySchema.optional(),
14937
+ throttle: NcThrottleSchema.optional(),
14938
+ priority: number().int().min(1).max(5).optional()
14939
+ });
14598
14940
  /** A persisted rule. */
14599
14941
  var NcRuleSchema = NcRuleInputSchema.extend({
14600
14942
  id: string(),
@@ -14895,6 +15237,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
14895
15237
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
14896
15238
  * copy would lie the first time a rule is disabled.
14897
15239
  */
15240
+ /**
15241
+ * Why a device a mode NAMES is nonetheless not armed by it.
15242
+ *
15243
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
15244
+ * per-camera notification switch the Notification Center already owns,
15245
+ * `detection-off` is the device's own detection binding being inactive, and
15246
+ * `offline` is the device manager's liveness. A fourth reason would mean a
15247
+ * fourth authority, and inventing one here is how a panel starts disagreeing
15248
+ * with the switches the operator actually used.
15249
+ */
15250
+ var NcAlarmSkipReasonSchema = _enum([
15251
+ "muted",
15252
+ "detection-off",
15253
+ "offline"
15254
+ ]);
15255
+ var NcAlarmSkippedDeviceSchema = object({
15256
+ deviceId: number().int(),
15257
+ reason: NcAlarmSkipReasonSchema
15258
+ });
14898
15259
  var NcAlarmModeCoverageSchema = object({
14899
15260
  mode: AlarmArmModeSchema,
14900
15261
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -14902,7 +15263,18 @@ var NcAlarmModeCoverageSchema = object({
14902
15263
  /** At least one covering rule has no device scope, so the mode covers all. */
14903
15264
  allDevices: boolean(),
14904
15265
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
14905
- deviceIds: array(number().int())
15266
+ deviceIds: array(number().int()),
15267
+ /**
15268
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
15269
+ * excludes it.
15270
+ *
15271
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
15272
+ * twelve makes it false in exactly the way nobody notices until an incident.
15273
+ * Defaulted to `[]` so a coverage answer computed before this field existed
15274
+ * still parses as "nothing known to be skipped" rather than failing the whole
15275
+ * alarm tab.
15276
+ */
15277
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
14906
15278
  });
14907
15279
  var NcAlarmConfigSchema = object({
14908
15280
  /**
@@ -16265,13 +16637,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16265
16637
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16266
16638
  kind: "mutation",
16267
16639
  auth: "admin"
16268
- }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
16640
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
16269
16641
  kind: "mutation",
16270
16642
  auth: "admin"
16271
- }), method(object({}), array(RelocateJobSchema).readonly(), {
16272
- kind: "query",
16643
+ }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
16644
+ kind: "mutation",
16273
16645
  auth: "admin"
16274
- }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16646
+ }), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
16647
+ kind: "mutation",
16648
+ auth: "admin"
16649
+ }), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
16650
+ kind: "mutation",
16651
+ auth: "admin"
16652
+ }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16275
16653
  kind: "mutation",
16276
16654
  auth: "admin"
16277
16655
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
@@ -17728,9 +18106,16 @@ var CameraStatusSchema = object({
17728
18106
  audio: CameraAudioStatusSchema.nullable(),
17729
18107
  recording: CameraRecordingStatusSchema.nullable(),
17730
18108
  /**
17731
- * Per-camera function switches an OPERATOR has turned off
18109
+ * Per-camera functions an OPERATOR has turned off
17732
18110
  * ([D61](../../../../docs/decisions/adr-0067.md)).
17733
18111
  *
18112
+ * Composed from the AUTHORITIES themselves — the wrapper bindings,
18113
+ * `RecordingConfig.enabled`, the notification mute, the broker's audio
18114
+ * policy, the camera's own microphone — via `composeSwitchedOff`, not from
18115
+ * the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
18116
+ * The badge outlives the control panel: the panel was a convenience, this is
18117
+ * the difference between a camera being off and a camera being dead.
18118
+ *
17734
18119
  * This is the difference between DISABLED and BROKEN. A camera whose
17735
18120
  * `detection` block reports zero fps and whose `switchedOff` contains
17736
18121
  * `'object-detection'` was switched off by a person; the same camera with an
@@ -17801,7 +18186,13 @@ var NodeInferenceDevicesSchema = object({
17801
18186
  reachable: boolean(),
17802
18187
  devices: array(NodeInferenceDeviceSchema).readonly()
17803
18188
  });
17804
- method(object({
18189
+ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
18190
+ kind: "mutation",
18191
+ auth: "admin"
18192
+ }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
18193
+ kind: "mutation",
18194
+ auth: "admin"
18195
+ }), method(object({
17805
18196
  deviceId: number(),
17806
18197
  agentNodeId: string()
17807
18198
  }), object({ success: literal(true) }), {
@@ -18475,6 +18866,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
18475
18866
  locationId: string(),
18476
18867
  targetBytes: number().int().positive()
18477
18868
  }), EvictResultSchema, { kind: "mutation" });
18869
+ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
18870
+ kind: "mutation",
18871
+ auth: "admin"
18872
+ }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
18873
+ kind: "mutation",
18874
+ auth: "admin"
18875
+ });
18478
18876
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
18479
18877
  providerId: string().min(1),
18480
18878
  displayName: string().min(1),
@@ -18578,6 +18976,28 @@ var TerminalProfileInfoSchema = object({
18578
18976
  label: string(),
18579
18977
  description: string().optional()
18580
18978
  });
18979
+ /**
18980
+ * A durable operator-created Terminal instance. Profiles are templates; only
18981
+ * an instance declares a camera.
18982
+ */
18983
+ var TerminalInstanceInfoSchema = object({
18984
+ instanceId: string(),
18985
+ cameraStableId: string(),
18986
+ nodeId: string(),
18987
+ profileId: string(),
18988
+ profileLabel: string(),
18989
+ name: string(),
18990
+ enabled: boolean()
18991
+ });
18992
+ var TerminalLegacyCameraSchema = object({
18993
+ stableId: string(),
18994
+ nodeId: string(),
18995
+ profileId: string(),
18996
+ profileLabel: string(),
18997
+ name: string(),
18998
+ /** Only legacy monitor cameras can retain their historic stable identity. */
18999
+ adoptable: boolean()
19000
+ });
18581
19001
  var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
18582
19002
  seq: number().int().positive(),
18583
19003
  kind: literal("data"),
@@ -18594,7 +19014,29 @@ var TerminalOutputBatchSchema = object({
18594
19014
  snapshot: string().optional(),
18595
19015
  events: array(TerminalOutputEventSchema).readonly()
18596
19016
  });
18597
- method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
19017
+ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
19018
+ targetNodeId: string().min(1),
19019
+ profileId: string().min(1),
19020
+ name: string().trim().min(1).max(160).optional()
19021
+ }), TerminalInstanceInfoSchema, {
19022
+ kind: "mutation",
19023
+ auth: "admin"
19024
+ }), method(object({ instanceId: string().min(1) }), _void(), {
19025
+ kind: "mutation",
19026
+ auth: "admin"
19027
+ }), method(object({
19028
+ instanceId: string().min(1),
19029
+ enabled: boolean()
19030
+ }), TerminalInstanceInfoSchema, {
19031
+ kind: "mutation",
19032
+ auth: "admin"
19033
+ }), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
19034
+ stableId: string().min(1),
19035
+ name: string().trim().min(1).max(160).optional()
19036
+ }), TerminalInstanceInfoSchema, {
19037
+ kind: "mutation",
19038
+ auth: "admin"
19039
+ }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
18598
19040
  profileId: string(),
18599
19041
  cols: number().int().positive(),
18600
19042
  rows: number().int().positive()
@@ -18611,7 +19053,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
18611
19053
  }), method(object({
18612
19054
  sessionId: string(),
18613
19055
  afterSeq: number().int().nonnegative(),
18614
- waitMs: number().int().min(0).max(2e3).default(0)
19056
+ waitMs: number().int().min(0).max(2e3).default(0),
19057
+ /**
19058
+ * Wait when a just-opened session has no output yet. Kept opt-in so a
19059
+ * browser's initial repaint remains immediate; the camera snapshot
19060
+ * relay uses it to avoid encoding a blank startup frame.
19061
+ */
19062
+ waitForOutput: boolean().optional()
18615
19063
  }), TerminalOutputBatchSchema, {
18616
19064
  kind: "mutation",
18617
19065
  auth: "admin",
@@ -21109,6 +21557,7 @@ var FaceInfoSchema = object({
21109
21557
  var FaceFilterEnum = _enum([
21110
21558
  "unassigned",
21111
21559
  "recognized",
21560
+ "identified",
21112
21561
  "all"
21113
21562
  ]);
21114
21563
  var MediaFileLiteSchema$1 = object({
@@ -21137,6 +21586,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
21137
21586
  kind: "mutation",
21138
21587
  auth: "admin"
21139
21588
  }), method(object({
21589
+ /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
21590
+ deviceId: number().int().optional(),
21140
21591
  limit: number().int().positive().optional(),
21141
21592
  filter: FaceFilterEnum.optional(),
21142
21593
  /**
@@ -23366,6 +23817,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
23366
23817
  capName: string().min(1).max(64),
23367
23818
  /** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
23368
23819
  valuePath: string().min(1).max(64)
23820
+ }),
23821
+ object({
23822
+ kind: literal("latest-recognition"),
23823
+ recognition: _enum(["person", "plate"])
23369
23824
  })
23370
23825
  ]);
23371
23826
  var OsdSlotBindingSchema = object({
@@ -23471,6 +23926,15 @@ method(object({ deviceId: number().int() }), object({
23471
23926
  }), object({ success: literal(true) }), {
23472
23927
  kind: "mutation",
23473
23928
  auth: "admin"
23929
+ }), method(object({
23930
+ sourceDeviceId: number().int(),
23931
+ targetDeviceId: number().int()
23932
+ }), object({
23933
+ copied: number().int().nonnegative(),
23934
+ skipped: number().int().nonnegative()
23935
+ }), {
23936
+ kind: "mutation",
23937
+ auth: "admin"
23474
23938
  }), method(object({
23475
23939
  deviceId: number().int(),
23476
23940
  slotId: string().min(1),
@@ -24393,7 +24857,19 @@ var RecordingManifestSchema = object({
24393
24857
  * profiles/subtrees/locations on this node). */
24394
24858
  var RecordingDeviceUsageSchema = object({
24395
24859
  deviceId: number(),
24396
- usedBytes: number()
24860
+ usedBytes: number(),
24861
+ /**
24862
+ * Start of this camera's OLDEST indexed segment, across every profile and
24863
+ * location — the "Oldest footage" column in Recordings → Storage, and the
24864
+ * only honest answer to "is retention actually holding?" per camera.
24865
+ *
24866
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
24867
+ * predates this field omits it entirely, and a hub whose types carry the
24868
+ * field must keep validating that older provider's payload: the framework
24869
+ * (types) and the addon ship on different trains, and the addon is usually
24870
+ * the later of the two.
24871
+ */
24872
+ oldestMs: number().nullable().optional()
24397
24873
  });
24398
24874
  /** Recording storage usage + capacity for one storage location. */
24399
24875
  var RecordingLocationUsageSchema = object({
@@ -24421,6 +24897,57 @@ var RecordingStorageUsageSchema = object({
24421
24897
  locations: array(RecordingLocationUsageSchema)
24422
24898
  });
24423
24899
  /**
24900
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
24901
+ *
24902
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
24903
+ * is the operator asking for the EXISTING archive to be brought into line with
24904
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
24905
+ * location, run FIFO behind the single-flight mover.
24906
+ *
24907
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
24908
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
24909
+ * (empty on the plan).
24910
+ */
24911
+ var RecordingRebalanceMoveSchema = object({
24912
+ deviceId: number(),
24913
+ profile: string(),
24914
+ fromLocationId: string(),
24915
+ toLocationId: string(),
24916
+ bytes: number(),
24917
+ files: number().int()
24918
+ });
24919
+ /** Why a pile that is out of place is staying there. Every refusal is
24920
+ * reported: a rebalance that silently drops a camera reads exactly like one
24921
+ * that had nothing to do. */
24922
+ var RecordingRebalanceSkipReasonSchema = _enum([
24923
+ "unassigned",
24924
+ "target-not-writable",
24925
+ "below-threshold",
24926
+ "no-headroom"
24927
+ ]);
24928
+ var RecordingRebalanceSkipSchema = object({
24929
+ deviceId: number(),
24930
+ profile: string(),
24931
+ fromLocationId: string(),
24932
+ /** The location the plan wants; null when the camera has no assignment. */
24933
+ toLocationId: string().nullable(),
24934
+ bytes: number(),
24935
+ reason: RecordingRebalanceSkipReasonSchema
24936
+ });
24937
+ var RecordingRebalancePlanSchema = object({
24938
+ moves: array(RecordingRebalanceMoveSchema),
24939
+ skipped: array(RecordingRebalanceSkipSchema),
24940
+ bytesToMove: number(),
24941
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
24942
+ jobIds: array(string())
24943
+ });
24944
+ var RecordingRebalanceInputSchema = object({
24945
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
24946
+ throttleMbps: number().min(1).max(1e3).optional(),
24947
+ /** Ignore piles smaller than this (default 1 GB). */
24948
+ minMoveGb: number().min(0).optional()
24949
+ });
24950
+ /**
24424
24951
  * Result of locating footage at a wall-clock instant for one device/profile.
24425
24952
  * `segment` carries the covering segment's window; `gap` reports the forward
24426
24953
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -24568,6 +25095,21 @@ method(object({
24568
25095
  }), {
24569
25096
  kind: "mutation",
24570
25097
  auth: "admin"
25098
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25099
+ kind: "mutation",
25100
+ auth: "admin"
25101
+ }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
25102
+ kind: "mutation",
25103
+ auth: "admin"
25104
+ }), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
25105
+ kind: "mutation",
25106
+ auth: "admin"
25107
+ }), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
25108
+ kind: "mutation",
25109
+ auth: "admin"
25110
+ }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
25111
+ kind: "mutation",
25112
+ auth: "admin"
24571
25113
  }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
24572
25114
  kind: "mutation",
24573
25115
  auth: "admin"
@@ -24577,9 +25119,15 @@ method(object({
24577
25119
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
24578
25120
  kind: "mutation",
24579
25121
  auth: "admin"
25122
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25123
+ kind: "query",
25124
+ auth: "admin"
25125
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25126
+ kind: "mutation",
25127
+ auth: "admin"
24580
25128
  });
24581
25129
  /**
24582
- * `recordingExport` cap — render a footage time range into a single downloadable
25130
+ * `recording-export` cap — render a footage time range into a single downloadable
24583
25131
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
24584
25132
  * bounded lifetime with a durable history, auto-expiry, and optional
24585
25133
  * delete-after-download.
@@ -24594,10 +25142,42 @@ method(object({
24594
25142
  */
24595
25143
  /** Playback-speed multiplier for the render (1 = realtime). */
24596
25144
  var ExportSpeedSchema = number().min(.25).max(32);
25145
+ /**
25146
+ * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
25147
+ *
25148
+ * Relative and not absolute epoch on purpose: the renderer's frame-select
25149
+ * expression sees ffmpeg's `t`, which starts at 0 for the export's source
25150
+ * playlist. Handing it absolute epochs would make every call site responsible
25151
+ * for the same subtraction, and the one that forgot would emit a filter that
25152
+ * selects nothing — silently, as a uniform timelapse.
25153
+ */
25154
+ var ExportDenseRangeSchema = object({
25155
+ fromSec: number().nonnegative(),
25156
+ toSec: number().nonnegative()
25157
+ }).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
25158
+ /**
25159
+ * Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
25160
+ * listed ranges and at the base `everyMs` everywhere else.
25161
+ *
25162
+ * `everyMs` must be strictly smaller than the base cadence — a dense rate that
25163
+ * is not denser renders a uniform timelapse the operator believes is two-rate.
25164
+ */
25165
+ var ExportDenseSchema = object({
25166
+ everyMs: number().int().positive(),
25167
+ ranges: array(ExportDenseRangeSchema).min(1).max(200)
25168
+ });
24597
25169
  /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
24598
25170
  var ExportTimelapseSchema = object({
24599
25171
  everyMs: number().int().positive(),
24600
- outputFps: number().int().min(1).max(60).optional()
25172
+ outputFps: number().int().min(1).max(60).optional(),
25173
+ /** Optional second, FASTER rate over the intervals that matter. */
25174
+ dense: ExportDenseSchema.optional()
25175
+ }).superRefine((v, ctx) => {
25176
+ if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
25177
+ code: ZodIssueCode$1.custom,
25178
+ message: "dense.everyMs must be strictly smaller than the base everyMs",
25179
+ path: ["dense", "everyMs"]
25180
+ });
24601
25181
  });
24602
25182
  /**
24603
25183
  * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
@@ -24655,6 +25235,19 @@ var ExportDownloadSchema = object({
24655
25235
  url: string(),
24656
25236
  endpoints: array(string())
24657
25237
  });
25238
+ /**
25239
+ * A finished export's bytes, inline.
25240
+ *
25241
+ * `bytes` is the DECODED length — the number the caller bounds and logs
25242
+ * against, so nobody has to infer it from the base64 length.
25243
+ */
25244
+ var ExportBytesSchema = object({
25245
+ base64: string(),
25246
+ contentType: string(),
25247
+ /** Suggested filename, extension included. */
25248
+ name: string(),
25249
+ bytes: number().int().nonnegative()
25250
+ });
24658
25251
  method(object({
24659
25252
  deviceId: number(),
24660
25253
  profile: string(),
@@ -24679,6 +25272,9 @@ method(object({
24679
25272
  }), method(object({ exportId: string() }), ExportDownloadSchema, {
24680
25273
  kind: "query",
24681
25274
  auth: "protected"
25275
+ }), method(object({ exportId: string() }), ExportBytesSchema, {
25276
+ kind: "query",
25277
+ auth: "protected"
24682
25278
  });
24683
25279
  /**
24684
25280
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -30180,6 +30776,12 @@ Object.freeze({
30180
30776
  addonId: null,
30181
30777
  access: "delete"
30182
30778
  },
30779
+ "osdManager.copyDeviceConfiguration": {
30780
+ capName: "osd-manager",
30781
+ capScope: "system",
30782
+ addonId: null,
30783
+ access: "create"
30784
+ },
30183
30785
  "osdManager.getConditionSupport": {
30184
30786
  capName: "osd-manager",
30185
30787
  capScope: "system",
@@ -30276,7 +30878,7 @@ Object.freeze({
30276
30878
  addonId: null,
30277
30879
  access: "create"
30278
30880
  },
30279
- "pipelineAnalytics.cancelMediaRelocate": {
30881
+ "pipelineAnalytics.cancelStorageMigrationMove": {
30280
30882
  capName: "pipeline-analytics",
30281
30883
  capScope: "device",
30282
30884
  addonId: null,
@@ -30348,12 +30950,6 @@ Object.freeze({
30348
30950
  addonId: null,
30349
30951
  access: "view"
30350
30952
  },
30351
- "pipelineAnalytics.getMediaRelocateStatus": {
30352
- capName: "pipeline-analytics",
30353
- capScope: "device",
30354
- addonId: null,
30355
- access: "view"
30356
- },
30357
30953
  "pipelineAnalytics.getMotionEvents": {
30358
30954
  capName: "pipeline-analytics",
30359
30955
  capScope: "device",
@@ -30390,6 +30986,12 @@ Object.freeze({
30390
30986
  addonId: null,
30391
30987
  access: "view"
30392
30988
  },
30989
+ "pipelineAnalytics.getStorageMigrationMoveStatus": {
30990
+ capName: "pipeline-analytics",
30991
+ capScope: "device",
30992
+ addonId: null,
30993
+ access: "view"
30994
+ },
30393
30995
  "pipelineAnalytics.getTrack": {
30394
30996
  capName: "pipeline-analytics",
30395
30997
  capScope: "device",
@@ -30468,6 +31070,12 @@ Object.freeze({
30468
31070
  addonId: null,
30469
31071
  access: "view"
30470
31072
  },
31073
+ "pipelineAnalytics.pauseForStorageMigration": {
31074
+ capName: "pipeline-analytics",
31075
+ capScope: "device",
31076
+ addonId: null,
31077
+ access: "create"
31078
+ },
30471
31079
  "pipelineAnalytics.proposeRetrainAnnotations": {
30472
31080
  capName: "pipeline-analytics",
30473
31081
  capScope: "device",
@@ -30498,7 +31106,7 @@ Object.freeze({
30498
31106
  addonId: null,
30499
31107
  access: "create"
30500
31108
  },
30501
- "pipelineAnalytics.relocateMedia": {
31109
+ "pipelineAnalytics.refreshStorageLocationsForMigration": {
30502
31110
  capName: "pipeline-analytics",
30503
31111
  capScope: "device",
30504
31112
  addonId: null,
@@ -30510,6 +31118,12 @@ Object.freeze({
30510
31118
  addonId: null,
30511
31119
  access: "create"
30512
31120
  },
31121
+ "pipelineAnalytics.resumeForStorageMigration": {
31122
+ capName: "pipeline-analytics",
31123
+ capScope: "device",
31124
+ addonId: null,
31125
+ access: "create"
31126
+ },
30513
31127
  "pipelineAnalytics.saveRetrainAnnotations": {
30514
31128
  capName: "pipeline-analytics",
30515
31129
  capScope: "device",
@@ -30534,6 +31148,12 @@ Object.freeze({
30534
31148
  addonId: null,
30535
31149
  access: "create"
30536
31150
  },
31151
+ "pipelineAnalytics.startStorageMigrationMove": {
31152
+ capName: "pipeline-analytics",
31153
+ capScope: "device",
31154
+ addonId: null,
31155
+ access: "create"
31156
+ },
30537
31157
  "pipelineAnalytics.wipeAllAnalytics": {
30538
31158
  capName: "pipeline-analytics",
30539
31159
  capScope: "device",
@@ -30900,6 +31520,12 @@ Object.freeze({
30900
31520
  addonId: null,
30901
31521
  access: "view"
30902
31522
  },
31523
+ "pipelineOrchestrator.pauseForStorageMigration": {
31524
+ capName: "pipeline-orchestrator",
31525
+ capScope: "system",
31526
+ addonId: null,
31527
+ access: "create"
31528
+ },
30903
31529
  "pipelineOrchestrator.rebalance": {
30904
31530
  capName: "pipeline-orchestrator",
30905
31531
  capScope: "system",
@@ -30924,6 +31550,12 @@ Object.freeze({
30924
31550
  addonId: null,
30925
31551
  access: "view"
30926
31552
  },
31553
+ "pipelineOrchestrator.resumeForStorageMigration": {
31554
+ capName: "pipeline-orchestrator",
31555
+ capScope: "system",
31556
+ addonId: null,
31557
+ access: "create"
31558
+ },
30927
31559
  "pipelineOrchestrator.saveTemplate": {
30928
31560
  capName: "pipeline-orchestrator",
30929
31561
  capScope: "system",
@@ -31320,7 +31952,13 @@ Object.freeze({
31320
31952
  addonId: null,
31321
31953
  access: "create"
31322
31954
  },
31323
- "recording.cancelRelocate": {
31955
+ "recording.cancelRelocateJob": {
31956
+ capName: "recording",
31957
+ capScope: "system",
31958
+ addonId: null,
31959
+ access: "create"
31960
+ },
31961
+ "recording.cancelStorageMigrationMove": {
31324
31962
  capName: "recording",
31325
31963
  capScope: "system",
31326
31964
  addonId: null,
@@ -31356,7 +31994,7 @@ Object.freeze({
31356
31994
  addonId: null,
31357
31995
  access: "view"
31358
31996
  },
31359
- "recording.getRelocateStatus": {
31997
+ "recording.getStorageMigrationMoveStatus": {
31360
31998
  capName: "recording",
31361
31999
  capScope: "system",
31362
32000
  addonId: null,
@@ -31374,12 +32012,30 @@ Object.freeze({
31374
32012
  addonId: null,
31375
32013
  access: "view"
31376
32014
  },
32015
+ "recording.listRelocateJobs": {
32016
+ capName: "recording",
32017
+ capScope: "system",
32018
+ addonId: null,
32019
+ access: "view"
32020
+ },
31377
32021
  "recording.locateSegment": {
31378
32022
  capName: "recording",
31379
32023
  capScope: "system",
31380
32024
  addonId: null,
31381
32025
  access: "view"
31382
32026
  },
32027
+ "recording.pauseForStorageMigration": {
32028
+ capName: "recording",
32029
+ capScope: "system",
32030
+ addonId: null,
32031
+ access: "create"
32032
+ },
32033
+ "recording.planStorageRebalance": {
32034
+ capName: "recording",
32035
+ capScope: "system",
32036
+ addonId: null,
32037
+ access: "view"
32038
+ },
31383
32039
  "recording.pruneFootage": {
31384
32040
  capName: "recording",
31385
32041
  capScope: "system",
@@ -31398,6 +32054,12 @@ Object.freeze({
31398
32054
  addonId: null,
31399
32055
  access: "view"
31400
32056
  },
32057
+ "recording.refreshStorageLocationsForMigration": {
32058
+ capName: "recording",
32059
+ capScope: "system",
32060
+ addonId: null,
32061
+ access: "create"
32062
+ },
31401
32063
  "recording.relocateFootage": {
31402
32064
  capName: "recording",
31403
32065
  capScope: "system",
@@ -31422,44 +32084,68 @@ Object.freeze({
31422
32084
  addonId: null,
31423
32085
  access: "create"
31424
32086
  },
32087
+ "recording.resumeForStorageMigration": {
32088
+ capName: "recording",
32089
+ capScope: "system",
32090
+ addonId: null,
32091
+ access: "create"
32092
+ },
31425
32093
  "recording.setDeviceConfig": {
31426
32094
  capName: "recording",
31427
32095
  capScope: "system",
31428
32096
  addonId: null,
31429
32097
  access: "create"
31430
32098
  },
32099
+ "recording.startStorageMigrationMove": {
32100
+ capName: "recording",
32101
+ capScope: "system",
32102
+ addonId: null,
32103
+ access: "create"
32104
+ },
32105
+ "recording.startStorageRebalance": {
32106
+ capName: "recording",
32107
+ capScope: "system",
32108
+ addonId: null,
32109
+ access: "create"
32110
+ },
31431
32111
  "recordingExport.cancelExport": {
31432
- capName: "recordingExport",
32112
+ capName: "recording-export",
31433
32113
  capScope: "system",
31434
32114
  addonId: null,
31435
32115
  access: "create"
31436
32116
  },
31437
32117
  "recordingExport.createExport": {
31438
- capName: "recordingExport",
32118
+ capName: "recording-export",
31439
32119
  capScope: "system",
31440
32120
  addonId: null,
31441
32121
  access: "create"
31442
32122
  },
31443
32123
  "recordingExport.deleteExport": {
31444
- capName: "recordingExport",
32124
+ capName: "recording-export",
31445
32125
  capScope: "system",
31446
32126
  addonId: null,
31447
32127
  access: "delete"
31448
32128
  },
31449
32129
  "recordingExport.getDownloadUrl": {
31450
- capName: "recordingExport",
32130
+ capName: "recording-export",
31451
32131
  capScope: "system",
31452
32132
  addonId: null,
31453
32133
  access: "view"
31454
32134
  },
31455
32135
  "recordingExport.getExport": {
31456
- capName: "recordingExport",
32136
+ capName: "recording-export",
31457
32137
  capScope: "system",
31458
32138
  addonId: null,
31459
32139
  access: "view"
31460
32140
  },
31461
32141
  "recordingExport.listExports": {
31462
- capName: "recordingExport",
32142
+ capName: "recording-export",
32143
+ capScope: "system",
32144
+ addonId: null,
32145
+ access: "view"
32146
+ },
32147
+ "recordingExport.readExportBytes": {
32148
+ capName: "recording-export",
31463
32149
  capScope: "system",
31464
32150
  addonId: null,
31465
32151
  access: "view"
@@ -31818,6 +32504,30 @@ Object.freeze({
31818
32504
  addonId: null,
31819
32505
  access: "view"
31820
32506
  },
32507
+ "storageMigration.cancel": {
32508
+ capName: "storage-migration",
32509
+ capScope: "system",
32510
+ addonId: null,
32511
+ access: "create"
32512
+ },
32513
+ "storageMigration.plan": {
32514
+ capName: "storage-migration",
32515
+ capScope: "system",
32516
+ addonId: null,
32517
+ access: "view"
32518
+ },
32519
+ "storageMigration.start": {
32520
+ capName: "storage-migration",
32521
+ capScope: "system",
32522
+ addonId: null,
32523
+ access: "create"
32524
+ },
32525
+ "storageMigration.status": {
32526
+ capName: "storage-migration",
32527
+ capScope: "system",
32528
+ addonId: null,
32529
+ access: "view"
32530
+ },
31821
32531
  "storageProvider.abortUpload": {
31822
32532
  capName: "storage-provider",
31823
32533
  capScope: "system",
@@ -32196,12 +32906,42 @@ Object.freeze({
32196
32906
  addonId: null,
32197
32907
  access: "create"
32198
32908
  },
32909
+ "terminalSession.adoptLegacyMonitor": {
32910
+ capName: "terminal-session",
32911
+ capScope: "system",
32912
+ addonId: null,
32913
+ access: "create"
32914
+ },
32199
32915
  "terminalSession.close": {
32200
32916
  capName: "terminal-session",
32201
32917
  capScope: "system",
32202
32918
  addonId: null,
32203
32919
  access: "create"
32204
32920
  },
32921
+ "terminalSession.createInstance": {
32922
+ capName: "terminal-session",
32923
+ capScope: "system",
32924
+ addonId: null,
32925
+ access: "create"
32926
+ },
32927
+ "terminalSession.deleteInstance": {
32928
+ capName: "terminal-session",
32929
+ capScope: "system",
32930
+ addonId: null,
32931
+ access: "delete"
32932
+ },
32933
+ "terminalSession.listInstances": {
32934
+ capName: "terminal-session",
32935
+ capScope: "system",
32936
+ addonId: null,
32937
+ access: "view"
32938
+ },
32939
+ "terminalSession.listLegacyCameras": {
32940
+ capName: "terminal-session",
32941
+ capScope: "system",
32942
+ addonId: null,
32943
+ access: "view"
32944
+ },
32205
32945
  "terminalSession.listProfiles": {
32206
32946
  capName: "terminal-session",
32207
32947
  capScope: "system",
@@ -32232,6 +32972,12 @@ Object.freeze({
32232
32972
  addonId: null,
32233
32973
  access: "create"
32234
32974
  },
32975
+ "terminalSession.setInstanceEnabled": {
32976
+ capName: "terminal-session",
32977
+ capScope: "system",
32978
+ addonId: null,
32979
+ access: "create"
32980
+ },
32235
32981
  "terminalSession.writeInput": {
32236
32982
  capName: "terminal-session",
32237
32983
  capScope: "system",
@@ -32776,6 +33522,104 @@ var FramerateField = number().int().min(1).max(60);
32776
33522
  var TargetsField = array(NcRuleTargetSchema).min(1);
32777
33523
  var PriorityField = number().int().min(1).max(5);
32778
33524
  /**
33525
+ * Explicit override of the DENSE sampling cadence, seconds.
33526
+ *
33527
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
33528
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
33529
+ * made that same base 3 s and rendered a person pass as two frames.)
33530
+ *
33531
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
33532
+ * `denseCadenceSec` and played at `framerate` occupies
33533
+ *
33534
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
33535
+ *
33536
+ * 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.
33537
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
33538
+ * and therefore the length of a quiet night, does not move.
33539
+ *
33540
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
33541
+ * the recording has them returns the same frames, requested twice. Must be
33542
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
33543
+ * a uniform video the operator believes is two-rate — and upsert refuses it
33544
+ * rather than letting the export cap reject the render hours after the window.
33545
+ */
33546
+ var DenseCadenceSecField = number().min(.1).max(3600);
33547
+ /**
33548
+ * Minimum seconds of OUTPUT video each detection range must occupy.
33549
+ *
33550
+ * The operator-facing form of the arithmetic above: instead of solving for a
33551
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
33552
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
33553
+ * that range every ~583 ms.
33554
+ *
33555
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
33556
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
33557
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
33558
+ * ranges are sampled denser than they need. Per-range cadences require a cap
33559
+ * schema change and are the tracked follow-up.
33560
+ *
33561
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
33562
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
33563
+ * by real footage, never met by duplicating frames into motion that never
33564
+ * happened.
33565
+ */
33566
+ var MinDwellSecField = number().min(0).max(60);
33567
+ /**
33568
+ * Caption burned into the notification's preview frame.
33569
+ *
33570
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
33571
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
33572
+ * templating dialect for one field would be a second thing to explain.
33573
+ *
33574
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
33575
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
33576
+ * the reason this is not `.min(1)`.
33577
+ */
33578
+ var PreviewTextField = string().max(200);
33579
+ /**
33580
+ * Whether the notification's preview is a STILL or a short animation.
33581
+ *
33582
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
33583
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
33584
+ * night reads better as three seconds of motion than as one frame of it. Both
33585
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
33586
+ * simply applies it to a dozen frames sampled across the render and assembles
33587
+ * them.
33588
+ *
33589
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
33590
+ * seeks and a palette pass, and no rule that never asked for one should start
33591
+ * paying that on the deploy that shipped it.
33592
+ *
33593
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
33594
+ */
33595
+ var PreviewModeField = _enum(["image", "gif"]);
33596
+ /**
33597
+ * Which detection classes the notification reports counts for.
33598
+ *
33599
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
33600
+ * plan — no second query — aggregated per class. Absent or empty means "every
33601
+ * class the window actually contained", which is what an operator who never
33602
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
33603
+ * counts cars all night).
33604
+ *
33605
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
33606
+ * …). An unknown name simply never matches and reports nothing — it is not an
33607
+ * error, because a rule may legitimately name a class this camera's model does
33608
+ * not emit.
33609
+ *
33610
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
33611
+ * - `{{detections}}` — total over the reported classes
33612
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
33613
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
33614
+ * one per class, `count_` + the class name
33615
+ *
33616
+ * With NO custom body template the summary is appended to the derived body, and
33617
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
33618
+ * reads. With a custom template the operator owns every word — nothing is
33619
+ * appended, so `{{detectionSummary}}` is how he asks for it.
33620
+ */
33621
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
33622
+ /**
32779
33623
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
32780
33624
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
32781
33625
  * here (see the ownership note above).
@@ -32795,9 +33639,30 @@ var TimelapseRuleInputSchema = object({
32795
33639
  cadenceSec: CadenceSecField.default(15),
32796
33640
  /** Output frames per second of the assembled mp4 (predecessor parity). */
32797
33641
  framerate: FramerateField.default(10),
33642
+ /**
33643
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
33644
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
33645
+ * field gets.
33646
+ */
33647
+ denseCadenceSec: DenseCadenceSecField.optional(),
33648
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
33649
+ minDwellSec: MinDwellSecField.optional(),
32798
33650
  /** `notification-output` targets the finished video/thumbnail is sent to. */
32799
33651
  targets: TargetsField,
32800
33652
  template: TimelapseTemplateSchema.optional(),
33653
+ /**
33654
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
33655
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
33656
+ *
33657
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
33658
+ * the notification's title/body, and clearing it (`template: null`) must not
33659
+ * silently clear the caption too.
33660
+ */
33661
+ previewText: PreviewTextField.optional(),
33662
+ /** Still or animation — see {@link PreviewModeField}. */
33663
+ previewMode: PreviewModeField.default("image"),
33664
+ /** Classes the notification counts — see {@link ReportClassesField}. */
33665
+ reportClasses: ReportClassesField.optional(),
32801
33666
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
32802
33667
  priority: PriorityField.default(3)
32803
33668
  });
@@ -32808,8 +33673,13 @@ object({
32808
33673
  schedule: NcScheduleSchema.optional(),
32809
33674
  cadenceSec: CadenceSecField.optional(),
32810
33675
  framerate: FramerateField.optional(),
33676
+ denseCadenceSec: DenseCadenceSecField.optional(),
33677
+ minDwellSec: MinDwellSecField.optional(),
32811
33678
  targets: TargetsField.optional(),
32812
33679
  template: TimelapseTemplateSchema.nullable().optional(),
33680
+ previewText: PreviewTextField.optional(),
33681
+ previewMode: PreviewModeField.optional(),
33682
+ reportClasses: ReportClassesField.optional(),
32813
33683
  priority: PriorityField.optional()
32814
33684
  });
32815
33685
  TimelapseRuleInputSchema.extend({
@@ -32821,10 +33691,28 @@ TimelapseRuleInputSchema.extend({
32821
33691
  */
32822
33692
  ownerUserId: string().optional(),
32823
33693
  /**
32824
- * Epoch-ms of the last successful generation the 1-hour re-generation
32825
- * guard's durable state (predecessor parity). Absent = never generated.
33694
+ * Epoch-ms of the NEWEST successful generation across every camera of this
33695
+ * rule. What a UI shows, and the compatibility floor for
33696
+ * {@link readTimelapseGeneratedAt}. Absent = never generated.
32826
33697
  */
32827
33698
  lastGeneratedAt: number().optional(),
33699
+ /**
33700
+ * PER-CAMERA generation state, keyed by `String(deviceId)` — the
33701
+ * re-generation guard's real durable state.
33702
+ *
33703
+ * One rule covers several cameras and each renders its own video, so a rule
33704
+ * -wide stamp is wrong in the direction that DESTROYS work: camera A
33705
+ * succeeding at 06:05 tells camera B, whose render failed, that it is
33706
+ * already done — and B's night is gone for good, because the window will not
33707
+ * come back.
33708
+ *
33709
+ * ADDITIVE, so the migration is free: a row written before this field simply
33710
+ * has no map, and {@link readTimelapseGeneratedAt} falls back to
33711
+ * {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
33712
+ * "never generated" would re-render and re-notify every camera of every rule
33713
+ * once, on the deploy that shipped the map.
33714
+ */
33715
+ generatedByDevice: record(string(), number()).optional(),
32828
33716
  /** userId of the caller who created the rule (server-stamped). */
32829
33717
  createdBy: string(),
32830
33718
  createdAt: number(),