@camstack/addon-mqtt-broker 1.2.14 → 1.2.16

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.
@@ -13064,7 +13064,23 @@ var NotificationActionSchema = object({
13064
13064
  * else — see `notification-center/action-token.ts` for what that does and
13065
13065
  * does not buy.
13066
13066
  */
13067
- destructive: boolean().optional()
13067
+ destructive: boolean().optional(),
13068
+ /**
13069
+ * How the tap should REACH the url.
13070
+ *
13071
+ * `navigate` (absent, and every button authored before this field) opens it:
13072
+ * the phone leaves the notification and shows whatever the callback returns.
13073
+ * That is right for a button whose answer the operator wants to read.
13074
+ *
13075
+ * `background` fires it as a POST and stays put. It exists for the buttons
13076
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13077
+ * an answer to the notification, and being thrown into a browser tab to
13078
+ * confirm it costs more attention than the notification did. A backend that
13079
+ * cannot do a background call renders it as an ordinary link (the adapters
13080
+ * fall back rather than dropping the button), so this is a preference, never
13081
+ * a requirement.
13082
+ */
13083
+ mode: _enum(["navigate", "background"]).optional()
13068
13084
  });
13069
13085
  /**
13070
13086
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14065,6 +14081,9 @@ var NcSystemEventConditionSchema = object({
14065
14081
  nodeIds: array(string().min(1)).min(1).optional(),
14066
14082
  packageNames: array(string().min(1)).min(1).optional()
14067
14083
  });
14084
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14085
+ * outage the operator asked for once and forgot. */
14086
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14068
14087
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14069
14088
  var NcScheduleSchema = object({
14070
14089
  windows: array(object({
@@ -14441,15 +14460,15 @@ var NcConditionsSchema = object({
14441
14460
  * (an `immediate` rule naming an `audio-*` class, one notification per
14442
14461
  * classified sample) stays exactly as it was for rules that already use it.
14443
14462
  *
14444
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14445
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14446
- * (`camstack/src/data/notification-center.ts`, guarded by
14447
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14463
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14464
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14465
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14466
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14448
14467
  * condition fields it does not know when a rule is saved from the phone.
14449
14468
  * Publishing an editor for a condition the app cannot round-trip is how an
14450
- * operator loses a rule's conditions by opening it — so the descriptor, the
14451
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14452
- * does an audio rule become authorable.
14469
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14470
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14471
+ * follows here.
14453
14472
  */
14454
14473
  audio: NcAudioConditionSchema.optional()
14455
14474
  });
@@ -14685,6 +14704,30 @@ var NcRuleInputSchema = object({
14685
14704
  */
14686
14705
  snoozeAllowGlobal: boolean().optional(),
14687
14706
  /**
14707
+ * The snooze durations THIS rule's notification offers as buttons, in
14708
+ * minutes.
14709
+ *
14710
+ * Three states, and all three are distinct — which is exactly why this is
14711
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14712
+ * addon cap path (three production failures in one day), so a schema default
14713
+ * would collapse the first two:
14714
+ *
14715
+ * | value | meaning |
14716
+ * | --- | --- |
14717
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14718
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14719
+ * | a list | these choices, de-duplicated and sorted, at most four |
14720
+ *
14721
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14722
+ * three buttons in total) and a rule that spent it all on snooze choices
14723
+ * would push its own tap-through actions off the notification.
14724
+ *
14725
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14726
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14727
+ * window from anywhere (D133).
14728
+ */
14729
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14730
+ /**
14688
14731
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14689
14732
  *
14690
14733
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14784,6 +14827,7 @@ var NcConditionDescriptorSchema = object({
14784
14827
  "device",
14785
14828
  "package",
14786
14829
  "occupancy",
14830
+ "audio",
14787
14831
  "system"
14788
14832
  ]),
14789
14833
  label: string(),
@@ -14802,6 +14846,7 @@ var NcConditionDescriptorSchema = object({
14802
14846
  "crossingSelect",
14803
14847
  "polygonDraw",
14804
14848
  "occupancy",
14849
+ "audio",
14805
14850
  "deviceState",
14806
14851
  "systemEvent"
14807
14852
  ]),
@@ -14953,7 +14998,20 @@ var NcSnoozeInputSchema = object({
14953
14998
  ruleId: string().optional(),
14954
14999
  /** Required when `scope: 'device'`. */
14955
15000
  deviceId: number().int().optional(),
14956
- durationMinutes: number().int().min(1).max(1440),
15001
+ /**
15002
+ * Narrow the window to these subject classes — "the cat, not the person".
15003
+ *
15004
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15005
+ * what every window authored before this field meant, so no persisted row
15006
+ * changes meaning and no client has to learn anything to keep working.
15007
+ *
15008
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15009
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15010
+ * not at whichever of their four rules happened to produce the notification
15011
+ * they are dismissing.
15012
+ */
15013
+ classes: array(string().min(1)).min(1).optional(),
15014
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14957
15015
  /**
14958
15016
  * Silence this for EVERY recipient, not just the caller. Permission is
14959
15017
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -14978,6 +15036,10 @@ var NcSnoozeSchema = object({
14978
15036
  scope: NcSnoozeScopeSchema,
14979
15037
  ruleId: string().optional(),
14980
15038
  deviceId: number().int().optional(),
15039
+ /** Subject classes this window covers. ABSENT = every class — see
15040
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15041
+ * no SQLite column: nothing queries a window by class. */
15042
+ classes: array(string().min(1)).min(1).optional(),
14981
15043
  startedAt: number(),
14982
15044
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
14983
15045
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -23680,13 +23742,24 @@ method(object({
23680
23742
  /** Playback-speed multiplier for the render (1 = realtime). */
23681
23743
  var ExportSpeedSchema = number().min(.25).max(32);
23682
23744
  /**
23683
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23745
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23746
+ *
23747
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
23748
+ * derives these bounds from things that happened at a TIME (a track's
23749
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23750
+ * every segment present for the range, with each recording GAP removed. The
23751
+ * two agree only on a window that recorded without one interruption, and only
23752
+ * the render side knows the segments, so the translation lives there
23753
+ * (`export-dense-map.ts`, addon-pipeline).
23754
+ *
23755
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23756
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23757
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23758
+ * the video was a uniform timelapse, and the log line reported the five ranges
23759
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23684
23760
  *
23685
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23686
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23687
- * playlist. Handing it absolute epochs would make every call site responsible
23688
- * for the same subtraction, and the one that forgot would emit a filter that
23689
- * selects nothing — silently, as a uniform timelapse.
23761
+ * Relative and not absolute epoch, because an absolute epoch would make every
23762
+ * call site responsible for the same subtraction.
23690
23763
  */
23691
23764
  var ExportDenseRangeSchema = object({
23692
23765
  fromSec: number().nonnegative(),
@@ -30539,6 +30612,7 @@ Object.freeze({
30539
30612
  "network-access": "ingress",
30540
30613
  "smtp-provider": "email"
30541
30614
  });
30615
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30542
30616
  new Set(["devices", "classes"]);
30543
30617
  /**
30544
30618
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -30816,25 +30890,32 @@ object({
30816
30890
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
30817
30891
  object({
30818
30892
  /**
30819
- * How long a retained native frame is served before it counts as a miss.
30893
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
30894
+ * detection result.
30820
30895
  *
30821
- * Must cover the FULL late-crop horizon: detection inference + the
30822
- * cross-process inference-result hop to hub post-analysis + tracking + the
30823
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
30824
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
30825
- * RAM per busy camera grows linearly with no measured hit-rate gain.
30896
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
30897
+ * a time window was never related to the event the pixels were waiting for.
30898
+ * A held frame now lives from delivery until the runner has its `FrameResult`
30899
+ * at which moment the runner cuts the subject tiles it actually wanted and
30900
+ * releases the frame. The bound exists only so a runner that stops answering
30901
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
30902
+ *
30903
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
30904
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
30905
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
30906
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
30907
+ * `holdOverflow` on the metrics line is what says you need it.
30826
30908
  */
30827
- ttlMs: number().int().min(250).max(1e4),
30909
+ holdFrames: number().int().min(1).max(64),
30828
30910
  /**
30829
30911
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
30830
30912
  *
30831
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
30832
- * which one is actually binding before reasoning from that. At the shipped
30833
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
30834
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
30835
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
30836
- * change that admits fewer frames buys retention WINDOW at constant RAM
30837
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
30913
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
30914
+ * is what decides how much is held, and the ceiling is the number above which
30915
+ * something is wrong. Before that it was the effective cap at 1024 MB with
30916
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
30917
+ * with the TTL expiring nothing, which is exactly the confusion the hold
30918
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
30838
30919
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
30839
30920
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
30840
30921
  * to replace).
@@ -30860,22 +30941,45 @@ object({
30860
30941
  * there is the signal that some caller names frames outside the inference set
30861
30942
  * and that this must go back to `all`.
30862
30943
  */
30863
- admission: NativeLeaseAdmissionSchema
30944
+ admission: NativeLeaseAdmissionSchema,
30945
+ /**
30946
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
30947
+ * compressed native crops the worker cuts at the moment a frame's detection
30948
+ * result arrives, and keeps long after the frame itself is freed.
30949
+ *
30950
+ * This is the knob that replaced the old retention window, and it buys about
30951
+ * three orders of magnitude more of it: a tile is one subject at native
30952
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
30953
+ * the frame it was cut from. A frame on which nothing was detected costs
30954
+ * nothing at all, which is the real change — the old lease paid per FRAME and
30955
+ * was interrogated per SUBJECT.
30956
+ *
30957
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
30958
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
30959
+ * reproduce that.
30960
+ */
30961
+ tileBudgetMb: number().int().min(0).max(1024)
30864
30962
  });
30865
30963
  /**
30866
- * The values in force when the operator has set nothing — byte-for-byte the
30867
- * constants the decode worker shipped with as env-var defaults, so making these
30868
- * settings changed no behaviour on the day it landed.
30964
+ * The values in force when the operator has set nothing.
30965
+ *
30966
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
30967
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
30968
+ * in the same change that redefines it would make a regression and a retune
30969
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
30970
+ * live traffic.
30869
30971
  */
30870
30972
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
30871
- ttlMs: 1200,
30973
+ holdFrames: 8,
30872
30974
  budgetMb: 1024,
30873
30975
  activityMs: 15e3,
30976
+ tileBudgetMb: 64,
30874
30977
  admission: "inferred"
30875
30978
  };
30876
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
30979
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
30877
30980
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
30878
30981
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
30982
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
30879
30983
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
30880
30984
  //#endregion
30881
30985
  //#region ../../node_modules/xtend/immutable.js
@@ -13059,7 +13059,23 @@ var NotificationActionSchema = object({
13059
13059
  * else — see `notification-center/action-token.ts` for what that does and
13060
13060
  * does not buy.
13061
13061
  */
13062
- destructive: boolean().optional()
13062
+ destructive: boolean().optional(),
13063
+ /**
13064
+ * How the tap should REACH the url.
13065
+ *
13066
+ * `navigate` (absent, and every button authored before this field) opens it:
13067
+ * the phone leaves the notification and shows whatever the callback returns.
13068
+ * That is right for a button whose answer the operator wants to read.
13069
+ *
13070
+ * `background` fires it as a POST and stays put. It exists for the buttons
13071
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13072
+ * an answer to the notification, and being thrown into a browser tab to
13073
+ * confirm it costs more attention than the notification did. A backend that
13074
+ * cannot do a background call renders it as an ordinary link (the adapters
13075
+ * fall back rather than dropping the button), so this is a preference, never
13076
+ * a requirement.
13077
+ */
13078
+ mode: _enum(["navigate", "background"]).optional()
13063
13079
  });
13064
13080
  /**
13065
13081
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14060,6 +14076,9 @@ var NcSystemEventConditionSchema = object({
14060
14076
  nodeIds: array(string().min(1)).min(1).optional(),
14061
14077
  packageNames: array(string().min(1)).min(1).optional()
14062
14078
  });
14079
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14080
+ * outage the operator asked for once and forgot. */
14081
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14063
14082
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14064
14083
  var NcScheduleSchema = object({
14065
14084
  windows: array(object({
@@ -14436,15 +14455,15 @@ var NcConditionsSchema = object({
14436
14455
  * (an `immediate` rule naming an `audio-*` class, one notification per
14437
14456
  * classified sample) stays exactly as it was for rules that already use it.
14438
14457
  *
14439
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14440
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14441
- * (`camstack/src/data/notification-center.ts`, guarded by
14442
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14458
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14459
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14460
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14461
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14443
14462
  * condition fields it does not know when a rule is saved from the phone.
14444
14463
  * Publishing an editor for a condition the app cannot round-trip is how an
14445
- * operator loses a rule's conditions by opening it — so the descriptor, the
14446
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14447
- * does an audio rule become authorable.
14464
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14465
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14466
+ * follows here.
14448
14467
  */
14449
14468
  audio: NcAudioConditionSchema.optional()
14450
14469
  });
@@ -14680,6 +14699,30 @@ var NcRuleInputSchema = object({
14680
14699
  */
14681
14700
  snoozeAllowGlobal: boolean().optional(),
14682
14701
  /**
14702
+ * The snooze durations THIS rule's notification offers as buttons, in
14703
+ * minutes.
14704
+ *
14705
+ * Three states, and all three are distinct — which is exactly why this is
14706
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14707
+ * addon cap path (three production failures in one day), so a schema default
14708
+ * would collapse the first two:
14709
+ *
14710
+ * | value | meaning |
14711
+ * | --- | --- |
14712
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14713
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14714
+ * | a list | these choices, de-duplicated and sorted, at most four |
14715
+ *
14716
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14717
+ * three buttons in total) and a rule that spent it all on snooze choices
14718
+ * would push its own tap-through actions off the notification.
14719
+ *
14720
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14721
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14722
+ * window from anywhere (D133).
14723
+ */
14724
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14725
+ /**
14683
14726
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14684
14727
  *
14685
14728
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14779,6 +14822,7 @@ var NcConditionDescriptorSchema = object({
14779
14822
  "device",
14780
14823
  "package",
14781
14824
  "occupancy",
14825
+ "audio",
14782
14826
  "system"
14783
14827
  ]),
14784
14828
  label: string(),
@@ -14797,6 +14841,7 @@ var NcConditionDescriptorSchema = object({
14797
14841
  "crossingSelect",
14798
14842
  "polygonDraw",
14799
14843
  "occupancy",
14844
+ "audio",
14800
14845
  "deviceState",
14801
14846
  "systemEvent"
14802
14847
  ]),
@@ -14948,7 +14993,20 @@ var NcSnoozeInputSchema = object({
14948
14993
  ruleId: string().optional(),
14949
14994
  /** Required when `scope: 'device'`. */
14950
14995
  deviceId: number().int().optional(),
14951
- durationMinutes: number().int().min(1).max(1440),
14996
+ /**
14997
+ * Narrow the window to these subject classes — "the cat, not the person".
14998
+ *
14999
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15000
+ * what every window authored before this field meant, so no persisted row
15001
+ * changes meaning and no client has to learn anything to keep working.
15002
+ *
15003
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15004
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15005
+ * not at whichever of their four rules happened to produce the notification
15006
+ * they are dismissing.
15007
+ */
15008
+ classes: array(string().min(1)).min(1).optional(),
15009
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14952
15010
  /**
14953
15011
  * Silence this for EVERY recipient, not just the caller. Permission is
14954
15012
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -14973,6 +15031,10 @@ var NcSnoozeSchema = object({
14973
15031
  scope: NcSnoozeScopeSchema,
14974
15032
  ruleId: string().optional(),
14975
15033
  deviceId: number().int().optional(),
15034
+ /** Subject classes this window covers. ABSENT = every class — see
15035
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15036
+ * no SQLite column: nothing queries a window by class. */
15037
+ classes: array(string().min(1)).min(1).optional(),
14976
15038
  startedAt: number(),
14977
15039
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
14978
15040
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -23675,13 +23737,24 @@ method(object({
23675
23737
  /** Playback-speed multiplier for the render (1 = realtime). */
23676
23738
  var ExportSpeedSchema = number().min(.25).max(32);
23677
23739
  /**
23678
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23740
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23741
+ *
23742
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
23743
+ * derives these bounds from things that happened at a TIME (a track's
23744
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23745
+ * every segment present for the range, with each recording GAP removed. The
23746
+ * two agree only on a window that recorded without one interruption, and only
23747
+ * the render side knows the segments, so the translation lives there
23748
+ * (`export-dense-map.ts`, addon-pipeline).
23749
+ *
23750
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23751
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23752
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23753
+ * the video was a uniform timelapse, and the log line reported the five ranges
23754
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23679
23755
  *
23680
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23681
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23682
- * playlist. Handing it absolute epochs would make every call site responsible
23683
- * for the same subtraction, and the one that forgot would emit a filter that
23684
- * selects nothing — silently, as a uniform timelapse.
23756
+ * Relative and not absolute epoch, because an absolute epoch would make every
23757
+ * call site responsible for the same subtraction.
23685
23758
  */
23686
23759
  var ExportDenseRangeSchema = object({
23687
23760
  fromSec: number().nonnegative(),
@@ -30534,6 +30607,7 @@ Object.freeze({
30534
30607
  "network-access": "ingress",
30535
30608
  "smtp-provider": "email"
30536
30609
  });
30610
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30537
30611
  new Set(["devices", "classes"]);
30538
30612
  /**
30539
30613
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -30811,25 +30885,32 @@ object({
30811
30885
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
30812
30886
  object({
30813
30887
  /**
30814
- * How long a retained native frame is served before it counts as a miss.
30888
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
30889
+ * detection result.
30815
30890
  *
30816
- * Must cover the FULL late-crop horizon: detection inference + the
30817
- * cross-process inference-result hop to hub post-analysis + tracking + the
30818
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
30819
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
30820
- * RAM per busy camera grows linearly with no measured hit-rate gain.
30891
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
30892
+ * a time window was never related to the event the pixels were waiting for.
30893
+ * A held frame now lives from delivery until the runner has its `FrameResult`
30894
+ * at which moment the runner cuts the subject tiles it actually wanted and
30895
+ * releases the frame. The bound exists only so a runner that stops answering
30896
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
30897
+ *
30898
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
30899
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
30900
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
30901
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
30902
+ * `holdOverflow` on the metrics line is what says you need it.
30821
30903
  */
30822
- ttlMs: number().int().min(250).max(1e4),
30904
+ holdFrames: number().int().min(1).max(64),
30823
30905
  /**
30824
30906
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
30825
30907
  *
30826
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
30827
- * which one is actually binding before reasoning from that. At the shipped
30828
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
30829
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
30830
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
30831
- * change that admits fewer frames buys retention WINDOW at constant RAM
30832
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
30908
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
30909
+ * is what decides how much is held, and the ceiling is the number above which
30910
+ * something is wrong. Before that it was the effective cap at 1024 MB with
30911
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
30912
+ * with the TTL expiring nothing, which is exactly the confusion the hold
30913
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
30833
30914
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
30834
30915
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
30835
30916
  * to replace).
@@ -30855,22 +30936,45 @@ object({
30855
30936
  * there is the signal that some caller names frames outside the inference set
30856
30937
  * and that this must go back to `all`.
30857
30938
  */
30858
- admission: NativeLeaseAdmissionSchema
30939
+ admission: NativeLeaseAdmissionSchema,
30940
+ /**
30941
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
30942
+ * compressed native crops the worker cuts at the moment a frame's detection
30943
+ * result arrives, and keeps long after the frame itself is freed.
30944
+ *
30945
+ * This is the knob that replaced the old retention window, and it buys about
30946
+ * three orders of magnitude more of it: a tile is one subject at native
30947
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
30948
+ * the frame it was cut from. A frame on which nothing was detected costs
30949
+ * nothing at all, which is the real change — the old lease paid per FRAME and
30950
+ * was interrogated per SUBJECT.
30951
+ *
30952
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
30953
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
30954
+ * reproduce that.
30955
+ */
30956
+ tileBudgetMb: number().int().min(0).max(1024)
30859
30957
  });
30860
30958
  /**
30861
- * The values in force when the operator has set nothing — byte-for-byte the
30862
- * constants the decode worker shipped with as env-var defaults, so making these
30863
- * settings changed no behaviour on the day it landed.
30959
+ * The values in force when the operator has set nothing.
30960
+ *
30961
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
30962
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
30963
+ * in the same change that redefines it would make a regression and a retune
30964
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
30965
+ * live traffic.
30864
30966
  */
30865
30967
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
30866
- ttlMs: 1200,
30968
+ holdFrames: 8,
30867
30969
  budgetMb: 1024,
30868
30970
  activityMs: 15e3,
30971
+ tileBudgetMb: 64,
30869
30972
  admission: "inferred"
30870
30973
  };
30871
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
30974
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
30872
30975
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
30873
30976
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
30977
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
30874
30978
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
30875
30979
  //#endregion
30876
30980
  //#region ../../node_modules/xtend/immutable.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.2.14",
3
+ "version": "1.2.16",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",