@camstack/addon-decoder-nodeav 1.2.13 → 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 (3) hide show
  1. package/dist/index.js +139 -35
  2. package/dist/index.mjs +139 -35
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13097,7 +13097,23 @@ var NotificationActionSchema = object({
13097
13097
  * else — see `notification-center/action-token.ts` for what that does and
13098
13098
  * does not buy.
13099
13099
  */
13100
- destructive: boolean().optional()
13100
+ destructive: boolean().optional(),
13101
+ /**
13102
+ * How the tap should REACH the url.
13103
+ *
13104
+ * `navigate` (absent, and every button authored before this field) opens it:
13105
+ * the phone leaves the notification and shows whatever the callback returns.
13106
+ * That is right for a button whose answer the operator wants to read.
13107
+ *
13108
+ * `background` fires it as a POST and stays put. It exists for the buttons
13109
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13110
+ * an answer to the notification, and being thrown into a browser tab to
13111
+ * confirm it costs more attention than the notification did. A backend that
13112
+ * cannot do a background call renders it as an ordinary link (the adapters
13113
+ * fall back rather than dropping the button), so this is a preference, never
13114
+ * a requirement.
13115
+ */
13116
+ mode: _enum(["navigate", "background"]).optional()
13101
13117
  });
13102
13118
  /**
13103
13119
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14098,6 +14114,9 @@ var NcSystemEventConditionSchema = object({
14098
14114
  nodeIds: array(string().min(1)).min(1).optional(),
14099
14115
  packageNames: array(string().min(1)).min(1).optional()
14100
14116
  });
14117
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14118
+ * outage the operator asked for once and forgot. */
14119
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14101
14120
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14102
14121
  var NcScheduleSchema = object({
14103
14122
  windows: array(object({
@@ -14474,15 +14493,15 @@ var NcConditionsSchema = object({
14474
14493
  * (an `immediate` rule naming an `audio-*` class, one notification per
14475
14494
  * classified sample) stays exactly as it was for rules that already use it.
14476
14495
  *
14477
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14478
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14479
- * (`camstack/src/data/notification-center.ts`, guarded by
14480
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14496
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14497
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14498
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14499
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14481
14500
  * condition fields it does not know when a rule is saved from the phone.
14482
14501
  * Publishing an editor for a condition the app cannot round-trip is how an
14483
- * operator loses a rule's conditions by opening it — so the descriptor, the
14484
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14485
- * does an audio rule become authorable.
14502
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14503
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14504
+ * follows here.
14486
14505
  */
14487
14506
  audio: NcAudioConditionSchema.optional()
14488
14507
  });
@@ -14718,6 +14737,30 @@ var NcRuleInputSchema = object({
14718
14737
  */
14719
14738
  snoozeAllowGlobal: boolean().optional(),
14720
14739
  /**
14740
+ * The snooze durations THIS rule's notification offers as buttons, in
14741
+ * minutes.
14742
+ *
14743
+ * Three states, and all three are distinct — which is exactly why this is
14744
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14745
+ * addon cap path (three production failures in one day), so a schema default
14746
+ * would collapse the first two:
14747
+ *
14748
+ * | value | meaning |
14749
+ * | --- | --- |
14750
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14751
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14752
+ * | a list | these choices, de-duplicated and sorted, at most four |
14753
+ *
14754
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14755
+ * three buttons in total) and a rule that spent it all on snooze choices
14756
+ * would push its own tap-through actions off the notification.
14757
+ *
14758
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14759
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14760
+ * window from anywhere (D133).
14761
+ */
14762
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14763
+ /**
14721
14764
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14722
14765
  *
14723
14766
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14817,6 +14860,7 @@ var NcConditionDescriptorSchema = object({
14817
14860
  "device",
14818
14861
  "package",
14819
14862
  "occupancy",
14863
+ "audio",
14820
14864
  "system"
14821
14865
  ]),
14822
14866
  label: string(),
@@ -14835,6 +14879,7 @@ var NcConditionDescriptorSchema = object({
14835
14879
  "crossingSelect",
14836
14880
  "polygonDraw",
14837
14881
  "occupancy",
14882
+ "audio",
14838
14883
  "deviceState",
14839
14884
  "systemEvent"
14840
14885
  ]),
@@ -14986,7 +15031,20 @@ var NcSnoozeInputSchema = object({
14986
15031
  ruleId: string().optional(),
14987
15032
  /** Required when `scope: 'device'`. */
14988
15033
  deviceId: number().int().optional(),
14989
- durationMinutes: number().int().min(1).max(1440),
15034
+ /**
15035
+ * Narrow the window to these subject classes — "the cat, not the person".
15036
+ *
15037
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15038
+ * what every window authored before this field meant, so no persisted row
15039
+ * changes meaning and no client has to learn anything to keep working.
15040
+ *
15041
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15042
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15043
+ * not at whichever of their four rules happened to produce the notification
15044
+ * they are dismissing.
15045
+ */
15046
+ classes: array(string().min(1)).min(1).optional(),
15047
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14990
15048
  /**
14991
15049
  * Silence this for EVERY recipient, not just the caller. Permission is
14992
15050
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15011,6 +15069,10 @@ var NcSnoozeSchema = object({
15011
15069
  scope: NcSnoozeScopeSchema,
15012
15070
  ruleId: string().optional(),
15013
15071
  deviceId: number().int().optional(),
15072
+ /** Subject classes this window covers. ABSENT = every class — see
15073
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15074
+ * no SQLite column: nothing queries a window by class. */
15075
+ classes: array(string().min(1)).min(1).optional(),
15014
15076
  startedAt: number(),
15015
15077
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15016
15078
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -23713,13 +23775,24 @@ method(object({
23713
23775
  /** Playback-speed multiplier for the render (1 = realtime). */
23714
23776
  var ExportSpeedSchema = number().min(.25).max(32);
23715
23777
  /**
23716
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23778
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23779
+ *
23780
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
23781
+ * derives these bounds from things that happened at a TIME (a track's
23782
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23783
+ * every segment present for the range, with each recording GAP removed. The
23784
+ * two agree only on a window that recorded without one interruption, and only
23785
+ * the render side knows the segments, so the translation lives there
23786
+ * (`export-dense-map.ts`, addon-pipeline).
23787
+ *
23788
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23789
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23790
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23791
+ * the video was a uniform timelapse, and the log line reported the five ranges
23792
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23717
23793
  *
23718
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23719
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23720
- * playlist. Handing it absolute epochs would make every call site responsible
23721
- * for the same subtraction, and the one that forgot would emit a filter that
23722
- * selects nothing — silently, as a uniform timelapse.
23794
+ * Relative and not absolute epoch, because an absolute epoch would make every
23795
+ * call site responsible for the same subtraction.
23723
23796
  */
23724
23797
  var ExportDenseRangeSchema = object({
23725
23798
  fromSec: number().nonnegative(),
@@ -30572,6 +30645,7 @@ Object.freeze({
30572
30645
  "network-access": "ingress",
30573
30646
  "smtp-provider": "email"
30574
30647
  });
30648
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30575
30649
  new Set(["devices", "classes"]);
30576
30650
  /**
30577
30651
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -30849,25 +30923,32 @@ object({
30849
30923
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
30850
30924
  object({
30851
30925
  /**
30852
- * How long a retained native frame is served before it counts as a miss.
30926
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
30927
+ * detection result.
30853
30928
  *
30854
- * Must cover the FULL late-crop horizon: detection inference + the
30855
- * cross-process inference-result hop to hub post-analysis + tracking + the
30856
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
30857
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
30858
- * RAM per busy camera grows linearly with no measured hit-rate gain.
30929
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
30930
+ * a time window was never related to the event the pixels were waiting for.
30931
+ * A held frame now lives from delivery until the runner has its `FrameResult`
30932
+ * at which moment the runner cuts the subject tiles it actually wanted and
30933
+ * releases the frame. The bound exists only so a runner that stops answering
30934
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
30935
+ *
30936
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
30937
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
30938
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
30939
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
30940
+ * `holdOverflow` on the metrics line is what says you need it.
30859
30941
  */
30860
- ttlMs: number().int().min(250).max(1e4),
30942
+ holdFrames: number().int().min(1).max(64),
30861
30943
  /**
30862
30944
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
30863
30945
  *
30864
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
30865
- * which one is actually binding before reasoning from that. At the shipped
30866
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
30867
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
30868
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
30869
- * change that admits fewer frames buys retention WINDOW at constant RAM
30870
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
30946
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
30947
+ * is what decides how much is held, and the ceiling is the number above which
30948
+ * something is wrong. Before that it was the effective cap at 1024 MB with
30949
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
30950
+ * with the TTL expiring nothing, which is exactly the confusion the hold
30951
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
30871
30952
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
30872
30953
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
30873
30954
  * to replace).
@@ -30893,22 +30974,45 @@ object({
30893
30974
  * there is the signal that some caller names frames outside the inference set
30894
30975
  * and that this must go back to `all`.
30895
30976
  */
30896
- admission: NativeLeaseAdmissionSchema
30977
+ admission: NativeLeaseAdmissionSchema,
30978
+ /**
30979
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
30980
+ * compressed native crops the worker cuts at the moment a frame's detection
30981
+ * result arrives, and keeps long after the frame itself is freed.
30982
+ *
30983
+ * This is the knob that replaced the old retention window, and it buys about
30984
+ * three orders of magnitude more of it: a tile is one subject at native
30985
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
30986
+ * the frame it was cut from. A frame on which nothing was detected costs
30987
+ * nothing at all, which is the real change — the old lease paid per FRAME and
30988
+ * was interrogated per SUBJECT.
30989
+ *
30990
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
30991
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
30992
+ * reproduce that.
30993
+ */
30994
+ tileBudgetMb: number().int().min(0).max(1024)
30897
30995
  });
30898
30996
  /**
30899
- * The values in force when the operator has set nothing — byte-for-byte the
30900
- * constants the decode worker shipped with as env-var defaults, so making these
30901
- * settings changed no behaviour on the day it landed.
30997
+ * The values in force when the operator has set nothing.
30998
+ *
30999
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
31000
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
31001
+ * in the same change that redefines it would make a regression and a retune
31002
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
31003
+ * live traffic.
30902
31004
  */
30903
31005
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
30904
- ttlMs: 1200,
31006
+ holdFrames: 8,
30905
31007
  budgetMb: 1024,
30906
31008
  activityMs: 15e3,
31009
+ tileBudgetMb: 64,
30907
31010
  admission: "inferred"
30908
31011
  };
30909
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
31012
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
30910
31013
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
30911
31014
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
31015
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
30912
31016
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
30913
31017
  /**
30914
31018
  * Fixed-capacity ring buffer. When full, push() overwrites the oldest entry.
package/dist/index.mjs CHANGED
@@ -13093,7 +13093,23 @@ var NotificationActionSchema = object({
13093
13093
  * else — see `notification-center/action-token.ts` for what that does and
13094
13094
  * does not buy.
13095
13095
  */
13096
- destructive: boolean().optional()
13096
+ destructive: boolean().optional(),
13097
+ /**
13098
+ * How the tap should REACH the url.
13099
+ *
13100
+ * `navigate` (absent, and every button authored before this field) opens it:
13101
+ * the phone leaves the notification and shows whatever the callback returns.
13102
+ * That is right for a button whose answer the operator wants to read.
13103
+ *
13104
+ * `background` fires it as a POST and stays put. It exists for the buttons
13105
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13106
+ * an answer to the notification, and being thrown into a browser tab to
13107
+ * confirm it costs more attention than the notification did. A backend that
13108
+ * cannot do a background call renders it as an ordinary link (the adapters
13109
+ * fall back rather than dropping the button), so this is a preference, never
13110
+ * a requirement.
13111
+ */
13112
+ mode: _enum(["navigate", "background"]).optional()
13097
13113
  });
13098
13114
  /**
13099
13115
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14094,6 +14110,9 @@ var NcSystemEventConditionSchema = object({
14094
14110
  nodeIds: array(string().min(1)).min(1).optional(),
14095
14111
  packageNames: array(string().min(1)).min(1).optional()
14096
14112
  });
14113
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14114
+ * outage the operator asked for once and forgot. */
14115
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14097
14116
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14098
14117
  var NcScheduleSchema = object({
14099
14118
  windows: array(object({
@@ -14470,15 +14489,15 @@ var NcConditionsSchema = object({
14470
14489
  * (an `immediate` rule naming an `audio-*` class, one notification per
14471
14490
  * classified sample) stays exactly as it was for rules that already use it.
14472
14491
  *
14473
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14474
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14475
- * (`camstack/src/data/notification-center.ts`, guarded by
14476
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14492
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14493
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14494
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14495
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14477
14496
  * condition fields it does not know when a rule is saved from the phone.
14478
14497
  * Publishing an editor for a condition the app cannot round-trip is how an
14479
- * operator loses a rule's conditions by opening it — so the descriptor, the
14480
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14481
- * does an audio rule become authorable.
14498
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14499
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14500
+ * follows here.
14482
14501
  */
14483
14502
  audio: NcAudioConditionSchema.optional()
14484
14503
  });
@@ -14714,6 +14733,30 @@ var NcRuleInputSchema = object({
14714
14733
  */
14715
14734
  snoozeAllowGlobal: boolean().optional(),
14716
14735
  /**
14736
+ * The snooze durations THIS rule's notification offers as buttons, in
14737
+ * minutes.
14738
+ *
14739
+ * Three states, and all three are distinct — which is exactly why this is
14740
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14741
+ * addon cap path (three production failures in one day), so a schema default
14742
+ * would collapse the first two:
14743
+ *
14744
+ * | value | meaning |
14745
+ * | --- | --- |
14746
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14747
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14748
+ * | a list | these choices, de-duplicated and sorted, at most four |
14749
+ *
14750
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14751
+ * three buttons in total) and a rule that spent it all on snooze choices
14752
+ * would push its own tap-through actions off the notification.
14753
+ *
14754
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14755
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14756
+ * window from anywhere (D133).
14757
+ */
14758
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14759
+ /**
14717
14760
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14718
14761
  *
14719
14762
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14813,6 +14856,7 @@ var NcConditionDescriptorSchema = object({
14813
14856
  "device",
14814
14857
  "package",
14815
14858
  "occupancy",
14859
+ "audio",
14816
14860
  "system"
14817
14861
  ]),
14818
14862
  label: string(),
@@ -14831,6 +14875,7 @@ var NcConditionDescriptorSchema = object({
14831
14875
  "crossingSelect",
14832
14876
  "polygonDraw",
14833
14877
  "occupancy",
14878
+ "audio",
14834
14879
  "deviceState",
14835
14880
  "systemEvent"
14836
14881
  ]),
@@ -14982,7 +15027,20 @@ var NcSnoozeInputSchema = object({
14982
15027
  ruleId: string().optional(),
14983
15028
  /** Required when `scope: 'device'`. */
14984
15029
  deviceId: number().int().optional(),
14985
- durationMinutes: number().int().min(1).max(1440),
15030
+ /**
15031
+ * Narrow the window to these subject classes — "the cat, not the person".
15032
+ *
15033
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15034
+ * what every window authored before this field meant, so no persisted row
15035
+ * changes meaning and no client has to learn anything to keep working.
15036
+ *
15037
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15038
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15039
+ * not at whichever of their four rules happened to produce the notification
15040
+ * they are dismissing.
15041
+ */
15042
+ classes: array(string().min(1)).min(1).optional(),
15043
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14986
15044
  /**
14987
15045
  * Silence this for EVERY recipient, not just the caller. Permission is
14988
15046
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15007,6 +15065,10 @@ var NcSnoozeSchema = object({
15007
15065
  scope: NcSnoozeScopeSchema,
15008
15066
  ruleId: string().optional(),
15009
15067
  deviceId: number().int().optional(),
15068
+ /** Subject classes this window covers. ABSENT = every class — see
15069
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15070
+ * no SQLite column: nothing queries a window by class. */
15071
+ classes: array(string().min(1)).min(1).optional(),
15010
15072
  startedAt: number(),
15011
15073
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15012
15074
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -23709,13 +23771,24 @@ method(object({
23709
23771
  /** Playback-speed multiplier for the render (1 = realtime). */
23710
23772
  var ExportSpeedSchema = number().min(.25).max(32);
23711
23773
  /**
23712
- * 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
+ *
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).
23713
23789
  *
23714
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23715
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23716
- * playlist. Handing it absolute epochs would make every call site responsible
23717
- * for the same subtraction, and the one that forgot would emit a filter that
23718
- * selects nothing — silently, as a uniform timelapse.
23790
+ * Relative and not absolute epoch, because an absolute epoch would make every
23791
+ * call site responsible for the same subtraction.
23719
23792
  */
23720
23793
  var ExportDenseRangeSchema = object({
23721
23794
  fromSec: number().nonnegative(),
@@ -30568,6 +30641,7 @@ Object.freeze({
30568
30641
  "network-access": "ingress",
30569
30642
  "smtp-provider": "email"
30570
30643
  });
30644
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30571
30645
  new Set(["devices", "classes"]);
30572
30646
  /**
30573
30647
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -30845,25 +30919,32 @@ object({
30845
30919
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
30846
30920
  object({
30847
30921
  /**
30848
- * How long a retained native frame is served before it counts as a miss.
30922
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
30923
+ * detection result.
30849
30924
  *
30850
- * Must cover the FULL late-crop horizon: detection inference + the
30851
- * cross-process inference-result hop to hub post-analysis + tracking + the
30852
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
30853
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
30854
- * RAM per busy camera grows linearly with no measured hit-rate gain.
30925
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
30926
+ * a time window was never related to the event the pixels were waiting for.
30927
+ * A held frame now lives from delivery until the runner has its `FrameResult`
30928
+ * at which moment the runner cuts the subject tiles it actually wanted and
30929
+ * releases the frame. The bound exists only so a runner that stops answering
30930
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
30931
+ *
30932
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
30933
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
30934
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
30935
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
30936
+ * `holdOverflow` on the metrics line is what says you need it.
30855
30937
  */
30856
- ttlMs: number().int().min(250).max(1e4),
30938
+ holdFrames: number().int().min(1).max(64),
30857
30939
  /**
30858
30940
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
30859
30941
  *
30860
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
30861
- * which one is actually binding before reasoning from that. At the shipped
30862
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
30863
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
30864
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
30865
- * change that admits fewer frames buys retention WINDOW at constant RAM
30866
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
30942
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
30943
+ * is what decides how much is held, and the ceiling is the number above which
30944
+ * something is wrong. Before that it was the effective cap at 1024 MB with
30945
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
30946
+ * with the TTL expiring nothing, which is exactly the confusion the hold
30947
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
30867
30948
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
30868
30949
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
30869
30950
  * to replace).
@@ -30889,22 +30970,45 @@ object({
30889
30970
  * there is the signal that some caller names frames outside the inference set
30890
30971
  * and that this must go back to `all`.
30891
30972
  */
30892
- admission: NativeLeaseAdmissionSchema
30973
+ admission: NativeLeaseAdmissionSchema,
30974
+ /**
30975
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
30976
+ * compressed native crops the worker cuts at the moment a frame's detection
30977
+ * result arrives, and keeps long after the frame itself is freed.
30978
+ *
30979
+ * This is the knob that replaced the old retention window, and it buys about
30980
+ * three orders of magnitude more of it: a tile is one subject at native
30981
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
30982
+ * the frame it was cut from. A frame on which nothing was detected costs
30983
+ * nothing at all, which is the real change — the old lease paid per FRAME and
30984
+ * was interrogated per SUBJECT.
30985
+ *
30986
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
30987
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
30988
+ * reproduce that.
30989
+ */
30990
+ tileBudgetMb: number().int().min(0).max(1024)
30893
30991
  });
30894
30992
  /**
30895
- * The values in force when the operator has set nothing — byte-for-byte the
30896
- * constants the decode worker shipped with as env-var defaults, so making these
30897
- * settings changed no behaviour on the day it landed.
30993
+ * The values in force when the operator has set nothing.
30994
+ *
30995
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
30996
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
30997
+ * in the same change that redefines it would make a regression and a retune
30998
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
30999
+ * live traffic.
30898
31000
  */
30899
31001
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
30900
- ttlMs: 1200,
31002
+ holdFrames: 8,
30901
31003
  budgetMb: 1024,
30902
31004
  activityMs: 15e3,
31005
+ tileBudgetMb: 64,
30903
31006
  admission: "inferred"
30904
31007
  };
30905
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
31008
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
30906
31009
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
30907
31010
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
31011
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
30908
31012
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
30909
31013
  /**
30910
31014
  * Fixed-capacity ring buffer. When full, push() overwrites the oldest entry.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-nodeav",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "description": "Standalone in-process node-av decoder addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",