@camstack/addon-provider-hikvision 1.2.98 → 1.2.101
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 +247 -23
- package/dist/addon.mjs +247 -23
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -6,7 +6,7 @@ let node_crypto = require("node:crypto");
|
|
|
6
6
|
let node_http = require("node:http");
|
|
7
7
|
let node_https = require("node:https");
|
|
8
8
|
let node_os = require("node:os");
|
|
9
|
-
//#region ../types/dist/event-category-
|
|
9
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
10
10
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
11
11
|
EventCategory["SystemBoot"] = "system.boot";
|
|
12
12
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -598,7 +598,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
598
598
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
599
599
|
*/
|
|
600
600
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
601
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
602
601
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
603
602
|
/**
|
|
604
603
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12913,7 +12912,7 @@ DeviceType.Camera;
|
|
|
12913
12912
|
var SourceInfoSchema = object({
|
|
12914
12913
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12915
12914
|
id: string(),
|
|
12916
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12915
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12917
12916
|
system: string(),
|
|
12918
12917
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12919
12918
|
* Used to detect rename when `id` changes. */
|
|
@@ -12926,7 +12925,7 @@ var SourceInfoSchema = object({
|
|
|
12926
12925
|
/**
|
|
12927
12926
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12928
12927
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12929
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12928
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12930
12929
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12931
12930
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12932
12931
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13588,7 +13587,7 @@ var deviceProviderCapability = {
|
|
|
13588
13587
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13589
13588
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13590
13589
|
*
|
|
13591
|
-
* All device provider addons (rtsp, onvif,
|
|
13590
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13592
13591
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13593
13592
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13594
13593
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17655,7 +17654,7 @@ var NcRuleInputSchema = object({
|
|
|
17655
17654
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17656
17655
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17657
17656
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17658
|
-
* 30 is
|
|
17657
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17659
17658
|
*
|
|
17660
17659
|
* ### What it replaces
|
|
17661
17660
|
*
|
|
@@ -19737,6 +19736,13 @@ var ZoneCrossingSchema = object({
|
|
|
19737
19736
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19738
19737
|
zoneName: string().optional()
|
|
19739
19738
|
});
|
|
19739
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19740
|
+
var ZoneOverlapSchema = object({
|
|
19741
|
+
zoneId: string(),
|
|
19742
|
+
zoneName: string().optional(),
|
|
19743
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19744
|
+
overlapPct: number()
|
|
19745
|
+
});
|
|
19740
19746
|
var ObjectEventSchema = object({
|
|
19741
19747
|
...BaseEventFields,
|
|
19742
19748
|
kind: literal("object"),
|
|
@@ -19761,6 +19767,35 @@ var ObjectEventSchema = object({
|
|
|
19761
19767
|
bbox: BoundingBoxSchema.optional(),
|
|
19762
19768
|
/** Heavy JSON — omitted in slim projection. */
|
|
19763
19769
|
zones: array(string()).readonly().optional(),
|
|
19770
|
+
/**
|
|
19771
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19772
|
+
* the BOX area.
|
|
19773
|
+
*
|
|
19774
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19775
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19776
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19777
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19778
|
+
* else to judge by.
|
|
19779
|
+
*/
|
|
19780
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19781
|
+
/**
|
|
19782
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19783
|
+
* has no track and never will.
|
|
19784
|
+
*
|
|
19785
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19786
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19787
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19788
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19789
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19790
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19791
|
+
* event at all.
|
|
19792
|
+
*
|
|
19793
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19794
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19795
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19796
|
+
* history is asking for something that never existed.
|
|
19797
|
+
*/
|
|
19798
|
+
spawnRefused: string().optional(),
|
|
19764
19799
|
/** Omitted in slim projection. */
|
|
19765
19800
|
state: TrackStateSchema.optional(),
|
|
19766
19801
|
/**
|
|
@@ -20187,7 +20222,17 @@ var EventDensityBucketSchema = object({
|
|
|
20187
20222
|
bucketStart: number(),
|
|
20188
20223
|
motion: number().int(),
|
|
20189
20224
|
object: number().int(),
|
|
20190
|
-
audio: number().int()
|
|
20225
|
+
audio: number().int(),
|
|
20226
|
+
/**
|
|
20227
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
20228
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
20229
|
+
*
|
|
20230
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
20231
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
20232
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
20233
|
+
* the count-on-a-level-meter did.
|
|
20234
|
+
*/
|
|
20235
|
+
audioDbfs: number().optional()
|
|
20191
20236
|
});
|
|
20192
20237
|
/**
|
|
20193
20238
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20834,6 +20879,60 @@ var NativeCropResultSchema = object({
|
|
|
20834
20879
|
*/
|
|
20835
20880
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20836
20881
|
});
|
|
20882
|
+
/**
|
|
20883
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20884
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20885
|
+
*
|
|
20886
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20887
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20888
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20889
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20890
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20891
|
+
*
|
|
20892
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20893
|
+
*/
|
|
20894
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20895
|
+
/**
|
|
20896
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20897
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20898
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20899
|
+
* never a reason to retry in a loop.
|
|
20900
|
+
*
|
|
20901
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20902
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20903
|
+
* carries the runner's own miss reason.
|
|
20904
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20905
|
+
*/
|
|
20906
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20907
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20908
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20909
|
+
parked: literal(true),
|
|
20910
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20911
|
+
nodeId: string(),
|
|
20912
|
+
width: number().int().positive(),
|
|
20913
|
+
height: number().int().positive(),
|
|
20914
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20915
|
+
bytes: number().int().nonnegative(),
|
|
20916
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20917
|
+
replaced: boolean()
|
|
20918
|
+
}), object({
|
|
20919
|
+
parked: literal(false),
|
|
20920
|
+
nodeId: string(),
|
|
20921
|
+
reason: ParkRefusalSchema,
|
|
20922
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20923
|
+
handleAgeMs: number().nullable(),
|
|
20924
|
+
detail: string().optional()
|
|
20925
|
+
})]);
|
|
20926
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20927
|
+
var ParkedTrackFrameSchema = object({
|
|
20928
|
+
jpeg: string(),
|
|
20929
|
+
width: number().int().positive(),
|
|
20930
|
+
height: number().int().positive(),
|
|
20931
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20932
|
+
timestamp: number(),
|
|
20933
|
+
/** When the node stored it (the node's clock). */
|
|
20934
|
+
parkedAt: number()
|
|
20935
|
+
});
|
|
20837
20936
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20838
20937
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20839
20938
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -21223,7 +21322,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
21223
21322
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
21224
21323
|
* analyzer providers) running on decoded frames in this runner.
|
|
21225
21324
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
21226
|
-
* analytics
|
|
21325
|
+
* analytics). The provider emits ProviderMotion
|
|
21227
21326
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21228
21327
|
*/
|
|
21229
21328
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21465,7 +21564,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21465
21564
|
className: string(),
|
|
21466
21565
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21467
21566
|
sourceDeviceId: number()
|
|
21468
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21567
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21568
|
+
deviceId: number(),
|
|
21569
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21570
|
+
trackId: string(),
|
|
21571
|
+
kind: ParkedFrameKindSchema,
|
|
21572
|
+
handle: FrameHandleSchema,
|
|
21573
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21574
|
+
bbox: NativeCropBboxSchema,
|
|
21575
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21576
|
+
maxWidth: number().int().positive().optional(),
|
|
21577
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21578
|
+
timestamp: number()
|
|
21579
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21580
|
+
deviceId: number(),
|
|
21581
|
+
trackId: string(),
|
|
21582
|
+
kind: ParkedFrameKindSchema
|
|
21583
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21584
|
+
deviceId: number(),
|
|
21585
|
+
trackId: string()
|
|
21586
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21469
21587
|
var CameraPipelineConfigSchema = object({
|
|
21470
21588
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21471
21589
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24639,8 +24757,8 @@ onStatusChanged: { data: object({
|
|
|
24639
24757
|
/**
|
|
24640
24758
|
* Runtime-state slice — every provider that registers this cap
|
|
24641
24759
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24642
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24643
|
-
*
|
|
24760
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24761
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24644
24762
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24645
24763
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24646
24764
|
* the underlying driver.
|
|
@@ -24773,7 +24891,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24773
24891
|
*
|
|
24774
24892
|
* Implementations:
|
|
24775
24893
|
* - Each camera-providing addon registers this cap natively per
|
|
24776
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24894
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24777
24895
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24778
24896
|
* extra round-trip to the camera, no probing.
|
|
24779
24897
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26865,7 +26983,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26865
26983
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26866
26984
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26867
26985
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26868
|
-
* `device-provider` integrations (Reolink/
|
|
26986
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26869
26987
|
* legacy config → discovery flow.
|
|
26870
26988
|
*/
|
|
26871
26989
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -30366,7 +30484,23 @@ var RecordingRangeSchema = object({
|
|
|
30366
30484
|
});
|
|
30367
30485
|
var RecordingAvailabilitySchema = object({
|
|
30368
30486
|
deviceId: number(),
|
|
30369
|
-
ranges: array(RecordingRangeSchema)
|
|
30487
|
+
ranges: array(RecordingRangeSchema),
|
|
30488
|
+
/**
|
|
30489
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
30490
|
+
* describes (D433).
|
|
30491
|
+
*
|
|
30492
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30493
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
30494
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
30495
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
30496
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
30497
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
30498
|
+
* UI could not see it.
|
|
30499
|
+
*
|
|
30500
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
30501
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
30502
|
+
*/
|
|
30503
|
+
profilesWithFootage: array(string())
|
|
30370
30504
|
});
|
|
30371
30505
|
var RecordingDaysSchema = object({
|
|
30372
30506
|
deviceId: number(),
|
|
@@ -30392,7 +30526,11 @@ var RecordingDaysSchema = object({
|
|
|
30392
30526
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
30393
30527
|
deviceId: number(),
|
|
30394
30528
|
read: _enum(["read", "unreadable"]),
|
|
30395
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
30529
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
30530
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
30531
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
30532
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
30533
|
+
profilesWithFootage: array(string()).readonly()
|
|
30396
30534
|
});
|
|
30397
30535
|
/**
|
|
30398
30536
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -30422,13 +30560,31 @@ var RecordingManifestSchema = object({
|
|
|
30422
30560
|
*/
|
|
30423
30561
|
playbackEndpoints: array(string())
|
|
30424
30562
|
});
|
|
30425
|
-
/**
|
|
30426
|
-
*
|
|
30563
|
+
/**
|
|
30564
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30565
|
+
* across every profile and every resolvable location on this node.
|
|
30566
|
+
*
|
|
30567
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30568
|
+
*
|
|
30569
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30570
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30571
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30572
|
+
*
|
|
30573
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30574
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30575
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30576
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30577
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30578
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30579
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30580
|
+
*/
|
|
30427
30581
|
var RecordingDeviceUsageSchema = object({
|
|
30428
30582
|
deviceId: number(),
|
|
30583
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30584
|
+
* recordings locations. */
|
|
30429
30585
|
usedBytes: number(),
|
|
30430
30586
|
/**
|
|
30431
|
-
* Start of this camera's OLDEST
|
|
30587
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
30432
30588
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
30433
30589
|
* only honest answer to "is retention actually holding?" per camera.
|
|
30434
30590
|
*
|
|
@@ -30438,7 +30594,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
30438
30594
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
30439
30595
|
* the later of the two.
|
|
30440
30596
|
*/
|
|
30441
|
-
oldestMs: number().nullable().optional()
|
|
30597
|
+
oldestMs: number().nullable().optional(),
|
|
30598
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30599
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30600
|
+
segments: number().optional(),
|
|
30601
|
+
/**
|
|
30602
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30603
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30604
|
+
*
|
|
30605
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30606
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30607
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30608
|
+
* it, and so does a node whose ledger could not answer.
|
|
30609
|
+
*/
|
|
30610
|
+
residentBytes: number().optional(),
|
|
30611
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30612
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30613
|
+
* retention. `null` = nothing resident. */
|
|
30614
|
+
residentOldestMs: number().nullable().optional()
|
|
30442
30615
|
});
|
|
30443
30616
|
/** Recording storage usage + capacity for one storage location. */
|
|
30444
30617
|
var RecordingLocationUsageSchema = object({
|
|
@@ -30476,6 +30649,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
30476
30649
|
totalUsedBytes: number(),
|
|
30477
30650
|
devices: array(RecordingDeviceUsageSchema),
|
|
30478
30651
|
/**
|
|
30652
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30653
|
+
* disks (D418).
|
|
30654
|
+
*
|
|
30655
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30656
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30657
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30658
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30659
|
+
* and its rows are residency.
|
|
30660
|
+
*/
|
|
30661
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30662
|
+
/**
|
|
30479
30663
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
30480
30664
|
* of the payload without it: the hub serves this method through a BAKED
|
|
30481
30665
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30636,7 +30820,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30636
30820
|
method(object({
|
|
30637
30821
|
deviceId: number(),
|
|
30638
30822
|
fromMs: number(),
|
|
30639
|
-
toMs: number()
|
|
30823
|
+
toMs: number(),
|
|
30824
|
+
/**
|
|
30825
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30826
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30827
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30828
|
+
* for.
|
|
30829
|
+
*/
|
|
30830
|
+
profile: string().optional()
|
|
30640
30831
|
}), RecordingAvailabilitySchema, {
|
|
30641
30832
|
kind: "query",
|
|
30642
30833
|
auth: "protected"
|
|
@@ -34568,7 +34759,7 @@ function toDeviceSummary(device, addonId) {
|
|
|
34568
34759
|
};
|
|
34569
34760
|
}
|
|
34570
34761
|
/**
|
|
34571
|
-
* Base class for device-provider addons (rtsp, onvif
|
|
34762
|
+
* Base class for device-provider addons (rtsp, onvif).
|
|
34572
34763
|
*
|
|
34573
34764
|
* Provides default implementations for the common device-provider cap
|
|
34574
34765
|
* methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
|
|
@@ -39442,6 +39633,24 @@ Object.freeze({
|
|
|
39442
39633
|
addonId: null,
|
|
39443
39634
|
access: "view"
|
|
39444
39635
|
},
|
|
39636
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
39637
|
+
capName: "pipeline-runner",
|
|
39638
|
+
capScope: "system",
|
|
39639
|
+
addonId: null,
|
|
39640
|
+
access: "view"
|
|
39641
|
+
},
|
|
39642
|
+
"pipelineRunner.parkTrackFrame": {
|
|
39643
|
+
capName: "pipeline-runner",
|
|
39644
|
+
capScope: "system",
|
|
39645
|
+
addonId: null,
|
|
39646
|
+
access: "create"
|
|
39647
|
+
},
|
|
39648
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
39649
|
+
capName: "pipeline-runner",
|
|
39650
|
+
capScope: "system",
|
|
39651
|
+
addonId: null,
|
|
39652
|
+
access: "create"
|
|
39653
|
+
},
|
|
39445
39654
|
"pipelineRunner.reportMotion": {
|
|
39446
39655
|
capName: "pipeline-runner",
|
|
39447
39656
|
capScope: "system",
|
|
@@ -42719,6 +42928,21 @@ Object.freeze({
|
|
|
42719
42928
|
form: "single",
|
|
42720
42929
|
optional: false
|
|
42721
42930
|
}],
|
|
42931
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
42932
|
+
name: "deviceId",
|
|
42933
|
+
form: "single",
|
|
42934
|
+
optional: false
|
|
42935
|
+
}],
|
|
42936
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
42937
|
+
name: "deviceId",
|
|
42938
|
+
form: "single",
|
|
42939
|
+
optional: false
|
|
42940
|
+
}],
|
|
42941
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
42942
|
+
name: "deviceId",
|
|
42943
|
+
form: "single",
|
|
42944
|
+
optional: false
|
|
42945
|
+
}],
|
|
42722
42946
|
"pipelineRunner.reportMotion": [{
|
|
42723
42947
|
name: "deviceId",
|
|
42724
42948
|
form: "single",
|
|
@@ -43410,7 +43634,7 @@ var PreviewTextField = string().max(200);
|
|
|
43410
43634
|
* Whether the notification's preview is a STILL or a short animation.
|
|
43411
43635
|
*
|
|
43412
43636
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
43413
|
-
* rule)"* —
|
|
43637
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
43414
43638
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
43415
43639
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
43416
43640
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -48078,7 +48302,7 @@ var HIKVISION_ADDON_ID = "provider-hikvision";
|
|
|
48078
48302
|
/**
|
|
48079
48303
|
* Hikvision smart-detection class strings observed in alarm XML.
|
|
48080
48304
|
* Mapped to the loose camstack `CameraNativeDetection.className`
|
|
48081
|
-
* convention so other providers (Reolink
|
|
48305
|
+
* convention so other providers (Reolink) emit the same
|
|
48082
48306
|
* strings for the same physical concept.
|
|
48083
48307
|
*/
|
|
48084
48308
|
var HIKVISION_AI_CLASS_MAP = {
|
package/dist/addon.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { networkInterfaces } from "node:os";
|
|
|
7
7
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
8
8
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
9
9
|
//#endregion
|
|
10
|
-
//#region ../types/dist/event-category-
|
|
10
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
11
11
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
12
12
|
EventCategory["SystemBoot"] = "system.boot";
|
|
13
13
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -599,7 +599,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
599
599
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
600
600
|
*/
|
|
601
601
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
602
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
603
602
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
604
603
|
/**
|
|
605
604
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12914,7 +12913,7 @@ DeviceType.Camera;
|
|
|
12914
12913
|
var SourceInfoSchema = object({
|
|
12915
12914
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12916
12915
|
id: string(),
|
|
12917
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12916
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12918
12917
|
system: string(),
|
|
12919
12918
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12920
12919
|
* Used to detect rename when `id` changes. */
|
|
@@ -12927,7 +12926,7 @@ var SourceInfoSchema = object({
|
|
|
12927
12926
|
/**
|
|
12928
12927
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12929
12928
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12930
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12929
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12931
12930
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12932
12931
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12933
12932
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13589,7 +13588,7 @@ var deviceProviderCapability = {
|
|
|
13589
13588
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13590
13589
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13591
13590
|
*
|
|
13592
|
-
* All device provider addons (rtsp, onvif,
|
|
13591
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13593
13592
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13594
13593
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13595
13594
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17656,7 +17655,7 @@ var NcRuleInputSchema = object({
|
|
|
17656
17655
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17657
17656
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17658
17657
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17659
|
-
* 30 is
|
|
17658
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17660
17659
|
*
|
|
17661
17660
|
* ### What it replaces
|
|
17662
17661
|
*
|
|
@@ -19738,6 +19737,13 @@ var ZoneCrossingSchema = object({
|
|
|
19738
19737
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19739
19738
|
zoneName: string().optional()
|
|
19740
19739
|
});
|
|
19740
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19741
|
+
var ZoneOverlapSchema = object({
|
|
19742
|
+
zoneId: string(),
|
|
19743
|
+
zoneName: string().optional(),
|
|
19744
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19745
|
+
overlapPct: number()
|
|
19746
|
+
});
|
|
19741
19747
|
var ObjectEventSchema = object({
|
|
19742
19748
|
...BaseEventFields,
|
|
19743
19749
|
kind: literal("object"),
|
|
@@ -19762,6 +19768,35 @@ var ObjectEventSchema = object({
|
|
|
19762
19768
|
bbox: BoundingBoxSchema.optional(),
|
|
19763
19769
|
/** Heavy JSON — omitted in slim projection. */
|
|
19764
19770
|
zones: array(string()).readonly().optional(),
|
|
19771
|
+
/**
|
|
19772
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19773
|
+
* the BOX area.
|
|
19774
|
+
*
|
|
19775
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19776
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19777
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19778
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19779
|
+
* else to judge by.
|
|
19780
|
+
*/
|
|
19781
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19782
|
+
/**
|
|
19783
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19784
|
+
* has no track and never will.
|
|
19785
|
+
*
|
|
19786
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19787
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19788
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19789
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19790
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19791
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19792
|
+
* event at all.
|
|
19793
|
+
*
|
|
19794
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19795
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19796
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19797
|
+
* history is asking for something that never existed.
|
|
19798
|
+
*/
|
|
19799
|
+
spawnRefused: string().optional(),
|
|
19765
19800
|
/** Omitted in slim projection. */
|
|
19766
19801
|
state: TrackStateSchema.optional(),
|
|
19767
19802
|
/**
|
|
@@ -20188,7 +20223,17 @@ var EventDensityBucketSchema = object({
|
|
|
20188
20223
|
bucketStart: number(),
|
|
20189
20224
|
motion: number().int(),
|
|
20190
20225
|
object: number().int(),
|
|
20191
|
-
audio: number().int()
|
|
20226
|
+
audio: number().int(),
|
|
20227
|
+
/**
|
|
20228
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
20229
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
20230
|
+
*
|
|
20231
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
20232
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
20233
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
20234
|
+
* the count-on-a-level-meter did.
|
|
20235
|
+
*/
|
|
20236
|
+
audioDbfs: number().optional()
|
|
20192
20237
|
});
|
|
20193
20238
|
/**
|
|
20194
20239
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20835,6 +20880,60 @@ var NativeCropResultSchema = object({
|
|
|
20835
20880
|
*/
|
|
20836
20881
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20837
20882
|
});
|
|
20883
|
+
/**
|
|
20884
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20885
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20886
|
+
*
|
|
20887
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20888
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20889
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20890
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20891
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20892
|
+
*
|
|
20893
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20894
|
+
*/
|
|
20895
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20896
|
+
/**
|
|
20897
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20898
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20899
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20900
|
+
* never a reason to retry in a loop.
|
|
20901
|
+
*
|
|
20902
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20903
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20904
|
+
* carries the runner's own miss reason.
|
|
20905
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20906
|
+
*/
|
|
20907
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20908
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20909
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20910
|
+
parked: literal(true),
|
|
20911
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20912
|
+
nodeId: string(),
|
|
20913
|
+
width: number().int().positive(),
|
|
20914
|
+
height: number().int().positive(),
|
|
20915
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20916
|
+
bytes: number().int().nonnegative(),
|
|
20917
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20918
|
+
replaced: boolean()
|
|
20919
|
+
}), object({
|
|
20920
|
+
parked: literal(false),
|
|
20921
|
+
nodeId: string(),
|
|
20922
|
+
reason: ParkRefusalSchema,
|
|
20923
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20924
|
+
handleAgeMs: number().nullable(),
|
|
20925
|
+
detail: string().optional()
|
|
20926
|
+
})]);
|
|
20927
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20928
|
+
var ParkedTrackFrameSchema = object({
|
|
20929
|
+
jpeg: string(),
|
|
20930
|
+
width: number().int().positive(),
|
|
20931
|
+
height: number().int().positive(),
|
|
20932
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20933
|
+
timestamp: number(),
|
|
20934
|
+
/** When the node stored it (the node's clock). */
|
|
20935
|
+
parkedAt: number()
|
|
20936
|
+
});
|
|
20838
20937
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20839
20938
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20840
20939
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -21224,7 +21323,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
21224
21323
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
21225
21324
|
* analyzer providers) running on decoded frames in this runner.
|
|
21226
21325
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
21227
|
-
* analytics
|
|
21326
|
+
* analytics). The provider emits ProviderMotion
|
|
21228
21327
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21229
21328
|
*/
|
|
21230
21329
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21466,7 +21565,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21466
21565
|
className: string(),
|
|
21467
21566
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21468
21567
|
sourceDeviceId: number()
|
|
21469
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21568
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21569
|
+
deviceId: number(),
|
|
21570
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21571
|
+
trackId: string(),
|
|
21572
|
+
kind: ParkedFrameKindSchema,
|
|
21573
|
+
handle: FrameHandleSchema,
|
|
21574
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21575
|
+
bbox: NativeCropBboxSchema,
|
|
21576
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21577
|
+
maxWidth: number().int().positive().optional(),
|
|
21578
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21579
|
+
timestamp: number()
|
|
21580
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21581
|
+
deviceId: number(),
|
|
21582
|
+
trackId: string(),
|
|
21583
|
+
kind: ParkedFrameKindSchema
|
|
21584
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21585
|
+
deviceId: number(),
|
|
21586
|
+
trackId: string()
|
|
21587
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21470
21588
|
var CameraPipelineConfigSchema = object({
|
|
21471
21589
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21472
21590
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24640,8 +24758,8 @@ onStatusChanged: { data: object({
|
|
|
24640
24758
|
/**
|
|
24641
24759
|
* Runtime-state slice — every provider that registers this cap
|
|
24642
24760
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24643
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24644
|
-
*
|
|
24761
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24762
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24645
24763
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24646
24764
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24647
24765
|
* the underlying driver.
|
|
@@ -24774,7 +24892,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24774
24892
|
*
|
|
24775
24893
|
* Implementations:
|
|
24776
24894
|
* - Each camera-providing addon registers this cap natively per
|
|
24777
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24895
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24778
24896
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24779
24897
|
* extra round-trip to the camera, no probing.
|
|
24780
24898
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26866,7 +26984,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26866
26984
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26867
26985
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26868
26986
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26869
|
-
* `device-provider` integrations (Reolink/
|
|
26987
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26870
26988
|
* legacy config → discovery flow.
|
|
26871
26989
|
*/
|
|
26872
26990
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -30367,7 +30485,23 @@ var RecordingRangeSchema = object({
|
|
|
30367
30485
|
});
|
|
30368
30486
|
var RecordingAvailabilitySchema = object({
|
|
30369
30487
|
deviceId: number(),
|
|
30370
|
-
ranges: array(RecordingRangeSchema)
|
|
30488
|
+
ranges: array(RecordingRangeSchema),
|
|
30489
|
+
/**
|
|
30490
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
30491
|
+
* describes (D433).
|
|
30492
|
+
*
|
|
30493
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30494
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
30495
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
30496
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
30497
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
30498
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
30499
|
+
* UI could not see it.
|
|
30500
|
+
*
|
|
30501
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
30502
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
30503
|
+
*/
|
|
30504
|
+
profilesWithFootage: array(string())
|
|
30371
30505
|
});
|
|
30372
30506
|
var RecordingDaysSchema = object({
|
|
30373
30507
|
deviceId: number(),
|
|
@@ -30393,7 +30527,11 @@ var RecordingDaysSchema = object({
|
|
|
30393
30527
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
30394
30528
|
deviceId: number(),
|
|
30395
30529
|
read: _enum(["read", "unreadable"]),
|
|
30396
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
30530
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
30531
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
30532
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
30533
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
30534
|
+
profilesWithFootage: array(string()).readonly()
|
|
30397
30535
|
});
|
|
30398
30536
|
/**
|
|
30399
30537
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -30423,13 +30561,31 @@ var RecordingManifestSchema = object({
|
|
|
30423
30561
|
*/
|
|
30424
30562
|
playbackEndpoints: array(string())
|
|
30425
30563
|
});
|
|
30426
|
-
/**
|
|
30427
|
-
*
|
|
30564
|
+
/**
|
|
30565
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30566
|
+
* across every profile and every resolvable location on this node.
|
|
30567
|
+
*
|
|
30568
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30569
|
+
*
|
|
30570
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30571
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30572
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30573
|
+
*
|
|
30574
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30575
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30576
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30577
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30578
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30579
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30580
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30581
|
+
*/
|
|
30428
30582
|
var RecordingDeviceUsageSchema = object({
|
|
30429
30583
|
deviceId: number(),
|
|
30584
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30585
|
+
* recordings locations. */
|
|
30430
30586
|
usedBytes: number(),
|
|
30431
30587
|
/**
|
|
30432
|
-
* Start of this camera's OLDEST
|
|
30588
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
30433
30589
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
30434
30590
|
* only honest answer to "is retention actually holding?" per camera.
|
|
30435
30591
|
*
|
|
@@ -30439,7 +30595,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
30439
30595
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
30440
30596
|
* the later of the two.
|
|
30441
30597
|
*/
|
|
30442
|
-
oldestMs: number().nullable().optional()
|
|
30598
|
+
oldestMs: number().nullable().optional(),
|
|
30599
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30600
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30601
|
+
segments: number().optional(),
|
|
30602
|
+
/**
|
|
30603
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30604
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30605
|
+
*
|
|
30606
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30607
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30608
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30609
|
+
* it, and so does a node whose ledger could not answer.
|
|
30610
|
+
*/
|
|
30611
|
+
residentBytes: number().optional(),
|
|
30612
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30613
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30614
|
+
* retention. `null` = nothing resident. */
|
|
30615
|
+
residentOldestMs: number().nullable().optional()
|
|
30443
30616
|
});
|
|
30444
30617
|
/** Recording storage usage + capacity for one storage location. */
|
|
30445
30618
|
var RecordingLocationUsageSchema = object({
|
|
@@ -30477,6 +30650,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
30477
30650
|
totalUsedBytes: number(),
|
|
30478
30651
|
devices: array(RecordingDeviceUsageSchema),
|
|
30479
30652
|
/**
|
|
30653
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30654
|
+
* disks (D418).
|
|
30655
|
+
*
|
|
30656
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30657
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30658
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30659
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30660
|
+
* and its rows are residency.
|
|
30661
|
+
*/
|
|
30662
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30663
|
+
/**
|
|
30480
30664
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
30481
30665
|
* of the payload without it: the hub serves this method through a BAKED
|
|
30482
30666
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30637,7 +30821,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30637
30821
|
method(object({
|
|
30638
30822
|
deviceId: number(),
|
|
30639
30823
|
fromMs: number(),
|
|
30640
|
-
toMs: number()
|
|
30824
|
+
toMs: number(),
|
|
30825
|
+
/**
|
|
30826
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30827
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30828
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30829
|
+
* for.
|
|
30830
|
+
*/
|
|
30831
|
+
profile: string().optional()
|
|
30641
30832
|
}), RecordingAvailabilitySchema, {
|
|
30642
30833
|
kind: "query",
|
|
30643
30834
|
auth: "protected"
|
|
@@ -34569,7 +34760,7 @@ function toDeviceSummary(device, addonId) {
|
|
|
34569
34760
|
};
|
|
34570
34761
|
}
|
|
34571
34762
|
/**
|
|
34572
|
-
* Base class for device-provider addons (rtsp, onvif
|
|
34763
|
+
* Base class for device-provider addons (rtsp, onvif).
|
|
34573
34764
|
*
|
|
34574
34765
|
* Provides default implementations for the common device-provider cap
|
|
34575
34766
|
* methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
|
|
@@ -39443,6 +39634,24 @@ Object.freeze({
|
|
|
39443
39634
|
addonId: null,
|
|
39444
39635
|
access: "view"
|
|
39445
39636
|
},
|
|
39637
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
39638
|
+
capName: "pipeline-runner",
|
|
39639
|
+
capScope: "system",
|
|
39640
|
+
addonId: null,
|
|
39641
|
+
access: "view"
|
|
39642
|
+
},
|
|
39643
|
+
"pipelineRunner.parkTrackFrame": {
|
|
39644
|
+
capName: "pipeline-runner",
|
|
39645
|
+
capScope: "system",
|
|
39646
|
+
addonId: null,
|
|
39647
|
+
access: "create"
|
|
39648
|
+
},
|
|
39649
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
39650
|
+
capName: "pipeline-runner",
|
|
39651
|
+
capScope: "system",
|
|
39652
|
+
addonId: null,
|
|
39653
|
+
access: "create"
|
|
39654
|
+
},
|
|
39446
39655
|
"pipelineRunner.reportMotion": {
|
|
39447
39656
|
capName: "pipeline-runner",
|
|
39448
39657
|
capScope: "system",
|
|
@@ -42720,6 +42929,21 @@ Object.freeze({
|
|
|
42720
42929
|
form: "single",
|
|
42721
42930
|
optional: false
|
|
42722
42931
|
}],
|
|
42932
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
42933
|
+
name: "deviceId",
|
|
42934
|
+
form: "single",
|
|
42935
|
+
optional: false
|
|
42936
|
+
}],
|
|
42937
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
42938
|
+
name: "deviceId",
|
|
42939
|
+
form: "single",
|
|
42940
|
+
optional: false
|
|
42941
|
+
}],
|
|
42942
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
42943
|
+
name: "deviceId",
|
|
42944
|
+
form: "single",
|
|
42945
|
+
optional: false
|
|
42946
|
+
}],
|
|
42723
42947
|
"pipelineRunner.reportMotion": [{
|
|
42724
42948
|
name: "deviceId",
|
|
42725
42949
|
form: "single",
|
|
@@ -43411,7 +43635,7 @@ var PreviewTextField = string().max(200);
|
|
|
43411
43635
|
* Whether the notification's preview is a STILL or a short animation.
|
|
43412
43636
|
*
|
|
43413
43637
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
43414
|
-
* rule)"* —
|
|
43638
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
43415
43639
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
43416
43640
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
43417
43641
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -48079,7 +48303,7 @@ var HIKVISION_ADDON_ID = "provider-hikvision";
|
|
|
48079
48303
|
/**
|
|
48080
48304
|
* Hikvision smart-detection class strings observed in alarm XML.
|
|
48081
48305
|
* Mapped to the loose camstack `CameraNativeDetection.className`
|
|
48082
|
-
* convention so other providers (Reolink
|
|
48306
|
+
* convention so other providers (Reolink) emit the same
|
|
48083
48307
|
* strings for the same physical concept.
|
|
48084
48308
|
*/
|
|
48085
48309
|
var HIKVISION_AI_CLASS_MAP = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-hikvision",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.101",
|
|
4
4
|
"description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|