@camstack/addon-provider-gree 0.2.89 → 0.2.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +246 -22
- package/dist/addon.mjs +246 -22
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
let dgram = require("dgram");
|
|
3
3
|
let crypto$1 = require("crypto");
|
|
4
4
|
let events = require("events");
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -594,7 +594,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
594
594
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
595
595
|
*/
|
|
596
596
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
597
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
598
597
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
599
598
|
/**
|
|
600
599
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12628,7 +12627,7 @@ DeviceType.Camera;
|
|
|
12628
12627
|
var SourceInfoSchema = object({
|
|
12629
12628
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12630
12629
|
id: string(),
|
|
12631
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12630
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12632
12631
|
system: string(),
|
|
12633
12632
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12634
12633
|
* Used to detect rename when `id` changes. */
|
|
@@ -12641,7 +12640,7 @@ var SourceInfoSchema = object({
|
|
|
12641
12640
|
/**
|
|
12642
12641
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12643
12642
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12644
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12643
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12645
12644
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12646
12645
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12647
12646
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13303,7 +13302,7 @@ var deviceProviderCapability = {
|
|
|
13303
13302
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13304
13303
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13305
13304
|
*
|
|
13306
|
-
* All device provider addons (rtsp, onvif,
|
|
13305
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13307
13306
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13308
13307
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13309
13308
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17351,7 +17350,7 @@ var NcRuleInputSchema = object({
|
|
|
17351
17350
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17352
17351
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17353
17352
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17354
|
-
* 30 is
|
|
17353
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17355
17354
|
*
|
|
17356
17355
|
* ### What it replaces
|
|
17357
17356
|
*
|
|
@@ -19433,6 +19432,13 @@ var ZoneCrossingSchema = object({
|
|
|
19433
19432
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19434
19433
|
zoneName: string().optional()
|
|
19435
19434
|
});
|
|
19435
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19436
|
+
var ZoneOverlapSchema = object({
|
|
19437
|
+
zoneId: string(),
|
|
19438
|
+
zoneName: string().optional(),
|
|
19439
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19440
|
+
overlapPct: number()
|
|
19441
|
+
});
|
|
19436
19442
|
var ObjectEventSchema = object({
|
|
19437
19443
|
...BaseEventFields,
|
|
19438
19444
|
kind: literal("object"),
|
|
@@ -19457,6 +19463,35 @@ var ObjectEventSchema = object({
|
|
|
19457
19463
|
bbox: BoundingBoxSchema.optional(),
|
|
19458
19464
|
/** Heavy JSON — omitted in slim projection. */
|
|
19459
19465
|
zones: array(string()).readonly().optional(),
|
|
19466
|
+
/**
|
|
19467
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19468
|
+
* the BOX area.
|
|
19469
|
+
*
|
|
19470
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19471
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19472
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19473
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19474
|
+
* else to judge by.
|
|
19475
|
+
*/
|
|
19476
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19477
|
+
/**
|
|
19478
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19479
|
+
* has no track and never will.
|
|
19480
|
+
*
|
|
19481
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19482
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19483
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19484
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19485
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19486
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19487
|
+
* event at all.
|
|
19488
|
+
*
|
|
19489
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19490
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19491
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19492
|
+
* history is asking for something that never existed.
|
|
19493
|
+
*/
|
|
19494
|
+
spawnRefused: string().optional(),
|
|
19460
19495
|
/** Omitted in slim projection. */
|
|
19461
19496
|
state: TrackStateSchema.optional(),
|
|
19462
19497
|
/**
|
|
@@ -19883,7 +19918,17 @@ var EventDensityBucketSchema = object({
|
|
|
19883
19918
|
bucketStart: number(),
|
|
19884
19919
|
motion: number().int(),
|
|
19885
19920
|
object: number().int(),
|
|
19886
|
-
audio: number().int()
|
|
19921
|
+
audio: number().int(),
|
|
19922
|
+
/**
|
|
19923
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
19924
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
19925
|
+
*
|
|
19926
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
19927
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
19928
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
19929
|
+
* the count-on-a-level-meter did.
|
|
19930
|
+
*/
|
|
19931
|
+
audioDbfs: number().optional()
|
|
19887
19932
|
});
|
|
19888
19933
|
/**
|
|
19889
19934
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20530,6 +20575,60 @@ var NativeCropResultSchema = object({
|
|
|
20530
20575
|
*/
|
|
20531
20576
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20532
20577
|
});
|
|
20578
|
+
/**
|
|
20579
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20580
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20581
|
+
*
|
|
20582
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20583
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20584
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20585
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20586
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20587
|
+
*
|
|
20588
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20589
|
+
*/
|
|
20590
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20591
|
+
/**
|
|
20592
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20593
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20594
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20595
|
+
* never a reason to retry in a loop.
|
|
20596
|
+
*
|
|
20597
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20598
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20599
|
+
* carries the runner's own miss reason.
|
|
20600
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20601
|
+
*/
|
|
20602
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20603
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20604
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20605
|
+
parked: literal(true),
|
|
20606
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20607
|
+
nodeId: string(),
|
|
20608
|
+
width: number().int().positive(),
|
|
20609
|
+
height: number().int().positive(),
|
|
20610
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20611
|
+
bytes: number().int().nonnegative(),
|
|
20612
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20613
|
+
replaced: boolean()
|
|
20614
|
+
}), object({
|
|
20615
|
+
parked: literal(false),
|
|
20616
|
+
nodeId: string(),
|
|
20617
|
+
reason: ParkRefusalSchema,
|
|
20618
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20619
|
+
handleAgeMs: number().nullable(),
|
|
20620
|
+
detail: string().optional()
|
|
20621
|
+
})]);
|
|
20622
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20623
|
+
var ParkedTrackFrameSchema = object({
|
|
20624
|
+
jpeg: string(),
|
|
20625
|
+
width: number().int().positive(),
|
|
20626
|
+
height: number().int().positive(),
|
|
20627
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20628
|
+
timestamp: number(),
|
|
20629
|
+
/** When the node stored it (the node's clock). */
|
|
20630
|
+
parkedAt: number()
|
|
20631
|
+
});
|
|
20533
20632
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20534
20633
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20535
20634
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20919,7 +21018,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20919
21018
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20920
21019
|
* analyzer providers) running on decoded frames in this runner.
|
|
20921
21020
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20922
|
-
* analytics
|
|
21021
|
+
* analytics). The provider emits ProviderMotion
|
|
20923
21022
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20924
21023
|
*/
|
|
20925
21024
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21161,7 +21260,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21161
21260
|
className: string(),
|
|
21162
21261
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21163
21262
|
sourceDeviceId: number()
|
|
21164
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21263
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21264
|
+
deviceId: number(),
|
|
21265
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21266
|
+
trackId: string(),
|
|
21267
|
+
kind: ParkedFrameKindSchema,
|
|
21268
|
+
handle: FrameHandleSchema,
|
|
21269
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21270
|
+
bbox: NativeCropBboxSchema,
|
|
21271
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21272
|
+
maxWidth: number().int().positive().optional(),
|
|
21273
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21274
|
+
timestamp: number()
|
|
21275
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21276
|
+
deviceId: number(),
|
|
21277
|
+
trackId: string(),
|
|
21278
|
+
kind: ParkedFrameKindSchema
|
|
21279
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21280
|
+
deviceId: number(),
|
|
21281
|
+
trackId: string()
|
|
21282
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21165
21283
|
var CameraPipelineConfigSchema = object({
|
|
21166
21284
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21167
21285
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24231,8 +24349,8 @@ onStatusChanged: { data: object({
|
|
|
24231
24349
|
/**
|
|
24232
24350
|
* Runtime-state slice — every provider that registers this cap
|
|
24233
24351
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24234
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24235
|
-
*
|
|
24352
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24353
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24236
24354
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24237
24355
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24238
24356
|
* the underlying driver.
|
|
@@ -24365,7 +24483,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24365
24483
|
*
|
|
24366
24484
|
* Implementations:
|
|
24367
24485
|
* - Each camera-providing addon registers this cap natively per
|
|
24368
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24486
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24369
24487
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24370
24488
|
* extra round-trip to the camera, no probing.
|
|
24371
24489
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26457,7 +26575,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26457
26575
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26458
26576
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26459
26577
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26460
|
-
* `device-provider` integrations (Reolink/
|
|
26578
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26461
26579
|
* legacy config → discovery flow.
|
|
26462
26580
|
*/
|
|
26463
26581
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -29825,7 +29943,23 @@ var RecordingRangeSchema = object({
|
|
|
29825
29943
|
});
|
|
29826
29944
|
var RecordingAvailabilitySchema = object({
|
|
29827
29945
|
deviceId: number(),
|
|
29828
|
-
ranges: array(RecordingRangeSchema)
|
|
29946
|
+
ranges: array(RecordingRangeSchema),
|
|
29947
|
+
/**
|
|
29948
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
29949
|
+
* describes (D433).
|
|
29950
|
+
*
|
|
29951
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
29952
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
29953
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
29954
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
29955
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
29956
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
29957
|
+
* UI could not see it.
|
|
29958
|
+
*
|
|
29959
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
29960
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
29961
|
+
*/
|
|
29962
|
+
profilesWithFootage: array(string())
|
|
29829
29963
|
});
|
|
29830
29964
|
var RecordingDaysSchema = object({
|
|
29831
29965
|
deviceId: number(),
|
|
@@ -29851,7 +29985,11 @@ var RecordingDaysSchema = object({
|
|
|
29851
29985
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
29852
29986
|
deviceId: number(),
|
|
29853
29987
|
read: _enum(["read", "unreadable"]),
|
|
29854
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
29988
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
29989
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
29990
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
29991
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
29992
|
+
profilesWithFootage: array(string()).readonly()
|
|
29855
29993
|
});
|
|
29856
29994
|
/**
|
|
29857
29995
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -29881,13 +30019,31 @@ var RecordingManifestSchema = object({
|
|
|
29881
30019
|
*/
|
|
29882
30020
|
playbackEndpoints: array(string())
|
|
29883
30021
|
});
|
|
29884
|
-
/**
|
|
29885
|
-
*
|
|
30022
|
+
/**
|
|
30023
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30024
|
+
* across every profile and every resolvable location on this node.
|
|
30025
|
+
*
|
|
30026
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30027
|
+
*
|
|
30028
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30029
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30030
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30031
|
+
*
|
|
30032
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30033
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30034
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30035
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30036
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30037
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30038
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30039
|
+
*/
|
|
29886
30040
|
var RecordingDeviceUsageSchema = object({
|
|
29887
30041
|
deviceId: number(),
|
|
30042
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30043
|
+
* recordings locations. */
|
|
29888
30044
|
usedBytes: number(),
|
|
29889
30045
|
/**
|
|
29890
|
-
* Start of this camera's OLDEST
|
|
30046
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
29891
30047
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
29892
30048
|
* only honest answer to "is retention actually holding?" per camera.
|
|
29893
30049
|
*
|
|
@@ -29897,7 +30053,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
29897
30053
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
29898
30054
|
* the later of the two.
|
|
29899
30055
|
*/
|
|
29900
|
-
oldestMs: number().nullable().optional()
|
|
30056
|
+
oldestMs: number().nullable().optional(),
|
|
30057
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30058
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30059
|
+
segments: number().optional(),
|
|
30060
|
+
/**
|
|
30061
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30062
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30063
|
+
*
|
|
30064
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30065
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30066
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30067
|
+
* it, and so does a node whose ledger could not answer.
|
|
30068
|
+
*/
|
|
30069
|
+
residentBytes: number().optional(),
|
|
30070
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30071
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30072
|
+
* retention. `null` = nothing resident. */
|
|
30073
|
+
residentOldestMs: number().nullable().optional()
|
|
29901
30074
|
});
|
|
29902
30075
|
/** Recording storage usage + capacity for one storage location. */
|
|
29903
30076
|
var RecordingLocationUsageSchema = object({
|
|
@@ -29935,6 +30108,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
29935
30108
|
totalUsedBytes: number(),
|
|
29936
30109
|
devices: array(RecordingDeviceUsageSchema),
|
|
29937
30110
|
/**
|
|
30111
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30112
|
+
* disks (D418).
|
|
30113
|
+
*
|
|
30114
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30115
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30116
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30117
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30118
|
+
* and its rows are residency.
|
|
30119
|
+
*/
|
|
30120
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30121
|
+
/**
|
|
29938
30122
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
29939
30123
|
* of the payload without it: the hub serves this method through a BAKED
|
|
29940
30124
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30095,7 +30279,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30095
30279
|
method(object({
|
|
30096
30280
|
deviceId: number(),
|
|
30097
30281
|
fromMs: number(),
|
|
30098
|
-
toMs: number()
|
|
30282
|
+
toMs: number(),
|
|
30283
|
+
/**
|
|
30284
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30285
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30286
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30287
|
+
* for.
|
|
30288
|
+
*/
|
|
30289
|
+
profile: string().optional()
|
|
30099
30290
|
}), RecordingAvailabilitySchema, {
|
|
30100
30291
|
kind: "query",
|
|
30101
30292
|
auth: "protected"
|
|
@@ -33814,7 +34005,7 @@ function toDeviceSummary(device, addonId) {
|
|
|
33814
34005
|
};
|
|
33815
34006
|
}
|
|
33816
34007
|
/**
|
|
33817
|
-
* Base class for device-provider addons (rtsp, onvif
|
|
34008
|
+
* Base class for device-provider addons (rtsp, onvif).
|
|
33818
34009
|
*
|
|
33819
34010
|
* Provides default implementations for the common device-provider cap
|
|
33820
34011
|
* methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
|
|
@@ -38470,6 +38661,24 @@ Object.freeze({
|
|
|
38470
38661
|
addonId: null,
|
|
38471
38662
|
access: "view"
|
|
38472
38663
|
},
|
|
38664
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
38665
|
+
capName: "pipeline-runner",
|
|
38666
|
+
capScope: "system",
|
|
38667
|
+
addonId: null,
|
|
38668
|
+
access: "view"
|
|
38669
|
+
},
|
|
38670
|
+
"pipelineRunner.parkTrackFrame": {
|
|
38671
|
+
capName: "pipeline-runner",
|
|
38672
|
+
capScope: "system",
|
|
38673
|
+
addonId: null,
|
|
38674
|
+
access: "create"
|
|
38675
|
+
},
|
|
38676
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
38677
|
+
capName: "pipeline-runner",
|
|
38678
|
+
capScope: "system",
|
|
38679
|
+
addonId: null,
|
|
38680
|
+
access: "create"
|
|
38681
|
+
},
|
|
38473
38682
|
"pipelineRunner.reportMotion": {
|
|
38474
38683
|
capName: "pipeline-runner",
|
|
38475
38684
|
capScope: "system",
|
|
@@ -41747,6 +41956,21 @@ Object.freeze({
|
|
|
41747
41956
|
form: "single",
|
|
41748
41957
|
optional: false
|
|
41749
41958
|
}],
|
|
41959
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
41960
|
+
name: "deviceId",
|
|
41961
|
+
form: "single",
|
|
41962
|
+
optional: false
|
|
41963
|
+
}],
|
|
41964
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
41965
|
+
name: "deviceId",
|
|
41966
|
+
form: "single",
|
|
41967
|
+
optional: false
|
|
41968
|
+
}],
|
|
41969
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
41970
|
+
name: "deviceId",
|
|
41971
|
+
form: "single",
|
|
41972
|
+
optional: false
|
|
41973
|
+
}],
|
|
41750
41974
|
"pipelineRunner.reportMotion": [{
|
|
41751
41975
|
name: "deviceId",
|
|
41752
41976
|
form: "single",
|
|
@@ -42438,7 +42662,7 @@ var PreviewTextField = string().max(200);
|
|
|
42438
42662
|
* Whether the notification's preview is a STILL or a short animation.
|
|
42439
42663
|
*
|
|
42440
42664
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
42441
|
-
* rule)"* —
|
|
42665
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
42442
42666
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
42443
42667
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
42444
42668
|
* simply applies it to a dozen frames sampled across the render and assembles
|
package/dist/addon.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSocket } from "dgram";
|
|
2
2
|
import { createCipheriv, createDecipheriv } from "crypto";
|
|
3
3
|
import { EventEmitter } from "events";
|
|
4
|
-
//#region ../types/dist/event-category-
|
|
4
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
5
5
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
6
6
|
EventCategory["SystemBoot"] = "system.boot";
|
|
7
7
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -593,7 +593,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
593
593
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
594
594
|
*/
|
|
595
595
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
596
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
597
596
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
598
597
|
/**
|
|
599
598
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12627,7 +12626,7 @@ DeviceType.Camera;
|
|
|
12627
12626
|
var SourceInfoSchema = object({
|
|
12628
12627
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12629
12628
|
id: string(),
|
|
12630
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12629
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12631
12630
|
system: string(),
|
|
12632
12631
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12633
12632
|
* Used to detect rename when `id` changes. */
|
|
@@ -12640,7 +12639,7 @@ var SourceInfoSchema = object({
|
|
|
12640
12639
|
/**
|
|
12641
12640
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12642
12641
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12643
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12642
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12644
12643
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12645
12644
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12646
12645
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13302,7 +13301,7 @@ var deviceProviderCapability = {
|
|
|
13302
13301
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13303
13302
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13304
13303
|
*
|
|
13305
|
-
* All device provider addons (rtsp, onvif,
|
|
13304
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13306
13305
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13307
13306
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13308
13307
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17350,7 +17349,7 @@ var NcRuleInputSchema = object({
|
|
|
17350
17349
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17351
17350
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17352
17351
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17353
|
-
* 30 is
|
|
17352
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17354
17353
|
*
|
|
17355
17354
|
* ### What it replaces
|
|
17356
17355
|
*
|
|
@@ -19432,6 +19431,13 @@ var ZoneCrossingSchema = object({
|
|
|
19432
19431
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19433
19432
|
zoneName: string().optional()
|
|
19434
19433
|
});
|
|
19434
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19435
|
+
var ZoneOverlapSchema = object({
|
|
19436
|
+
zoneId: string(),
|
|
19437
|
+
zoneName: string().optional(),
|
|
19438
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19439
|
+
overlapPct: number()
|
|
19440
|
+
});
|
|
19435
19441
|
var ObjectEventSchema = object({
|
|
19436
19442
|
...BaseEventFields,
|
|
19437
19443
|
kind: literal("object"),
|
|
@@ -19456,6 +19462,35 @@ var ObjectEventSchema = object({
|
|
|
19456
19462
|
bbox: BoundingBoxSchema.optional(),
|
|
19457
19463
|
/** Heavy JSON — omitted in slim projection. */
|
|
19458
19464
|
zones: array(string()).readonly().optional(),
|
|
19465
|
+
/**
|
|
19466
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19467
|
+
* the BOX area.
|
|
19468
|
+
*
|
|
19469
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19470
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19471
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19472
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19473
|
+
* else to judge by.
|
|
19474
|
+
*/
|
|
19475
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19476
|
+
/**
|
|
19477
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19478
|
+
* has no track and never will.
|
|
19479
|
+
*
|
|
19480
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19481
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19482
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19483
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19484
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19485
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19486
|
+
* event at all.
|
|
19487
|
+
*
|
|
19488
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19489
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19490
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19491
|
+
* history is asking for something that never existed.
|
|
19492
|
+
*/
|
|
19493
|
+
spawnRefused: string().optional(),
|
|
19459
19494
|
/** Omitted in slim projection. */
|
|
19460
19495
|
state: TrackStateSchema.optional(),
|
|
19461
19496
|
/**
|
|
@@ -19882,7 +19917,17 @@ var EventDensityBucketSchema = object({
|
|
|
19882
19917
|
bucketStart: number(),
|
|
19883
19918
|
motion: number().int(),
|
|
19884
19919
|
object: number().int(),
|
|
19885
|
-
audio: number().int()
|
|
19920
|
+
audio: number().int(),
|
|
19921
|
+
/**
|
|
19922
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
19923
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
19924
|
+
*
|
|
19925
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
19926
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
19927
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
19928
|
+
* the count-on-a-level-meter did.
|
|
19929
|
+
*/
|
|
19930
|
+
audioDbfs: number().optional()
|
|
19886
19931
|
});
|
|
19887
19932
|
/**
|
|
19888
19933
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20529,6 +20574,60 @@ var NativeCropResultSchema = object({
|
|
|
20529
20574
|
*/
|
|
20530
20575
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20531
20576
|
});
|
|
20577
|
+
/**
|
|
20578
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20579
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20580
|
+
*
|
|
20581
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20582
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20583
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20584
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20585
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20586
|
+
*
|
|
20587
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20588
|
+
*/
|
|
20589
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20590
|
+
/**
|
|
20591
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20592
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20593
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20594
|
+
* never a reason to retry in a loop.
|
|
20595
|
+
*
|
|
20596
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20597
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20598
|
+
* carries the runner's own miss reason.
|
|
20599
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20600
|
+
*/
|
|
20601
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20602
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20603
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20604
|
+
parked: literal(true),
|
|
20605
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20606
|
+
nodeId: string(),
|
|
20607
|
+
width: number().int().positive(),
|
|
20608
|
+
height: number().int().positive(),
|
|
20609
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20610
|
+
bytes: number().int().nonnegative(),
|
|
20611
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20612
|
+
replaced: boolean()
|
|
20613
|
+
}), object({
|
|
20614
|
+
parked: literal(false),
|
|
20615
|
+
nodeId: string(),
|
|
20616
|
+
reason: ParkRefusalSchema,
|
|
20617
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20618
|
+
handleAgeMs: number().nullable(),
|
|
20619
|
+
detail: string().optional()
|
|
20620
|
+
})]);
|
|
20621
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20622
|
+
var ParkedTrackFrameSchema = object({
|
|
20623
|
+
jpeg: string(),
|
|
20624
|
+
width: number().int().positive(),
|
|
20625
|
+
height: number().int().positive(),
|
|
20626
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20627
|
+
timestamp: number(),
|
|
20628
|
+
/** When the node stored it (the node's clock). */
|
|
20629
|
+
parkedAt: number()
|
|
20630
|
+
});
|
|
20532
20631
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20533
20632
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20534
20633
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20918,7 +21017,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20918
21017
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20919
21018
|
* analyzer providers) running on decoded frames in this runner.
|
|
20920
21019
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20921
|
-
* analytics
|
|
21020
|
+
* analytics). The provider emits ProviderMotion
|
|
20922
21021
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20923
21022
|
*/
|
|
20924
21023
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21160,7 +21259,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21160
21259
|
className: string(),
|
|
21161
21260
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21162
21261
|
sourceDeviceId: number()
|
|
21163
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21262
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21263
|
+
deviceId: number(),
|
|
21264
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21265
|
+
trackId: string(),
|
|
21266
|
+
kind: ParkedFrameKindSchema,
|
|
21267
|
+
handle: FrameHandleSchema,
|
|
21268
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21269
|
+
bbox: NativeCropBboxSchema,
|
|
21270
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21271
|
+
maxWidth: number().int().positive().optional(),
|
|
21272
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21273
|
+
timestamp: number()
|
|
21274
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21275
|
+
deviceId: number(),
|
|
21276
|
+
trackId: string(),
|
|
21277
|
+
kind: ParkedFrameKindSchema
|
|
21278
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21279
|
+
deviceId: number(),
|
|
21280
|
+
trackId: string()
|
|
21281
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21164
21282
|
var CameraPipelineConfigSchema = object({
|
|
21165
21283
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21166
21284
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24230,8 +24348,8 @@ onStatusChanged: { data: object({
|
|
|
24230
24348
|
/**
|
|
24231
24349
|
* Runtime-state slice — every provider that registers this cap
|
|
24232
24350
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24233
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24234
|
-
*
|
|
24351
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24352
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24235
24353
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24236
24354
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24237
24355
|
* the underlying driver.
|
|
@@ -24364,7 +24482,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24364
24482
|
*
|
|
24365
24483
|
* Implementations:
|
|
24366
24484
|
* - Each camera-providing addon registers this cap natively per
|
|
24367
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24485
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24368
24486
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24369
24487
|
* extra round-trip to the camera, no probing.
|
|
24370
24488
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26456,7 +26574,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26456
26574
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26457
26575
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26458
26576
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26459
|
-
* `device-provider` integrations (Reolink/
|
|
26577
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26460
26578
|
* legacy config → discovery flow.
|
|
26461
26579
|
*/
|
|
26462
26580
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -29824,7 +29942,23 @@ var RecordingRangeSchema = object({
|
|
|
29824
29942
|
});
|
|
29825
29943
|
var RecordingAvailabilitySchema = object({
|
|
29826
29944
|
deviceId: number(),
|
|
29827
|
-
ranges: array(RecordingRangeSchema)
|
|
29945
|
+
ranges: array(RecordingRangeSchema),
|
|
29946
|
+
/**
|
|
29947
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
29948
|
+
* describes (D433).
|
|
29949
|
+
*
|
|
29950
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
29951
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
29952
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
29953
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
29954
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
29955
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
29956
|
+
* UI could not see it.
|
|
29957
|
+
*
|
|
29958
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
29959
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
29960
|
+
*/
|
|
29961
|
+
profilesWithFootage: array(string())
|
|
29828
29962
|
});
|
|
29829
29963
|
var RecordingDaysSchema = object({
|
|
29830
29964
|
deviceId: number(),
|
|
@@ -29850,7 +29984,11 @@ var RecordingDaysSchema = object({
|
|
|
29850
29984
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
29851
29985
|
deviceId: number(),
|
|
29852
29986
|
read: _enum(["read", "unreadable"]),
|
|
29853
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
29987
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
29988
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
29989
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
29990
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
29991
|
+
profilesWithFootage: array(string()).readonly()
|
|
29854
29992
|
});
|
|
29855
29993
|
/**
|
|
29856
29994
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -29880,13 +30018,31 @@ var RecordingManifestSchema = object({
|
|
|
29880
30018
|
*/
|
|
29881
30019
|
playbackEndpoints: array(string())
|
|
29882
30020
|
});
|
|
29883
|
-
/**
|
|
29884
|
-
*
|
|
30021
|
+
/**
|
|
30022
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30023
|
+
* across every profile and every resolvable location on this node.
|
|
30024
|
+
*
|
|
30025
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30026
|
+
*
|
|
30027
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30028
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30029
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30030
|
+
*
|
|
30031
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30032
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30033
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30034
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30035
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30036
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30037
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30038
|
+
*/
|
|
29885
30039
|
var RecordingDeviceUsageSchema = object({
|
|
29886
30040
|
deviceId: number(),
|
|
30041
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30042
|
+
* recordings locations. */
|
|
29887
30043
|
usedBytes: number(),
|
|
29888
30044
|
/**
|
|
29889
|
-
* Start of this camera's OLDEST
|
|
30045
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
29890
30046
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
29891
30047
|
* only honest answer to "is retention actually holding?" per camera.
|
|
29892
30048
|
*
|
|
@@ -29896,7 +30052,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
29896
30052
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
29897
30053
|
* the later of the two.
|
|
29898
30054
|
*/
|
|
29899
|
-
oldestMs: number().nullable().optional()
|
|
30055
|
+
oldestMs: number().nullable().optional(),
|
|
30056
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30057
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30058
|
+
segments: number().optional(),
|
|
30059
|
+
/**
|
|
30060
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30061
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30062
|
+
*
|
|
30063
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30064
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30065
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30066
|
+
* it, and so does a node whose ledger could not answer.
|
|
30067
|
+
*/
|
|
30068
|
+
residentBytes: number().optional(),
|
|
30069
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30070
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30071
|
+
* retention. `null` = nothing resident. */
|
|
30072
|
+
residentOldestMs: number().nullable().optional()
|
|
29900
30073
|
});
|
|
29901
30074
|
/** Recording storage usage + capacity for one storage location. */
|
|
29902
30075
|
var RecordingLocationUsageSchema = object({
|
|
@@ -29934,6 +30107,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
29934
30107
|
totalUsedBytes: number(),
|
|
29935
30108
|
devices: array(RecordingDeviceUsageSchema),
|
|
29936
30109
|
/**
|
|
30110
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30111
|
+
* disks (D418).
|
|
30112
|
+
*
|
|
30113
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30114
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30115
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30116
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30117
|
+
* and its rows are residency.
|
|
30118
|
+
*/
|
|
30119
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30120
|
+
/**
|
|
29937
30121
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
29938
30122
|
* of the payload without it: the hub serves this method through a BAKED
|
|
29939
30123
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30094,7 +30278,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30094
30278
|
method(object({
|
|
30095
30279
|
deviceId: number(),
|
|
30096
30280
|
fromMs: number(),
|
|
30097
|
-
toMs: number()
|
|
30281
|
+
toMs: number(),
|
|
30282
|
+
/**
|
|
30283
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30284
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30285
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30286
|
+
* for.
|
|
30287
|
+
*/
|
|
30288
|
+
profile: string().optional()
|
|
30098
30289
|
}), RecordingAvailabilitySchema, {
|
|
30099
30290
|
kind: "query",
|
|
30100
30291
|
auth: "protected"
|
|
@@ -33813,7 +34004,7 @@ function toDeviceSummary(device, addonId) {
|
|
|
33813
34004
|
};
|
|
33814
34005
|
}
|
|
33815
34006
|
/**
|
|
33816
|
-
* Base class for device-provider addons (rtsp, onvif
|
|
34007
|
+
* Base class for device-provider addons (rtsp, onvif).
|
|
33817
34008
|
*
|
|
33818
34009
|
* Provides default implementations for the common device-provider cap
|
|
33819
34010
|
* methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
|
|
@@ -38469,6 +38660,24 @@ Object.freeze({
|
|
|
38469
38660
|
addonId: null,
|
|
38470
38661
|
access: "view"
|
|
38471
38662
|
},
|
|
38663
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
38664
|
+
capName: "pipeline-runner",
|
|
38665
|
+
capScope: "system",
|
|
38666
|
+
addonId: null,
|
|
38667
|
+
access: "view"
|
|
38668
|
+
},
|
|
38669
|
+
"pipelineRunner.parkTrackFrame": {
|
|
38670
|
+
capName: "pipeline-runner",
|
|
38671
|
+
capScope: "system",
|
|
38672
|
+
addonId: null,
|
|
38673
|
+
access: "create"
|
|
38674
|
+
},
|
|
38675
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
38676
|
+
capName: "pipeline-runner",
|
|
38677
|
+
capScope: "system",
|
|
38678
|
+
addonId: null,
|
|
38679
|
+
access: "create"
|
|
38680
|
+
},
|
|
38472
38681
|
"pipelineRunner.reportMotion": {
|
|
38473
38682
|
capName: "pipeline-runner",
|
|
38474
38683
|
capScope: "system",
|
|
@@ -41746,6 +41955,21 @@ Object.freeze({
|
|
|
41746
41955
|
form: "single",
|
|
41747
41956
|
optional: false
|
|
41748
41957
|
}],
|
|
41958
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
41959
|
+
name: "deviceId",
|
|
41960
|
+
form: "single",
|
|
41961
|
+
optional: false
|
|
41962
|
+
}],
|
|
41963
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
41964
|
+
name: "deviceId",
|
|
41965
|
+
form: "single",
|
|
41966
|
+
optional: false
|
|
41967
|
+
}],
|
|
41968
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
41969
|
+
name: "deviceId",
|
|
41970
|
+
form: "single",
|
|
41971
|
+
optional: false
|
|
41972
|
+
}],
|
|
41749
41973
|
"pipelineRunner.reportMotion": [{
|
|
41750
41974
|
name: "deviceId",
|
|
41751
41975
|
form: "single",
|
|
@@ -42437,7 +42661,7 @@ var PreviewTextField = string().max(200);
|
|
|
42437
42661
|
* Whether the notification's preview is a STILL or a short animation.
|
|
42438
42662
|
*
|
|
42439
42663
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
42440
|
-
* rule)"* —
|
|
42664
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
42441
42665
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
42442
42666
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
42443
42667
|
* simply applies it to a dozen frames sampled across the render and assembles
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-gree",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.92",
|
|
4
4
|
"description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|