@camstack/addon-provider-rtsp 1.2.102 → 1.2.104
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 +355 -14
- package/dist/addon.mjs +355 -14
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -5384,7 +5384,7 @@ var ZodIssueCode = {
|
|
|
5384
5384
|
var ZodFirstPartyTypeKind;
|
|
5385
5385
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5386
5386
|
//#endregion
|
|
5387
|
-
//#region ../types/dist/sleep-
|
|
5387
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5388
5388
|
/**
|
|
5389
5389
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5390
5390
|
* window to float samples (D455).
|
|
@@ -11618,6 +11618,21 @@ var streamSignalsCapability = {
|
|
|
11618
11618
|
mode: "singleton",
|
|
11619
11619
|
deviceTypes: Object.values(DeviceType),
|
|
11620
11620
|
runtimeState: StreamSignalsStatusSchema,
|
|
11621
|
+
/**
|
|
11622
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11623
|
+
*
|
|
11624
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11625
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11626
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11627
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11628
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11629
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11630
|
+
* because the fix could not reach it.
|
|
11631
|
+
*
|
|
11632
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11633
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11634
|
+
*/
|
|
11635
|
+
durability: "session",
|
|
11621
11636
|
methods: {
|
|
11622
11637
|
/**
|
|
11623
11638
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18232,6 +18247,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18232
18247
|
settings: NcAlarmSettingsSchema,
|
|
18233
18248
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18234
18249
|
});
|
|
18250
|
+
/**
|
|
18251
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18252
|
+
*
|
|
18253
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18254
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18255
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18256
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18257
|
+
* a different thing from never having been told, and only the envelope
|
|
18258
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18259
|
+
*/
|
|
18260
|
+
var NcClipRetentionAskSchema = object({
|
|
18261
|
+
/**
|
|
18262
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18263
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18264
|
+
* asking everywhere.
|
|
18265
|
+
*/
|
|
18266
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18267
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18268
|
+
* needs nothing produces no ask at all. */
|
|
18269
|
+
seconds: number().min(0).max(60),
|
|
18270
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18271
|
+
* assigned, which is what the cut defaults to. */
|
|
18272
|
+
profile: CamProfileSchema.optional(),
|
|
18273
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18274
|
+
ruleId: string(),
|
|
18275
|
+
ruleName: string(),
|
|
18276
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18277
|
+
reason: _enum(["window", "occupancy"])
|
|
18278
|
+
});
|
|
18279
|
+
/**
|
|
18280
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18281
|
+
*
|
|
18282
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18283
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18284
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18285
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18286
|
+
* footage this mechanism exists to keep.
|
|
18287
|
+
*/
|
|
18288
|
+
var NcClipRetentionPlanSchema = object({
|
|
18289
|
+
rulesLoaded: boolean(),
|
|
18290
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18291
|
+
});
|
|
18235
18292
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18236
18293
|
kind: "mutation",
|
|
18237
18294
|
auth: "admin",
|
|
@@ -18252,7 +18309,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18252
18309
|
}), object({ success: literal(true) }), {
|
|
18253
18310
|
kind: "mutation",
|
|
18254
18311
|
auth: "admin"
|
|
18255
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18312
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18256
18313
|
deviceId: number().int(),
|
|
18257
18314
|
muted: boolean()
|
|
18258
18315
|
}), object({ success: literal(true) }), {
|
|
@@ -19437,13 +19494,26 @@ var TrackAudioLabelSchema = object({
|
|
|
19437
19494
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
19438
19495
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
19439
19496
|
*
|
|
19497
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
19498
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
19499
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
19500
|
+
* detector.
|
|
19501
|
+
*
|
|
19502
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
19503
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
19504
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
19505
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
19506
|
+
* could not name.
|
|
19507
|
+
*
|
|
19440
19508
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
19441
19509
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
19442
|
-
* with `isSpatialTrack`, which allow-lists
|
|
19443
|
-
* check silently readmits every source added after it was
|
|
19510
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
19511
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
19512
|
+
* written.
|
|
19444
19513
|
*/
|
|
19445
19514
|
var TrackSourceSchema = _enum([
|
|
19446
19515
|
"pipeline",
|
|
19516
|
+
"onboard",
|
|
19447
19517
|
"sensor",
|
|
19448
19518
|
"audio"
|
|
19449
19519
|
]);
|
|
@@ -20826,6 +20896,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20826
20896
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20827
20897
|
framesMatched: number().int()
|
|
20828
20898
|
})).readonly() });
|
|
20899
|
+
/**
|
|
20900
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20901
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20902
|
+
* is an alias of this, not a second list.
|
|
20903
|
+
*/
|
|
20904
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20905
|
+
"motion",
|
|
20906
|
+
"audio-dbfs",
|
|
20907
|
+
"battery",
|
|
20908
|
+
"occupancy"
|
|
20909
|
+
]);
|
|
20910
|
+
/**
|
|
20911
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20912
|
+
*
|
|
20913
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20914
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20915
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20916
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20917
|
+
*/
|
|
20918
|
+
var LtsBucketSchema = object({
|
|
20919
|
+
scope: string(),
|
|
20920
|
+
bucketStart: number().int(),
|
|
20921
|
+
samples: number().int().nonnegative(),
|
|
20922
|
+
sum: number(),
|
|
20923
|
+
min: number(),
|
|
20924
|
+
max: number()
|
|
20925
|
+
});
|
|
20829
20926
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20830
20927
|
deviceId: number(),
|
|
20831
20928
|
trackId: string()
|
|
@@ -20872,6 +20969,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20872
20969
|
kinds: array(string()).optional(),
|
|
20873
20970
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20874
20971
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20972
|
+
deviceId: number(),
|
|
20973
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20974
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20975
|
+
scope: string().optional(),
|
|
20976
|
+
from: number(),
|
|
20977
|
+
to: number(),
|
|
20978
|
+
limit: number().int().positive().optional()
|
|
20979
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20875
20980
|
deviceId: number(),
|
|
20876
20981
|
since: number(),
|
|
20877
20982
|
until: number(),
|
|
@@ -21490,6 +21595,40 @@ var MotionSourceEnum = _enum([
|
|
|
21490
21595
|
*/
|
|
21491
21596
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21492
21597
|
/**
|
|
21598
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
21599
|
+
*
|
|
21600
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
21601
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
21602
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
21603
|
+
* track, the overlay and the debug row.
|
|
21604
|
+
*
|
|
21605
|
+
* ## Why one, and why it is still an array
|
|
21606
|
+
*
|
|
21607
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
21608
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
21609
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
21610
|
+
* detectors disagree about the same box by construction — which is the
|
|
21611
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
21612
|
+
*
|
|
21613
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
21614
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
21615
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
21616
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
21617
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
21618
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
21619
|
+
* rely on.
|
|
21620
|
+
*
|
|
21621
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
21622
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
21623
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
21624
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
21625
|
+
* suite caught it.
|
|
21626
|
+
*
|
|
21627
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
21628
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
21629
|
+
*/
|
|
21630
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
21631
|
+
/**
|
|
21493
21632
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21494
21633
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21495
21634
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21640,6 +21779,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21640
21779
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21641
21780
|
*/
|
|
21642
21781
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21782
|
+
/**
|
|
21783
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21784
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21785
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21786
|
+
*
|
|
21787
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21788
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21789
|
+
* here. Its boxes reach post-analysis on the same
|
|
21790
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21791
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21792
|
+
* subtree (face / plate / embedding).
|
|
21793
|
+
*
|
|
21794
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21795
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21796
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21797
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21798
|
+
*
|
|
21799
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21800
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21801
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21802
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21803
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21804
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21805
|
+
*
|
|
21806
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21807
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21808
|
+
* default.
|
|
21809
|
+
*/
|
|
21810
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21643
21811
|
pipelineEnabled: boolean().default(true),
|
|
21644
21812
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21645
21813
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21821,7 +21989,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21821
21989
|
queueDepth: number(),
|
|
21822
21990
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21823
21991
|
});
|
|
21992
|
+
/**
|
|
21993
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21994
|
+
*
|
|
21995
|
+
* One instance per node. Receives camera assignments from
|
|
21996
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21997
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21998
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21999
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
22000
|
+
* the bus.
|
|
22001
|
+
*
|
|
22002
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
22003
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
22004
|
+
* makes assignment decisions itself.
|
|
22005
|
+
*/
|
|
22006
|
+
/**
|
|
22007
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
22008
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
22009
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
22010
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
22011
|
+
*/
|
|
22012
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
22013
|
+
"not-attached",
|
|
22014
|
+
"battery-asleep",
|
|
22015
|
+
"not-watching",
|
|
22016
|
+
"already-bursting"
|
|
22017
|
+
]);
|
|
21824
22018
|
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
22019
|
+
deviceId: number(),
|
|
22020
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22021
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22022
|
+
frames: number().int().positive().optional(),
|
|
22023
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22024
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22025
|
+
reason: string()
|
|
22026
|
+
}), object({
|
|
22027
|
+
started: boolean(),
|
|
22028
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22029
|
+
}), {
|
|
22030
|
+
auth: "admin",
|
|
22031
|
+
kind: "mutation"
|
|
22032
|
+
}), method(object({
|
|
21825
22033
|
handle: FrameHandleSchema,
|
|
21826
22034
|
bbox: NativeCropBboxSchema,
|
|
21827
22035
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28763,11 +28971,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28763
28971
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28764
28972
|
/**
|
|
28765
28973
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28766
|
-
*
|
|
28767
|
-
*
|
|
28974
|
+
*
|
|
28975
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28976
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28977
|
+
* other detection choice is made. `geometry` on
|
|
28978
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28979
|
+
* choice would buy this particular camera.
|
|
28768
28980
|
*/
|
|
28769
28981
|
enabled: boolean()
|
|
28770
28982
|
});
|
|
28983
|
+
/**
|
|
28984
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28985
|
+
*
|
|
28986
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28987
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28988
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28989
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28990
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28991
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28992
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28993
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28994
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28995
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28996
|
+
* tracker as motion and no further.
|
|
28997
|
+
*
|
|
28998
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28999
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
29000
|
+
* derived form is only as honest as `getOptions`).
|
|
29001
|
+
*/
|
|
29002
|
+
var NativeObjectGeometryEnum = _enum([
|
|
29003
|
+
"boxed",
|
|
29004
|
+
"while-streaming",
|
|
29005
|
+
"flag-only"
|
|
29006
|
+
]);
|
|
29007
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
29008
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
29009
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
29010
|
+
/** What a detection from this camera carries. */
|
|
29011
|
+
geometry: NativeObjectGeometryEnum
|
|
29012
|
+
});
|
|
29013
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28771
29014
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28772
29015
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28773
29016
|
lastFetchedAt: number() });
|
|
@@ -28777,13 +29020,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28777
29020
|
deviceNative: true,
|
|
28778
29021
|
mode: "singleton",
|
|
28779
29022
|
deviceTypes: [DeviceType.Camera],
|
|
28780
|
-
methods: {
|
|
28781
|
-
deviceId: number(),
|
|
28782
|
-
|
|
28783
|
-
|
|
28784
|
-
|
|
28785
|
-
|
|
28786
|
-
|
|
29023
|
+
methods: {
|
|
29024
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
29025
|
+
setSettings: method(object({
|
|
29026
|
+
deviceId: number(),
|
|
29027
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
29028
|
+
}), _void(), {
|
|
29029
|
+
kind: "mutation",
|
|
29030
|
+
auth: "admin"
|
|
29031
|
+
}),
|
|
29032
|
+
setEnabled: method(object({
|
|
29033
|
+
deviceId: number(),
|
|
29034
|
+
enabled: boolean()
|
|
29035
|
+
}), _void(), {
|
|
29036
|
+
kind: "mutation",
|
|
29037
|
+
auth: "admin"
|
|
29038
|
+
})
|
|
29039
|
+
},
|
|
28787
29040
|
events: { onDetected: { data: object({
|
|
28788
29041
|
deviceId: number(),
|
|
28789
29042
|
detection: NativeDetectionSchema
|
|
@@ -33631,7 +33884,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33631
33884
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33632
33885
|
totalObjects: number().int().nonnegative(),
|
|
33633
33886
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33634
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33887
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33888
|
+
/**
|
|
33889
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33890
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33891
|
+
*
|
|
33892
|
+
* The operator's question about a scene has two halves and they answer
|
|
33893
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33894
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33895
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33896
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33897
|
+
*
|
|
33898
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33899
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33900
|
+
*
|
|
33901
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33902
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33903
|
+
* parked objects here" about a camera whose lot is full.
|
|
33904
|
+
*/
|
|
33905
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33906
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33907
|
+
* same absence rule. */
|
|
33908
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33635
33909
|
});
|
|
33636
33910
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33637
33911
|
zoneId: string(),
|
|
@@ -33754,6 +34028,23 @@ var HistoryPointSchema = object({
|
|
|
33754
34028
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33755
34029
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33756
34030
|
* combinatorial coverage the operator UI requested.
|
|
34031
|
+
*
|
|
34032
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34033
|
+
*
|
|
34034
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34035
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34036
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34037
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34038
|
+
* horizon rather than to answer a question.
|
|
34039
|
+
*
|
|
34040
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34041
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34042
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34043
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34044
|
+
* function the writer uses, so the two cannot drift.
|
|
34045
|
+
*
|
|
34046
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34047
|
+
* it. Do not add a fourth caller.
|
|
33757
34048
|
*/
|
|
33758
34049
|
var zoneAnalyticsCapability = {
|
|
33759
34050
|
name: "zone-analytics",
|
|
@@ -38219,12 +38510,24 @@ Object.freeze({
|
|
|
38219
38510
|
addonId: null,
|
|
38220
38511
|
access: "create"
|
|
38221
38512
|
},
|
|
38513
|
+
"nativeObjectDetection.getOptions": {
|
|
38514
|
+
capName: "native-object-detection",
|
|
38515
|
+
capScope: "device",
|
|
38516
|
+
addonId: null,
|
|
38517
|
+
access: "view"
|
|
38518
|
+
},
|
|
38222
38519
|
"nativeObjectDetection.setEnabled": {
|
|
38223
38520
|
capName: "native-object-detection",
|
|
38224
38521
|
capScope: "device",
|
|
38225
38522
|
addonId: null,
|
|
38226
38523
|
access: "create"
|
|
38227
38524
|
},
|
|
38525
|
+
"nativeObjectDetection.setSettings": {
|
|
38526
|
+
capName: "native-object-detection",
|
|
38527
|
+
capScope: "device",
|
|
38528
|
+
addonId: null,
|
|
38529
|
+
access: "create"
|
|
38530
|
+
},
|
|
38228
38531
|
"navigation.getFeatures": {
|
|
38229
38532
|
capName: "navigation",
|
|
38230
38533
|
capScope: "device",
|
|
@@ -38489,6 +38792,12 @@ Object.freeze({
|
|
|
38489
38792
|
addonId: null,
|
|
38490
38793
|
access: "view"
|
|
38491
38794
|
},
|
|
38795
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38796
|
+
capName: "notification-rules",
|
|
38797
|
+
capScope: "system",
|
|
38798
|
+
addonId: null,
|
|
38799
|
+
access: "view"
|
|
38800
|
+
},
|
|
38492
38801
|
"notificationRules.getConditionCatalog": {
|
|
38493
38802
|
capName: "notification-rules",
|
|
38494
38803
|
capScope: "system",
|
|
@@ -38999,6 +39308,12 @@ Object.freeze({
|
|
|
38999
39308
|
addonId: null,
|
|
39000
39309
|
access: "create"
|
|
39001
39310
|
},
|
|
39311
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39312
|
+
capName: "pipeline-analytics",
|
|
39313
|
+
capScope: "device",
|
|
39314
|
+
addonId: null,
|
|
39315
|
+
access: "view"
|
|
39316
|
+
},
|
|
39002
39317
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
39003
39318
|
capName: "pipeline-analytics",
|
|
39004
39319
|
capScope: "device",
|
|
@@ -39671,6 +39986,12 @@ Object.freeze({
|
|
|
39671
39986
|
addonId: null,
|
|
39672
39987
|
access: "create"
|
|
39673
39988
|
},
|
|
39989
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39990
|
+
capName: "pipeline-runner",
|
|
39991
|
+
capScope: "system",
|
|
39992
|
+
addonId: null,
|
|
39993
|
+
access: "create"
|
|
39994
|
+
},
|
|
39674
39995
|
"pipelineRunner.runDetailSubtree": {
|
|
39675
39996
|
capName: "pipeline-runner",
|
|
39676
39997
|
capScope: "system",
|
|
@@ -42451,11 +42772,21 @@ Object.freeze({
|
|
|
42451
42772
|
form: "single",
|
|
42452
42773
|
optional: false
|
|
42453
42774
|
}],
|
|
42775
|
+
"nativeObjectDetection.getOptions": [{
|
|
42776
|
+
name: "deviceId",
|
|
42777
|
+
form: "single",
|
|
42778
|
+
optional: false
|
|
42779
|
+
}],
|
|
42454
42780
|
"nativeObjectDetection.setEnabled": [{
|
|
42455
42781
|
name: "deviceId",
|
|
42456
42782
|
form: "single",
|
|
42457
42783
|
optional: false
|
|
42458
42784
|
}],
|
|
42785
|
+
"nativeObjectDetection.setSettings": [{
|
|
42786
|
+
name: "deviceId",
|
|
42787
|
+
form: "single",
|
|
42788
|
+
optional: false
|
|
42789
|
+
}],
|
|
42459
42790
|
"navigation.getFeatures": [{
|
|
42460
42791
|
name: "deviceId",
|
|
42461
42792
|
form: "single",
|
|
@@ -42805,6 +43136,11 @@ Object.freeze({
|
|
|
42805
43136
|
form: "single",
|
|
42806
43137
|
optional: false
|
|
42807
43138
|
}],
|
|
43139
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43140
|
+
name: "deviceId",
|
|
43141
|
+
form: "single",
|
|
43142
|
+
optional: false
|
|
43143
|
+
}],
|
|
42808
43144
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42809
43145
|
name: "deviceId",
|
|
42810
43146
|
form: "single",
|
|
@@ -42995,6 +43331,11 @@ Object.freeze({
|
|
|
42995
43331
|
form: "single",
|
|
42996
43332
|
optional: false
|
|
42997
43333
|
}],
|
|
43334
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43335
|
+
name: "deviceId",
|
|
43336
|
+
form: "single",
|
|
43337
|
+
optional: false
|
|
43338
|
+
}],
|
|
42998
43339
|
"pipelineRunner.runDetailSubtree": [{
|
|
42999
43340
|
name: "deviceId",
|
|
43000
43341
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5360,7 +5360,7 @@ var ZodIssueCode = {
|
|
|
5360
5360
|
var ZodFirstPartyTypeKind;
|
|
5361
5361
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5362
5362
|
//#endregion
|
|
5363
|
-
//#region ../types/dist/sleep-
|
|
5363
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5364
5364
|
/**
|
|
5365
5365
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5366
5366
|
* window to float samples (D455).
|
|
@@ -11594,6 +11594,21 @@ var streamSignalsCapability = {
|
|
|
11594
11594
|
mode: "singleton",
|
|
11595
11595
|
deviceTypes: Object.values(DeviceType),
|
|
11596
11596
|
runtimeState: StreamSignalsStatusSchema,
|
|
11597
|
+
/**
|
|
11598
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11599
|
+
*
|
|
11600
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11601
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11602
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11603
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11604
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11605
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11606
|
+
* because the fix could not reach it.
|
|
11607
|
+
*
|
|
11608
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11609
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11610
|
+
*/
|
|
11611
|
+
durability: "session",
|
|
11597
11612
|
methods: {
|
|
11598
11613
|
/**
|
|
11599
11614
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18208,6 +18223,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18208
18223
|
settings: NcAlarmSettingsSchema,
|
|
18209
18224
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18210
18225
|
});
|
|
18226
|
+
/**
|
|
18227
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18228
|
+
*
|
|
18229
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18230
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18231
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18232
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18233
|
+
* a different thing from never having been told, and only the envelope
|
|
18234
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18235
|
+
*/
|
|
18236
|
+
var NcClipRetentionAskSchema = object({
|
|
18237
|
+
/**
|
|
18238
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18239
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18240
|
+
* asking everywhere.
|
|
18241
|
+
*/
|
|
18242
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18243
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18244
|
+
* needs nothing produces no ask at all. */
|
|
18245
|
+
seconds: number().min(0).max(60),
|
|
18246
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18247
|
+
* assigned, which is what the cut defaults to. */
|
|
18248
|
+
profile: CamProfileSchema.optional(),
|
|
18249
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18250
|
+
ruleId: string(),
|
|
18251
|
+
ruleName: string(),
|
|
18252
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18253
|
+
reason: _enum(["window", "occupancy"])
|
|
18254
|
+
});
|
|
18255
|
+
/**
|
|
18256
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18257
|
+
*
|
|
18258
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18259
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18260
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18261
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18262
|
+
* footage this mechanism exists to keep.
|
|
18263
|
+
*/
|
|
18264
|
+
var NcClipRetentionPlanSchema = object({
|
|
18265
|
+
rulesLoaded: boolean(),
|
|
18266
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18267
|
+
});
|
|
18211
18268
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18212
18269
|
kind: "mutation",
|
|
18213
18270
|
auth: "admin",
|
|
@@ -18228,7 +18285,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18228
18285
|
}), object({ success: literal(true) }), {
|
|
18229
18286
|
kind: "mutation",
|
|
18230
18287
|
auth: "admin"
|
|
18231
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18288
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18232
18289
|
deviceId: number().int(),
|
|
18233
18290
|
muted: boolean()
|
|
18234
18291
|
}), object({ success: literal(true) }), {
|
|
@@ -19413,13 +19470,26 @@ var TrackAudioLabelSchema = object({
|
|
|
19413
19470
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
19414
19471
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
19415
19472
|
*
|
|
19473
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
19474
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
19475
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
19476
|
+
* detector.
|
|
19477
|
+
*
|
|
19478
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
19479
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
19480
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
19481
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
19482
|
+
* could not name.
|
|
19483
|
+
*
|
|
19416
19484
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
19417
19485
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
19418
|
-
* with `isSpatialTrack`, which allow-lists
|
|
19419
|
-
* check silently readmits every source added after it was
|
|
19486
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
19487
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
19488
|
+
* written.
|
|
19420
19489
|
*/
|
|
19421
19490
|
var TrackSourceSchema = _enum([
|
|
19422
19491
|
"pipeline",
|
|
19492
|
+
"onboard",
|
|
19423
19493
|
"sensor",
|
|
19424
19494
|
"audio"
|
|
19425
19495
|
]);
|
|
@@ -20802,6 +20872,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20802
20872
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20803
20873
|
framesMatched: number().int()
|
|
20804
20874
|
})).readonly() });
|
|
20875
|
+
/**
|
|
20876
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20877
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20878
|
+
* is an alias of this, not a second list.
|
|
20879
|
+
*/
|
|
20880
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20881
|
+
"motion",
|
|
20882
|
+
"audio-dbfs",
|
|
20883
|
+
"battery",
|
|
20884
|
+
"occupancy"
|
|
20885
|
+
]);
|
|
20886
|
+
/**
|
|
20887
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20888
|
+
*
|
|
20889
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20890
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20891
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20892
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20893
|
+
*/
|
|
20894
|
+
var LtsBucketSchema = object({
|
|
20895
|
+
scope: string(),
|
|
20896
|
+
bucketStart: number().int(),
|
|
20897
|
+
samples: number().int().nonnegative(),
|
|
20898
|
+
sum: number(),
|
|
20899
|
+
min: number(),
|
|
20900
|
+
max: number()
|
|
20901
|
+
});
|
|
20805
20902
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20806
20903
|
deviceId: number(),
|
|
20807
20904
|
trackId: string()
|
|
@@ -20848,6 +20945,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20848
20945
|
kinds: array(string()).optional(),
|
|
20849
20946
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20850
20947
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20948
|
+
deviceId: number(),
|
|
20949
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20950
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20951
|
+
scope: string().optional(),
|
|
20952
|
+
from: number(),
|
|
20953
|
+
to: number(),
|
|
20954
|
+
limit: number().int().positive().optional()
|
|
20955
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20851
20956
|
deviceId: number(),
|
|
20852
20957
|
since: number(),
|
|
20853
20958
|
until: number(),
|
|
@@ -21466,6 +21571,40 @@ var MotionSourceEnum = _enum([
|
|
|
21466
21571
|
*/
|
|
21467
21572
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21468
21573
|
/**
|
|
21574
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
21575
|
+
*
|
|
21576
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
21577
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
21578
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
21579
|
+
* track, the overlay and the debug row.
|
|
21580
|
+
*
|
|
21581
|
+
* ## Why one, and why it is still an array
|
|
21582
|
+
*
|
|
21583
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
21584
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
21585
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
21586
|
+
* detectors disagree about the same box by construction — which is the
|
|
21587
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
21588
|
+
*
|
|
21589
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
21590
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
21591
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
21592
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
21593
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
21594
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
21595
|
+
* rely on.
|
|
21596
|
+
*
|
|
21597
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
21598
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
21599
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
21600
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
21601
|
+
* suite caught it.
|
|
21602
|
+
*
|
|
21603
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
21604
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
21605
|
+
*/
|
|
21606
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
21607
|
+
/**
|
|
21469
21608
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21470
21609
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21471
21610
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21616,6 +21755,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21616
21755
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21617
21756
|
*/
|
|
21618
21757
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21758
|
+
/**
|
|
21759
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21760
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21761
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21762
|
+
*
|
|
21763
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21764
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21765
|
+
* here. Its boxes reach post-analysis on the same
|
|
21766
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21767
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21768
|
+
* subtree (face / plate / embedding).
|
|
21769
|
+
*
|
|
21770
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21771
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21772
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21773
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21774
|
+
*
|
|
21775
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21776
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21777
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21778
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21779
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21780
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21781
|
+
*
|
|
21782
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21783
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21784
|
+
* default.
|
|
21785
|
+
*/
|
|
21786
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21619
21787
|
pipelineEnabled: boolean().default(true),
|
|
21620
21788
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21621
21789
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21797,7 +21965,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21797
21965
|
queueDepth: number(),
|
|
21798
21966
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21799
21967
|
});
|
|
21968
|
+
/**
|
|
21969
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21970
|
+
*
|
|
21971
|
+
* One instance per node. Receives camera assignments from
|
|
21972
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21973
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21974
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21975
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21976
|
+
* the bus.
|
|
21977
|
+
*
|
|
21978
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21979
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21980
|
+
* makes assignment decisions itself.
|
|
21981
|
+
*/
|
|
21982
|
+
/**
|
|
21983
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21984
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21985
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21986
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21987
|
+
*/
|
|
21988
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21989
|
+
"not-attached",
|
|
21990
|
+
"battery-asleep",
|
|
21991
|
+
"not-watching",
|
|
21992
|
+
"already-bursting"
|
|
21993
|
+
]);
|
|
21800
21994
|
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
21995
|
+
deviceId: number(),
|
|
21996
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21997
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21998
|
+
frames: number().int().positive().optional(),
|
|
21999
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22000
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22001
|
+
reason: string()
|
|
22002
|
+
}), object({
|
|
22003
|
+
started: boolean(),
|
|
22004
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22005
|
+
}), {
|
|
22006
|
+
auth: "admin",
|
|
22007
|
+
kind: "mutation"
|
|
22008
|
+
}), method(object({
|
|
21801
22009
|
handle: FrameHandleSchema,
|
|
21802
22010
|
bbox: NativeCropBboxSchema,
|
|
21803
22011
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28739,11 +28947,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28739
28947
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28740
28948
|
/**
|
|
28741
28949
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28742
|
-
*
|
|
28743
|
-
*
|
|
28950
|
+
*
|
|
28951
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28952
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28953
|
+
* other detection choice is made. `geometry` on
|
|
28954
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28955
|
+
* choice would buy this particular camera.
|
|
28744
28956
|
*/
|
|
28745
28957
|
enabled: boolean()
|
|
28746
28958
|
});
|
|
28959
|
+
/**
|
|
28960
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28961
|
+
*
|
|
28962
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28963
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28964
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28965
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28966
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28967
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28968
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28969
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28970
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28971
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28972
|
+
* tracker as motion and no further.
|
|
28973
|
+
*
|
|
28974
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28975
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28976
|
+
* derived form is only as honest as `getOptions`).
|
|
28977
|
+
*/
|
|
28978
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28979
|
+
"boxed",
|
|
28980
|
+
"while-streaming",
|
|
28981
|
+
"flag-only"
|
|
28982
|
+
]);
|
|
28983
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28984
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28985
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28986
|
+
/** What a detection from this camera carries. */
|
|
28987
|
+
geometry: NativeObjectGeometryEnum
|
|
28988
|
+
});
|
|
28989
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28747
28990
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28748
28991
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28749
28992
|
lastFetchedAt: number() });
|
|
@@ -28753,13 +28996,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28753
28996
|
deviceNative: true,
|
|
28754
28997
|
mode: "singleton",
|
|
28755
28998
|
deviceTypes: [DeviceType.Camera],
|
|
28756
|
-
methods: {
|
|
28757
|
-
deviceId: number(),
|
|
28758
|
-
|
|
28759
|
-
|
|
28760
|
-
|
|
28761
|
-
|
|
28762
|
-
|
|
28999
|
+
methods: {
|
|
29000
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
29001
|
+
setSettings: method(object({
|
|
29002
|
+
deviceId: number(),
|
|
29003
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
29004
|
+
}), _void(), {
|
|
29005
|
+
kind: "mutation",
|
|
29006
|
+
auth: "admin"
|
|
29007
|
+
}),
|
|
29008
|
+
setEnabled: method(object({
|
|
29009
|
+
deviceId: number(),
|
|
29010
|
+
enabled: boolean()
|
|
29011
|
+
}), _void(), {
|
|
29012
|
+
kind: "mutation",
|
|
29013
|
+
auth: "admin"
|
|
29014
|
+
})
|
|
29015
|
+
},
|
|
28763
29016
|
events: { onDetected: { data: object({
|
|
28764
29017
|
deviceId: number(),
|
|
28765
29018
|
detection: NativeDetectionSchema
|
|
@@ -33607,7 +33860,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33607
33860
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33608
33861
|
totalObjects: number().int().nonnegative(),
|
|
33609
33862
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33610
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33863
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33864
|
+
/**
|
|
33865
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33866
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33867
|
+
*
|
|
33868
|
+
* The operator's question about a scene has two halves and they answer
|
|
33869
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33870
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33871
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33872
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33873
|
+
*
|
|
33874
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33875
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33876
|
+
*
|
|
33877
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33878
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33879
|
+
* parked objects here" about a camera whose lot is full.
|
|
33880
|
+
*/
|
|
33881
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33882
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33883
|
+
* same absence rule. */
|
|
33884
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33611
33885
|
});
|
|
33612
33886
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33613
33887
|
zoneId: string(),
|
|
@@ -33730,6 +34004,23 @@ var HistoryPointSchema = object({
|
|
|
33730
34004
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33731
34005
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33732
34006
|
* combinatorial coverage the operator UI requested.
|
|
34007
|
+
*
|
|
34008
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34009
|
+
*
|
|
34010
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34011
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34012
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34013
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34014
|
+
* horizon rather than to answer a question.
|
|
34015
|
+
*
|
|
34016
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34017
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34018
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34019
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34020
|
+
* function the writer uses, so the two cannot drift.
|
|
34021
|
+
*
|
|
34022
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34023
|
+
* it. Do not add a fourth caller.
|
|
33733
34024
|
*/
|
|
33734
34025
|
var zoneAnalyticsCapability = {
|
|
33735
34026
|
name: "zone-analytics",
|
|
@@ -38195,12 +38486,24 @@ Object.freeze({
|
|
|
38195
38486
|
addonId: null,
|
|
38196
38487
|
access: "create"
|
|
38197
38488
|
},
|
|
38489
|
+
"nativeObjectDetection.getOptions": {
|
|
38490
|
+
capName: "native-object-detection",
|
|
38491
|
+
capScope: "device",
|
|
38492
|
+
addonId: null,
|
|
38493
|
+
access: "view"
|
|
38494
|
+
},
|
|
38198
38495
|
"nativeObjectDetection.setEnabled": {
|
|
38199
38496
|
capName: "native-object-detection",
|
|
38200
38497
|
capScope: "device",
|
|
38201
38498
|
addonId: null,
|
|
38202
38499
|
access: "create"
|
|
38203
38500
|
},
|
|
38501
|
+
"nativeObjectDetection.setSettings": {
|
|
38502
|
+
capName: "native-object-detection",
|
|
38503
|
+
capScope: "device",
|
|
38504
|
+
addonId: null,
|
|
38505
|
+
access: "create"
|
|
38506
|
+
},
|
|
38204
38507
|
"navigation.getFeatures": {
|
|
38205
38508
|
capName: "navigation",
|
|
38206
38509
|
capScope: "device",
|
|
@@ -38465,6 +38768,12 @@ Object.freeze({
|
|
|
38465
38768
|
addonId: null,
|
|
38466
38769
|
access: "view"
|
|
38467
38770
|
},
|
|
38771
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38772
|
+
capName: "notification-rules",
|
|
38773
|
+
capScope: "system",
|
|
38774
|
+
addonId: null,
|
|
38775
|
+
access: "view"
|
|
38776
|
+
},
|
|
38468
38777
|
"notificationRules.getConditionCatalog": {
|
|
38469
38778
|
capName: "notification-rules",
|
|
38470
38779
|
capScope: "system",
|
|
@@ -38975,6 +39284,12 @@ Object.freeze({
|
|
|
38975
39284
|
addonId: null,
|
|
38976
39285
|
access: "create"
|
|
38977
39286
|
},
|
|
39287
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39288
|
+
capName: "pipeline-analytics",
|
|
39289
|
+
capScope: "device",
|
|
39290
|
+
addonId: null,
|
|
39291
|
+
access: "view"
|
|
39292
|
+
},
|
|
38978
39293
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38979
39294
|
capName: "pipeline-analytics",
|
|
38980
39295
|
capScope: "device",
|
|
@@ -39647,6 +39962,12 @@ Object.freeze({
|
|
|
39647
39962
|
addonId: null,
|
|
39648
39963
|
access: "create"
|
|
39649
39964
|
},
|
|
39965
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39966
|
+
capName: "pipeline-runner",
|
|
39967
|
+
capScope: "system",
|
|
39968
|
+
addonId: null,
|
|
39969
|
+
access: "create"
|
|
39970
|
+
},
|
|
39650
39971
|
"pipelineRunner.runDetailSubtree": {
|
|
39651
39972
|
capName: "pipeline-runner",
|
|
39652
39973
|
capScope: "system",
|
|
@@ -42427,11 +42748,21 @@ Object.freeze({
|
|
|
42427
42748
|
form: "single",
|
|
42428
42749
|
optional: false
|
|
42429
42750
|
}],
|
|
42751
|
+
"nativeObjectDetection.getOptions": [{
|
|
42752
|
+
name: "deviceId",
|
|
42753
|
+
form: "single",
|
|
42754
|
+
optional: false
|
|
42755
|
+
}],
|
|
42430
42756
|
"nativeObjectDetection.setEnabled": [{
|
|
42431
42757
|
name: "deviceId",
|
|
42432
42758
|
form: "single",
|
|
42433
42759
|
optional: false
|
|
42434
42760
|
}],
|
|
42761
|
+
"nativeObjectDetection.setSettings": [{
|
|
42762
|
+
name: "deviceId",
|
|
42763
|
+
form: "single",
|
|
42764
|
+
optional: false
|
|
42765
|
+
}],
|
|
42435
42766
|
"navigation.getFeatures": [{
|
|
42436
42767
|
name: "deviceId",
|
|
42437
42768
|
form: "single",
|
|
@@ -42781,6 +43112,11 @@ Object.freeze({
|
|
|
42781
43112
|
form: "single",
|
|
42782
43113
|
optional: false
|
|
42783
43114
|
}],
|
|
43115
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43116
|
+
name: "deviceId",
|
|
43117
|
+
form: "single",
|
|
43118
|
+
optional: false
|
|
43119
|
+
}],
|
|
42784
43120
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42785
43121
|
name: "deviceId",
|
|
42786
43122
|
form: "single",
|
|
@@ -42971,6 +43307,11 @@ Object.freeze({
|
|
|
42971
43307
|
form: "single",
|
|
42972
43308
|
optional: false
|
|
42973
43309
|
}],
|
|
43310
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43311
|
+
name: "deviceId",
|
|
43312
|
+
form: "single",
|
|
43313
|
+
optional: false
|
|
43314
|
+
}],
|
|
42974
43315
|
"pipelineRunner.runDetailSubtree": [{
|
|
42975
43316
|
name: "deviceId",
|
|
42976
43317
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-rtsp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.104",
|
|
4
4
|
"description": "Generic RTSP camera device provider addon for CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"build": "vite build",
|
|
64
64
|
"dev": "vite build --watch",
|
|
65
65
|
"typecheck": "tsc --noEmit",
|
|
66
|
-
"publish": "npm publish --access public"
|
|
66
|
+
"publish:npm": "npm publish --access public"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@camstack/types": "*",
|