@camstack/addon-tailscale 1.2.13 → 1.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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-DBqlCVJV.js");
27
+ const require_dist = require("../dist-BbpHpbVk.js");
28
28
  let node_child_process = require("node:child_process");
29
29
  let node_util = require("node:util");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-BSHt2t-G.mjs";
1
+ import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-UJ8lP0Bf.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as fs from "node:fs";
@@ -23644,13 +23644,24 @@ method(object({
23644
23644
  /** Playback-speed multiplier for the render (1 = realtime). */
23645
23645
  var ExportSpeedSchema = number().min(.25).max(32);
23646
23646
  /**
23647
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23647
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23648
23648
  *
23649
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23650
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23651
- * playlist. Handing it absolute epochs would make every call site responsible
23652
- * for the same subtraction, and the one that forgot would emit a filter that
23653
- * selects nothing — silently, as a uniform timelapse.
23649
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
23650
+ * derives these bounds from things that happened at a TIME (a track's
23651
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23652
+ * every segment present for the range, with each recording GAP removed. The
23653
+ * two agree only on a window that recorded without one interruption, and only
23654
+ * the render side knows the segments, so the translation lives there
23655
+ * (`export-dense-map.ts`, addon-pipeline).
23656
+ *
23657
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23658
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23659
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23660
+ * the video was a uniform timelapse, and the log line reported the five ranges
23661
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23662
+ *
23663
+ * Relative and not absolute epoch, because an absolute epoch would make every
23664
+ * call site responsible for the same subtraction.
23654
23665
  */
23655
23666
  var ExportDenseRangeSchema = object({
23656
23667
  fromSec: number().nonnegative(),
@@ -30780,25 +30791,32 @@ object({
30780
30791
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
30781
30792
  object({
30782
30793
  /**
30783
- * How long a retained native frame is served before it counts as a miss.
30794
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
30795
+ * detection result.
30784
30796
  *
30785
- * Must cover the FULL late-crop horizon: detection inference + the
30786
- * cross-process inference-result hop to hub post-analysis + tracking + the
30787
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
30788
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
30789
- * RAM per busy camera grows linearly with no measured hit-rate gain.
30797
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
30798
+ * a time window was never related to the event the pixels were waiting for.
30799
+ * A held frame now lives from delivery until the runner has its `FrameResult`
30800
+ * — at which moment the runner cuts the subject tiles it actually wanted and
30801
+ * releases the frame. The bound exists only so a runner that stops answering
30802
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
30803
+ *
30804
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
30805
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
30806
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
30807
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
30808
+ * `holdOverflow` on the metrics line is what says you need it.
30790
30809
  */
30791
- ttlMs: number().int().min(250).max(1e4),
30810
+ holdFrames: number().int().min(1).max(64),
30792
30811
  /**
30793
30812
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
30794
30813
  *
30795
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
30796
- * which one is actually binding before reasoning from that. At the shipped
30797
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
30798
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
30799
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
30800
- * change that admits fewer frames buys retention WINDOW at constant RAM
30801
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
30814
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
30815
+ * is what decides how much is held, and the ceiling is the number above which
30816
+ * something is wrong. Before that it was the effective cap — at 1024 MB with
30817
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
30818
+ * with the TTL expiring nothing, which is exactly the confusion the hold
30819
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
30802
30820
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
30803
30821
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
30804
30822
  * to replace).
@@ -30824,22 +30842,45 @@ object({
30824
30842
  * there is the signal that some caller names frames outside the inference set
30825
30843
  * and that this must go back to `all`.
30826
30844
  */
30827
- admission: NativeLeaseAdmissionSchema
30845
+ admission: NativeLeaseAdmissionSchema,
30846
+ /**
30847
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
30848
+ * compressed native crops the worker cuts at the moment a frame's detection
30849
+ * result arrives, and keeps long after the frame itself is freed.
30850
+ *
30851
+ * This is the knob that replaced the old retention window, and it buys about
30852
+ * three orders of magnitude more of it: a tile is one subject at native
30853
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
30854
+ * the frame it was cut from. A frame on which nothing was detected costs
30855
+ * nothing at all, which is the real change — the old lease paid per FRAME and
30856
+ * was interrogated per SUBJECT.
30857
+ *
30858
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
30859
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
30860
+ * reproduce that.
30861
+ */
30862
+ tileBudgetMb: number().int().min(0).max(1024)
30828
30863
  });
30829
30864
  /**
30830
- * The values in force when the operator has set nothing — byte-for-byte the
30831
- * constants the decode worker shipped with as env-var defaults, so making these
30832
- * settings changed no behaviour on the day it landed.
30865
+ * The values in force when the operator has set nothing.
30866
+ *
30867
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
30868
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
30869
+ * in the same change that redefines it would make a regression and a retune
30870
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
30871
+ * live traffic.
30833
30872
  */
30834
30873
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
30835
- ttlMs: 1200,
30874
+ holdFrames: 8,
30836
30875
  budgetMb: 1024,
30837
30876
  activityMs: 15e3,
30877
+ tileBudgetMb: 64,
30838
30878
  admission: "inferred"
30839
30879
  };
30840
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
30880
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
30841
30881
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
30842
30882
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
30883
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
30843
30884
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
30844
30885
  //#endregion
30845
30886
  Object.defineProperty(exports, "BaseAddon", {
@@ -23644,13 +23644,24 @@ method(object({
23644
23644
  /** Playback-speed multiplier for the render (1 = realtime). */
23645
23645
  var ExportSpeedSchema = number().min(.25).max(32);
23646
23646
  /**
23647
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23647
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23648
23648
  *
23649
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23650
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23651
- * playlist. Handing it absolute epochs would make every call site responsible
23652
- * for the same subtraction, and the one that forgot would emit a filter that
23653
- * selects nothing — silently, as a uniform timelapse.
23649
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
23650
+ * derives these bounds from things that happened at a TIME (a track's
23651
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23652
+ * every segment present for the range, with each recording GAP removed. The
23653
+ * two agree only on a window that recorded without one interruption, and only
23654
+ * the render side knows the segments, so the translation lives there
23655
+ * (`export-dense-map.ts`, addon-pipeline).
23656
+ *
23657
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23658
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23659
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23660
+ * the video was a uniform timelapse, and the log line reported the five ranges
23661
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23662
+ *
23663
+ * Relative and not absolute epoch, because an absolute epoch would make every
23664
+ * call site responsible for the same subtraction.
23654
23665
  */
23655
23666
  var ExportDenseRangeSchema = object({
23656
23667
  fromSec: number().nonnegative(),
@@ -30780,25 +30791,32 @@ object({
30780
30791
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
30781
30792
  object({
30782
30793
  /**
30783
- * How long a retained native frame is served before it counts as a miss.
30794
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
30795
+ * detection result.
30784
30796
  *
30785
- * Must cover the FULL late-crop horizon: detection inference + the
30786
- * cross-process inference-result hop to hub post-analysis + tracking + the
30787
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
30788
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
30789
- * RAM per busy camera grows linearly with no measured hit-rate gain.
30797
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
30798
+ * a time window was never related to the event the pixels were waiting for.
30799
+ * A held frame now lives from delivery until the runner has its `FrameResult`
30800
+ * — at which moment the runner cuts the subject tiles it actually wanted and
30801
+ * releases the frame. The bound exists only so a runner that stops answering
30802
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
30803
+ *
30804
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
30805
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
30806
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
30807
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
30808
+ * `holdOverflow` on the metrics line is what says you need it.
30790
30809
  */
30791
- ttlMs: number().int().min(250).max(1e4),
30810
+ holdFrames: number().int().min(1).max(64),
30792
30811
  /**
30793
30812
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
30794
30813
  *
30795
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
30796
- * which one is actually binding before reasoning from that. At the shipped
30797
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
30798
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
30799
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
30800
- * change that admits fewer frames buys retention WINDOW at constant RAM
30801
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
30814
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
30815
+ * is what decides how much is held, and the ceiling is the number above which
30816
+ * something is wrong. Before that it was the effective cap — at 1024 MB with
30817
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
30818
+ * with the TTL expiring nothing, which is exactly the confusion the hold
30819
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
30802
30820
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
30803
30821
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
30804
30822
  * to replace).
@@ -30824,22 +30842,45 @@ object({
30824
30842
  * there is the signal that some caller names frames outside the inference set
30825
30843
  * and that this must go back to `all`.
30826
30844
  */
30827
- admission: NativeLeaseAdmissionSchema
30845
+ admission: NativeLeaseAdmissionSchema,
30846
+ /**
30847
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
30848
+ * compressed native crops the worker cuts at the moment a frame's detection
30849
+ * result arrives, and keeps long after the frame itself is freed.
30850
+ *
30851
+ * This is the knob that replaced the old retention window, and it buys about
30852
+ * three orders of magnitude more of it: a tile is one subject at native
30853
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
30854
+ * the frame it was cut from. A frame on which nothing was detected costs
30855
+ * nothing at all, which is the real change — the old lease paid per FRAME and
30856
+ * was interrogated per SUBJECT.
30857
+ *
30858
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
30859
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
30860
+ * reproduce that.
30861
+ */
30862
+ tileBudgetMb: number().int().min(0).max(1024)
30828
30863
  });
30829
30864
  /**
30830
- * The values in force when the operator has set nothing — byte-for-byte the
30831
- * constants the decode worker shipped with as env-var defaults, so making these
30832
- * settings changed no behaviour on the day it landed.
30865
+ * The values in force when the operator has set nothing.
30866
+ *
30867
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
30868
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
30869
+ * in the same change that redefines it would make a regression and a retune
30870
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
30871
+ * live traffic.
30833
30872
  */
30834
30873
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
30835
- ttlMs: 1200,
30874
+ holdFrames: 8,
30836
30875
  budgetMb: 1024,
30837
30876
  activityMs: 15e3,
30877
+ tileBudgetMb: 64,
30838
30878
  admission: "inferred"
30839
30879
  };
30840
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
30880
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
30841
30881
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
30842
30882
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
30883
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
30843
30884
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
30844
30885
  //#endregion
30845
30886
  export { EventCategory as i, networkAccessCapability as n, BaseAddon as r, meshNetworkCapability as t };
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-DBqlCVJV.js");
5
+ const require_dist = require("../dist-BbpHpbVk.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_child_process = require("node:child_process");
8
8
  //#region src/ingress/tailscale-cli.ts
@@ -1,4 +1,4 @@
1
- import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-BSHt2t-G.mjs";
1
+ import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-UJ8lP0Bf.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-tailscale",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",