@camstack/addon-export-alexa 1.2.96 → 1.2.98

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.
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  //#endregion
27
27
  let node_crypto = require("node:crypto");
28
28
  node_crypto = __toESM(node_crypto);
29
- //#region ../types/dist/event-category-CnLqLOKs.mjs
29
+ //#region ../types/dist/event-category-DAXzJeTX.mjs
30
30
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
31
31
  EventCategory["SystemBoot"] = "system.boot";
32
32
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -618,7 +618,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
618
618
  * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
619
619
  */
620
620
  EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
621
- EventCategory["FrigateLiveEvent"] = "frigate.live-event";
622
621
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
623
622
  /**
624
623
  * Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
@@ -12793,7 +12792,7 @@ DeviceType.Camera;
12793
12792
  var SourceInfoSchema = object({
12794
12793
  /** Live dispatch key — mutable when the source system allows rename. */
12795
12794
  id: string(),
12796
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
12795
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
12797
12796
  system: string(),
12798
12797
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
12799
12798
  * Used to detect rename when `id` changes. */
@@ -13305,7 +13304,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
13305
13304
  * - `device-management.router.ts` (deleted in Phase 2)
13306
13305
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
13307
13306
  *
13308
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
13307
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
13309
13308
  * fork into separate processes but never run on remote cluster agents. Therefore:
13310
13309
  * - No nodeId routing needed — this is a pure hub singleton.
