@camstack/addon-tailscale 1.2.90 → 1.2.93

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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-DvJMHeGc.js");
27
+ const require_dist = require("../dist-CTEYUMoP.js");
28
28
  let node_child_process = require("node:child_process");
29
29
  let node_util = require("node:util");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-CUQ2MTx9.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-DhBYDSGp.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as fs from "node:fs";
@@ -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.
@@ -12540,7 +12539,7 @@ DeviceType.Camera;
12540
12539
  var SourceInfoSchema = object({
12541
12540
  /** Live dispatch key — mutable when the source system allows rename. */
12542
12541
  id: string(),
12543
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
12542
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
12544
12543
  system: string(),
12545
12544
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
12546
12545
  * Used to detect rename when `id` changes. */
@@ -13027,7 +13026,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
13027
13026
  * - `device-management.router.ts` (deleted in Phase 2)
13028
13027
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
13029
13028
  *
13030
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
13029
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
13031
13030
  * fork into separate processes but never run on remote cluster agents. Therefore:
13032
13031
  * - No nodeId routing needed — this is a pure hub singleton.
13033
13032
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -17054,7 +17053,7 @@ var NcRuleInputSchema = object({
17054
17053
  * The measured seven-person arrival on device 590 spans 110 s with every
17055
17054
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
17056
17055
  * idle cutoff holds it as one and ends it when the arrival actually ends.
17057
- * 30 is Frigate's shipped value for the same decision.
17056
+ * 30 s is a widely shipped value for the same decision.
17058
17057
  *
17059
17058
  * ### What it replaces
17060
17059
  *
@@ -19096,6 +19095,13 @@ var ZoneCrossingSchema = object({
19096
19095
  /** Zone display name at crossing time (falls back to the id). */
19097
19096
  zoneName: string().optional()
19098
19097
  });
19098
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
19099
+ var ZoneOverlapSchema = object({
19100
+ zoneId: string(),
19101
+ zoneName: string().optional(),
19102
+ /** Percentage of the BOX area inside the zone, 0–100. */
19103
+ overlapPct: number()
19104
+ });
19099
19105
  var ObjectEventSchema = object({
19100
19106
  ...BaseEventFields,
19101
19107
  kind: literal("object"),
@@ -19120,6 +19126,35 @@ var ObjectEventSchema = object({
19120
19126
  bbox: BoundingBoxSchema.optional(),
19121
19127
  /** Heavy JSON — omitted in slim projection. */
19122
19128
  zones: array(string()).readonly().optional(),
19129
+ /**
19130
+ * How far inside each stamped zone the box actually was, as a percentage of
19131
+ * the BOX area.
19132
+ *
19133
+ * Membership alone cannot express "at least a third of it inside", which is
19134
+ * the bar an operator argues with — and the number already existed: the
19135
+ * engine computed it, the pipeline logged it, and then discarded it. It
19136
+ * matters most on the events that carry no track, where a rule has nothing
19137
+ * else to judge by.
19138
+ */
19139
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
19140
+ /**
19141
+ * Present when this event describes a detection the TRACKER refused, so it
19142
+ * has no track and never will.
19143
+ *
19144
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
19145
+ * NOW?"; tracking answers a different question ("is this the same subject as
19146
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
19147
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
19148
+ * seconds with three different candidate ids — seven analysed frames in the
19149
+ * window, the subject in a handful of them, metres apart — and produced no
19150
+ * event at all.
19151
+ *
19152
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
19153
+ * with no track and no reason is indistinguishable from a track whose media
19154
+ * went missing, and a consumer that asks this one for a best shot or a
19155
+ * history is asking for something that never existed.
19156
+ */
19157
+ spawnRefused: string().optional(),
19123
19158
  /** Omitted in slim projection. */
19124
19159
  state: TrackStateSchema.optional(),
19125
19160
  /**
@@ -19546,7 +19581,17 @@ var EventDensityBucketSchema = object({
19546
19581
  bucketStart: number(),
19547
19582
  motion: number().int(),
19548
19583
  object: number().int(),
19549
- audio: number().int()
19584
+ audio: number().int(),
19585
+ /**
19586
+ * Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
19587
+ * as opposed to `audio`, which is their COUNT (D431).
19588
+ *
19589
+ * ABSENT when the bucket holds no audio event. Absence means "nothing was
19590
+ * measured", which is not the same claim as silence, and a lane that cannot
19591
+ * tell them apart paints a quiet hour at full scale — which is exactly what
19592
+ * the count-on-a-level-meter did.
19593
+ */
19594
+ audioDbfs: number().optional()
19550
19595
  });
19551
19596
  /**
19552
19597
  * One camera's row in a `getEventDensityBatch` answer.
@@ -20193,6 +20238,60 @@ var NativeCropResultSchema = object({
20193
20238
  */
20194
20239
  tier: _enum(["native", "ram-fullframe"]).optional()
20195
20240
  });
20241
+ /**
20242
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
20243
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
20244
+ *
20245
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
20246
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
20247
+ * from, and what the detail plane's full-frame rung cuts from.
20248
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
20249
+ * window, cut by the runner at uncapped native resolution.
20250
+ *
20251
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
20252
+ */
20253
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
20254
+ /**
20255
+ * Why a park did NOT happen. Every one is logged on the runner with
20256
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
20257
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
20258
+ * never a reason to retry in a loop.
20259
+ *
20260
+ * - `handle-gone` — the native surface no longer resolves this handle (never
20261
+ * registered, past the lease bound, or the worker released it). `detail`
20262
+ * carries the runner's own miss reason.
20263
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
20264
+ */
20265
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
20266
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
20267
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20268
+ parked: literal(true),
20269
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
20270
+ nodeId: string(),
20271
+ width: number().int().positive(),
20272
+ height: number().int().positive(),
20273
+ /** JPEG bytes the parcel costs on the node. */
20274
+ bytes: number().int().nonnegative(),
20275
+ /** Whether this park replaced a parcel already held for the key. */
20276
+ replaced: boolean()
20277
+ }), object({
20278
+ parked: literal(false),
20279
+ nodeId: string(),
20280
+ reason: ParkRefusalSchema,
20281
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
20282
+ handleAgeMs: number().nullable(),
20283
+ detail: string().optional()
20284
+ })]);
20285
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
20286
+ var ParkedTrackFrameSchema = object({
20287
+ jpeg: string(),
20288
+ width: number().int().positive(),
20289
+ height: number().int().positive(),
20290
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
20291
+ timestamp: number(),
20292
+ /** When the node stored it (the node's clock). */
20293
+ parkedAt: number()
20294
+ });
20196
20295
  /** Parent detection context passed to `runDetailSubtree` — the crop's
20197
20296
  * originating detection, in FRAME-space coordinates. Reuses
20198
20297
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -20582,7 +20681,7 @@ var RunnerCameraConfigSchema = object({
20582
20681
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
20583
20682
  * analyzer providers) running on decoded frames in this runner.
20584
20683
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
20585
- * analytics, Frigate motion). The provider emits ProviderMotion
20684
+ * analytics). The provider emits ProviderMotion
20586
20685
  * events; the orchestrator forwards to `reportMotion`.
20587
20686
  */
