@camstack/addon-decoder-nodeav 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/index.js +316 -10
- package/dist/index.mjs +316 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5364,7 +5364,7 @@ var ZodIssueCode = {
|
|
|
5364
5364
|
var ZodFirstPartyTypeKind;
|
|
5365
5365
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5366
5366
|
//#endregion
|
|
5367
|
-
//#region ../types/dist/sleep-
|
|
5367
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5368
5368
|
/**
|
|
5369
5369
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5370
5370
|
* window to float samples (D455).
|
|
@@ -17964,6 +17964,48 @@ var NcAlarmConfigSchema = object({
|
|
|
17964
17964
|
settings: NcAlarmSettingsSchema,
|
|
17965
17965
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
17966
17966
|
});
|
|
17967
|
+
/**
|
|
17968
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
17969
|
+
*
|
|
17970
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
17971
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
17972
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
17973
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
17974
|
+
* a different thing from never having been told, and only the envelope
|
|
17975
|
+
* (`rulesLoaded`) can tell those apart.
|
|
17976
|
+
*/
|
|
17977
|
+
var NcClipRetentionAskSchema = object({
|
|
17978
|
+
/**
|
|
17979
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
17980
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
17981
|
+
* asking everywhere.
|
|
17982
|
+
*/
|
|
17983
|
+
deviceId: number().int().nonnegative().optional(),
|
|
17984
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
17985
|
+
* needs nothing produces no ask at all. */
|
|
17986
|
+
seconds: number().min(0).max(60),
|
|
17987
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
17988
|
+
* assigned, which is what the cut defaults to. */
|
|
17989
|
+
profile: CamProfileSchema.optional(),
|
|
17990
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
17991
|
+
ruleId: string(),
|
|
17992
|
+
ruleName: string(),
|
|
17993
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
17994
|
+
reason: _enum(["window", "occupancy"])
|
|
17995
|
+
});
|
|
17996
|
+
/**
|
|
17997
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
17998
|
+
*
|
|
17999
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18000
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18001
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18002
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18003
|
+
* footage this mechanism exists to keep.
|
|
18004
|
+
*/
|
|
18005
|
+
var NcClipRetentionPlanSchema = object({
|
|
18006
|
+
rulesLoaded: boolean(),
|
|
18007
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18008
|
+
});
|
|
17967
18009
|
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 }), {
|
|
17968
18010
|
kind: "mutation",
|
|
17969
18011
|
auth: "admin",
|
|
@@ -17984,7 +18026,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
17984
18026
|
}), object({ success: literal(true) }), {
|
|
17985
18027
|
kind: "mutation",
|
|
17986
18028
|
auth: "admin"
|
|
17987
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18029
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
17988
18030
|
deviceId: number().int(),
|
|
17989
18031
|
muted: boolean()
|
|
17990
18032
|
}), object({ success: literal(true) }), {
|
|
@@ -19129,13 +19171,26 @@ var TrackAudioLabelSchema = object({
|
|
|
19129
19171
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
19130
19172
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
19131
19173
|
*
|
|
19174
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
19175
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
19176
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
19177
|
+
* detector.
|
|
19178
|
+
*
|
|
19179
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
19180
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
19181
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
19182
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
19183
|
+
* could not name.
|
|
19184
|
+
*
|
|
19132
19185
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
19133
19186
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
19134
|
-
* with `isSpatialTrack`, which allow-lists
|
|
19135
|
-
* check silently readmits every source added after it was
|
|
19187
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
19188
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
19189
|
+
* written.
|
|
19136
19190
|
*/
|
|
19137
19191
|
var TrackSourceSchema = _enum([
|
|
19138
19192
|
"pipeline",
|
|
19193
|
+
"onboard",
|
|
19139
19194
|
"sensor",
|
|
19140
19195
|
"audio"
|
|
19141
19196
|
]);
|
|
@@ -20518,6 +20573,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20518
20573
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20519
20574
|
framesMatched: number().int()
|
|
20520
20575
|
})).readonly() });
|
|
20576
|
+
/**
|
|
20577
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20578
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20579
|
+
* is an alias of this, not a second list.
|
|
20580
|
+
*/
|
|
20581
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20582
|
+
"motion",
|
|
20583
|
+
"audio-dbfs",
|
|
20584
|
+
"battery",
|
|
20585
|
+
"occupancy"
|
|
20586
|
+
]);
|
|
20587
|
+
/**
|
|
20588
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20589
|
+
*
|
|
20590
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20591
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20592
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20593
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20594
|
+
*/
|
|
20595
|
+
var LtsBucketSchema = object({
|
|
20596
|
+
scope: string(),
|
|
20597
|
+
bucketStart: number().int(),
|
|
20598
|
+
samples: number().int().nonnegative(),
|
|
20599
|
+
sum: number(),
|
|
20600
|
+
min: number(),
|
|
20601
|
+
max: number()
|
|
20602
|
+
});
|
|
20521
20603
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20522
20604
|
deviceId: number(),
|
|
20523
20605
|
trackId: string()
|
|
@@ -20564,6 +20646,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20564
20646
|
kinds: array(string()).optional(),
|
|
20565
20647
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20566
20648
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20649
|
+
deviceId: number(),
|
|
20650
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20651
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20652
|
+
scope: string().optional(),
|
|
20653
|
+
from: number(),
|
|
20654
|
+
to: number(),
|
|
20655
|
+
limit: number().int().positive().optional()
|
|
20656
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20567
20657
|
deviceId: number(),
|
|
20568
20658
|
since: number(),
|
|
20569
20659
|
until: number(),
|
|
@@ -21182,6 +21272,40 @@ var MotionSourceEnum = _enum([
|
|
|
21182
21272
|
*/
|
|
21183
21273
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21184
21274
|
/**
|
|
21275
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
21276
|
+
*
|
|
21277
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
21278
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
21279
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
21280
|
+
* track, the overlay and the debug row.
|
|
21281
|
+
*
|
|
21282
|
+
* ## Why one, and why it is still an array
|
|
21283
|
+
*
|
|
21284
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
21285
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
21286
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
21287
|
+
* detectors disagree about the same box by construction — which is the
|
|
21288
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
21289
|
+
*
|
|
21290
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
21291
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
21292
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
21293
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
21294
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
21295
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
21296
|
+
* rely on.
|
|
21297
|
+
*
|
|
21298
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
21299
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
21300
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
21301
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
21302
|
+
* suite caught it.
|
|
21303
|
+
*
|
|
21304
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
21305
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
21306
|
+
*/
|
|
21307
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
21308
|
+
/**
|
|
21185
21309
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21186
21310
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21187
21311
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21332,6 +21456,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21332
21456
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21333
21457
|
*/
|
|
21334
21458
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21459
|
+
/**
|
|
21460
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21461
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21462
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21463
|
+
*
|
|
21464
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21465
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21466
|
+
* here. Its boxes reach post-analysis on the same
|
|
21467
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21468
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21469
|
+
* subtree (face / plate / embedding).
|
|
21470
|
+
*
|
|
21471
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21472
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21473
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21474
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21475
|
+
*
|
|
21476
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21477
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21478
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21479
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21480
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21481
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21482
|
+
*
|
|
21483
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21484
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21485
|
+
* default.
|
|
21486
|
+
*/
|
|
21487
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21335
21488
|
pipelineEnabled: boolean().default(true),
|
|
21336
21489
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21337
21490
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21513,7 +21666,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21513
21666
|
queueDepth: number(),
|
|
21514
21667
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21515
21668
|
});
|
|
21669
|
+
/**
|
|
21670
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21671
|
+
*
|
|
21672
|
+
* One instance per node. Receives camera assignments from
|
|
21673
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21674
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21675
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21676
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21677
|
+
* the bus.
|
|
21678
|
+
*
|
|
21679
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21680
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21681
|
+
* makes assignment decisions itself.
|
|
21682
|
+
*/
|
|
21683
|
+
/**
|
|
21684
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21685
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21686
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21687
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21688
|
+
*/
|
|
21689
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21690
|
+
"not-attached",
|
|
21691
|
+
"battery-asleep",
|
|
21692
|
+
"not-watching",
|
|
21693
|
+
"already-bursting"
|
|
21694
|
+
]);
|
|
21516
21695
|
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({
|
|
21696
|
+
deviceId: number(),
|
|
21697
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21698
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21699
|
+
frames: number().int().positive().optional(),
|
|
21700
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21701
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21702
|
+
reason: string()
|
|
21703
|
+
}), object({
|
|
21704
|
+
started: boolean(),
|
|
21705
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21706
|
+
}), {
|
|
21707
|
+
auth: "admin",
|
|
21708
|
+
kind: "mutation"
|
|
21709
|
+
}), method(object({
|
|
21517
21710
|
handle: FrameHandleSchema,
|
|
21518
21711
|
bbox: NativeCropBboxSchema,
|
|
21519
21712
|
maxWidth: number().int().positive().optional(),
|
|
@@ -26982,7 +27175,7 @@ var NativeDetectionSchema = object({
|
|
|
26982
27175
|
/** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
|
|
26983
27176
|
confidence: number().min(0).max(1).optional()
|
|
26984
27177
|
});
|
|
26985
|
-
object({
|
|
27178
|
+
var NativeObjectDetectionStatusSchema = object({
|
|
26986
27179
|
/**
|
|
26987
27180
|
* Last observed instance per class. Missing entries mean the class
|
|
26988
27181
|
* is supported but nothing has been seen since the provider started.
|
|
@@ -26999,14 +27192,56 @@ object({
|
|
|
26999
27192
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
27000
27193
|
/**
|
|
27001
27194
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
27002
|
-
*
|
|
27003
|
-
*
|
|
27195
|
+
*
|
|
27196
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
27197
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
27198
|
+
* other detection choice is made. `geometry` on
|
|
27199
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
27200
|
+
* choice would buy this particular camera.
|
|
27004
27201
|
*/
|
|
27005
27202
|
enabled: boolean()
|
|
27006
|
-
})
|
|
27203
|
+
});
|
|
27204
|
+
/**
|
|
27205
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
27206
|
+
*
|
|
27207
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
27208
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
27209
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
27210
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
27211
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
27212
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
27213
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
27214
|
+
* something is in front of it, and its stream is already being pulled.
|
|
27215
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
27216
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
27217
|
+
* tracker as motion and no further.
|
|
27218
|
+
*
|
|
27219
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
27220
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
27221
|
+
* derived form is only as honest as `getOptions`).
|
|
27222
|
+
*/
|
|
27223
|
+
var NativeObjectGeometryEnum = _enum([
|
|
27224
|
+
"boxed",
|
|
27225
|
+
"while-streaming",
|
|
27226
|
+
"flag-only"
|
|
27227
|
+
]);
|
|
27228
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
27229
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
27230
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
27231
|
+
/** What a detection from this camera carries. */
|
|
27232
|
+
geometry: NativeObjectGeometryEnum
|
|
27233
|
+
});
|
|
27234
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
27235
|
+
NativeObjectDetectionStatusSchema.extend({
|
|
27007
27236
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
27008
27237
|
lastFetchedAt: number() });
|
|
27009
|
-
DeviceType.Camera, method(object({
|
|
27238
|
+
DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
|
|
27239
|
+
deviceId: number(),
|
|
27240
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
27241
|
+
}), _void(), {
|
|
27242
|
+
kind: "mutation",
|
|
27243
|
+
auth: "admin"
|
|
27244
|
+
}), method(object({
|
|
27010
27245
|
deviceId: number(),
|
|
27011
27246
|
enabled: boolean()
|
|
27012
27247
|
}), _void(), {
|
|
@@ -30805,7 +31040,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
30805
31040
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
30806
31041
|
totalObjects: number().int().nonnegative(),
|
|
30807
31042
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
30808
|
-
byClass: record(string(), number().int().nonnegative())
|
|
31043
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
31044
|
+
/**
|
|
31045
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
31046
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
31047
|
+
*
|
|
31048
|
+
* The operator's question about a scene has two halves and they answer
|
|
31049
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
31050
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
31051
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
31052
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
31053
|
+
*
|
|
31054
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
31055
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
31056
|
+
*
|
|
31057
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
31058
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
31059
|
+
* parked objects here" about a camera whose lot is full.
|
|
31060
|
+
*/
|
|
31061
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
31062
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
31063
|
+
* same absence rule. */
|
|
31064
|
+
transientObjects: number().int().nonnegative().optional()
|
|
30809
31065
|
});
|
|
30810
31066
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
30811
31067
|
zoneId: string(),
|
|
@@ -33744,12 +34000,24 @@ Object.freeze({
|
|
|
33744
34000
|
addonId: null,
|
|
33745
34001
|
access: "create"
|
|
33746
34002
|
},
|
|
34003
|
+
"nativeObjectDetection.getOptions": {
|
|
34004
|
+
capName: "native-object-detection",
|
|
34005
|
+
capScope: "device",
|
|
34006
|
+
addonId: null,
|
|
34007
|
+
access: "view"
|
|
34008
|
+
},
|
|
33747
34009
|
"nativeObjectDetection.setEnabled": {
|
|
33748
34010
|
capName: "native-object-detection",
|
|
33749
34011
|
capScope: "device",
|
|
33750
34012
|
addonId: null,
|
|
33751
34013
|
access: "create"
|
|
33752
34014
|
},
|
|
34015
|
+
"nativeObjectDetection.setSettings": {
|
|
34016
|
+
capName: "native-object-detection",
|
|
34017
|
+
capScope: "device",
|
|
34018
|
+
addonId: null,
|
|
34019
|
+
access: "create"
|
|
34020
|
+
},
|
|
33753
34021
|
"navigation.getFeatures": {
|
|
33754
34022
|
capName: "navigation",
|
|
33755
34023
|
capScope: "device",
|
|
@@ -34014,6 +34282,12 @@ Object.freeze({
|
|
|
34014
34282
|
addonId: null,
|
|
34015
34283
|
access: "view"
|
|
34016
34284
|
},
|
|
34285
|
+
"notificationRules.getClipRetentionAsks": {
|
|
34286
|
+
capName: "notification-rules",
|
|
34287
|
+
capScope: "system",
|
|
34288
|
+
addonId: null,
|
|
34289
|
+
access: "view"
|
|
34290
|
+
},
|
|
34017
34291
|
"notificationRules.getConditionCatalog": {
|
|
34018
34292
|
capName: "notification-rules",
|
|
34019
34293
|
capScope: "system",
|
|
@@ -34524,6 +34798,12 @@ Object.freeze({
|
|
|
34524
34798
|
addonId: null,
|
|
34525
34799
|
access: "create"
|
|
34526
34800
|
},
|
|
34801
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
34802
|
+
capName: "pipeline-analytics",
|
|
34803
|
+
capScope: "device",
|
|
34804
|
+
addonId: null,
|
|
34805
|
+
access: "view"
|
|
34806
|
+
},
|
|
34527
34807
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
34528
34808
|
capName: "pipeline-analytics",
|
|
34529
34809
|
capScope: "device",
|
|
@@ -35196,6 +35476,12 @@ Object.freeze({
|
|
|
35196
35476
|
addonId: null,
|
|
35197
35477
|
access: "create"
|
|
35198
35478
|
},
|
|
35479
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
35480
|
+
capName: "pipeline-runner",
|
|
35481
|
+
capScope: "system",
|
|
35482
|
+
addonId: null,
|
|
35483
|
+
access: "create"
|
|
35484
|
+
},
|
|
35199
35485
|
"pipelineRunner.runDetailSubtree": {
|
|
35200
35486
|
capName: "pipeline-runner",
|
|
35201
35487
|
capScope: "system",
|
|
@@ -37976,11 +38262,21 @@ Object.freeze({
|
|
|
37976
38262
|
form: "single",
|
|
37977
38263
|
optional: false
|
|
37978
38264
|
}],
|
|
38265
|
+
"nativeObjectDetection.getOptions": [{
|
|
38266
|
+
name: "deviceId",
|
|
38267
|
+
form: "single",
|
|
38268
|
+
optional: false
|
|
38269
|
+
}],
|
|
37979
38270
|
"nativeObjectDetection.setEnabled": [{
|
|
37980
38271
|
name: "deviceId",
|
|
37981
38272
|
form: "single",
|
|
37982
38273
|
optional: false
|
|
37983
38274
|
}],
|
|
38275
|
+
"nativeObjectDetection.setSettings": [{
|
|
38276
|
+
name: "deviceId",
|
|
38277
|
+
form: "single",
|
|
38278
|
+
optional: false
|
|
38279
|
+
}],
|
|
37984
38280
|
"navigation.getFeatures": [{
|
|
37985
38281
|
name: "deviceId",
|
|
37986
38282
|
form: "single",
|
|
@@ -38330,6 +38626,11 @@ Object.freeze({
|
|
|
38330
38626
|
form: "single",
|
|
38331
38627
|
optional: false
|
|
38332
38628
|
}],
|
|
38629
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
38630
|
+
name: "deviceId",
|
|
38631
|
+
form: "single",
|
|
38632
|
+
optional: false
|
|
38633
|
+
}],
|
|
38333
38634
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
38334
38635
|
name: "deviceId",
|
|
38335
38636
|
form: "single",
|
|
@@ -38520,6 +38821,11 @@ Object.freeze({
|
|
|
38520
38821
|
form: "single",
|
|
38521
38822
|
optional: false
|
|
38522
38823
|
}],
|
|
38824
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
38825
|
+
name: "deviceId",
|
|
38826
|
+
form: "single",
|
|
38827
|
+
optional: false
|
|
38828
|
+
}],
|
|
38523
38829
|
"pipelineRunner.runDetailSubtree": [{
|
|
38524
38830
|
name: "deviceId",
|
|
38525
38831
|
form: "single",
|
package/dist/index.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).
|
|
@@ -17960,6 +17960,48 @@ var NcAlarmConfigSchema = object({
|
|
|
17960
17960
|
settings: NcAlarmSettingsSchema,
|
|
17961
17961
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
17962
17962
|
});
|
|
17963
|
+
/**
|
|
17964
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
17965
|
+
*
|
|
17966
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
17967
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
17968
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
17969
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
17970
|
+
* a different thing from never having been told, and only the envelope
|
|
17971
|
+
* (`rulesLoaded`) can tell those apart.
|
|
17972
|
+
*/
|
|
17973
|
+
var NcClipRetentionAskSchema = object({
|
|
17974
|
+
/**
|
|
17975
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
17976
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
17977
|
+
* asking everywhere.
|
|
17978
|
+
*/
|
|
17979
|
+
deviceId: number().int().nonnegative().optional(),
|
|
17980
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
17981
|
+
* needs nothing produces no ask at all. */
|
|
17982
|
+
seconds: number().min(0).max(60),
|
|
17983
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
17984
|
+
* assigned, which is what the cut defaults to. */
|
|
17985
|
+
profile: CamProfileSchema.optional(),
|
|
17986
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
17987
|
+
ruleId: string(),
|
|
17988
|
+
ruleName: string(),
|
|
17989
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
17990
|
+
reason: _enum(["window", "occupancy"])
|
|
17991
|
+
});
|
|
17992
|
+
/**
|
|
17993
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
17994
|
+
*
|
|
17995
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
17996
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
17997
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
17998
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
17999
|
+
* footage this mechanism exists to keep.
|
|
18000
|
+
*/
|
|
18001
|
+
var NcClipRetentionPlanSchema = object({
|
|
18002
|
+
rulesLoaded: boolean(),
|
|
18003
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18004
|
+
});
|
|
17963
18005
|
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 }), {
|
|
17964
18006
|
kind: "mutation",
|
|
17965
18007
|
auth: "admin",
|
|
@@ -17980,7 +18022,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
17980
18022
|
}), object({ success: literal(true) }), {
|
|
17981
18023
|
kind: "mutation",
|
|
17982
18024
|
auth: "admin"
|
|
17983
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18025
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
17984
18026
|
deviceId: number().int(),
|
|
17985
18027
|
muted: boolean()
|
|
17986
18028
|
}), object({ success: literal(true) }), {
|
|
@@ -19125,13 +19167,26 @@ var TrackAudioLabelSchema = object({
|
|
|
19125
19167
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
19126
19168
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
19127
19169
|
*
|
|
19170
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
19171
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
19172
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
19173
|
+
* detector.
|
|
19174
|
+
*
|
|
19175
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
19176
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
19177
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
19178
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
19179
|
+
* could not name.
|
|
19180
|
+
*
|
|
19128
19181
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
19129
19182
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
19130
|
-
* with `isSpatialTrack`, which allow-lists
|
|
19131
|
-
* check silently readmits every source added after it was
|
|
19183
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
19184
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
19185
|
+
* written.
|
|
19132
19186
|
*/
|
|
19133
19187
|
var TrackSourceSchema = _enum([
|
|
19134
19188
|
"pipeline",
|
|
19189
|
+
"onboard",
|
|
19135
19190
|
"sensor",
|
|
19136
19191
|
"audio"
|
|
19137
19192
|
]);
|
|
@@ -20514,6 +20569,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20514
20569
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20515
20570
|
framesMatched: number().int()
|
|
20516
20571
|
})).readonly() });
|
|
20572
|
+
/**
|
|
20573
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20574
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20575
|
+
* is an alias of this, not a second list.
|
|
20576
|
+
*/
|
|
20577
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20578
|
+
"motion",
|
|
20579
|
+
"audio-dbfs",
|
|
20580
|
+
"battery",
|
|
20581
|
+
"occupancy"
|
|
20582
|
+
]);
|
|
20583
|
+
/**
|
|
20584
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20585
|
+
*
|
|
20586
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20587
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20588
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20589
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20590
|
+
*/
|
|
20591
|
+
var LtsBucketSchema = object({
|
|
20592
|
+
scope: string(),
|
|
20593
|
+
bucketStart: number().int(),
|
|
20594
|
+
samples: number().int().nonnegative(),
|
|
20595
|
+
sum: number(),
|
|
20596
|
+
min: number(),
|
|
20597
|
+
max: number()
|
|
20598
|
+
});
|
|
20517
20599
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20518
20600
|
deviceId: number(),
|
|
20519
20601
|
trackId: string()
|
|
@@ -20560,6 +20642,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20560
20642
|
kinds: array(string()).optional(),
|
|
20561
20643
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20562
20644
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20645
|
+
deviceId: number(),
|
|
20646
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20647
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20648
|
+
scope: string().optional(),
|
|
20649
|
+
from: number(),
|
|
20650
|
+
to: number(),
|
|
20651
|
+
limit: number().int().positive().optional()
|
|
20652
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20563
20653
|
deviceId: number(),
|
|
20564
20654
|
since: number(),
|
|
20565
20655
|
until: number(),
|
|
@@ -21178,6 +21268,40 @@ var MotionSourceEnum = _enum([
|
|
|
21178
21268
|
*/
|
|
21179
21269
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21180
21270
|
/**
|
|
21271
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
21272
|
+
*
|
|
21273
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
21274
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
21275
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
21276
|
+
* track, the overlay and the debug row.
|
|
21277
|
+
*
|
|
21278
|
+
* ## Why one, and why it is still an array
|
|
21279
|
+
*
|
|
21280
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
21281
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
21282
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
21283
|
+
* detectors disagree about the same box by construction — which is the
|
|
21284
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
21285
|
+
*
|
|
21286
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
21287
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
21288
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
21289
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
21290
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
21291
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
21292
|
+
* rely on.
|
|
21293
|
+
*
|
|
21294
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
21295
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
21296
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
21297
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
21298
|
+
* suite caught it.
|
|
21299
|
+
*
|
|
21300
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
21301
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
21302
|
+
*/
|
|
21303
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
21304
|
+
/**
|
|
21181
21305
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21182
21306
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21183
21307
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21328,6 +21452,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21328
21452
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21329
21453
|
*/
|
|
21330
21454
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21455
|
+
/**
|
|
21456
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21457
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21458
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21459
|
+
*
|
|
21460
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21461
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21462
|
+
* here. Its boxes reach post-analysis on the same
|
|
21463
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21464
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21465
|
+
* subtree (face / plate / embedding).
|
|
21466
|
+
*
|
|
21467
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21468
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21469
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21470
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21471
|
+
*
|
|
21472
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21473
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21474
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21475
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21476
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21477
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21478
|
+
*
|
|
21479
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21480
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21481
|
+
* default.
|
|
21482
|
+
*/
|
|
21483
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21331
21484
|
pipelineEnabled: boolean().default(true),
|
|
21332
21485
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21333
21486
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21509,7 +21662,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21509
21662
|
queueDepth: number(),
|
|
21510
21663
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21511
21664
|
});
|
|
21665
|
+
/**
|
|
21666
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21667
|
+
*
|
|
21668
|
+
* One instance per node. Receives camera assignments from
|
|
21669
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21670
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21671
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21672
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21673
|
+
* the bus.
|
|
21674
|
+
*
|
|
21675
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21676
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21677
|
+
* makes assignment decisions itself.
|
|
21678
|
+
*/
|
|
21679
|
+
/**
|
|
21680
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21681
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21682
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21683
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21684
|
+
*/
|
|
21685
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21686
|
+
"not-attached",
|
|
21687
|
+
"battery-asleep",
|
|
21688
|
+
"not-watching",
|
|
21689
|
+
"already-bursting"
|
|
21690
|
+
]);
|
|
21512
21691
|
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({
|
|
21692
|
+
deviceId: number(),
|
|
21693
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21694
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21695
|
+
frames: number().int().positive().optional(),
|
|
21696
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21697
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21698
|
+
reason: string()
|
|
21699
|
+
}), object({
|
|
21700
|
+
started: boolean(),
|
|
21701
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21702
|
+
}), {
|
|
21703
|
+
auth: "admin",
|
|
21704
|
+
kind: "mutation"
|
|
21705
|
+
}), method(object({
|
|
21513
21706
|
handle: FrameHandleSchema,
|
|
21514
21707
|
bbox: NativeCropBboxSchema,
|
|
21515
21708
|
maxWidth: number().int().positive().optional(),
|
|
@@ -26978,7 +27171,7 @@ var NativeDetectionSchema = object({
|
|
|
26978
27171
|
/** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
|
|
26979
27172
|
confidence: number().min(0).max(1).optional()
|
|
26980
27173
|
});
|
|
26981
|
-
object({
|
|
27174
|
+
var NativeObjectDetectionStatusSchema = object({
|
|
26982
27175
|
/**
|
|
26983
27176
|
* Last observed instance per class. Missing entries mean the class
|
|
26984
27177
|
* is supported but nothing has been seen since the provider started.
|
|
@@ -26995,14 +27188,56 @@ object({
|
|
|
26995
27188
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
26996
27189
|
/**
|
|
26997
27190
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
26998
|
-
*
|
|
26999
|
-
*
|
|
27191
|
+
*
|
|
27192
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
27193
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
27194
|
+
* other detection choice is made. `geometry` on
|
|
27195
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
27196
|
+
* choice would buy this particular camera.
|
|
27000
27197
|
*/
|
|
27001
27198
|
enabled: boolean()
|
|
27002
|
-
})
|
|
27199
|
+
});
|
|
27200
|
+
/**
|
|
27201
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
27202
|
+
*
|
|
27203
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
27204
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
27205
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
27206
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
27207
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
27208
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
27209
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
27210
|
+
* something is in front of it, and its stream is already being pulled.
|
|
27211
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
27212
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
27213
|
+
* tracker as motion and no further.
|
|
27214
|
+
*
|
|
27215
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
27216
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
27217
|
+
* derived form is only as honest as `getOptions`).
|
|
27218
|
+
*/
|
|
27219
|
+
var NativeObjectGeometryEnum = _enum([
|
|
27220
|
+
"boxed",
|
|
27221
|
+
"while-streaming",
|
|
27222
|
+
"flag-only"
|
|
27223
|
+
]);
|
|
27224
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
27225
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
27226
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
27227
|
+
/** What a detection from this camera carries. */
|
|
27228
|
+
geometry: NativeObjectGeometryEnum
|
|
27229
|
+
});
|
|
27230
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
27231
|
+
NativeObjectDetectionStatusSchema.extend({
|
|
27003
27232
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
27004
27233
|
lastFetchedAt: number() });
|
|
27005
|
-
DeviceType.Camera, method(object({
|
|
27234
|
+
DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
|
|
27235
|
+
deviceId: number(),
|
|
27236
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
27237
|
+
}), _void(), {
|
|
27238
|
+
kind: "mutation",
|
|
27239
|
+
auth: "admin"
|
|
27240
|
+
}), method(object({
|
|
27006
27241
|
deviceId: number(),
|
|
27007
27242
|
enabled: boolean()
|
|
27008
27243
|
}), _void(), {
|
|
@@ -30801,7 +31036,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
30801
31036
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
30802
31037
|
totalObjects: number().int().nonnegative(),
|
|
30803
31038
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
30804
|
-
byClass: record(string(), number().int().nonnegative())
|
|
31039
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
31040
|
+
/**
|
|
31041
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
31042
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
31043
|
+
*
|
|
31044
|
+
* The operator's question about a scene has two halves and they answer
|
|
31045
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
31046
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
31047
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
31048
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
31049
|
+
*
|
|
31050
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
31051
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
31052
|
+
*
|
|
31053
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
31054
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
31055
|
+
* parked objects here" about a camera whose lot is full.
|
|
31056
|
+
*/
|
|
31057
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
31058
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
31059
|
+
* same absence rule. */
|
|
31060
|
+
transientObjects: number().int().nonnegative().optional()
|
|
30805
31061
|
});
|
|
30806
31062
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
30807
31063
|
zoneId: string(),
|
|
@@ -33740,12 +33996,24 @@ Object.freeze({
|
|
|
33740
33996
|
addonId: null,
|
|
33741
33997
|
access: "create"
|
|
33742
33998
|
},
|
|
33999
|
+
"nativeObjectDetection.getOptions": {
|
|
34000
|
+
capName: "native-object-detection",
|
|
34001
|
+
capScope: "device",
|
|
34002
|
+
addonId: null,
|
|
34003
|
+
access: "view"
|
|
34004
|
+
},
|
|
33743
34005
|
"nativeObjectDetection.setEnabled": {
|
|
33744
34006
|
capName: "native-object-detection",
|
|
33745
34007
|
capScope: "device",
|
|
33746
34008
|
addonId: null,
|
|
33747
34009
|
access: "create"
|
|
33748
34010
|
},
|
|
34011
|
+
"nativeObjectDetection.setSettings": {
|
|
34012
|
+
capName: "native-object-detection",
|
|
34013
|
+
capScope: "device",
|
|
34014
|
+
addonId: null,
|
|
34015
|
+
access: "create"
|
|
34016
|
+
},
|
|
33749
34017
|
"navigation.getFeatures": {
|
|
33750
34018
|
capName: "navigation",
|
|
33751
34019
|
capScope: "device",
|
|
@@ -34010,6 +34278,12 @@ Object.freeze({
|
|
|
34010
34278
|
addonId: null,
|
|
34011
34279
|
access: "view"
|
|
34012
34280
|
},
|
|
34281
|
+
"notificationRules.getClipRetentionAsks": {
|
|
34282
|
+
capName: "notification-rules",
|
|
34283
|
+
capScope: "system",
|
|
34284
|
+
addonId: null,
|
|
34285
|
+
access: "view"
|
|
34286
|
+
},
|
|
34013
34287
|
"notificationRules.getConditionCatalog": {
|
|
34014
34288
|
capName: "notification-rules",
|
|
34015
34289
|
capScope: "system",
|
|
@@ -34520,6 +34794,12 @@ Object.freeze({
|
|
|
34520
34794
|
addonId: null,
|
|
34521
34795
|
access: "create"
|
|
34522
34796
|
},
|
|
34797
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
34798
|
+
capName: "pipeline-analytics",
|
|
34799
|
+
capScope: "device",
|
|
34800
|
+
addonId: null,
|
|
34801
|
+
access: "view"
|
|
34802
|
+
},
|
|
34523
34803
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
34524
34804
|
capName: "pipeline-analytics",
|
|
34525
34805
|
capScope: "device",
|
|
@@ -35192,6 +35472,12 @@ Object.freeze({
|
|
|
35192
35472
|
addonId: null,
|
|
35193
35473
|
access: "create"
|
|
35194
35474
|
},
|
|
35475
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
35476
|
+
capName: "pipeline-runner",
|
|
35477
|
+
capScope: "system",
|
|
35478
|
+
addonId: null,
|
|
35479
|
+
access: "create"
|
|
35480
|
+
},
|
|
35195
35481
|
"pipelineRunner.runDetailSubtree": {
|
|
35196
35482
|
capName: "pipeline-runner",
|
|
35197
35483
|
capScope: "system",
|
|
@@ -37972,11 +38258,21 @@ Object.freeze({
|
|
|
37972
38258
|
form: "single",
|
|
37973
38259
|
optional: false
|
|
37974
38260
|
}],
|
|
38261
|
+
"nativeObjectDetection.getOptions": [{
|
|
38262
|
+
name: "deviceId",
|
|
38263
|
+
form: "single",
|
|
38264
|
+
optional: false
|
|
38265
|
+
}],
|
|
37975
38266
|
"nativeObjectDetection.setEnabled": [{
|
|
37976
38267
|
name: "deviceId",
|
|
37977
38268
|
form: "single",
|
|
37978
38269
|
optional: false
|
|
37979
38270
|
}],
|
|
38271
|
+
"nativeObjectDetection.setSettings": [{
|
|
38272
|
+
name: "deviceId",
|
|
38273
|
+
form: "single",
|
|
38274
|
+
optional: false
|
|
38275
|
+
}],
|
|
37980
38276
|
"navigation.getFeatures": [{
|
|
37981
38277
|
name: "deviceId",
|
|
37982
38278
|
form: "single",
|
|
@@ -38326,6 +38622,11 @@ Object.freeze({
|
|
|
38326
38622
|
form: "single",
|
|
38327
38623
|
optional: false
|
|
38328
38624
|
}],
|
|
38625
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
38626
|
+
name: "deviceId",
|
|
38627
|
+
form: "single",
|
|
38628
|
+
optional: false
|
|
38629
|
+
}],
|
|
38329
38630
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
38330
38631
|
name: "deviceId",
|
|
38331
38632
|
form: "single",
|
|
@@ -38516,6 +38817,11 @@ Object.freeze({
|
|
|
38516
38817
|
form: "single",
|
|
38517
38818
|
optional: false
|
|
38518
38819
|
}],
|
|
38820
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
38821
|
+
name: "deviceId",
|
|
38822
|
+
form: "single",
|
|
38823
|
+
optional: false
|
|
38824
|
+
}],
|
|
38519
38825
|
"pipelineRunner.runDetailSubtree": [{
|
|
38520
38826
|
name: "deviceId",
|
|
38521
38827
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-decoder-nodeav",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.104",
|
|
4
4
|
"description": "Standalone in-process node-av decoder addon for CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"dev": "vite build --watch",
|
|
69
69
|
"typecheck": "tsc --noEmit",
|
|
70
70
|
"test": "vitest run",
|
|
71
|
-
"publish": "npm publish --access public"
|
|
71
|
+
"publish:npm": "npm publish --access public"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@camstack/types": "*"
|