@camstack/addon-terminal 0.1.95 → 0.1.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +245 -21
- package/dist/addon.mjs +245 -21
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -31,7 +31,7 @@ let node_module = require("node:module");
|
|
|
31
31
|
let sharp = require("sharp");
|
|
32
32
|
sharp = __toESM(sharp);
|
|
33
33
|
let node_http = require("node:http");
|
|
34
|
-
//#region ../types/dist/event-category-
|
|
34
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
35
35
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
36
36
|
EventCategory["SystemBoot"] = "system.boot";
|
|
37
37
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -623,7 +623,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
623
623
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
624
624
|
*/
|
|
625
625
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
626
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
627
626
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
628
627
|
/**
|
|
629
628
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12724,7 +12723,7 @@ DeviceType.Camera;
|
|
|
12724
12723
|
var SourceInfoSchema = object({
|
|
12725
12724
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12726
12725
|
id: string(),
|
|
12727
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12726
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12728
12727
|
system: string(),
|
|
12729
12728
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12730
12729
|
* Used to detect rename when `id` changes. */
|
|
@@ -12737,7 +12736,7 @@ var SourceInfoSchema = object({
|
|
|
12737
12736
|
/**
|
|
12738
12737
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12739
12738
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12740
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12739
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12741
12740
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12742
12741
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12743
12742
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13318,7 +13317,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
13318
13317
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13319
13318
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13320
13319
|
*
|
|
13321
|
-
* All device provider addons (rtsp, onvif,
|
|
13320
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13322
13321
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13323
13322
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13324
13323
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17366,7 +17365,7 @@ var NcRuleInputSchema = object({
|
|
|
17366
17365
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17367
17366
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17368
17367
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17369
|
-
* 30 is
|
|
17368
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17370
17369
|
*
|
|
17371
17370
|
* ### What it replaces
|
|
17372
17371
|
*
|
|
@@ -19448,6 +19447,13 @@ var ZoneCrossingSchema = object({
|
|
|
19448
19447
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19449
19448
|
zoneName: string().optional()
|
|
19450
19449
|
});
|
|
19450
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19451
|
+
var ZoneOverlapSchema = object({
|
|
19452
|
+
zoneId: string(),
|
|
19453
|
+
zoneName: string().optional(),
|
|
19454
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19455
|
+
overlapPct: number()
|
|
19456
|
+
});
|
|
19451
19457
|
var ObjectEventSchema = object({
|
|
19452
19458
|
...BaseEventFields,
|
|
19453
19459
|
kind: literal("object"),
|
|
@@ -19472,6 +19478,35 @@ var ObjectEventSchema = object({
|
|
|
19472
19478
|
bbox: BoundingBoxSchema.optional(),
|
|
19473
19479
|
/** Heavy JSON — omitted in slim projection. */
|
|
19474
19480
|
zones: array(string()).readonly().optional(),
|
|
19481
|
+
/**
|
|
19482
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19483
|
+
* the BOX area.
|
|
19484
|
+
*
|
|
19485
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19486
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19487
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19488
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19489
|
+
* else to judge by.
|
|
19490
|
+
*/
|
|
19491
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19492
|
+
/**
|
|
19493
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19494
|
+
* has no track and never will.
|
|
19495
|
+
*
|
|
19496
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19497
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19498
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19499
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19500
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19501
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19502
|
+
* event at all.
|
|
19503
|
+
*
|
|
19504
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19505
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19506
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19507
|
+
* history is asking for something that never existed.
|
|
19508
|
+
*/
|
|
19509
|
+
spawnRefused: string().optional(),
|
|
19475
19510
|
/** Omitted in slim projection. */
|
|
19476
19511
|
state: TrackStateSchema.optional(),
|
|
19477
19512
|
/**
|
|
@@ -19898,7 +19933,17 @@ var EventDensityBucketSchema = object({
|
|
|
19898
19933
|
bucketStart: number(),
|
|
19899
19934
|
motion: number().int(),
|
|
19900
19935
|
object: number().int(),
|
|
19901
|
-
audio: number().int()
|
|
19936
|
+
audio: number().int(),
|
|
19937
|
+
/**
|
|
19938
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
19939
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
19940
|
+
*
|
|
19941
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
19942
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
19943
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
19944
|
+
* the count-on-a-level-meter did.
|
|
19945
|
+
*/
|
|
19946
|
+
audioDbfs: number().optional()
|
|
19902
19947
|
});
|
|
19903
19948
|
/**
|
|
19904
19949
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20545,6 +20590,60 @@ var NativeCropResultSchema = object({
|
|
|
20545
20590
|
*/
|
|
20546
20591
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20547
20592
|
});
|
|
20593
|
+
/**
|
|
20594
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20595
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20596
|
+
*
|
|
20597
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20598
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20599
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20600
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20601
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20602
|
+
*
|
|
20603
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20604
|
+
*/
|
|
20605
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20606
|
+
/**
|
|
20607
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20608
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20609
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20610
|
+
* never a reason to retry in a loop.
|
|
20611
|
+
*
|
|
20612
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20613
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20614
|
+
* carries the runner's own miss reason.
|
|
20615
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20616
|
+
*/
|
|
20617
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20618
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20619
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20620
|
+
parked: literal(true),
|
|
20621
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20622
|
+
nodeId: string(),
|
|
20623
|
+
width: number().int().positive(),
|
|
20624
|
+
height: number().int().positive(),
|
|
20625
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20626
|
+
bytes: number().int().nonnegative(),
|
|
20627
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20628
|
+
replaced: boolean()
|
|
20629
|
+
}), object({
|
|
20630
|
+
parked: literal(false),
|
|
20631
|
+
nodeId: string(),
|
|
20632
|
+
reason: ParkRefusalSchema,
|
|
20633
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20634
|
+
handleAgeMs: number().nullable(),
|
|
20635
|
+
detail: string().optional()
|
|
20636
|
+
})]);
|
|
20637
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20638
|
+
var ParkedTrackFrameSchema = object({
|
|
20639
|
+
jpeg: string(),
|
|
20640
|
+
width: number().int().positive(),
|
|
20641
|
+
height: number().int().positive(),
|
|
20642
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20643
|
+
timestamp: number(),
|
|
20644
|
+
/** When the node stored it (the node's clock). */
|
|
20645
|
+
parkedAt: number()
|
|
20646
|
+
});
|
|
20548
20647
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20549
20648
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20550
20649
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20934,7 +21033,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20934
21033
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20935
21034
|
* analyzer providers) running on decoded frames in this runner.
|
|
20936
21035
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20937
|
-
* analytics
|
|
21036
|
+
* analytics). The provider emits ProviderMotion
|
|
20938
21037
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20939
21038
|
*/
|
|
20940
21039
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21176,7 +21275,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21176
21275
|
className: string(),
|
|
21177
21276
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21178
21277
|
sourceDeviceId: number()
|
|
21179
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21278
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21279
|
+
deviceId: number(),
|
|
21280
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21281
|
+
trackId: string(),
|
|
21282
|
+
kind: ParkedFrameKindSchema,
|
|
21283
|
+
handle: FrameHandleSchema,
|
|
21284
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21285
|
+
bbox: NativeCropBboxSchema,
|
|
21286
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21287
|
+
maxWidth: number().int().positive().optional(),
|
|
21288
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21289
|
+
timestamp: number()
|
|
21290
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21291
|
+
deviceId: number(),
|
|
21292
|
+
trackId: string(),
|
|
21293
|
+
kind: ParkedFrameKindSchema
|
|
21294
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21295
|
+
deviceId: number(),
|
|
21296
|
+
trackId: string()
|
|
21297
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21180
21298
|
var CameraPipelineConfigSchema = object({
|
|
21181
21299
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21182
21300
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24394,8 +24512,8 @@ onStatusChanged: { data: object({
|
|
|
24394
24512
|
/**
|
|
24395
24513
|
* Runtime-state slice — every provider that registers this cap
|
|
24396
24514
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24397
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24398
|
-
*
|
|
24515
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24516
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24399
24517
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24400
24518
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24401
24519
|
* the underlying driver.
|
|
@@ -24528,7 +24646,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24528
24646
|
*
|
|
24529
24647
|
* Implementations:
|
|
24530
24648
|
* - Each camera-providing addon registers this cap natively per
|
|
24531
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24649
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24532
24650
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24533
24651
|
* extra round-trip to the camera, no probing.
|
|
24534
24652
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26620,7 +26738,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26620
26738
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26621
26739
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26622
26740
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26623
|
-
* `device-provider` integrations (Reolink/
|
|
26741
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26624
26742
|
* legacy config → discovery flow.
|
|
26625
26743
|
*/
|
|
26626
26744
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -29988,7 +30106,23 @@ var RecordingRangeSchema = object({
|
|
|
29988
30106
|
});
|
|
29989
30107
|
var RecordingAvailabilitySchema = object({
|
|
29990
30108
|
deviceId: number(),
|
|
29991
|
-
ranges: array(RecordingRangeSchema)
|
|
30109
|
+
ranges: array(RecordingRangeSchema),
|
|
30110
|
+
/**
|
|
30111
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
30112
|
+
* describes (D433).
|
|
30113
|
+
*
|
|
30114
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30115
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
30116
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
30117
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
30118
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
30119
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
30120
|
+
* UI could not see it.
|
|
30121
|
+
*
|
|
30122
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
30123
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
30124
|
+
*/
|
|
30125
|
+
profilesWithFootage: array(string())
|
|
29992
30126
|
});
|
|
29993
30127
|
var RecordingDaysSchema = object({
|
|
29994
30128
|
deviceId: number(),
|
|
@@ -30014,7 +30148,11 @@ var RecordingDaysSchema = object({
|
|
|
30014
30148
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
30015
30149
|
deviceId: number(),
|
|
30016
30150
|
read: _enum(["read", "unreadable"]),
|
|
30017
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
30151
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
30152
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
30153
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
30154
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
30155
|
+
profilesWithFootage: array(string()).readonly()
|
|
30018
30156
|
});
|
|
30019
30157
|
/**
|
|
30020
30158
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -30044,13 +30182,31 @@ var RecordingManifestSchema = object({
|
|
|
30044
30182
|
*/
|
|
30045
30183
|
playbackEndpoints: array(string())
|
|
30046
30184
|
});
|
|
30047
|
-
/**
|
|
30048
|
-
*
|
|
30185
|
+
/**
|
|
30186
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30187
|
+
* across every profile and every resolvable location on this node.
|
|
30188
|
+
*
|
|
30189
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30190
|
+
*
|
|
30191
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30192
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30193
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30194
|
+
*
|
|
30195
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30196
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30197
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30198
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30199
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30200
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30201
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30202
|
+
*/
|
|
30049
30203
|
var RecordingDeviceUsageSchema = object({
|
|
30050
30204
|
deviceId: number(),
|
|
30205
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30206
|
+
* recordings locations. */
|
|
30051
30207
|
usedBytes: number(),
|
|
30052
30208
|
/**
|
|
30053
|
-
* Start of this camera's OLDEST
|
|
30209
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
30054
30210
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
30055
30211
|
* only honest answer to "is retention actually holding?" per camera.
|
|
30056
30212
|
*
|
|
@@ -30060,7 +30216,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
30060
30216
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
30061
30217
|
* the later of the two.
|
|
30062
30218
|
*/
|
|
30063
|
-
oldestMs: number().nullable().optional()
|
|
30219
|
+
oldestMs: number().nullable().optional(),
|
|
30220
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30221
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30222
|
+
segments: number().optional(),
|
|
30223
|
+
/**
|
|
30224
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30225
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30226
|
+
*
|
|
30227
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30228
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30229
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30230
|
+
* it, and so does a node whose ledger could not answer.
|
|
30231
|
+
*/
|
|
30232
|
+
residentBytes: number().optional(),
|
|
30233
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30234
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30235
|
+
* retention. `null` = nothing resident. */
|
|
30236
|
+
residentOldestMs: number().nullable().optional()
|
|
30064
30237
|
});
|
|
30065
30238
|
/** Recording storage usage + capacity for one storage location. */
|
|
30066
30239
|
var RecordingLocationUsageSchema = object({
|
|
@@ -30098,6 +30271,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
30098
30271
|
totalUsedBytes: number(),
|
|
30099
30272
|
devices: array(RecordingDeviceUsageSchema),
|
|
30100
30273
|
/**
|
|
30274
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30275
|
+
* disks (D418).
|
|
30276
|
+
*
|
|
30277
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30278
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30279
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30280
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30281
|
+
* and its rows are residency.
|
|
30282
|
+
*/
|
|
30283
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30284
|
+
/**
|
|
30101
30285
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
30102
30286
|
* of the payload without it: the hub serves this method through a BAKED
|
|
30103
30287
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30258,7 +30442,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30258
30442
|
method(object({
|
|
30259
30443
|
deviceId: number(),
|
|
30260
30444
|
fromMs: number(),
|
|
30261
|
-
toMs: number()
|
|
30445
|
+
toMs: number(),
|
|
30446
|
+
/**
|
|
30447
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30448
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30449
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30450
|
+
* for.
|
|
30451
|
+
*/
|
|
30452
|
+
profile: string().optional()
|
|
30262
30453
|
}), RecordingAvailabilitySchema, {
|
|
30263
30454
|
kind: "query",
|
|
30264
30455
|
auth: "protected"
|
|
@@ -38215,6 +38406,24 @@ Object.freeze({
|
|
|
38215
38406
|
addonId: null,
|
|
38216
38407
|
access: "view"
|
|
38217
38408
|
},
|
|
38409
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
38410
|
+
capName: "pipeline-runner",
|
|
38411
|
+
capScope: "system",
|
|
38412
|
+
addonId: null,
|
|
38413
|
+
access: "view"
|
|
38414
|
+
},
|
|
38415
|
+
"pipelineRunner.parkTrackFrame": {
|
|
38416
|
+
capName: "pipeline-runner",
|
|
38417
|
+
capScope: "system",
|
|
38418
|
+
addonId: null,
|
|
38419
|
+
access: "create"
|
|
38420
|
+
},
|
|
38421
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
38422
|
+
capName: "pipeline-runner",
|
|
38423
|
+
capScope: "system",
|
|
38424
|
+
addonId: null,
|
|
38425
|
+
access: "create"
|
|
38426
|
+
},
|
|
38218
38427
|
"pipelineRunner.reportMotion": {
|
|
38219
38428
|
capName: "pipeline-runner",
|
|
38220
38429
|
capScope: "system",
|
|
@@ -41492,6 +41701,21 @@ Object.freeze({
|
|
|
41492
41701
|
form: "single",
|
|
41493
41702
|
optional: false
|
|
41494
41703
|
}],
|
|
41704
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
41705
|
+
name: "deviceId",
|
|
41706
|
+
form: "single",
|
|
41707
|
+
optional: false
|
|
41708
|
+
}],
|
|
41709
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
41710
|
+
name: "deviceId",
|
|
41711
|
+
form: "single",
|
|
41712
|
+
optional: false
|
|
41713
|
+
}],
|
|
41714
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
41715
|
+
name: "deviceId",
|
|
41716
|
+
form: "single",
|
|
41717
|
+
optional: false
|
|
41718
|
+
}],
|
|
41495
41719
|
"pipelineRunner.reportMotion": [{
|
|
41496
41720
|
name: "deviceId",
|
|
41497
41721
|
form: "single",
|
|
@@ -42183,7 +42407,7 @@ var PreviewTextField = string().max(200);
|
|
|
42183
42407
|
* Whether the notification's preview is a STILL or a short animation.
|
|
42184
42408
|
*
|
|
42185
42409
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
42186
|
-
* rule)"* —
|
|
42410
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
42187
42411
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
42188
42412
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
42189
42413
|
* simply applies it to a dozen frames sampled across the render and assembles
|
package/dist/addon.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { createServer } from "node:http";
|
|
|
8
8
|
//#region \0rolldown/runtime.js
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
10
|
//#endregion
|
|
11
|
-
//#region ../types/dist/event-category-
|
|
11
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
12
12
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
13
13
|
EventCategory["SystemBoot"] = "system.boot";
|
|
14
14
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -600,7 +600,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
600
600
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
601
601
|
*/
|
|
602
602
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
603
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
604
603
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
605
604
|
/**
|
|
606
605
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12701,7 +12700,7 @@ DeviceType.Camera;
|
|
|
12701
12700
|
var SourceInfoSchema = object({
|
|
12702
12701
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12703
12702
|
id: string(),
|
|
12704
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12703
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12705
12704
|
system: string(),
|
|
12706
12705
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12707
12706
|
* Used to detect rename when `id` changes. */
|
|
@@ -12714,7 +12713,7 @@ var SourceInfoSchema = object({
|
|
|
12714
12713
|
/**
|
|
12715
12714
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
12716
12715
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
12717
|
-
* (Reolink / Hikvision / ONVIF /
|
|
12716
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
12718
12717
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
12719
12718
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
12720
12719
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -13295,7 +13294,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
13295
13294
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13296
13295
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13297
13296
|
*
|
|
13298
|
-
* All device provider addons (rtsp, onvif,
|
|
13297
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13299
13298
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13300
13299
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13301
13300
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17343,7 +17342,7 @@ var NcRuleInputSchema = object({
|
|
|
17343
17342
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17344
17343
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17345
17344
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17346
|
-
* 30 is
|
|
17345
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17347
17346
|
*
|
|
17348
17347
|
* ### What it replaces
|
|
17349
17348
|
*
|
|
@@ -19425,6 +19424,13 @@ var ZoneCrossingSchema = object({
|
|
|
19425
19424
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19426
19425
|
zoneName: string().optional()
|
|
19427
19426
|
});
|
|
19427
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19428
|
+
var ZoneOverlapSchema = object({
|
|
19429
|
+
zoneId: string(),
|
|
19430
|
+
zoneName: string().optional(),
|
|
19431
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19432
|
+
overlapPct: number()
|
|
19433
|
+
});
|
|
19428
19434
|
var ObjectEventSchema = object({
|
|
19429
19435
|
...BaseEventFields,
|
|
19430
19436
|
kind: literal("object"),
|
|
@@ -19449,6 +19455,35 @@ var ObjectEventSchema = object({
|
|
|
19449
19455
|
bbox: BoundingBoxSchema.optional(),
|
|
19450
19456
|
/** Heavy JSON — omitted in slim projection. */
|
|
19451
19457
|
zones: array(string()).readonly().optional(),
|
|
19458
|
+
/**
|
|
19459
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19460
|
+
* the BOX area.
|
|
19461
|
+
*
|
|
19462
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19463
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19464
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19465
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19466
|
+
* else to judge by.
|
|
19467
|
+
*/
|
|
19468
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19469
|
+
/**
|
|
19470
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19471
|
+
* has no track and never will.
|
|
19472
|
+
*
|
|
19473
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19474
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19475
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19476
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19477
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19478
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19479
|
+
* event at all.
|
|
19480
|
+
*
|
|
19481
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19482
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19483
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19484
|
+
* history is asking for something that never existed.
|
|
19485
|
+
*/
|
|
19486
|
+
spawnRefused: string().optional(),
|
|
19452
19487
|
/** Omitted in slim projection. */
|
|
19453
19488
|
state: TrackStateSchema.optional(),
|
|
19454
19489
|
/**
|
|
@@ -19875,7 +19910,17 @@ var EventDensityBucketSchema = object({
|
|
|
19875
19910
|
bucketStart: number(),
|
|
19876
19911
|
motion: number().int(),
|
|
19877
19912
|
object: number().int(),
|
|
19878
|
-
audio: number().int()
|
|
19913
|
+
audio: number().int(),
|
|
19914
|
+
/**
|
|
19915
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
19916
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
19917
|
+
*
|
|
19918
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
19919
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
19920
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
19921
|
+
* the count-on-a-level-meter did.
|
|
19922
|
+
*/
|
|
19923
|
+
audioDbfs: number().optional()
|
|
19879
19924
|
});
|
|
19880
19925
|
/**
|
|
19881
19926
|
* One camera's row in a `getEventDensityBatch` answer.
|
|
@@ -20522,6 +20567,60 @@ var NativeCropResultSchema = object({
|
|
|
20522
20567
|
*/
|
|
20523
20568
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20524
20569
|
});
|
|
20570
|
+
/**
|
|
20571
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20572
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20573
|
+
*
|
|
20574
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20575
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20576
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20577
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20578
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20579
|
+
*
|
|
20580
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20581
|
+
*/
|
|
20582
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20583
|
+
/**
|
|
20584
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20585
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20586
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20587
|
+
* never a reason to retry in a loop.
|
|
20588
|
+
*
|
|
20589
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20590
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20591
|
+
* carries the runner's own miss reason.
|
|
20592
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20593
|
+
*/
|
|
20594
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20595
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20596
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20597
|
+
parked: literal(true),
|
|
20598
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20599
|
+
nodeId: string(),
|
|
20600
|
+
width: number().int().positive(),
|
|
20601
|
+
height: number().int().positive(),
|
|
20602
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20603
|
+
bytes: number().int().nonnegative(),
|
|
20604
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20605
|
+
replaced: boolean()
|
|
20606
|
+
}), object({
|
|
20607
|
+
parked: literal(false),
|
|
20608
|
+
nodeId: string(),
|
|
20609
|
+
reason: ParkRefusalSchema,
|
|
20610
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20611
|
+
handleAgeMs: number().nullable(),
|
|
20612
|
+
detail: string().optional()
|
|
20613
|
+
})]);
|
|
20614
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20615
|
+
var ParkedTrackFrameSchema = object({
|
|
20616
|
+
jpeg: string(),
|
|
20617
|
+
width: number().int().positive(),
|
|
20618
|
+
height: number().int().positive(),
|
|
20619
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20620
|
+
timestamp: number(),
|
|
20621
|
+
/** When the node stored it (the node's clock). */
|
|
20622
|
+
parkedAt: number()
|
|
20623
|
+
});
|
|
20525
20624
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20526
20625
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20527
20626
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20911,7 +21010,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20911
21010
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20912
21011
|
* analyzer providers) running on decoded frames in this runner.
|
|
20913
21012
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20914
|
-
* analytics
|
|
21013
|
+
* analytics). The provider emits ProviderMotion
|
|
20915
21014
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20916
21015
|
*/
|
|
20917
21016
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21153,7 +21252,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21153
21252
|
className: string(),
|
|
21154
21253
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21155
21254
|
sourceDeviceId: number()
|
|
21156
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21255
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21256
|
+
deviceId: number(),
|
|
21257
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21258
|
+
trackId: string(),
|
|
21259
|
+
kind: ParkedFrameKindSchema,
|
|
21260
|
+
handle: FrameHandleSchema,
|
|
21261
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21262
|
+
bbox: NativeCropBboxSchema,
|
|
21263
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21264
|
+
maxWidth: number().int().positive().optional(),
|
|
21265
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21266
|
+
timestamp: number()
|
|
21267
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21268
|
+
deviceId: number(),
|
|
21269
|
+
trackId: string(),
|
|
21270
|
+
kind: ParkedFrameKindSchema
|
|
21271
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21272
|
+
deviceId: number(),
|
|
21273
|
+
trackId: string()
|
|
21274
|
+
}), object({ released: number().int().nonnegative() }), { kind: "mutation" });
|
|
21157
21275
|
var CameraPipelineConfigSchema = object({
|
|
21158
21276
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21159
21277
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24371,8 +24489,8 @@ onStatusChanged: { data: object({
|
|
|
24371
24489
|
/**
|
|
24372
24490
|
* Runtime-state slice — every provider that registers this cap
|
|
24373
24491
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
24374
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
24375
|
-
*
|
|
24492
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
24493
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
24376
24494
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
24377
24495
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
24378
24496
|
* the underlying driver.
|
|
@@ -24505,7 +24623,7 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
24505
24623
|
*
|
|
24506
24624
|
* Implementations:
|
|
24507
24625
|
* - Each camera-providing addon registers this cap natively per
|
|
24508
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24626
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24509
24627
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24510
24628
|
* extra round-trip to the camera, no probing.
|
|
24511
24629
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -26597,7 +26715,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
26597
26715
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
26598
26716
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
26599
26717
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
26600
|
-
* `device-provider` integrations (Reolink/
|
|
26718
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
26601
26719
|
* legacy config → discovery flow.
|
|
26602
26720
|
*/
|
|
26603
26721
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -29965,7 +30083,23 @@ var RecordingRangeSchema = object({
|
|
|
29965
30083
|
});
|
|
29966
30084
|
var RecordingAvailabilitySchema = object({
|
|
29967
30085
|
deviceId: number(),
|
|
29968
|
-
ranges: array(RecordingRangeSchema)
|
|
30086
|
+
ranges: array(RecordingRangeSchema),
|
|
30087
|
+
/**
|
|
30088
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
30089
|
+
* describes (D433).
|
|
30090
|
+
*
|
|
30091
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30092
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
30093
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
30094
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
30095
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
30096
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
30097
|
+
* UI could not see it.
|
|
30098
|
+
*
|
|
30099
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
30100
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
30101
|
+
*/
|
|
30102
|
+
profilesWithFootage: array(string())
|
|
29969
30103
|
});
|
|
29970
30104
|
var RecordingDaysSchema = object({
|
|
29971
30105
|
deviceId: number(),
|
|
@@ -29991,7 +30125,11 @@ var RecordingDaysSchema = object({
|
|
|
29991
30125
|
var RecordingAvailabilityForDeviceSchema = object({
|
|
29992
30126
|
deviceId: number(),
|
|
29993
30127
|
read: _enum(["read", "unreadable"]),
|
|
29994
|
-
ranges: array(RecordingRangeSchema).readonly()
|
|
30128
|
+
ranges: array(RecordingRangeSchema).readonly(),
|
|
30129
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
30130
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
30131
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
30132
|
+
profilesWithFootage: array(string()).readonly()
|
|
29995
30133
|
});
|
|
29996
30134
|
/**
|
|
29997
30135
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -30021,13 +30159,31 @@ var RecordingManifestSchema = object({
|
|
|
30021
30159
|
*/
|
|
30022
30160
|
playbackEndpoints: array(string())
|
|
30023
30161
|
});
|
|
30024
|
-
/**
|
|
30025
|
-
*
|
|
30162
|
+
/**
|
|
30163
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30164
|
+
* across every profile and every resolvable location on this node.
|
|
30165
|
+
*
|
|
30166
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
30167
|
+
*
|
|
30168
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
30169
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
30170
|
+
* this camera writes to, so the two can be added up and compared.
|
|
30171
|
+
*
|
|
30172
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
30173
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
30174
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
30175
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
30176
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
30177
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
30178
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
30179
|
+
*/
|
|
30026
30180
|
var RecordingDeviceUsageSchema = object({
|
|
30027
30181
|
deviceId: number(),
|
|
30182
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
30183
|
+
* recordings locations. */
|
|
30028
30184
|
usedBytes: number(),
|
|
30029
30185
|
/**
|
|
30030
|
-
* Start of this camera's OLDEST
|
|
30186
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
30031
30187
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
30032
30188
|
* only honest answer to "is retention actually holding?" per camera.
|
|
30033
30189
|
*
|
|
@@ -30037,7 +30193,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
30037
30193
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
30038
30194
|
* the later of the two.
|
|
30039
30195
|
*/
|
|
30040
|
-
oldestMs: number().nullable().optional()
|
|
30196
|
+
oldestMs: number().nullable().optional(),
|
|
30197
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
30198
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
30199
|
+
segments: number().optional(),
|
|
30200
|
+
/**
|
|
30201
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
30202
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
30203
|
+
*
|
|
30204
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
30205
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
30206
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
30207
|
+
* it, and so does a node whose ledger could not answer.
|
|
30208
|
+
*/
|
|
30209
|
+
residentBytes: number().optional(),
|
|
30210
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
30211
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
30212
|
+
* retention. `null` = nothing resident. */
|
|
30213
|
+
residentOldestMs: number().nullable().optional()
|
|
30041
30214
|
});
|
|
30042
30215
|
/** Recording storage usage + capacity for one storage location. */
|
|
30043
30216
|
var RecordingLocationUsageSchema = object({
|
|
@@ -30075,6 +30248,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
30075
30248
|
totalUsedBytes: number(),
|
|
30076
30249
|
devices: array(RecordingDeviceUsageSchema),
|
|
30077
30250
|
/**
|
|
30251
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
30252
|
+
* disks (D418).
|
|
30253
|
+
*
|
|
30254
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
30255
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
30256
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
30257
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
30258
|
+
* and its rows are residency.
|
|
30259
|
+
*/
|
|
30260
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
30261
|
+
/**
|
|
30078
30262
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
30079
30263
|
* of the payload without it: the hub serves this method through a BAKED
|
|
30080
30264
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -30235,7 +30419,14 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30235
30419
|
method(object({
|
|
30236
30420
|
deviceId: number(),
|
|
30237
30421
|
fromMs: number(),
|
|
30238
|
-
toMs: number()
|
|
30422
|
+
toMs: number(),
|
|
30423
|
+
/**
|
|
30424
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30425
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30426
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30427
|
+
* for.
|
|
30428
|
+
*/
|
|
30429
|
+
profile: string().optional()
|
|
30239
30430
|
}), RecordingAvailabilitySchema, {
|
|
30240
30431
|
kind: "query",
|
|
30241
30432
|
auth: "protected"
|
|
@@ -38192,6 +38383,24 @@ Object.freeze({
|
|
|
38192
38383
|
addonId: null,
|
|
38193
38384
|
access: "view"
|
|
38194
38385
|
},
|
|
38386
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
38387
|
+
capName: "pipeline-runner",
|
|
38388
|
+
capScope: "system",
|
|
38389
|
+
addonId: null,
|
|
38390
|
+
access: "view"
|
|
38391
|
+
},
|
|
38392
|
+
"pipelineRunner.parkTrackFrame": {
|
|
38393
|
+
capName: "pipeline-runner",
|
|
38394
|
+
capScope: "system",
|
|
38395
|
+
addonId: null,
|
|
38396
|
+
access: "create"
|
|
38397
|
+
},
|
|
38398
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
38399
|
+
capName: "pipeline-runner",
|
|
38400
|
+
capScope: "system",
|
|
38401
|
+
addonId: null,
|
|
38402
|
+
access: "create"
|
|
38403
|
+
},
|
|
38195
38404
|
"pipelineRunner.reportMotion": {
|
|
38196
38405
|
capName: "pipeline-runner",
|
|
38197
38406
|
capScope: "system",
|
|
@@ -41469,6 +41678,21 @@ Object.freeze({
|
|
|
41469
41678
|
form: "single",
|
|
41470
41679
|
optional: false
|
|
41471
41680
|
}],
|
|
41681
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
41682
|
+
name: "deviceId",
|
|
41683
|
+
form: "single",
|
|
41684
|
+
optional: false
|
|
41685
|
+
}],
|
|
41686
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
41687
|
+
name: "deviceId",
|
|
41688
|
+
form: "single",
|
|
41689
|
+
optional: false
|
|
41690
|
+
}],
|
|
41691
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
41692
|
+
name: "deviceId",
|
|
41693
|
+
form: "single",
|
|
41694
|
+
optional: false
|
|
41695
|
+
}],
|
|
41472
41696
|
"pipelineRunner.reportMotion": [{
|
|
41473
41697
|
name: "deviceId",
|
|
41474
41698
|
form: "single",
|
|
@@ -42160,7 +42384,7 @@ var PreviewTextField = string().max(200);
|
|
|
42160
42384
|
* Whether the notification's preview is a STILL or a short animation.
|
|
42161
42385
|
*
|
|
42162
42386
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
42163
|
-
* rule)"* —
|
|
42387
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
42164
42388
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
42165
42389
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
42166
42390
|
* simply applies it to a dozen frames sampled across the render and assembles
|