@camstack/addon-provider-rademacher 0.2.88 → 0.2.91

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
@@ -984,7 +984,7 @@ var Rademacher = class {
984
984
  }
985
985
  };
986
986
  //#endregion
987
- //#region ../types/dist/event-category-CnLqLOKs.mjs
987
+ //#region ../types/dist/event-category-DAXzJeTX.mjs
988
988
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
989
989
  EventCategory["SystemBoot"] = "system.boot";
990
990
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1576,7 +1576,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1576
1576
  * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
1577
1577
  */
1578
1578
  EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
1579
- EventCategory["FrigateLiveEvent"] = "frigate.live-event";
1580
1579
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
1581
1580
  /**
1582
1581
  * Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
@@ -13610,7 +13609,7 @@ DeviceType.Camera;
13610
13609
  var SourceInfoSchema = object({
13611
13610
  /** Live dispatch key — mutable when the source system allows rename. */
13612
13611
  id: string(),
13613
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
13612
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
13614
13613
  system: string(),
13615
13614
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
13616
13615
  * Used to detect rename when `id` changes. */
@@ -13623,7 +13622,7 @@ var SourceInfoSchema = object({
13623
13622
  /**
13624
13623
  * Build the synthetic SourceInfo every existing provider falls back to
13625
13624
  * when no upstream value has been persisted. Keeps non-migrated providers
13626
- * (Reolink / Hikvision / ONVIF / Frigate / RTSP) functional without code
13625
+ * (Reolink / Hikvision / ONVIF / RTSP) functional without code
13627
13626
  * changes — `id` reuses the CamStack stableId, `system` reuses the addon
13628
13627
  * id. Real upstream identity replaces this once a provider migrates and
13629
13628
  * calls `updateSourceInfo()` with concrete values.
@@ -14285,7 +14284,7 @@ var deviceProviderCapability = {
14285
14284
  * - `device-management.router.ts` (deleted in Phase 2)
14286
14285
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
14287
14286
  *
14288
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
14287
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
14289
14288
  * fork into separate processes but never run on remote cluster agents. Therefore:
14290
14289
  * - No nodeId routing needed — this is a pure hub singleton.
14291
14290
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -18333,7 +18332,7 @@ var NcRuleInputSchema = object({
18333
18332
  * The measured seven-person arrival on device 590 spans 110 s with every
18334
18333
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
18335
18334
  * idle cutoff holds it as one and ends it when the arrival actually ends.
18336
- * 30 is Frigate's shipped value for the same decision.
18335
+ * 30 s is a widely shipped value for the same decision.
18337
18336
  *
18338
18337
  * ### What it replaces
18339
18338
  *
@@ -20415,6 +20414,13 @@ var ZoneCrossingSchema = object({
20415
20414
  /** Zone display name at crossing time (falls back to the id). */
20416
20415
  zoneName: string().optional()
20417
20416
  });
