@camstack/addon-provider-unraid 0.2.14 → 0.2.15

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
@@ -25158,13 +25158,24 @@ method(object({
25158
25158
  /** Playback-speed multiplier for the render (1 = realtime). */
25159
25159
  var ExportSpeedSchema = number().min(.25).max(32);
25160
25160
  /**
25161
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
25161
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
25162
25162
  *
25163
- * Relative and not absolute epoch on purpose: the renderer's frame-select
25164
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
25165
- * playlist. Handing it absolute epochs would make every call site responsible
25166
- * for the same subtraction, and the one that forgot would emit a filter that
25167
- * selects nothing silently, as a uniform timelapse.
25163
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
25164
+ * derives these bounds from things that happened at a TIME (a track's
25165
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
25166
+ * every segment present for the range, with each recording GAP removed. The
25167
+ * two agree only on a window that recorded without one interruption, and only
25168
+ * the render side knows the segments, so the translation lives there
25169
+ * (`export-dense-map.ts`, addon-pipeline).
25170
+ *
25171
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
25172
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
25173
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
25174
+ * the video was a uniform timelapse, and the log line reported the five ranges
25175
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
25176
+ *
25177
+ * Relative and not absolute epoch, because an absolute epoch would make every
25178
+ * call site responsible for the same subtraction.
25168
25179
  */
25169
25180
  var ExportDenseRangeSchema = object({
25170
25181
  fromSec: number().nonnegative(),
@@ -33778,25 +33789,32 @@ object({
33778
33789
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
33779
33790
  object({
33780
33791
  /**
33781
- * How long a retained native frame is served before it counts as a miss.
33792
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
33793
+ * detection result.
33782
33794
  *
33783
- * Must cover the FULL late-crop horizon: detection inference + the
33784
- * cross-process inference-result hop to hub post-analysis + tracking + the
33785
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
33786
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
33787
- * RAM per busy camera grows linearly with no measured hit-rate gain.
33795
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
33796
+ * a time window was never related to the event the pixels were waiting for.
33797
+ * A held frame now lives from delivery until the runner has its `FrameResult`
33798
+ * at which moment the runner cuts the subject tiles it actually wanted and
33799
+ * releases the frame. The bound exists only so a runner that stops answering
33800
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
33801
+ *
33802
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
33803
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
33804
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
33805
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
33806
+ * `holdOverflow` on the metrics line is what says you need it.
33788
33807
  */
33789
- ttlMs: number().int().min(250).max(1e4),
33808
+ holdFrames: number().int().min(1).max(64),
33790
33809
  /**
33791
33810
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
33792
33811
  *
33793
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
33794
- * which one is actually binding before reasoning from that. At the shipped
33795
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
33796
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
33797
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
33798
- * change that admits fewer frames buys retention WINDOW at constant RAM
33799
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
33812
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
33813
+ * is what decides how much is held, and the ceiling is the number above which
33814
+ * something is wrong. Before that it was the effective cap at 1024 MB with
33815
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
33816
+ * with the TTL expiring nothing, which is exactly the confusion the hold
33817
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
33800
33818
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
33801
33819
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
33802
33820
  * to replace).
@@ -33822,22 +33840,45 @@ object({
33822
33840
  * there is the signal that some caller names frames outside the inference set
33823
33841
  * and that this must go back to `all`.
33824
33842
  */
33825
- admission: NativeLeaseAdmissionSchema
33843
+ admission: NativeLeaseAdmissionSchema,
33844
+ /**
33845
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
33846
+ * compressed native crops the worker cuts at the moment a frame's detection
33847
+ * result arrives, and keeps long after the frame itself is freed.
33848
+ *
33849
+ * This is the knob that replaced the old retention window, and it buys about
33850
+ * three orders of magnitude more of it: a tile is one subject at native
33851
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
33852
+ * the frame it was cut from. A frame on which nothing was detected costs
33853
+ * nothing at all, which is the real change — the old lease paid per FRAME and
33854
+ * was interrogated per SUBJECT.
33855
+ *
33856
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
33857
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
33858
+ * reproduce that.
33859
+ */
33860
+ tileBudgetMb: number().int().min(0).max(1024)
33826
33861
  });
33827
33862
  /**
33828
- * The values in force when the operator has set nothing — byte-for-byte the
33829
- * constants the decode worker shipped with as env-var defaults, so making these
33830
- * settings changed no behaviour on the day it landed.
33863
+ * The values in force when the operator has set nothing.
33864
+ *
33865
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
33866
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
33867
+ * in the same change that redefines it would make a regression and a retune
33868
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
33869
+ * live traffic.
33831
33870
  */
33832
33871
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
33833
- ttlMs: 1200,
33872
+ holdFrames: 8,
33834
33873
  budgetMb: 1024,
33835
33874
  activityMs: 15e3,
33875
+ tileBudgetMb: 64,
33836
33876
  admission: "inferred"
33837
33877
  };
33838
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
33878
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
33839
33879
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
33840
33880
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
33881
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
33841
33882
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
33842
33883
  //#endregion
33843
33884
  //#region src/config.ts
package/dist/addon.mjs CHANGED
@@ -25157,13 +25157,24 @@ method(object({
25157
25157
  /** Playback-speed multiplier for the render (1 = realtime). */
25158
25158
  var ExportSpeedSchema = number().min(.25).max(32);
25159
25159
  /**
25160
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
25160
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
25161
25161
  *
25162
- * Relative and not absolute epoch on purpose: the renderer's frame-select
25163
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
25164
- * playlist. Handing it absolute epochs would make every call site responsible
25165
- * for the same subtraction, and the one that forgot would emit a filter that
25166
- * selects nothing silently, as a uniform timelapse.
25162
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
25163
+ * derives these bounds from things that happened at a TIME (a track's
25164
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
25165
+ * every segment present for the range, with each recording GAP removed. The
25166
+ * two agree only on a window that recorded without one interruption, and only
25167
+ * the render side knows the segments, so the translation lives there
25168
+ * (`export-dense-map.ts`, addon-pipeline).
25169
+ *
25170
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
25171
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
25172
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
25173
+ * the video was a uniform timelapse, and the log line reported the five ranges
25174
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
25175
+ *
25176
+ * Relative and not absolute epoch, because an absolute epoch would make every
25177
+ * call site responsible for the same subtraction.
25167
25178
  */
25168
25179
  var ExportDenseRangeSchema = object({
25169
25180
  fromSec: number().nonnegative(),
@@ -33777,25 +33788,32 @@ object({
33777
33788
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
33778
33789
  object({
33779
33790
  /**
33780
- * How long a retained native frame is served before it counts as a miss.
33791
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
33792
+ * detection result.
33781
33793
  *
33782
- * Must cover the FULL late-crop horizon: detection inference + the
33783
- * cross-process inference-result hop to hub post-analysis + tracking + the
33784
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
33785
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
33786
- * RAM per busy camera grows linearly with no measured hit-rate gain.
33794
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
33795
+ * a time window was never related to the event the pixels were waiting for.
33796
+ * A held frame now lives from delivery until the runner has its `FrameResult`
33797
+ * at which moment the runner cuts the subject tiles it actually wanted and
33798
+ * releases the frame. The bound exists only so a runner that stops answering
33799
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
33800
+ *
33801
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
33802
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
33803
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
33804
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
33805
+ * `holdOverflow` on the metrics line is what says you need it.
33787
33806
  */
33788
- ttlMs: number().int().min(250).max(1e4),
33807
+ holdFrames: number().int().min(1).max(64),
33789
33808
  /**
33790
33809
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
33791
33810
  *
33792
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
33793
- * which one is actually binding before reasoning from that. At the shipped
33794
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
33795
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
33796
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
33797
- * change that admits fewer frames buys retention WINDOW at constant RAM
33798
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
33811
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
33812
+ * is what decides how much is held, and the ceiling is the number above which
33813
+ * something is wrong. Before that it was the effective cap at 1024 MB with
33814
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
33815
+ * with the TTL expiring nothing, which is exactly the confusion the hold
33816
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
33799
33817
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
33800
33818
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
33801
33819
  * to replace).
@@ -33821,22 +33839,45 @@ object({
33821
33839
  * there is the signal that some caller names frames outside the inference set
33822
33840
  * and that this must go back to `all`.
33823
33841
  */
33824
- admission: NativeLeaseAdmissionSchema
33842
+ admission: NativeLeaseAdmissionSchema,
33843
+ /**
33844
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
33845
+ * compressed native crops the worker cuts at the moment a frame's detection
33846
+ * result arrives, and keeps long after the frame itself is freed.
33847
+ *
33848
+ * This is the knob that replaced the old retention window, and it buys about
33849
+ * three orders of magnitude more of it: a tile is one subject at native
33850
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
33851
+ * the frame it was cut from. A frame on which nothing was detected costs
33852
+ * nothing at all, which is the real change — the old lease paid per FRAME and
33853
+ * was interrogated per SUBJECT.
33854
+ *
33855
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
33856
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
33857
+ * reproduce that.
33858
+ */
33859
+ tileBudgetMb: number().int().min(0).max(1024)
33825
33860
  });
33826
33861
  /**
33827
- * The values in force when the operator has set nothing — byte-for-byte the
33828
- * constants the decode worker shipped with as env-var defaults, so making these
33829
- * settings changed no behaviour on the day it landed.
33862
+ * The values in force when the operator has set nothing.
33863
+ *
33864
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
33865
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
33866
+ * in the same change that redefines it would make a regression and a retune
33867
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
33868
+ * live traffic.
33830
33869
  */
33831
33870
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
33832
- ttlMs: 1200,
33871
+ holdFrames: 8,
33833
33872
  budgetMb: 1024,
33834
33873
  activityMs: 15e3,
33874
+ tileBudgetMb: 64,
33835
33875
  admission: "inferred"
33836
33876
  };
33837
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
33877
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
33838
33878
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
33839
33879
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
33880
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
33840
33881
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
33841
33882
  //#endregion
33842
33883
  //#region src/config.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unraid",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "Unraid device-provider addon for CamStack — one Container per Unraid instance fanning out array, disk, docker and notification entities",
5
5
  "keywords": [
6
6
  "camstack",