13311
13310
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -17315,7 +17314,7 @@ var NcRuleInputSchema = object({
17315
17314
  * The measured seven-person arrival on device 590 spans 110 s with every
17316
17315
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
17317
17316
  * idle cutoff holds it as one and ends it when the arrival actually ends.
17318
- * 30 is Frigate's shipped value for the same decision.
17317
+ * 30 s is a widely shipped value for the same decision.
17319
17318
  *
17320
17319
  * ### What it replaces
17321
17320
  *
@@ -19373,6 +19372,13 @@ var ZoneCrossingSchema = object({
19373
19372
  /** Zone display name at crossing time (falls back to the id). */
19374
19373
  zoneName: string().optional()
19375
19374
  });
19375
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
19376
+ var ZoneOverlapSchema = object({
19377
+ zoneId: string(),
19378
+ zoneName: string().optional(),
19379
+ /** Percentage of the BOX area inside the zone, 0–100. */
19380
+ overlapPct: number()
19381
+ });
19376
19382
  var ObjectEventSchema = object({
19377
19383
  ...BaseEventFields,
19378
19384
  kind: literal("object"),
@@ -19397,6 +19403,35 @@ var ObjectEventSchema = object({
19397
19403
  bbox: BoundingBoxSchema.optional(),
19398
19404
  /** Heavy JSON — omitted in slim projection. */
19399
19405
  zones: array(string()).readonly().optional(),
19406
+ /**
19407
+ * How far inside each stamped zone the box actually was, as a percentage of
19408
+ * the BOX area.
19409
+ *
19410
+ * Membership alone cannot express "at least a third of it inside", which is
19411
+ * the bar an operator argues with — and the number already existed: the
19412
+ * engine computed it, the pipeline logged it, and then discarded it. It
19413
+ * matters most on the events that carry no track, where a rule has nothing
19414
+ * else to judge by.
19415
+ */
19416
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
19417
+ /**
19418
+ * Present when this event describes a detection the TRACKER refused, so it
19419
+ * has no track and never will.
19420
+ *
19421
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
19422
+ * NOW?"; tracking answers a different question ("is this the same subject as
19423
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
19424
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
19425
+ * seconds with three different candidate ids — seven analysed frames in the
19426
+ * window, the subject in a handful of them, metres apart — and produced no
19427
+ * event at all.
19428
+ *
19429
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
19430
+ * with no track and no reason is indistinguishable from a track whose media
19431
+ * went missing, and a consumer that asks this one for a best shot or a
19432
+ * history is asking for something that never existed.
19433
+ */
19434
+ spawnRefused: string().optional(),
19400
19435
  /** Omitted in slim projection. */
19401
19436
  state: TrackStateSchema.optional(),
19402
19437
  /**
@@ -20470,6 +20505,60 @@ var NativeCropResultSchema = object({
20470
20505
  */
20471
20506
  tier: _enum(["native", "ram-fullframe"]).optional()
20472
20507
  });
20508
+ /**
20509
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
20510
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
20511
+ *
20512
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
20513
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
20514
+ * from, and what the detail plane's full-frame rung cuts from.
20515
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
20516
+ * window, cut by the runner at uncapped native resolution.
20517
+ *
20518
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
20519
+ */
20520
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
20521
+ /**
20522
+ * Why a park did NOT happen. Every one is logged on the runner with
20523
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
20524
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
20525
+ * never a reason to retry in a loop.
20526
+ *
20527
+ * - `handle-gone` — the native surface no longer resolves this handle (never
20528
+ * registered, past the lease bound, or the worker released it). `detail`
20529
+ * carries the runner's own miss reason.
20530
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
20531
+ */
20532
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
20533
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
20534
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20535
+ parked: literal(true),
20536
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
20537
+ nodeId: string(),
20538
+ width: number().int().positive(),
20539
+ height: number().int().positive(),
20540
+ /** JPEG bytes the parcel costs on the node. */
20541
+ bytes: number().int().nonnegative(),
20542
+ /** Whether this park replaced a parcel already held for the key. */
20543
+ replaced: boolean()
20544
+ }), object({
20545
+ parked: literal(false),
20546
+ nodeId: string(),
20547
+ reason: ParkRefusalSchema,
20548
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
20549
+ handleAgeMs: number().nullable(),
20550
+ detail: string().optional()
20551
+ })]);
20552
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
20553
+ var ParkedTrackFrameSchema = object({
20554
+ jpeg: string(),
20555
+ width: number().int().positive(),
20556
+ height: number().int().positive(),
20557
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
20558
+ timestamp: number(),
20559
+ /** When the node stored it (the node's clock). */
20560
+ parkedAt: number()
20561
+ });
20473
20562
  /** Parent detection context passed to `runDetailSubtree` — the crop's
20474
20563
  * originating detection, in FRAME-space coordinates. Reuses
20475
20564
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -20859,7 +20948,7 @@ var RunnerCameraConfigSchema = object({
20859
20948
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
20860
20949
  * analyzer providers) running on decoded frames in this runner.
20861
20950
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
20862
- * analytics, Frigate motion). The provider emits ProviderMotion
20951
+ * analytics). The provider emits ProviderMotion
20863
20952
  * events; the orchestrator forwards to `reportMotion`.
20864
20953
  */
20865
20954
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -21101,7 +21190,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21101
21190
  className: string(),
21102
21191
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
21103
21192
  sourceDeviceId: number()
