@camstack/addon-provider-velux 0.2.90 → 0.2.92

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 +205 -18
  2. package/dist/addon.mjs +205 -18
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region ../types/dist/event-category-CnLqLOKs.mjs
2
+ //#region ../types/dist/event-category-DAXzJeTX.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -591,7 +591,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
591
591
  * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
592
592
  */
593
593
  EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
594
- EventCategory["FrigateLiveEvent"] = "frigate.live-event";
595
594
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
596
595
  /**
597
596
  * Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
@@ -12625,7 +12624,7 @@ DeviceType.Camera;
12625
12624
  var SourceInfoSchema = object({
12626
12625
  /** Live dispatch key — mutable when the source system allows rename. */
12627
12626
  id: string(),
12628
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
12627
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
12629
12628
  system: string(),
12630
12629
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
12631
12630
  * Used to detect rename when `id` changes. */
@@ -12638,7 +12637,7 @@ var SourceInfoSchema = object({
12638
12637
  /**
12639
12638
  * Build the synthetic SourceInfo every existing provider falls back to
12640
12639
  * when no upstream value has been persisted. Keeps non-migrated providers
12641
- * (Reolink / Hikvision / ONVIF / Frigate / RTSP) functional without code
12640
+ * (Reolink / Hikvision / ONVIF / RTSP) functional without code
12642
12641
  * changes — `id` reuses the CamStack stableId, `system` reuses the addon
12643
12642
  * id. Real upstream identity replaces this once a provider migrates and
12644
12643
  * calls `updateSourceInfo()` with concrete values.
@@ -13300,7 +13299,7 @@ var deviceProviderCapability = {
13300
13299
  * - `device-management.router.ts` (deleted in Phase 2)
13301
13300
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
13302
13301
  *
13303
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
13302
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
13304
13303
  * fork into separate processes but never run on remote cluster agents. Therefore:
13305
13304
  * - No nodeId routing needed — this is a pure hub singleton.
13306
13305
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -17348,7 +17347,7 @@ var NcRuleInputSchema = object({
17348
17347
  * The measured seven-person arrival on device 590 spans 110 s with every
17349
17348
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
17350
17349
  * idle cutoff holds it as one and ends it when the arrival actually ends.
17351
- * 30 is Frigate's shipped value for the same decision.
17350
+ * 30 s is a widely shipped value for the same decision.
17352
17351
  *
17353
17352
  * ### What it replaces
17354
17353
  *
@@ -19430,6 +19429,13 @@ var ZoneCrossingSchema = object({
19430
19429
  /** Zone display name at crossing time (falls back to the id). */
19431
19430
  zoneName: string().optional()
19432
19431
  });