20588
20687
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -20824,7 +20923,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
20824
20923
  className: string(),
20825
20924
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
20826
20925
  sourceDeviceId: number()
20827
- }), RunStatelessStepResultSchema, { kind: "mutation" });
20926
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
20927
+ deviceId: number(),
20928
+ /** Opaque to the runner — the hub's track id. */
20929
+ trackId: string(),
20930
+ kind: ParkedFrameKindSchema,
20931
+ handle: FrameHandleSchema,
20932
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
20933
+ bbox: NativeCropBboxSchema,
20934
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
20935
+ maxWidth: number().int().positive().optional(),
20936
+ /** The frame instant (caller's clock) — orders parks for one key. */
20937
+ timestamp: number()
20938
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
20939
+ deviceId: number(),
20940
+ trackId: string(),
20941
+ kind: ParkedFrameKindSchema
20942
+ }), ParkedTrackFrameSchema.nullable()), method(object({
20943
+ deviceId: number(),
20944
+ trackId: string()
20945
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
20828
20946
  var CameraPipelineConfigSchema = object({
20829
20947
  engine: PipelineEngineChoiceSchema.optional(),
20830
20948
  steps: array(PipelineStepInputSchema).readonly(),
@@ -23753,7 +23871,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
23753
23871
  *
23754
23872
  * Implementations:
23755
23873
  * - Each camera-providing addon registers this cap natively per
23756
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
23874
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
23757
23875
  * - Returns a snapshot from the persisted device config blob — no
23758
23876
  * extra round-trip to the camera, no probing.
23759
23877
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -25139,7 +25257,7 @@ var AvailableIntegrationTypeSchema = object({
25139
25257
  * Which integration-marker cap the addon declared, so the wizard can
25140
25258
  * branch on CAP — never on addon name. `device-adoption` integrations
25141
25259
  * (Home Assistant, …) route through the broker step (Approach A);
25142
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
25260
+ * `device-provider` integrations (Reolink/ONVIF) keep the
25143
25261
  * legacy config → discovery flow.
25144
25262
  */
25145
25263
  kind: _enum(["device-adoption", "device-provider"]),
@@ -27701,7 +27819,23 @@ var RecordingRangeSchema = object({
27701
27819
  });
27702
27820
  var RecordingAvailabilitySchema = object({
27703
27821
  deviceId: number(),
27704
- ranges: array(RecordingRangeSchema)
27822
+ ranges: array(RecordingRangeSchema),
27823
+ /**
27824
+ * Every profile this camera has footage in — not only the one `ranges`
27825
+ * describes (D433).
27826
+ *
27827
+ * `ranges` answers for ONE profile by design: the timeline is a single bar,
27828
+ * and enumerating all of them triples the directory reads for a bar that
27829
+ * would look identical. But the answer used to say nothing about that, so a
27830
+ * caller asking "what can I export?" read the single preferred profile as
27831
+ * the only one that exists — on this deployment every camera records `high`
27832
+ * AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
27833
+ * UI could not see it.
27834
+ *
27835
+ * Cheap: it is the same shallow directory read the profile CHOICE already
27836
+ * makes. Ask for a specific profile's ranges with the `profile` input.
27837
+ */
27838
+ profilesWithFootage: array(string())
27705
27839
  });
27706
27840
  var RecordingDaysSchema = object({
27707
27841
  deviceId: number(),
@@ -27727,7 +27861,11 @@ var RecordingDaysSchema = object({
27727
27861
  var RecordingAvailabilityForDeviceSchema = object({
27728
27862
  deviceId: number(),
27729
27863
  read: _enum(["read", "unreadable"]),
27730
- ranges: array(RecordingRangeSchema).readonly()
27864
+ ranges: array(RecordingRangeSchema).readonly(),
27865
+ /** Same field, same meaning, as the singular answer (D433). A row that
27866
+ * dropped it would tell a grid caller the archive holds one profile.
27867
+ * Empty on an `'unreadable'` row: nobody looked. */
27868
+ profilesWithFootage: array(string()).readonly()
27731
27869
  });
27732
27870
  /**
27733
27871
  * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
@@ -27757,13 +27895,31 @@ var RecordingManifestSchema = object({
27757
27895
  */
27758
27896
  playbackEndpoints: array(string())
27759
27897
  });
27760
- /** Recording storage usage for one camera (bytes on disk across all its
27761
- * profiles/subtrees/locations on this node). */
27898
+ /**
27899
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
27900
+ * across every profile and every resolvable location on this node.
27901
+ *
27902
+ * ## Archive vs residency, which is the whole point of this shape (D418)
27903
+ *
27904
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
27905
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
27906
+ * this camera writes to, so the two can be added up and compared.
27907
+ *
27908
+ * They were not always. Until D418 this row came from the recorder's in-RAM
27909
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
27910
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
27911
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
27912
+ * that said otherwise, and two people read it as retention eating recent
27913
+ * footage. Residency is still reported, under `residentBytes` /
27914
+ * `residentOldestMs`, which answer a different question and say so.
27915
+ */
27762
27916
  var RecordingDeviceUsageSchema = object({
27763
27917
  deviceId: number(),
27918
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
27919
+ * recordings locations. */
27764
27920
  usedBytes: number(),
27765
27921
  /**
27766
- * Start of this camera's OLDEST indexed segment, across every profile and
27922
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
27767
27923
  * location — the "Oldest footage" column in Recordings → Storage, and the
27768
27924
  * only honest answer to "is retention actually holding?" per camera.
27769
27925
  *
@@ -27773,7 +27929,24 @@ var RecordingDeviceUsageSchema = object({
27773
27929
  * (types) and the addon ship on different trains, and the addon is usually
27774
27930
  * the later of the two.
27775
27931
  */
27776
- oldestMs: number().nullable().optional()
27932
+ oldestMs: number().nullable().optional(),
27933
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
27934
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
27935
+ segments: number().optional(),
27936
+ /**
27937
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
27938
+ * its RAM index — the live tail plus the hours a reader hydrated.
27939
+ *
27940
+ * It answers "what can be served without touching the disk", never "how much
27941
+ * footage this camera has". A UI that renders it must label it as such, and
27942
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
27943
+ * it, and so does a node whose ledger could not answer.
27944
+ */
27945
+ residentBytes: number().optional(),
27946
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
27947
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
27948
+ * retention. `null` = nothing resident. */
27949
+ residentOldestMs: number().nullable().optional()
27777
27950
  });
27778
27951
  /** Recording storage usage + capacity for one storage location. */
27779
27952
  var RecordingLocationUsageSchema = object({
@@ -27811,6 +27984,17 @@ var RecordingStorageUsageSchema = object({
27811
27984
  totalUsedBytes: number(),
27812
27985
  devices: array(RecordingDeviceUsageSchema),
27813
27986
  /**
27987
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
27988
+ * disks (D418).
27989
+ *
27990
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
27991
+ * declared no ledger and the recorder REFUSED rather than answering the
27992
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
27993
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
27994
+ * and its rows are residency.
27995
+ */
27996
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
27997
+ /**
27814
27998
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
27815
27999
  * of the payload without it: the hub serves this method through a BAKED
27816
28000
  * router, so a hub whose framework train predates a change to this array
@@ -27971,7 +28155,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
27971
28155
  method(object({
27972
28156
  deviceId: number(),
27973
28157
  fromMs: number(),
27974
- toMs: number()
28158
+ toMs: number(),
28159
+ /**
28160
+ * Answer for THIS profile instead of the preferred one (D433). Absent
28161
+ * keeps the timeline's behaviour — one bar, one profile, one set of
28162
+ * reads. `profilesWithFootage` on the answer says what may be asked
28163
+ * for.
28164
+ */
28165
+ profile: string().optional()
27975
28166
  }), RecordingAvailabilitySchema, {
27976
28167
  kind: "query",
27977
28168
  auth: "protected"
@@ -34198,6 +34389,24 @@ Object.freeze({
34198
34389
  addonId: null,
34199
34390
  access: "view"
34200
34391
  },
34392
+ "pipelineRunner.getParkedTrackFrame": {
34393
+ capName: "pipeline-runner",
34394
+ capScope: "system",
34395
+ addonId: null,
34396
+ access: "view"
34397
+ },
34398
+ "pipelineRunner.parkTrackFrame": {
34399
+ capName: "pipeline-runner",
34400
+ capScope: "system",
34401
+ addonId: null,
34402
+ access: "create"
34403
+ },
34404
+ "pipelineRunner.releaseParkedTrackFrames": {
34405
+ capName: "pipeline-runner",
34406
+ capScope: "system",
34407
+ addonId: null,
34408
+ access: "create"
34409
+ },
34201
34410
  "pipelineRunner.reportMotion": {
34202
34411
  capName: "pipeline-runner",
34203
34412
  capScope: "system",
@@ -37475,6 +37684,21 @@ Object.freeze({
37475
37684
  form: "single",
37476
37685
  optional: false
37477
37686
  }],
37687
+ "pipelineRunner.getParkedTrackFrame": [{
37688
+ name: "deviceId",
37689
+ form: "single",
37690
+ optional: false
37691
+ }],
37692
+ "pipelineRunner.parkTrackFrame": [{
37693
+ name: "deviceId",
37694
+ form: "single",
37695
+ optional: false
37696
+ }],
37697
+ "pipelineRunner.releaseParkedTrackFrames": [{
37698
+ name: "deviceId",
37699
+ form: "single",
37700
+ optional: false
37701
+ }],
37478
37702
  "pipelineRunner.reportMotion": [{
37479
37703
  name: "deviceId",
37480
37704
  form: "single",
@@ -38166,7 +38390,7 @@ var PreviewTextField = string().max(200);
38166
38390
  * Whether the notification's preview is a STILL or a short animation.
38167
38391
  *
38168
38392
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
38169
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
38393
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
38170
38394
  * night reads better as three seconds of motion than as one frame of it. Both
38171
38395
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
38172
38396
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-CnLqLOKs.mjs
1
+ //#region ../types/dist/event-category-DAXzJeTX.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -590,7 +590,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
590
590
  * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
591
591
  */
592
592
  EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
593
- EventCategory["FrigateLiveEvent"] = "frigate.live-event";
594
593
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
595
594
  /**
596
595
  * Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
@@ -12540,7 +12539,7 @@ DeviceType.Camera;
12540
12539
  var SourceInfoSchema = object({
12541
12540
  /** Live dispatch key — mutable when the source system allows rename. */
12542
12541
  id: string(),
12543
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
12542
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
12544
12543
  system: string(),
12545
12544
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
12546
12545
  * Used to detect rename when `id` changes. */
@@ -13027,7 +13026,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
13027
13026
  * - `device-management.router.ts` (deleted in Phase 2)
13028
13027
  * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
13029
13028
  *
13030
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
13029
+ * All device provider addons (rtsp, onvif, …) are hub-local: they may
13031
13030
  * fork into separate processes but never run on remote cluster agents. Therefore:
13032
13031
  * - No nodeId routing needed — this is a pure hub singleton.
13033
13032
  * - The hub's DeviceRegistry is the single source of truth for all live devices.
@@ -17054,7 +17053,7 @@ var NcRuleInputSchema = object({
17054
17053
  * The measured seven-person arrival on device 590 spans 110 s with every
17055
17054
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
17056
17055
  * idle cutoff holds it as one and ends it when the arrival actually ends.
17057
- * 30 is Frigate's shipped value for the same decision.
17056
+ * 30 s is a widely shipped value for the same decision.
17058
17057
  *
17059
17058
  * ### What it replaces
17060
17059
  *
@@ -19096,6 +19095,13 @@ var ZoneCrossingSchema = object({
19096
19095
  /** Zone display name at crossing time (falls back to the id). */
19097
19096
  zoneName: string().optional()
19098
19097
  });
19098
+ /** One zone a box was stamped with, and how much of the BOX fell inside it. */
19099
+ var ZoneOverlapSchema = object({
19100
+ zoneId: string(),
19101
+ zoneName: string().optional(),
19102
+ /** Percentage of the BOX area inside the zone, 0–100. */
19103
+ overlapPct: number()
19104
+ });
19099
19105
  var ObjectEventSchema = object({
19100
19106
  ...BaseEventFields,
19101
19107
  kind: literal("object"),
@@ -19120,6 +19126,35 @@ var ObjectEventSchema = object({
19120
19126
  bbox: BoundingBoxSchema.optional(),
19121
19127
  /** Heavy JSON — omitted in slim projection. */
19122
19128
  zones: array(string()).readonly().optional(),
19129
+ /**
19130
+ * How far inside each stamped zone the box actually was, as a percentage of
19131
+ * the BOX area.
19132
+ *
19133
+ * Membership alone cannot express "at least a third of it inside", which is
19134
+ * the bar an operator argues with — and the number already existed: the
19135
+ * engine computed it, the pipeline logged it, and then discarded it. It
19136
+ * matters most on the events that carry no track, where a rule has nothing
19137
+ * else to judge by.
19138
+ */
19139
+ zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
19140
+ /**
19141
+ * Present when this event describes a detection the TRACKER refused, so it
19142
+ * has no track and never will.
19143
+ *
19144
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
19145
+ * NOW?"; tracking answers a different question ("is this the same subject as
19146
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
19147
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
19148
+ * seconds with three different candidate ids — seven analysed frames in the
19149
+ * window, the subject in a handful of them, metres apart — and produced no
19150
+ * event at all.
19151
+ *
19152
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
19153
+ * with no track and no reason is indistinguishable from a track whose media
19154
+ * went missing, and a consumer that asks this one for a best shot or a
19155
+ * history is asking for something that never existed.
19156
+ */
19157
+ spawnRefused: string().optional(),
19123
19158
  /** Omitted in slim projection. */
19124
19159
  state: TrackStateSchema.optional(),
19125
19160
  /**
@@ -19546,7 +19581,17 @@ var EventDensityBucketSchema = object({
19546
19581
  bucketStart: number(),
19547
19582
  motion: number().int(),
19548
19583
  object: number().int(),
19549
- audio: number().int()
19584
+ audio: number().int(),
19585
+ /**
19586
+ * Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
19587
+ * as opposed to `audio`, which is their COUNT (D431).
19588
+ *
19589
+ * ABSENT when the bucket holds no audio event. Absence means "nothing was
19590
+ * measured", which is not the same claim as silence, and a lane that cannot
19591
+ * tell them apart paints a quiet hour at full scale — which is exactly what
19592
+ * the count-on-a-level-meter did.
19593
+ */
19594
+ audioDbfs: number().optional()
19550
19595
  });
19551
19596
  /**
19552
19597
  * One camera's row in a `getEventDensityBatch` answer.
@@ -20193,6 +20238,60 @@ var NativeCropResultSchema = object({
20193
20238
  */
20194
20239
  tier: _enum(["native", "ram-fullframe"]).optional()
20195
20240
  });
20241
+ /**
20242
+ * What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
20243
+ * kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
20244
+ *
20245
+ * - `keyFrame` — the track's clean best FULL frame at native width (capped by
20246
+ * the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
20247
+ * from, and what the detail plane's full-frame rung cuts from.
20248
+ * - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
20249
+ * window, cut by the runner at uncapped native resolution.
20250
+ *
20251
+ * The runner never interprets `trackId`; it is an opaque key the hub owns.
20252
+ */
20253
+ var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
20254
+ /**
20255
+ * Why a park did NOT happen. Every one is logged on the runner with
20256
+ * `tags: { deviceId }` and the handle's measured age, because a handle already
20257
+ * gone at park time IS the defect the 150–500 ms window exists to prevent —
20258
+ * never a reason to retry in a loop.
20259
+ *
20260
+ * - `handle-gone` — the native surface no longer resolves this handle (never
20261
+ * registered, past the lease bound, or the worker released it). `detail`
20262
+ * carries the runner's own miss reason.
20263
+ * - `encode-failed` — pixels resolved and the JPEG encode threw.
20264
+ */
20265
+ var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
20266
+ /** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
20267
+ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20268
+ parked: literal(true),
20269
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
20270
+ nodeId: string(),
20271
+ width: number().int().positive(),
20272
+ height: number().int().positive(),
20273
+ /** JPEG bytes the parcel costs on the node. */
20274
+ bytes: number().int().nonnegative(),
20275
+ /** Whether this park replaced a parcel already held for the key. */
20276
+ replaced: boolean()
20277
+ }), object({
20278
+ parked: literal(false),
20279
+ nodeId: string(),
20280
+ reason: ParkRefusalSchema,
20281
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
20282
+ handleAgeMs: number().nullable(),
20283
+ detail: string().optional()
20284
+ })]);
20285
+ /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
20286
+ var ParkedTrackFrameSchema = object({
20287
+ jpeg: string(),
20288
+ width: number().int().positive(),
20289
+ height: number().int().positive(),
20290
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
20291
+ timestamp: number(),
20292
+ /** When the node stored it (the node's clock). */
20293
+ parkedAt: number()
20294
+ });
20196
20295
  /** Parent detection context passed to `runDetailSubtree` — the crop's
20197
20296
  * originating detection, in FRAME-space coordinates. Reuses
20198
20297
  * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
@@ -20582,7 +20681,7 @@ var RunnerCameraConfigSchema = object({
20582
20681
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
20583
20682
  * analyzer providers) running on decoded frames in this runner.
20584
20683
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
20585
- * analytics, Frigate motion). The provider emits ProviderMotion
20684
+ * analytics). The provider emits ProviderMotion
20586
20685
  * events; the orchestrator forwards to `reportMotion`.
20587
20686
  */
20588
20687
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -20824,7 +20923,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
20824
20923
  className: string(),
20825
20924
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
20826
20925
  sourceDeviceId: number()
20827
- }), RunStatelessStepResultSchema, { kind: "mutation" });
20926
+ }), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
20927
+ deviceId: number(),
20928
+ /** Opaque to the runner — the hub's track id. */
20929
+ trackId: string(),
20930
+ kind: ParkedFrameKindSchema,
20931
+ handle: FrameHandleSchema,
20932
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
20933
+ bbox: NativeCropBboxSchema,
20934
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
20935
+ maxWidth: number().int().positive().optional(),
20936
+ /** The frame instant (caller's clock) — orders parks for one key. */
20937
+ timestamp: number()
20938
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
20939
+ deviceId: number(),
20940
+ trackId: string(),
20941
+ kind: ParkedFrameKindSchema
20942
+ }), ParkedTrackFrameSchema.nullable()), method(object({
20943
+ deviceId: number(),
20944
+ trackId: string()
20945
+ }), object({ released: number().int().nonnegative() }), { kind: "mutation" });
20828
20946
  var CameraPipelineConfigSchema = object({
20829
20947
  engine: PipelineEngineChoiceSchema.optional(),
20830
20948
  steps: array(PipelineStepInputSchema).readonly(),
@@ -23753,7 +23871,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
23753
23871
  *
23754
23872
  * Implementations:
23755
23873
  * - Each camera-providing addon registers this cap natively per
23756
- * device (Reolink, Hikvision, RTSP, Frigate, ONVIF self).
23874
+ * device (Reolink, Hikvision, RTSP, ONVIF self).
23757
23875
  * - Returns a snapshot from the persisted device config blob — no
23758
23876
  * extra round-trip to the camera, no probing.
23759
23877
  * - The cap is admin-only (`auth: 'admin'`) — credentials must not
@@ -25139,7 +25257,7 @@ var AvailableIntegrationTypeSchema = object({
25139
25257
  * Which integration-marker cap the addon declared, so the wizard can
25140
25258
  * branch on CAP — never on addon name. `device-adoption` integrations
25141
25259
  * (Home Assistant, …) route through the broker step (Approach A);
25142
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
25260
+ * `device-provider` integrations (Reolink/ONVIF) keep the
25143
25261
  * legacy config → discovery flow.
25144
25262
  */
25145
25263
  kind: _enum(["device-adoption", "device-provider"]),
@@ -27701,7 +27819,23 @@ var RecordingRangeSchema = object({
27701
27819
  });
27702
27820
  var RecordingAvailabilitySchema = object({
27703
27821
  deviceId: number(),
27704
- ranges: array(RecordingRangeSchema)
27822
+ ranges: array(RecordingRangeSchema),
27823
+ /**
27824
+ * Every profile this camera has footage in — not only the one `ranges`
27825
+ * describes (D433).
27826
+ *
27827
+ * `ranges` answers for ONE profile by design: the timeline is a single bar,
27828
+ * and enumerating all of them triples the directory reads for a bar that
27829
+ * would look identical. But the answer used to say nothing about that, so a
27830
+ * caller asking "what can I export?" read the single preferred profile as
27831
+ * the only one that exists — on this deployment every camera records `high`
27832
+ * AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
27833
+ * UI could not see it.
27834
+ *
27835
+ * Cheap: it is the same shallow directory read the profile CHOICE already
27836
+ * makes. Ask for a specific profile's ranges with the `profile` input.
27837
+ */
27838
+ profilesWithFootage: array(string())
27705
27839
  });
27706
27840
  var RecordingDaysSchema = object({
27707
27841
  deviceId: number(),
@@ -27727,7 +27861,11 @@ var RecordingDaysSchema = object({
27727
27861
  var RecordingAvailabilityForDeviceSchema = object({
27728
27862
  deviceId: number(),
27729
27863
  read: _enum(["read", "unreadable"]),
27730
- ranges: array(RecordingRangeSchema).readonly()
27864
+ ranges: array(RecordingRangeSchema).readonly(),
27865
+ /** Same field, same meaning, as the singular answer (D433). A row that
27866
+ * dropped it would tell a grid caller the archive holds one profile.
27867
+ * Empty on an `'unreadable'` row: nobody looked. */
27868
+ profilesWithFootage: array(string()).readonly()
27731
27869
  });
27732
27870
  /**
27733
27871
  * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
@@ -27757,13 +27895,31 @@ var RecordingManifestSchema = object({
27757
27895
  */
27758
27896
  playbackEndpoints: array(string())
27759
27897
  });
27760
- /** Recording storage usage for one camera (bytes on disk across all its
27761
- * profiles/subtrees/locations on this node). */
27898
+ /**
27899
+ * Recording storage usage for one camera — what the ARCHIVE holds for it,
27900
+ * across every profile and every resolvable location on this node.
27901
+ *
27902
+ * ## Archive vs residency, which is the whole point of this shape (D418)
27903
+ *
27904
+ * `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
27905
+ * the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
27906
+ * this camera writes to, so the two can be added up and compared.
27907
+ *
27908
+ * They were not always. Until D418 this row came from the recorder's in-RAM
27909
+ * `RecordingIndex`, which since D287 holds only the live tail plus the hours
27910
+ * somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
27911
+ * 60.5 GB and "oldest: three hours ago" on the same page as the volume row
27912
+ * that said otherwise, and two people read it as retention eating recent
27913
+ * footage. Residency is still reported, under `residentBytes` /
27914
+ * `residentOldestMs`, which answer a different question and say so.
27915
+ */
27762
27916
  var RecordingDeviceUsageSchema = object({
27763
27917
  deviceId: number(),
27918
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
27919
+ * recordings locations. */
27764
27920
  usedBytes: number(),
27765
27921
  /**
27766
- * Start of this camera's OLDEST indexed segment, across every profile and
27922
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
27767
27923
  * location — the "Oldest footage" column in Recordings → Storage, and the
27768
27924
  * only honest answer to "is retention actually holding?" per camera.
27769
27925
  *
@@ -27773,7 +27929,24 @@ var RecordingDeviceUsageSchema = object({
27773
27929
  * (types) and the addon ship on different trains, and the addon is usually
27774
27930
  * the later of the two.
27775
27931
  */
27776
- oldestMs: number().nullable().optional()
27932
+ oldestMs: number().nullable().optional(),
27933
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
27934
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
27935
+ segments: number().optional(),
27936
+ /**
27937
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
27938
+ * its RAM index — the live tail plus the hours a reader hydrated.
27939
+ *
27940
+ * It answers "what can be served without touching the disk", never "how much
27941
+ * footage this camera has". A UI that renders it must label it as such, and
27942
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
27943
+ * it, and so does a node whose ledger could not answer.
27944
+ */
27945
+ residentBytes: number().optional(),
27946
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
27947
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
27948
+ * retention. `null` = nothing resident. */
27949
+ residentOldestMs: number().nullable().optional()
27777
27950
  });
27778
27951
  /** Recording storage usage + capacity for one storage location. */
27779
27952
  var RecordingLocationUsageSchema = object({
@@ -27811,6 +27984,17 @@ var RecordingStorageUsageSchema = object({
27811
27984
  totalUsedBytes: number(),
27812
27985
  devices: array(RecordingDeviceUsageSchema),
27813
27986
  /**
27987
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
27988
+ * disks (D418).
27989
+ *
27990
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
27991
+ * declared no ledger and the recorder REFUSED rather than answering the
27992
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
27993
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
27994
+ * and its rows are residency.
27995
+ */
27996
+ devicesRead: _enum(["archive", "unavailable"]).optional(),
27997
+ /**
27814
27998
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
27815
27999
  * of the payload without it: the hub serves this method through a BAKED
27816
28000
  * router, so a hub whose framework train predates a change to this array
@@ -27971,7 +28155,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
27971
28155
  method(object({
27972
28156
  deviceId: number(),
27973
28157
  fromMs: number(),
27974
- toMs: number()
28158
+ toMs: number(),
28159
+ /**
28160
+ * Answer for THIS profile instead of the preferred one (D433). Absent
28161
+ * keeps the timeline's behaviour — one bar, one profile, one set of
28162
+ * reads. `profilesWithFootage` on the answer says what may be asked
28163
+ * for.
28164
+ */
28165
+ profile: string().optional()
27975
28166
  }), RecordingAvailabilitySchema, {
27976
28167
  kind: "query",
27977
28168
  auth: "protected"
@@ -34198,6 +34389,24 @@ Object.freeze({
34198
34389
  addonId: null,
34199
34390
  access: "view"
34200
34391
  },
34392
+ "pipelineRunner.getParkedTrackFrame": {
34393
+ capName: "pipeline-runner",
34394
+ capScope: "system",
34395
+ addonId: null,
34396
+ access: "view"
34397
+ },
34398
+ "pipelineRunner.parkTrackFrame": {
34399
+ capName: "pipeline-runner",
34400
+ capScope: "system",
34401
+ addonId: null,
34402
+ access: "create"
34403
+ },
34404
+ "pipelineRunner.releaseParkedTrackFrames": {
34405
+ capName: "pipeline-runner",
34406
+ capScope: "system",
34407
+ addonId: null,
34408
+ access: "create"
34409
+ },
34201
34410
  "pipelineRunner.reportMotion": {
34202
34411
  capName: "pipeline-runner",
34203
34412
  capScope: "system",
@@ -37475,6 +37684,21 @@ Object.freeze({
37475
37684
  form: "single",
37476
37685
  optional: false
37477
37686
  }],
37687
+ "pipelineRunner.getParkedTrackFrame": [{
37688
+ name: "deviceId",
37689
+ form: "single",
37690
+ optional: false
37691
+ }],
37692
+ "pipelineRunner.parkTrackFrame": [{
37693
+ name: "deviceId",
37694
+ form: "single",
37695
+ optional: false
37696
+ }],
37697
+ "pipelineRunner.releaseParkedTrackFrames": [{
37698
+ name: "deviceId",
37699
+ form: "single",
37700
+ optional: false
37701
+ }],
37478
37702
  "pipelineRunner.reportMotion": [{
37479
37703
  name: "deviceId",
37480
37704
  form: "single",
@@ -38166,7 +38390,7 @@ var PreviewTextField = string().max(200);
38166
38390
  * Whether the notification's preview is a STILL or a short animation.
38167
38391
  *
38168
38392
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
38169
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
38393
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
38170
38394
  * night reads better as three seconds of motion than as one frame of it. Both
38171
38395
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
38172
38396
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-DvJMHeGc.js");
5
+ const require_dist = require("../dist-CTEYUMoP.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_child_process = require("node:child_process");
8
8
  //#region src/ingress/tailscale-cli.ts
@@ -1,4 +1,4 @@
1
- import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-CUQ2MTx9.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-DhBYDSGp.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-tailscale",
3
- "version": "1.2.90",
3
+ "version": "1.2.93",
4
4
  "description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",