21104
- }), RunStatelessStepResultSchema, { kind: "mutation" });
21193
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
21194
+ deviceId: number(),
21195
+ /** Opaque to the runner — the hub's track id. */
21196
+ trackId: string(),
21197
+ kind: ParkedFrameKindSchema,
21198
+ handle: FrameHandleSchema,
21199
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
21200
+ bbox: NativeCropBboxSchema,
21201
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
21202
+ maxWidth: number().int().positive().optional(),
21203
+ /** The frame instant (caller's clock) — orders parks for one key. */
21204
+ timestamp: number()
21205
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
21206
+ deviceId: number(),
21207
+ trackId: string(),
21208
+ kind: ParkedFrameKindSchema
21209
+ }), ParkedTrackFrameSchema.nullable()), method(object({
21210
+ deviceId: number(),
21211
+ trackId: string()
21212
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
21105
21213
  var CameraPipelineConfigSchema = object({
21106
21214
  engine: PipelineEngineChoiceSchema.optional(),
21107
21215
  steps: array(PipelineStepInputSchema).readonly(),
@@ -24030,7 +24138,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
24030
24138
  *
24031
24139
  * Implementations:
24032
24140
  * - Each camera-providing addon registers this cap natively per
24033
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
24141
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
24034
24142
  * - Returns a snapshot from the persisted device config blob — no
24035
24143
  * extra round-trip to the camera, no probing.
24036
24144
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -25416,7 +25524,7 @@ var AvailableIntegrationTypeSchema = object({
25416
25524
  * Which integration-marker cap the addon declared, so the wizard can
25417
25525
  * branch on CAP — never on addon name. `device-adoption` integrations
25418
25526
  * (Home Assistant, …) route through the broker step (Approach A);
25419
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
25527
+ * `device-provider` integrations (Reolink/ONVIF) keep the
25420
25528
  * legacy config → discovery flow.
25421
25529
  */
25422
25530
  kind: _enum(["device-adoption", "device-provider"]),
@@ -27973,13 +28081,31 @@ var RecordingManifestSchema = object({
27973
28081
  */
27974
28082
  playbackEndpoints: array(string())
27975
28083
  });
27976
- /** Recording storage usage for one camera (bytes on disk across all its
27977
- * profiles/subtrees/locations on this node). */
28084
+ /**
28085
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
28086
+ * across every profile and every resolvable location on this node.
28087
+ *
28088
+ * ## Archive vs residency, which is the whole point of this shape (D418)
28089
+ *
28090
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
28091
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
28092
+ * this camera writes to, so the two can be added up and compared.
28093
+ *
28094
+ * They were not always. Until D418 this row came from the recorder's in-RAM
28095
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
28096
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
28097
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
28098
+ * that said otherwise, and two people read it as retention eating recent
28099
+ * footage. Residency is still reported, under `residentBytes` /
28100
+ * `residentOldestMs`, which answer a different question and say so.
28101
+ */
27978
28102
  var RecordingDeviceUsageSchema = object({
27979
28103
  deviceId: number(),
28104
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
28105
+ * recordings locations. */
27980
28106
  usedBytes: number(),
27981
28107
  /**
27982
- * Start of this camera's OLDEST indexed segment, across every profile and
28108
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
27983
28109
  * location — the "Oldest footage" column in Recordings → Storage, and the
27984
28110
  * only honest answer to "is retention actually holding?" per camera.
27985
28111
  *
@@ -27989,7 +28115,24 @@ var RecordingDeviceUsageSchema = object({
27989
28115
  * (types) and the addon ship on different trains, and the addon is usually
27990
28116
  * the later of the two.
27991
28117
  */
27992
- oldestMs: number().nullable().optional()
28118
+ oldestMs: number().nullable().optional(),
28119
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
28120
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
28121
+ segments: number().optional(),
28122
+ /**
28123
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
28124
+ * its RAM index — the live tail plus the hours a reader hydrated.
28125
+ *
28126
+ * It answers "what can be served without touching the disk", never "how much
28127
+ * footage this camera has". A UI that renders it must label it as such, and
28128
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
28129
+ * it, and so does a node whose ledger could not answer.
28130
+ */
28131
+ residentBytes: number().optional(),
28132
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
28133
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
28134
+ * retention. `null` = nothing resident. */
28135
+ residentOldestMs: number().nullable().optional()
27993
28136
  });
27994
28137
  /** Recording storage usage + capacity for one storage location. */
27995
28138
  var RecordingLocationUsageSchema = object({
@@ -28027,6 +28170,17 @@ var RecordingStorageUsageSchema = object({
28027
28170
  totalUsedBytes: number(),
28028
28171
  devices: array(RecordingDeviceUsageSchema),
28029
28172
  /**
28173
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
28174
+ * disks (D418).
28175
+ *
28176
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
28177
+ * declared no ledger and the recorder REFUSED rather than answering the
28178
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
28179
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
28180
+ * and its rows are residency.
28181
+ */
28182
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
28183
+ /**
28030
28184
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
28031
28185
  * of the payload without it: the hub serves this method through a BAKED
28032
28186
  * router, so a hub whose framework train predates a change to this array
@@ -34414,6 +34568,24 @@ Object.freeze({
34414
34568
  addonId: null,
34415
34569
  access: "view"
34416
34570
  },
34571
+ "pipelineRunner.getParkedTrackFrame": {
34572
+ capName: "pipeline-runner",
34573
+ capScope: "system",
34574
+ addonId: null,
34575
+ access: "view"
34576
+ },
34577
+ "pipelineRunner.parkTrackFrame": {
34578
+ capName: "pipeline-runner",
34579
+ capScope: "system",
34580
+ addonId: null,
34581
+ access: "create"
34582
+ },
34583
+ "pipelineRunner.releaseParkedTrackFrames": {
34584
+ capName: "pipeline-runner",
34585
+ capScope: "system",
34586
+ addonId: null,
34587
+ access: "create"
34588
+ },
34417
34589
  "pipelineRunner.reportMotion": {
34418
34590
  capName: "pipeline-runner",
34419
34591
  capScope: "system",
@@ -37691,6 +37863,21 @@ Object.freeze({
37691
37863
  form: "single",
37692
37864
  optional: false
37693
37865
  }],
37866
+ "pipelineRunner.getParkedTrackFrame": [{
37867
+ name: "deviceId",
37868
+ form: "single",
37869
+ optional: false
37870
+ }],
37871
+ "pipelineRunner.parkTrackFrame": [{
37872
+ name: "deviceId",
37873
+ form: "single",
37874
+ optional: false
37875
+ }],
37876
+ "pipelineRunner.releaseParkedTrackFrames": [{
37877
+ name: "deviceId",
37878
+ form: "single",
37879
+ optional: false
37880
+ }],
37694
37881
  "pipelineRunner.reportMotion": [{
37695
37882
  name: "deviceId",
37696
37883
  form: "single",
@@ -38382,7 +38569,7 @@ var PreviewTextField = string().max(200);
38382
38569
  * Whether the notification's preview is a STILL or a short animation.
38383
38570
  *
38384
38571
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
38385
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
38572
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
38386
38573
  * night reads better as three seconds of motion than as one frame of it. Both
38387
38574
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
38388
38575
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -1,5 +1,5 @@
1
1
  import * as crypto$1 from "node:crypto";
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.
@@ -12766,7 +12765,7 @@ DeviceType.Camera;
12766
12765
  var SourceInfoSchema = object({
12767
12766
  /** Live dispatch key — mutable when the source system allows rename. */
12768
12767
  id: string(),
12769
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
12768
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
12770
12769
  system: string(),
12771
12770
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
12772
12771
  * Used to detect rename when `id` changes. */
@@ -13278,7 +13277,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
13278
13277
  * - `device-management.router.ts` (deleted in Phase 2)
13279
13278
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
13280
13279
  *
13281
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
13280
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
13282
13281
  * fork into separate processes but never run on remote cluster agents. Therefore:
13283
13282
  * - No nodeId routing needed — this is a pure hub singleton.
13284
13283
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -17288,7 +17287,7 @@ var NcRuleInputSchema = object({
17288
17287
  * The measured seven-person arrival on device 590 spans 110 s with every
17289
17288
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
17290
17289
  * idle cutoff holds it as one and ends it when the arrival actually ends.
17291
- * 30 is Frigate's shipped value for the same decision.
17290
+ * 30 s is a widely shipped value for the same decision.
17292
17291
  *
17293
17292
  * ### What it replaces
17294
17293
  *
@@ -19346,6 +19345,13 @@ var ZoneCrossingSchema = object({
19346
19345
  /** Zone display name at crossing time (falls back to the id). */
19347
19346
  zoneName: string().optional()
19348
19347
  });
19348
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
19349
+ var ZoneOverlapSchema = object({
19350
+ zoneId: string(),
19351
+ zoneName: string().optional(),
19352
+ /** Percentage of the BOX area inside the zone, 0–100. */
19353
+ overlapPct: number()
19354
+ });
19349
19355
  var ObjectEventSchema = object({
19350
19356
  ...BaseEventFields,
19351
19357
  kind: literal("object"),
@@ -19370,6 +19376,35 @@ var ObjectEventSchema = object({
19370
19376
  bbox: BoundingBoxSchema.optional(),
19371
19377
  /** Heavy JSON — omitted in slim projection. */
19372
19378
  zones: array(string()).readonly().optional(),
19379
+ /**
19380
+ * How far inside each stamped zone the box actually was, as a percentage of
19381
+ * the BOX area.
19382
+ *
19383
+ * Membership alone cannot express "at least a third of it inside", which is
19384
+ * the bar an operator argues with — and the number already existed: the
19385
+ * engine computed it, the pipeline logged it, and then discarded it. It
19386
+ * matters most on the events that carry no track, where a rule has nothing
19387
+ * else to judge by.
19388
+ */
19389
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
19390
+ /**
19391
+ * Present when this event describes a detection the TRACKER refused, so it
19392
+ * has no track and never will.
19393
+ *
19394
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
19395
+ * NOW?"; tracking answers a different question ("is this the same subject as
19396
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
19397
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
19398
+ * seconds with three different candidate ids — seven analysed frames in the
19399
+ * window, the subject in a handful of them, metres apart — and produced no
19400
+ * event at all.
19401
+ *
19402
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
19403
+ * with no track and no reason is indistinguishable from a track whose media
19404
+ * went missing, and a consumer that asks this one for a best shot or a
19405
+ * history is asking for something that never existed.
19406
+ */
19407
+ spawnRefused: string().optional(),
19373
19408
  /** Omitted in slim projection. */
19374
19409
  state: TrackStateSchema.optional(),
19375
19410
  /**
@@ -20443,6 +20478,60 @@ var NativeCropResultSchema = object({
20443
20478
  */
20444
20479
  tier: _enum(["native", "ram-fullframe"]).optional()
20445
20480
  });
20481
+ /**
20482
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
20483
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
20484
+ *
20485
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
20486
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
20487
+ * from, and what the detail plane's full-frame rung cuts from.
20488
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
20489
+ * window, cut by the runner at uncapped native resolution.
20490
+ *
20491
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
20492
+ */
20493
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
20494
+ /**
20495
+ * Why a park did NOT happen. Every one is logged on the runner with
20496
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
20497
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
20498
+ * never a reason to retry in a loop.
20499
+ *
20500
+ * - `handle-gone` — the native surface no longer resolves this handle (never
20501
+ * registered, past the lease bound, or the worker released it). `detail`
20502
+ * carries the runner's own miss reason.
20503
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
20504
+ */
20505
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
20506
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
20507
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20508
+ parked: literal(true),
20509
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
20510
+ nodeId: string(),
20511
+ width: number().int().positive(),
20512
+ height: number().int().positive(),
20513
+ /** JPEG bytes the parcel costs on the node. */
20514
+ bytes: number().int().nonnegative(),
20515
+ /** Whether this park replaced a parcel already held for the key. */
20516
+ replaced: boolean()
20517
+ }), object({
20518
+ parked: literal(false),
20519
+ nodeId: string(),
20520
+ reason: ParkRefusalSchema,
20521
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
20522
+ handleAgeMs: number().nullable(),
20523
+ detail: string().optional()
20524
+ })]);
20525
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
20526
+ var ParkedTrackFrameSchema = object({
20527
+ jpeg: string(),
20528
+ width: number().int().positive(),
20529
+ height: number().int().positive(),
20530
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
20531
+ timestamp: number(),
20532
+ /** When the node stored it (the node's clock). */
20533
+ parkedAt: number()
20534
+ });
20446
20535
  /** Parent detection context passed to `runDetailSubtree` — the crop's
20447
20536
  * originating detection, in FRAME-space coordinates. Reuses
20448
20537
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -20832,7 +20921,7 @@ var RunnerCameraConfigSchema = object({
20832
20921
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
20833
20922
  * analyzer providers) running on decoded frames in this runner.
20834
20923
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
20835
- * analytics, Frigate motion). The provider emits ProviderMotion
20924
+ * analytics). The provider emits ProviderMotion
20836
20925
  * events; the orchestrator forwards to `reportMotion`.
20837
20926
  */
20838
20927
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -21074,7 +21163,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21074
21163
  className: string(),
21075
21164
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
21076
21165
  sourceDeviceId: number()
21077
- }), RunStatelessStepResultSchema, { kind: "mutation" });
21166
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
21167
+ deviceId: number(),
21168
+ /** Opaque to the runner — the hub's track id. */
21169
+ trackId: string(),
21170
+ kind: ParkedFrameKindSchema,
21171
+ handle: FrameHandleSchema,
21172
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
21173
+ bbox: NativeCropBboxSchema,
21174
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
21175
+ maxWidth: number().int().positive().optional(),
21176
+ /** The frame instant (caller's clock) — orders parks for one key. */
21177
+ timestamp: number()
21178
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
21179
+ deviceId: number(),
21180
+ trackId: string(),
21181
+ kind: ParkedFrameKindSchema
21182
+ }), ParkedTrackFrameSchema.nullable()), method(object({
21183
+ deviceId: number(),
21184
+ trackId: string()
21185
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
21078
21186
  var CameraPipelineConfigSchema = object({
21079
21187
  engine: PipelineEngineChoiceSchema.optional(),
21080
21188
  steps: array(PipelineStepInputSchema).readonly(),
@@ -24003,7 +24111,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
24003
24111
  *
24004
24112
  * Implementations:
24005
24113
  * - Each camera-providing addon registers this cap natively per
24006
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
24114
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
24007
24115
  * - Returns a snapshot from the persisted device config blob — no
24008
24116
  * extra round-trip to the camera, no probing.
24009
24117
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -25389,7 +25497,7 @@ var AvailableIntegrationTypeSchema = object({
25389
25497
  * Which integration-marker cap the addon declared, so the wizard can
25390
25498
  * branch on CAP — never on addon name. `device-adoption` integrations
25391
25499
  * (Home Assistant, …) route through the broker step (Approach A);
25392
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
25500
+ * `device-provider` integrations (Reolink/ONVIF) keep the
25393
25501
  * legacy config → discovery flow.
25394
25502
  */
25395
25503
  kind: _enum(["device-adoption", "device-provider"]),
@@ -27946,13 +28054,31 @@ var RecordingManifestSchema = object({
27946
28054
  */
27947
28055
  playbackEndpoints: array(string())
27948
28056
  });
27949
- /** Recording storage usage for one camera (bytes on disk across all its
27950
- * profiles/subtrees/locations on this node). */
28057
+ /**
28058
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
28059
+ * across every profile and every resolvable location on this node.
28060
+ *
28061
+ * ## Archive vs residency, which is the whole point of this shape (D418)
28062
+ *
28063
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
28064
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
28065
+ * this camera writes to, so the two can be added up and compared.
28066
+ *
28067
+ * They were not always. Until D418 this row came from the recorder's in-RAM
28068
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
28069
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
28070
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
28071
+ * that said otherwise, and two people read it as retention eating recent
28072
+ * footage. Residency is still reported, under `residentBytes` /
28073
+ * `residentOldestMs`, which answer a different question and say so.
28074
+ */
27951
28075
  var RecordingDeviceUsageSchema = object({
27952
28076
  deviceId: number(),
28077
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
28078
+ * recordings locations. */
27953
28079
  usedBytes: number(),
27954
28080
  /**
27955
- * Start of this camera's OLDEST indexed segment, across every profile and
28081
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
27956
28082
  * location — the "Oldest footage" column in Recordings → Storage, and the
27957
28083
  * only honest answer to "is retention actually holding?" per camera.
27958
28084
  *
@@ -27962,7 +28088,24 @@ var RecordingDeviceUsageSchema = object({
27962
28088
  * (types) and the addon ship on different trains, and the addon is usually
27963
28089
  * the later of the two.
27964
28090
  */
27965
- oldestMs: number().nullable().optional()
28091
+ oldestMs: number().nullable().optional(),
28092
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
28093
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
28094
+ segments: number().optional(),
28095
+ /**
28096
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
28097
+ * its RAM index — the live tail plus the hours a reader hydrated.
28098
+ *
28099
+ * It answers "what can be served without touching the disk", never "how much
28100
+ * footage this camera has". A UI that renders it must label it as such, and
28101
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
28102
+ * it, and so does a node whose ledger could not answer.
28103
+ */
28104
+ residentBytes: number().optional(),
28105
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
28106
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
28107
+ * retention. `null` = nothing resident. */
28108
+ residentOldestMs: number().nullable().optional()
27966
28109
  });
27967
28110
  /** Recording storage usage + capacity for one storage location. */
27968
28111
  var RecordingLocationUsageSchema = object({
@@ -28000,6 +28143,17 @@ var RecordingStorageUsageSchema = object({
28000
28143
  totalUsedBytes: number(),
28001
28144
  devices: array(RecordingDeviceUsageSchema),
28002
28145
  /**
28146
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
28147
+ * disks (D418).
28148
+ *
28149
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
28150
+ * declared no ledger and the recorder REFUSED rather than answering the
28151
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
28152
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
28153
+ * and its rows are residency.
28154
+ */
28155
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
28156
+ /**
28003
28157
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
28004
28158
  * of the payload without it: the hub serves this method through a BAKED
28005
28159
  * router, so a hub whose framework train predates a change to this array
@@ -34387,6 +34541,24 @@ Object.freeze({
34387
34541
  addonId: null,
34388
34542
  access: "view"
34389
34543
  },
34544
+ "pipelineRunner.getParkedTrackFrame": {
34545
+ capName: "pipeline-runner",
34546
+ capScope: "system",
34547
+ addonId: null,
34548
+ access: "view"
34549
+ },
34550
+ "pipelineRunner.parkTrackFrame": {
34551
+ capName: "pipeline-runner",
34552
+ capScope: "system",
34553
+ addonId: null,
34554
+ access: "create"
34555
+ },
34556
+ "pipelineRunner.releaseParkedTrackFrames": {
34557
+ capName: "pipeline-runner",
34558
+ capScope: "system",
34559
+ addonId: null,
34560
+ access: "create"
34561
+ },
34390
34562
  "pipelineRunner.reportMotion": {
34391
34563
  capName: "pipeline-runner",
34392
34564
  capScope: "system",
@@ -37664,6 +37836,21 @@ Object.freeze({
37664
37836
  form: "single",
37665
37837
  optional: false
37666
37838
  }],
37839
+ "pipelineRunner.getParkedTrackFrame": [{
37840
+ name: "deviceId",
37841
+ form: "single",
37842
+ optional: false
37843
+ }],
37844
+ "pipelineRunner.parkTrackFrame": [{
37845
+ name: "deviceId",
37846
+ form: "single",
37847
+ optional: false
37848
+ }],
37849
+ "pipelineRunner.releaseParkedTrackFrames": [{
37850
+ name: "deviceId",
37851
+ form: "single",
37852
+ optional: false
37853
+ }],
37667
37854
  "pipelineRunner.reportMotion": [{
37668
37855
  name: "deviceId",
37669
37856
  form: "single",
@@ -38355,7 +38542,7 @@ var PreviewTextField = string().max(200);
38355
38542
  * Whether the notification's preview is a STILL or a short animation.
38356
38543
  *
38357
38544
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
38358
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
38545
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
38359
38546
  * night reads better as three seconds of motion than as one frame of it. Both
38360
38547
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
38361
38548
  * 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-export-alexa",
3
- "version": "1.2.96",
3
+ "version": "1.2.98",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",