@camstack/addon-ai 0.4.93 → 0.4.95
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 +201 -14
- package/dist/addon.mjs +201 -14
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -12,7 +12,7 @@ let _camstack_system_addon_utils = require("@camstack/system/addon-utils");
|
|
|
12
12
|
let node_fs_promises = require("node:fs/promises");
|
|
13
13
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
14
14
|
let node_child_process = require("node:child_process");
|
|
15
|
-
//#region ../types/dist/event-category-
|
|
15
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
16
16
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
17
17
|
EventCategory["SystemBoot"] = "system.boot";
|
|
18
18
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -604,7 +604,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
604
604
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
605
605
|
*/
|
|
606
606
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
607
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
608
607
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
609
608
|
/**
|
|
610
609
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12726,7 +12725,7 @@ DeviceType.Camera;
|
|
|
12726
12725
|
var SourceInfoSchema = object({
|
|
12727
12726
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12728
12727
|
id: string(),
|
|
12729
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12728
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12730
12729
|
system: string(),
|
|
12731
12730
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12732
12731
|
* Used to detect rename when `id` changes. */
|
|
@@ -13213,7 +13212,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
13213
13212
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13214
13213
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13215
13214
|
*
|
|
13216
|
-
* All device provider addons (rtsp, onvif,
|
|
13215
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13217
13216
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13218
13217
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13219
13218
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17317,7 +17316,7 @@ var NcRuleInputSchema = object({
|
|
|
17317
17316
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17318
17317
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17319
17318
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17320
|
-
* 30 is
|
|
17319
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17321
17320
|
*
|
|
17322
17321
|
* ### What it replaces
|
|
17323
17322
|
*
|
|
@@ -19359,6 +19358,13 @@ var ZoneCrossingSchema = object({
|
|
|
19359
19358
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19360
19359
|
zoneName: string().optional()
|
|
19361
19360
|
});
|
|
19361
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19362
|
+
var ZoneOverlapSchema = object({
|
|
19363
|
+
zoneId: string(),
|
|
19364
|
+
zoneName: string().optional(),
|
|
19365
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19366
|
+
overlapPct: number$1()
|
|
19367
|
+
});
|
|
19362
19368
|
var ObjectEventSchema = object({
|
|
19363
19369
|
...BaseEventFields,
|
|
19364
19370
|
kind: literal("object"),
|
|
@@ -19383,6 +19389,35 @@ var ObjectEventSchema = object({
|
|
|
19383
19389
|
bbox: BoundingBoxSchema.optional(),
|
|
19384
19390
|
/** Heavy JSON — omitted in slim projection. */
|
|
19385
19391
|
zones: array(string()).readonly().optional(),
|
|
19392
|
+
/**
|
|
19393
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19394
|
+
* the BOX area.
|
|
19395
|
+
*
|
|
19396
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19397
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19398
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19399
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19400
|
+
* else to judge by.
|
|
19401
|
+
*/
|
|
19402
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19403
|
+
/**
|
|
19404
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19405
|
+
* has no track and never will.
|
|
19406
|
+
*
|
|
19407
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19408
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19409
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19410
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19411
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19412
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19413
|
+
* event at all.
|
|
19414
|
+
*
|
|
19415
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19416
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19417
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19418
|
+
* history is asking for something that never existed.
|
|
19419
|
+
*/
|
|
19420
|
+
spawnRefused: string().optional(),
|
|
19386
19421
|
/** Omitted in slim projection. */
|
|
19387
19422
|
state: TrackStateSchema.optional(),
|
|
19388
19423
|
/**
|
|
@@ -20456,6 +20491,60 @@ var NativeCropResultSchema = object({
|
|
|
20456
20491
|
*/
|
|
20457
20492
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20458
20493
|
});
|
|
20494
|
+
/**
|
|
20495
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20496
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20497
|
+
*
|
|
20498
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20499
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20500
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20501
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20502
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20503
|
+
*
|
|
20504
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20505
|
+
*/
|
|
20506
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20507
|
+
/**
|
|
20508
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20509
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20510
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20511
|
+
* never a reason to retry in a loop.
|
|
20512
|
+
*
|
|
20513
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20514
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20515
|
+
* carries the runner's own miss reason.
|
|
20516
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20517
|
+
*/
|
|
20518
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20519
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20520
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20521
|
+
parked: literal(true),
|
|
20522
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20523
|
+
nodeId: string(),
|
|
20524
|
+
width: number$1().int().positive(),
|
|
20525
|
+
height: number$1().int().positive(),
|
|
20526
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20527
|
+
bytes: number$1().int().nonnegative(),
|
|
20528
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20529
|
+
replaced: boolean()
|
|
20530
|
+
}), object({
|
|
20531
|
+
parked: literal(false),
|
|
20532
|
+
nodeId: string(),
|
|
20533
|
+
reason: ParkRefusalSchema,
|
|
20534
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20535
|
+
handleAgeMs: number$1().nullable(),
|
|
20536
|
+
detail: string().optional()
|
|
20537
|
+
})]);
|
|
20538
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20539
|
+
var ParkedTrackFrameSchema = object({
|
|
20540
|
+
jpeg: string(),
|
|
20541
|
+
width: number$1().int().positive(),
|
|
20542
|
+
height: number$1().int().positive(),
|
|
20543
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20544
|
+
timestamp: number$1(),
|
|
20545
|
+
/** When the node stored it (the node's clock). */
|
|
20546
|
+
parkedAt: number$1()
|
|
20547
|
+
});
|
|
20459
20548
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20460
20549
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20461
20550
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20845,7 +20934,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20845
20934
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20846
20935
|
* analyzer providers) running on decoded frames in this runner.
|
|
20847
20936
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20848
|
-
* analytics
|
|
20937
|
+
* analytics). The provider emits ProviderMotion
|
|
20849
20938
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20850
20939
|
*/
|
|
20851
20940
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21087,7 +21176,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21087
21176
|
className: string(),
|
|
21088
21177
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21089
21178
|
sourceDeviceId: number$1()
|
|
21090
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21179
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21180
|
+
deviceId: number$1(),
|
|
21181
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21182
|
+
trackId: string(),
|
|
21183
|
+
kind: ParkedFrameKindSchema,
|
|
21184
|
+
handle: FrameHandleSchema,
|
|
21185
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21186
|
+
bbox: NativeCropBboxSchema,
|
|
21187
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21188
|
+
maxWidth: number$1().int().positive().optional(),
|
|
21189
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21190
|
+
timestamp: number$1()
|
|
21191
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21192
|
+
deviceId: number$1(),
|
|
21193
|
+
trackId: string(),
|
|
21194
|
+
kind: ParkedFrameKindSchema
|
|
21195
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21196
|
+
deviceId: number$1(),
|
|
21197
|
+
trackId: string()
|
|
21198
|
+
}), object({ released: number$1().int().nonnegative() }), { kind: "mutation" });
|
|
21091
21199
|
var CameraPipelineConfigSchema = object({
|
|
21092
21200
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21093
21201
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24016,7 +24124,7 @@ DeviceType.Button, method(object({ deviceId: number$1().int().nonnegative() }),
|
|
|
24016
24124
|
*
|
|
24017
24125
|
* Implementations:
|
|
24018
24126
|
* - Each camera-providing addon registers this cap natively per
|
|
24019
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24127
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24020
24128
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24021
24129
|
* extra round-trip to the camera, no probing.
|
|
24022
24130
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -25402,7 +25510,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
25402
25510
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
25403
25511
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
25404
25512
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
25405
|
-
* `device-provider` integrations (Reolink/
|
|
25513
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
25406
25514
|
* legacy config → discovery flow.
|
|
25407
25515
|
*/
|
|
25408
25516
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -27959,13 +28067,31 @@ var RecordingManifestSchema = object({
|
|
|
27959
28067
|
*/
|
|
27960
28068
|
playbackEndpoints: array(string())
|
|
27961
28069
|
});
|
|
27962
|
-
/**
|
|
27963
|
-
*
|
|
28070
|
+
/**
|
|
28071
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
28072
|
+
* across every profile and every resolvable location on this node.
|
|
28073
|
+
*
|
|
28074
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
28075
|
+
*
|
|
28076
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
28077
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
28078
|
+
* this camera writes to, so the two can be added up and compared.
|
|
28079
|
+
*
|
|
28080
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
28081
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
28082
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
28083
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
28084
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
28085
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
28086
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
28087
|
+
*/
|
|
27964
28088
|
var RecordingDeviceUsageSchema = object({
|
|
27965
28089
|
deviceId: number$1(),
|
|
28090
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
28091
|
+
* recordings locations. */
|
|
27966
28092
|
usedBytes: number$1(),
|
|
27967
28093
|
/**
|
|
27968
|
-
* Start of this camera's OLDEST
|
|
28094
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
27969
28095
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
27970
28096
|
* only honest answer to "is retention actually holding?" per camera.
|
|
27971
28097
|
*
|
|
@@ -27975,7 +28101,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
27975
28101
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
27976
28102
|
* the later of the two.
|
|
27977
28103
|
*/
|
|
27978
|
-
oldestMs: number$1().nullable().optional()
|
|
28104
|
+
oldestMs: number$1().nullable().optional(),
|
|
28105
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
28106
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
28107
|
+
segments: number$1().optional(),
|
|
28108
|
+
/**
|
|
28109
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
28110
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
28111
|
+
*
|
|
28112
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
28113
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
28114
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
28115
|
+
* it, and so does a node whose ledger could not answer.
|
|
28116
|
+
*/
|
|
28117
|
+
residentBytes: number$1().optional(),
|
|
28118
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
28119
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
28120
|
+
* retention. `null` = nothing resident. */
|
|
28121
|
+
residentOldestMs: number$1().nullable().optional()
|
|
27979
28122
|
});
|
|
27980
28123
|
/** Recording storage usage + capacity for one storage location. */
|
|
27981
28124
|
var RecordingLocationUsageSchema = object({
|
|
@@ -28013,6 +28156,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
28013
28156
|
totalUsedBytes: number$1(),
|
|
28014
28157
|
devices: array(RecordingDeviceUsageSchema),
|
|
28015
28158
|
/**
|
|
28159
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
28160
|
+
* disks (D418).
|
|
28161
|
+
*
|
|
28162
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
28163
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
28164
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
28165
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
28166
|
+
* and its rows are residency.
|
|
28167
|
+
*/
|
|
28168
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
28169
|
+
/**
|
|
28016
28170
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
28017
28171
|
* of the payload without it: the hub serves this method through a BAKED
|
|
28018
28172
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -34400,6 +34554,24 @@ Object.freeze({
|
|
|
34400
34554
|
addonId: null,
|
|
34401
34555
|
access: "view"
|
|
34402
34556
|
},
|
|
34557
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
34558
|
+
capName: "pipeline-runner",
|
|
34559
|
+
capScope: "system",
|
|
34560
|
+
addonId: null,
|
|
34561
|
+
access: "view"
|
|
34562
|
+
},
|
|
34563
|
+
"pipelineRunner.parkTrackFrame": {
|
|
34564
|
+
capName: "pipeline-runner",
|
|
34565
|
+
capScope: "system",
|
|
34566
|
+
addonId: null,
|
|
34567
|
+
access: "create"
|
|
34568
|
+
},
|
|
34569
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
34570
|
+
capName: "pipeline-runner",
|
|
34571
|
+
capScope: "system",
|
|
34572
|
+
addonId: null,
|
|
34573
|
+
access: "create"
|
|
34574
|
+
},
|
|
34403
34575
|
"pipelineRunner.reportMotion": {
|
|
34404
34576
|
capName: "pipeline-runner",
|
|
34405
34577
|
capScope: "system",
|
|
@@ -37677,6 +37849,21 @@ Object.freeze({
|
|
|
37677
37849
|
form: "single",
|
|
37678
37850
|
optional: false
|
|
37679
37851
|
}],
|
|
37852
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
37853
|
+
name: "deviceId",
|
|
37854
|
+
form: "single",
|
|
37855
|
+
optional: false
|
|
37856
|
+
}],
|
|
37857
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
37858
|
+
name: "deviceId",
|
|
37859
|
+
form: "single",
|
|
37860
|
+
optional: false
|
|
37861
|
+
}],
|
|
37862
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
37863
|
+
name: "deviceId",
|
|
37864
|
+
form: "single",
|
|
37865
|
+
optional: false
|
|
37866
|
+
}],
|
|
37680
37867
|
"pipelineRunner.reportMotion": [{
|
|
37681
37868
|
name: "deviceId",
|
|
37682
37869
|
form: "single",
|
|
@@ -38368,7 +38555,7 @@ var PreviewTextField = string().max(200);
|
|
|
38368
38555
|
* Whether the notification's preview is a STILL or a short animation.
|
|
38369
38556
|
*
|
|
38370
38557
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
38371
|
-
* rule)"* —
|
|
38558
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
38372
38559
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
38373
38560
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
38374
38561
|
* simply applies it to a dozen frames sampled across the render and assembles
|
package/dist/addon.mjs
CHANGED
|
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
39
39
|
}) : target, mod));
|
|
40
40
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
41
41
|
//#endregion
|
|
42
|
-
//#region ../types/dist/event-category-
|
|
42
|
+
//#region ../types/dist/event-category-DAXzJeTX.mjs
|
|
43
43
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
44
44
|
EventCategory["SystemBoot"] = "system.boot";
|
|
45
45
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -631,7 +631,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
631
631
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
632
632
|
*/
|
|
633
633
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
634
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
635
634
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
636
635
|
/**
|
|
637
636
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -12753,7 +12752,7 @@ DeviceType.Camera;
|
|
|
12753
12752
|
var SourceInfoSchema = object({
|
|
12754
12753
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
12755
12754
|
id: string(),
|
|
12756
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
12755
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
12757
12756
|
system: string(),
|
|
12758
12757
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
12759
12758
|
* Used to detect rename when `id` changes. */
|
|
@@ -13240,7 +13239,7 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
13240
13239
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13241
13240
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13242
13241
|
*
|
|
13243
|
-
* All device provider addons (rtsp, onvif,
|
|
13242
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
13244
13243
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13245
13244
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13246
13245
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -17344,7 +17343,7 @@ var NcRuleInputSchema = object({
|
|
|
17344
17343
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
17345
17344
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
17346
17345
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
17347
|
-
* 30 is
|
|
17346
|
+
* 30 s is a widely shipped value for the same decision.
|
|
17348
17347
|
*
|
|
17349
17348
|
* ### What it replaces
|
|
17350
17349
|
*
|
|
@@ -19386,6 +19385,13 @@ var ZoneCrossingSchema = object({
|
|
|
19386
19385
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19387
19386
|
zoneName: string().optional()
|
|
19388
19387
|
});
|
|
19388
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19389
|
+
var ZoneOverlapSchema = object({
|
|
19390
|
+
zoneId: string(),
|
|
19391
|
+
zoneName: string().optional(),
|
|
19392
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19393
|
+
overlapPct: number$1()
|
|
19394
|
+
});
|
|
19389
19395
|
var ObjectEventSchema = object({
|
|
19390
19396
|
...BaseEventFields,
|
|
19391
19397
|
kind: literal("object"),
|
|
@@ -19410,6 +19416,35 @@ var ObjectEventSchema = object({
|
|
|
19410
19416
|
bbox: BoundingBoxSchema.optional(),
|
|
19411
19417
|
/** Heavy JSON — omitted in slim projection. */
|
|
19412
19418
|
zones: array(string()).readonly().optional(),
|
|
19419
|
+
/**
|
|
19420
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19421
|
+
* the BOX area.
|
|
19422
|
+
*
|
|
19423
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19424
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19425
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19426
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19427
|
+
* else to judge by.
|
|
19428
|
+
*/
|
|
19429
|
+
zoneOverlaps: array(ZoneOverlapSchema).readonly().optional(),
|
|
19430
|
+
/**
|
|
19431
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19432
|
+
* has no track and never will.
|
|
19433
|
+
*
|
|
19434
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19435
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19436
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19437
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19438
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19439
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19440
|
+
* event at all.
|
|
19441
|
+
*
|
|
19442
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19443
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19444
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19445
|
+
* history is asking for something that never existed.
|
|
19446
|
+
*/
|
|
19447
|
+
spawnRefused: string().optional(),
|
|
19413
19448
|
/** Omitted in slim projection. */
|
|
19414
19449
|
state: TrackStateSchema.optional(),
|
|
19415
19450
|
/**
|
|
@@ -20483,6 +20518,60 @@ var NativeCropResultSchema = object({
|
|
|
20483
20518
|
*/
|
|
20484
20519
|
tier: _enum(["native", "ram-fullframe"]).optional()
|
|
20485
20520
|
});
|
|
20521
|
+
/**
|
|
20522
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
20523
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
20524
|
+
*
|
|
20525
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
20526
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
20527
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
20528
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
20529
|
+
* window, cut by the runner at uncapped native resolution.
|
|
20530
|
+
*
|
|
20531
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
20532
|
+
*/
|
|
20533
|
+
var ParkedFrameKindSchema = _enum(["keyFrame", "thumbnail"]);
|
|
20534
|
+
/**
|
|
20535
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
20536
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
20537
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
20538
|
+
* never a reason to retry in a loop.
|
|
20539
|
+
*
|
|
20540
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
20541
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
20542
|
+
* carries the runner's own miss reason.
|
|
20543
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
20544
|
+
*/
|
|
20545
|
+
var ParkRefusalSchema = _enum(["handle-gone", "encode-failed"]);
|
|
20546
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
20547
|
+
var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
20548
|
+
parked: literal(true),
|
|
20549
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
20550
|
+
nodeId: string(),
|
|
20551
|
+
width: number$1().int().positive(),
|
|
20552
|
+
height: number$1().int().positive(),
|
|
20553
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
20554
|
+
bytes: number$1().int().nonnegative(),
|
|
20555
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
20556
|
+
replaced: boolean()
|
|
20557
|
+
}), object({
|
|
20558
|
+
parked: literal(false),
|
|
20559
|
+
nodeId: string(),
|
|
20560
|
+
reason: ParkRefusalSchema,
|
|
20561
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
20562
|
+
handleAgeMs: number$1().nullable(),
|
|
20563
|
+
detail: string().optional()
|
|
20564
|
+
})]);
|
|
20565
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
20566
|
+
var ParkedTrackFrameSchema = object({
|
|
20567
|
+
jpeg: string(),
|
|
20568
|
+
width: number$1().int().positive(),
|
|
20569
|
+
height: number$1().int().positive(),
|
|
20570
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
20571
|
+
timestamp: number$1(),
|
|
20572
|
+
/** When the node stored it (the node's clock). */
|
|
20573
|
+
parkedAt: number$1()
|
|
20574
|
+
});
|
|
20486
20575
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
20487
20576
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
20488
20577
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -20872,7 +20961,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20872
20961
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
20873
20962
|
* analyzer providers) running on decoded frames in this runner.
|
|
20874
20963
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
20875
|
-
* analytics
|
|
20964
|
+
* analytics). The provider emits ProviderMotion
|
|
20876
20965
|
* events; the orchestrator forwards to `reportMotion`.
|
|
20877
20966
|
*/
|
|
20878
20967
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -21114,7 +21203,26 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
|
|
|
21114
21203
|
className: string(),
|
|
21115
21204
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
21116
21205
|
sourceDeviceId: number$1()
|
|
21117
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
21206
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }), method(object({
|
|
21207
|
+
deviceId: number$1(),
|
|
21208
|
+
/** Opaque to the runner — the hub's track id. */
|
|
21209
|
+
trackId: string(),
|
|
21210
|
+
kind: ParkedFrameKindSchema,
|
|
21211
|
+
handle: FrameHandleSchema,
|
|
21212
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
21213
|
+
bbox: NativeCropBboxSchema,
|
|
21214
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
21215
|
+
maxWidth: number$1().int().positive().optional(),
|
|
21216
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
21217
|
+
timestamp: number$1()
|
|
21218
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
|
|
21219
|
+
deviceId: number$1(),
|
|
21220
|
+
trackId: string(),
|
|
21221
|
+
kind: ParkedFrameKindSchema
|
|
21222
|
+
}), ParkedTrackFrameSchema.nullable()), method(object({
|
|
21223
|
+
deviceId: number$1(),
|
|
21224
|
+
trackId: string()
|
|
21225
|
+
}), object({ released: number$1().int().nonnegative() }), { kind: "mutation" });
|
|
21118
21226
|
var CameraPipelineConfigSchema = object({
|
|
21119
21227
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
21120
21228
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -24043,7 +24151,7 @@ DeviceType.Button, method(object({ deviceId: number$1().int().nonnegative() }),
|
|
|
24043
24151
|
*
|
|
24044
24152
|
* Implementations:
|
|
24045
24153
|
* - Each camera-providing addon registers this cap natively per
|
|
24046
|
-
* device (Reolink, Hikvision, RTSP,
|
|
24154
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
24047
24155
|
* - Returns a snapshot from the persisted device config blob — no
|
|
24048
24156
|
* extra round-trip to the camera, no probing.
|
|
24049
24157
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -25429,7 +25537,7 @@ var AvailableIntegrationTypeSchema = object({
|
|
|
25429
25537
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
25430
25538
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
25431
25539
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
25432
|
-
* `device-provider` integrations (Reolink/
|
|
25540
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
25433
25541
|
* legacy config → discovery flow.
|
|
25434
25542
|
*/
|
|
25435
25543
|
kind: _enum(["device-adoption", "device-provider"]),
|
|
@@ -27986,13 +28094,31 @@ var RecordingManifestSchema = object({
|
|
|
27986
28094
|
*/
|
|
27987
28095
|
playbackEndpoints: array(string())
|
|
27988
28096
|
});
|
|
27989
|
-
/**
|
|
27990
|
-
*
|
|
28097
|
+
/**
|
|
28098
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
28099
|
+
* across every profile and every resolvable location on this node.
|
|
28100
|
+
*
|
|
28101
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
28102
|
+
*
|
|
28103
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
28104
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
28105
|
+
* this camera writes to, so the two can be added up and compared.
|
|
28106
|
+
*
|
|
28107
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
28108
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
28109
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
28110
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
28111
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
28112
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
28113
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
28114
|
+
*/
|
|
27991
28115
|
var RecordingDeviceUsageSchema = object({
|
|
27992
28116
|
deviceId: number$1(),
|
|
28117
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
28118
|
+
* recordings locations. */
|
|
27993
28119
|
usedBytes: number$1(),
|
|
27994
28120
|
/**
|
|
27995
|
-
* Start of this camera's OLDEST
|
|
28121
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
27996
28122
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
27997
28123
|
* only honest answer to "is retention actually holding?" per camera.
|
|
27998
28124
|
*
|
|
@@ -28002,7 +28128,24 @@ var RecordingDeviceUsageSchema = object({
|
|
|
28002
28128
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
28003
28129
|
* the later of the two.
|
|
28004
28130
|
*/
|
|
28005
|
-
oldestMs: number$1().nullable().optional()
|
|
28131
|
+
oldestMs: number$1().nullable().optional(),
|
|
28132
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
28133
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
28134
|
+
segments: number$1().optional(),
|
|
28135
|
+
/**
|
|
28136
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
28137
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
28138
|
+
*
|
|
28139
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
28140
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
28141
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
28142
|
+
* it, and so does a node whose ledger could not answer.
|
|
28143
|
+
*/
|
|
28144
|
+
residentBytes: number$1().optional(),
|
|
28145
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
28146
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
28147
|
+
* retention. `null` = nothing resident. */
|
|
28148
|
+
residentOldestMs: number$1().nullable().optional()
|
|
28006
28149
|
});
|
|
28007
28150
|
/** Recording storage usage + capacity for one storage location. */
|
|
28008
28151
|
var RecordingLocationUsageSchema = object({
|
|
@@ -28040,6 +28183,17 @@ var RecordingStorageUsageSchema = object({
|
|
|
28040
28183
|
totalUsedBytes: number$1(),
|
|
28041
28184
|
devices: array(RecordingDeviceUsageSchema),
|
|
28042
28185
|
/**
|
|
28186
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
28187
|
+
* disks (D418).
|
|
28188
|
+
*
|
|
28189
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
28190
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
28191
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
28192
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
28193
|
+
* and its rows are residency.
|
|
28194
|
+
*/
|
|
28195
|
+
devicesRead: _enum(["archive", "unavailable"]).optional(),
|
|
28196
|
+
/**
|
|
28043
28197
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
28044
28198
|
* of the payload without it: the hub serves this method through a BAKED
|
|
28045
28199
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -34427,6 +34581,24 @@ Object.freeze({
|
|
|
34427
34581
|
addonId: null,
|
|
34428
34582
|
access: "view"
|
|
34429
34583
|
},
|
|
34584
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
34585
|
+
capName: "pipeline-runner",
|
|
34586
|
+
capScope: "system",
|
|
34587
|
+
addonId: null,
|
|
34588
|
+
access: "view"
|
|
34589
|
+
},
|
|
34590
|
+
"pipelineRunner.parkTrackFrame": {
|
|
34591
|
+
capName: "pipeline-runner",
|
|
34592
|
+
capScope: "system",
|
|
34593
|
+
addonId: null,
|
|
34594
|
+
access: "create"
|
|
34595
|
+
},
|
|
34596
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
34597
|
+
capName: "pipeline-runner",
|
|
34598
|
+
capScope: "system",
|
|
34599
|
+
addonId: null,
|
|
34600
|
+
access: "create"
|
|
34601
|
+
},
|
|
34430
34602
|
"pipelineRunner.reportMotion": {
|
|
34431
34603
|
capName: "pipeline-runner",
|
|
34432
34604
|
capScope: "system",
|
|
@@ -37704,6 +37876,21 @@ Object.freeze({
|
|
|
37704
37876
|
form: "single",
|
|
37705
37877
|
optional: false
|
|
37706
37878
|
}],
|
|
37879
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
37880
|
+
name: "deviceId",
|
|
37881
|
+
form: "single",
|
|
37882
|
+
optional: false
|
|
37883
|
+
}],
|
|
37884
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
37885
|
+
name: "deviceId",
|
|
37886
|
+
form: "single",
|
|
37887
|
+
optional: false
|
|
37888
|
+
}],
|
|
37889
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
37890
|
+
name: "deviceId",
|
|
37891
|
+
form: "single",
|
|
37892
|
+
optional: false
|
|
37893
|
+
}],
|
|
37707
37894
|
"pipelineRunner.reportMotion": [{
|
|
37708
37895
|
name: "deviceId",
|
|
37709
37896
|
form: "single",
|
|
@@ -38395,7 +38582,7 @@ var PreviewTextField = string().max(200);
|
|
|
38395
38582
|
* Whether the notification's preview is a STILL or a short animation.
|
|
38396
38583
|
*
|
|
38397
38584
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
38398
|
-
* rule)"* —
|
|
38585
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
38399
38586
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
38400
38587
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
38401
38588
|
* simply applies it to a dozen frames sampled across the render and assembles
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-ai",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.95",
|
|
4
4
|
"description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|