@camstack/addon-pipeline 1.2.69 → 1.2.71

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 (29) hide show
  1. package/dist/audio-analyzer/index.js +1 -1
  2. package/dist/audio-analyzer/index.mjs +1 -1
  3. package/dist/detection-pipeline/index.js +32 -30
  4. package/dist/detection-pipeline/index.mjs +32 -30
  5. package/dist/{dist-tJF2BzWi.js → dist-CtOVWTCi.js} +586 -41
  6. package/dist/{dist-DGLqaonv.mjs → dist-D1Xk5Tji.mjs} +586 -41
  7. package/dist/{event-loop-stall-monitor-D9d2e49f.js → event-loop-stall-monitor-BJs7Yws7.js} +1 -1
  8. package/dist/{event-loop-stall-monitor-C6_VDupx.mjs → event-loop-stall-monitor-Cmbt664E.mjs} +1 -1
  9. package/dist/motion-wasm/index.js +1 -1
  10. package/dist/motion-wasm/index.mjs +1 -1
  11. package/dist/pipeline-runner/index.js +100 -30
  12. package/dist/pipeline-runner/index.mjs +100 -30
  13. package/dist/recorder/index.js +734 -104
  14. package/dist/recorder/index.mjs +734 -104
  15. package/dist/session-decode/decode-worker-child.js +483 -52
  16. package/dist/session-decode/decode-worker-child.mjs +483 -52
  17. package/dist/stream-broker/_stub.js +660 -556
  18. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DCyQ7RKH.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BWf4H4Nl.mjs} +3 -3
  19. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Cu_kQpIy.mjs +26 -0
  20. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CExO0piw.mjs +26 -0
  21. package/dist/stream-broker/{hostInit-DxqtIjAe.mjs → hostInit-DD5Z1U6p.mjs} +3 -3
  22. package/dist/stream-broker/index.js +501 -32
  23. package/dist/stream-broker/index.mjs +501 -32
  24. package/dist/stream-broker/remoteEntry.js +1 -1
  25. package/dist/{worker-protocol-D6tXz9Or.js → worker-protocol-DEV7g32b.js} +26 -19
  26. package/dist/{worker-protocol-DuftUFEI.mjs → worker-protocol-Dm6LQ9Ls.mjs} +26 -19
  27. package/package.json +1 -1
  28. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-ircnzt0s.mjs +0 -26
  29. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DU7u9EJt.mjs +0 -26