19432
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
19433
+ var ZoneOverlapSchema = object({
19434
+ zoneId: string(),
19435
+ zoneName: string().optional(),
19436
+ /** Percentage of the BOX area inside the zone, 0–100. */
19437
+ overlapPct: number()
19438
+ });
19433
19439
  var ObjectEventSchema = object({
19434
19440
  ...BaseEventFields,
19435
19441
  kind: literal("object"),
@@ -19454,6 +19460,35 @@ var ObjectEventSchema = object({
19454
19460
  bbox: BoundingBoxSchema.optional(),
19455
19461
  /** Heavy JSON — omitted in slim projection. */
19456
19462
  zones: array(string()).readonly().optional(),
19463
+ /**
19464
+ * How far inside each stamped zone the box actually was, as a percentage of
19465
+ * the BOX area.
19466
+ *
19467
+ * Membership alone cannot express "at least a third of it inside", which is
19468
+ * the bar an operator argues with — and the number already existed: the
19469
+ * engine computed it, the pipeline logged it, and then discarded it. It
19470
+ * matters most on the events that carry no track, where a rule has nothing
19471
+ * else to judge by.
19472
+ */
19473
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
19474
+ /**
19475
+ * Present when this event describes a detection the TRACKER refused, so it
19476
+ * has no track and never will.
19477
+ *
19478
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
19479
+ * NOW?"; tracking answers a different question ("is this the same subject as
19480
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
19481
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
19482
+ * seconds with three different candidate ids — seven analysed frames in the
19483
+ * window, the subject in a handful of them, metres apart — and produced no
19484
+ * event at all.
19485
+ *
19486
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
19487
+ * with no track and no reason is indistinguishable from a track whose media
19488
+ * went missing, and a consumer that asks this one for a best shot or a
19489
+ * history is asking for something that never existed.
19490
+ */
19491
+ spawnRefused: string().optional(),
19457
19492
  /** Omitted in slim projection. */
19458
19493
  state: TrackStateSchema.optional(),
19459
19494
  /**
@@ -20527,6 +20562,60 @@ var NativeCropResultSchema = object({
20527
20562
  */
20528
20563
  tier: _enum(["native", "ram-fullframe"]).optional()
20529
20564
  });
20565
+ /**
20566
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
20567
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
20568
+ *
20569
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
20570
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
20571
+ * from, and what the detail plane's full-frame rung cuts from.
20572
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
20573
+ * window, cut by the runner at uncapped native resolution.
20574
+ *
20575
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
20576
+ */
20577
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
20578
+ /**
20579
+ * Why a park did NOT happen. Every one is logged on the runner with
20580
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
20581
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
20582
+ * never a reason to retry in a loop.
20583
+ *
20584
+ * - `handle-gone` — the native surface no longer resolves this handle (never
20585
+ * registered, past the lease bound, or the worker released it). `detail`
20586
+ * carries the runner's own miss reason.
20587
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
20588
+ */
20589
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
20590
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
20591
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20592
+ parked: literal(true),
20593
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
20594
+ nodeId: string(),
20595
+ width: number().int().positive(),
20596
+ height: number().int().positive(),
20597
+ /** JPEG bytes the parcel costs on the node. */
20598
+ bytes: number().int().nonnegative(),
20599
+ /** Whether this park replaced a parcel already held for the key. */
20600
+ replaced: boolean()
20601
+ }), object({
20602
+ parked: literal(false),
20603
+ nodeId: string(),
20604
+ reason: ParkRefusalSchema,
20605
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
20606
+ handleAgeMs: number().nullable(),
20607
+ detail: string().optional()
20608
+ })]);
20609
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
20610
+ var ParkedTrackFrameSchema = object({
20611
+ jpeg: string(),
20612
+ width: number().int().positive(),
20613
+ height: number().int().positive(),
20614
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
20615
+ timestamp: number(),
20616
+ /** When the node stored it (the node's clock). */
20617
+ parkedAt: number()
20618
+ });
20530
20619
  /** Parent detection context passed to `runDetailSubtree` — the crop's
20531
20620
  * originating detection, in FRAME-space coordinates. Reuses
20532
20621
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -20916,7 +21005,7 @@ var RunnerCameraConfigSchema = object({
20916
21005
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
20917
21006
  * analyzer providers) running on decoded frames in this runner.
20918
21007
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
20919
- * analytics, Frigate motion). The provider emits ProviderMotion
21008
+ * analytics). The provider emits ProviderMotion
20920
21009
  * events; the orchestrator forwards to `reportMotion`.
20921
21010
  */
20922
21011
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -21158,7 +21247,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21158
21247
  className: string(),
21159
21248
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
21160
21249
  sourceDeviceId: number()