20417
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
20418
+ var ZoneOverlapSchema = object({
20419
+ zoneId: string(),
20420
+ zoneName: string().optional(),
20421
+ /** Percentage of the BOX area inside the zone, 0–100. */
20422
+ overlapPct: number()
20423
+ });
20418
20424
  var ObjectEventSchema = object({
20419
20425
  ...BaseEventFields,
20420
20426
  kind: literal("object"),
@@ -20439,6 +20445,35 @@ var ObjectEventSchema = object({
20439
20445
  bbox: BoundingBoxSchema.optional(),
20440
20446
  /** Heavy JSON — omitted in slim projection. */
20441
20447
  zones: array(string()).readonly().optional(),
20448
+ /**
20449
+ * How far inside each stamped zone the box actually was, as a percentage of
20450
+ * the BOX area.
20451
+ *
20452
+ * Membership alone cannot express "at least a third of it inside", which is
20453
+ * the bar an operator argues with — and the number already existed: the
20454
+ * engine computed it, the pipeline logged it, and then discarded it. It
20455
+ * matters most on the events that carry no track, where a rule has nothing
20456
+ * else to judge by.
20457
+ */
20458
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
20459
+ /**
20460
+ * Present when this event describes a detection the TRACKER refused, so it
20461
+ * has no track and never will.
20462
+ *
20463
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
20464
+ * NOW?"; tracking answers a different question ("is this the same subject as
20465
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
20466
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
20467
+ * seconds with three different candidate ids — seven analysed frames in the
20468
+ * window, the subject in a handful of them, metres apart — and produced no
20469
+ * event at all.
20470
+ *
20471
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
20472
+ * with no track and no reason is indistinguishable from a track whose media
20473
+ * went missing, and a consumer that asks this one for a best shot or a
20474
+ * history is asking for something that never existed.
20475
+ */
20476
+ spawnRefused: string().optional(),
20442
20477
  /** Omitted in slim projection. */
20443
20478
  state: TrackStateSchema.optional(),
20444
20479
  /**
@@ -21512,6 +21547,60 @@ var NativeCropResultSchema = object({
21512
21547
  */
21513
21548
  tier: _enum(["native", "ram-fullframe"]).optional()
21514
21549
  });
21550
+ /**
21551
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
21552
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
21553
+ *
21554
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
21555
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
21556
+ * from, and what the detail plane's full-frame rung cuts from.
21557
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
21558
+ * window, cut by the runner at uncapped native resolution.
21559
+ *
21560
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
21561
+ */
21562
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
21563
+ /**
21564
+ * Why a park did NOT happen. Every one is logged on the runner with
21565
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
21566
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
21567
+ * never a reason to retry in a loop.
21568
+ *
21569
+ * - `handle-gone` — the native surface no longer resolves this handle (never
21570
+ * registered, past the lease bound, or the worker released it). `detail`
21571
+ * carries the runner's own miss reason.
21572
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
21573
+ */
21574
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
21575
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
21576
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
21577
+ parked: literal(true),
21578
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
21579
+ nodeId: string(),
21580
+ width: number().int().positive(),
21581
+ height: number().int().positive(),
21582
+ /** JPEG bytes the parcel costs on the node. */
21583
+ bytes: number().int().nonnegative(),
21584
+ /** Whether this park replaced a parcel already held for the key. */
21585
+ replaced: boolean()
21586
+ }), object({
21587
+ parked: literal(false),
21588
+ nodeId: string(),
21589
+ reason: ParkRefusalSchema,
21590
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
21591
+ handleAgeMs: number().nullable(),
21592
+ detail: string().optional()
21593
+ })]);
21594
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
21595
+ var ParkedTrackFrameSchema = object({
21596
+ jpeg: string(),
21597
+ width: number().int().positive(),
21598
+ height: number().int().positive(),
21599
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
21600
+ timestamp: number(),
21601
+ /** When the node stored it (the node's clock). */
21602
+ parkedAt: number()
21603
+ });
21515
21604
  /** Parent detection context passed to `runDetailSubtree` — the crop's
21516
21605
  * originating detection, in FRAME-space coordinates. Reuses
21517
21606
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -21901,7 +21990,7 @@ var RunnerCameraConfigSchema = object({
21901
21990
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
21902
21991
  * analyzer providers) running on decoded frames in this runner.
21903
21992
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
21904
- * analytics, Frigate motion). The provider emits ProviderMotion
21993
+ * analytics). The provider emits ProviderMotion
21905
21994
  * events; the orchestrator forwards to `reportMotion`.
21906
21995
  */
21907
21996
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -22143,7 +22232,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
22143
22232
  className: string(),
22144
22233
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
22145
22234
  sourceDeviceId: number()