@@ -8584,7 +8584,15 @@ function deriveRecordingMode(config) {
8584
8584
  * Each completed/failed run also lands one durable ops-log row on its owning
8585
8585
  * addon surface.
8586
8586
  */
8587
+ /**
8588
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
8589
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
8590
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
8591
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
8592
+ * runs at all.
8593
+ */
8587
8594
  var RelocateJobStateSchema = _enum([
8595
+ "queued",
8588
8596
  "running",
8589
8597
  "done",
8590
8598
  "failed",
@@ -8619,6 +8627,15 @@ var RelocateFootageInputSchema = object({
8619
8627
  /** Limits relocation to the logical profile class. Omit only for the
8620
8628
  * pre-orchestration compatibility path. */
8621
8629
  footageClass: RelocateFootageClassSchema.optional(),
8630
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
8631
+ * is what a whole-disk drain means. The rebalance path always sets it: its
8632
+ * unit is a (camera, profile) pile, not a disk. */
8633
+ deviceId: number().int().optional(),
8634
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
8635
+ * Finer than `footageClass`, which cannot separate high from mid — and the
8636
+ * placement plan assigns those two independently, so a rebalance that could
8637
+ * only say "recordings" would move footage the plan never asked to move. */
8638
+ profiles: array(string()).optional(),
8622
8639
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
8623
8640
  * never allowed to starve live writers. */
8624
8641
  throttleMbps: number().min(1).max(1e3).optional()
@@ -15671,6 +15688,13 @@ var MaskGridDimsSchema = object({
15671
15688
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
15672
15689
  * this one field keeps the schema additive — a rule still declares exactly
15673
15690
  * one trigger.
15691
+ *
15692
+ * AUDIO rules add no member here, for the reason occupancy added none: the
15693
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
15694
+ * mirror.ts` fails the build on a member the app cannot render) and every
15695
+ * member costs a release train. A sustained-sound rule is therefore an
15696
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
15697
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
15674
15698
  */
15675
15699
  var NcDeliverySchema = _enum([
15676
15700
  "immediate",
@@ -15685,15 +15709,32 @@ var NcDeliverySchema = _enum([
15685
15709
  * depend on a provider's raw event name or payload shape.
15686
15710
  */
15687
15711
  var NcSystemEventKindSchema = _enum([
15688
- "camera-online",
15689
- "camera-offline",
15712
+ "device-online",
15713
+ "device-offline",
15714
+ "device-disabled",
15715
+ "device-enabled",
15690
15716
  "stream-online",
15691
15717
  "stream-offline",
15692
15718
  "node-online",
15693
15719
  "node-offline",
15694
15720
  "addon-update-available",
15695
- "server-update-available"
15721
+ "server-update-available",
15722
+ "alarm-triggered",
15723
+ "alarm-armed",
15724
+ "alarm-disarmed",
15725
+ "camera-online",
15726
+ "camera-offline",
15727
+ "camera-disabled",
15728
+ "camera-enabled"
15696
15729
  ]);
15730
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
15731
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
15732
+ "camera-online",
15733
+ "camera-offline",
15734
+ "camera-disabled",
15735
+ "camera-enabled"
15736
+ ]);
15737
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
15697
15738
  /**
15698
15739
  * One coherent system-event condition. `kinds` is the required opt-in safety
15699
15740
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -15702,6 +15743,18 @@ var NcSystemEventKindSchema = _enum([
15702
15743
  var NcSystemEventConditionSchema = object({
15703
15744
  kinds: array(NcSystemEventKindSchema).min(1),
15704
15745
  deviceIds: array(number().int()).min(1).optional(),
15746
+ /**
15747
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
15748
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
15749
+ * is what a liveness rule means when nobody said otherwise.
15750
+ *
15751
+ * This is where "only my cameras" is expressed, and it lives on the rule for
15752
+ * one reason: the intake cannot know which devices this household cares
15753
+ * about, and a producer-side filter is one no operator can change. Fails
15754
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
15755
+ * does not carry) matches no `deviceTypes` list.
15756
+ */
15757
+ deviceTypes: array(string().min(1)).min(1).optional(),
15705
15758
  nodeIds: array(string().min(1)).min(1).optional(),
15706
15759
  packageNames: array(string().min(1)).min(1).optional()
15707
15760
  });
@@ -15752,6 +15805,47 @@ var NcOccupancyConditionSchema = object({
15752
15805
  sustainSeconds: number().int().min(0).max(3600).default(15)
15753
15806
  });
15754
15807
  /**
15808
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
15809
+ *
15810
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
15811
+ * reference notifier uses, so an operator moving between them re-uses what
15812
+ * they already know): a rule matches when, over a sampling window of
15813
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
15814
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
15815
+ *
15816
+ * - `dbThreshold` — its level is at or above this many dBFS (see
15817
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
15818
+ * - `labels` — the classifier put at least one of these labels on it.
15819
+ *
15820
+ * Both are OPTIONAL and independent, which is the point of the shape: a
15821
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
15822
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
15823
+ * is given** — a window in which every sample is trivially a hit would fire on
15824
+ * silence, so the engine refuses such a condition rather than notifying on
15825
+ * nothing (the schema cannot express "at least one of" without becoming a
15826
+ * ZodEffects the cap path would have to special-case).
15827
+ *
15828
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
15829
+ * must be FULL before it can match — a window that has been open for two
15830
+ * seconds of its ten is 100% of nothing, and firing on it would make
15831
+ * `samplingSeconds` decorative.
15832
+ *
15833
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
15834
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
15835
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
15836
+ * an operator who typed `dog` mean the same thing.
15837
+ */
15838
+ var NcAudioConditionSchema = object({
15839
+ /** Audio macro labels; absent = any sound (level-only rule). */
15840
+ labels: array(string().min(1)).min(1).optional(),
15841
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
15842
+ dbThreshold: number().min(-96).max(0).optional(),
15843
+ /** Percentage of the window's samples that must be hits (1–100). */
15844
+ hitPercent: number().int().min(1).max(100).default(60),
15845
+ /** Length of the sampling window in seconds. */
15846
+ samplingSeconds: number().int().min(1).max(300).default(10)
15847
+ });
15848
+ /**
15755
15849
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
15756
15850
  *
15757
15851
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -16024,7 +16118,33 @@ var NcConditionsSchema = object({
16024
16118
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
16025
16119
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
16026
16120
  */
16027
- occupancy: NcOccupancyConditionSchema.optional()
16121
+ occupancy: NcOccupancyConditionSchema.optional(),
16122
+ /**
16123
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
16124
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
16125
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
16126
+ * a window that is not full yet, neither filter given). See
16127
+ * {@link NcAudioCondition}.
16128
+ *
16129
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
16130
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
16131
+ * a detection, a track or a device event (the same fail-closed pairing
16132
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
16133
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
16134
+ * (an `immediate` rule naming an `audio-*` class, one notification per
16135
+ * classified sample) stays exactly as it was for rules that already use it.
16136
+ *
16137
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
16138
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
16139
+ * (`camstack/src/data/notification-center.ts`, guarded by
16140
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
16141
+ * condition fields it does not know when a rule is saved from the phone.
16142
+ * Publishing an editor for a condition the app cannot round-trip is how an
16143
+ * operator loses a rule's conditions by opening it — so the descriptor, the
16144
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
16145
+ * does an audio rule become authorable.
16146
+ */
16147
+ audio: NcAudioConditionSchema.optional()
16028
16148
  });
16029
16149
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
16030
16150
  var NcRuleTargetSchema = object({
@@ -16138,6 +16258,73 @@ var NcThrottleSchema = object({
16138
16258
  */
16139
16259
  granularity: NcThrottleGranularitySchema.optional()
16140
16260
  });
16261
+ /**
16262
+ * How long the confirm gate may hold ONE notification, and how big the picture
16263
+ * it judges may be.
16264
+ *
16265
+ * The clamp is the product decision, not a coincidence of the model: p50 was
16266
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
16267
+ * arrives after the visitor has gone is not a notification. 448 px was enough
16268
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
16269
+ * tokens for pixels the model pools away.
16270
+ */
16271
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
16272
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
16273
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
16274
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
16275
+ var NcConfirmExpectSchema = object({
16276
+ op: _enum([
16277
+ ">=",
16278
+ ">",
16279
+ "<=",
16280
+ "<",
16281
+ "=="
16282
+ ]),
16283
+ count: number().int().min(0).max(1e3)
16284
+ });
16285
+ /**
16286
+ * AI CONFIRM — a vision model looks at the picture this notification is about
16287
+ * to ship and says whether it agrees with the rule.
16288
+ *
16289
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
16290
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
16291
+ * on the operator's phone is not a verdict about this notification.
16292
+ *
16293
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
16294
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
16295
+ * the default and every fail-open is COUNTED, because a gate that always fails
16296
+ * open looks in the log exactly like a gate that works.
16297
+ *
16298
+ * Every field is `.optional()` rather than relied on as a Zod default at the
16299
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
16300
+ * production failures in one day), so the gate reads absent as the constant
16301
+ * above rather than trusting a parse it may never have seen.
16302
+ */
16303
+ var NcConfirmSchema = object({
16304
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
16305
+ * same thing, and both mean "deliver exactly as before". */
16306
+ enabled: boolean().default(false),
16307
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
16308
+ profileId: string().optional(),
16309
+ /**
16310
+ * The operator's question, in his own words. Absent = a question derived
16311
+ * from the rule (its class and its expectation).
16312
+ *
16313
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
16314
+ * banners, signage and plates as instructions if you let them reach the
16315
+ * prompt — proven live — so the authoritative contract stays in the system
16316
+ * turn and only rule-authored words land here.
16317
+ */
16318
+ prompt: string().max(1e3).optional(),
16319
+ /** Fire only when the model's count satisfies this. Absent = the model's
16320
+ * own boolean verdict decides. */
16321
+ expect: NcConfirmExpectSchema.optional(),
16322
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
16323
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
16324
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
16325
+ /** Longest edge the judged image is downscaled to before it is sent. */
16326
+ maxImagePx: number().int().min(64).max(2048).default(448)
16327
+ });
16141
16328
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
16142
16329
  var NcRuleInputSchema = object({
16143
16330
  name: string().min(1).max(200),
@@ -16198,7 +16385,13 @@ var NcRuleInputSchema = object({
16198
16385
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
16199
16386
  * shape as every other actuation.
16200
16387
  */
16201
- actions: NcRuleActionsSchema.optional()
16388
+ actions: NcRuleActionsSchema.optional(),
16389
+ /**
16390
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
16391
+ * a rule that predates the gate must keep delivering byte-for-byte as it
16392
+ * did, and absent is the only way to say that without a migration.
16393
+ */
16394
+ confirm: NcConfirmSchema.optional()
16202
16395
  });
16203
16396
  /**
16204
16397
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -16209,7 +16402,37 @@ var NcRuleInputSchema = object({
16209
16402
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
16210
16403
  * `updateRule` patch.
16211
16404
  */
16212
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
16405
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
16406
+ disabledTargetIds: array(string()).optional(),
16407
+ /**
16408
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
16409
+ *
16410
+ * It makes the key optional to SUPPLY; the parse still materialises the
16411
+ * default when the key is absent. And `NcRuleStore.update` merges with
16412
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
16413
+ * one — which made every partial edit destructive:
16414
+ *
16415
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
16416
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
16417
+ * setEnabled(ruleId, false) → conditions reset to `{}`
16418
+ *
16419
+ * A rule scoped to one camera and one zone silently became a rule that
16420
+ * matches EVERY event on EVERY camera, and lost its `media` policy
16421
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
16422
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
16423
+ * within a minute of a two-field patch.
16424
+ *
16425
+ * So every defaulted field is re-declared here WITHOUT its default. The
16426
+ * inner defaults still apply when the caller DOES send the key — `{}` for
16427
+ * conditions remains a real instruction ("clear them") — and only the
16428
+ * absent key is now genuinely absent.
16429
+ */
16430
+ enabled: boolean().optional(),
16431
+ conditions: NcConditionsSchema.optional(),
16432
+ media: NcMediaPolicySchema.optional(),
16433
+ throttle: NcThrottleSchema.optional(),
16434
+ priority: number().int().min(1).max(5).optional()
16435
+ });
16213
16436
  /** A persisted rule. */
16214
16437
  var NcRuleSchema = NcRuleInputSchema.extend({
16215
16438
  id: string(),
@@ -16510,6 +16733,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
16510
16733
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
16511
16734
  * copy would lie the first time a rule is disabled.
16512
16735
  */
16736
+ /**
16737
+ * Why a device a mode NAMES is nonetheless not armed by it.
16738
+ *
16739
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
16740
+ * per-camera notification switch the Notification Center already owns,
16741
+ * `detection-off` is the device's own detection binding being inactive, and
16742
+ * `offline` is the device manager's liveness. A fourth reason would mean a
16743
+ * fourth authority, and inventing one here is how a panel starts disagreeing
16744
+ * with the switches the operator actually used.
16745
+ */
16746
+ var NcAlarmSkipReasonSchema = _enum([
16747
+ "muted",
16748
+ "detection-off",
16749
+ "offline"
16750
+ ]);
16751
+ var NcAlarmSkippedDeviceSchema = object({
16752
+ deviceId: number().int(),
16753
+ reason: NcAlarmSkipReasonSchema
16754
+ });
16513
16755
  var NcAlarmModeCoverageSchema = object({
16514
16756
  mode: AlarmArmModeSchema,
16515
16757
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -16517,7 +16759,18 @@ var NcAlarmModeCoverageSchema = object({
16517
16759
  /** At least one covering rule has no device scope, so the mode covers all. */
16518
16760
  allDevices: boolean(),
16519
16761
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
16520
- deviceIds: array(number().int())
16762
+ deviceIds: array(number().int()),
16763
+ /**
16764
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
16765
+ * excludes it.
16766
+ *
16767
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
16768
+ * twelve makes it false in exactly the way nobody notices until an incident.
16769
+ * Defaulted to `[]` so a coverage answer computed before this field existed
16770
+ * still parses as "nothing known to be skipped" rather than failing the whole
16771
+ * alarm tab.
16772
+ */
16773
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
16521
16774
  });
16522
16775
  var NcAlarmConfigSchema = object({
16523
16776
  /**
@@ -25223,7 +25476,19 @@ var RecordingManifestSchema = object({
25223
25476
  * profiles/subtrees/locations on this node). */
25224
25477
  var RecordingDeviceUsageSchema = object({
25225
25478
  deviceId: number(),
25226
- usedBytes: number()
25479
+ usedBytes: number(),
25480
+ /**
25481
+ * Start of this camera's OLDEST indexed segment, across every profile and
25482
+ * location — the "Oldest footage" column in Recordings → Storage, and the
25483
+ * only honest answer to "is retention actually holding?" per camera.
25484
+ *
25485
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
25486
+ * predates this field omits it entirely, and a hub whose types carry the
25487
+ * field must keep validating that older provider's payload: the framework
25488
+ * (types) and the addon ship on different trains, and the addon is usually
25489
+ * the later of the two.
25490
+ */
25491
+ oldestMs: number().nullable().optional()
25227
25492
  });
25228
25493
  /** Recording storage usage + capacity for one storage location. */
25229
25494
  var RecordingLocationUsageSchema = object({
@@ -25251,6 +25516,57 @@ var RecordingStorageUsageSchema = object({
25251
25516
  locations: array(RecordingLocationUsageSchema)
25252
25517
  });
25253
25518
  /**
25519
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
25520
+ *
25521
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
25522
+ * is the operator asking for the EXISTING archive to be brought into line with
25523
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
25524
+ * location, run FIFO behind the single-flight mover.
25525
+ *
25526
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
25527
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
25528
+ * (empty on the plan).
25529
+ */
25530
+ var RecordingRebalanceMoveSchema = object({
25531
+ deviceId: number(),
25532
+ profile: string(),
25533
+ fromLocationId: string(),
25534
+ toLocationId: string(),
25535
+ bytes: number(),
25536
+ files: number().int()
25537
+ });
25538
+ /** Why a pile that is out of place is staying there. Every refusal is
25539
+ * reported: a rebalance that silently drops a camera reads exactly like one
25540
+ * that had nothing to do. */
25541
+ var RecordingRebalanceSkipReasonSchema = _enum([
25542
+ "unassigned",
25543
+ "target-not-writable",
25544
+ "below-threshold",
25545
+ "no-headroom"
25546
+ ]);
25547
+ var RecordingRebalanceSkipSchema = object({
25548
+ deviceId: number(),
25549
+ profile: string(),
25550
+ fromLocationId: string(),
25551
+ /** The location the plan wants; null when the camera has no assignment. */
25552
+ toLocationId: string().nullable(),
25553
+ bytes: number(),
25554
+ reason: RecordingRebalanceSkipReasonSchema
25555
+ });
25556
+ var RecordingRebalancePlanSchema = object({
25557
+ moves: array(RecordingRebalanceMoveSchema),
25558
+ skipped: array(RecordingRebalanceSkipSchema),
25559
+ bytesToMove: number(),
25560
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
25561
+ jobIds: array(string())
25562
+ });
25563
+ var RecordingRebalanceInputSchema = object({
25564
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
25565
+ throttleMbps: number().min(1).max(1e3).optional(),
25566
+ /** Ignore piles smaller than this (default 1 GB). */
25567
+ minMoveGb: number().min(0).optional()
25568
+ });
25569
+ /**
25254
25570
  * Result of locating footage at a wall-clock instant for one device/profile.
25255
25571
  * `segment` carries the covering segment's window; `gap` reports the forward
25256
25572
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -25494,6 +25810,36 @@ var recordingCapability = {
25494
25810
  cancelStorageMigrationMove: method(object({ jobId: string() }), object({ cancelled: boolean() }), {
25495
25811
  kind: "mutation",
25496
25812
  auth: "admin"
25813
+ }),
25814
+ /**
25815
+ * Move footage between locations — the OPERATOR's mover, scoped to one
25816
+ * camera (and optionally to specific profiles) rather than a whole disk.
25817
+ * Queued FIFO behind the single-flight engine, so arming several is safe.
25818
+ */
25819
+ relocateFootage: method(RelocateFootageInputSchema, object({ jobId: string() }), {
25820
+ kind: "mutation",
25821
+ auth: "admin"
25822
+ }),
25823
+ /** Every relocate job this recorder knows about, newest first (in RAM: the
25824
+ * move is resumable, so a lost list costs nothing but the display). */
25825
+ listRelocateJobs: method(object({}), array(RelocateJobSchema).readonly(), {
25826
+ kind: "query",
25827
+ auth: "admin"
25828
+ }),
25829
+ /** Cancel a running or queued relocate job. A queued job never runs. */
25830
+ cancelRelocateJob: method(object({ jobId: string() }), object({ cancelled: boolean() }), {
25831
+ kind: "mutation",
25832
+ auth: "admin"
25833
+ }),
25834
+ /** What a rebalance WOULD move, and what it would refuse. Moves nothing. */
25835
+ planStorageRebalance: method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25836
+ kind: "query",
25837
+ auth: "admin"
25838
+ }),
25839
+ /** Arm the rebalance: enqueue one relocate job per planned move. */
25840
+ startStorageRebalance: method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
25841
+ kind: "mutation",
25842
+ auth: "admin"
25497
25843
  })
25498
25844
  }
25499
25845
  };
@@ -25514,13 +25860,24 @@ var recordingCapability = {
25514
25860
  /** Playback-speed multiplier for the render (1 = realtime). */
25515
25861
  var ExportSpeedSchema = number().min(.25).max(32);
25516
25862
  /**
25517
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
25863
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
25864
+ *
25865
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
25866
+ * derives these bounds from things that happened at a TIME (a track's
25867
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
25868
+ * every segment present for the range, with each recording GAP removed. The
25869
+ * two agree only on a window that recorded without one interruption, and only
25870
+ * the render side knows the segments, so the translation lives there
25871
+ * (`export-dense-map.ts`, addon-pipeline).
25872
+ *
25873
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
25874
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
25875
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
25876
+ * the video was a uniform timelapse, and the log line reported the five ranges
25877
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
25518
25878
  *
25519
- * Relative and not absolute epoch on purpose: the renderer's frame-select
25520
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
25521
- * playlist. Handing it absolute epochs would make every call site responsible
25522
- * for the same subtraction, and the one that forgot would emit a filter that
25523
- * selects nothing — silently, as a uniform timelapse.
25879
+ * Relative and not absolute epoch, because an absolute epoch would make every
25880
+ * call site responsible for the same subtraction.
25524
25881
  */
25525
25882
  var ExportDenseRangeSchema = object({
25526
25883
  fromSec: number().nonnegative(),
@@ -30894,6 +31251,12 @@ Object.freeze({
30894
31251
  addonId: null,
30895
31252
  access: "create"
30896
31253
  },
31254
+ "recording.cancelRelocateJob": {
31255
+ capName: "recording",
31256
+ capScope: "system",
31257
+ addonId: null,
31258
+ access: "create"
31259
+ },
30897
31260
  "recording.cancelStorageMigrationMove": {
30898
31261
  capName: "recording",
30899
31262
  capScope: "system",
@@ -30948,6 +31311,12 @@ Object.freeze({
30948
31311
  addonId: null,
30949
31312
  access: "view"
30950
31313
  },
31314
+ "recording.listRelocateJobs": {
31315
+ capName: "recording",
31316
+ capScope: "system",
31317
+ addonId: null,
31318
+ access: "view"
31319
+ },
30951
31320
  "recording.locateSegment": {
30952
31321
  capName: "recording",
30953
31322
  capScope: "system",
@@ -30960,6 +31329,12 @@ Object.freeze({
30960
31329
  addonId: null,
30961
31330
  access: "create"
30962
31331
  },
31332
+ "recording.planStorageRebalance": {
31333
+ capName: "recording",
31334
+ capScope: "system",
31335
+ addonId: null,
31336
+ access: "view"
31337
+ },
30963
31338
  "recording.pruneFootage": {
30964
31339
  capName: "recording",
30965
31340
  capScope: "system",
@@ -30984,6 +31359,12 @@ Object.freeze({
30984
31359
  addonId: null,
30985
31360
  access: "create"
30986
31361
  },
31362
+ "recording.relocateFootage": {
31363
+ capName: "recording",
31364
+ capScope: "system",
31365
+ addonId: null,
31366
+ access: "create"
31367
+ },
30987
31368
  "recording.renderClip": {
30988
31369
  capName: "recording",
30989
31370
  capScope: "system",
@@ -31020,6 +31401,12 @@ Object.freeze({
31020
31401
  addonId: null,
31021
31402
  access: "create"
31022
31403
  },
31404
+ "recording.startStorageRebalance": {
31405
+ capName: "recording",
31406
+ capScope: "system",
31407
+ addonId: null,
31408
+ access: "create"
31409
+ },
31023
31410
  "recordingExport.cancelExport": {
31024
31411
  capName: "recording-export",
31025
31412
  capScope: "system",
@@ -32434,6 +32821,104 @@ var FramerateField = number().int().min(1).max(60);
32434
32821
  var TargetsField = array(NcRuleTargetSchema).min(1);
32435
32822
  var PriorityField = number().int().min(1).max(5);
32436
32823
  /**
32824
+ * Explicit override of the DENSE sampling cadence, seconds.
32825
+ *
32826
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
32827
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
32828
+ * made that same base 3 s and rendered a person pass as two frames.)
32829
+ *
32830
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
32831
+ * `denseCadenceSec` and played at `framerate` occupies
32832
+ *
32833
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
32834
+ *
32835
+ * 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.
32836
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
32837
+ * and therefore the length of a quiet night, does not move.
32838
+ *
32839
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
32840
+ * the recording has them returns the same frames, requested twice. Must be
32841
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
32842
+ * a uniform video the operator believes is two-rate — and upsert refuses it
32843
+ * rather than letting the export cap reject the render hours after the window.
32844
+ */
32845
+ var DenseCadenceSecField = number().min(.1).max(3600);
32846
+ /**
32847
+ * Minimum seconds of OUTPUT video each detection range must occupy.
32848
+ *
32849
+ * The operator-facing form of the arithmetic above: instead of solving for a
32850
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
32851
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
32852
+ * that range every ~583 ms.
32853
+ *
32854
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
32855
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
32856
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
32857
+ * ranges are sampled denser than they need. Per-range cadences require a cap
32858
+ * schema change and are the tracked follow-up.
32859
+ *
32860
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
32861
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
32862
+ * by real footage, never met by duplicating frames into motion that never
32863
+ * happened.
32864
+ */
32865
+ var MinDwellSecField = number().min(0).max(60);
32866
+ /**
32867
+ * Caption burned into the notification's preview frame.
32868
+ *
32869
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
32870
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
32871
+ * templating dialect for one field would be a second thing to explain.
32872
+ *
32873
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
32874
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
32875
+ * the reason this is not `.min(1)`.
32876
+ */
32877
+ var PreviewTextField = string().max(200);
32878
+ /**
32879
+ * Whether the notification's preview is a STILL or a short animation.
32880
+ *
32881
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
32882
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
32883
+ * night reads better as three seconds of motion than as one frame of it. Both
32884
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
32885
+ * simply applies it to a dozen frames sampled across the render and assembles
32886
+ * them.
32887
+ *
32888
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
32889
+ * seeks and a palette pass, and no rule that never asked for one should start
32890
+ * paying that on the deploy that shipped it.
32891
+ *
32892
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
32893
+ */
32894
+ var PreviewModeField = _enum(["image", "gif"]);
32895
+ /**
32896
+ * Which detection classes the notification reports counts for.
32897
+ *
32898
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
32899
+ * plan — no second query — aggregated per class. Absent or empty means "every
32900
+ * class the window actually contained", which is what an operator who never
32901
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
32902
+ * counts cars all night).
32903
+ *
32904
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
32905
+ * …). An unknown name simply never matches and reports nothing — it is not an
32906
+ * error, because a rule may legitimately name a class this camera's model does
32907
+ * not emit.
32908
+ *
32909
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
32910
+ * - `{{detections}}` — total over the reported classes
32911
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
32912
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
32913
+ * one per class, `count_` + the class name
32914
+ *
32915
+ * With NO custom body template the summary is appended to the derived body, and
32916
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
32917
+ * reads. With a custom template the operator owns every word — nothing is
32918
+ * appended, so `{{detectionSummary}}` is how he asks for it.
32919
+ */
32920
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
32921
+ /**
32437
32922
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
32438
32923
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
32439
32924
  * here (see the ownership note above).
@@ -32453,9 +32938,30 @@ var TimelapseRuleInputSchema = object({
32453
32938
  cadenceSec: CadenceSecField.default(15),
32454
32939
  /** Output frames per second of the assembled mp4 (predecessor parity). */
32455
32940
  framerate: FramerateField.default(10),
32941
+ /**
32942
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
32943
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
32944
+ * field gets.
32945
+ */
32946
+ denseCadenceSec: DenseCadenceSecField.optional(),
32947
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
32948
+ minDwellSec: MinDwellSecField.optional(),
32456
32949
  /** `notification-output` targets the finished video/thumbnail is sent to. */
32457
32950
  targets: TargetsField,
32458
32951
  template: TimelapseTemplateSchema.optional(),
32952
+ /**
32953
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
32954
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
32955
+ *
32956
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
32957
+ * the notification's title/body, and clearing it (`template: null`) must not
32958
+ * silently clear the caption too.
32959
+ */
32960
+ previewText: PreviewTextField.optional(),
32961
+ /** Still or animation — see {@link PreviewModeField}. */
32962
+ previewMode: PreviewModeField.default("image"),
32963
+ /** Classes the notification counts — see {@link ReportClassesField}. */
32964
+ reportClasses: ReportClassesField.optional(),
32459
32965
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
32460
32966
  priority: PriorityField.default(3)
32461
32967
  });
@@ -32466,8 +32972,13 @@ object({
32466
32972
  schedule: NcScheduleSchema.optional(),
32467
32973
  cadenceSec: CadenceSecField.optional(),
32468
32974
  framerate: FramerateField.optional(),
32975
+ denseCadenceSec: DenseCadenceSecField.optional(),
32976
+ minDwellSec: MinDwellSecField.optional(),
32469
32977
  targets: TargetsField.optional(),
32470
32978
  template: TimelapseTemplateSchema.nullable().optional(),
32979
+ previewText: PreviewTextField.optional(),
32980
+ previewMode: PreviewModeField.optional(),
32981
+ reportClasses: ReportClassesField.optional(),
32471
32982
  priority: PriorityField.optional()
32472
32983
  });
32473
32984
  TimelapseRuleInputSchema.extend({
@@ -32652,10 +33163,11 @@ function slideInsideFrame(rect, frameWidth, frameHeight) {
32652
33163
  h
32653
33164
  };
32654
33165
  }
32655
- var NATIVE_LEASE_TTL_KEY = "nativeLeaseTtlMs";
33166
+ var NATIVE_LEASE_HOLD_KEY = "nativeLeaseHoldFrames";
32656
33167
  var NATIVE_LEASE_BUDGET_KEY = "nativeLeaseBudgetMb";
32657
33168
  var NATIVE_LEASE_ACTIVITY_KEY = "nativeLeaseActivityMs";
32658
33169
  var NATIVE_LEASE_ADMISSION_KEY = "nativeLeaseAdmission";
33170
+ var NATIVE_LEASE_TILE_BUDGET_KEY = "nativeTileBudgetMb";
32659
33171
  /**
32660
33172
  * WHICH delivered frames the decode worker retains a native copy of.
32661
33173
  *
@@ -32682,25 +33194,32 @@ var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
32682
33194
  */
32683
33195
  var NativeLeaseSettingsSchema = object({
32684
33196
  /**
32685
- * How long a retained native frame is served before it counts as a miss.
33197
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
33198
+ * detection result.
33199
+ *
33200
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
33201
+ * a time window was never related to the event the pixels were waiting for.
33202
+ * A held frame now lives from delivery until the runner has its `FrameResult`
33203
+ * — at which moment the runner cuts the subject tiles it actually wanted and
33204
+ * releases the frame. The bound exists only so a runner that stops answering
33205
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
32686
33206
  *
32687
- * Must cover the FULL late-crop horizon: detection inference + the
32688
- * cross-process inference-result hop to hub post-analysis + tracking + the
32689
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
32690
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
32691
- * RAM per busy camera grows linearly with no measured hit-rate gain.
33207
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
33208
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
33209
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
33210
+ * Raising it does not buy hit rate it buys tolerance for a slow runner, and
33211
+ * `holdOverflow` on the metrics line is what says you need it.
32692
33212
  */
32693
- ttlMs: number().int().min(250).max(1e4),
33213
+ holdFrames: number().int().min(1).max(64),
32694
33214
  /**
32695
33215
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
32696
33216
  *
32697
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
32698
- * which one is actually binding before reasoning from that. At the shipped
32699
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
32700
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
32701
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
32702
- * change that admits fewer frames buys retention WINDOW at constant RAM
32703
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
33217
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
33218
+ * is what decides how much is held, and the ceiling is the number above which
33219
+ * something is wrong. Before that it was the effective cap at 1024 MB with
33220
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
33221
+ * with the TTL expiring nothing, which is exactly the confusion the hold
33222
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
32704
33223
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
32705
33224
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
32706
33225
  * to replace).
@@ -32726,22 +33245,45 @@ var NativeLeaseSettingsSchema = object({
32726
33245
  * there is the signal that some caller names frames outside the inference set
32727
33246
  * and that this must go back to `all`.
32728
33247
  */
32729
- admission: NativeLeaseAdmissionSchema
33248
+ admission: NativeLeaseAdmissionSchema,
33249
+ /**
33250
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
33251
+ * compressed native crops the worker cuts at the moment a frame's detection
33252
+ * result arrives, and keeps long after the frame itself is freed.
33253
+ *
33254
+ * This is the knob that replaced the old retention window, and it buys about
33255
+ * three orders of magnitude more of it: a tile is one subject at native
33256
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
33257
+ * the frame it was cut from. A frame on which nothing was detected costs
33258
+ * nothing at all, which is the real change — the old lease paid per FRAME and
33259
+ * was interrogated per SUBJECT.
33260
+ *
33261
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
33262
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
33263
+ * reproduce that.
33264
+ */
33265
+ tileBudgetMb: number().int().min(0).max(1024)
32730
33266
  });
32731
33267
  /**
32732
- * The values in force when the operator has set nothing — byte-for-byte the
32733
- * constants the decode worker shipped with as env-var defaults, so making these
32734
- * settings changed no behaviour on the day it landed.
33268
+ * The values in force when the operator has set nothing.
33269
+ *
33270
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
33271
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
33272
+ * in the same change that redefines it would make a regression and a retune
33273
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
33274
+ * live traffic.
32735
33275
  */
32736
33276
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
32737
- ttlMs: 1200,
33277
+ holdFrames: 8,
32738
33278
  budgetMb: 1024,
32739
33279
  activityMs: 15e3,
33280
+ tileBudgetMb: 64,
32740
33281
  admission: "inferred"
32741
33282
  };
32742
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
33283
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
32743
33284
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
32744
33285
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
33286
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
32745
33287
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
32746
33288
  /**
32747
33289
  * Parse one knob, reporting `null` for absent, junk, out-of-bounds — AND for a
@@ -32751,7 +33293,7 @@ DEFAULT_NATIVE_LEASE_SETTINGS.admission;
32751
33293
  * precedence being true and being a lie. `addon-settings.getGlobalSettings`
32752
33294
  * returns a HYDRATED payload, and `hydrateField` fills an unstored field with
32753
33295
  * the schema's own `default` (verified live on the hub: a cluster that has never
32754
- * opened the form still reports `nativeLeaseTtlMs = 1200`). A reader that took
33296
+ * opened the form still reports `nativeLeaseHoldFrames = 8`). A reader that took
32755
33297
  * that at face value would report all three knobs as "set" on every cluster on
32756
33298
  * the day this shipped, permanently retiring the `CAMSTACK_SESSION_NATIVE_LEASE_*`
32757
33299
  * emergency override that the precedence promises. There is no raw-store read on
@@ -32785,25 +33327,28 @@ function readAdmissionKnob(raw) {
32785
33327
  * {@link readKnob} for why the default counts as unset.
32786
33328
  */
32787
33329
  function readNativeLeaseOverride(config) {
32788
- const ttlMs = readKnob("ttlMs", config[NATIVE_LEASE_TTL_KEY]);
33330
+ const holdFrames = readKnob("holdFrames", config[NATIVE_LEASE_HOLD_KEY]);
32789
33331
  const budgetMb = readKnob("budgetMb", config[NATIVE_LEASE_BUDGET_KEY]);
32790
33332
  const activityMs = readKnob("activityMs", config[NATIVE_LEASE_ACTIVITY_KEY]);
32791
33333
  const admission = readAdmissionKnob(config[NATIVE_LEASE_ADMISSION_KEY]);
33334
+ const tileBudgetMb = readKnob("tileBudgetMb", config[NATIVE_LEASE_TILE_BUDGET_KEY]);
32792
33335
  return {
32793
- ...ttlMs === null ? {} : { ttlMs },
33336
+ ...holdFrames === null ? {} : { holdFrames },
32794
33337
  ...budgetMb === null ? {} : { budgetMb },
32795
33338
  ...activityMs === null ? {} : { activityMs },
32796
- ...admission === null ? {} : { admission }
33339
+ ...admission === null ? {} : { admission },
33340
+ ...tileBudgetMb === null ? {} : { tileBudgetMb }
32797
33341
  };
32798
33342
  }
32799
33343
  function isHydratedField(entry) {
32800
33344
  return typeof entry === "object" && entry !== null && "key" in entry;
32801
33345
  }
32802
33346
  var LEASE_KEYS = [
32803
- NATIVE_LEASE_TTL_KEY,
33347
+ NATIVE_LEASE_HOLD_KEY,
32804
33348
  NATIVE_LEASE_BUDGET_KEY,
32805
33349
  NATIVE_LEASE_ACTIVITY_KEY,
32806
- NATIVE_LEASE_ADMISSION_KEY
33350
+ NATIVE_LEASE_ADMISSION_KEY,
33351
+ NATIVE_LEASE_TILE_BUDGET_KEY
32807
33352
  ];
32808
33353
  /**
32809
33354
  * Extract the operator's lease overrides from an