21161
- }), RunStatelessStepResultSchema, { kind: "mutation" });
21250
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
21251
+ deviceId: number(),
21252
+ /** Opaque to the runner — the hub's track id. */
21253
+ trackId: string(),
21254
+ kind: ParkedFrameKindSchema,
21255
+ handle: FrameHandleSchema,
21256
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
21257
+ bbox: NativeCropBboxSchema,
21258
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
21259
+ maxWidth: number().int().positive().optional(),
21260
+ /** The frame instant (caller's clock) — orders parks for one key. */
21261
+ timestamp: number()
21262
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
21263
+ deviceId: number(),
21264
+ trackId: string(),
21265
+ kind: ParkedFrameKindSchema
21266
+ }), ParkedTrackFrameSchema.nullable()), method(object({
21267
+ deviceId: number(),
21268
+ trackId: string()
21269
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
21162
21270
  var CameraPipelineConfigSchema = object({
21163
21271
  engine: PipelineEngineChoiceSchema.optional(),
21164
21272
  steps: array(PipelineStepInputSchema).readonly(),
@@ -24228,8 +24336,8 @@ onStatusChanged: { data: object({
24228
24336
  /**
24229
24337
  * Runtime-state slice — every provider that registers this cap
24230
24338
  * stores the same shape under `device.runtimeState[battery]`.
24231
- * Cross-provider uniformity: a Reolink Argus, a Frigate sensor
24232
- * proxy, an ONVIF battery cam all read/write the same keys.
24339
+ * Cross-provider uniformity: a Reolink Argus, a sensor proxy,
24340
+ * an ONVIF battery cam all read/write the same keys.
24233
24341
  * Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
24234
24342
  * via `device.runtimeState.getCapState('battery')` regardless of
24235
24343
  * the underlying driver.
@@ -24362,7 +24470,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
24362
24470
  *
24363
24471
  * Implementations:
24364
24472
  * - Each camera-providing addon registers this cap natively per
24365
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
24473
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
24366
24474
  * - Returns a snapshot from the persisted device config blob — no
24367
24475
  * extra round-trip to the camera, no probing.
24368
24476
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -26454,7 +26562,7 @@ var AvailableIntegrationTypeSchema = object({
26454
26562
  * Which integration-marker cap the addon declared, so the wizard can
26455
26563
  * branch on CAP — never on addon name. `device-adoption` integrations
26456
26564
  * (Home Assistant, …) route through the broker step (Approach A);
26457
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
26565
+ * `device-provider` integrations (Reolink/ONVIF) keep the
26458
26566
  * legacy config → discovery flow.
26459
26567
  */
26460
26568
  kind: _enum(["device-adoption", "device-provider"]),
@@ -29878,13 +29986,31 @@ var RecordingManifestSchema = object({
29878
29986
  */
29879
29987
  playbackEndpoints: array(string())
29880
29988
  });
29881
- /** Recording storage usage for one camera (bytes on disk across all its
29882
- * profiles/subtrees/locations on this node). */
29989
+ /**
29990
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
29991
+ * across every profile and every resolvable location on this node.
29992
+ *
29993
+ * ## Archive vs residency, which is the whole point of this shape (D418)
29994
+ *
29995
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
29996
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
29997
+ * this camera writes to, so the two can be added up and compared.
29998
+ *
29999
+ * They were not always. Until D418 this row came from the recorder's in-RAM
30000
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
30001
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
30002
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
30003
+ * that said otherwise, and two people read it as retention eating recent
30004
+ * footage. Residency is still reported, under `residentBytes` /
30005
+ * `residentOldestMs`, which answer a different question and say so.
30006
+ */
29883
30007
  var RecordingDeviceUsageSchema = object({
29884
30008
  deviceId: number(),
30009
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
30010
+ * recordings locations. */
29885
30011
  usedBytes: number(),
29886
30012
  /**
29887
- * Start of this camera's OLDEST indexed segment, across every profile and
30013
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
29888
30014
  * location — the "Oldest footage" column in Recordings → Storage, and the
29889
30015
  * only honest answer to "is retention actually holding?" per camera.
29890
30016
  *
@@ -29894,7 +30020,24 @@ var RecordingDeviceUsageSchema = object({
29894
30020
  * (types) and the addon ship on different trains, and the addon is usually
29895
30021
  * the later of the two.
29896
30022
  */
29897
- oldestMs: number().nullable().optional()
30023
+ oldestMs: number().nullable().optional(),
30024
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
30025
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
30026
+ segments: number().optional(),
30027
+ /**
30028
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
30029
+ * its RAM index — the live tail plus the hours a reader hydrated.
30030
+ *
30031
+ * It answers "what can be served without touching the disk", never "how much
30032
+ * footage this camera has". A UI that renders it must label it as such, and
30033
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
30034
+ * it, and so does a node whose ledger could not answer.
30035
+ */
30036
+ residentBytes: number().optional(),
30037
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
30038
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
30039
+ * retention. `null` = nothing resident. */
30040
+ residentOldestMs: number().nullable().optional()
29898
30041
  });
29899
30042
  /** Recording storage usage + capacity for one storage location. */
29900
30043
  var RecordingLocationUsageSchema = object({
@@ -29932,6 +30075,17 @@ var RecordingStorageUsageSchema = object({
29932
30075
  totalUsedBytes: number(),
29933
30076
  devices: array(RecordingDeviceUsageSchema),
29934
30077
  /**
30078
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
30079
+ * disks (D418).
30080
+ *
30081
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
30082
+ * declared no ledger and the recorder REFUSED rather than answering the
30083
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
30084
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
30085
+ * and its rows are residency.
30086
+ */
30087
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
30088
+ /**
29935
30089
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
29936
30090
  * of the payload without it: the hub serves this method through a BAKED
29937
30091
  * router, so a hub whose framework train predates a change to this array
@@ -33811,7 +33965,7 @@ function toDeviceSummary(device, addonId) {
33811
33965
  };
33812
33966
  }
33813
33967
  /**
33814
- * Base class for device-provider addons (rtsp, onvif, frigate).
33968
+ * Base class for device-provider addons (rtsp, onvif).
33815
33969
  *
33816
33970
  * Provides default implementations for the common device-provider cap
33817
33971
  * methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
@@ -38467,6 +38621,24 @@ Object.freeze({
38467
38621
  addonId: null,
38468
38622
  access: "view"
38469
38623
  },
38624
+ "pipelineRunner.getParkedTrackFrame": {
38625
+ capName: "pipeline-runner",
38626
+ capScope: "system",
38627
+ addonId: null,
38628
+ access: "view"
38629
+ },
38630
+ "pipelineRunner.parkTrackFrame": {
38631
+ capName: "pipeline-runner",
38632
+ capScope: "system",
38633
+ addonId: null,
38634
+ access: "create"
38635
+ },
38636
+ "pipelineRunner.releaseParkedTrackFrames": {
38637
+ capName: "pipeline-runner",
38638
+ capScope: "system",
38639
+ addonId: null,
38640
+ access: "create"
38641
+ },
38470
38642
  "pipelineRunner.reportMotion": {
38471
38643
  capName: "pipeline-runner",
38472
38644
  capScope: "system",
@@ -41744,6 +41916,21 @@ Object.freeze({
41744
41916
  form: "single",
41745
41917
  optional: false
41746
41918
  }],
41919
+ "pipelineRunner.getParkedTrackFrame": [{
41920
+ name: "deviceId",
41921
+ form: "single",
41922
+ optional: false
41923
+ }],
41924
+ "pipelineRunner.parkTrackFrame": [{
41925
+ name: "deviceId",
41926
+ form: "single",
41927
+ optional: false
41928
+ }],
41929
+ "pipelineRunner.releaseParkedTrackFrames": [{
41930
+ name: "deviceId",
41931
+ form: "single",
41932
+ optional: false
41933
+ }],
41747
41934
  "pipelineRunner.reportMotion": [{
41748
41935
  name: "deviceId",
41749
41936
  form: "single",
@@ -42435,7 +42622,7 @@ var PreviewTextField = string().max(200);
42435
42622
  * Whether the notification's preview is a STILL or a short animation.
42436
42623
  *
42437
42624
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
42438
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
42625
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
42439
42626
  * night reads better as three seconds of motion than as one frame of it. Both
42440
42627
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
42441
42628
  * simply applies it to a dozen frames sampled across the render and assembles
package/dist/addon.mjs CHANGED
@@ -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.
@@ -12624,7 +12623,7 @@ DeviceType.Camera;
12624
12623
  var SourceInfoSchema = object({
12625
12624
  /** Live dispatch key — mutable when the source system allows rename. */
12626
12625
  id: string(),
12627
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
12626
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
12628
12627
  system: string(),
12629
12628
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
12630
12629
  * Used to detect rename when `id` changes. */
@@ -12637,7 +12636,7 @@ var SourceInfoSchema = object({
12637
12636
  /**
12638
12637
  * Build the synthetic SourceInfo every existing provider falls back to
12639
12638
  * when no upstream value has been persisted. Keeps non-migrated providers
12640
- * (Reolink / Hikvision / ONVIF / Frigate / RTSP) functional without code
12639
+ * (Reolink / Hikvision / ONVIF / RTSP) functional without code
12641
12640
  * changes — `id` reuses the CamStack stableId, `system` reuses the addon
12642
12641
  * id. Real upstream identity replaces this once a provider migrates and
12643
12642
  * calls `updateSourceInfo()` with concrete values.
@@ -13299,7 +13298,7 @@ var deviceProviderCapability = {
13299
13298
  * - `device-management.router.ts` (deleted in Phase 2)
13300
13299
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
13301
13300
  *
13302
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
13301
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
13303
13302
  * fork into separate processes but never run on remote cluster agents. Therefore:
13304
13303
  * - No nodeId routing needed — this is a pure hub singleton.
13305
13304
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -17347,7 +17346,7 @@ var NcRuleInputSchema = object({
17347
17346
  * The measured seven-person arrival on device 590 spans 110 s with every
17348
17347
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
17349
17348
  * idle cutoff holds it as one and ends it when the arrival actually ends.
17350
- * 30 is Frigate's shipped value for the same decision.
17349
+ * 30 s is a widely shipped value for the same decision.
17351
17350
  *
17352
17351
  * ### What it replaces
17353
17352
  *
@@ -19429,6 +19428,13 @@ var ZoneCrossingSchema = object({
19429
19428
  /** Zone display name at crossing time (falls back to the id). */
19430
19429
  zoneName: string().optional()
19431
19430
  });
19431
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
19432
+ var ZoneOverlapSchema = object({
19433
+ zoneId: string(),
19434
+ zoneName: string().optional(),
19435
+ /** Percentage of the BOX area inside the zone, 0–100. */
19436
+ overlapPct: number()
19437
+ });
19432
19438
  var ObjectEventSchema = object({
19433
19439
  ...BaseEventFields,
19434
19440
  kind: literal("object"),
@@ -19453,6 +19459,35 @@ var ObjectEventSchema = object({
19453
19459
  bbox: BoundingBoxSchema.optional(),
19454
19460
  /** Heavy JSON — omitted in slim projection. */
19455
19461
  zones: array(string()).readonly().optional(),
19462
+ /**
19463
+ * How far inside each stamped zone the box actually was, as a percentage of
19464
+ * the BOX area.
19465
+ *
19466
+ * Membership alone cannot express "at least a third of it inside", which is
19467
+ * the bar an operator argues with — and the number already existed: the
19468
+ * engine computed it, the pipeline logged it, and then discarded it. It
19469
+ * matters most on the events that carry no track, where a rule has nothing
19470
+ * else to judge by.
19471
+ */
19472
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
19473
+ /**
19474
+ * Present when this event describes a detection the TRACKER refused, so it
19475
+ * has no track and never will.
19476
+ *
19477
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
19478
+ * NOW?"; tracking answers a different question ("is this the same subject as
19479
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
19480
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
19481
+ * seconds with three different candidate ids — seven analysed frames in the
19482
+ * window, the subject in a handful of them, metres apart — and produced no
19483
+ * event at all.
19484
+ *
19485
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
19486
+ * with no track and no reason is indistinguishable from a track whose media
19487
+ * went missing, and a consumer that asks this one for a best shot or a
19488
+ * history is asking for something that never existed.
19489
+ */
19490
+ spawnRefused: string().optional(),
19456
19491
  /** Omitted in slim projection. */
19457
19492
  state: TrackStateSchema.optional(),
19458
19493
  /**
@@ -20526,6 +20561,60 @@ var NativeCropResultSchema = object({
20526
20561
  */
20527
20562
  tier: _enum(["native", "ram-fullframe"]).optional()
20528
20563
  });
20564
+ /**
20565
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
20566
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
20567
+ *
20568
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
20569
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
20570
+ * from, and what the detail plane's full-frame rung cuts from.
20571
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
20572
+ * window, cut by the runner at uncapped native resolution.
20573
+ *
20574
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
20575
+ */
20576
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
20577
+ /**
20578
+ * Why a park did NOT happen. Every one is logged on the runner with
20579
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
20580
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
20581
+ * never a reason to retry in a loop.
20582
+ *
20583
+ * - `handle-gone` — the native surface no longer resolves this handle (never
20584
+ * registered, past the lease bound, or the worker released it). `detail`
20585
+ * carries the runner's own miss reason.
20586
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
20587
+ */
20588
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
20589
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
20590
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20591
+ parked: literal(true),
20592
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
20593
+ nodeId: string(),
20594
+ width: number().int().positive(),
20595
+ height: number().int().positive(),
20596
+ /** JPEG bytes the parcel costs on the node. */
20597
+ bytes: number().int().nonnegative(),
20598
+ /** Whether this park replaced a parcel already held for the key. */
20599
+ replaced: boolean()
20600
+ }), object({
20601
+ parked: literal(false),
20602
+ nodeId: string(),
20603
+ reason: ParkRefusalSchema,
20604
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
20605
+ handleAgeMs: number().nullable(),
20606
+ detail: string().optional()
20607
+ })]);
20608
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
20609
+ var ParkedTrackFrameSchema = object({
20610
+ jpeg: string(),
20611
+ width: number().int().positive(),
20612
+ height: number().int().positive(),
20613
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
20614
+ timestamp: number(),
20615
+ /** When the node stored it (the node's clock). */
20616
+ parkedAt: number()
20617
+ });
20529
20618
  /** Parent detection context passed to `runDetailSubtree` — the crop's
20530
20619
  * originating detection, in FRAME-space coordinates. Reuses
20531
20620
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -20915,7 +21004,7 @@ var RunnerCameraConfigSchema = object({
20915
21004
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
20916
21005
  * analyzer providers) running on decoded frames in this runner.
20917
21006
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
20918
- * analytics, Frigate motion). The provider emits ProviderMotion
21007
+ * analytics). The provider emits ProviderMotion
20919
21008
  * events; the orchestrator forwards to `reportMotion`.
20920
21009
  */
20921
21010
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -21157,7 +21246,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21157
21246
  className: string(),
21158
21247
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
21159
21248
  sourceDeviceId: number()
21160
- }), RunStatelessStepResultSchema, { kind: "mutation" });
21249
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
21250
+ deviceId: number(),
21251
+ /** Opaque to the runner — the hub's track id. */
21252
+ trackId: string(),
21253
+ kind: ParkedFrameKindSchema,
21254
+ handle: FrameHandleSchema,
21255
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
21256
+ bbox: NativeCropBboxSchema,
21257
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
21258
+ maxWidth: number().int().positive().optional(),
21259
+ /** The frame instant (caller's clock) — orders parks for one key. */
21260
+ timestamp: number()
21261
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
21262
+ deviceId: number(),
21263
+ trackId: string(),
21264
+ kind: ParkedFrameKindSchema
21265
+ }), ParkedTrackFrameSchema.nullable()), method(object({
21266
+ deviceId: number(),
21267
+ trackId: string()
21268
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
21161
21269
  var CameraPipelineConfigSchema = object({
21162
21270
  engine: PipelineEngineChoiceSchema.optional(),
21163
21271
  steps: array(PipelineStepInputSchema).readonly(),
@@ -24227,8 +24335,8 @@ onStatusChanged: { data: object({
24227
24335
  /**
24228
24336
  * Runtime-state slice — every provider that registers this cap
24229
24337
  * stores the same shape under `device.runtimeState[battery]`.
24230
- * Cross-provider uniformity: a Reolink Argus, a Frigate sensor
24231
- * proxy, an ONVIF battery cam all read/write the same keys.
24338
+ * Cross-provider uniformity: a Reolink Argus, a sensor proxy,
24339
+ * an ONVIF battery cam all read/write the same keys.
24232
24340
  * Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
24233
24341
  * via `device.runtimeState.getCapState('battery')` regardless of
24234
24342
  * the underlying driver.
@@ -24361,7 +24469,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
24361
24469
  *
24362
24470
  * Implementations:
24363
24471
  * - Each camera-providing addon registers this cap natively per
24364
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
24472
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
24365
24473
  * - Returns a snapshot from the persisted device config blob — no
24366
24474
  * extra round-trip to the camera, no probing.
24367
24475
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -26453,7 +26561,7 @@ var AvailableIntegrationTypeSchema = object({
26453
26561
  * Which integration-marker cap the addon declared, so the wizard can
26454
26562
  * branch on CAP — never on addon name. `device-adoption` integrations
26455
26563
  * (Home Assistant, …) route through the broker step (Approach A);
26456
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
26564
+ * `device-provider` integrations (Reolink/ONVIF) keep the
26457
26565
  * legacy config → discovery flow.
26458
26566
  */
26459
26567
  kind: _enum(["device-adoption", "device-provider"]),
@@ -29877,13 +29985,31 @@ var RecordingManifestSchema = object({
29877
29985
  */
29878
29986
  playbackEndpoints: array(string())
29879
29987
  });
29880
- /** Recording storage usage for one camera (bytes on disk across all its
29881
- * profiles/subtrees/locations on this node). */
29988
+ /**
29989
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
29990
+ * across every profile and every resolvable location on this node.
29991
+ *
29992
+ * ## Archive vs residency, which is the whole point of this shape (D418)
29993
+ *
29994
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
29995
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
29996
+ * this camera writes to, so the two can be added up and compared.
29997
+ *
29998
+ * They were not always. Until D418 this row came from the recorder's in-RAM
29999
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
30000
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
30001
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
30002
+ * that said otherwise, and two people read it as retention eating recent
30003
+ * footage. Residency is still reported, under `residentBytes` /
30004
+ * `residentOldestMs`, which answer a different question and say so.
30005
+ */
29882
30006
  var RecordingDeviceUsageSchema = object({
29883
30007
  deviceId: number(),
30008
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
30009
+ * recordings locations. */
29884
30010
  usedBytes: number(),
29885
30011
  /**
29886
- * Start of this camera's OLDEST indexed segment, across every profile and
30012
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
29887
30013
  * location — the "Oldest footage" column in Recordings → Storage, and the
29888
30014
  * only honest answer to "is retention actually holding?" per camera.
29889
30015
  *
@@ -29893,7 +30019,24 @@ var RecordingDeviceUsageSchema = object({
29893
30019
  * (types) and the addon ship on different trains, and the addon is usually
29894
30020
  * the later of the two.
29895
30021
  */
29896
- oldestMs: number().nullable().optional()
30022
+ oldestMs: number().nullable().optional(),
30023
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
30024
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
30025
+ segments: number().optional(),
30026
+ /**
30027
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
30028
+ * its RAM index — the live tail plus the hours a reader hydrated.
30029
+ *
30030
+ * It answers "what can be served without touching the disk", never "how much
30031
+ * footage this camera has". A UI that renders it must label it as such, and
30032
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
30033
+ * it, and so does a node whose ledger could not answer.
30034
+ */
30035
+ residentBytes: number().optional(),
30036
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
30037
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
30038
+ * retention. `null` = nothing resident. */
30039
+ residentOldestMs: number().nullable().optional()
29897
30040
  });
29898
30041
  /** Recording storage usage + capacity for one storage location. */
29899
30042
  var RecordingLocationUsageSchema = object({
@@ -29931,6 +30074,17 @@ var RecordingStorageUsageSchema = object({
29931
30074
  totalUsedBytes: number(),
29932
30075
  devices: array(RecordingDeviceUsageSchema),
29933
30076
  /**
30077
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
30078
+ * disks (D418).
30079
+ *
30080
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
30081
+ * declared no ledger and the recorder REFUSED rather than answering the
30082
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
30083
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
30084
+ * and its rows are residency.
30085
+ */
30086
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
30087
+ /**
29934
30088
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
29935
30089
  * of the payload without it: the hub serves this method through a BAKED
29936
30090
  * router, so a hub whose framework train predates a change to this array
@@ -33810,7 +33964,7 @@ function toDeviceSummary(device, addonId) {
33810
33964
  };
33811
33965
  }
33812
33966
  /**
33813
- * Base class for device-provider addons (rtsp, onvif, frigate).
33967
+ * Base class for device-provider addons (rtsp, onvif).
33814
33968
  *
33815
33969
  * Provides default implementations for the common device-provider cap
33816
33970
  * methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
@@ -38466,6 +38620,24 @@ Object.freeze({
38466
38620
  addonId: null,
38467
38621
  access: "view"
38468
38622
  },
38623
+ "pipelineRunner.getParkedTrackFrame": {
38624
+ capName: "pipeline-runner",
38625
+ capScope: "system",
38626
+ addonId: null,
38627
+ access: "view"
38628
+ },
38629
+ "pipelineRunner.parkTrackFrame": {
38630
+ capName: "pipeline-runner",
38631
+ capScope: "system",
38632
+ addonId: null,
38633
+ access: "create"
38634
+ },
38635
+ "pipelineRunner.releaseParkedTrackFrames": {
38636
+ capName: "pipeline-runner",
38637
+ capScope: "system",
38638
+ addonId: null,
38639
+ access: "create"
38640
+ },
38469
38641
  "pipelineRunner.reportMotion": {
38470
38642
  capName: "pipeline-runner",
38471
38643
  capScope: "system",
@@ -41743,6 +41915,21 @@ Object.freeze({
41743
41915
  form: "single",
41744
41916
  optional: false
41745
41917
  }],
41918
+ "pipelineRunner.getParkedTrackFrame": [{
41919
+ name: "deviceId",
41920
+ form: "single",
41921
+ optional: false
41922
+ }],
41923
+ "pipelineRunner.parkTrackFrame": [{
41924
+ name: "deviceId",
41925
+ form: "single",
41926
+ optional: false
41927
+ }],
41928
+ "pipelineRunner.releaseParkedTrackFrames": [{
41929
+ name: "deviceId",
41930
+ form: "single",
41931
+ optional: false
41932
+ }],
41746
41933
  "pipelineRunner.reportMotion": [{
41747
41934
  name: "deviceId",
41748
41935
  form: "single",
@@ -42434,7 +42621,7 @@ var PreviewTextField = string().max(200);
42434
42621
  * Whether the notification's preview is a STILL or a short animation.
42435
42622
  *
42436
42623
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
42437
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
42624
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
42438
42625
  * night reads better as three seconds of motion than as one frame of it. Both
42439
42626
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
42440
42627
  * simply applies it to a dozen frames sampled across the render and assembles
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-velux",
3
- "version": "0.2.90",
3
+ "version": "0.2.92",
4
4
  "description": "Velux KLF-200 device-provider addon for CamStack — local-gateway window + shutter covers (positional, no tilt)",
5
5
  "keywords": [
6
6
  "camstack",