@camstack/addon-decoder-nodeav 1.2.90 → 1.2.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +201 -14
- package/dist/index.mjs +201 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
|
-
//#region ../types/dist/event-category-
|
|
6
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
7
7
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
8
8
|
EventCategory["SystemBoot"] = "system.boot";
|
|
9
9
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -595,7 +595,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
595
595
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
596
596
|
*/
|
|
597
597
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
598
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
599
598
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
600
599
|
/**
|
|
601
600
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12653,7 +12652,7 @@ DeviceType.Camera;
|
|
|
12653
12652
|
var SourceInfoSchema = object({
|
|
12654
12653
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12655
12654
|
id: string(),
|
|
12656
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12655
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12657
12656
|
system: string(),
|
|
12658
12657
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12659
12658
|
* Used to detect rename when `id` changes. */
|
|
@@ -13140,7 +13139,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
13140
13139
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13141
13140
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13142
13141
|
*
|
|
13143
|
-
* All device provider addons (rtsp, onvif,
|
|
13142
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13144
13143
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13145
13144
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13146
13145
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17150,7 +17149,7 @@ var NcRuleInputSchema = object({
|
|
|
17150
17149
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17151
17150
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17152
17151
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17153
|
-
* 30 is
|
|
17152
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17154
17153
|
*
|
|
17155
17154
|
* ### What it replaces
|
|
17156
17155
|
*
|
|
@@ -19192,6 +19191,13 @@ var ZoneCrossingSchema = object({
|
|
|
19192
19191
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19193
19192
|
zoneName: string().optional()
|
|
19194
19193
|
});
|
|
19194
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19195
|
+
var ZoneOverlapSchema = object({
|
|
19196
|
+
zoneId: string(),
|
|
19197
|
+
zoneName: string().optional(),
|
|
19198
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19199
|
+
overlapPct: number()
|
|
19200
|
+
});
|
|
19195
19201
|
var ObjectEventSchema = object({
|
|
19196
19202
|
...BaseEventFields,
|
|
19197
19203
|
kind: literal("object"),
|
|
@@ -19216,6 +19222,35 @@ var ObjectEventSchema = object({
|
|
|
19216
19222
|
bbox: BoundingBoxSchema.optional(),
|
|
19217
19223
|
/** Heavy JSON — omitted in slim projection. */
|
|
19218
19224
|
zones: array(string()).readonly().optional(),
|
|
19225
|
+
/**
|
|
19226
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19227
|
+
* the BOX area.
|
|
19228
|
+
*
|
|
19229
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19230
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19231
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19232
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19233
|
+
* else to judge by.
|
|
19234
|
+
*/
|
|
19235
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19236
|
+
/**
|
|
19237
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19238
|
+
* has no track and never will.
|
|
19239
|
+
*
|
|
19240
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19241
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19242
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19243
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19244
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19245
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19246
|
+
* event at all.
|
|
19247
|
+
*
|
|
19248
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19249
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19250
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19251
|
+
* history is asking for something that never existed.
|
|
19252
|
+
*/
|
|
19253
|
+
spawnRefused: string().optional(),
|
|
19219
19254
|
/** Omitted in slim projection. */
|
|
19220
19255
|
state: TrackStateSchema.optional(),
|
|
19221
19256
|
/**
|
|
@@ -20289,6 +20324,60 @@ var NativeCropResultSchema = object({
|
|
|
20289
20324
|
*/
|
|
20290
20325
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20291
20326
|
});
|
|
20327
|
+
/**
|
|
20328
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20329
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20330
|
+
*
|
|
20331
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20332
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20333
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20334
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20335
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20336
|
+
*
|
|
20337
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20338
|
+
*/
|
|
20339
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20340
|
+
/**
|
|
20341
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20342
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20343
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20344
|
+
* never a reason to retry in a loop.
|
|
20345
|
+
*
|
|
20346
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20347
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20348
|
+
* carries the runner's own miss reason.
|
|
20349
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20350
|
+
*/
|
|
20351
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20352
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20353
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20354
|
+
parked: literal(true),
|
|
20355
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20356
|
+
nodeId: string(),
|
|
20357
|
+
width: number().int().positive(),
|
|
20358
|
+
height: number().int().positive(),
|
|
20359
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20360
|
+
bytes: number().int().nonnegative(),
|
|
20361
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20362
|
+
replaced: boolean()
|
|
20363
|
+
}), object({
|
|
20364
|
+
parked: literal(false),
|
|
20365
|
+
nodeId: string(),
|
|
20366
|
+
reason: ParkRefusalSchema,
|
|
20367
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20368
|
+
handleAgeMs: number().nullable(),
|
|
20369
|
+
detail: string().optional()
|
|
20370
|
+
})]);
|
|
20371
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20372
|
+
var ParkedTrackFrameSchema = object({
|
|
20373
|
+
jpeg: string(),
|
|
20374
|
+
width: number().int().positive(),
|
|
20375
|
+
height: number().int().positive(),
|
|
20376
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20377
|
+
timestamp: number(),
|
|
20378
|
+
/** When the node stored it (the node's clock). */
|
|
20379
|
+
parkedAt: number()
|
|
20380
|
+
});
|
|
20292
20381
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20293
20382
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20294
20383
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20678,7 +20767,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20678
20767
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20679
20768
|
* analyzer providers) running on decoded frames in this runner.
|
|
20680
20769
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20681
|
-
* analytics
|
|
20770
|
+
* analytics). The provider emits ProviderMotion
|
|
20682
20771
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20683
20772
|
*/
|
|
20684
20773
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -20920,7 +21009,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
20920
21009
|
className: string(),
|
|
20921
21010
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
20922
21011
|
sourceDeviceId: number()
|
|
20923
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21012
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21013
|
+
deviceId: number(),
|
|
21014
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21015
|
+
trackId: string(),
|
|
21016
|
+
kind: ParkedFrameKindSchema,
|
|
21017
|
+
handle: FrameHandleSchema,
|
|
21018
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21019
|
+
bbox: NativeCropBboxSchema,
|
|
21020
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21021
|
+
maxWidth: number().int().positive().optional(),
|
|
21022
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21023
|
+
timestamp: number()
|
|
21024
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21025
|
+
deviceId: number(),
|
|
21026
|
+
trackId: string(),
|
|
21027
|
+
kind: ParkedFrameKindSchema
|
|
21028
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21029
|
+
deviceId: number(),
|
|
21030
|
+
trackId: string()
|
|
21031
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
20924
21032
|
var CameraPipelineConfigSchema = object({
|
|
20925
21033
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
20926
21034
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -23849,7 +23957,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
23849
23957
|
*
|
|
23850
23958
|
* Implementations:
|
|
23851
23959
|
* - Each camera-providing addon registers this cap natively per
|
|
23852
|
-
* device (Reolink, Hikvision, RTSP,
|
|
23960
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
23853
23961
|
* - Returns a snapshot from the persisted device config blob — no
|
|
23854
23962
|
* extra round-trip to the camera, no probing.
|
|
23855
23963
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -25235,7 +25343,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
25235
25343
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
25236
25344
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
25237
25345
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
25238
|
-
* `device-provider` integrations (Reolink/
|
|
25346
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
25239
25347
|
* legacy config → discovery flow.
|
|
25240
25348
|
*/
|
|
25241
25349
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -27792,13 +27900,31 @@ var RecordingManifestSchema = object({
|
|
|
27792
27900
|
*/
|
|
27793
27901
|
playbackEndpoints: array(string())
|
|
27794
27902
|
});
|
|
27795
|
-
/**
|
|
27796
|
-
*
|
|
27903
|
+
/**
|
|
27904
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
27905
|
+
* across every profile and every resolvable location on this node.
|
|
27906
|
+
*
|
|
27907
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
27908
|
+
*
|
|
27909
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
27910
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
27911
|
+
* this camera writes to, so the two can be added up and compared.
|
|
27912
|
+
*
|
|
27913
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
27914
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
27915
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
27916
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
27917
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
27918
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
27919
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
27920
|
+
*/
|
|
27797
27921
|
var RecordingDeviceUsageSchema = object({
|
|
27798
27922
|
deviceId: number(),
|
|
27923
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
27924
|
+
* recordings locations. */
|
|
27799
27925
|
usedBytes: number(),
|
|
27800
27926
|
/**
|
|
27801
|
-
* Start of this camera's OLDEST
|
|
27927
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
27802
27928
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
27803
27929
|
* only honest answer to "is retention actually holding?" per camera.
|
|
27804
27930
|
*
|
|
@@ -27808,7 +27934,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
27808
27934
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
27809
27935
|
* the later of the two.
|
|
27810
27936
|
*/
|
|
27811
|
-
oldestMs: number().nullable().optional()
|
|
27937
|
+
oldestMs: number().nullable().optional(),
|
|
27938
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
27939
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
27940
|
+
segments: number().optional(),
|
|
27941
|
+
/**
|
|
27942
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
27943
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
27944
|
+
*
|
|
27945
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
27946
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
27947
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
27948
|
+
* it, and so does a node whose ledger could not answer.
|
|
27949
|
+
*/
|
|
27950
|
+
residentBytes: number().optional(),
|
|
27951
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
27952
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
27953
|
+
* retention. `null` = nothing resident. */
|
|
27954
|
+
residentOldestMs: number().nullable().optional()
|
|
27812
27955
|
});
|
|
27813
27956
|
/** Recording storage usage + capacity for one storage location. */
|
|
27814
27957
|
var RecordingLocationUsageSchema = object({
|
|
@@ -27846,6 +27989,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
27846
27989
|
totalUsedBytes: number(),
|
|
27847
27990
|
devices: array(RecordingDeviceUsageSchema),
|
|
27848
27991
|
/**
|
|
27992
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
27993
|
+
* disks (D418).
|
|
27994
|
+
*
|
|
27995
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
27996
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
27997
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
27998
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
27999
|
+
* and its rows are residency.
|
|
28000
|
+
*/
|
|
28001
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
28002
|
+
/**
|
|
27849
28003
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
27850
28004
|
* of the payload without it: the hub serves this method through a BAKED
|
|
27851
28005
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -34233,6 +34387,24 @@ Object.freeze({
|
|
|
34233
34387
|
addonId: null,
|
|
34234
34388
|
access: "view"
|
|
34235
34389
|
},
|
|
34390
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
34391
|
+
capName: "pipeline-runner",
|
|
34392
|
+
capScope: "system",
|
|
34393
|
+
addonId: null,
|
|
34394
|
+
access: "view"
|
|
34395
|
+
},
|
|
34396
|
+
"pipelineRunner.parkTrackFrame": {
|
|
34397
|
+
capName: "pipeline-runner",
|
|
34398
|
+
capScope: "system",
|
|
34399
|
+
addonId: null,
|
|
34400
|
+
access: "create"
|
|
34401
|
+
},
|
|
34402
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
34403
|
+
capName: "pipeline-runner",
|
|
34404
|
+
capScope: "system",
|
|
34405
|
+
addonId: null,
|
|
34406
|
+
access: "create"
|
|
34407
|
+
},
|
|
34236
34408
|
"pipelineRunner.reportMotion": {
|
|
34237
34409
|
capName: "pipeline-runner",
|
|
34238
34410
|
capScope: "system",
|
|
@@ -37510,6 +37682,21 @@ Object.freeze({
|
|
|
37510
37682
|
form: "single",
|
|
37511
37683
|
optional: false
|
|
37512
37684
|
}],
|
|
37685
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
37686
|
+
name: "deviceId",
|
|
37687
|
+
form: "single",
|
|
37688
|
+
optional: false
|
|
37689
|
+
}],
|
|
37690
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
37691
|
+
name: "deviceId",
|
|
37692
|
+
form: "single",
|
|
37693
|
+
optional: false
|
|
37694
|
+
}],
|
|
37695
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
37696
|
+
name: "deviceId",
|
|
37697
|
+
form: "single",
|
|
37698
|
+
optional: false
|
|
37699
|
+
}],
|
|
37513
37700
|
"pipelineRunner.reportMotion": [{
|
|
37514
37701
|
name: "deviceId",
|
|
37515
37702
|
form: "single",
|
|
@@ -38201,7 +38388,7 @@ var PreviewTextField = string().max(200);
|
|
|
38201
38388
|
* Whether the notification's preview is a STILL or a short animation.
|
|
38202
38389
|
*
|
|
38203
38390
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
38204
|
-
* rule)"* —
|
|
38391
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
38205
38392
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
38206
38393
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
38207
38394
|
* simply applies it to a dozen frames sampled across the render and assembles
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
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.
|
|
@@ -12649,7 +12648,7 @@ DeviceType.Camera;
|
|
|
12649
12648
|
var SourceInfoSchema = object({
|
|
12650
12649
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12651
12650
|
id: string(),
|
|
12652
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12651
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12653
12652
|
system: string(),
|
|
12654
12653
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12655
12654
|
* Used to detect rename when `id` changes. */
|
|
@@ -13136,7 +13135,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
13136
13135
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13137
13136
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13138
13137
|
*
|
|
13139
|
-
* All device provider addons (rtsp, onvif,
|
|
13138
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13140
13139
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13141
13140
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13142
13141
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17146,7 +17145,7 @@ var NcRuleInputSchema = object({
|
|
|
17146
17145
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17147
17146
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17148
17147
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17149
|
-
* 30 is
|
|
17148
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17150
17149
|
*
|
|
17151
17150
|
* ### What it replaces
|
|
17152
17151
|
*
|
|
@@ -19188,6 +19187,13 @@ var ZoneCrossingSchema = object({
|
|
|
19188
19187
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19189
19188
|
zoneName: string().optional()
|
|
19190
19189
|
});
|
|
19190
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19191
|
+
var ZoneOverlapSchema = object({
|
|
19192
|
+
zoneId: string(),
|
|
19193
|
+
zoneName: string().optional(),
|
|
19194
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19195
|
+
overlapPct: number()
|
|
19196
|
+
});
|
|
19191
19197
|
var ObjectEventSchema = object({
|
|
19192
19198
|
...BaseEventFields,
|
|
19193
19199
|
kind: literal("object"),
|
|
@@ -19212,6 +19218,35 @@ var ObjectEventSchema = object({
|
|
|
19212
19218
|
bbox: BoundingBoxSchema.optional(),
|
|
19213
19219
|
/** Heavy JSON — omitted in slim projection. */
|
|
19214
19220
|
zones: array(string()).readonly().optional(),
|
|
19221
|
+
/**
|
|
19222
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19223
|
+
* the BOX area.
|
|
19224
|
+
*
|
|
19225
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19226
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19227
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19228
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19229
|
+
* else to judge by.
|
|
19230
|
+
*/
|
|
19231
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19232
|
+
/**
|
|
19233
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19234
|
+
* has no track and never will.
|
|
19235
|
+
*
|
|
19236
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19237
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19238
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19239
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19240
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19241
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19242
|
+
* event at all.
|
|
19243
|
+
*
|
|
19244
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19245
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19246
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19247
|
+
* history is asking for something that never existed.
|
|
19248
|
+
*/
|
|
19249
|
+
spawnRefused: string().optional(),
|
|
19215
19250
|
/** Omitted in slim projection. */
|
|
19216
19251
|
state: TrackStateSchema.optional(),
|
|
19217
19252
|
/**
|
|
@@ -20285,6 +20320,60 @@ var NativeCropResultSchema = object({
|
|
|
20285
20320
|
*/
|
|
20286
20321
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20287
20322
|
});
|
|
20323
|
+
/**
|
|
20324
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20325
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20326
|
+
*
|
|
20327
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20328
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20329
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20330
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20331
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20332
|
+
*
|
|
20333
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20334
|
+
*/
|
|
20335
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20336
|
+
/**
|
|
20337
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20338
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20339
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20340
|
+
* never a reason to retry in a loop.
|
|
20341
|
+
*
|
|
20342
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20343
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20344
|
+
* carries the runner's own miss reason.
|
|
20345
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20346
|
+
*/
|
|
20347
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20348
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20349
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20350
|
+
parked: literal(true),
|
|
20351
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20352
|
+
nodeId: string(),
|
|
20353
|
+
width: number().int().positive(),
|
|
20354
|
+
height: number().int().positive(),
|
|
20355
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20356
|
+
bytes: number().int().nonnegative(),
|
|
20357
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20358
|
+
replaced: boolean()
|
|
20359
|
+
}), object({
|
|
20360
|
+
parked: literal(false),
|
|
20361
|
+
nodeId: string(),
|
|
20362
|
+
reason: ParkRefusalSchema,
|
|
20363
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20364
|
+
handleAgeMs: number().nullable(),
|
|
20365
|
+
detail: string().optional()
|
|
20366
|
+
})]);
|
|
20367
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20368
|
+
var ParkedTrackFrameSchema = object({
|
|
20369
|
+
jpeg: string(),
|
|
20370
|
+
width: number().int().positive(),
|
|
20371
|
+
height: number().int().positive(),
|
|
20372
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20373
|
+
timestamp: number(),
|
|
20374
|
+
/** When the node stored it (the node's clock). */
|
|
20375
|
+
parkedAt: number()
|
|
20376
|
+
});
|
|
20288
20377
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20289
20378
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20290
20379
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20674,7 +20763,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20674
20763
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20675
20764
|
* analyzer providers) running on decoded frames in this runner.
|
|
20676
20765
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20677
|
-
* analytics
|
|
20766
|
+
* analytics). The provider emits ProviderMotion
|
|
20678
20767
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20679
20768
|
*/
|
|
20680
20769
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -20916,7 +21005,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
20916
21005
|
className: string(),
|
|
20917
21006
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
20918
21007
|
sourceDeviceId: number()
|
|
20919
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21008
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21009
|
+
deviceId: number(),
|
|
21010
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21011
|
+
trackId: string(),
|
|
21012
|
+
kind: ParkedFrameKindSchema,
|
|
21013
|
+
handle: FrameHandleSchema,
|
|
21014
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21015
|
+
bbox: NativeCropBboxSchema,
|
|
21016
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21017
|
+
maxWidth: number().int().positive().optional(),
|
|
21018
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21019
|
+
timestamp: number()
|
|
21020
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21021
|
+
deviceId: number(),
|
|
21022
|
+
trackId: string(),
|
|
21023
|
+
kind: ParkedFrameKindSchema
|
|
21024
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21025
|
+
deviceId: number(),
|
|
21026
|
+
trackId: string()
|
|
21027
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
20920
21028
|
var CameraPipelineConfigSchema = object({
|
|
20921
21029
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
20922
21030
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -23845,7 +23953,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
23845
23953
|
*
|
|
23846
23954
|
* Implementations:
|
|
23847
23955
|
* - Each camera-providing addon registers this cap natively per
|
|
23848
|
-
* device (Reolink, Hikvision, RTSP,
|
|
23956
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
23849
23957
|
* - Returns a snapshot from the persisted device config blob — no
|
|
23850
23958
|
* extra round-trip to the camera, no probing.
|
|
23851
23959
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -25231,7 +25339,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
25231
25339
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
25232
25340
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
25233
25341
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
25234
|
-
* `device-provider` integrations (Reolink/
|
|
25342
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
25235
25343
|
* legacy config → discovery flow.
|
|
25236
25344
|
*/
|
|
25237
25345
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -27788,13 +27896,31 @@ var RecordingManifestSchema = object({
|
|
|
27788
27896
|
*/
|
|
27789
27897
|
playbackEndpoints: array(string())
|
|
27790
27898
|
});
|
|
27791
|
-
/**
|
|
27792
|
-
*
|
|
27899
|
+
/**
|
|
27900
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
27901
|
+
* across every profile and every resolvable location on this node.
|
|
27902
|
+
*
|
|
27903
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
27904
|
+
*
|
|
27905
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
27906
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
27907
|
+
* this camera writes to, so the two can be added up and compared.
|
|
27908
|
+
*
|
|
27909
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
27910
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
27911
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
27912
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
27913
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
27914
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
27915
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
27916
|
+
*/
|
|
27793
27917
|
var RecordingDeviceUsageSchema = object({
|
|
27794
27918
|
deviceId: number(),
|
|
27919
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
27920
|
+
* recordings locations. */
|
|
27795
27921
|
usedBytes: number(),
|
|
27796
27922
|
/**
|
|
27797
|
-
* Start of this camera's OLDEST
|
|
27923
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
27798
27924
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
27799
27925
|
* only honest answer to "is retention actually holding?" per camera.
|
|
27800
27926
|
*
|
|
@@ -27804,7 +27930,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
27804
27930
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
27805
27931
|
* the later of the two.
|
|
27806
27932
|
*/
|
|
27807
|
-
oldestMs: number().nullable().optional()
|
|
27933
|
+
oldestMs: number().nullable().optional(),
|
|
27934
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
27935
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
27936
|
+
segments: number().optional(),
|
|
27937
|
+
/**
|
|
27938
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
27939
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
27940
|
+
*
|
|
27941
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
27942
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
27943
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
27944
|
+
* it, and so does a node whose ledger could not answer.
|
|
27945
|
+
*/
|
|
27946
|
+
residentBytes: number().optional(),
|
|
27947
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
27948
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
27949
|
+
* retention. `null` = nothing resident. */
|
|
27950
|
+
residentOldestMs: number().nullable().optional()
|
|
27808
27951
|
});
|
|
27809
27952
|
/** Recording storage usage + capacity for one storage location. */
|
|
27810
27953
|
var RecordingLocationUsageSchema = object({
|
|
@@ -27842,6 +27985,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
27842
27985
|
totalUsedBytes: number(),
|
|
27843
27986
|
devices: array(RecordingDeviceUsageSchema),
|
|
27844
27987
|
/**
|
|
27988
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
27989
|
+
* disks (D418).
|
|
27990
|
+
*
|
|
27991
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
27992
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
27993
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
27994
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
27995
|
+
* and its rows are residency.
|
|
27996
|
+
*/
|
|
27997
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
27998
|
+
/**
|
|
27845
27999
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
27846
28000
|
* of the payload without it: the hub serves this method through a BAKED
|
|
27847
28001
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -34229,6 +34383,24 @@ Object.freeze({
|
|
|
34229
34383
|
addonId: null,
|
|
34230
34384
|
access: "view"
|
|
34231
34385
|
},
|
|
34386
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
34387
|
+
capName: "pipeline-runner",
|
|
34388
|
+
capScope: "system",
|
|
34389
|
+
addonId: null,
|
|
34390
|
+
access: "view"
|
|
34391
|
+
},
|
|
34392
|
+
"pipelineRunner.parkTrackFrame": {
|
|
34393
|
+
capName: "pipeline-runner",
|
|
34394
|
+
capScope: "system",
|
|
34395
|
+
addonId: null,
|
|
34396
|
+
access: "create"
|
|
34397
|
+
},
|
|
34398
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
34399
|
+
capName: "pipeline-runner",
|
|
34400
|
+
capScope: "system",
|
|
34401
|
+
addonId: null,
|
|
34402
|
+
access: "create"
|
|
34403
|
+
},
|
|
34232
34404
|
"pipelineRunner.reportMotion": {
|
|
34233
34405
|
capName: "pipeline-runner",
|
|
34234
34406
|
capScope: "system",
|
|
@@ -37506,6 +37678,21 @@ Object.freeze({
|
|
|
37506
37678
|
form: "single",
|
|
37507
37679
|
optional: false
|
|
37508
37680
|
}],
|
|
37681
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
37682
|
+
name: "deviceId",
|
|
37683
|
+
form: "single",
|
|
37684
|
+
optional: false
|
|
37685
|
+
}],
|
|
37686
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
37687
|
+
name: "deviceId",
|
|
37688
|
+
form: "single",
|
|
37689
|
+
optional: false
|
|
37690
|
+
}],
|
|
37691
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
37692
|
+
name: "deviceId",
|
|
37693
|
+
form: "single",
|
|
37694
|
+
optional: false
|
|
37695
|
+
}],
|
|
37509
37696
|
"pipelineRunner.reportMotion": [{
|
|
37510
37697
|
name: "deviceId",
|
|
37511
37698
|
form: "single",
|
|
@@ -38197,7 +38384,7 @@ var PreviewTextField = string().max(200);
|
|
|
38197
38384
|
* Whether the notification's preview is a STILL or a short animation.
|
|
38198
38385
|
*
|
|
38199
38386
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
38200
|
-
* rule)"* —
|
|
38387
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
38201
38388
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
38202
38389
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
38203
38390
|
* simply applies it to a dozen frames sampled across the render and assembles
|