@camstack/addon-provider-dreame 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
@@ -75688,13 +75688,24 @@ method(object({
75688
75688
  /** Playback-speed multiplier for the render (1 = realtime). */
75689
75689
  var ExportSpeedSchema = number().min(.25).max(32);
75690
75690
  /**
75691
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
75691
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
75692
75692
  *
75693
- * Relative and not absolute epoch on purpose: the renderer's frame-select
75694
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
75695
- * playlist. Handing it absolute epochs would make every call site responsible
75696
- * for the same subtraction, and the one that forgot would emit a filter that
75697
- * selects nothing silently, as a uniform timelapse.
75693
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
75694
+ * derives these bounds from things that happened at a TIME (a track's
75695
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
75696
+ * every segment present for the range, with each recording GAP removed. The
75697
+ * two agree only on a window that recorded without one interruption, and only
75698
+ * the render side knows the segments, so the translation lives there
75699
+ * (`export-dense-map.ts`, addon-pipeline).
75700
+ *
75701
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
75702
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
75703
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
75704
+ * the video was a uniform timelapse, and the log line reported the five ranges
75705
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
75706
+ *
75707
+ * Relative and not absolute epoch, because an absolute epoch would make every
75708
+ * call site responsible for the same subtraction.
75698
75709
  */
75699
75710
  var ExportDenseRangeSchema = object({
75700
75711
  fromSec: number().nonnegative(),
@@ -84308,25 +84319,32 @@ object({
84308
84319
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
84309
84320
  object({
84310
84321
  /**
84311
- * How long a retained native frame is served before it counts as a miss.
84322
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
84323
+ * detection result.
84312
84324
  *
84313
- * Must cover the FULL late-crop horizon: detection inference + the
84314
- * cross-process inference-result hop to hub post-analysis + tracking + the
84315
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
84316
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
84317
- * RAM per busy camera grows linearly with no measured hit-rate gain.
84325
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
84326
+ * a time window was never related to the event the pixels were waiting for.
84327
+ * A held frame now lives from delivery until the runner has its `FrameResult`
84328
+ * at which moment the runner cuts the subject tiles it actually wanted and
84329
+ * releases the frame. The bound exists only so a runner that stops answering
84330
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
84331
+ *
84332
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
84333
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
84334
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
84335
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
84336
+ * `holdOverflow` on the metrics line is what says you need it.
84318
84337
  */
84319
- ttlMs: number().int().min(250).max(1e4),
84338
+ holdFrames: number().int().min(1).max(64),
84320
84339
  /**
84321
84340
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
84322
84341
  *
84323
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
84324
- * which one is actually binding before reasoning from that. At the shipped
84325
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
84326
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
84327
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
84328
- * change that admits fewer frames buys retention WINDOW at constant RAM
84329
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
84342
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
84343
+ * is what decides how much is held, and the ceiling is the number above which
84344
+ * something is wrong. Before that it was the effective cap at 1024 MB with
84345
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
84346
+ * with the TTL expiring nothing, which is exactly the confusion the hold
84347
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
84330
84348
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
84331
84349
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
84332
84350
  * to replace).
@@ -84352,22 +84370,45 @@ object({
84352
84370
  * there is the signal that some caller names frames outside the inference set
84353
84371
  * and that this must go back to `all`.
84354
84372
  */
84355
- admission: NativeLeaseAdmissionSchema
84373
+ admission: NativeLeaseAdmissionSchema,
84374
+ /**
84375
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
84376
+ * compressed native crops the worker cuts at the moment a frame's detection
84377
+ * result arrives, and keeps long after the frame itself is freed.
84378
+ *
84379
+ * This is the knob that replaced the old retention window, and it buys about
84380
+ * three orders of magnitude more of it: a tile is one subject at native
84381
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
84382
+ * the frame it was cut from. A frame on which nothing was detected costs
84383
+ * nothing at all, which is the real change — the old lease paid per FRAME and
84384
+ * was interrogated per SUBJECT.
84385
+ *
84386
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
84387
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
84388
+ * reproduce that.
84389
+ */
84390
+ tileBudgetMb: number().int().min(0).max(1024)
84356
84391
  });
84357
84392
  /**
84358
- * The values in force when the operator has set nothing — byte-for-byte the
84359
- * constants the decode worker shipped with as env-var defaults, so making these
84360
- * settings changed no behaviour on the day it landed.
84393
+ * The values in force when the operator has set nothing.
84394
+ *
84395
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
84396
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
84397
+ * in the same change that redefines it would make a regression and a retune
84398
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
84399
+ * live traffic.
84361
84400
  */
84362
84401
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
84363
- ttlMs: 1200,
84402
+ holdFrames: 8,
84364
84403
  budgetMb: 1024,
84365
84404
  activityMs: 15e3,
84405
+ tileBudgetMb: 64,
84366
84406
  admission: "inferred"
84367
84407
  };
84368
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
84408
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
84369
84409
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
84370
84410
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
84411
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
84371
84412
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
84372
84413
  //#endregion
84373
84414
  //#region src/config.ts
package/dist/addon.mjs CHANGED
@@ -75688,13 +75688,24 @@ method(object({
75688
75688
  /** Playback-speed multiplier for the render (1 = realtime). */
75689
75689
  var ExportSpeedSchema = number().min(.25).max(32);
75690
75690
  /**
75691
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
75691
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
75692
75692
  *
75693
- * Relative and not absolute epoch on purpose: the renderer's frame-select
75694
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
75695
- * playlist. Handing it absolute epochs would make every call site responsible
75696
- * for the same subtraction, and the one that forgot would emit a filter that
75697
- * selects nothing silently, as a uniform timelapse.
75693
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
75694
+ * derives these bounds from things that happened at a TIME (a track's
75695
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
75696
+ * every segment present for the range, with each recording GAP removed. The
75697
+ * two agree only on a window that recorded without one interruption, and only
75698
+ * the render side knows the segments, so the translation lives there
75699
+ * (`export-dense-map.ts`, addon-pipeline).
75700
+ *
75701
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
75702
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
75703
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
75704
+ * the video was a uniform timelapse, and the log line reported the five ranges
75705
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
75706
+ *
75707
+ * Relative and not absolute epoch, because an absolute epoch would make every
75708
+ * call site responsible for the same subtraction.
75698
75709
  */
75699
75710
  var ExportDenseRangeSchema = object({
75700
75711
  fromSec: number().nonnegative(),
@@ -84308,25 +84319,32 @@ object({
84308
84319
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
84309
84320
  object({
84310
84321
  /**
84311
- * How long a retained native frame is served before it counts as a miss.
84322
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
84323
+ * detection result.
84312
84324
  *
84313
- * Must cover the FULL late-crop horizon: detection inference + the
84314
- * cross-process inference-result hop to hub post-analysis + tracking + the
84315
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
84316
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
84317
- * RAM per busy camera grows linearly with no measured hit-rate gain.
84325
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
84326
+ * a time window was never related to the event the pixels were waiting for.
84327
+ * A held frame now lives from delivery until the runner has its `FrameResult`
84328
+ * at which moment the runner cuts the subject tiles it actually wanted and
84329
+ * releases the frame. The bound exists only so a runner that stops answering
84330
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
84331
+ *
84332
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
84333
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
84334
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
84335
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
84336
+ * `holdOverflow` on the metrics line is what says you need it.
84318
84337
  */
84319
- ttlMs: number().int().min(250).max(1e4),
84338
+ holdFrames: number().int().min(1).max(64),
84320
84339
  /**
84321
84340
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
84322
84341
  *
84323
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
84324
- * which one is actually binding before reasoning from that. At the shipped
84325
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
84326
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
84327
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
84328
- * change that admits fewer frames buys retention WINDOW at constant RAM
84329
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
84342
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
84343
+ * is what decides how much is held, and the ceiling is the number above which
84344
+ * something is wrong. Before that it was the effective cap at 1024 MB with
84345
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
84346
+ * with the TTL expiring nothing, which is exactly the confusion the hold
84347
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
84330
84348
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
84331
84349
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
84332
84350
  * to replace).
@@ -84352,22 +84370,45 @@ object({
84352
84370
  * there is the signal that some caller names frames outside the inference set
84353
84371
  * and that this must go back to `all`.
84354
84372
  */
84355
- admission: NativeLeaseAdmissionSchema
84373
+ admission: NativeLeaseAdmissionSchema,
84374
+ /**
84375
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
84376
+ * compressed native crops the worker cuts at the moment a frame's detection
84377
+ * result arrives, and keeps long after the frame itself is freed.
84378
+ *
84379
+ * This is the knob that replaced the old retention window, and it buys about
84380
+ * three orders of magnitude more of it: a tile is one subject at native
84381
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
84382
+ * the frame it was cut from. A frame on which nothing was detected costs
84383
+ * nothing at all, which is the real change — the old lease paid per FRAME and
84384
+ * was interrogated per SUBJECT.
84385
+ *
84386
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
84387
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
84388
+ * reproduce that.
84389
+ */
84390
+ tileBudgetMb: number().int().min(0).max(1024)
84356
84391
  });
84357
84392
  /**
84358
- * The values in force when the operator has set nothing — byte-for-byte the
84359
- * constants the decode worker shipped with as env-var defaults, so making these
84360
- * settings changed no behaviour on the day it landed.
84393
+ * The values in force when the operator has set nothing.
84394
+ *
84395
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
84396
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
84397
+ * in the same change that redefines it would make a regression and a retune
84398
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
84399
+ * live traffic.
84361
84400
  */
84362
84401
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
84363
- ttlMs: 1200,
84402
+ holdFrames: 8,
84364
84403
  budgetMb: 1024,
84365
84404
  activityMs: 15e3,
84405
+ tileBudgetMb: 64,
84366
84406
  admission: "inferred"
84367
84407
  };
84368
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
84408
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
84369
84409
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
84370
84410
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
84411
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
84371
84412
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
84372
84413
  //#endregion
84373
84414
  //#region src/config.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",