@camstack/addon-provider-dreame 0.2.103 → 0.2.105
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
|
@@ -58033,7 +58033,7 @@ var ZodIssueCode = {
|
|
|
58033
58033
|
var ZodFirstPartyTypeKind;
|
|
58034
58034
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
58035
58035
|
//#endregion
|
|
58036
|
-
//#region ../types/dist/sleep-
|
|
58036
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
58037
58037
|
/**
|
|
58038
58038
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
58039
58039
|
* window to float samples (D455).
|
|
@@ -64235,6 +64235,21 @@ var streamSignalsCapability = {
|
|
|
64235
64235
|
mode: "singleton",
|
|
64236
64236
|
deviceTypes: Object.values(DeviceType),
|
|
64237
64237
|
runtimeState: StreamSignalsStatusSchema,
|
|
64238
|
+
/**
|
|
64239
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
64240
|
+
*
|
|
64241
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
64242
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
64243
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
64244
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
64245
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
64246
|
+
* class the camera really detected stayed missing for the life of the row
|
|
64247
|
+
* because the fix could not reach it.
|
|
64248
|
+
*
|
|
64249
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
64250
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
64251
|
+
*/
|
|
64252
|
+
durability: "session",
|
|
64238
64253
|
methods: {
|
|
64239
64254
|
/**
|
|
64240
64255
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -70866,6 +70881,48 @@ var NcAlarmConfigSchema = object({
|
|
|
70866
70881
|
settings: NcAlarmSettingsSchema,
|
|
70867
70882
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
70868
70883
|
});
|
|
70884
|
+
/**
|
|
70885
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
70886
|
+
*
|
|
70887
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
70888
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
70889
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
70890
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
70891
|
+
* a different thing from never having been told, and only the envelope
|
|
70892
|
+
* (`rulesLoaded`) can tell those apart.
|
|
70893
|
+
*/
|
|
70894
|
+
var NcClipRetentionAskSchema = object({
|
|
70895
|
+
/**
|
|
70896
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
70897
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
70898
|
+
* asking everywhere.
|
|
70899
|
+
*/
|
|
70900
|
+
deviceId: number().int().nonnegative().optional(),
|
|
70901
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
70902
|
+
* needs nothing produces no ask at all. */
|
|
70903
|
+
seconds: number().min(0).max(60),
|
|
70904
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
70905
|
+
* assigned, which is what the cut defaults to. */
|
|
70906
|
+
profile: CamProfileSchema.optional(),
|
|
70907
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
70908
|
+
ruleId: string(),
|
|
70909
|
+
ruleName: string(),
|
|
70910
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
70911
|
+
reason: _enum(["window", "occupancy"])
|
|
70912
|
+
});
|
|
70913
|
+
/**
|
|
70914
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
70915
|
+
*
|
|
70916
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
70917
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
70918
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
70919
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
70920
|
+
* footage this mechanism exists to keep.
|
|
70921
|
+
*/
|
|
70922
|
+
var NcClipRetentionPlanSchema = object({
|
|
70923
|
+
rulesLoaded: boolean(),
|
|
70924
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
70925
|
+
});
|
|
70869
70926
|
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 }), {
|
|
70870
70927
|
kind: "mutation",
|
|
70871
70928
|
auth: "admin",
|
|
@@ -70886,7 +70943,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
70886
70943
|
}), object({ success: literal(true) }), {
|
|
70887
70944
|
kind: "mutation",
|
|
70888
70945
|
auth: "admin"
|
|
70889
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
70946
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
70890
70947
|
deviceId: number().int(),
|
|
70891
70948
|
muted: boolean()
|
|
70892
70949
|
}), object({ success: literal(true) }), {
|
|
@@ -72071,13 +72128,26 @@ var TrackAudioLabelSchema = object({
|
|
|
72071
72128
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
72072
72129
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
72073
72130
|
*
|
|
72131
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
72132
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
72133
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
72134
|
+
* detector.
|
|
72135
|
+
*
|
|
72136
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
72137
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
72138
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
72139
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
72140
|
+
* could not name.
|
|
72141
|
+
*
|
|
72074
72142
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
72075
72143
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
72076
|
-
* with `isSpatialTrack`, which allow-lists
|
|
72077
|
-
* check silently readmits every source added after it was
|
|
72144
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
72145
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
72146
|
+
* written.
|
|
72078
72147
|
*/
|
|
72079
72148
|
var TrackSourceSchema = _enum([
|
|
72080
72149
|
"pipeline",
|
|
72150
|
+
"onboard",
|
|
72081
72151
|
"sensor",
|
|
72082
72152
|
"audio"
|
|
72083
72153
|
]);
|
|
@@ -73460,6 +73530,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
73460
73530
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
73461
73531
|
framesMatched: number().int()
|
|
73462
73532
|
})).readonly() });
|
|
73533
|
+
/**
|
|
73534
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
73535
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
73536
|
+
* is an alias of this, not a second list.
|
|
73537
|
+
*/
|
|
73538
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
73539
|
+
"motion",
|
|
73540
|
+
"audio-dbfs",
|
|
73541
|
+
"battery",
|
|
73542
|
+
"occupancy"
|
|
73543
|
+
]);
|
|
73544
|
+
/**
|
|
73545
|
+
* One closed 5-minute bucket of a long-term series.
|
|
73546
|
+
*
|
|
73547
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
73548
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
73549
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
73550
|
+
* different claim from zero and the reason this is a sparse series.
|
|
73551
|
+
*/
|
|
73552
|
+
var LtsBucketSchema = object({
|
|
73553
|
+
scope: string(),
|
|
73554
|
+
bucketStart: number().int(),
|
|
73555
|
+
samples: number().int().nonnegative(),
|
|
73556
|
+
sum: number(),
|
|
73557
|
+
min: number(),
|
|
73558
|
+
max: number()
|
|
73559
|
+
});
|
|
73463
73560
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
73464
73561
|
deviceId: number(),
|
|
73465
73562
|
trackId: string()
|
|
@@ -73506,6 +73603,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
73506
73603
|
kinds: array(string()).optional(),
|
|
73507
73604
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
73508
73605
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
73606
|
+
deviceId: number(),
|
|
73607
|
+
series: AnalyticsLtsSeriesSchema,
|
|
73608
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
73609
|
+
scope: string().optional(),
|
|
73610
|
+
from: number(),
|
|
73611
|
+
to: number(),
|
|
73612
|
+
limit: number().int().positive().optional()
|
|
73613
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
73509
73614
|
deviceId: number(),
|
|
73510
73615
|
since: number(),
|
|
73511
73616
|
until: number(),
|
|
@@ -74124,6 +74229,40 @@ var MotionSourceEnum = _enum([
|
|
|
74124
74229
|
*/
|
|
74125
74230
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
74126
74231
|
/**
|
|
74232
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
74233
|
+
*
|
|
74234
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
74235
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
74236
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
74237
|
+
* track, the overlay and the debug row.
|
|
74238
|
+
*
|
|
74239
|
+
* ## Why one, and why it is still an array
|
|
74240
|
+
*
|
|
74241
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
74242
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
74243
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
74244
|
+
* detectors disagree about the same box by construction — which is the
|
|
74245
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
74246
|
+
*
|
|
74247
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
74248
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
74249
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
74250
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
74251
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
74252
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
74253
|
+
* rely on.
|
|
74254
|
+
*
|
|
74255
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
74256
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
74257
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
74258
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
74259
|
+
* suite caught it.
|
|
74260
|
+
*
|
|
74261
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
74262
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
74263
|
+
*/
|
|
74264
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
74265
|
+
/**
|
|
74127
74266
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
74128
74267
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
74129
74268
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -74274,6 +74413,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
74274
74413
|
* events; the orchestrator forwards to `reportMotion`.
|
|
74275
74414
|
*/
|
|
74276
74415
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
74416
|
+
/**
|
|
74417
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
74418
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
74419
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
74420
|
+
*
|
|
74421
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
74422
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
74423
|
+
* here. Its boxes reach post-analysis on the same
|
|
74424
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
74425
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
74426
|
+
* subtree (face / plate / embedding).
|
|
74427
|
+
*
|
|
74428
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
74429
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
74430
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
74431
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
74432
|
+
*
|
|
74433
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
74434
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
74435
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
74436
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
74437
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
74438
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
74439
|
+
*
|
|
74440
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
74441
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
74442
|
+
* default.
|
|
74443
|
+
*/
|
|
74444
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
74277
74445
|
pipelineEnabled: boolean().default(true),
|
|
74278
74446
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
74279
74447
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -74455,7 +74623,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
74455
74623
|
queueDepth: number(),
|
|
74456
74624
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
74457
74625
|
});
|
|
74626
|
+
/**
|
|
74627
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
74628
|
+
*
|
|
74629
|
+
* One instance per node. Receives camera assignments from
|
|
74630
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
74631
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
74632
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
74633
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
74634
|
+
* the bus.
|
|
74635
|
+
*
|
|
74636
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
74637
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
74638
|
+
* makes assignment decisions itself.
|
|
74639
|
+
*/
|
|
74640
|
+
/**
|
|
74641
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
74642
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
74643
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
74644
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
74645
|
+
*/
|
|
74646
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
74647
|
+
"not-attached",
|
|
74648
|
+
"battery-asleep",
|
|
74649
|
+
"not-watching",
|
|
74650
|
+
"already-bursting"
|
|
74651
|
+
]);
|
|
74458
74652
|
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({
|
|
74653
|
+
deviceId: number(),
|
|
74654
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
74655
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
74656
|
+
frames: number().int().positive().optional(),
|
|
74657
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
74658
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
74659
|
+
reason: string()
|
|
74660
|
+
}), object({
|
|
74661
|
+
started: boolean(),
|
|
74662
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
74663
|
+
}), {
|
|
74664
|
+
auth: "admin",
|
|
74665
|
+
kind: "mutation"
|
|
74666
|
+
}), method(object({
|
|
74459
74667
|
handle: FrameHandleSchema,
|
|
74460
74668
|
bbox: NativeCropBboxSchema,
|
|
74461
74669
|
maxWidth: number().int().positive().optional(),
|
|
@@ -81310,11 +81518,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
81310
81518
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
81311
81519
|
/**
|
|
81312
81520
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
81313
|
-
*
|
|
81314
|
-
*
|
|
81521
|
+
*
|
|
81522
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
81523
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
81524
|
+
* other detection choice is made. `geometry` on
|
|
81525
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
81526
|
+
* choice would buy this particular camera.
|
|
81315
81527
|
*/
|
|
81316
81528
|
enabled: boolean()
|
|
81317
81529
|
});
|
|
81530
|
+
/**
|
|
81531
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
81532
|
+
*
|
|
81533
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
81534
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
81535
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
81536
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
81537
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
81538
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
81539
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
81540
|
+
* something is in front of it, and its stream is already being pulled.
|
|
81541
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
81542
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
81543
|
+
* tracker as motion and no further.
|
|
81544
|
+
*
|
|
81545
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
81546
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
81547
|
+
* derived form is only as honest as `getOptions`).
|
|
81548
|
+
*/
|
|
81549
|
+
var NativeObjectGeometryEnum = _enum([
|
|
81550
|
+
"boxed",
|
|
81551
|
+
"while-streaming",
|
|
81552
|
+
"flag-only"
|
|
81553
|
+
]);
|
|
81554
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
81555
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
81556
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
81557
|
+
/** What a detection from this camera carries. */
|
|
81558
|
+
geometry: NativeObjectGeometryEnum
|
|
81559
|
+
});
|
|
81560
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
81318
81561
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
81319
81562
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
81320
81563
|
lastFetchedAt: number() });
|
|
@@ -81324,13 +81567,23 @@ var nativeObjectDetectionCapability = {
|
|
|
81324
81567
|
deviceNative: true,
|
|
81325
81568
|
mode: "singleton",
|
|
81326
81569
|
deviceTypes: [DeviceType.Camera],
|
|
81327
|
-
methods: {
|
|
81328
|
-
deviceId: number(),
|
|
81329
|
-
|
|
81330
|
-
|
|
81331
|
-
|
|
81332
|
-
|
|
81333
|
-
|
|
81570
|
+
methods: {
|
|
81571
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
81572
|
+
setSettings: method(object({
|
|
81573
|
+
deviceId: number(),
|
|
81574
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
81575
|
+
}), _void(), {
|
|
81576
|
+
kind: "mutation",
|
|
81577
|
+
auth: "admin"
|
|
81578
|
+
}),
|
|
81579
|
+
setEnabled: method(object({
|
|
81580
|
+
deviceId: number(),
|
|
81581
|
+
enabled: boolean()
|
|
81582
|
+
}), _void(), {
|
|
81583
|
+
kind: "mutation",
|
|
81584
|
+
auth: "admin"
|
|
81585
|
+
})
|
|
81586
|
+
},
|
|
81334
81587
|
events: { onDetected: { data: object({
|
|
81335
81588
|
deviceId: number(),
|
|
81336
81589
|
detection: NativeDetectionSchema
|
|
@@ -86326,7 +86579,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
86326
86579
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
86327
86580
|
totalObjects: number().int().nonnegative(),
|
|
86328
86581
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
86329
|
-
byClass: record(string(), number().int().nonnegative())
|
|
86582
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
86583
|
+
/**
|
|
86584
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
86585
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
86586
|
+
*
|
|
86587
|
+
* The operator's question about a scene has two halves and they answer
|
|
86588
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
86589
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
86590
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
86591
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
86592
|
+
*
|
|
86593
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
86594
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
86595
|
+
*
|
|
86596
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
86597
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
86598
|
+
* parked objects here" about a camera whose lot is full.
|
|
86599
|
+
*/
|
|
86600
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
86601
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
86602
|
+
* same absence rule. */
|
|
86603
|
+
transientObjects: number().int().nonnegative().optional()
|
|
86330
86604
|
});
|
|
86331
86605
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
86332
86606
|
zoneId: string(),
|
|
@@ -86449,6 +86723,23 @@ var HistoryPointSchema = object({
|
|
|
86449
86723
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
86450
86724
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
86451
86725
|
* combinatorial coverage the operator UI requested.
|
|
86726
|
+
*
|
|
86727
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
86728
|
+
*
|
|
86729
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
86730
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
86731
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
86732
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
86733
|
+
* horizon rather than to answer a question.
|
|
86734
|
+
*
|
|
86735
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
86736
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
86737
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
86738
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
86739
|
+
* function the writer uses, so the two cannot drift.
|
|
86740
|
+
*
|
|
86741
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
86742
|
+
* it. Do not add a fourth caller.
|
|
86452
86743
|
*/
|
|
86453
86744
|
var zoneAnalyticsCapability = {
|
|
86454
86745
|
name: "zone-analytics",
|
|
@@ -90848,12 +91139,24 @@ Object.freeze({
|
|
|
90848
91139
|
addonId: null,
|
|
90849
91140
|
access: "create"
|
|
90850
91141
|
},
|
|
91142
|
+
"nativeObjectDetection.getOptions": {
|
|
91143
|
+
capName: "native-object-detection",
|
|
91144
|
+
capScope: "device",
|
|
91145
|
+
addonId: null,
|
|
91146
|
+
access: "view"
|
|
91147
|
+
},
|
|
90851
91148
|
"nativeObjectDetection.setEnabled": {
|
|
90852
91149
|
capName: "native-object-detection",
|
|
90853
91150
|
capScope: "device",
|
|
90854
91151
|
addonId: null,
|
|
90855
91152
|
access: "create"
|
|
90856
91153
|
},
|
|
91154
|
+
"nativeObjectDetection.setSettings": {
|
|
91155
|
+
capName: "native-object-detection",
|
|
91156
|
+
capScope: "device",
|
|
91157
|
+
addonId: null,
|
|
91158
|
+
access: "create"
|
|
91159
|
+
},
|
|
90857
91160
|
"navigation.getFeatures": {
|
|
90858
91161
|
capName: "navigation",
|
|
90859
91162
|
capScope: "device",
|
|
@@ -91118,6 +91421,12 @@ Object.freeze({
|
|
|
91118
91421
|
addonId: null,
|
|
91119
91422
|
access: "view"
|
|
91120
91423
|
},
|
|
91424
|
+
"notificationRules.getClipRetentionAsks": {
|
|
91425
|
+
capName: "notification-rules",
|
|
91426
|
+
capScope: "system",
|
|
91427
|
+
addonId: null,
|
|
91428
|
+
access: "view"
|
|
91429
|
+
},
|
|
91121
91430
|
"notificationRules.getConditionCatalog": {
|
|
91122
91431
|
capName: "notification-rules",
|
|
91123
91432
|
capScope: "system",
|
|
@@ -91628,6 +91937,12 @@ Object.freeze({
|
|
|
91628
91937
|
addonId: null,
|
|
91629
91938
|
access: "create"
|
|
91630
91939
|
},
|
|
91940
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
91941
|
+
capName: "pipeline-analytics",
|
|
91942
|
+
capScope: "device",
|
|
91943
|
+
addonId: null,
|
|
91944
|
+
access: "view"
|
|
91945
|
+
},
|
|
91631
91946
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
91632
91947
|
capName: "pipeline-analytics",
|
|
91633
91948
|
capScope: "device",
|
|
@@ -92300,6 +92615,12 @@ Object.freeze({
|
|
|
92300
92615
|
addonId: null,
|
|
92301
92616
|
access: "create"
|
|
92302
92617
|
},
|
|
92618
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
92619
|
+
capName: "pipeline-runner",
|
|
92620
|
+
capScope: "system",
|
|
92621
|
+
addonId: null,
|
|
92622
|
+
access: "create"
|
|
92623
|
+
},
|
|
92303
92624
|
"pipelineRunner.runDetailSubtree": {
|
|
92304
92625
|
capName: "pipeline-runner",
|
|
92305
92626
|
capScope: "system",
|
|
@@ -95080,11 +95401,21 @@ Object.freeze({
|
|
|
95080
95401
|
form: "single",
|
|
95081
95402
|
optional: false
|
|
95082
95403
|
}],
|
|
95404
|
+
"nativeObjectDetection.getOptions": [{
|
|
95405
|
+
name: "deviceId",
|
|
95406
|
+
form: "single",
|
|
95407
|
+
optional: false
|
|
95408
|
+
}],
|
|
95083
95409
|
"nativeObjectDetection.setEnabled": [{
|
|
95084
95410
|
name: "deviceId",
|
|
95085
95411
|
form: "single",
|
|
95086
95412
|
optional: false
|
|
95087
95413
|
}],
|
|
95414
|
+
"nativeObjectDetection.setSettings": [{
|
|
95415
|
+
name: "deviceId",
|
|
95416
|
+
form: "single",
|
|
95417
|
+
optional: false
|
|
95418
|
+
}],
|
|
95088
95419
|
"navigation.getFeatures": [{
|
|
95089
95420
|
name: "deviceId",
|
|
95090
95421
|
form: "single",
|
|
@@ -95434,6 +95765,11 @@ Object.freeze({
|
|
|
95434
95765
|
form: "single",
|
|
95435
95766
|
optional: false
|
|
95436
95767
|
}],
|
|
95768
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
95769
|
+
name: "deviceId",
|
|
95770
|
+
form: "single",
|
|
95771
|
+
optional: false
|
|
95772
|
+
}],
|
|
95437
95773
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
95438
95774
|
name: "deviceId",
|
|
95439
95775
|
form: "single",
|
|
@@ -95624,6 +95960,11 @@ Object.freeze({
|
|
|
95624
95960
|
form: "single",
|
|
95625
95961
|
optional: false
|
|
95626
95962
|
}],
|
|
95963
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
95964
|
+
name: "deviceId",
|
|
95965
|
+
form: "single",
|
|
95966
|
+
optional: false
|
|
95967
|
+
}],
|
|
95627
95968
|
"pipelineRunner.runDetailSubtree": [{
|
|
95628
95969
|
name: "deviceId",
|
|
95629
95970
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -58030,7 +58030,7 @@ var ZodIssueCode = {
|
|
|
58030
58030
|
var ZodFirstPartyTypeKind;
|
|
58031
58031
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
58032
58032
|
//#endregion
|
|
58033
|
-
//#region ../types/dist/sleep-
|
|
58033
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
58034
58034
|
/**
|
|
58035
58035
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
58036
58036
|
* window to float samples (D455).
|
|
@@ -64232,6 +64232,21 @@ var streamSignalsCapability = {
|
|
|
64232
64232
|
mode: "singleton",
|
|
64233
64233
|
deviceTypes: Object.values(DeviceType),
|
|
64234
64234
|
runtimeState: StreamSignalsStatusSchema,
|
|
64235
|
+
/**
|
|
64236
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
64237
|
+
*
|
|
64238
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
64239
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
64240
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
64241
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
64242
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
64243
|
+
* class the camera really detected stayed missing for the life of the row
|
|
64244
|
+
* because the fix could not reach it.
|
|
64245
|
+
*
|
|
64246
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
64247
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
64248
|
+
*/
|
|
64249
|
+
durability: "session",
|
|
64235
64250
|
methods: {
|
|
64236
64251
|
/**
|
|
64237
64252
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -70863,6 +70878,48 @@ var NcAlarmConfigSchema = object({
|
|
|
70863
70878
|
settings: NcAlarmSettingsSchema,
|
|
70864
70879
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
70865
70880
|
});
|
|
70881
|
+
/**
|
|
70882
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
70883
|
+
*
|
|
70884
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
70885
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
70886
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
70887
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
70888
|
+
* a different thing from never having been told, and only the envelope
|
|
70889
|
+
* (`rulesLoaded`) can tell those apart.
|
|
70890
|
+
*/
|
|
70891
|
+
var NcClipRetentionAskSchema = object({
|
|
70892
|
+
/**
|
|
70893
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
70894
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
70895
|
+
* asking everywhere.
|
|
70896
|
+
*/
|
|
70897
|
+
deviceId: number().int().nonnegative().optional(),
|
|
70898
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
70899
|
+
* needs nothing produces no ask at all. */
|
|
70900
|
+
seconds: number().min(0).max(60),
|
|
70901
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
70902
|
+
* assigned, which is what the cut defaults to. */
|
|
70903
|
+
profile: CamProfileSchema.optional(),
|
|
70904
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
70905
|
+
ruleId: string(),
|
|
70906
|
+
ruleName: string(),
|
|
70907
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
70908
|
+
reason: _enum(["window", "occupancy"])
|
|
70909
|
+
});
|
|
70910
|
+
/**
|
|
70911
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
70912
|
+
*
|
|
70913
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
70914
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
70915
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
70916
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
70917
|
+
* footage this mechanism exists to keep.
|
|
70918
|
+
*/
|
|
70919
|
+
var NcClipRetentionPlanSchema = object({
|
|
70920
|
+
rulesLoaded: boolean(),
|
|
70921
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
70922
|
+
});
|
|
70866
70923
|
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 }), {
|
|
70867
70924
|
kind: "mutation",
|
|
70868
70925
|
auth: "admin",
|
|
@@ -70883,7 +70940,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
70883
70940
|
}), object({ success: literal(true) }), {
|
|
70884
70941
|
kind: "mutation",
|
|
70885
70942
|
auth: "admin"
|
|
70886
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
70943
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
70887
70944
|
deviceId: number().int(),
|
|
70888
70945
|
muted: boolean()
|
|
70889
70946
|
}), object({ success: literal(true) }), {
|
|
@@ -72068,13 +72125,26 @@ var TrackAudioLabelSchema = object({
|
|
|
72068
72125
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
72069
72126
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
72070
72127
|
*
|
|
72128
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
72129
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
72130
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
72131
|
+
* detector.
|
|
72132
|
+
*
|
|
72133
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
72134
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
72135
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
72136
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
72137
|
+
* could not name.
|
|
72138
|
+
*
|
|
72071
72139
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
72072
72140
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
72073
|
-
* with `isSpatialTrack`, which allow-lists
|
|
72074
|
-
* check silently readmits every source added after it was
|
|
72141
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
72142
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
72143
|
+
* written.
|
|
72075
72144
|
*/
|
|
72076
72145
|
var TrackSourceSchema = _enum([
|
|
72077
72146
|
"pipeline",
|
|
72147
|
+
"onboard",
|
|
72078
72148
|
"sensor",
|
|
72079
72149
|
"audio"
|
|
72080
72150
|
]);
|
|
@@ -73457,6 +73527,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
73457
73527
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
73458
73528
|
framesMatched: number().int()
|
|
73459
73529
|
})).readonly() });
|
|
73530
|
+
/**
|
|
73531
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
73532
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
73533
|
+
* is an alias of this, not a second list.
|
|
73534
|
+
*/
|
|
73535
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
73536
|
+
"motion",
|
|
73537
|
+
"audio-dbfs",
|
|
73538
|
+
"battery",
|
|
73539
|
+
"occupancy"
|
|
73540
|
+
]);
|
|
73541
|
+
/**
|
|
73542
|
+
* One closed 5-minute bucket of a long-term series.
|
|
73543
|
+
*
|
|
73544
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
73545
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
73546
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
73547
|
+
* different claim from zero and the reason this is a sparse series.
|
|
73548
|
+
*/
|
|
73549
|
+
var LtsBucketSchema = object({
|
|
73550
|
+
scope: string(),
|
|
73551
|
+
bucketStart: number().int(),
|
|
73552
|
+
samples: number().int().nonnegative(),
|
|
73553
|
+
sum: number(),
|
|
73554
|
+
min: number(),
|
|
73555
|
+
max: number()
|
|
73556
|
+
});
|
|
73460
73557
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
73461
73558
|
deviceId: number(),
|
|
73462
73559
|
trackId: string()
|
|
@@ -73503,6 +73600,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
73503
73600
|
kinds: array(string()).optional(),
|
|
73504
73601
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
73505
73602
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
73603
|
+
deviceId: number(),
|
|
73604
|
+
series: AnalyticsLtsSeriesSchema,
|
|
73605
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
73606
|
+
scope: string().optional(),
|
|
73607
|
+
from: number(),
|
|
73608
|
+
to: number(),
|
|
73609
|
+
limit: number().int().positive().optional()
|
|
73610
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
73506
73611
|
deviceId: number(),
|
|
73507
73612
|
since: number(),
|
|
73508
73613
|
until: number(),
|
|
@@ -74121,6 +74226,40 @@ var MotionSourceEnum = _enum([
|
|
|
74121
74226
|
*/
|
|
74122
74227
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
74123
74228
|
/**
|
|
74229
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
74230
|
+
*
|
|
74231
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
74232
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
74233
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
74234
|
+
* track, the overlay and the debug row.
|
|
74235
|
+
*
|
|
74236
|
+
* ## Why one, and why it is still an array
|
|
74237
|
+
*
|
|
74238
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
74239
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
74240
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
74241
|
+
* detectors disagree about the same box by construction — which is the
|
|
74242
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
74243
|
+
*
|
|
74244
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
74245
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
74246
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
74247
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
74248
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
74249
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
74250
|
+
* rely on.
|
|
74251
|
+
*
|
|
74252
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
74253
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
74254
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
74255
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
74256
|
+
* suite caught it.
|
|
74257
|
+
*
|
|
74258
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
74259
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
74260
|
+
*/
|
|
74261
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
74262
|
+
/**
|
|
74124
74263
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
74125
74264
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
74126
74265
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -74271,6 +74410,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
74271
74410
|
* events; the orchestrator forwards to `reportMotion`.
|
|
74272
74411
|
*/
|
|
74273
74412
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
74413
|
+
/**
|
|
74414
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
74415
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
74416
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
74417
|
+
*
|
|
74418
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
74419
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
74420
|
+
* here. Its boxes reach post-analysis on the same
|
|
74421
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
74422
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
74423
|
+
* subtree (face / plate / embedding).
|
|
74424
|
+
*
|
|
74425
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
74426
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
74427
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
74428
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
74429
|
+
*
|
|
74430
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
74431
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
74432
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
74433
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
74434
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
74435
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
74436
|
+
*
|
|
74437
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
74438
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
74439
|
+
* default.
|
|
74440
|
+
*/
|
|
74441
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
74274
74442
|
pipelineEnabled: boolean().default(true),
|
|
74275
74443
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
74276
74444
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -74452,7 +74620,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
74452
74620
|
queueDepth: number(),
|
|
74453
74621
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
74454
74622
|
});
|
|
74623
|
+
/**
|
|
74624
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
74625
|
+
*
|
|
74626
|
+
* One instance per node. Receives camera assignments from
|
|
74627
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
74628
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
74629
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
74630
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
74631
|
+
* the bus.
|
|
74632
|
+
*
|
|
74633
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
74634
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
74635
|
+
* makes assignment decisions itself.
|
|
74636
|
+
*/
|
|
74637
|
+
/**
|
|
74638
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
74639
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
74640
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
74641
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
74642
|
+
*/
|
|
74643
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
74644
|
+
"not-attached",
|
|
74645
|
+
"battery-asleep",
|
|
74646
|
+
"not-watching",
|
|
74647
|
+
"already-bursting"
|
|
74648
|
+
]);
|
|
74455
74649
|
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({
|
|
74650
|
+
deviceId: number(),
|
|
74651
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
74652
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
74653
|
+
frames: number().int().positive().optional(),
|
|
74654
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
74655
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
74656
|
+
reason: string()
|
|
74657
|
+
}), object({
|
|
74658
|
+
started: boolean(),
|
|
74659
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
74660
|
+
}), {
|
|
74661
|
+
auth: "admin",
|
|
74662
|
+
kind: "mutation"
|
|
74663
|
+
}), method(object({
|
|
74456
74664
|
handle: FrameHandleSchema,
|
|
74457
74665
|
bbox: NativeCropBboxSchema,
|
|
74458
74666
|
maxWidth: number().int().positive().optional(),
|
|
@@ -81307,11 +81515,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
81307
81515
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
81308
81516
|
/**
|
|
81309
81517
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
81310
|
-
*
|
|
81311
|
-
*
|
|
81518
|
+
*
|
|
81519
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
81520
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
81521
|
+
* other detection choice is made. `geometry` on
|
|
81522
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
81523
|
+
* choice would buy this particular camera.
|
|
81312
81524
|
*/
|
|
81313
81525
|
enabled: boolean()
|
|
81314
81526
|
});
|
|
81527
|
+
/**
|
|
81528
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
81529
|
+
*
|
|
81530
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
81531
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
81532
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
81533
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
81534
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
81535
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
81536
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
81537
|
+
* something is in front of it, and its stream is already being pulled.
|
|
81538
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
81539
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
81540
|
+
* tracker as motion and no further.
|
|
81541
|
+
*
|
|
81542
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
81543
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
81544
|
+
* derived form is only as honest as `getOptions`).
|
|
81545
|
+
*/
|
|
81546
|
+
var NativeObjectGeometryEnum = _enum([
|
|
81547
|
+
"boxed",
|
|
81548
|
+
"while-streaming",
|
|
81549
|
+
"flag-only"
|
|
81550
|
+
]);
|
|
81551
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
81552
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
81553
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
81554
|
+
/** What a detection from this camera carries. */
|
|
81555
|
+
geometry: NativeObjectGeometryEnum
|
|
81556
|
+
});
|
|
81557
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
81315
81558
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
81316
81559
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
81317
81560
|
lastFetchedAt: number() });
|
|
@@ -81321,13 +81564,23 @@ var nativeObjectDetectionCapability = {
|
|
|
81321
81564
|
deviceNative: true,
|
|
81322
81565
|
mode: "singleton",
|
|
81323
81566
|
deviceTypes: [DeviceType.Camera],
|
|
81324
|
-
methods: {
|
|
81325
|
-
deviceId: number(),
|
|
81326
|
-
|
|
81327
|
-
|
|
81328
|
-
|
|
81329
|
-
|
|
81330
|
-
|
|
81567
|
+
methods: {
|
|
81568
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
81569
|
+
setSettings: method(object({
|
|
81570
|
+
deviceId: number(),
|
|
81571
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
81572
|
+
}), _void(), {
|
|
81573
|
+
kind: "mutation",
|
|
81574
|
+
auth: "admin"
|
|
81575
|
+
}),
|
|
81576
|
+
setEnabled: method(object({
|
|
81577
|
+
deviceId: number(),
|
|
81578
|
+
enabled: boolean()
|
|
81579
|
+
}), _void(), {
|
|
81580
|
+
kind: "mutation",
|
|
81581
|
+
auth: "admin"
|
|
81582
|
+
})
|
|
81583
|
+
},
|
|
81331
81584
|
events: { onDetected: { data: object({
|
|
81332
81585
|
deviceId: number(),
|
|
81333
81586
|
detection: NativeDetectionSchema
|
|
@@ -86323,7 +86576,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
86323
86576
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
86324
86577
|
totalObjects: number().int().nonnegative(),
|
|
86325
86578
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
86326
|
-
byClass: record(string(), number().int().nonnegative())
|
|
86579
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
86580
|
+
/**
|
|
86581
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
86582
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
86583
|
+
*
|
|
86584
|
+
* The operator's question about a scene has two halves and they answer
|
|
86585
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
86586
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
86587
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
86588
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
86589
|
+
*
|
|
86590
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
86591
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
86592
|
+
*
|
|
86593
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
86594
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
86595
|
+
* parked objects here" about a camera whose lot is full.
|
|
86596
|
+
*/
|
|
86597
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
86598
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
86599
|
+
* same absence rule. */
|
|
86600
|
+
transientObjects: number().int().nonnegative().optional()
|
|
86327
86601
|
});
|
|
86328
86602
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
86329
86603
|
zoneId: string(),
|
|
@@ -86446,6 +86720,23 @@ var HistoryPointSchema = object({
|
|
|
86446
86720
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
86447
86721
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
86448
86722
|
* combinatorial coverage the operator UI requested.
|
|
86723
|
+
*
|
|
86724
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
86725
|
+
*
|
|
86726
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
86727
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
86728
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
86729
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
86730
|
+
* horizon rather than to answer a question.
|
|
86731
|
+
*
|
|
86732
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
86733
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
86734
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
86735
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
86736
|
+
* function the writer uses, so the two cannot drift.
|
|
86737
|
+
*
|
|
86738
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
86739
|
+
* it. Do not add a fourth caller.
|
|
86449
86740
|
*/
|
|
86450
86741
|
var zoneAnalyticsCapability = {
|
|
86451
86742
|
name: "zone-analytics",
|
|
@@ -90845,12 +91136,24 @@ Object.freeze({
|
|
|
90845
91136
|
addonId: null,
|
|
90846
91137
|
access: "create"
|
|
90847
91138
|
},
|
|
91139
|
+
"nativeObjectDetection.getOptions": {
|
|
91140
|
+
capName: "native-object-detection",
|
|
91141
|
+
capScope: "device",
|
|
91142
|
+
addonId: null,
|
|
91143
|
+
access: "view"
|
|
91144
|
+
},
|
|
90848
91145
|
"nativeObjectDetection.setEnabled": {
|
|
90849
91146
|
capName: "native-object-detection",
|
|
90850
91147
|
capScope: "device",
|
|
90851
91148
|
addonId: null,
|
|
90852
91149
|
access: "create"
|
|
90853
91150
|
},
|
|
91151
|
+
"nativeObjectDetection.setSettings": {
|
|
91152
|
+
capName: "native-object-detection",
|
|
91153
|
+
capScope: "device",
|
|
91154
|
+
addonId: null,
|
|
91155
|
+
access: "create"
|
|
91156
|
+
},
|
|
90854
91157
|
"navigation.getFeatures": {
|
|
90855
91158
|
capName: "navigation",
|
|
90856
91159
|
capScope: "device",
|
|
@@ -91115,6 +91418,12 @@ Object.freeze({
|
|
|
91115
91418
|
addonId: null,
|
|
91116
91419
|
access: "view"
|
|
91117
91420
|
},
|
|
91421
|
+
"notificationRules.getClipRetentionAsks": {
|
|
91422
|
+
capName: "notification-rules",
|
|
91423
|
+
capScope: "system",
|
|
91424
|
+
addonId: null,
|
|
91425
|
+
access: "view"
|
|
91426
|
+
},
|
|
91118
91427
|
"notificationRules.getConditionCatalog": {
|
|
91119
91428
|
capName: "notification-rules",
|
|
91120
91429
|
capScope: "system",
|
|
@@ -91625,6 +91934,12 @@ Object.freeze({
|
|
|
91625
91934
|
addonId: null,
|
|
91626
91935
|
access: "create"
|
|
91627
91936
|
},
|
|
91937
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
91938
|
+
capName: "pipeline-analytics",
|
|
91939
|
+
capScope: "device",
|
|
91940
|
+
addonId: null,
|
|
91941
|
+
access: "view"
|
|
91942
|
+
},
|
|
91628
91943
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
91629
91944
|
capName: "pipeline-analytics",
|
|
91630
91945
|
capScope: "device",
|
|
@@ -92297,6 +92612,12 @@ Object.freeze({
|
|
|
92297
92612
|
addonId: null,
|
|
92298
92613
|
access: "create"
|
|
92299
92614
|
},
|
|
92615
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
92616
|
+
capName: "pipeline-runner",
|
|
92617
|
+
capScope: "system",
|
|
92618
|
+
addonId: null,
|
|
92619
|
+
access: "create"
|
|
92620
|
+
},
|
|
92300
92621
|
"pipelineRunner.runDetailSubtree": {
|
|
92301
92622
|
capName: "pipeline-runner",
|
|
92302
92623
|
capScope: "system",
|
|
@@ -95077,11 +95398,21 @@ Object.freeze({
|
|
|
95077
95398
|
form: "single",
|
|
95078
95399
|
optional: false
|
|
95079
95400
|
}],
|
|
95401
|
+
"nativeObjectDetection.getOptions": [{
|
|
95402
|
+
name: "deviceId",
|
|
95403
|
+
form: "single",
|
|
95404
|
+
optional: false
|
|
95405
|
+
}],
|
|
95080
95406
|
"nativeObjectDetection.setEnabled": [{
|
|
95081
95407
|
name: "deviceId",
|
|
95082
95408
|
form: "single",
|
|
95083
95409
|
optional: false
|
|
95084
95410
|
}],
|
|
95411
|
+
"nativeObjectDetection.setSettings": [{
|
|
95412
|
+
name: "deviceId",
|
|
95413
|
+
form: "single",
|
|
95414
|
+
optional: false
|
|
95415
|
+
}],
|
|
95085
95416
|
"navigation.getFeatures": [{
|
|
95086
95417
|
name: "deviceId",
|
|
95087
95418
|
form: "single",
|
|
@@ -95431,6 +95762,11 @@ Object.freeze({
|
|
|
95431
95762
|
form: "single",
|
|
95432
95763
|
optional: false
|
|
95433
95764
|
}],
|
|
95765
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
95766
|
+
name: "deviceId",
|
|
95767
|
+
form: "single",
|
|
95768
|
+
optional: false
|
|
95769
|
+
}],
|
|
95434
95770
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
95435
95771
|
name: "deviceId",
|
|
95436
95772
|
form: "single",
|
|
@@ -95621,6 +95957,11 @@ Object.freeze({
|
|
|
95621
95957
|
form: "single",
|
|
95622
95958
|
optional: false
|
|
95623
95959
|
}],
|
|
95960
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
95961
|
+
name: "deviceId",
|
|
95962
|
+
form: "single",
|
|
95963
|
+
optional: false
|
|
95964
|
+
}],
|
|
95624
95965
|
"pipelineRunner.runDetailSubtree": [{
|
|
95625
95966
|
name: "deviceId",
|
|
95626
95967
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreame",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.105",
|
|
4
4
|
"description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"dev": "vite build --watch",
|
|
78
78
|
"typecheck": "tsc --noEmit",
|
|
79
79
|
"test": "vitest run",
|
|
80
|
-
"publish": "npm publish --access public"
|
|
80
|
+
"publish:npm": "npm publish --access public"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@apocaliss92/nodedreame": "^1.12.0",
|