@camstack/addon-provider-rademacher 0.2.13 → 0.2.14

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.
package/dist/addon.js CHANGED
@@ -26126,13 +26126,24 @@ method(object({
26126
26126
  /** Playback-speed multiplier for the render (1 = realtime). */
26127
26127
  var ExportSpeedSchema = number().min(.25).max(32);
26128
26128
  /**
26129
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
26129
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
26130
26130
  *
26131
- * Relative and not absolute epoch on purpose: the renderer's frame-select
26132
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
26133
- * playlist. Handing it absolute epochs would make every call site responsible
26134
- * for the same subtraction, and the one that forgot would emit a filter that
26135
- * selects nothing silently, as a uniform timelapse.
26131
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
26132
+ * derives these bounds from things that happened at a TIME (a track's
26133
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
26134
+ * every segment present for the range, with each recording GAP removed. The
26135
+ * two agree only on a window that recorded without one interruption, and only
26136
+ * the render side knows the segments, so the translation lives there
26137
+ * (`export-dense-map.ts`, addon-pipeline).
26138
+ *
26139
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
26140
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
26141
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
26142
+ * the video was a uniform timelapse, and the log line reported the five ranges
26143
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
26144
+ *
26145
+ * Relative and not absolute epoch, because an absolute epoch would make every
26146
+ * call site responsible for the same subtraction.
26136
26147
  */
26137
26148
  var ExportDenseRangeSchema = object({
26138
26149
  fromSec: number().nonnegative(),
@@ -34746,25 +34757,32 @@ object({
34746
34757
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
34747
34758
  object({
34748
34759
  /**
34749
- * How long a retained native frame is served before it counts as a miss.
34760
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
34761
+ * detection result.
34750
34762
  *
34751
- * Must cover the FULL late-crop horizon: detection inference + the
34752
- * cross-process inference-result hop to hub post-analysis + tracking + the
34753
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
34754
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
34755
- * RAM per busy camera grows linearly with no measured hit-rate gain.
34763
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
34764
+ * a time window was never related to the event the pixels were waiting for.
34765
+ * A held frame now lives from delivery until the runner has its `FrameResult`
34766
+ * at which moment the runner cuts the subject tiles it actually wanted and
34767
+ * releases the frame. The bound exists only so a runner that stops answering
34768
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
34769
+ *
34770
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
34771
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
34772
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
34773
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
34774
+ * `holdOverflow` on the metrics line is what says you need it.
34756
34775
  */
34757
- ttlMs: number().int().min(250).max(1e4),
34776
+ holdFrames: number().int().min(1).max(64),
34758
34777
  /**
34759
34778
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
34760
34779
  *
34761
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
34762
- * which one is actually binding before reasoning from that. At the shipped
34763
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
34764
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
34765
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
34766
- * change that admits fewer frames buys retention WINDOW at constant RAM
34767
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
34780
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
34781
+ * is what decides how much is held, and the ceiling is the number above which
34782
+ * something is wrong. Before that it was the effective cap at 1024 MB with
34783
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
34784
+ * with the TTL expiring nothing, which is exactly the confusion the hold
34785
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
34768
34786
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
34769
34787
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
34770
34788
  * to replace).
@@ -34790,22 +34808,45 @@ object({
34790
34808
  * there is the signal that some caller names frames outside the inference set
34791
34809
  * and that this must go back to `all`.
34792
34810
  */
34793
- admission: NativeLeaseAdmissionSchema
34811
+ admission: NativeLeaseAdmissionSchema,
34812
+ /**
34813
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
34814
+ * compressed native crops the worker cuts at the moment a frame's detection
34815
+ * result arrives, and keeps long after the frame itself is freed.
34816
+ *
34817
+ * This is the knob that replaced the old retention window, and it buys about
34818
+ * three orders of magnitude more of it: a tile is one subject at native
34819
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
34820
+ * the frame it was cut from. A frame on which nothing was detected costs
34821
+ * nothing at all, which is the real change — the old lease paid per FRAME and
34822
+ * was interrogated per SUBJECT.
34823
+ *
34824
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
34825
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
34826
+ * reproduce that.
34827
+ */
34828
+ tileBudgetMb: number().int().min(0).max(1024)
34794
34829
  });
34795
34830
  /**
34796
- * The values in force when the operator has set nothing — byte-for-byte the
34797
- * constants the decode worker shipped with as env-var defaults, so making these
34798
- * settings changed no behaviour on the day it landed.
34831
+ * The values in force when the operator has set nothing.
34832
+ *
34833
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
34834
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
34835
+ * in the same change that redefines it would make a regression and a retune
34836
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
34837
+ * live traffic.
34799
34838
  */
34800
34839
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
34801
- ttlMs: 1200,
34840
+ holdFrames: 8,
34802
34841
  budgetMb: 1024,
34803
34842
  activityMs: 15e3,
34843
+ tileBudgetMb: 64,
34804
34844
  admission: "inferred"
34805
34845
  };
34806
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
34846
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
34807
34847
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
34808
34848
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34849
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
34809
34850
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
34810
34851
  //#endregion
34811
34852
  //#region src/config.ts
package/dist/addon.mjs CHANGED
@@ -26125,13 +26125,24 @@ method(object({
26125
26125
  /** Playback-speed multiplier for the render (1 = realtime). */
26126
26126
  var ExportSpeedSchema = number().min(.25).max(32);
26127
26127
  /**
26128
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
26128
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
26129
26129
  *
26130
- * Relative and not absolute epoch on purpose: the renderer's frame-select
26131
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
26132
- * playlist. Handing it absolute epochs would make every call site responsible
26133
- * for the same subtraction, and the one that forgot would emit a filter that
26134
- * selects nothing silently, as a uniform timelapse.
26130
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
26131
+ * derives these bounds from things that happened at a TIME (a track's
26132
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
26133
+ * every segment present for the range, with each recording GAP removed. The
26134
+ * two agree only on a window that recorded without one interruption, and only
26135
+ * the render side knows the segments, so the translation lives there
26136
+ * (`export-dense-map.ts`, addon-pipeline).
26137
+ *
26138
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
26139
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
26140
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
26141
+ * the video was a uniform timelapse, and the log line reported the five ranges
26142
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
26143
+ *
26144
+ * Relative and not absolute epoch, because an absolute epoch would make every
26145
+ * call site responsible for the same subtraction.
26135
26146
  */
26136
26147
  var ExportDenseRangeSchema = object({
26137
26148
  fromSec: number().nonnegative(),
@@ -34745,25 +34756,32 @@ object({
34745
34756
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
34746
34757
  object({
34747
34758
  /**
34748
- * How long a retained native frame is served before it counts as a miss.
34759
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
34760
+ * detection result.
34749
34761
  *
34750
- * Must cover the FULL late-crop horizon: detection inference + the
34751
- * cross-process inference-result hop to hub post-analysis + tracking + the
34752
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
34753
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
34754
- * RAM per busy camera grows linearly with no measured hit-rate gain.
34762
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
34763
+ * a time window was never related to the event the pixels were waiting for.
34764
+ * A held frame now lives from delivery until the runner has its `FrameResult`
34765
+ * at which moment the runner cuts the subject tiles it actually wanted and
34766
+ * releases the frame. The bound exists only so a runner that stops answering
34767
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
34768
+ *
34769
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
34770
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
34771
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
34772
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
34773
+ * `holdOverflow` on the metrics line is what says you need it.
34755
34774
  */
34756
- ttlMs: number().int().min(250).max(1e4),
34775
+ holdFrames: number().int().min(1).max(64),
34757
34776
  /**
34758
34777
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
34759
34778
  *
34760
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
34761
- * which one is actually binding before reasoning from that. At the shipped
34762
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
34763
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
34764
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
34765
- * change that admits fewer frames buys retention WINDOW at constant RAM
34766
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
34779
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
34780
+ * is what decides how much is held, and the ceiling is the number above which
34781
+ * something is wrong. Before that it was the effective cap at 1024 MB with
34782
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
34783
+ * with the TTL expiring nothing, which is exactly the confusion the hold
34784
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
34767
34785
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
34768
34786
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
34769
34787
  * to replace).
@@ -34789,22 +34807,45 @@ object({
34789
34807
  * there is the signal that some caller names frames outside the inference set
34790
34808
  * and that this must go back to `all`.
34791
34809
  */
34792
- admission: NativeLeaseAdmissionSchema
34810
+ admission: NativeLeaseAdmissionSchema,
34811
+ /**
34812
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
34813
+ * compressed native crops the worker cuts at the moment a frame's detection
34814
+ * result arrives, and keeps long after the frame itself is freed.
34815
+ *
34816
+ * This is the knob that replaced the old retention window, and it buys about
34817
+ * three orders of magnitude more of it: a tile is one subject at native
34818
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
34819
+ * the frame it was cut from. A frame on which nothing was detected costs
34820
+ * nothing at all, which is the real change — the old lease paid per FRAME and
34821
+ * was interrogated per SUBJECT.
34822
+ *
34823
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
34824
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
34825
+ * reproduce that.
34826
+ */
34827
+ tileBudgetMb: number().int().min(0).max(1024)
34793
34828
  });
34794
34829
  /**
34795
- * The values in force when the operator has set nothing — byte-for-byte the
34796
- * constants the decode worker shipped with as env-var defaults, so making these
34797
- * settings changed no behaviour on the day it landed.
34830
+ * The values in force when the operator has set nothing.
34831
+ *
34832
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
34833
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
34834
+ * in the same change that redefines it would make a regression and a retune
34835
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
34836
+ * live traffic.
34798
34837
  */
34799
34838
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
34800
- ttlMs: 1200,
34839
+ holdFrames: 8,
34801
34840
  budgetMb: 1024,
34802
34841
  activityMs: 15e3,
34842
+ tileBudgetMb: 64,
34803
34843
  admission: "inferred"
34804
34844
  };
34805
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
34845
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
34806
34846
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
34807
34847
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34848
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
34808
34849
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
34809
34850
  //#endregion
34810
34851
  //#region src/config.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rademacher",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Rademacher HomePilot device-provider addon for CamStack — wraps the @apocaliss92/noderademacher local-hub client (roller shutters over the cover cap)",
5
5
  "keywords": [
6
6
  "camstack",