22146
- }), RunStatelessStepResultSchema, { kind: "mutation" });
22235
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
22236
+ deviceId: number(),
22237
+ /** Opaque to the runner — the hub's track id. */
22238
+ trackId: string(),
22239
+ kind: ParkedFrameKindSchema,
22240
+ handle: FrameHandleSchema,
22241
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
22242
+ bbox: NativeCropBboxSchema,
22243
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
22244
+ maxWidth: number().int().positive().optional(),
22245
+ /** The frame instant (caller's clock) — orders parks for one key. */
22246
+ timestamp: number()
22247
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
22248
+ deviceId: number(),
22249
+ trackId: string(),
22250
+ kind: ParkedFrameKindSchema
22251
+ }), ParkedTrackFrameSchema.nullable()), method(object({
22252
+ deviceId: number(),
22253
+ trackId: string()
22254
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
22147
22255
  var CameraPipelineConfigSchema = object({
22148
22256
  engine: PipelineEngineChoiceSchema.optional(),
22149
22257
  steps: array(PipelineStepInputSchema).readonly(),
@@ -25213,8 +25321,8 @@ onStatusChanged: { data: object({
25213
25321
  /**
25214
25322
  * Runtime-state slice — every provider that registers this cap
25215
25323
  * stores the same shape under `device.runtimeState[battery]`.
25216
- * Cross-provider uniformity: a Reolink Argus, a Frigate sensor
25217
- * proxy, an ONVIF battery cam all read/write the same keys.
25324
+ * Cross-provider uniformity: a Reolink Argus, a sensor proxy,
25325
+ * an ONVIF battery cam all read/write the same keys.
25218
25326
  * Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
25219
25327
  * via `device.runtimeState.getCapState('battery')` regardless of
25220
25328
  * the underlying driver.
@@ -25347,7 +25455,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
25347
25455
  *
25348
25456
  * Implementations:
25349
25457
  * - Each camera-providing addon registers this cap natively per
25350
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
25458
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
25351
25459
  * - Returns a snapshot from the persisted device config blob — no
25352
25460
  * extra round-trip to the camera, no probing.
25353
25461
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -27439,7 +27547,7 @@ var AvailableIntegrationTypeSchema = object({
27439
27547
  * Which integration-marker cap the addon declared, so the wizard can
27440
27548
  * branch on CAP — never on addon name. `device-adoption` integrations
27441
27549
  * (Home Assistant, …) route through the broker step (Approach A);
27442
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
27550
+ * `device-provider` integrations (Reolink/ONVIF) keep the
27443
27551
  * legacy config → discovery flow.
27444
27552
  */
27445
27553
  kind: _enum(["device-adoption", "device-provider"]),
@@ -30863,13 +30971,31 @@ var RecordingManifestSchema = object({
30863
30971
  */
30864
30972
  playbackEndpoints: array(string())
30865
30973
  });
30866
- /** Recording storage usage for one camera (bytes on disk across all its
30867
- * profiles/subtrees/locations on this node). */
30974
+ /**
30975
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
30976
+ * across every profile and every resolvable location on this node.
30977
+ *
30978
+ * ## Archive vs residency, which is the whole point of this shape (D418)
30979
+ *
30980
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
30981
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
30982
+ * this camera writes to, so the two can be added up and compared.
30983
+ *
30984
+ * They were not always. Until D418 this row came from the recorder's in-RAM
30985
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
30986
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
30987
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
30988
+ * that said otherwise, and two people read it as retention eating recent
30989
+ * footage. Residency is still reported, under `residentBytes` /
30990
+ * `residentOldestMs`, which answer a different question and say so.
30991
+ */
30868
30992
  var RecordingDeviceUsageSchema = object({
30869
30993
  deviceId: number(),
30994
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
30995
+ * recordings locations. */
30870
30996
  usedBytes: number(),
30871
30997
  /**
30872
- * Start of this camera's OLDEST indexed segment, across every profile and
30998
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
30873
30999
  * location — the "Oldest footage" column in Recordings → Storage, and the
30874
31000
  * only honest answer to "is retention actually holding?" per camera.
30875
31001
  *
@@ -30879,7 +31005,24 @@ var RecordingDeviceUsageSchema = object({
30879
31005
  * (types) and the addon ship on different trains, and the addon is usually
30880
31006
  * the later of the two.
30881
31007
  */
30882
- oldestMs: number().nullable().optional()
31008
+ oldestMs: number().nullable().optional(),
31009
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
31010
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
31011
+ segments: number().optional(),
31012
+ /**
31013
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
31014
+ * its RAM index — the live tail plus the hours a reader hydrated.
31015
+ *
31016
+ * It answers "what can be served without touching the disk", never "how much
31017
+ * footage this camera has". A UI that renders it must label it as such, and
31018
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
31019
+ * it, and so does a node whose ledger could not answer.
31020
+ */
31021
+ residentBytes: number().optional(),
31022
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
31023
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
31024
+ * retention. `null` = nothing resident. */
31025
+ residentOldestMs: number().nullable().optional()
30883
31026
  });
30884
31027
  /** Recording storage usage + capacity for one storage location. */
30885
31028
  var RecordingLocationUsageSchema = object({
@@ -30917,6 +31060,17 @@ var RecordingStorageUsageSchema = object({
30917
31060
  totalUsedBytes: number(),
30918
31061
  devices: array(RecordingDeviceUsageSchema),
30919
31062
  /**
31063
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
31064
+ * disks (D418).
31065
+ *
31066
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
31067
+ * declared no ledger and the recorder REFUSED rather than answering the
31068
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
31069
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
31070
+ * and its rows are residency.
31071
+ */
31072
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
31073
+ /**
30920
31074
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
30921
31075
  * of the payload without it: the hub serves this method through a BAKED
30922
31076
  * router, so a hub whose framework train predates a change to this array
@@ -34796,7 +34950,7 @@ function toDeviceSummary(device, addonId) {
34796
34950
  };
34797
34951
  }
34798
34952
  /**
34799
- * Base class for device-provider addons (rtsp, onvif, frigate).
34953
+ * Base class for device-provider addons (rtsp, onvif).
34800
34954
  *
34801
34955
  * Provides default implementations for the common device-provider cap
34802
34956
  * methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
@@ -39452,6 +39606,24 @@ Object.freeze({
39452
39606
  addonId: null,
39453
39607
  access: "view"
39454
39608
  },
39609
+ "pipelineRunner.getParkedTrackFrame": {
39610
+ capName: "pipeline-runner",
39611
+ capScope: "system",
39612
+ addonId: null,
39613
+ access: "view"
39614
+ },
39615
+ "pipelineRunner.parkTrackFrame": {
39616
+ capName: "pipeline-runner",
39617
+ capScope: "system",
39618
+ addonId: null,
39619
+ access: "create"
39620
+ },
39621
+ "pipelineRunner.releaseParkedTrackFrames": {
39622
+ capName: "pipeline-runner",
39623
+ capScope: "system",
39624
+ addonId: null,
39625
+ access: "create"
39626
+ },
39455
39627
  "pipelineRunner.reportMotion": {
39456
39628
  capName: "pipeline-runner",
39457
39629
  capScope: "system",
@@ -42729,6 +42901,21 @@ Object.freeze({
42729
42901
  form: "single",
42730
42902
  optional: false
42731
42903
  }],
42904
+ "pipelineRunner.getParkedTrackFrame": [{
42905
+ name: "deviceId",
42906
+ form: "single",
42907
+ optional: false
42908
+ }],
42909
+ "pipelineRunner.parkTrackFrame": [{
42910
+ name: "deviceId",
42911
+ form: "single",
42912
+ optional: false
42913
+ }],
42914
+ "pipelineRunner.releaseParkedTrackFrames": [{
42915
+ name: "deviceId",
42916
+ form: "single",
42917
+ optional: false
42918
+ }],
42732
42919
  "pipelineRunner.reportMotion": [{
42733
42920
  name: "deviceId",
42734
42921
  form: "single",
@@ -43420,7 +43607,7 @@ var PreviewTextField = string().max(200);
43420
43607
  * Whether the notification's preview is a STILL or a short animation.
43421
43608
  *
43422
43609
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
43423
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
43610
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
43424
43611
  * night reads better as three seconds of motion than as one frame of it. Both
43425
43612
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
43426
43613
  * simply applies it to a dozen frames sampled across the render and assembles
package/dist/addon.mjs CHANGED
@@ -983,7 +983,7 @@ var Rademacher = class {
983
983
  }
984
984
  };
985
985
  //#endregion
986
- //#region ../types/dist/event-category-CnLqLOKs.mjs
986
+ //#region ../types/dist/event-category-DAXzJeTX.mjs
987
987
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
988
988
  EventCategory["SystemBoot"] = "system.boot";
989
989
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1575,7 +1575,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1575
1575
  * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
1576
1576
  */
1577
1577
  EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
1578
- EventCategory["FrigateLiveEvent"] = "frigate.live-event";
1579
1578
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
1580
1579
  /**
1581
1580
  * Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
@@ -13609,7 +13608,7 @@ DeviceType.Camera;
13609
13608
  var SourceInfoSchema = object({
13610
13609
  /** Live dispatch key — mutable when the source system allows rename. */
13611
13610
  id: string(),
13612
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
13611
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
13613
13612
  system: string(),
13614
13613
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
13615
13614
  * Used to detect rename when `id` changes. */
@@ -13622,7 +13621,7 @@ var SourceInfoSchema = object({
13622
13621
  /**
13623
13622
  * Build the synthetic SourceInfo every existing provider falls back to
13624
13623
  * when no upstream value has been persisted. Keeps non-migrated providers
13625
- * (Reolink / Hikvision / ONVIF / Frigate / RTSP) functional without code
13624
+ * (Reolink / Hikvision / ONVIF / RTSP) functional without code
13626
13625
  * changes — `id` reuses the CamStack stableId, `system` reuses the addon
13627
13626
  * id. Real upstream identity replaces this once a provider migrates and
13628
13627
  * calls `updateSourceInfo()` with concrete values.
@@ -14284,7 +14283,7 @@ var deviceProviderCapability = {
14284
14283
  * - `device-management.router.ts` (deleted in Phase 2)
14285
14284
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
14286
14285
  *
14287
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
14286
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
14288
14287
  * fork into separate processes but never run on remote cluster agents. Therefore:
14289
14288
  * - No nodeId routing needed — this is a pure hub singleton.
14290
14289
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -18332,7 +18331,7 @@ var NcRuleInputSchema = object({
18332
18331
  * The measured seven-person arrival on device 590 spans 110 s with every
18333
18332
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
18334
18333
  * idle cutoff holds it as one and ends it when the arrival actually ends.
18335
- * 30 is Frigate's shipped value for the same decision.
18334
+ * 30 s is a widely shipped value for the same decision.
18336
18335
  *
18337
18336
  * ### What it replaces
18338
18337
  *
@@ -20414,6 +20413,13 @@ var ZoneCrossingSchema = object({
20414
20413
  /** Zone display name at crossing time (falls back to the id). */
20415
20414
  zoneName: string().optional()
20416
20415
  });
20416
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
20417
+ var ZoneOverlapSchema = object({
20418
+ zoneId: string(),
20419
+ zoneName: string().optional(),
20420
+ /** Percentage of the BOX area inside the zone, 0–100. */
20421
+ overlapPct: number()
20422
+ });
20417
20423
  var ObjectEventSchema = object({
20418
20424
  ...BaseEventFields,
20419
20425
  kind: literal("object"),
@@ -20438,6 +20444,35 @@ var ObjectEventSchema = object({
20438
20444
  bbox: BoundingBoxSchema.optional(),
20439
20445
  /** Heavy JSON — omitted in slim projection. */
20440
20446
  zones: array(string()).readonly().optional(),
20447
+ /**
20448
+ * How far inside each stamped zone the box actually was, as a percentage of
20449
+ * the BOX area.
20450
+ *
20451
+ * Membership alone cannot express "at least a third of it inside", which is
20452
+ * the bar an operator argues with — and the number already existed: the
20453
+ * engine computed it, the pipeline logged it, and then discarded it. It
20454
+ * matters most on the events that carry no track, where a rule has nothing
20455
+ * else to judge by.
20456
+ */
20457
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
20458
+ /**
20459
+ * Present when this event describes a detection the TRACKER refused, so it
20460
+ * has no track and never will.
20461
+ *
20462
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
20463
+ * NOW?"; tracking answers a different question ("is this the same subject as
20464
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
20465
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
20466
+ * seconds with three different candidate ids — seven analysed frames in the
20467
+ * window, the subject in a handful of them, metres apart — and produced no
20468
+ * event at all.
20469
+ *
20470
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
20471
+ * with no track and no reason is indistinguishable from a track whose media
20472
+ * went missing, and a consumer that asks this one for a best shot or a
20473
+ * history is asking for something that never existed.
20474
+ */
20475
+ spawnRefused: string().optional(),
20441
20476
  /** Omitted in slim projection. */
20442
20477
  state: TrackStateSchema.optional(),
20443
20478
  /**
@@ -21511,6 +21546,60 @@ var NativeCropResultSchema = object({
21511
21546
  */
21512
21547
  tier: _enum(["native", "ram-fullframe"]).optional()
21513
21548
  });
21549
+ /**
21550
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
21551
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
21552
+ *
21553
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
21554
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
21555
+ * from, and what the detail plane's full-frame rung cuts from.
21556
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
21557
+ * window, cut by the runner at uncapped native resolution.
21558
+ *
21559
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
21560
+ */
21561
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
21562
+ /**
21563
+ * Why a park did NOT happen. Every one is logged on the runner with
21564
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
21565
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
21566
+ * never a reason to retry in a loop.
21567
+ *
21568
+ * - `handle-gone` — the native surface no longer resolves this handle (never
21569
+ * registered, past the lease bound, or the worker released it). `detail`
21570
+ * carries the runner's own miss reason.
21571
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
21572
+ */
21573
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
21574
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
21575
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
21576
+ parked: literal(true),
21577
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
21578
+ nodeId: string(),
21579
+ width: number().int().positive(),
21580
+ height: number().int().positive(),
21581
+ /** JPEG bytes the parcel costs on the node. */
21582
+ bytes: number().int().nonnegative(),
21583
+ /** Whether this park replaced a parcel already held for the key. */
21584
+ replaced: boolean()
21585
+ }), object({
21586
+ parked: literal(false),
21587
+ nodeId: string(),
21588
+ reason: ParkRefusalSchema,
21589
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
21590
+ handleAgeMs: number().nullable(),
21591
+ detail: string().optional()
21592
+ })]);
21593
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
21594
+ var ParkedTrackFrameSchema = object({
21595
+ jpeg: string(),
21596
+ width: number().int().positive(),
21597
+ height: number().int().positive(),
21598
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
21599
+ timestamp: number(),
21600
+ /** When the node stored it (the node's clock). */
21601
+ parkedAt: number()
21602
+ });
21514
21603
  /** Parent detection context passed to `runDetailSubtree` — the crop's
21515
21604
  * originating detection, in FRAME-space coordinates. Reuses
21516
21605
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -21900,7 +21989,7 @@ var RunnerCameraConfigSchema = object({
21900
21989
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
21901
21990
  * analyzer providers) running on decoded frames in this runner.
21902
21991
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
21903
- * analytics, Frigate motion). The provider emits ProviderMotion
21992
+ * analytics). The provider emits ProviderMotion
21904
21993
  * events; the orchestrator forwards to `reportMotion`.
21905
21994
  */
21906
21995
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -22142,7 +22231,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
22142
22231
  className: string(),
22143
22232
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
22144
22233
  sourceDeviceId: number()
22145
- }), RunStatelessStepResultSchema, { kind: "mutation" });
22234
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
22235
+ deviceId: number(),
22236
+ /** Opaque to the runner — the hub's track id. */
22237
+ trackId: string(),
22238
+ kind: ParkedFrameKindSchema,
22239
+ handle: FrameHandleSchema,
22240
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
22241
+ bbox: NativeCropBboxSchema,
22242
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
22243
+ maxWidth: number().int().positive().optional(),
22244
+ /** The frame instant (caller's clock) — orders parks for one key. */
22245
+ timestamp: number()
22246
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
22247
+ deviceId: number(),
22248
+ trackId: string(),
22249
+ kind: ParkedFrameKindSchema
22250
+ }), ParkedTrackFrameSchema.nullable()), method(object({
22251
+ deviceId: number(),
22252
+ trackId: string()
22253
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
22146
22254
  var CameraPipelineConfigSchema = object({
22147
22255
  engine: PipelineEngineChoiceSchema.optional(),
22148
22256
  steps: array(PipelineStepInputSchema).readonly(),
@@ -25212,8 +25320,8 @@ onStatusChanged: { data: object({
25212
25320
  /**
25213
25321
  * Runtime-state slice — every provider that registers this cap
25214
25322
  * stores the same shape under `device.runtimeState[battery]`.
25215
- * Cross-provider uniformity: a Reolink Argus, a Frigate sensor
25216
- * proxy, an ONVIF battery cam all read/write the same keys.
25323
+ * Cross-provider uniformity: a Reolink Argus, a sensor proxy,
25324
+ * an ONVIF battery cam all read/write the same keys.
25217
25325
  * Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
25218
25326
  * via `device.runtimeState.getCapState('battery')` regardless of
25219
25327
  * the underlying driver.
@@ -25346,7 +25454,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
25346
25454
  *
25347
25455
  * Implementations:
25348
25456
  * - Each camera-providing addon registers this cap natively per
25349
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
25457
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
25350
25458
  * - Returns a snapshot from the persisted device config blob — no
25351
25459
  * extra round-trip to the camera, no probing.
25352
25460
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -27438,7 +27546,7 @@ var AvailableIntegrationTypeSchema = object({
27438
27546
  * Which integration-marker cap the addon declared, so the wizard can
27439
27547
  * branch on CAP — never on addon name. `device-adoption` integrations
27440
27548
  * (Home Assistant, …) route through the broker step (Approach A);
27441
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
27549
+ * `device-provider` integrations (Reolink/ONVIF) keep the
27442
27550
  * legacy config → discovery flow.
27443
27551
  */
27444
27552
  kind: _enum(["device-adoption", "device-provider"]),
@@ -30862,13 +30970,31 @@ var RecordingManifestSchema = object({
30862
30970
  */
30863
30971
  playbackEndpoints: array(string())
30864
30972
  });
30865
- /** Recording storage usage for one camera (bytes on disk across all its
30866
- * profiles/subtrees/locations on this node). */
30973
+ /**
30974
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
30975
+ * across every profile and every resolvable location on this node.
30976
+ *
30977
+ * ## Archive vs residency, which is the whole point of this shape (D418)
30978
+ *
30979
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
30980
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
30981
+ * this camera writes to, so the two can be added up and compared.
30982
+ *
30983
+ * They were not always. Until D418 this row came from the recorder's in-RAM
30984
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
30985
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
30986
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
30987
+ * that said otherwise, and two people read it as retention eating recent
30988
+ * footage. Residency is still reported, under `residentBytes` /
30989
+ * `residentOldestMs`, which answer a different question and say so.
30990
+ */
30867
30991
  var RecordingDeviceUsageSchema = object({
30868
30992
  deviceId: number(),
30993
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
30994
+ * recordings locations. */
30869
30995
  usedBytes: number(),
30870
30996
  /**
30871
- * Start of this camera's OLDEST indexed segment, across every profile and
30997
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
30872
30998
  * location — the "Oldest footage" column in Recordings → Storage, and the
30873
30999
  * only honest answer to "is retention actually holding?" per camera.
30874
31000
  *
@@ -30878,7 +31004,24 @@ var RecordingDeviceUsageSchema = object({
30878
31004
  * (types) and the addon ship on different trains, and the addon is usually
30879
31005
  * the later of the two.
30880
31006
  */
30881
- oldestMs: number().nullable().optional()
31007
+ oldestMs: number().nullable().optional(),
31008
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
31009
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
31010
+ segments: number().optional(),
31011
+ /**
31012
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
31013
+ * its RAM index — the live tail plus the hours a reader hydrated.
31014
+ *
31015
+ * It answers "what can be served without touching the disk", never "how much
31016
+ * footage this camera has". A UI that renders it must label it as such, and
31017
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
31018
+ * it, and so does a node whose ledger could not answer.
31019
+ */
31020
+ residentBytes: number().optional(),
31021
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
31022
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
31023
+ * retention. `null` = nothing resident. */
31024
+ residentOldestMs: number().nullable().optional()
30882
31025
  });
30883
31026
  /** Recording storage usage + capacity for one storage location. */
30884
31027
  var RecordingLocationUsageSchema = object({
@@ -30916,6 +31059,17 @@ var RecordingStorageUsageSchema = object({
30916
31059
  totalUsedBytes: number(),
30917
31060
  devices: array(RecordingDeviceUsageSchema),
30918
31061
  /**
31062
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
31063
+ * disks (D418).
31064
+ *
31065
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
31066
+ * declared no ledger and the recorder REFUSED rather than answering the
31067
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
31068
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
31069
+ * and its rows are residency.
31070
+ */
31071
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
31072
+ /**
30919
31073
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
30920
31074
  * of the payload without it: the hub serves this method through a BAKED
30921
31075
  * router, so a hub whose framework train predates a change to this array
@@ -34795,7 +34949,7 @@ function toDeviceSummary(device, addonId) {
34795
34949
  };
34796
34950
  }
34797
34951
  /**
34798
- * Base class for device-provider addons (rtsp, onvif, frigate).
34952
+ * Base class for device-provider addons (rtsp, onvif).
34799
34953
  *
34800
34954
  * Provides default implementations for the common device-provider cap
34801
34955
  * methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
@@ -39451,6 +39605,24 @@ Object.freeze({
39451
39605
  addonId: null,
39452
39606
  access: "view"
39453
39607
  },
39608
+ "pipelineRunner.getParkedTrackFrame": {
39609
+ capName: "pipeline-runner",
39610
+ capScope: "system",
39611
+ addonId: null,
39612
+ access: "view"
39613
+ },
39614
+ "pipelineRunner.parkTrackFrame": {
39615
+ capName: "pipeline-runner",
39616
+ capScope: "system",
39617
+ addonId: null,
39618
+ access: "create"
39619
+ },
39620
+ "pipelineRunner.releaseParkedTrackFrames": {
39621
+ capName: "pipeline-runner",
39622
+ capScope: "system",
39623
+ addonId: null,
39624
+ access: "create"
39625
+ },
39454
39626
  "pipelineRunner.reportMotion": {
39455
39627
  capName: "pipeline-runner",
39456
39628
  capScope: "system",
@@ -42728,6 +42900,21 @@ Object.freeze({
42728
42900
  form: "single",
42729
42901
  optional: false
42730
42902
  }],
42903
+ "pipelineRunner.getParkedTrackFrame": [{
42904
+ name: "deviceId",
42905
+ form: "single",
42906
+ optional: false
42907
+ }],
42908
+ "pipelineRunner.parkTrackFrame": [{
42909
+ name: "deviceId",
42910
+ form: "single",
42911
+ optional: false
42912
+ }],
42913
+ "pipelineRunner.releaseParkedTrackFrames": [{
42914
+ name: "deviceId",
42915
+ form: "single",
42916
+ optional: false
42917
+ }],
42731
42918
  "pipelineRunner.reportMotion": [{
42732
42919
  name: "deviceId",
42733
42920
  form: "single",
@@ -43419,7 +43606,7 @@ var PreviewTextField = string().max(200);
43419
43606
  * Whether the notification's preview is a STILL or a short animation.
43420
43607
  *
43421
43608
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
43422
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
43609
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
43423
43610
  * night reads better as three seconds of motion than as one frame of it. Both
43424
43611
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
43425
43612
  * 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-rademacher",
3
- "version": "0.2.88",
3
+ "version": "0.2.91",
4
4
  "description": "Rademacher HomePilot device-provider addon for CamStack — wraps the @apocaliss92/noderademacher local-hub client (roller shutters over the cover cap)",
5
5
  "keywords": [
6
6
  "camstack",