@camstack/addon-provider-homeassistant 1.2.106 → 1.2.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("./dist-Ds45JTMq.js");
2
+ const require_dist = require("./dist-43pNXXbY.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_zlib = require("node:zlib");
5
5
  //#region src/ha-device-source.ts
@@ -6455,14 +6455,13 @@ function createHaIconRouteProvider() {
6455
6455
  * `discoverTargets` issues a `get_services` WS message and turns every
6456
6456
  * `notify.*` service into a candidate.
6457
6457
  *
6458
- * The notify `service_data`/`data` mapping matches the user's battle-tested
6459
- * Scrypted HA plugin (`scrypted-homeassistant/src/notify.ts`): image URL in
6460
- * `data.image`, iOS critical via `data.push['interruption-level']='critical'`,
6461
- * Android priority via `data.priority='high'`. It extends that minimal shape
6462
- * with the per-level Android `importance` + iOS interruption-level gradation
6463
- * and the HA Companion actionable-notification `actions:[{action,title,uri}]`
6464
- * block (the action id round-trips as the `mobile_app_notification_action`
6465
- * event — see `scrypted-advanced-notifier-homeassistant`'s `action_listener`).
6458
+ * The notify `service_data`/`data` mapping is the battle-tested minimal
6459
+ * shape: image URL in `data.image`, iOS critical via
6460
+ * `data.push['interruption-level']='critical'`, Android priority via
6461
+ * `data.priority='high'`. It extends that with the per-level Android
6462
+ * `importance` + iOS interruption-level gradation and the HA Companion
6463
+ * actionable-notification `actions:[{action,title,uri}]` block (the action
6464
+ * id round-trips as the `mobile_app_notification_action` event).
6466
6465
  */
6467
6466
  /** The single kind this provider contributes to the shared catalog. */
6468
6467
  var HA_NOTIFICATION_KIND = "homeassistant";
@@ -6545,9 +6544,8 @@ function homeassistantTargetKind(addonId) {
6545
6544
  * Map a resolved level onto the HA Companion `data` gradation:
6546
6545
  * - Android: `importance` (default|high) + `priority` (high on high/critical).
6547
6546
  * - iOS: `push['interruption-level']` (active|time-sensitive|critical).
6548
- * Matches `scrypted-homeassistant/notify.ts` (priority:'high' + push
6549
- * interruption-level 'critical' for critical), extended with the per-level
6550
- * importance/interruption gradation.
6547
+ * The baseline is priority:'high' + push interruption-level 'critical' for
6548
+ * critical, extended with the per-level importance/interruption gradation.
6551
6549
  */
6552
6550
  function applyLevel(data, level) {
6553
6551
  const isCritical = level?.flags?.critical === true || level?.id === "critical";
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-4WKeNf6a.mjs";
1
+ import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-Z8ugPi01.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
4
4
  //#region src/ha-device-source.ts
@@ -6454,14 +6454,13 @@ function createHaIconRouteProvider() {
6454
6454
  * `discoverTargets` issues a `get_services` WS message and turns every
6455
6455
  * `notify.*` service into a candidate.
6456
6456
  *
6457
- * The notify `service_data`/`data` mapping matches the user's battle-tested
6458
- * Scrypted HA plugin (`scrypted-homeassistant/src/notify.ts`): image URL in
6459
- * `data.image`, iOS critical via `data.push['interruption-level']='critical'`,
6460
- * Android priority via `data.priority='high'`. It extends that minimal shape
6461
- * with the per-level Android `importance` + iOS interruption-level gradation
6462
- * and the HA Companion actionable-notification `actions:[{action,title,uri}]`
6463
- * block (the action id round-trips as the `mobile_app_notification_action`
6464
- * event — see `scrypted-advanced-notifier-homeassistant`'s `action_listener`).
6457
+ * The notify `service_data`/`data` mapping is the battle-tested minimal
6458
+ * shape: image URL in `data.image`, iOS critical via
6459
+ * `data.push['interruption-level']='critical'`, Android priority via
6460
+ * `data.priority='high'`. It extends that with the per-level Android
6461
+ * `importance` + iOS interruption-level gradation and the HA Companion
6462
+ * actionable-notification `actions:[{action,title,uri}]` block (the action
6463
+ * id round-trips as the `mobile_app_notification_action` event).
6465
6464
  */
6466
6465
  /** The single kind this provider contributes to the shared catalog. */
6467
6466
  var HA_NOTIFICATION_KIND = "homeassistant";
@@ -6544,9 +6543,8 @@ function homeassistantTargetKind(addonId) {
6544
6543
  * Map a resolved level onto the HA Companion `data` gradation:
6545
6544
  * - Android: `importance` (default|high) + `priority` (high on high/critical).
6546
6545
  * - iOS: `push['interruption-level']` (active|time-sensitive|critical).
6547
- * Matches `scrypted-homeassistant/notify.ts` (priority:'high' + push
6548
- * interruption-level 'critical' for critical), extended with the per-level
6549
- * importance/interruption gradation.
6546
+ * The baseline is priority:'high' + push interruption-level 'critical' for
6547
+ * critical, extended with the per-level importance/interruption gradation.
6550
6548
  */
6551
6549
  function applyLevel(data, level) {
6552
6550
  const isCritical = level?.flags?.critical === true || level?.id === "critical";
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-CnLqLOKs.mjs
1
+ //#region ../types/dist/event-category-DAXzJeTX.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -590,7 +590,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
590
590
  * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
591
591
  */
592
592
  EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
593
- EventCategory["FrigateLiveEvent"] = "frigate.live-event";
594
593
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
595
594
  /**
596
595
  * Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
@@ -12896,7 +12895,7 @@ DeviceType.Camera;
12896
12895
  var SourceInfoSchema = object({
12897
12896
  /** Live dispatch key — mutable when the source system allows rename. */
12898
12897
  id: string(),
12899
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
12898
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
12900
12899
  system: string(),
12901
12900
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
12902
12901
  * Used to detect rename when `id` changes. */
@@ -12909,7 +12908,7 @@ var SourceInfoSchema = object({
12909
12908
  /**
12910
12909
  * Build the synthetic SourceInfo every existing provider falls back to
12911
12910
  * when no upstream value has been persisted. Keeps non-migrated providers
12912
- * (Reolink / Hikvision / ONVIF / Frigate / RTSP) functional without code
12911
+ * (Reolink / Hikvision / ONVIF / RTSP) functional without code
12913
12912
  * changes — `id` reuses the CamStack stableId, `system` reuses the addon
12914
12913
  * id. Real upstream identity replaces this once a provider migrates and
12915
12914
  * calls `updateSourceInfo()` with concrete values.
@@ -13658,7 +13657,7 @@ var deviceProviderCapability = {
13658
13657
  * - `device-management.router.ts` (deleted in Phase 2)
13659
13658
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
13660
13659
  *
13661
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
13660
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
13662
13661
  * fork into separate processes but never run on remote cluster agents. Therefore:
13663
13662
  * - No nodeId routing needed — this is a pure hub singleton.
13664
13663
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -17720,7 +17719,7 @@ var NcRuleInputSchema = object({
17720
17719
  * The measured seven-person arrival on device 590 spans 110 s with every
17721
17720
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
17722
17721
  * idle cutoff holds it as one and ends it when the arrival actually ends.
17723
- * 30 is Frigate's shipped value for the same decision.
17722
+ * 30 s is a widely shipped value for the same decision.
17724
17723
  *
17725
17724
  * ### What it replaces
17726
17725
  *
@@ -19818,6 +19817,13 @@ var ZoneCrossingSchema = object({
19818
19817
  /** Zone display name at crossing time (falls back to the id). */
19819
19818
  zoneName: string().optional()
19820
19819
  });
19820
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
19821
+ var ZoneOverlapSchema = object({
19822
+ zoneId: string(),
19823
+ zoneName: string().optional(),
19824
+ /** Percentage of the BOX area inside the zone, 0–100. */
19825
+ overlapPct: number()
19826
+ });
19821
19827
  var ObjectEventSchema = object({
19822
19828
  ...BaseEventFields,
19823
19829
  kind: literal("object"),
@@ -19842,6 +19848,35 @@ var ObjectEventSchema = object({
19842
19848
  bbox: BoundingBoxSchema.optional(),
19843
19849
  /** Heavy JSON — omitted in slim projection. */
19844
19850
  zones: array(string()).readonly().optional(),
19851
+ /**
19852
+ * How far inside each stamped zone the box actually was, as a percentage of
19853
+ * the BOX area.
19854
+ *
19855
+ * Membership alone cannot express "at least a third of it inside", which is
19856
+ * the bar an operator argues with — and the number already existed: the
19857
+ * engine computed it, the pipeline logged it, and then discarded it. It
19858
+ * matters most on the events that carry no track, where a rule has nothing
19859
+ * else to judge by.
19860
+ */
19861
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
19862
+ /**
19863
+ * Present when this event describes a detection the TRACKER refused, so it
19864
+ * has no track and never will.
19865
+ *
19866
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
19867
+ * NOW?"; tracking answers a different question ("is this the same subject as
19868
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
19869
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
19870
+ * seconds with three different candidate ids — seven analysed frames in the
19871
+ * window, the subject in a handful of them, metres apart — and produced no
19872
+ * event at all.
19873
+ *
19874
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
19875
+ * with no track and no reason is indistinguishable from a track whose media
19876
+ * went missing, and a consumer that asks this one for a best shot or a
19877
+ * history is asking for something that never existed.
19878
+ */
19879
+ spawnRefused: string().optional(),
19845
19880
  /** Omitted in slim projection. */
19846
19881
  state: TrackStateSchema.optional(),
19847
19882
  /**
@@ -20268,7 +20303,17 @@ var EventDensityBucketSchema = object({
20268
20303
  bucketStart: number(),
20269
20304
  motion: number().int(),
20270
20305
  object: number().int(),
20271
- audio: number().int()
20306
+ audio: number().int(),
20307
+ /**
20308
+ * Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
20309
+ * as opposed to `audio`, which is their COUNT (D431).
20310
+ *
20311
+ * ABSENT when the bucket holds no audio event. Absence means "nothing was
20312
+ * measured", which is not the same claim as silence, and a lane that cannot
20313
+ * tell them apart paints a quiet hour at full scale — which is exactly what
20314
+ * the count-on-a-level-meter did.
20315
+ */
20316
+ audioDbfs: number().optional()
20272
20317
  });
20273
20318
  /**
20274
20319
  * One camera's row in a `getEventDensityBatch` answer.
@@ -20915,6 +20960,60 @@ var NativeCropResultSchema = object({
20915
20960
  */
20916
20961
  tier: _enum(["native", "ram-fullframe"]).optional()
20917
20962
  });
20963
+ /**
20964
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
20965
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
20966
+ *
20967
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
20968
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
20969
+ * from, and what the detail plane's full-frame rung cuts from.
20970
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
20971
+ * window, cut by the runner at uncapped native resolution.
20972
+ *
20973
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
20974
+ */
20975
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
20976
+ /**
20977
+ * Why a park did NOT happen. Every one is logged on the runner with
20978
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
20979
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
20980
+ * never a reason to retry in a loop.
20981
+ *
20982
+ * - `handle-gone` — the native surface no longer resolves this handle (never
20983
+ * registered, past the lease bound, or the worker released it). `detail`
20984
+ * carries the runner's own miss reason.
20985
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
20986
+ */
20987
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
20988
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
20989
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20990
+ parked: literal(true),
20991
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
20992
+ nodeId: string(),
20993
+ width: number().int().positive(),
20994
+ height: number().int().positive(),
20995
+ /** JPEG bytes the parcel costs on the node. */
20996
+ bytes: number().int().nonnegative(),
20997
+ /** Whether this park replaced a parcel already held for the key. */
20998
+ replaced: boolean()
20999
+ }), object({
21000
+ parked: literal(false),
21001
+ nodeId: string(),
21002
+ reason: ParkRefusalSchema,
21003
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
21004
+ handleAgeMs: number().nullable(),
21005
+ detail: string().optional()
21006
+ })]);
21007
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
21008
+ var ParkedTrackFrameSchema = object({
21009
+ jpeg: string(),
21010
+ width: number().int().positive(),
21011
+ height: number().int().positive(),
21012
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
21013
+ timestamp: number(),
21014
+ /** When the node stored it (the node's clock). */
21015
+ parkedAt: number()
21016
+ });
20918
21017
  /** Parent detection context passed to `runDetailSubtree` — the crop's
20919
21018
  * originating detection, in FRAME-space coordinates. Reuses
20920
21019
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -21304,7 +21403,7 @@ var RunnerCameraConfigSchema = object({
21304
21403
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
21305
21404
  * analyzer providers) running on decoded frames in this runner.
21306
21405
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
21307
- * analytics, Frigate motion). The provider emits ProviderMotion
21406
+ * analytics). The provider emits ProviderMotion
21308
21407
  * events; the orchestrator forwards to `reportMotion`.
21309
21408
  */
21310
21409
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -21546,7 +21645,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21546
21645
  className: string(),
21547
21646
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
21548
21647
  sourceDeviceId: number()
21549
- }), RunStatelessStepResultSchema, { kind: "mutation" });
21648
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
21649
+ deviceId: number(),
21650
+ /** Opaque to the runner — the hub's track id. */
21651
+ trackId: string(),
21652
+ kind: ParkedFrameKindSchema,
21653
+ handle: FrameHandleSchema,
21654
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
21655
+ bbox: NativeCropBboxSchema,
21656
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
21657
+ maxWidth: number().int().positive().optional(),
21658
+ /** The frame instant (caller's clock) — orders parks for one key. */
21659
+ timestamp: number()
21660
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
21661
+ deviceId: number(),
21662
+ trackId: string(),
21663
+ kind: ParkedFrameKindSchema
21664
+ }), ParkedTrackFrameSchema.nullable()), method(object({
21665
+ deviceId: number(),
21666
+ trackId: string()
21667
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
21550
21668
  var CameraPipelineConfigSchema = object({
21551
21669
  engine: PipelineEngineChoiceSchema.optional(),
21552
21670
  steps: array(PipelineStepInputSchema).readonly(),
@@ -24688,8 +24806,8 @@ onStatusChanged: { data: object({
24688
24806
  /**
24689
24807
  * Runtime-state slice — every provider that registers this cap
24690
24808
  * stores the same shape under `device.runtimeState[battery]`.
24691
- * Cross-provider uniformity: a Reolink Argus, a Frigate sensor
24692
- * proxy, an ONVIF battery cam all read/write the same keys.
24809
+ * Cross-provider uniformity: a Reolink Argus, a sensor proxy,
24810
+ * an ONVIF battery cam all read/write the same keys.
24693
24811
  * Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
24694
24812
  * via `device.runtimeState.getCapState('battery')` regardless of
24695
24813
  * the underlying driver.
@@ -24839,7 +24957,7 @@ var buttonCapability = {
24839
24957
  *
24840
24958
  * Implementations:
24841
24959
  * - Each camera-providing addon registers this cap natively per
24842
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
24960
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
24843
24961
  * - Returns a snapshot from the persisted device config blob — no
24844
24962
  * extra round-trip to the camera, no probing.
24845
24963
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -26931,7 +27049,7 @@ var AvailableIntegrationTypeSchema = object({
26931
27049
  * Which integration-marker cap the addon declared, so the wizard can
26932
27050
  * branch on CAP — never on addon name. `device-adoption` integrations
26933
27051
  * (Home Assistant, …) route through the broker step (Approach A);
26934
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
27052
+ * `device-provider` integrations (Reolink/ONVIF) keep the
26935
27053
  * legacy config → discovery flow.
26936
27054
  */
26937
27055
  kind: _enum(["device-adoption", "device-provider"]),
@@ -30299,7 +30417,23 @@ var RecordingRangeSchema = object({
30299
30417
  });
30300
30418
  var RecordingAvailabilitySchema = object({
30301
30419
  deviceId: number(),
30302
- ranges: array(RecordingRangeSchema)
30420
+ ranges: array(RecordingRangeSchema),
30421
+ /**
30422
+ * Every profile this camera has footage in — not only the one `ranges`
30423
+ * describes (D433).
30424
+ *
30425
+ * `ranges` answers for ONE profile by design: the timeline is a single bar,
30426
+ * and enumerating all of them triples the directory reads for a bar that
30427
+ * would look identical. But the answer used to say nothing about that, so a
30428
+ * caller asking "what can I export?" read the single preferred profile as
30429
+ * the only one that exists — on this deployment every camera records `high`
30430
+ * AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
30431
+ * UI could not see it.
30432
+ *
30433
+ * Cheap: it is the same shallow directory read the profile CHOICE already
30434
+ * makes. Ask for a specific profile's ranges with the `profile` input.
30435
+ */
30436
+ profilesWithFootage: array(string())
30303
30437
  });
30304
30438
  var RecordingDaysSchema = object({
30305
30439
  deviceId: number(),
@@ -30325,7 +30459,11 @@ var RecordingDaysSchema = object({
30325
30459
  var RecordingAvailabilityForDeviceSchema = object({
30326
30460
  deviceId: number(),
30327
30461
  read: _enum(["read", "unreadable"]),
30328
- ranges: array(RecordingRangeSchema).readonly()
30462
+ ranges: array(RecordingRangeSchema).readonly(),
30463
+ /** Same field, same meaning, as the singular answer (D433). A row that
30464
+ * dropped it would tell a grid caller the archive holds one profile.
30465
+ * Empty on an `'unreadable'` row: nobody looked. */
30466
+ profilesWithFootage: array(string()).readonly()
30329
30467
  });
30330
30468
  /**
30331
30469
  * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
@@ -30355,13 +30493,31 @@ var RecordingManifestSchema = object({
30355
30493
  */
30356
30494
  playbackEndpoints: array(string())
30357
30495
  });
30358
- /** Recording storage usage for one camera (bytes on disk across all its
30359
- * profiles/subtrees/locations on this node). */
30496
+ /**
30497
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
30498
+ * across every profile and every resolvable location on this node.
30499
+ *
30500
+ * ## Archive vs residency, which is the whole point of this shape (D418)
30501
+ *
30502
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
30503
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
30504
+ * this camera writes to, so the two can be added up and compared.
30505
+ *
30506
+ * They were not always. Until D418 this row came from the recorder's in-RAM
30507
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
30508
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
30509
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
30510
+ * that said otherwise, and two people read it as retention eating recent
30511
+ * footage. Residency is still reported, under `residentBytes` /
30512
+ * `residentOldestMs`, which answer a different question and say so.
30513
+ */
30360
30514
  var RecordingDeviceUsageSchema = object({
30361
30515
  deviceId: number(),
30516
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
30517
+ * recordings locations. */
30362
30518
  usedBytes: number(),
30363
30519
  /**
30364
- * Start of this camera's OLDEST indexed segment, across every profile and
30520
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
30365
30521
  * location — the "Oldest footage" column in Recordings → Storage, and the
30366
30522
  * only honest answer to "is retention actually holding?" per camera.
30367
30523
  *
@@ -30371,7 +30527,24 @@ var RecordingDeviceUsageSchema = object({
30371
30527
  * (types) and the addon ship on different trains, and the addon is usually
30372
30528
  * the later of the two.
30373
30529
  */
30374
- oldestMs: number().nullable().optional()
30530
+ oldestMs: number().nullable().optional(),
30531
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
30532
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
30533
+ segments: number().optional(),
30534
+ /**
30535
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
30536
+ * its RAM index — the live tail plus the hours a reader hydrated.
30537
+ *
30538
+ * It answers "what can be served without touching the disk", never "how much
30539
+ * footage this camera has". A UI that renders it must label it as such, and
30540
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
30541
+ * it, and so does a node whose ledger could not answer.
30542
+ */
30543
+ residentBytes: number().optional(),
30544
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
30545
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
30546
+ * retention. `null` = nothing resident. */
30547
+ residentOldestMs: number().nullable().optional()
30375
30548
  });
30376
30549
  /** Recording storage usage + capacity for one storage location. */
30377
30550
  var RecordingLocationUsageSchema = object({
@@ -30409,6 +30582,17 @@ var RecordingStorageUsageSchema = object({
30409
30582
  totalUsedBytes: number(),
30410
30583
  devices: array(RecordingDeviceUsageSchema),
30411
30584
  /**
30585
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
30586
+ * disks (D418).
30587
+ *
30588
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
30589
+ * declared no ledger and the recorder REFUSED rather than answering the
30590
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
30591
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
30592
+ * and its rows are residency.
30593
+ */
30594
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
30595
+ /**
30412
30596
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
30413
30597
  * of the payload without it: the hub serves this method through a BAKED
30414
30598
  * router, so a hub whose framework train predates a change to this array
@@ -30569,7 +30753,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
30569
30753
  method(object({
30570
30754
  deviceId: number(),
30571
30755
  fromMs: number(),
30572
- toMs: number()
30756
+ toMs: number(),
30757
+ /**
30758
+ * Answer for THIS profile instead of the preferred one (D433). Absent
30759
+ * keeps the timeline's behaviour — one bar, one profile, one set of
30760
+ * reads. `profilesWithFootage` on the answer says what may be asked
30761
+ * for.
30762
+ */
30763
+ profile: string().optional()
30573
30764
  }), RecordingAvailabilitySchema, {
30574
30765
  kind: "query",
30575
30766
  auth: "protected"
@@ -34288,7 +34479,7 @@ function toDeviceSummary(device, addonId) {
34288
34479
  };
34289
34480
  }
34290
34481
  /**
34291
- * Base class for device-provider addons (rtsp, onvif, frigate).
34482
+ * Base class for device-provider addons (rtsp, onvif).
34292
34483
  *
34293
34484
  * Provides default implementations for the common device-provider cap
34294
34485
  * methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
@@ -38944,6 +39135,24 @@ Object.freeze({
38944
39135
  addonId: null,
38945
39136
  access: "view"
38946
39137
  },
39138
+ "pipelineRunner.getParkedTrackFrame": {
39139
+ capName: "pipeline-runner",
39140
+ capScope: "system",
39141
+ addonId: null,
39142
+ access: "view"
39143
+ },
39144
+ "pipelineRunner.parkTrackFrame": {
39145
+ capName: "pipeline-runner",
39146
+ capScope: "system",
39147
+ addonId: null,
39148
+ access: "create"
39149
+ },
39150
+ "pipelineRunner.releaseParkedTrackFrames": {
39151
+ capName: "pipeline-runner",
39152
+ capScope: "system",
39153
+ addonId: null,
39154
+ access: "create"
39155
+ },
38947
39156
  "pipelineRunner.reportMotion": {
38948
39157
  capName: "pipeline-runner",
38949
39158
  capScope: "system",
@@ -42221,6 +42430,21 @@ Object.freeze({
42221
42430
  form: "single",
42222
42431
  optional: false
42223
42432
  }],
42433
+ "pipelineRunner.getParkedTrackFrame": [{
42434
+ name: "deviceId",
42435
+ form: "single",
42436
+ optional: false
42437
+ }],
42438
+ "pipelineRunner.parkTrackFrame": [{
42439
+ name: "deviceId",
42440
+ form: "single",
42441
+ optional: false
42442
+ }],
42443
+ "pipelineRunner.releaseParkedTrackFrames": [{
42444
+ name: "deviceId",
42445
+ form: "single",
42446
+ optional: false
42447
+ }],
42224
42448
  "pipelineRunner.reportMotion": [{
42225
42449
  name: "deviceId",
42226
42450
  form: "single",
@@ -43119,7 +43343,7 @@ var PreviewTextField = string().max(200);
43119
43343
  * Whether the notification's preview is a STILL or a short animation.
43120
43344
  *
43121
43345
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
43122
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
43346
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
43123
43347
  * night reads better as three seconds of motion than as one frame of it. Both
43124
43348
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
43125
43349
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-CnLqLOKs.mjs
1
+ //#region ../types/dist/event-category-DAXzJeTX.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -590,7 +590,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
590
590
  * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
591
591
  */
592
592
  EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
593
- EventCategory["FrigateLiveEvent"] = "frigate.live-event";
594
593
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
595
594
  /**
596
595
  * Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
@@ -12896,7 +12895,7 @@ DeviceType.Camera;
12896
12895
  var SourceInfoSchema = object({
12897
12896
  /** Live dispatch key — mutable when the source system allows rename. */
12898
12897
  id: string(),
12899
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
12898
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
12900
12899
  system: string(),
12901
12900
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
12902
12901
  * Used to detect rename when `id` changes. */
@@ -12909,7 +12908,7 @@ var SourceInfoSchema = object({
12909
12908
  /**
12910
12909
  * Build the synthetic SourceInfo every existing provider falls back to
12911
12910
  * when no upstream value has been persisted. Keeps non-migrated providers
12912
- * (Reolink / Hikvision / ONVIF / Frigate / RTSP) functional without code
12911
+ * (Reolink / Hikvision / ONVIF / RTSP) functional without code
12913
12912
  * changes — `id` reuses the CamStack stableId, `system` reuses the addon
12914
12913
  * id. Real upstream identity replaces this once a provider migrates and
12915
12914
  * calls `updateSourceInfo()` with concrete values.
@@ -13658,7 +13657,7 @@ var deviceProviderCapability = {
13658
13657
  * - `device-management.router.ts` (deleted in Phase 2)
13659
13658
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
13660
13659
  *
13661
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
13660
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
13662
13661
  * fork into separate processes but never run on remote cluster agents. Therefore:
13663
13662
  * - No nodeId routing needed — this is a pure hub singleton.
13664
13663
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -17720,7 +17719,7 @@ var NcRuleInputSchema = object({
17720
17719
  * The measured seven-person arrival on device 590 spans 110 s with every
17721
17720
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
17722
17721
  * idle cutoff holds it as one and ends it when the arrival actually ends.
17723
- * 30 is Frigate's shipped value for the same decision.
17722
+ * 30 s is a widely shipped value for the same decision.
17724
17723
  *
17725
17724
  * ### What it replaces
17726
17725
  *
@@ -19818,6 +19817,13 @@ var ZoneCrossingSchema = object({
19818
19817
  /** Zone display name at crossing time (falls back to the id). */
19819
19818
  zoneName: string().optional()
19820
19819
  });
19820
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
19821
+ var ZoneOverlapSchema = object({
19822
+ zoneId: string(),
19823
+ zoneName: string().optional(),
19824
+ /** Percentage of the BOX area inside the zone, 0–100. */
19825
+ overlapPct: number()
19826
+ });
19821
19827
  var ObjectEventSchema = object({
19822
19828
  ...BaseEventFields,
19823
19829
  kind: literal("object"),
@@ -19842,6 +19848,35 @@ var ObjectEventSchema = object({
19842
19848
  bbox: BoundingBoxSchema.optional(),
19843
19849
  /** Heavy JSON — omitted in slim projection. */
19844
19850
  zones: array(string()).readonly().optional(),
19851
+ /**
19852
+ * How far inside each stamped zone the box actually was, as a percentage of
19853
+ * the BOX area.
19854
+ *
19855
+ * Membership alone cannot express "at least a third of it inside", which is
19856
+ * the bar an operator argues with — and the number already existed: the
19857
+ * engine computed it, the pipeline logged it, and then discarded it. It
19858
+ * matters most on the events that carry no track, where a rule has nothing
19859
+ * else to judge by.
19860
+ */
19861
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
19862
+ /**
19863
+ * Present when this event describes a detection the TRACKER refused, so it
19864
+ * has no track and never will.
19865
+ *
19866
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
19867
+ * NOW?"; tracking answers a different question ("is this the same subject as
19868
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
19869
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
19870
+ * seconds with three different candidate ids — seven analysed frames in the
19871
+ * window, the subject in a handful of them, metres apart — and produced no
19872
+ * event at all.
19873
+ *
19874
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
19875
+ * with no track and no reason is indistinguishable from a track whose media
19876
+ * went missing, and a consumer that asks this one for a best shot or a
19877
+ * history is asking for something that never existed.
19878
+ */
19879
+ spawnRefused: string().optional(),
19845
19880
  /** Omitted in slim projection. */
19846
19881
  state: TrackStateSchema.optional(),
19847
19882
  /**
@@ -20268,7 +20303,17 @@ var EventDensityBucketSchema = object({
20268
20303
  bucketStart: number(),
20269
20304
  motion: number().int(),
20270
20305
  object: number().int(),
20271
- audio: number().int()
20306
+ audio: number().int(),
20307
+ /**
20308
+ * Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
20309
+ * as opposed to `audio`, which is their COUNT (D431).
20310
+ *
20311
+ * ABSENT when the bucket holds no audio event. Absence means "nothing was
20312
+ * measured", which is not the same claim as silence, and a lane that cannot
20313
+ * tell them apart paints a quiet hour at full scale — which is exactly what
20314
+ * the count-on-a-level-meter did.
20315
+ */
20316
+ audioDbfs: number().optional()
20272
20317
  });
20273
20318
  /**
20274
20319
  * One camera's row in a `getEventDensityBatch` answer.
@@ -20915,6 +20960,60 @@ var NativeCropResultSchema = object({
20915
20960
  */
20916
20961
  tier: _enum(["native", "ram-fullframe"]).optional()
20917
20962
  });
20963
+ /**
20964
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
20965
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
20966
+ *
20967
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
20968
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
20969
+ * from, and what the detail plane's full-frame rung cuts from.
20970
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
20971
+ * window, cut by the runner at uncapped native resolution.
20972
+ *
20973
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
20974
+ */
20975
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
20976
+ /**
20977
+ * Why a park did NOT happen. Every one is logged on the runner with
20978
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
20979
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
20980
+ * never a reason to retry in a loop.
20981
+ *
20982
+ * - `handle-gone` — the native surface no longer resolves this handle (never
20983
+ * registered, past the lease bound, or the worker released it). `detail`
20984
+ * carries the runner's own miss reason.
20985
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
20986
+ */
20987
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
20988
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
20989
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20990
+ parked: literal(true),
20991
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
20992
+ nodeId: string(),
20993
+ width: number().int().positive(),
20994
+ height: number().int().positive(),
20995
+ /** JPEG bytes the parcel costs on the node. */
20996
+ bytes: number().int().nonnegative(),
20997
+ /** Whether this park replaced a parcel already held for the key. */
20998
+ replaced: boolean()
20999
+ }), object({
21000
+ parked: literal(false),
21001
+ nodeId: string(),
21002
+ reason: ParkRefusalSchema,
21003
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
21004
+ handleAgeMs: number().nullable(),
21005
+ detail: string().optional()
21006
+ })]);
21007
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
21008
+ var ParkedTrackFrameSchema = object({
21009
+ jpeg: string(),
21010
+ width: number().int().positive(),
21011
+ height: number().int().positive(),
21012
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
21013
+ timestamp: number(),
21014
+ /** When the node stored it (the node's clock). */
21015
+ parkedAt: number()
21016
+ });
20918
21017
  /** Parent detection context passed to `runDetailSubtree` — the crop's
20919
21018
  * originating detection, in FRAME-space coordinates. Reuses
20920
21019
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -21304,7 +21403,7 @@ var RunnerCameraConfigSchema = object({
21304
21403
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
21305
21404
  * analyzer providers) running on decoded frames in this runner.
21306
21405
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
21307
- * analytics, Frigate motion). The provider emits ProviderMotion
21406
+ * analytics). The provider emits ProviderMotion
21308
21407
  * events; the orchestrator forwards to `reportMotion`.
21309
21408
  */
21310
21409
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -21546,7 +21645,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21546
21645
  className: string(),
21547
21646
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
21548
21647
  sourceDeviceId: number()
21549
- }), RunStatelessStepResultSchema, { kind: "mutation" });
21648
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
21649
+ deviceId: number(),
21650
+ /** Opaque to the runner — the hub's track id. */
21651
+ trackId: string(),
21652
+ kind: ParkedFrameKindSchema,
21653
+ handle: FrameHandleSchema,
21654
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
21655
+ bbox: NativeCropBboxSchema,
21656
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
21657
+ maxWidth: number().int().positive().optional(),
21658
+ /** The frame instant (caller's clock) — orders parks for one key. */
21659
+ timestamp: number()
21660
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
21661
+ deviceId: number(),
21662
+ trackId: string(),
21663
+ kind: ParkedFrameKindSchema
21664
+ }), ParkedTrackFrameSchema.nullable()), method(object({
21665
+ deviceId: number(),
21666
+ trackId: string()
21667
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
21550
21668
  var CameraPipelineConfigSchema = object({
21551
21669
  engine: PipelineEngineChoiceSchema.optional(),
21552
21670
  steps: array(PipelineStepInputSchema).readonly(),
@@ -24688,8 +24806,8 @@ onStatusChanged: { data: object({
24688
24806
  /**
24689
24807
  * Runtime-state slice — every provider that registers this cap
24690
24808
  * stores the same shape under `device.runtimeState[battery]`.
24691
- * Cross-provider uniformity: a Reolink Argus, a Frigate sensor
24692
- * proxy, an ONVIF battery cam all read/write the same keys.
24809
+ * Cross-provider uniformity: a Reolink Argus, a sensor proxy,
24810
+ * an ONVIF battery cam all read/write the same keys.
24693
24811
  * Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
24694
24812
  * via `device.runtimeState.getCapState('battery')` regardless of
24695
24813
  * the underlying driver.
@@ -24839,7 +24957,7 @@ var buttonCapability = {
24839
24957
  *
24840
24958
  * Implementations:
24841
24959
  * - Each camera-providing addon registers this cap natively per
24842
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
24960
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
24843
24961
  * - Returns a snapshot from the persisted device config blob — no
24844
24962
  * extra round-trip to the camera, no probing.
24845
24963
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -26931,7 +27049,7 @@ var AvailableIntegrationTypeSchema = object({
26931
27049
  * Which integration-marker cap the addon declared, so the wizard can
26932
27050
  * branch on CAP — never on addon name. `device-adoption` integrations
26933
27051
  * (Home Assistant, …) route through the broker step (Approach A);
26934
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
27052
+ * `device-provider` integrations (Reolink/ONVIF) keep the
26935
27053
  * legacy config → discovery flow.
26936
27054
  */
26937
27055
  kind: _enum(["device-adoption", "device-provider"]),
@@ -30299,7 +30417,23 @@ var RecordingRangeSchema = object({
30299
30417
  });
30300
30418
  var RecordingAvailabilitySchema = object({
30301
30419
  deviceId: number(),
30302
- ranges: array(RecordingRangeSchema)
30420
+ ranges: array(RecordingRangeSchema),
30421
+ /**
30422
+ * Every profile this camera has footage in — not only the one `ranges`
30423
+ * describes (D433).
30424
+ *
30425
+ * `ranges` answers for ONE profile by design: the timeline is a single bar,
30426
+ * and enumerating all of them triples the directory reads for a bar that
30427
+ * would look identical. But the answer used to say nothing about that, so a
30428
+ * caller asking "what can I export?" read the single preferred profile as
30429
+ * the only one that exists — on this deployment every camera records `high`
30430
+ * AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
30431
+ * UI could not see it.
30432
+ *
30433
+ * Cheap: it is the same shallow directory read the profile CHOICE already
30434
+ * makes. Ask for a specific profile's ranges with the `profile` input.
30435
+ */
30436
+ profilesWithFootage: array(string())
30303
30437
  });
30304
30438
  var RecordingDaysSchema = object({
30305
30439
  deviceId: number(),
@@ -30325,7 +30459,11 @@ var RecordingDaysSchema = object({
30325
30459
  var RecordingAvailabilityForDeviceSchema = object({
30326
30460
  deviceId: number(),
30327
30461
  read: _enum(["read", "unreadable"]),
30328
- ranges: array(RecordingRangeSchema).readonly()
30462
+ ranges: array(RecordingRangeSchema).readonly(),
30463
+ /** Same field, same meaning, as the singular answer (D433). A row that
30464
+ * dropped it would tell a grid caller the archive holds one profile.
30465
+ * Empty on an `'unreadable'` row: nobody looked. */
30466
+ profilesWithFootage: array(string()).readonly()
30329
30467
  });
30330
30468
  /**
30331
30469
  * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
@@ -30355,13 +30493,31 @@ var RecordingManifestSchema = object({
30355
30493
  */
30356
30494
  playbackEndpoints: array(string())
30357
30495
  });
30358
- /** Recording storage usage for one camera (bytes on disk across all its
30359
- * profiles/subtrees/locations on this node). */
30496
+ /**
30497
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
30498
+ * across every profile and every resolvable location on this node.
30499
+ *
30500
+ * ## Archive vs residency, which is the whole point of this shape (D418)
30501
+ *
30502
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
30503
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
30504
+ * this camera writes to, so the two can be added up and compared.
30505
+ *
30506
+ * They were not always. Until D418 this row came from the recorder's in-RAM
30507
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
30508
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
30509
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
30510
+ * that said otherwise, and two people read it as retention eating recent
30511
+ * footage. Residency is still reported, under `residentBytes` /
30512
+ * `residentOldestMs`, which answer a different question and say so.
30513
+ */
30360
30514
  var RecordingDeviceUsageSchema = object({
30361
30515
  deviceId: number(),
30516
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
30517
+ * recordings locations. */
30362
30518
  usedBytes: number(),
30363
30519
  /**
30364
- * Start of this camera's OLDEST indexed segment, across every profile and
30520
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
30365
30521
  * location — the "Oldest footage" column in Recordings → Storage, and the
30366
30522
  * only honest answer to "is retention actually holding?" per camera.
30367
30523
  *
@@ -30371,7 +30527,24 @@ var RecordingDeviceUsageSchema = object({
30371
30527
  * (types) and the addon ship on different trains, and the addon is usually
30372
30528
  * the later of the two.
30373
30529
  */
30374
- oldestMs: number().nullable().optional()
30530
+ oldestMs: number().nullable().optional(),
30531
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
30532
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
30533
+ segments: number().optional(),
30534
+ /**
30535
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
30536
+ * its RAM index — the live tail plus the hours a reader hydrated.
30537
+ *
30538
+ * It answers "what can be served without touching the disk", never "how much
30539
+ * footage this camera has". A UI that renders it must label it as such, and
30540
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
30541
+ * it, and so does a node whose ledger could not answer.
30542
+ */
30543
+ residentBytes: number().optional(),
30544
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
30545
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
30546
+ * retention. `null` = nothing resident. */
30547
+ residentOldestMs: number().nullable().optional()
30375
30548
  });
30376
30549
  /** Recording storage usage + capacity for one storage location. */
30377
30550
  var RecordingLocationUsageSchema = object({
@@ -30409,6 +30582,17 @@ var RecordingStorageUsageSchema = object({
30409
30582
  totalUsedBytes: number(),
30410
30583
  devices: array(RecordingDeviceUsageSchema),
30411
30584
  /**
30585
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
30586
+ * disks (D418).
30587
+ *
30588
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
30589
+ * declared no ledger and the recorder REFUSED rather than answering the
30590
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
30591
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
30592
+ * and its rows are residency.
30593
+ */
30594
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
30595
+ /**
30412
30596
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
30413
30597
  * of the payload without it: the hub serves this method through a BAKED
30414
30598
  * router, so a hub whose framework train predates a change to this array
@@ -30569,7 +30753,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
30569
30753
  method(object({
30570
30754
  deviceId: number(),
30571
30755
  fromMs: number(),
30572
- toMs: number()
30756
+ toMs: number(),
30757
+ /**
30758
+ * Answer for THIS profile instead of the preferred one (D433). Absent
30759
+ * keeps the timeline's behaviour — one bar, one profile, one set of
30760
+ * reads. `profilesWithFootage` on the answer says what may be asked
30761
+ * for.
30762
+ */
30763
+ profile: string().optional()
30573
30764
  }), RecordingAvailabilitySchema, {
30574
30765
  kind: "query",
30575
30766
  auth: "protected"
@@ -34288,7 +34479,7 @@ function toDeviceSummary(device, addonId) {
34288
34479
  };
34289
34480
  }
34290
34481
  /**
34291
- * Base class for device-provider addons (rtsp, onvif, frigate).
34482
+ * Base class for device-provider addons (rtsp, onvif).
34292
34483
  *
34293
34484
  * Provides default implementations for the common device-provider cap
34294
34485
  * methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
@@ -38944,6 +39135,24 @@ Object.freeze({
38944
39135
  addonId: null,
38945
39136
  access: "view"
38946
39137
  },
39138
+ "pipelineRunner.getParkedTrackFrame": {
39139
+ capName: "pipeline-runner",
39140
+ capScope: "system",
39141
+ addonId: null,
39142
+ access: "view"
39143
+ },
39144
+ "pipelineRunner.parkTrackFrame": {
39145
+ capName: "pipeline-runner",
39146
+ capScope: "system",
39147
+ addonId: null,
39148
+ access: "create"
39149
+ },
39150
+ "pipelineRunner.releaseParkedTrackFrames": {
39151
+ capName: "pipeline-runner",
39152
+ capScope: "system",
39153
+ addonId: null,
39154
+ access: "create"
39155
+ },
38947
39156
  "pipelineRunner.reportMotion": {
38948
39157
  capName: "pipeline-runner",
38949
39158
  capScope: "system",
@@ -42221,6 +42430,21 @@ Object.freeze({
42221
42430
  form: "single",
42222
42431
  optional: false
42223
42432
  }],
42433
+ "pipelineRunner.getParkedTrackFrame": [{
42434
+ name: "deviceId",
42435
+ form: "single",
42436
+ optional: false
42437
+ }],
42438
+ "pipelineRunner.parkTrackFrame": [{
42439
+ name: "deviceId",
42440
+ form: "single",
42441
+ optional: false
42442
+ }],
42443
+ "pipelineRunner.releaseParkedTrackFrames": [{
42444
+ name: "deviceId",
42445
+ form: "single",
42446
+ optional: false
42447
+ }],
42224
42448
  "pipelineRunner.reportMotion": [{
42225
42449
  name: "deviceId",
42226
42450
  form: "single",
@@ -43119,7 +43343,7 @@ var PreviewTextField = string().max(200);
43119
43343
  * Whether the notification's preview is a STILL or a short animation.
43120
43344
  *
43121
43345
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
43122
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
43346
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
43123
43347
  * night reads better as three seconds of motion than as one frame of it. Both
43124
43348
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
43125
43349
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-Ds45JTMq.js");
6
+ const require_dist = require("../dist-43pNXXbY.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/ha-export/topics.ts
9
9
  /**
@@ -2756,6 +2756,18 @@ function capEntitySpecs(capName) {
2756
2756
  return specs;
2757
2757
  }
2758
2758
  var CAPS_NOT_EXPORTED = [
2759
+ {
2760
+ cap: "network-link",
2761
+ reason: "Already exported, imperatively: the device catalog pushes a `Network link` sensor and a `Signal` percentage sensor for any device carrying the slice. A CAP_ENTITY_MAP row would produce a THIRD entity from the same slice, and the cap needs two entities from one slice (a link type and a percentage that is null on a wired link) which a single mapping row cannot express."
2762
+ },
2763
+ {
2764
+ cap: "recording-signal",
2765
+ reason: "A signal ABOUT the recorder, not a state of the device: it says whether this camera's footage is being written and why not when it is not. Home Assistant would carry it as a property of the camera the operator is looking at, and the camera catalog does not model the recorder — exporting it here would put a CamStack-internal reason string on a device entity nothing in HA can act on."
2766
+ },
2767
+ {
2768
+ cap: "navigation",
2769
+ reason: "Rooms, zones and a map for a robot: a spatial surface with no Home Assistant entity shape. HA models a vacuum as a `vacuum` entity with commands, which `vacuum-control` already provides; the map behind it is drawn by the CamStack UI and has no projection that survives being flattened into a state string."
2770
+ },
2759
2771
  {
2760
2772
  cap: "snapshot",
2761
2773
  reason: "Carried by the camera catalog as `last_image`; a second image entity from the cap would duplicate it."
@@ -1,4 +1,4 @@
1
- import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-4WKeNf6a.mjs";
1
+ import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-Z8ugPi01.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  //#region src/ha-export/topics.ts
4
4
  /**
@@ -2751,6 +2751,18 @@ function capEntitySpecs(capName) {
2751
2751
  return specs;
2752
2752
  }
2753
2753
  var CAPS_NOT_EXPORTED = [
2754
+ {
2755
+ cap: "network-link",
2756
+ reason: "Already exported, imperatively: the device catalog pushes a `Network link` sensor and a `Signal` percentage sensor for any device carrying the slice. A CAP_ENTITY_MAP row would produce a THIRD entity from the same slice, and the cap needs two entities from one slice (a link type and a percentage that is null on a wired link) which a single mapping row cannot express."
2757
+ },
2758
+ {
2759
+ cap: "recording-signal",
2760
+ reason: "A signal ABOUT the recorder, not a state of the device: it says whether this camera's footage is being written and why not when it is not. Home Assistant would carry it as a property of the camera the operator is looking at, and the camera catalog does not model the recorder — exporting it here would put a CamStack-internal reason string on a device entity nothing in HA can act on."
2761
+ },
2762
+ {
2763
+ cap: "navigation",
2764
+ reason: "Rooms, zones and a map for a robot: a spatial surface with no Home Assistant entity shape. HA models a vacuum as a `vacuum` entity with commands, which `vacuum-control` already provides; the map behind it is drawn by the CamStack UI and has no projection that survives being flattened into a state string."
2765
+ },
2754
2766
  {
2755
2767
  cap: "snapshot",
2756
2768
  reason: "Carried by the camera catalog as `last_image`; a second image entity from the cap would duplicate it."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.106",
3
+ "version": "1.2.109",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",