@camstack/addon-provider-onvif 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/addon.js +139 -35
  2. package/dist/addon.mjs +139 -35
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -13021,7 +13021,23 @@ var NotificationActionSchema = object({
13021
13021
  * else — see `notification-center/action-token.ts` for what that does and
13022
13022
  * does not buy.
13023
13023
  */
13024
- destructive: boolean().optional()
13024
+ destructive: boolean().optional(),
13025
+ /**
13026
+ * How the tap should REACH the url.
13027
+ *
13028
+ * `navigate` (absent, and every button authored before this field) opens it:
13029
+ * the phone leaves the notification and shows whatever the callback returns.
13030
+ * That is right for a button whose answer the operator wants to read.
13031
+ *
13032
+ * `background` fires it as a POST and stays put. It exists for the buttons
13033
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13034
+ * an answer to the notification, and being thrown into a browser tab to
13035
+ * confirm it costs more attention than the notification did. A backend that
13036
+ * cannot do a background call renders it as an ordinary link (the adapters
13037
+ * fall back rather than dropping the button), so this is a preference, never
13038
+ * a requirement.
13039
+ */
13040
+ mode: _enum(["navigate", "background"]).optional()
13025
13041
  });
13026
13042
  /**
13027
13043
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14022,6 +14038,9 @@ var NcSystemEventConditionSchema = object({
14022
14038
  nodeIds: array(string().min(1)).min(1).optional(),
14023
14039
  packageNames: array(string().min(1)).min(1).optional()
14024
14040
  });
14041
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14042
+ * outage the operator asked for once and forgot. */
14043
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14025
14044
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14026
14045
  var NcScheduleSchema = object({
14027
14046
  windows: array(object({
@@ -14398,15 +14417,15 @@ var NcConditionsSchema = object({
14398
14417
  * (an `immediate` rule naming an `audio-*` class, one notification per
14399
14418
  * classified sample) stays exactly as it was for rules that already use it.
14400
14419
  *
14401
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14402
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14403
- * (`camstack/src/data/notification-center.ts`, guarded by
14404
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14420
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14421
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14422
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14423
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14405
14424
  * condition fields it does not know when a rule is saved from the phone.
14406
14425
  * Publishing an editor for a condition the app cannot round-trip is how an
14407
- * operator loses a rule's conditions by opening it — so the descriptor, the
14408
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14409
- * does an audio rule become authorable.
14426
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14427
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14428
+ * follows here.
14410
14429
  */
14411
14430
  audio: NcAudioConditionSchema.optional()
14412
14431
  });
@@ -14642,6 +14661,30 @@ var NcRuleInputSchema = object({
14642
14661
  */
14643
14662
  snoozeAllowGlobal: boolean().optional(),
14644
14663
  /**
14664
+ * The snooze durations THIS rule's notification offers as buttons, in
14665
+ * minutes.
14666
+ *
14667
+ * Three states, and all three are distinct — which is exactly why this is
14668
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14669
+ * addon cap path (three production failures in one day), so a schema default
14670
+ * would collapse the first two:
14671
+ *
14672
+ * | value | meaning |
14673
+ * | --- | --- |
14674
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14675
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14676
+ * | a list | these choices, de-duplicated and sorted, at most four |
14677
+ *
14678
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14679
+ * three buttons in total) and a rule that spent it all on snooze choices
14680
+ * would push its own tap-through actions off the notification.
14681
+ *
14682
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14683
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14684
+ * window from anywhere (D133).
14685
+ */
14686
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14687
+ /**
14645
14688
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14646
14689
  *
14647
14690
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14741,6 +14784,7 @@ var NcConditionDescriptorSchema = object({
14741
14784
  "device",
14742
14785
  "package",
14743
14786
  "occupancy",
14787
+ "audio",
14744
14788
  "system"
14745
14789
  ]),
14746
14790
  label: string(),
@@ -14759,6 +14803,7 @@ var NcConditionDescriptorSchema = object({
14759
14803
  "crossingSelect",
14760
14804
  "polygonDraw",
14761
14805
  "occupancy",
14806
+ "audio",
14762
14807
  "deviceState",
14763
14808
  "systemEvent"
14764
14809
  ]),
@@ -14910,7 +14955,20 @@ var NcSnoozeInputSchema = object({
14910
14955
  ruleId: string().optional(),
14911
14956
  /** Required when `scope: 'device'`. */
14912
14957
  deviceId: number().int().optional(),
14913
- durationMinutes: number().int().min(1).max(1440),
14958
+ /**
14959
+ * Narrow the window to these subject classes — "the cat, not the person".
14960
+ *
14961
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
14962
+ * what every window authored before this field meant, so no persisted row
14963
+ * changes meaning and no client has to learn anything to keep working.
14964
+ *
14965
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
14966
+ * cross rules (D133): the operator points at a camera and a kind of thing,
14967
+ * not at whichever of their four rules happened to produce the notification
14968
+ * they are dismissing.
14969
+ */
14970
+ classes: array(string().min(1)).min(1).optional(),
14971
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14914
14972
  /**
14915
14973
  * Silence this for EVERY recipient, not just the caller. Permission is
14916
14974
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -14935,6 +14993,10 @@ var NcSnoozeSchema = object({
14935
14993
  scope: NcSnoozeScopeSchema,
14936
14994
  ruleId: string().optional(),
14937
14995
  deviceId: number().int().optional(),
14996
+ /** Subject classes this window covers. ABSENT = every class — see
14997
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
14998
+ * no SQLite column: nothing queries a window by class. */
14999
+ classes: array(string().min(1)).min(1).optional(),
14938
15000
  startedAt: number(),
14939
15001
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
14940
15002
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -23774,13 +23836,24 @@ method(object({
23774
23836
  /** Playback-speed multiplier for the render (1 = realtime). */
23775
23837
  var ExportSpeedSchema = number().min(.25).max(32);
23776
23838
  /**
23777
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23839
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23840
+ *
23841
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
23842
+ * derives these bounds from things that happened at a TIME (a track's
23843
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23844
+ * every segment present for the range, with each recording GAP removed. The
23845
+ * two agree only on a window that recorded without one interruption, and only
23846
+ * the render side knows the segments, so the translation lives there
23847
+ * (`export-dense-map.ts`, addon-pipeline).
23848
+ *
23849
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23850
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23851
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23852
+ * the video was a uniform timelapse, and the log line reported the five ranges
23853
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23778
23854
  *
23779
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23780
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23781
- * playlist. Handing it absolute epochs would make every call site responsible
23782
- * for the same subtraction, and the one that forgot would emit a filter that
23783
- * selects nothing — silently, as a uniform timelapse.
23855
+ * Relative and not absolute epoch, because an absolute epoch would make every
23856
+ * call site responsible for the same subtraction.
23784
23857
  */
23785
23858
  var ExportDenseRangeSchema = object({
23786
23859
  fromSec: number().nonnegative(),
@@ -31042,6 +31115,7 @@ Object.freeze({
31042
31115
  "network-access": "ingress",
31043
31116
  "smtp-provider": "email"
31044
31117
  });
31118
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
31045
31119
  new Set(["devices", "classes"]);
31046
31120
  /**
31047
31121
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -31319,25 +31393,32 @@ object({
31319
31393
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
31320
31394
  object({
31321
31395
  /**
31322
- * How long a retained native frame is served before it counts as a miss.
31396
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
31397
+ * detection result.
31323
31398
  *
31324
- * Must cover the FULL late-crop horizon: detection inference + the
31325
- * cross-process inference-result hop to hub post-analysis + tracking + the
31326
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
31327
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
31328
- * RAM per busy camera grows linearly with no measured hit-rate gain.
31399
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
31400
+ * a time window was never related to the event the pixels were waiting for.
31401
+ * A held frame now lives from delivery until the runner has its `FrameResult`
31402
+ * at which moment the runner cuts the subject tiles it actually wanted and
31403
+ * releases the frame. The bound exists only so a runner that stops answering
31404
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
31405
+ *
31406
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
31407
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
31408
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
31409
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
31410
+ * `holdOverflow` on the metrics line is what says you need it.
31329
31411
  */
31330
- ttlMs: number().int().min(250).max(1e4),
31412
+ holdFrames: number().int().min(1).max(64),
31331
31413
  /**
31332
31414
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
31333
31415
  *
31334
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
31335
- * which one is actually binding before reasoning from that. At the shipped
31336
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
31337
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
31338
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
31339
- * change that admits fewer frames buys retention WINDOW at constant RAM
31340
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
31416
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
31417
+ * is what decides how much is held, and the ceiling is the number above which
31418
+ * something is wrong. Before that it was the effective cap at 1024 MB with
31419
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
31420
+ * with the TTL expiring nothing, which is exactly the confusion the hold
31421
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
31341
31422
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
31342
31423
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
31343
31424
  * to replace).
@@ -31363,22 +31444,45 @@ object({
31363
31444
  * there is the signal that some caller names frames outside the inference set
31364
31445
  * and that this must go back to `all`.
31365
31446
  */
31366
- admission: NativeLeaseAdmissionSchema
31447
+ admission: NativeLeaseAdmissionSchema,
31448
+ /**
31449
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
31450
+ * compressed native crops the worker cuts at the moment a frame's detection
31451
+ * result arrives, and keeps long after the frame itself is freed.
31452
+ *
31453
+ * This is the knob that replaced the old retention window, and it buys about
31454
+ * three orders of magnitude more of it: a tile is one subject at native
31455
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
31456
+ * the frame it was cut from. A frame on which nothing was detected costs
31457
+ * nothing at all, which is the real change — the old lease paid per FRAME and
31458
+ * was interrogated per SUBJECT.
31459
+ *
31460
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
31461
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
31462
+ * reproduce that.
31463
+ */
31464
+ tileBudgetMb: number().int().min(0).max(1024)
31367
31465
  });
31368
31466
  /**
31369
- * The values in force when the operator has set nothing — byte-for-byte the
31370
- * constants the decode worker shipped with as env-var defaults, so making these
31371
- * settings changed no behaviour on the day it landed.
31467
+ * The values in force when the operator has set nothing.
31468
+ *
31469
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
31470
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
31471
+ * in the same change that redefines it would make a regression and a retune
31472
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
31473
+ * live traffic.
31372
31474
  */
31373
31475
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
31374
- ttlMs: 1200,
31476
+ holdFrames: 8,
31375
31477
  budgetMb: 1024,
31376
31478
  activityMs: 15e3,
31479
+ tileBudgetMb: 64,
31377
31480
  admission: "inferred"
31378
31481
  };
31379
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
31482
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
31380
31483
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
31381
31484
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
31485
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
31382
31486
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
31383
31487
  //#endregion
31384
31488
  //#region src/onvif-camera.ts
package/dist/addon.mjs CHANGED
@@ -13022,7 +13022,23 @@ var NotificationActionSchema = object({
13022
13022
  * else — see `notification-center/action-token.ts` for what that does and
13023
13023
  * does not buy.
13024
13024
  */
13025
- destructive: boolean().optional()
13025
+ destructive: boolean().optional(),
13026
+ /**
13027
+ * How the tap should REACH the url.
13028
+ *
13029
+ * `navigate` (absent, and every button authored before this field) opens it:
13030
+ * the phone leaves the notification and shows whatever the callback returns.
13031
+ * That is right for a button whose answer the operator wants to read.
13032
+ *
13033
+ * `background` fires it as a POST and stays put. It exists for the buttons
13034
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13035
+ * an answer to the notification, and being thrown into a browser tab to
13036
+ * confirm it costs more attention than the notification did. A backend that
13037
+ * cannot do a background call renders it as an ordinary link (the adapters
13038
+ * fall back rather than dropping the button), so this is a preference, never
13039
+ * a requirement.
13040
+ */
13041
+ mode: _enum(["navigate", "background"]).optional()
13026
13042
  });
13027
13043
  /**
13028
13044
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14023,6 +14039,9 @@ var NcSystemEventConditionSchema = object({
14023
14039
  nodeIds: array(string().min(1)).min(1).optional(),
14024
14040
  packageNames: array(string().min(1)).min(1).optional()
14025
14041
  });
14042
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14043
+ * outage the operator asked for once and forgot. */
14044
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14026
14045
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14027
14046
  var NcScheduleSchema = object({
14028
14047
  windows: array(object({
@@ -14399,15 +14418,15 @@ var NcConditionsSchema = object({
14399
14418
  * (an `immediate` rule naming an `audio-*` class, one notification per
14400
14419
  * classified sample) stays exactly as it was for rules that already use it.
14401
14420
  *
14402
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14403
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14404
- * (`camstack/src/data/notification-center.ts`, guarded by
14405
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14421
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14422
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14423
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14424
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14406
14425
  * condition fields it does not know when a rule is saved from the phone.
14407
14426
  * Publishing an editor for a condition the app cannot round-trip is how an
14408
- * operator loses a rule's conditions by opening it — so the descriptor, the
14409
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14410
- * does an audio rule become authorable.
14427
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14428
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14429
+ * follows here.
14411
14430
  */
14412
14431
  audio: NcAudioConditionSchema.optional()
14413
14432
  });
@@ -14643,6 +14662,30 @@ var NcRuleInputSchema = object({
14643
14662
  */
14644
14663
  snoozeAllowGlobal: boolean().optional(),
14645
14664
  /**
14665
+ * The snooze durations THIS rule's notification offers as buttons, in
14666
+ * minutes.
14667
+ *
14668
+ * Three states, and all three are distinct — which is exactly why this is
14669
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14670
+ * addon cap path (three production failures in one day), so a schema default
14671
+ * would collapse the first two:
14672
+ *
14673
+ * | value | meaning |
14674
+ * | --- | --- |
14675
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14676
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14677
+ * | a list | these choices, de-duplicated and sorted, at most four |
14678
+ *
14679
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14680
+ * three buttons in total) and a rule that spent it all on snooze choices
14681
+ * would push its own tap-through actions off the notification.
14682
+ *
14683
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14684
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14685
+ * window from anywhere (D133).
14686
+ */
14687
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14688
+ /**
14646
14689
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14647
14690
  *
14648
14691
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14742,6 +14785,7 @@ var NcConditionDescriptorSchema = object({
14742
14785
  "device",
14743
14786
  "package",
14744
14787
  "occupancy",
14788
+ "audio",
14745
14789
  "system"
14746
14790
  ]),
14747
14791
  label: string(),
@@ -14760,6 +14804,7 @@ var NcConditionDescriptorSchema = object({
14760
14804
  "crossingSelect",
14761
14805
  "polygonDraw",
14762
14806
  "occupancy",
14807
+ "audio",
14763
14808
  "deviceState",
14764
14809
  "systemEvent"
14765
14810
  ]),
@@ -14911,7 +14956,20 @@ var NcSnoozeInputSchema = object({
14911
14956
  ruleId: string().optional(),
14912
14957
  /** Required when `scope: 'device'`. */
14913
14958
  deviceId: number().int().optional(),
14914
- durationMinutes: number().int().min(1).max(1440),
14959
+ /**
14960
+ * Narrow the window to these subject classes — "the cat, not the person".
14961
+ *
14962
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
14963
+ * what every window authored before this field meant, so no persisted row
14964
+ * changes meaning and no client has to learn anything to keep working.
14965
+ *
14966
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
14967
+ * cross rules (D133): the operator points at a camera and a kind of thing,
14968
+ * not at whichever of their four rules happened to produce the notification
14969
+ * they are dismissing.
14970
+ */
14971
+ classes: array(string().min(1)).min(1).optional(),
14972
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14915
14973
  /**
14916
14974
  * Silence this for EVERY recipient, not just the caller. Permission is
14917
14975
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -14936,6 +14994,10 @@ var NcSnoozeSchema = object({
14936
14994
  scope: NcSnoozeScopeSchema,
14937
14995
  ruleId: string().optional(),
14938
14996
  deviceId: number().int().optional(),
14997
+ /** Subject classes this window covers. ABSENT = every class — see
14998
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
14999
+ * no SQLite column: nothing queries a window by class. */
15000
+ classes: array(string().min(1)).min(1).optional(),
14939
15001
  startedAt: number(),
14940
15002
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
14941
15003
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -23775,13 +23837,24 @@ method(object({
23775
23837
  /** Playback-speed multiplier for the render (1 = realtime). */
23776
23838
  var ExportSpeedSchema = number().min(.25).max(32);
23777
23839
  /**
23778
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23840
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
23841
+ *
23842
+ * **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
23843
+ * derives these bounds from things that happened at a TIME (a track's
23844
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
23845
+ * every segment present for the range, with each recording GAP removed. The
23846
+ * two agree only on a window that recorded without one interruption, and only
23847
+ * the render side knows the segments, so the translation lives there
23848
+ * (`export-dense-map.ts`, addon-pipeline).
23849
+ *
23850
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
23851
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
23852
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
23853
+ * the video was a uniform timelapse, and the log line reported the five ranges
23854
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
23779
23855
  *
23780
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23781
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23782
- * playlist. Handing it absolute epochs would make every call site responsible
23783
- * for the same subtraction, and the one that forgot would emit a filter that
23784
- * selects nothing — silently, as a uniform timelapse.
23856
+ * Relative and not absolute epoch, because an absolute epoch would make every
23857
+ * call site responsible for the same subtraction.
23785
23858
  */
23786
23859
  var ExportDenseRangeSchema = object({
23787
23860
  fromSec: number().nonnegative(),
@@ -31043,6 +31116,7 @@ Object.freeze({
31043
31116
  "network-access": "ingress",
31044
31117
  "smtp-provider": "email"
31045
31118
  });
31119
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
31046
31120
  new Set(["devices", "classes"]);
31047
31121
  /**
31048
31122
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -31320,25 +31394,32 @@ object({
31320
31394
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
31321
31395
  object({
31322
31396
  /**
31323
- * How long a retained native frame is served before it counts as a miss.
31397
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
31398
+ * detection result.
31324
31399
  *
31325
- * Must cover the FULL late-crop horizon: detection inference + the
31326
- * cross-process inference-result hop to hub post-analysis + tracking + the
31327
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
31328
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
31329
- * RAM per busy camera grows linearly with no measured hit-rate gain.
31400
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
31401
+ * a time window was never related to the event the pixels were waiting for.
31402
+ * A held frame now lives from delivery until the runner has its `FrameResult`
31403
+ * at which moment the runner cuts the subject tiles it actually wanted and
31404
+ * releases the frame. The bound exists only so a runner that stops answering
31405
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
31406
+ *
31407
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
31408
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
31409
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
31410
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
31411
+ * `holdOverflow` on the metrics line is what says you need it.
31330
31412
  */
31331
- ttlMs: number().int().min(250).max(1e4),
31413
+ holdFrames: number().int().min(1).max(64),
31332
31414
  /**
31333
31415
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
31334
31416
  *
31335
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
31336
- * which one is actually binding before reasoning from that. At the shipped
31337
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
31338
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
31339
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
31340
- * change that admits fewer frames buys retention WINDOW at constant RAM
31341
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
31417
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
31418
+ * is what decides how much is held, and the ceiling is the number above which
31419
+ * something is wrong. Before that it was the effective cap at 1024 MB with
31420
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
31421
+ * with the TTL expiring nothing, which is exactly the confusion the hold
31422
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
31342
31423
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
31343
31424
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
31344
31425
  * to replace).
@@ -31364,22 +31445,45 @@ object({
31364
31445
  * there is the signal that some caller names frames outside the inference set
31365
31446
  * and that this must go back to `all`.
31366
31447
  */
31367
- admission: NativeLeaseAdmissionSchema
31448
+ admission: NativeLeaseAdmissionSchema,
31449
+ /**
31450
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
31451
+ * compressed native crops the worker cuts at the moment a frame's detection
31452
+ * result arrives, and keeps long after the frame itself is freed.
31453
+ *
31454
+ * This is the knob that replaced the old retention window, and it buys about
31455
+ * three orders of magnitude more of it: a tile is one subject at native
31456
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
31457
+ * the frame it was cut from. A frame on which nothing was detected costs
31458
+ * nothing at all, which is the real change — the old lease paid per FRAME and
31459
+ * was interrogated per SUBJECT.
31460
+ *
31461
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
31462
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
31463
+ * reproduce that.
31464
+ */
31465
+ tileBudgetMb: number().int().min(0).max(1024)
31368
31466
  });
31369
31467
  /**
31370
- * The values in force when the operator has set nothing — byte-for-byte the
31371
- * constants the decode worker shipped with as env-var defaults, so making these
31372
- * settings changed no behaviour on the day it landed.
31468
+ * The values in force when the operator has set nothing.
31469
+ *
31470
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
31471
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
31472
+ * in the same change that redefines it would make a regression and a retune
31473
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
31474
+ * live traffic.
31373
31475
  */
31374
31476
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
31375
- ttlMs: 1200,
31477
+ holdFrames: 8,
31376
31478
  budgetMb: 1024,
31377
31479
  activityMs: 15e3,
31480
+ tileBudgetMb: 64,
31378
31481
  admission: "inferred"
31379
31482
  };
31380
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
31483
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
31381
31484
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
31382
31485
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
31486
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
31383
31487
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
31384
31488
  //#endregion
31385
31489
  //#region src/onvif-camera.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",