@camstack/addon-agent-ui 1.2.14 → 1.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.
Files changed (2) hide show
  1. package/dist/addon.js +68 -27
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -23577,13 +23577,24 @@ method(object({
23577
23577
  /** Playback-speed multiplier for the render (1 = realtime). */
23578
23578
  var ExportSpeedSchema = number().min(.25).max(32);
23579
23579
  /**
23580
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23580
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23581
23581
  *
23582
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23583
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23584
- * playlist. Handing it absolute epochs would make every call site responsible
23585
- * for the same subtraction, and the one that forgot would emit a filter that
23586
- * selects nothing silently, as a uniform timelapse.
23582
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
23583
+ * derives these bounds from things that happened at a TIME (a track's
23584
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23585
+ * every segment present for the range, with each recording GAP removed. The
23586
+ * two agree only on a window that recorded without one interruption, and only
23587
+ * the render side knows the segments, so the translation lives there
23588
+ * (`export-dense-map.ts`, addon-pipeline).
23589
+ *
23590
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23591
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23592
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23593
+ * the video was a uniform timelapse, and the log line reported the five ranges
23594
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23595
+ *
23596
+ * Relative and not absolute epoch, because an absolute epoch would make every
23597
+ * call site responsible for the same subtraction.
23587
23598
  */
23588
23599
  var ExportDenseRangeSchema = object({
23589
23600
  fromSec: number().nonnegative(),
@@ -30713,25 +30724,32 @@ object({
30713
30724
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
30714
30725
  object({
30715
30726
  /**
30716
- * How long a retained native frame is served before it counts as a miss.
30727
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
30728
+ * detection result.
30717
30729
  *
30718
- * Must cover the FULL late-crop horizon: detection inference + the
30719
- * cross-process inference-result hop to hub post-analysis + tracking + the
30720
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
30721
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
30722
- * RAM per busy camera grows linearly with no measured hit-rate gain.
30730
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
30731
+ * a time window was never related to the event the pixels were waiting for.
30732
+ * A held frame now lives from delivery until the runner has its `FrameResult`
30733
+ * at which moment the runner cuts the subject tiles it actually wanted and
30734
+ * releases the frame. The bound exists only so a runner that stops answering
30735
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
30736
+ *
30737
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
30738
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
30739
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
30740
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
30741
+ * `holdOverflow` on the metrics line is what says you need it.
30723
30742
  */
30724
- ttlMs: number().int().min(250).max(1e4),
30743
+ holdFrames: number().int().min(1).max(64),
30725
30744
  /**
30726
30745
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
30727
30746
  *
30728
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
30729
- * which one is actually binding before reasoning from that. At the shipped
30730
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
30731
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
30732
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
30733
- * change that admits fewer frames buys retention WINDOW at constant RAM
30734
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
30747
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
30748
+ * is what decides how much is held, and the ceiling is the number above which
30749
+ * something is wrong. Before that it was the effective cap at 1024 MB with
30750
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
30751
+ * with the TTL expiring nothing, which is exactly the confusion the hold
30752
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
30735
30753
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
30736
30754
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
30737
30755
  * to replace).
@@ -30757,22 +30775,45 @@ object({
30757
30775
  * there is the signal that some caller names frames outside the inference set
30758
30776
  * and that this must go back to `all`.
30759
30777
  */
30760
- admission: NativeLeaseAdmissionSchema
30778
+ admission: NativeLeaseAdmissionSchema,
30779
+ /**
30780
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
30781
+ * compressed native crops the worker cuts at the moment a frame's detection
30782
+ * result arrives, and keeps long after the frame itself is freed.
30783
+ *
30784
+ * This is the knob that replaced the old retention window, and it buys about
30785
+ * three orders of magnitude more of it: a tile is one subject at native
30786
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
30787
+ * the frame it was cut from. A frame on which nothing was detected costs
30788
+ * nothing at all, which is the real change — the old lease paid per FRAME and
30789
+ * was interrogated per SUBJECT.
30790
+ *
30791
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
30792
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
30793
+ * reproduce that.
30794
+ */
30795
+ tileBudgetMb: number().int().min(0).max(1024)
30761
30796
  });
30762
30797
  /**
30763
- * The values in force when the operator has set nothing — byte-for-byte the
30764
- * constants the decode worker shipped with as env-var defaults, so making these
30765
- * settings changed no behaviour on the day it landed.
30798
+ * The values in force when the operator has set nothing.
30799
+ *
30800
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
30801
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
30802
+ * in the same change that redefines it would make a regression and a retune
30803
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
30804
+ * live traffic.
30766
30805
  */
30767
30806
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
30768
- ttlMs: 1200,
30807
+ holdFrames: 8,
30769
30808
  budgetMb: 1024,
30770
30809
  activityMs: 15e3,
30810
+ tileBudgetMb: 64,
30771
30811
  admission: "inferred"
30772
30812
  };
30773
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
30813
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
30774
30814
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
30775
30815
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
30816
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
30776
30817
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
30777
30818
  //#endregion
30778
30819
  //#region src/addon.ts
@@ -30795,7 +30836,7 @@ var AgentUIAddon = class extends BaseAddon {
30795
30836
  capability: adminUiCapability,
30796
30837
  provider: {
30797
30838
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
30798
- getVersion: async () => ({ version: "1.2.14" })
30839
+ getVersion: async () => ({ version: "1.2.15" })
30799
30840
  }
30800
30841
  }];
30801
30842
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",