@camstack/addon-matter-broker 0.2.101 → 0.2.102
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 +314 -12
- package/dist/addon.mjs +314 -12
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -5374,7 +5374,7 @@ var ZodIssueCode = {
|
|
|
5374
5374
|
var ZodFirstPartyTypeKind;
|
|
5375
5375
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5376
5376
|
//#endregion
|
|
5377
|
-
//#region ../types/dist/sleep-
|
|
5377
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5378
5378
|
/**
|
|
5379
5379
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5380
5380
|
* window to float samples (D455).
|
|
@@ -11625,6 +11625,21 @@ var streamSignalsCapability = {
|
|
|
11625
11625
|
mode: "singleton",
|
|
11626
11626
|
deviceTypes: Object.values(DeviceType),
|
|
11627
11627
|
runtimeState: StreamSignalsStatusSchema,
|
|
11628
|
+
/**
|
|
11629
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11630
|
+
*
|
|
11631
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11632
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11633
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11634
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11635
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11636
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11637
|
+
* because the fix could not reach it.
|
|
11638
|
+
*
|
|
11639
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11640
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11641
|
+
*/
|
|
11642
|
+
durability: "session",
|
|
11628
11643
|
methods: {
|
|
11629
11644
|
/**
|
|
11630
11645
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18256,6 +18271,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18256
18271
|
settings: NcAlarmSettingsSchema,
|
|
18257
18272
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18258
18273
|
});
|
|
18274
|
+
/**
|
|
18275
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18276
|
+
*
|
|
18277
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18278
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18279
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18280
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18281
|
+
* a different thing from never having been told, and only the envelope
|
|
18282
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18283
|
+
*/
|
|
18284
|
+
var NcClipRetentionAskSchema = object({
|
|
18285
|
+
/**
|
|
18286
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18287
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18288
|
+
* asking everywhere.
|
|
18289
|
+
*/
|
|
18290
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18291
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18292
|
+
* needs nothing produces no ask at all. */
|
|
18293
|
+
seconds: number().min(0).max(60),
|
|
18294
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18295
|
+
* assigned, which is what the cut defaults to. */
|
|
18296
|
+
profile: CamProfileSchema.optional(),
|
|
18297
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18298
|
+
ruleId: string$2(),
|
|
18299
|
+
ruleName: string$2(),
|
|
18300
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18301
|
+
reason: _enum(["window", "occupancy"])
|
|
18302
|
+
});
|
|
18303
|
+
/**
|
|
18304
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18305
|
+
*
|
|
18306
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18307
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18308
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18309
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18310
|
+
* footage this mechanism exists to keep.
|
|
18311
|
+
*/
|
|
18312
|
+
var NcClipRetentionPlanSchema = object({
|
|
18313
|
+
rulesLoaded: boolean(),
|
|
18314
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18315
|
+
});
|
|
18259
18316
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string$2() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18260
18317
|
kind: "mutation",
|
|
18261
18318
|
auth: "admin",
|
|
@@ -18276,7 +18333,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18276
18333
|
}), object({ success: literal(true) }), {
|
|
18277
18334
|
kind: "mutation",
|
|
18278
18335
|
auth: "admin"
|
|
18279
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18336
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18280
18337
|
deviceId: number().int(),
|
|
18281
18338
|
muted: boolean()
|
|
18282
18339
|
}), object({ success: literal(true) }), {
|
|
@@ -20850,6 +20907,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20850
20907
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20851
20908
|
framesMatched: number().int()
|
|
20852
20909
|
})).readonly() });
|
|
20910
|
+
/**
|
|
20911
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20912
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20913
|
+
* is an alias of this, not a second list.
|
|
20914
|
+
*/
|
|
20915
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20916
|
+
"motion",
|
|
20917
|
+
"audio-dbfs",
|
|
20918
|
+
"battery",
|
|
20919
|
+
"occupancy"
|
|
20920
|
+
]);
|
|
20921
|
+
/**
|
|
20922
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20923
|
+
*
|
|
20924
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20925
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20926
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20927
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20928
|
+
*/
|
|
20929
|
+
var LtsBucketSchema = object({
|
|
20930
|
+
scope: string$2(),
|
|
20931
|
+
bucketStart: number().int(),
|
|
20932
|
+
samples: number().int().nonnegative(),
|
|
20933
|
+
sum: number(),
|
|
20934
|
+
min: number(),
|
|
20935
|
+
max: number()
|
|
20936
|
+
});
|
|
20853
20937
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20854
20938
|
deviceId: number(),
|
|
20855
20939
|
trackId: string$2()
|
|
@@ -20896,6 +20980,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20896
20980
|
kinds: array(string$2()).optional(),
|
|
20897
20981
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20898
20982
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20983
|
+
deviceId: number(),
|
|
20984
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20985
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20986
|
+
scope: string$2().optional(),
|
|
20987
|
+
from: number(),
|
|
20988
|
+
to: number(),
|
|
20989
|
+
limit: number().int().positive().optional()
|
|
20990
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20899
20991
|
deviceId: number(),
|
|
20900
20992
|
since: number(),
|
|
20901
20993
|
until: number(),
|
|
@@ -21514,6 +21606,14 @@ var MotionSourceEnum = _enum([
|
|
|
21514
21606
|
*/
|
|
21515
21607
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21516
21608
|
/**
|
|
21609
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21610
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21611
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21612
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21613
|
+
* row.
|
|
21614
|
+
*/
|
|
21615
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21616
|
+
/**
|
|
21517
21617
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21518
21618
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21519
21619
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21664,6 +21764,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21664
21764
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21665
21765
|
*/
|
|
21666
21766
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21767
|
+
/**
|
|
21768
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21769
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21770
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21771
|
+
*
|
|
21772
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21773
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21774
|
+
* here. Its boxes reach post-analysis on the same
|
|
21775
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21776
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21777
|
+
* subtree (face / plate / embedding).
|
|
21778
|
+
*
|
|
21779
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21780
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21781
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21782
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21783
|
+
*
|
|
21784
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21785
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21786
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21787
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21788
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21789
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21790
|
+
*
|
|
21791
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21792
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21793
|
+
* default.
|
|
21794
|
+
*/
|
|
21795
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21667
21796
|
pipelineEnabled: boolean().default(true),
|
|
21668
21797
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21669
21798
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21845,7 +21974,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21845
21974
|
queueDepth: number(),
|
|
21846
21975
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21847
21976
|
});
|
|
21977
|
+
/**
|
|
21978
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21979
|
+
*
|
|
21980
|
+
* One instance per node. Receives camera assignments from
|
|
21981
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21982
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21983
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21984
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21985
|
+
* the bus.
|
|
21986
|
+
*
|
|
21987
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21988
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21989
|
+
* makes assignment decisions itself.
|
|
21990
|
+
*/
|
|
21991
|
+
/**
|
|
21992
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21993
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21994
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21995
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21996
|
+
*/
|
|
21997
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21998
|
+
"not-attached",
|
|
21999
|
+
"battery-asleep",
|
|
22000
|
+
"not-watching",
|
|
22001
|
+
"already-bursting"
|
|
22002
|
+
]);
|
|
21848
22003
|
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({
|
|
22004
|
+
deviceId: number(),
|
|
22005
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22006
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22007
|
+
frames: number().int().positive().optional(),
|
|
22008
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22009
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22010
|
+
reason: string$2()
|
|
22011
|
+
}), object({
|
|
22012
|
+
started: boolean(),
|
|
22013
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22014
|
+
}), {
|
|
22015
|
+
auth: "admin",
|
|
22016
|
+
kind: "mutation"
|
|
22017
|
+
}), method(object({
|
|
21849
22018
|
handle: FrameHandleSchema,
|
|
21850
22019
|
bbox: NativeCropBboxSchema,
|
|
21851
22020
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28692,11 +28861,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28692
28861
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28693
28862
|
/**
|
|
28694
28863
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28695
|
-
*
|
|
28696
|
-
*
|
|
28864
|
+
*
|
|
28865
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28866
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28867
|
+
* other detection choice is made. `geometry` on
|
|
28868
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28869
|
+
* choice would buy this particular camera.
|
|
28697
28870
|
*/
|
|
28698
28871
|
enabled: boolean()
|
|
28699
28872
|
});
|
|
28873
|
+
/**
|
|
28874
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28875
|
+
*
|
|
28876
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28877
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28878
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28879
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28880
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28881
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28882
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28883
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28884
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28885
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28886
|
+
* tracker as motion and no further.
|
|
28887
|
+
*
|
|
28888
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28889
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28890
|
+
* derived form is only as honest as `getOptions`).
|
|
28891
|
+
*/
|
|
28892
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28893
|
+
"boxed",
|
|
28894
|
+
"while-streaming",
|
|
28895
|
+
"flag-only"
|
|
28896
|
+
]);
|
|
28897
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28898
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28899
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28900
|
+
/** What a detection from this camera carries. */
|
|
28901
|
+
geometry: NativeObjectGeometryEnum
|
|
28902
|
+
});
|
|
28903
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28700
28904
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28701
28905
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28702
28906
|
lastFetchedAt: number() });
|
|
@@ -28706,13 +28910,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28706
28910
|
deviceNative: true,
|
|
28707
28911
|
mode: "singleton",
|
|
28708
28912
|
deviceTypes: [DeviceType.Camera],
|
|
28709
|
-
methods: {
|
|
28710
|
-
deviceId: number(),
|
|
28711
|
-
|
|
28712
|
-
|
|
28713
|
-
|
|
28714
|
-
|
|
28715
|
-
|
|
28913
|
+
methods: {
|
|
28914
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28915
|
+
setSettings: method(object({
|
|
28916
|
+
deviceId: number(),
|
|
28917
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28918
|
+
}), _void(), {
|
|
28919
|
+
kind: "mutation",
|
|
28920
|
+
auth: "admin"
|
|
28921
|
+
}),
|
|
28922
|
+
setEnabled: method(object({
|
|
28923
|
+
deviceId: number(),
|
|
28924
|
+
enabled: boolean()
|
|
28925
|
+
}), _void(), {
|
|
28926
|
+
kind: "mutation",
|
|
28927
|
+
auth: "admin"
|
|
28928
|
+
})
|
|
28929
|
+
},
|
|
28716
28930
|
events: { onDetected: { data: object({
|
|
28717
28931
|
deviceId: number(),
|
|
28718
28932
|
detection: NativeDetectionSchema
|
|
@@ -33560,7 +33774,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33560
33774
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33561
33775
|
totalObjects: number().int().nonnegative(),
|
|
33562
33776
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33563
|
-
byClass: record(string$2(), number().int().nonnegative())
|
|
33777
|
+
byClass: record(string$2(), number().int().nonnegative()),
|
|
33778
|
+
/**
|
|
33779
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33780
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33781
|
+
*
|
|
33782
|
+
* The operator's question about a scene has two halves and they answer
|
|
33783
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33784
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33785
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33786
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33787
|
+
*
|
|
33788
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33789
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33790
|
+
*
|
|
33791
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33792
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33793
|
+
* parked objects here" about a camera whose lot is full.
|
|
33794
|
+
*/
|
|
33795
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33796
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33797
|
+
* same absence rule. */
|
|
33798
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33564
33799
|
});
|
|
33565
33800
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33566
33801
|
zoneId: string$2(),
|
|
@@ -33683,6 +33918,23 @@ var HistoryPointSchema = object({
|
|
|
33683
33918
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33684
33919
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33685
33920
|
* combinatorial coverage the operator UI requested.
|
|
33921
|
+
*
|
|
33922
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33923
|
+
*
|
|
33924
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33925
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33926
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33927
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33928
|
+
* horizon rather than to answer a question.
|
|
33929
|
+
*
|
|
33930
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33931
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33932
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33933
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33934
|
+
* function the writer uses, so the two cannot drift.
|
|
33935
|
+
*
|
|
33936
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33937
|
+
* it. Do not add a fourth caller.
|
|
33686
33938
|
*/
|
|
33687
33939
|
var zoneAnalyticsCapability = {
|
|
33688
33940
|
name: "zone-analytics",
|
|
@@ -38082,12 +38334,24 @@ Object.freeze({
|
|
|
38082
38334
|
addonId: null,
|
|
38083
38335
|
access: "create"
|
|
38084
38336
|
},
|
|
38337
|
+
"nativeObjectDetection.getOptions": {
|
|
38338
|
+
capName: "native-object-detection",
|
|
38339
|
+
capScope: "device",
|
|
38340
|
+
addonId: null,
|
|
38341
|
+
access: "view"
|
|
38342
|
+
},
|
|
38085
38343
|
"nativeObjectDetection.setEnabled": {
|
|
38086
38344
|
capName: "native-object-detection",
|
|
38087
38345
|
capScope: "device",
|
|
38088
38346
|
addonId: null,
|
|
38089
38347
|
access: "create"
|
|
38090
38348
|
},
|
|
38349
|
+
"nativeObjectDetection.setSettings": {
|
|
38350
|
+
capName: "native-object-detection",
|
|
38351
|
+
capScope: "device",
|
|
38352
|
+
addonId: null,
|
|
38353
|
+
access: "create"
|
|
38354
|
+
},
|
|
38091
38355
|
"navigation.getFeatures": {
|
|
38092
38356
|
capName: "navigation",
|
|
38093
38357
|
capScope: "device",
|
|
@@ -38352,6 +38616,12 @@ Object.freeze({
|
|
|
38352
38616
|
addonId: null,
|
|
38353
38617
|
access: "view"
|
|
38354
38618
|
},
|
|
38619
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38620
|
+
capName: "notification-rules",
|
|
38621
|
+
capScope: "system",
|
|
38622
|
+
addonId: null,
|
|
38623
|
+
access: "view"
|
|
38624
|
+
},
|
|
38355
38625
|
"notificationRules.getConditionCatalog": {
|
|
38356
38626
|
capName: "notification-rules",
|
|
38357
38627
|
capScope: "system",
|
|
@@ -38862,6 +39132,12 @@ Object.freeze({
|
|
|
38862
39132
|
addonId: null,
|
|
38863
39133
|
access: "create"
|
|
38864
39134
|
},
|
|
39135
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39136
|
+
capName: "pipeline-analytics",
|
|
39137
|
+
capScope: "device",
|
|
39138
|
+
addonId: null,
|
|
39139
|
+
access: "view"
|
|
39140
|
+
},
|
|
38865
39141
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38866
39142
|
capName: "pipeline-analytics",
|
|
38867
39143
|
capScope: "device",
|
|
@@ -39534,6 +39810,12 @@ Object.freeze({
|
|
|
39534
39810
|
addonId: null,
|
|
39535
39811
|
access: "create"
|
|
39536
39812
|
},
|
|
39813
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39814
|
+
capName: "pipeline-runner",
|
|
39815
|
+
capScope: "system",
|
|
39816
|
+
addonId: null,
|
|
39817
|
+
access: "create"
|
|
39818
|
+
},
|
|
39537
39819
|
"pipelineRunner.runDetailSubtree": {
|
|
39538
39820
|
capName: "pipeline-runner",
|
|
39539
39821
|
capScope: "system",
|
|
@@ -42314,11 +42596,21 @@ Object.freeze({
|
|
|
42314
42596
|
form: "single",
|
|
42315
42597
|
optional: false
|
|
42316
42598
|
}],
|
|
42599
|
+
"nativeObjectDetection.getOptions": [{
|
|
42600
|
+
name: "deviceId",
|
|
42601
|
+
form: "single",
|
|
42602
|
+
optional: false
|
|
42603
|
+
}],
|
|
42317
42604
|
"nativeObjectDetection.setEnabled": [{
|
|
42318
42605
|
name: "deviceId",
|
|
42319
42606
|
form: "single",
|
|
42320
42607
|
optional: false
|
|
42321
42608
|
}],
|
|
42609
|
+
"nativeObjectDetection.setSettings": [{
|
|
42610
|
+
name: "deviceId",
|
|
42611
|
+
form: "single",
|
|
42612
|
+
optional: false
|
|
42613
|
+
}],
|
|
42322
42614
|
"navigation.getFeatures": [{
|
|
42323
42615
|
name: "deviceId",
|
|
42324
42616
|
form: "single",
|
|
@@ -42668,6 +42960,11 @@ Object.freeze({
|
|
|
42668
42960
|
form: "single",
|
|
42669
42961
|
optional: false
|
|
42670
42962
|
}],
|
|
42963
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42964
|
+
name: "deviceId",
|
|
42965
|
+
form: "single",
|
|
42966
|
+
optional: false
|
|
42967
|
+
}],
|
|
42671
42968
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42672
42969
|
name: "deviceId",
|
|
42673
42970
|
form: "single",
|
|
@@ -42858,6 +43155,11 @@ Object.freeze({
|
|
|
42858
43155
|
form: "single",
|
|
42859
43156
|
optional: false
|
|
42860
43157
|
}],
|
|
43158
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43159
|
+
name: "deviceId",
|
|
43160
|
+
form: "single",
|
|
43161
|
+
optional: false
|
|
43162
|
+
}],
|
|
42861
43163
|
"pipelineRunner.runDetailSubtree": [{
|
|
42862
43164
|
name: "deviceId",
|
|
42863
43165
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5372,7 +5372,7 @@ var ZodIssueCode = {
|
|
|
5372
5372
|
var ZodFirstPartyTypeKind;
|
|
5373
5373
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5374
5374
|
//#endregion
|
|
5375
|
-
//#region ../types/dist/sleep-
|
|
5375
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5376
5376
|
/**
|
|
5377
5377
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5378
5378
|
* window to float samples (D455).
|
|
@@ -11623,6 +11623,21 @@ var streamSignalsCapability = {
|
|
|
11623
11623
|
mode: "singleton",
|
|
11624
11624
|
deviceTypes: Object.values(DeviceType),
|
|
11625
11625
|
runtimeState: StreamSignalsStatusSchema,
|
|
11626
|
+
/**
|
|
11627
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11628
|
+
*
|
|
11629
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11630
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11631
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11632
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11633
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11634
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11635
|
+
* because the fix could not reach it.
|
|
11636
|
+
*
|
|
11637
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11638
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11639
|
+
*/
|
|
11640
|
+
durability: "session",
|
|
11626
11641
|
methods: {
|
|
11627
11642
|
/**
|
|
11628
11643
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18254,6 +18269,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18254
18269
|
settings: NcAlarmSettingsSchema,
|
|
18255
18270
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18256
18271
|
});
|
|
18272
|
+
/**
|
|
18273
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18274
|
+
*
|
|
18275
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18276
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18277
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18278
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18279
|
+
* a different thing from never having been told, and only the envelope
|
|
18280
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18281
|
+
*/
|
|
18282
|
+
var NcClipRetentionAskSchema = object({
|
|
18283
|
+
/**
|
|
18284
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18285
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18286
|
+
* asking everywhere.
|
|
18287
|
+
*/
|
|
18288
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18289
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18290
|
+
* needs nothing produces no ask at all. */
|
|
18291
|
+
seconds: number().min(0).max(60),
|
|
18292
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18293
|
+
* assigned, which is what the cut defaults to. */
|
|
18294
|
+
profile: CamProfileSchema.optional(),
|
|
18295
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18296
|
+
ruleId: string$2(),
|
|
18297
|
+
ruleName: string$2(),
|
|
18298
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18299
|
+
reason: _enum(["window", "occupancy"])
|
|
18300
|
+
});
|
|
18301
|
+
/**
|
|
18302
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18303
|
+
*
|
|
18304
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18305
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18306
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18307
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18308
|
+
* footage this mechanism exists to keep.
|
|
18309
|
+
*/
|
|
18310
|
+
var NcClipRetentionPlanSchema = object({
|
|
18311
|
+
rulesLoaded: boolean(),
|
|
18312
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18313
|
+
});
|
|
18257
18314
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string$2() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18258
18315
|
kind: "mutation",
|
|
18259
18316
|
auth: "admin",
|
|
@@ -18274,7 +18331,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18274
18331
|
}), object({ success: literal(true) }), {
|
|
18275
18332
|
kind: "mutation",
|
|
18276
18333
|
auth: "admin"
|
|
18277
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18334
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18278
18335
|
deviceId: number().int(),
|
|
18279
18336
|
muted: boolean()
|
|
18280
18337
|
}), object({ success: literal(true) }), {
|
|
@@ -20848,6 +20905,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20848
20905
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20849
20906
|
framesMatched: number().int()
|
|
20850
20907
|
})).readonly() });
|
|
20908
|
+
/**
|
|
20909
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20910
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20911
|
+
* is an alias of this, not a second list.
|
|
20912
|
+
*/
|
|
20913
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20914
|
+
"motion",
|
|
20915
|
+
"audio-dbfs",
|
|
20916
|
+
"battery",
|
|
20917
|
+
"occupancy"
|
|
20918
|
+
]);
|
|
20919
|
+
/**
|
|
20920
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20921
|
+
*
|
|
20922
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20923
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20924
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20925
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20926
|
+
*/
|
|
20927
|
+
var LtsBucketSchema = object({
|
|
20928
|
+
scope: string$2(),
|
|
20929
|
+
bucketStart: number().int(),
|
|
20930
|
+
samples: number().int().nonnegative(),
|
|
20931
|
+
sum: number(),
|
|
20932
|
+
min: number(),
|
|
20933
|
+
max: number()
|
|
20934
|
+
});
|
|
20851
20935
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20852
20936
|
deviceId: number(),
|
|
20853
20937
|
trackId: string$2()
|
|
@@ -20894,6 +20978,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20894
20978
|
kinds: array(string$2()).optional(),
|
|
20895
20979
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20896
20980
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20981
|
+
deviceId: number(),
|
|
20982
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20983
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20984
|
+
scope: string$2().optional(),
|
|
20985
|
+
from: number(),
|
|
20986
|
+
to: number(),
|
|
20987
|
+
limit: number().int().positive().optional()
|
|
20988
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20897
20989
|
deviceId: number(),
|
|
20898
20990
|
since: number(),
|
|
20899
20991
|
until: number(),
|
|
@@ -21512,6 +21604,14 @@ var MotionSourceEnum = _enum([
|
|
|
21512
21604
|
*/
|
|
21513
21605
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21514
21606
|
/**
|
|
21607
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21608
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21609
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21610
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21611
|
+
* row.
|
|
21612
|
+
*/
|
|
21613
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21614
|
+
/**
|
|
21515
21615
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21516
21616
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21517
21617
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21662,6 +21762,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21662
21762
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21663
21763
|
*/
|
|
21664
21764
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21765
|
+
/**
|
|
21766
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21767
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21768
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21769
|
+
*
|
|
21770
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21771
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21772
|
+
* here. Its boxes reach post-analysis on the same
|
|
21773
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21774
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21775
|
+
* subtree (face / plate / embedding).
|
|
21776
|
+
*
|
|
21777
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21778
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21779
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21780
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21781
|
+
*
|
|
21782
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21783
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21784
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21785
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21786
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21787
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21788
|
+
*
|
|
21789
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21790
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21791
|
+
* default.
|
|
21792
|
+
*/
|
|
21793
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21665
21794
|
pipelineEnabled: boolean().default(true),
|
|
21666
21795
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21667
21796
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21843,7 +21972,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21843
21972
|
queueDepth: number(),
|
|
21844
21973
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21845
21974
|
});
|
|
21975
|
+
/**
|
|
21976
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21977
|
+
*
|
|
21978
|
+
* One instance per node. Receives camera assignments from
|
|
21979
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21980
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21981
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21982
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21983
|
+
* the bus.
|
|
21984
|
+
*
|
|
21985
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21986
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21987
|
+
* makes assignment decisions itself.
|
|
21988
|
+
*/
|
|
21989
|
+
/**
|
|
21990
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21991
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21992
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21993
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21994
|
+
*/
|
|
21995
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21996
|
+
"not-attached",
|
|
21997
|
+
"battery-asleep",
|
|
21998
|
+
"not-watching",
|
|
21999
|
+
"already-bursting"
|
|
22000
|
+
]);
|
|
21846
22001
|
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({
|
|
22002
|
+
deviceId: number(),
|
|
22003
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22004
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22005
|
+
frames: number().int().positive().optional(),
|
|
22006
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22007
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22008
|
+
reason: string$2()
|
|
22009
|
+
}), object({
|
|
22010
|
+
started: boolean(),
|
|
22011
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22012
|
+
}), {
|
|
22013
|
+
auth: "admin",
|
|
22014
|
+
kind: "mutation"
|
|
22015
|
+
}), method(object({
|
|
21847
22016
|
handle: FrameHandleSchema,
|
|
21848
22017
|
bbox: NativeCropBboxSchema,
|
|
21849
22018
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28690,11 +28859,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28690
28859
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28691
28860
|
/**
|
|
28692
28861
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28693
|
-
*
|
|
28694
|
-
*
|
|
28862
|
+
*
|
|
28863
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28864
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28865
|
+
* other detection choice is made. `geometry` on
|
|
28866
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28867
|
+
* choice would buy this particular camera.
|
|
28695
28868
|
*/
|
|
28696
28869
|
enabled: boolean()
|
|
28697
28870
|
});
|
|
28871
|
+
/**
|
|
28872
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28873
|
+
*
|
|
28874
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28875
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28876
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28877
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28878
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28879
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28880
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28881
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28882
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28883
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28884
|
+
* tracker as motion and no further.
|
|
28885
|
+
*
|
|
28886
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28887
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28888
|
+
* derived form is only as honest as `getOptions`).
|
|
28889
|
+
*/
|
|
28890
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28891
|
+
"boxed",
|
|
28892
|
+
"while-streaming",
|
|
28893
|
+
"flag-only"
|
|
28894
|
+
]);
|
|
28895
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28896
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28897
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28898
|
+
/** What a detection from this camera carries. */
|
|
28899
|
+
geometry: NativeObjectGeometryEnum
|
|
28900
|
+
});
|
|
28901
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28698
28902
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28699
28903
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28700
28904
|
lastFetchedAt: number() });
|
|
@@ -28704,13 +28908,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28704
28908
|
deviceNative: true,
|
|
28705
28909
|
mode: "singleton",
|
|
28706
28910
|
deviceTypes: [DeviceType.Camera],
|
|
28707
|
-
methods: {
|
|
28708
|
-
deviceId: number(),
|
|
28709
|
-
|
|
28710
|
-
|
|
28711
|
-
|
|
28712
|
-
|
|
28713
|
-
|
|
28911
|
+
methods: {
|
|
28912
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28913
|
+
setSettings: method(object({
|
|
28914
|
+
deviceId: number(),
|
|
28915
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28916
|
+
}), _void(), {
|
|
28917
|
+
kind: "mutation",
|
|
28918
|
+
auth: "admin"
|
|
28919
|
+
}),
|
|
28920
|
+
setEnabled: method(object({
|
|
28921
|
+
deviceId: number(),
|
|
28922
|
+
enabled: boolean()
|
|
28923
|
+
}), _void(), {
|
|
28924
|
+
kind: "mutation",
|
|
28925
|
+
auth: "admin"
|
|
28926
|
+
})
|
|
28927
|
+
},
|
|
28714
28928
|
events: { onDetected: { data: object({
|
|
28715
28929
|
deviceId: number(),
|
|
28716
28930
|
detection: NativeDetectionSchema
|
|
@@ -33558,7 +33772,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33558
33772
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33559
33773
|
totalObjects: number().int().nonnegative(),
|
|
33560
33774
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33561
|
-
byClass: record(string$2(), number().int().nonnegative())
|
|
33775
|
+
byClass: record(string$2(), number().int().nonnegative()),
|
|
33776
|
+
/**
|
|
33777
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33778
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33779
|
+
*
|
|
33780
|
+
* The operator's question about a scene has two halves and they answer
|
|
33781
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33782
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33783
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33784
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33785
|
+
*
|
|
33786
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33787
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33788
|
+
*
|
|
33789
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33790
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33791
|
+
* parked objects here" about a camera whose lot is full.
|
|
33792
|
+
*/
|
|
33793
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33794
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33795
|
+
* same absence rule. */
|
|
33796
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33562
33797
|
});
|
|
33563
33798
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33564
33799
|
zoneId: string$2(),
|
|
@@ -33681,6 +33916,23 @@ var HistoryPointSchema = object({
|
|
|
33681
33916
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33682
33917
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33683
33918
|
* combinatorial coverage the operator UI requested.
|
|
33919
|
+
*
|
|
33920
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33921
|
+
*
|
|
33922
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33923
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33924
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33925
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33926
|
+
* horizon rather than to answer a question.
|
|
33927
|
+
*
|
|
33928
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33929
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33930
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33931
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33932
|
+
* function the writer uses, so the two cannot drift.
|
|
33933
|
+
*
|
|
33934
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33935
|
+
* it. Do not add a fourth caller.
|
|
33684
33936
|
*/
|
|
33685
33937
|
var zoneAnalyticsCapability = {
|
|
33686
33938
|
name: "zone-analytics",
|
|
@@ -38080,12 +38332,24 @@ Object.freeze({
|
|
|
38080
38332
|
addonId: null,
|
|
38081
38333
|
access: "create"
|
|
38082
38334
|
},
|
|
38335
|
+
"nativeObjectDetection.getOptions": {
|
|
38336
|
+
capName: "native-object-detection",
|
|
38337
|
+
capScope: "device",
|
|
38338
|
+
addonId: null,
|
|
38339
|
+
access: "view"
|
|
38340
|
+
},
|
|
38083
38341
|
"nativeObjectDetection.setEnabled": {
|
|
38084
38342
|
capName: "native-object-detection",
|
|
38085
38343
|
capScope: "device",
|
|
38086
38344
|
addonId: null,
|
|
38087
38345
|
access: "create"
|
|
38088
38346
|
},
|
|
38347
|
+
"nativeObjectDetection.setSettings": {
|
|
38348
|
+
capName: "native-object-detection",
|
|
38349
|
+
capScope: "device",
|
|
38350
|
+
addonId: null,
|
|
38351
|
+
access: "create"
|
|
38352
|
+
},
|
|
38089
38353
|
"navigation.getFeatures": {
|
|
38090
38354
|
capName: "navigation",
|
|
38091
38355
|
capScope: "device",
|
|
@@ -38350,6 +38614,12 @@ Object.freeze({
|
|
|
38350
38614
|
addonId: null,
|
|
38351
38615
|
access: "view"
|
|
38352
38616
|
},
|
|
38617
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38618
|
+
capName: "notification-rules",
|
|
38619
|
+
capScope: "system",
|
|
38620
|
+
addonId: null,
|
|
38621
|
+
access: "view"
|
|
38622
|
+
},
|
|
38353
38623
|
"notificationRules.getConditionCatalog": {
|
|
38354
38624
|
capName: "notification-rules",
|
|
38355
38625
|
capScope: "system",
|
|
@@ -38860,6 +39130,12 @@ Object.freeze({
|
|
|
38860
39130
|
addonId: null,
|
|
38861
39131
|
access: "create"
|
|
38862
39132
|
},
|
|
39133
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39134
|
+
capName: "pipeline-analytics",
|
|
39135
|
+
capScope: "device",
|
|
39136
|
+
addonId: null,
|
|
39137
|
+
access: "view"
|
|
39138
|
+
},
|
|
38863
39139
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38864
39140
|
capName: "pipeline-analytics",
|
|
38865
39141
|
capScope: "device",
|
|
@@ -39532,6 +39808,12 @@ Object.freeze({
|
|
|
39532
39808
|
addonId: null,
|
|
39533
39809
|
access: "create"
|
|
39534
39810
|
},
|
|
39811
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39812
|
+
capName: "pipeline-runner",
|
|
39813
|
+
capScope: "system",
|
|
39814
|
+
addonId: null,
|
|
39815
|
+
access: "create"
|
|
39816
|
+
},
|
|
39535
39817
|
"pipelineRunner.runDetailSubtree": {
|
|
39536
39818
|
capName: "pipeline-runner",
|
|
39537
39819
|
capScope: "system",
|
|
@@ -42312,11 +42594,21 @@ Object.freeze({
|
|
|
42312
42594
|
form: "single",
|
|
42313
42595
|
optional: false
|
|
42314
42596
|
}],
|
|
42597
|
+
"nativeObjectDetection.getOptions": [{
|
|
42598
|
+
name: "deviceId",
|
|
42599
|
+
form: "single",
|
|
42600
|
+
optional: false
|
|
42601
|
+
}],
|
|
42315
42602
|
"nativeObjectDetection.setEnabled": [{
|
|
42316
42603
|
name: "deviceId",
|
|
42317
42604
|
form: "single",
|
|
42318
42605
|
optional: false
|
|
42319
42606
|
}],
|
|
42607
|
+
"nativeObjectDetection.setSettings": [{
|
|
42608
|
+
name: "deviceId",
|
|
42609
|
+
form: "single",
|
|
42610
|
+
optional: false
|
|
42611
|
+
}],
|
|
42320
42612
|
"navigation.getFeatures": [{
|
|
42321
42613
|
name: "deviceId",
|
|
42322
42614
|
form: "single",
|
|
@@ -42666,6 +42958,11 @@ Object.freeze({
|
|
|
42666
42958
|
form: "single",
|
|
42667
42959
|
optional: false
|
|
42668
42960
|
}],
|
|
42961
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42962
|
+
name: "deviceId",
|
|
42963
|
+
form: "single",
|
|
42964
|
+
optional: false
|
|
42965
|
+
}],
|
|
42669
42966
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42670
42967
|
name: "deviceId",
|
|
42671
42968
|
form: "single",
|
|
@@ -42856,6 +43153,11 @@ Object.freeze({
|
|
|
42856
43153
|
form: "single",
|
|
42857
43154
|
optional: false
|
|
42858
43155
|
}],
|
|
43156
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43157
|
+
name: "deviceId",
|
|
43158
|
+
form: "single",
|
|
43159
|
+
optional: false
|
|
43160
|
+
}],
|
|
42859
43161
|
"pipelineRunner.runDetailSubtree": [{
|
|
42860
43162
|
name: "deviceId",
|
|
42861
43163
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-matter-broker",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.102",
|
|
4
4
|
"description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"dev": "vite build --watch",
|
|
68
68
|
"typecheck": "tsc --noEmit",
|
|
69
69
|
"test": "vitest run",
|
|
70
|
-
"publish": "npm publish --access public"
|
|
70
|
+
"publish:npm": "npm publish --access public"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@camstack/types": "*",
|