@camstack/addon-export-alexa 1.2.18 → 1.2.20

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.
@@ -13262,7 +13262,23 @@ var NotificationActionSchema = object({
13262
13262
  * else — see `notification-center/action-token.ts` for what that does and
13263
13263
  * does not buy.
13264
13264
  */
13265
- destructive: boolean().optional()
13265
+ destructive: boolean().optional(),
13266
+ /**
13267
+ * How the tap should REACH the url.
13268
+ *
13269
+ * `navigate` (absent, and every button authored before this field) opens it:
13270
+ * the phone leaves the notification and shows whatever the callback returns.
13271
+ * That is right for a button whose answer the operator wants to read.
13272
+ *
13273
+ * `background` fires it as a POST and stays put. It exists for the buttons
13274
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13275
+ * an answer to the notification, and being thrown into a browser tab to
13276
+ * confirm it costs more attention than the notification did. A backend that
13277
+ * cannot do a background call renders it as an ordinary link (the adapters
13278
+ * fall back rather than dropping the button), so this is a preference, never
13279
+ * a requirement.
13280
+ */
13281
+ mode: _enum(["navigate", "background"]).optional()
13266
13282
  });
13267
13283
  /**
13268
13284
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14263,6 +14279,9 @@ var NcSystemEventConditionSchema = object({
14263
14279
  nodeIds: array(string().min(1)).min(1).optional(),
14264
14280
  packageNames: array(string().min(1)).min(1).optional()
14265
14281
  });
14282
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14283
+ * outage the operator asked for once and forgot. */
14284
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14266
14285
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14267
14286
  var NcScheduleSchema = object({
14268
14287
  windows: array(object({
@@ -14639,15 +14658,15 @@ var NcConditionsSchema = object({
14639
14658
  * (an `immediate` rule naming an `audio-*` class, one notification per
14640
14659
  * classified sample) stays exactly as it was for rules that already use it.
14641
14660
  *
14642
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14643
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14644
- * (`camstack/src/data/notification-center.ts`, guarded by
14645
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14661
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14662
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14663
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14664
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14646
14665
  * condition fields it does not know when a rule is saved from the phone.
14647
14666
  * Publishing an editor for a condition the app cannot round-trip is how an
14648
- * operator loses a rule's conditions by opening it — so the descriptor, the
14649
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14650
- * does an audio rule become authorable.
14667
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14668
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14669
+ * follows here.
14651
14670
  */
14652
14671
  audio: NcAudioConditionSchema.optional()
14653
14672
  });
@@ -14883,6 +14902,30 @@ var NcRuleInputSchema = object({
14883
14902
  */
14884
14903
  snoozeAllowGlobal: boolean().optional(),
14885
14904
  /**
14905
+ * The snooze durations THIS rule's notification offers as buttons, in
14906
+ * minutes.
14907
+ *
14908
+ * Three states, and all three are distinct — which is exactly why this is
14909
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14910
+ * addon cap path (three production failures in one day), so a schema default
14911
+ * would collapse the first two:
14912
+ *
14913
+ * | value | meaning |
14914
+ * | --- | --- |
14915
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14916
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14917
+ * | a list | these choices, de-duplicated and sorted, at most four |
14918
+ *
14919
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14920
+ * three buttons in total) and a rule that spent it all on snooze choices
14921
+ * would push its own tap-through actions off the notification.
14922
+ *
14923
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14924
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14925
+ * window from anywhere (D133).
14926
+ */
14927
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14928
+ /**
14886
14929
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14887
14930
  *
14888
14931
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14982,6 +15025,7 @@ var NcConditionDescriptorSchema = object({
14982
15025
  "device",
14983
15026
  "package",
14984
15027
  "occupancy",
15028
+ "audio",
14985
15029
  "system"
14986
15030
  ]),
14987
15031
  label: string(),
@@ -15000,6 +15044,7 @@ var NcConditionDescriptorSchema = object({
15000
15044
  "crossingSelect",
15001
15045
  "polygonDraw",
15002
15046
  "occupancy",
15047
+ "audio",
15003
15048
  "deviceState",
15004
15049
  "systemEvent"
15005
15050
  ]),
@@ -15151,7 +15196,20 @@ var NcSnoozeInputSchema = object({
15151
15196
  ruleId: string().optional(),
15152
15197
  /** Required when `scope: 'device'`. */
15153
15198
  deviceId: number().int().optional(),
15154
- durationMinutes: number().int().min(1).max(1440),
15199
+ /**
15200
+ * Narrow the window to these subject classes — "the cat, not the person".
15201
+ *
15202
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15203
+ * what every window authored before this field meant, so no persisted row
15204
+ * changes meaning and no client has to learn anything to keep working.
15205
+ *
15206
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15207
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15208
+ * not at whichever of their four rules happened to produce the notification
15209
+ * they are dismissing.
15210
+ */
15211
+ classes: array(string().min(1)).min(1).optional(),
15212
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15155
15213
  /**
15156
15214
  * Silence this for EVERY recipient, not just the caller. Permission is
15157
15215
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15176,6 +15234,10 @@ var NcSnoozeSchema = object({
15176
15234
  scope: NcSnoozeScopeSchema,
15177
15235
  ruleId: string().optional(),
15178
15236
  deviceId: number().int().optional(),
15237
+ /** Subject classes this window covers. ABSENT = every class — see
15238
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15239
+ * no SQLite column: nothing queries a window by class. */
15240
+ classes: array(string().min(1)).min(1).optional(),
15179
15241
  startedAt: number(),
15180
15242
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15181
15243
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -23884,13 +23946,24 @@ method(object({
23884
23946
  /** Playback-speed multiplier for the render (1 = realtime). */
23885
23947
  var ExportSpeedSchema = number().min(.25).max(32);
23886
23948
  /**
23887
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23949
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23950
+ *
23951
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
23952
+ * derives these bounds from things that happened at a TIME (a track's
23953
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23954
+ * every segment present for the range, with each recording GAP removed. The
23955
+ * two agree only on a window that recorded without one interruption, and only
23956
+ * the render side knows the segments, so the translation lives there
23957
+ * (`export-dense-map.ts`, addon-pipeline).
23958
+ *
23959
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23960
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23961
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23962
+ * the video was a uniform timelapse, and the log line reported the five ranges
23963
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23888
23964
  *
23889
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23890
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23891
- * playlist. Handing it absolute epochs would make every call site responsible
23892
- * for the same subtraction, and the one that forgot would emit a filter that
23893
- * selects nothing — silently, as a uniform timelapse.
23965
+ * Relative and not absolute epoch, because an absolute epoch would make every
23966
+ * call site responsible for the same subtraction.
23894
23967
  */
23895
23968
  var ExportDenseRangeSchema = object({
23896
23969
  fromSec: number().nonnegative(),
@@ -30743,6 +30816,7 @@ Object.freeze({
30743
30816
  "network-access": "ingress",
30744
30817
  "smtp-provider": "email"
30745
30818
  });
30819
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30746
30820
  new Set(["devices", "classes"]);
30747
30821
  /**
30748
30822
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -31020,25 +31094,32 @@ object({
31020
31094
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
31021
31095
  object({
31022
31096
  /**
31023
- * How long a retained native frame is served before it counts as a miss.
31097
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
31098
+ * detection result.
31024
31099
  *
31025
- * Must cover the FULL late-crop horizon: detection inference + the
31026
- * cross-process inference-result hop to hub post-analysis + tracking + the
31027
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
31028
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
31029
- * RAM per busy camera grows linearly with no measured hit-rate gain.
31100
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
31101
+ * a time window was never related to the event the pixels were waiting for.
31102
+ * A held frame now lives from delivery until the runner has its `FrameResult`
31103
+ * — at which moment the runner cuts the subject tiles it actually wanted and
31104
+ * releases the frame. The bound exists only so a runner that stops answering
31105
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
31106
+ *
31107
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
31108
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
31109
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
31110
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
31111
+ * `holdOverflow` on the metrics line is what says you need it.
31030
31112
  */
31031
- ttlMs: number().int().min(250).max(1e4),
31113
+ holdFrames: number().int().min(1).max(64),
31032
31114
  /**
31033
31115
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
31034
31116
  *
31035
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
31036
- * which one is actually binding before reasoning from that. At the shipped
31037
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
31038
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
31039
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
31040
- * change that admits fewer frames buys retention WINDOW at constant RAM
31041
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
31117
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
31118
+ * is what decides how much is held, and the ceiling is the number above which
31119
+ * something is wrong. Before that it was the effective cap — at 1024 MB with
31120
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
31121
+ * with the TTL expiring nothing, which is exactly the confusion the hold
31122
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
31042
31123
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
31043
31124
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
31044
31125
  * to replace).
@@ -31064,22 +31145,45 @@ object({
31064
31145
  * there is the signal that some caller names frames outside the inference set
31065
31146
  * and that this must go back to `all`.
31066
31147
  */
31067
- admission: NativeLeaseAdmissionSchema
31148
+ admission: NativeLeaseAdmissionSchema,
31149
+ /**
31150
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
31151
+ * compressed native crops the worker cuts at the moment a frame's detection
31152
+ * result arrives, and keeps long after the frame itself is freed.
31153
+ *
31154
+ * This is the knob that replaced the old retention window, and it buys about
31155
+ * three orders of magnitude more of it: a tile is one subject at native
31156
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
31157
+ * the frame it was cut from. A frame on which nothing was detected costs
31158
+ * nothing at all, which is the real change — the old lease paid per FRAME and
31159
+ * was interrogated per SUBJECT.
31160
+ *
31161
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
31162
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
31163
+ * reproduce that.
31164
+ */
31165
+ tileBudgetMb: number().int().min(0).max(1024)
31068
31166
  });
31069
31167
  /**
31070
- * The values in force when the operator has set nothing — byte-for-byte the
31071
- * constants the decode worker shipped with as env-var defaults, so making these
31072
- * settings changed no behaviour on the day it landed.
31168
+ * The values in force when the operator has set nothing.
31169
+ *
31170
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
31171
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
31172
+ * in the same change that redefines it would make a regression and a retune
31173
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
31174
+ * live traffic.
31073
31175
  */
31074
31176
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
31075
- ttlMs: 1200,
31177
+ holdFrames: 8,
31076
31178
  budgetMb: 1024,
31077
31179
  activityMs: 15e3,
31180
+ tileBudgetMb: 64,
31078
31181
  admission: "inferred"
31079
31182
  };
31080
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
31183
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
31081
31184
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
31082
31185
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
31186
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
31083
31187
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
31084
31188
  //#endregion
31085
31189
  //#region src/custom-actions.ts
@@ -13235,7 +13235,23 @@ var NotificationActionSchema = object({
13235
13235
  * else — see `notification-center/action-token.ts` for what that does and
13236
13236
  * does not buy.
13237
13237
  */
13238
- destructive: boolean().optional()
13238
+ destructive: boolean().optional(),
13239
+ /**
13240
+ * How the tap should REACH the url.
13241
+ *
13242
+ * `navigate` (absent, and every button authored before this field) opens it:
13243
+ * the phone leaves the notification and shows whatever the callback returns.
13244
+ * That is right for a button whose answer the operator wants to read.
13245
+ *
13246
+ * `background` fires it as a POST and stays put. It exists for the buttons
13247
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13248
+ * an answer to the notification, and being thrown into a browser tab to
13249
+ * confirm it costs more attention than the notification did. A backend that
13250
+ * cannot do a background call renders it as an ordinary link (the adapters
13251
+ * fall back rather than dropping the button), so this is a preference, never
13252
+ * a requirement.
13253
+ */
13254
+ mode: _enum(["navigate", "background"]).optional()
13239
13255
  });
13240
13256
  /**
13241
13257
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14236,6 +14252,9 @@ var NcSystemEventConditionSchema = object({
14236
14252
  nodeIds: array(string().min(1)).min(1).optional(),
14237
14253
  packageNames: array(string().min(1)).min(1).optional()
14238
14254
  });
14255
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14256
+ * outage the operator asked for once and forgot. */
14257
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14239
14258
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14240
14259
  var NcScheduleSchema = object({
14241
14260
  windows: array(object({
@@ -14612,15 +14631,15 @@ var NcConditionsSchema = object({
14612
14631
  * (an `immediate` rule naming an `audio-*` class, one notification per
14613
14632
  * classified sample) stays exactly as it was for rules that already use it.
14614
14633
  *
14615
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14616
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14617
- * (`camstack/src/data/notification-center.ts`, guarded by
14618
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14634
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14635
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14636
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14637
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14619
14638
  * condition fields it does not know when a rule is saved from the phone.
14620
14639
  * Publishing an editor for a condition the app cannot round-trip is how an
14621
- * operator loses a rule's conditions by opening it — so the descriptor, the
14622
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14623
- * does an audio rule become authorable.
14640
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14641
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14642
+ * follows here.
14624
14643
  */
14625
14644
  audio: NcAudioConditionSchema.optional()
14626
14645
  });
@@ -14856,6 +14875,30 @@ var NcRuleInputSchema = object({
14856
14875
  */
14857
14876
  snoozeAllowGlobal: boolean().optional(),
14858
14877
  /**
14878
+ * The snooze durations THIS rule's notification offers as buttons, in
14879
+ * minutes.
14880
+ *
14881
+ * Three states, and all three are distinct — which is exactly why this is
14882
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14883
+ * addon cap path (three production failures in one day), so a schema default
14884
+ * would collapse the first two:
14885
+ *
14886
+ * | value | meaning |
14887
+ * | --- | --- |
14888
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14889
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14890
+ * | a list | these choices, de-duplicated and sorted, at most four |
14891
+ *
14892
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14893
+ * three buttons in total) and a rule that spent it all on snooze choices
14894
+ * would push its own tap-through actions off the notification.
14895
+ *
14896
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14897
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14898
+ * window from anywhere (D133).
14899
+ */
14900
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14901
+ /**
14859
14902
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14860
14903
  *
14861
14904
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14955,6 +14998,7 @@ var NcConditionDescriptorSchema = object({
14955
14998
  "device",
14956
14999
  "package",
14957
15000
  "occupancy",
15001
+ "audio",
14958
15002
  "system"
14959
15003
  ]),
14960
15004
  label: string(),
@@ -14973,6 +15017,7 @@ var NcConditionDescriptorSchema = object({
14973
15017
  "crossingSelect",
14974
15018
  "polygonDraw",
14975
15019
  "occupancy",
15020
+ "audio",
14976
15021
  "deviceState",
14977
15022
  "systemEvent"
14978
15023
  ]),
@@ -15124,7 +15169,20 @@ var NcSnoozeInputSchema = object({
15124
15169
  ruleId: string().optional(),
15125
15170
  /** Required when `scope: 'device'`. */
15126
15171
  deviceId: number().int().optional(),
15127
- durationMinutes: number().int().min(1).max(1440),
15172
+ /**
15173
+ * Narrow the window to these subject classes — "the cat, not the person".
15174
+ *
15175
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15176
+ * what every window authored before this field meant, so no persisted row
15177
+ * changes meaning and no client has to learn anything to keep working.
15178
+ *
15179
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15180
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15181
+ * not at whichever of their four rules happened to produce the notification
15182
+ * they are dismissing.
15183
+ */
15184
+ classes: array(string().min(1)).min(1).optional(),
15185
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15128
15186
  /**
15129
15187
  * Silence this for EVERY recipient, not just the caller. Permission is
15130
15188
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15149,6 +15207,10 @@ var NcSnoozeSchema = object({
15149
15207
  scope: NcSnoozeScopeSchema,
15150
15208
  ruleId: string().optional(),
15151
15209
  deviceId: number().int().optional(),
15210
+ /** Subject classes this window covers. ABSENT = every class — see
15211
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15212
+ * no SQLite column: nothing queries a window by class. */
15213
+ classes: array(string().min(1)).min(1).optional(),
15152
15214
  startedAt: number(),
15153
15215
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15154
15216
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -23857,13 +23919,24 @@ method(object({
23857
23919
  /** Playback-speed multiplier for the render (1 = realtime). */
23858
23920
  var ExportSpeedSchema = number().min(.25).max(32);
23859
23921
  /**
23860
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23922
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23923
+ *
23924
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
23925
+ * derives these bounds from things that happened at a TIME (a track's
23926
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23927
+ * every segment present for the range, with each recording GAP removed. The
23928
+ * two agree only on a window that recorded without one interruption, and only
23929
+ * the render side knows the segments, so the translation lives there
23930
+ * (`export-dense-map.ts`, addon-pipeline).
23931
+ *
23932
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23933
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23934
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23935
+ * the video was a uniform timelapse, and the log line reported the five ranges
23936
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23861
23937
  *
23862
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23863
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23864
- * playlist. Handing it absolute epochs would make every call site responsible
23865
- * for the same subtraction, and the one that forgot would emit a filter that
23866
- * selects nothing — silently, as a uniform timelapse.
23938
+ * Relative and not absolute epoch, because an absolute epoch would make every
23939
+ * call site responsible for the same subtraction.
23867
23940
  */
23868
23941
  var ExportDenseRangeSchema = object({
23869
23942
  fromSec: number().nonnegative(),
@@ -30716,6 +30789,7 @@ Object.freeze({
30716
30789
  "network-access": "ingress",
30717
30790
  "smtp-provider": "email"
30718
30791
  });
30792
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30719
30793
  new Set(["devices", "classes"]);
30720
30794
  /**
30721
30795
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -30993,25 +31067,32 @@ object({
30993
31067
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
30994
31068
  object({
30995
31069
  /**
30996
- * How long a retained native frame is served before it counts as a miss.
31070
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
31071
+ * detection result.
30997
31072
  *
30998
- * Must cover the FULL late-crop horizon: detection inference + the
30999
- * cross-process inference-result hop to hub post-analysis + tracking + the
31000
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
31001
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
31002
- * RAM per busy camera grows linearly with no measured hit-rate gain.
31073
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
31074
+ * a time window was never related to the event the pixels were waiting for.
31075
+ * A held frame now lives from delivery until the runner has its `FrameResult`
31076
+ * — at which moment the runner cuts the subject tiles it actually wanted and
31077
+ * releases the frame. The bound exists only so a runner that stops answering
31078
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
31079
+ *
31080
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
31081
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
31082
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
31083
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
31084
+ * `holdOverflow` on the metrics line is what says you need it.
31003
31085
  */
31004
- ttlMs: number().int().min(250).max(1e4),
31086
+ holdFrames: number().int().min(1).max(64),
31005
31087
  /**
31006
31088
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
31007
31089
  *
31008
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
31009
- * which one is actually binding before reasoning from that. At the shipped
31010
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
31011
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
31012
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
31013
- * change that admits fewer frames buys retention WINDOW at constant RAM
31014
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
31090
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
31091
+ * is what decides how much is held, and the ceiling is the number above which
31092
+ * something is wrong. Before that it was the effective cap — at 1024 MB with
31093
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
31094
+ * with the TTL expiring nothing, which is exactly the confusion the hold
31095
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
31015
31096
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
31016
31097
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
31017
31098
  * to replace).
@@ -31037,22 +31118,45 @@ object({
31037
31118
  * there is the signal that some caller names frames outside the inference set
31038
31119
  * and that this must go back to `all`.
31039
31120
  */
31040
- admission: NativeLeaseAdmissionSchema
31121
+ admission: NativeLeaseAdmissionSchema,
31122
+ /**
31123
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
31124
+ * compressed native crops the worker cuts at the moment a frame's detection
31125
+ * result arrives, and keeps long after the frame itself is freed.
31126
+ *
31127
+ * This is the knob that replaced the old retention window, and it buys about
31128
+ * three orders of magnitude more of it: a tile is one subject at native
31129
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
31130
+ * the frame it was cut from. A frame on which nothing was detected costs
31131
+ * nothing at all, which is the real change — the old lease paid per FRAME and
31132
+ * was interrogated per SUBJECT.
31133
+ *
31134
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
31135
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
31136
+ * reproduce that.
31137
+ */
31138
+ tileBudgetMb: number().int().min(0).max(1024)
31041
31139
  });
31042
31140
  /**
31043
- * The values in force when the operator has set nothing — byte-for-byte the
31044
- * constants the decode worker shipped with as env-var defaults, so making these
31045
- * settings changed no behaviour on the day it landed.
31141
+ * The values in force when the operator has set nothing.
31142
+ *
31143
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
31144
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
31145
+ * in the same change that redefines it would make a regression and a retune
31146
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
31147
+ * live traffic.
31046
31148
  */
31047
31149
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
31048
- ttlMs: 1200,
31150
+ holdFrames: 8,
31049
31151
  budgetMb: 1024,
31050
31152
  activityMs: 15e3,
31153
+ tileBudgetMb: 64,
31051
31154
  admission: "inferred"
31052
31155
  };
31053
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
31156
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
31054
31157
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
31055
31158
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
31159
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
31056
31160
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
31057
31161
  //#endregion
31058
31162
  //#region src/custom-actions.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.18",
3
+ "version": "1.2.20",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",