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