@camstack/addon-notifiers 1.2.18 → 1.2.19

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
@@ -23771,13 +23771,24 @@ method(object({
23771
23771
  /** Playback-speed multiplier for the render (1 = realtime). */
23772
23772
  var ExportSpeedSchema = number().min(.25).max(32);
23773
23773
  /**
23774
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23774
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23775
23775
  *
23776
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23777
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23778
- * playlist. Handing it absolute epochs would make every call site responsible
23779
- * for the same subtraction, and the one that forgot would emit a filter that
23780
- * selects nothing silently, as a uniform timelapse.
23776
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
23777
+ * derives these bounds from things that happened at a TIME (a track's
23778
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23779
+ * every segment present for the range, with each recording GAP removed. The
23780
+ * two agree only on a window that recorded without one interruption, and only
23781
+ * the render side knows the segments, so the translation lives there
23782
+ * (`export-dense-map.ts`, addon-pipeline).
23783
+ *
23784
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23785
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23786
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23787
+ * the video was a uniform timelapse, and the log line reported the five ranges
23788
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23789
+ *
23790
+ * Relative and not absolute epoch, because an absolute epoch would make every
23791
+ * call site responsible for the same subtraction.
23781
23792
  */
23782
23793
  var ExportDenseRangeSchema = object({
23783
23794
  fromSec: number().nonnegative(),
@@ -31114,25 +31125,32 @@ object({
31114
31125
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
31115
31126
  object({
31116
31127
  /**
31117
- * How long a retained native frame is served before it counts as a miss.
31128
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
31129
+ * detection result.
31118
31130
  *
31119
- * Must cover the FULL late-crop horizon: detection inference + the
31120
- * cross-process inference-result hop to hub post-analysis + tracking + the
31121
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
31122
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
31123
- * RAM per busy camera grows linearly with no measured hit-rate gain.
31131
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
31132
+ * a time window was never related to the event the pixels were waiting for.
31133
+ * A held frame now lives from delivery until the runner has its `FrameResult`
31134
+ * at which moment the runner cuts the subject tiles it actually wanted and
31135
+ * releases the frame. The bound exists only so a runner that stops answering
31136
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
31137
+ *
31138
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
31139
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
31140
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
31141
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
31142
+ * `holdOverflow` on the metrics line is what says you need it.
31124
31143
  */
31125
- ttlMs: number().int().min(250).max(1e4),
31144
+ holdFrames: number().int().min(1).max(64),
31126
31145
  /**
31127
31146
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
31128
31147
  *
31129
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
31130
- * which one is actually binding before reasoning from that. At the shipped
31131
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
31132
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
31133
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
31134
- * change that admits fewer frames buys retention WINDOW at constant RAM
31135
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
31148
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
31149
+ * is what decides how much is held, and the ceiling is the number above which
31150
+ * something is wrong. Before that it was the effective cap at 1024 MB with
31151
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
31152
+ * with the TTL expiring nothing, which is exactly the confusion the hold
31153
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
31136
31154
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
31137
31155
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
31138
31156
  * to replace).
@@ -31158,22 +31176,45 @@ object({
31158
31176
  * there is the signal that some caller names frames outside the inference set
31159
31177
  * and that this must go back to `all`.
31160
31178
  */
31161
- admission: NativeLeaseAdmissionSchema
31179
+ admission: NativeLeaseAdmissionSchema,
31180
+ /**
31181
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
31182
+ * compressed native crops the worker cuts at the moment a frame's detection
31183
+ * result arrives, and keeps long after the frame itself is freed.
31184
+ *
31185
+ * This is the knob that replaced the old retention window, and it buys about
31186
+ * three orders of magnitude more of it: a tile is one subject at native
31187
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
31188
+ * the frame it was cut from. A frame on which nothing was detected costs
31189
+ * nothing at all, which is the real change — the old lease paid per FRAME and
31190
+ * was interrogated per SUBJECT.
31191
+ *
31192
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
31193
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
31194
+ * reproduce that.
31195
+ */
31196
+ tileBudgetMb: number().int().min(0).max(1024)
31162
31197
  });
31163
31198
  /**
31164
- * The values in force when the operator has set nothing — byte-for-byte the
31165
- * constants the decode worker shipped with as env-var defaults, so making these
31166
- * settings changed no behaviour on the day it landed.
31199
+ * The values in force when the operator has set nothing.
31200
+ *
31201
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
31202
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
31203
+ * in the same change that redefines it would make a regression and a retune
31204
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
31205
+ * live traffic.
31167
31206
  */
31168
31207
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
31169
- ttlMs: 1200,
31208
+ holdFrames: 8,
31170
31209
  budgetMb: 1024,
31171
31210
  activityMs: 15e3,
31211
+ tileBudgetMb: 64,
31172
31212
  admission: "inferred"
31173
31213
  };
31174
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
31214
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
31175
31215
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
31176
31216
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
31217
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
31177
31218
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
31178
31219
  var NOTIFIER_ICONS = {
31179
31220
  telegram: {
package/dist/addon.mjs CHANGED
@@ -23744,13 +23744,24 @@ method(object({
23744
23744
  /** Playback-speed multiplier for the render (1 = realtime). */
23745
23745
  var ExportSpeedSchema = number().min(.25).max(32);
23746
23746
  /**
23747
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23747
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23748
23748
  *
23749
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23750
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23751
- * playlist. Handing it absolute epochs would make every call site responsible
23752
- * for the same subtraction, and the one that forgot would emit a filter that
23753
- * selects nothing silently, as a uniform timelapse.
23749
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
23750
+ * derives these bounds from things that happened at a TIME (a track's
23751
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23752
+ * every segment present for the range, with each recording GAP removed. The
23753
+ * two agree only on a window that recorded without one interruption, and only
23754
+ * the render side knows the segments, so the translation lives there
23755
+ * (`export-dense-map.ts`, addon-pipeline).
23756
+ *
23757
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23758
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23759
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23760
+ * the video was a uniform timelapse, and the log line reported the five ranges
23761
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23762
+ *
23763
+ * Relative and not absolute epoch, because an absolute epoch would make every
23764
+ * call site responsible for the same subtraction.
23754
23765
  */
23755
23766
  var ExportDenseRangeSchema = object({
23756
23767
  fromSec: number().nonnegative(),
@@ -31087,25 +31098,32 @@ object({
31087
31098
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
31088
31099
  object({
31089
31100
  /**
31090
- * How long a retained native frame is served before it counts as a miss.
31101
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
31102
+ * detection result.
31091
31103
  *
31092
- * Must cover the FULL late-crop horizon: detection inference + the
31093
- * cross-process inference-result hop to hub post-analysis + tracking + the
31094
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
31095
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
31096
- * RAM per busy camera grows linearly with no measured hit-rate gain.
31104
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
31105
+ * a time window was never related to the event the pixels were waiting for.
31106
+ * A held frame now lives from delivery until the runner has its `FrameResult`
31107
+ * at which moment the runner cuts the subject tiles it actually wanted and
31108
+ * releases the frame. The bound exists only so a runner that stops answering
31109
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
31110
+ *
31111
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
31112
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
31113
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
31114
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
31115
+ * `holdOverflow` on the metrics line is what says you need it.
31097
31116
  */
31098
- ttlMs: number().int().min(250).max(1e4),
31117
+ holdFrames: number().int().min(1).max(64),
31099
31118
  /**
31100
31119
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
31101
31120
  *
31102
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
31103
- * which one is actually binding before reasoning from that. At the shipped
31104
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
31105
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
31106
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
31107
- * change that admits fewer frames buys retention WINDOW at constant RAM
31108
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
31121
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
31122
+ * is what decides how much is held, and the ceiling is the number above which
31123
+ * something is wrong. Before that it was the effective cap at 1024 MB with
31124
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
31125
+ * with the TTL expiring nothing, which is exactly the confusion the hold
31126
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
31109
31127
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
31110
31128
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
31111
31129
  * to replace).
@@ -31131,22 +31149,45 @@ object({
31131
31149
  * there is the signal that some caller names frames outside the inference set
31132
31150
  * and that this must go back to `all`.
31133
31151
  */
31134
- admission: NativeLeaseAdmissionSchema
31152
+ admission: NativeLeaseAdmissionSchema,
31153
+ /**
31154
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
31155
+ * compressed native crops the worker cuts at the moment a frame's detection
31156
+ * result arrives, and keeps long after the frame itself is freed.
31157
+ *
31158
+ * This is the knob that replaced the old retention window, and it buys about
31159
+ * three orders of magnitude more of it: a tile is one subject at native
31160
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
31161
+ * the frame it was cut from. A frame on which nothing was detected costs
31162
+ * nothing at all, which is the real change — the old lease paid per FRAME and
31163
+ * was interrogated per SUBJECT.
31164
+ *
31165
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
31166
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
31167
+ * reproduce that.
31168
+ */
31169
+ tileBudgetMb: number().int().min(0).max(1024)
31135
31170
  });
31136
31171
  /**
31137
- * The values in force when the operator has set nothing — byte-for-byte the
31138
- * constants the decode worker shipped with as env-var defaults, so making these
31139
- * settings changed no behaviour on the day it landed.
31172
+ * The values in force when the operator has set nothing.
31173
+ *
31174
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
31175
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
31176
+ * in the same change that redefines it would make a regression and a retune
31177
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
31178
+ * live traffic.
31140
31179
  */
31141
31180
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
31142
- ttlMs: 1200,
31181
+ holdFrames: 8,
31143
31182
  budgetMb: 1024,
31144
31183
  activityMs: 15e3,
31184
+ tileBudgetMb: 64,
31145
31185
  admission: "inferred"
31146
31186
  };
31147
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
31187
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
31148
31188
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
31149
31189
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
31190
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
31150
31191
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
31151
31192
  var NOTIFIER_ICONS = {
31152
31193
  telegram: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-notifiers",
3
- "version": "1.2.18",
3
+ "version": "1.2.19",
4
4
  "description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
5
5
  "keywords": [
6
6
  "camstack",