@camstack/addon-provider-wyze 0.2.106 → 0.2.107
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
|
@@ -5392,7 +5392,7 @@ var ZodIssueCode = {
|
|
|
5392
5392
|
var ZodFirstPartyTypeKind;
|
|
5393
5393
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5394
5394
|
//#endregion
|
|
5395
|
-
//#region ../types/dist/sleep-
|
|
5395
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5396
5396
|
/**
|
|
5397
5397
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5398
5398
|
* window to float samples (D455).
|
|
@@ -11594,6 +11594,21 @@ var streamSignalsCapability = {
|
|
|
11594
11594
|
mode: "singleton",
|
|
11595
11595
|
deviceTypes: Object.values(DeviceType),
|
|
11596
11596
|
runtimeState: StreamSignalsStatusSchema,
|
|
11597
|
+
/**
|
|
11598
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11599
|
+
*
|
|
11600
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11601
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11602
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11603
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11604
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11605
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11606
|
+
* because the fix could not reach it.
|
|
11607
|
+
*
|
|
11608
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11609
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11610
|
+
*/
|
|
11611
|
+
durability: "session",
|
|
11597
11612
|
methods: {
|
|
11598
11613
|
/**
|
|
11599
11614
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18225,6 +18240,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18225
18240
|
settings: NcAlarmSettingsSchema,
|
|
18226
18241
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18227
18242
|
});
|
|
18243
|
+
/**
|
|
18244
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18245
|
+
*
|
|
18246
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18247
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18248
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18249
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18250
|
+
* a different thing from never having been told, and only the envelope
|
|
18251
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18252
|
+
*/
|
|
18253
|
+
var NcClipRetentionAskSchema = object({
|
|
18254
|
+
/**
|
|
18255
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18256
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18257
|
+
* asking everywhere.
|
|
18258
|
+
*/
|
|
18259
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18260
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18261
|
+
* needs nothing produces no ask at all. */
|
|
18262
|
+
seconds: number().min(0).max(60),
|
|
18263
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18264
|
+
* assigned, which is what the cut defaults to. */
|
|
18265
|
+
profile: CamProfileSchema.optional(),
|
|
18266
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18267
|
+
ruleId: string(),
|
|
18268
|
+
ruleName: string(),
|
|
18269
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18270
|
+
reason: _enum(["window", "occupancy"])
|
|
18271
|
+
});
|
|
18272
|
+
/**
|
|
18273
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18274
|
+
*
|
|
18275
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18276
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18277
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18278
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18279
|
+
* footage this mechanism exists to keep.
|
|
18280
|
+
*/
|
|
18281
|
+
var NcClipRetentionPlanSchema = object({
|
|
18282
|
+
rulesLoaded: boolean(),
|
|
18283
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18284
|
+
});
|
|
18228
18285
|
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 }), {
|
|
18229
18286
|
kind: "mutation",
|
|
18230
18287
|
auth: "admin",
|
|
@@ -18245,7 +18302,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18245
18302
|
}), object({ success: literal(true) }), {
|
|
18246
18303
|
kind: "mutation",
|
|
18247
18304
|
auth: "admin"
|
|
18248
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18305
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18249
18306
|
deviceId: number().int(),
|
|
18250
18307
|
muted: boolean()
|
|
18251
18308
|
}), object({ success: literal(true) }), {
|
|
@@ -20819,6 +20876,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20819
20876
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20820
20877
|
framesMatched: number().int()
|
|
20821
20878
|
})).readonly() });
|
|
20879
|
+
/**
|
|
20880
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20881
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20882
|
+
* is an alias of this, not a second list.
|
|
20883
|
+
*/
|
|
20884
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20885
|
+
"motion",
|
|
20886
|
+
"audio-dbfs",
|
|
20887
|
+
"battery",
|
|
20888
|
+
"occupancy"
|
|
20889
|
+
]);
|
|
20890
|
+
/**
|
|
20891
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20892
|
+
*
|
|
20893
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20894
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20895
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20896
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20897
|
+
*/
|
|
20898
|
+
var LtsBucketSchema = object({
|
|
20899
|
+
scope: string(),
|
|
20900
|
+
bucketStart: number().int(),
|
|
20901
|
+
samples: number().int().nonnegative(),
|
|
20902
|
+
sum: number(),
|
|
20903
|
+
min: number(),
|
|
20904
|
+
max: number()
|
|
20905
|
+
});
|
|
20822
20906
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20823
20907
|
deviceId: number(),
|
|
20824
20908
|
trackId: string()
|
|
@@ -20865,6 +20949,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20865
20949
|
kinds: array(string()).optional(),
|
|
20866
20950
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20867
20951
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20952
|
+
deviceId: number(),
|
|
20953
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20954
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20955
|
+
scope: string().optional(),
|
|
20956
|
+
from: number(),
|
|
20957
|
+
to: number(),
|
|
20958
|
+
limit: number().int().positive().optional()
|
|
20959
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20868
20960
|
deviceId: number(),
|
|
20869
20961
|
since: number(),
|
|
20870
20962
|
until: number(),
|
|
@@ -21483,6 +21575,14 @@ var MotionSourceEnum = _enum([
|
|
|
21483
21575
|
*/
|
|
21484
21576
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21485
21577
|
/**
|
|
21578
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21579
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21580
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21581
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21582
|
+
* row.
|
|
21583
|
+
*/
|
|
21584
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21585
|
+
/**
|
|
21486
21586
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21487
21587
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21488
21588
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21633,6 +21733,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21633
21733
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21634
21734
|
*/
|
|
21635
21735
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21736
|
+
/**
|
|
21737
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21738
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21739
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21740
|
+
*
|
|
21741
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21742
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21743
|
+
* here. Its boxes reach post-analysis on the same
|
|
21744
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21745
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21746
|
+
* subtree (face / plate / embedding).
|
|
21747
|
+
*
|
|
21748
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21749
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21750
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21751
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21752
|
+
*
|
|
21753
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21754
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21755
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21756
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21757
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21758
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21759
|
+
*
|
|
21760
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21761
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21762
|
+
* default.
|
|
21763
|
+
*/
|
|
21764
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21636
21765
|
pipelineEnabled: boolean().default(true),
|
|
21637
21766
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21638
21767
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21814,7 +21943,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21814
21943
|
queueDepth: number(),
|
|
21815
21944
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21816
21945
|
});
|
|
21946
|
+
/**
|
|
21947
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21948
|
+
*
|
|
21949
|
+
* One instance per node. Receives camera assignments from
|
|
21950
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21951
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21952
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21953
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21954
|
+
* the bus.
|
|
21955
|
+
*
|
|
21956
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21957
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21958
|
+
* makes assignment decisions itself.
|
|
21959
|
+
*/
|
|
21960
|
+
/**
|
|
21961
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21962
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21963
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21964
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21965
|
+
*/
|
|
21966
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21967
|
+
"not-attached",
|
|
21968
|
+
"battery-asleep",
|
|
21969
|
+
"not-watching",
|
|
21970
|
+
"already-bursting"
|
|
21971
|
+
]);
|
|
21817
21972
|
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({
|
|
21973
|
+
deviceId: number(),
|
|
21974
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21975
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21976
|
+
frames: number().int().positive().optional(),
|
|
21977
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21978
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21979
|
+
reason: string()
|
|
21980
|
+
}), object({
|
|
21981
|
+
started: boolean(),
|
|
21982
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21983
|
+
}), {
|
|
21984
|
+
auth: "admin",
|
|
21985
|
+
kind: "mutation"
|
|
21986
|
+
}), method(object({
|
|
21818
21987
|
handle: FrameHandleSchema,
|
|
21819
21988
|
bbox: NativeCropBboxSchema,
|
|
21820
21989
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28756,11 +28925,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28756
28925
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28757
28926
|
/**
|
|
28758
28927
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28759
|
-
*
|
|
28760
|
-
*
|
|
28928
|
+
*
|
|
28929
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28930
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28931
|
+
* other detection choice is made. `geometry` on
|
|
28932
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28933
|
+
* choice would buy this particular camera.
|
|
28761
28934
|
*/
|
|
28762
28935
|
enabled: boolean()
|
|
28763
28936
|
});
|
|
28937
|
+
/**
|
|
28938
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28939
|
+
*
|
|
28940
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28941
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28942
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28943
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28944
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28945
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28946
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28947
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28948
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28949
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28950
|
+
* tracker as motion and no further.
|
|
28951
|
+
*
|
|
28952
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28953
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28954
|
+
* derived form is only as honest as `getOptions`).
|
|
28955
|
+
*/
|
|
28956
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28957
|
+
"boxed",
|
|
28958
|
+
"while-streaming",
|
|
28959
|
+
"flag-only"
|
|
28960
|
+
]);
|
|
28961
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28962
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28963
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28964
|
+
/** What a detection from this camera carries. */
|
|
28965
|
+
geometry: NativeObjectGeometryEnum
|
|
28966
|
+
});
|
|
28967
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28764
28968
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28765
28969
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28766
28970
|
lastFetchedAt: number() });
|
|
@@ -28770,13 +28974,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28770
28974
|
deviceNative: true,
|
|
28771
28975
|
mode: "singleton",
|
|
28772
28976
|
deviceTypes: [DeviceType.Camera],
|
|
28773
|
-
methods: {
|
|
28774
|
-
deviceId: number(),
|
|
28775
|
-
|
|
28776
|
-
|
|
28777
|
-
|
|
28778
|
-
|
|
28779
|
-
|
|
28977
|
+
methods: {
|
|
28978
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28979
|
+
setSettings: method(object({
|
|
28980
|
+
deviceId: number(),
|
|
28981
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28982
|
+
}), _void(), {
|
|
28983
|
+
kind: "mutation",
|
|
28984
|
+
auth: "admin"
|
|
28985
|
+
}),
|
|
28986
|
+
setEnabled: method(object({
|
|
28987
|
+
deviceId: number(),
|
|
28988
|
+
enabled: boolean()
|
|
28989
|
+
}), _void(), {
|
|
28990
|
+
kind: "mutation",
|
|
28991
|
+
auth: "admin"
|
|
28992
|
+
})
|
|
28993
|
+
},
|
|
28780
28994
|
events: { onDetected: { data: object({
|
|
28781
28995
|
deviceId: number(),
|
|
28782
28996
|
detection: NativeDetectionSchema
|
|
@@ -33624,7 +33838,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33624
33838
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33625
33839
|
totalObjects: number().int().nonnegative(),
|
|
33626
33840
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33627
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33841
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33842
|
+
/**
|
|
33843
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33844
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33845
|
+
*
|
|
33846
|
+
* The operator's question about a scene has two halves and they answer
|
|
33847
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33848
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33849
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33850
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33851
|
+
*
|
|
33852
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33853
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33854
|
+
*
|
|
33855
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33856
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33857
|
+
* parked objects here" about a camera whose lot is full.
|
|
33858
|
+
*/
|
|
33859
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33860
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33861
|
+
* same absence rule. */
|
|
33862
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33628
33863
|
});
|
|
33629
33864
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33630
33865
|
zoneId: string(),
|
|
@@ -33747,6 +33982,23 @@ var HistoryPointSchema = object({
|
|
|
33747
33982
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33748
33983
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33749
33984
|
* combinatorial coverage the operator UI requested.
|
|
33985
|
+
*
|
|
33986
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33987
|
+
*
|
|
33988
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33989
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33990
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33991
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33992
|
+
* horizon rather than to answer a question.
|
|
33993
|
+
*
|
|
33994
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33995
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33996
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33997
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33998
|
+
* function the writer uses, so the two cannot drift.
|
|
33999
|
+
*
|
|
34000
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34001
|
+
* it. Do not add a fourth caller.
|
|
33750
34002
|
*/
|
|
33751
34003
|
var zoneAnalyticsCapability = {
|
|
33752
34004
|
name: "zone-analytics",
|
|
@@ -38146,12 +38398,24 @@ Object.freeze({
|
|
|
38146
38398
|
addonId: null,
|
|
38147
38399
|
access: "create"
|
|
38148
38400
|
},
|
|
38401
|
+
"nativeObjectDetection.getOptions": {
|
|
38402
|
+
capName: "native-object-detection",
|
|
38403
|
+
capScope: "device",
|
|
38404
|
+
addonId: null,
|
|
38405
|
+
access: "view"
|
|
38406
|
+
},
|
|
38149
38407
|
"nativeObjectDetection.setEnabled": {
|
|
38150
38408
|
capName: "native-object-detection",
|
|
38151
38409
|
capScope: "device",
|
|
38152
38410
|
addonId: null,
|
|
38153
38411
|
access: "create"
|
|
38154
38412
|
},
|
|
38413
|
+
"nativeObjectDetection.setSettings": {
|
|
38414
|
+
capName: "native-object-detection",
|
|
38415
|
+
capScope: "device",
|
|
38416
|
+
addonId: null,
|
|
38417
|
+
access: "create"
|
|
38418
|
+
},
|
|
38155
38419
|
"navigation.getFeatures": {
|
|
38156
38420
|
capName: "navigation",
|
|
38157
38421
|
capScope: "device",
|
|
@@ -38416,6 +38680,12 @@ Object.freeze({
|
|
|
38416
38680
|
addonId: null,
|
|
38417
38681
|
access: "view"
|
|
38418
38682
|
},
|
|
38683
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38684
|
+
capName: "notification-rules",
|
|
38685
|
+
capScope: "system",
|
|
38686
|
+
addonId: null,
|
|
38687
|
+
access: "view"
|
|
38688
|
+
},
|
|
38419
38689
|
"notificationRules.getConditionCatalog": {
|
|
38420
38690
|
capName: "notification-rules",
|
|
38421
38691
|
capScope: "system",
|
|
@@ -38926,6 +39196,12 @@ Object.freeze({
|
|
|
38926
39196
|
addonId: null,
|
|
38927
39197
|
access: "create"
|
|
38928
39198
|
},
|
|
39199
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39200
|
+
capName: "pipeline-analytics",
|
|
39201
|
+
capScope: "device",
|
|
39202
|
+
addonId: null,
|
|
39203
|
+
access: "view"
|
|
39204
|
+
},
|
|
38929
39205
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38930
39206
|
capName: "pipeline-analytics",
|
|
38931
39207
|
capScope: "device",
|
|
@@ -39598,6 +39874,12 @@ Object.freeze({
|
|
|
39598
39874
|
addonId: null,
|
|
39599
39875
|
access: "create"
|
|
39600
39876
|
},
|
|
39877
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39878
|
+
capName: "pipeline-runner",
|
|
39879
|
+
capScope: "system",
|
|
39880
|
+
addonId: null,
|
|
39881
|
+
access: "create"
|
|
39882
|
+
},
|
|
39601
39883
|
"pipelineRunner.runDetailSubtree": {
|
|
39602
39884
|
capName: "pipeline-runner",
|
|
39603
39885
|
capScope: "system",
|
|
@@ -42378,11 +42660,21 @@ Object.freeze({
|
|
|
42378
42660
|
form: "single",
|
|
42379
42661
|
optional: false
|
|
42380
42662
|
}],
|
|
42663
|
+
"nativeObjectDetection.getOptions": [{
|
|
42664
|
+
name: "deviceId",
|
|
42665
|
+
form: "single",
|
|
42666
|
+
optional: false
|
|
42667
|
+
}],
|
|
42381
42668
|
"nativeObjectDetection.setEnabled": [{
|
|
42382
42669
|
name: "deviceId",
|
|
42383
42670
|
form: "single",
|
|
42384
42671
|
optional: false
|
|
42385
42672
|
}],
|
|
42673
|
+
"nativeObjectDetection.setSettings": [{
|
|
42674
|
+
name: "deviceId",
|
|
42675
|
+
form: "single",
|
|
42676
|
+
optional: false
|
|
42677
|
+
}],
|
|
42386
42678
|
"navigation.getFeatures": [{
|
|
42387
42679
|
name: "deviceId",
|
|
42388
42680
|
form: "single",
|
|
@@ -42732,6 +43024,11 @@ Object.freeze({
|
|
|
42732
43024
|
form: "single",
|
|
42733
43025
|
optional: false
|
|
42734
43026
|
}],
|
|
43027
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43028
|
+
name: "deviceId",
|
|
43029
|
+
form: "single",
|
|
43030
|
+
optional: false
|
|
43031
|
+
}],
|
|
42735
43032
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42736
43033
|
name: "deviceId",
|
|
42737
43034
|
form: "single",
|
|
@@ -42922,6 +43219,11 @@ Object.freeze({
|
|
|
42922
43219
|
form: "single",
|
|
42923
43220
|
optional: false
|
|
42924
43221
|
}],
|
|
43222
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43223
|
+
name: "deviceId",
|
|
43224
|
+
form: "single",
|
|
43225
|
+
optional: false
|
|
43226
|
+
}],
|
|
42925
43227
|
"pipelineRunner.runDetailSubtree": [{
|
|
42926
43228
|
name: "deviceId",
|
|
42927
43229
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5371,7 +5371,7 @@ var ZodIssueCode = {
|
|
|
5371
5371
|
var ZodFirstPartyTypeKind;
|
|
5372
5372
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5373
5373
|
//#endregion
|
|
5374
|
-
//#region ../types/dist/sleep-
|
|
5374
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5375
5375
|
/**
|
|
5376
5376
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5377
5377
|
* window to float samples (D455).
|
|
@@ -11573,6 +11573,21 @@ var streamSignalsCapability = {
|
|
|
11573
11573
|
mode: "singleton",
|
|
11574
11574
|
deviceTypes: Object.values(DeviceType),
|
|
11575
11575
|
runtimeState: StreamSignalsStatusSchema,
|
|
11576
|
+
/**
|
|
11577
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11578
|
+
*
|
|
11579
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11580
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11581
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11582
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11583
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11584
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11585
|
+
* because the fix could not reach it.
|
|
11586
|
+
*
|
|
11587
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11588
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11589
|
+
*/
|
|
11590
|
+
durability: "session",
|
|
11576
11591
|
methods: {
|
|
11577
11592
|
/**
|
|
11578
11593
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18204,6 +18219,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18204
18219
|
settings: NcAlarmSettingsSchema,
|
|
18205
18220
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18206
18221
|
});
|
|
18222
|
+
/**
|
|
18223
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18224
|
+
*
|
|
18225
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18226
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18227
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18228
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18229
|
+
* a different thing from never having been told, and only the envelope
|
|
18230
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18231
|
+
*/
|
|
18232
|
+
var NcClipRetentionAskSchema = object({
|
|
18233
|
+
/**
|
|
18234
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18235
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18236
|
+
* asking everywhere.
|
|
18237
|
+
*/
|
|
18238
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18239
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18240
|
+
* needs nothing produces no ask at all. */
|
|
18241
|
+
seconds: number().min(0).max(60),
|
|
18242
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18243
|
+
* assigned, which is what the cut defaults to. */
|
|
18244
|
+
profile: CamProfileSchema.optional(),
|
|
18245
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18246
|
+
ruleId: string(),
|
|
18247
|
+
ruleName: string(),
|
|
18248
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18249
|
+
reason: _enum(["window", "occupancy"])
|
|
18250
|
+
});
|
|
18251
|
+
/**
|
|
18252
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18253
|
+
*
|
|
18254
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18255
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18256
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18257
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18258
|
+
* footage this mechanism exists to keep.
|
|
18259
|
+
*/
|
|
18260
|
+
var NcClipRetentionPlanSchema = object({
|
|
18261
|
+
rulesLoaded: boolean(),
|
|
18262
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18263
|
+
});
|
|
18207
18264
|
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 }), {
|
|
18208
18265
|
kind: "mutation",
|
|
18209
18266
|
auth: "admin",
|
|
@@ -18224,7 +18281,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18224
18281
|
}), object({ success: literal(true) }), {
|
|
18225
18282
|
kind: "mutation",
|
|
18226
18283
|
auth: "admin"
|
|
18227
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18284
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18228
18285
|
deviceId: number().int(),
|
|
18229
18286
|
muted: boolean()
|
|
18230
18287
|
}), object({ success: literal(true) }), {
|
|
@@ -20798,6 +20855,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20798
20855
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20799
20856
|
framesMatched: number().int()
|
|
20800
20857
|
})).readonly() });
|
|
20858
|
+
/**
|
|
20859
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20860
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20861
|
+
* is an alias of this, not a second list.
|
|
20862
|
+
*/
|
|
20863
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20864
|
+
"motion",
|
|
20865
|
+
"audio-dbfs",
|
|
20866
|
+
"battery",
|
|
20867
|
+
"occupancy"
|
|
20868
|
+
]);
|
|
20869
|
+
/**
|
|
20870
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20871
|
+
*
|
|
20872
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20873
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20874
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20875
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20876
|
+
*/
|
|
20877
|
+
var LtsBucketSchema = object({
|
|
20878
|
+
scope: string(),
|
|
20879
|
+
bucketStart: number().int(),
|
|
20880
|
+
samples: number().int().nonnegative(),
|
|
20881
|
+
sum: number(),
|
|
20882
|
+
min: number(),
|
|
20883
|
+
max: number()
|
|
20884
|
+
});
|
|
20801
20885
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20802
20886
|
deviceId: number(),
|
|
20803
20887
|
trackId: string()
|
|
@@ -20844,6 +20928,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20844
20928
|
kinds: array(string()).optional(),
|
|
20845
20929
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20846
20930
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20931
|
+
deviceId: number(),
|
|
20932
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20933
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20934
|
+
scope: string().optional(),
|
|
20935
|
+
from: number(),
|
|
20936
|
+
to: number(),
|
|
20937
|
+
limit: number().int().positive().optional()
|
|
20938
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20847
20939
|
deviceId: number(),
|
|
20848
20940
|
since: number(),
|
|
20849
20941
|
until: number(),
|
|
@@ -21462,6 +21554,14 @@ var MotionSourceEnum = _enum([
|
|
|
21462
21554
|
*/
|
|
21463
21555
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21464
21556
|
/**
|
|
21557
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21558
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21559
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21560
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21561
|
+
* row.
|
|
21562
|
+
*/
|
|
21563
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21564
|
+
/**
|
|
21465
21565
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21466
21566
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21467
21567
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21612,6 +21712,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21612
21712
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21613
21713
|
*/
|
|
21614
21714
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21715
|
+
/**
|
|
21716
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21717
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21718
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21719
|
+
*
|
|
21720
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21721
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21722
|
+
* here. Its boxes reach post-analysis on the same
|
|
21723
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21724
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21725
|
+
* subtree (face / plate / embedding).
|
|
21726
|
+
*
|
|
21727
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21728
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21729
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21730
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21731
|
+
*
|
|
21732
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21733
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21734
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21735
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21736
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21737
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21738
|
+
*
|
|
21739
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21740
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21741
|
+
* default.
|
|
21742
|
+
*/
|
|
21743
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21615
21744
|
pipelineEnabled: boolean().default(true),
|
|
21616
21745
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21617
21746
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21793,7 +21922,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21793
21922
|
queueDepth: number(),
|
|
21794
21923
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21795
21924
|
});
|
|
21925
|
+
/**
|
|
21926
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21927
|
+
*
|
|
21928
|
+
* One instance per node. Receives camera assignments from
|
|
21929
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21930
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21931
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21932
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21933
|
+
* the bus.
|
|
21934
|
+
*
|
|
21935
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21936
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21937
|
+
* makes assignment decisions itself.
|
|
21938
|
+
*/
|
|
21939
|
+
/**
|
|
21940
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21941
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21942
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21943
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21944
|
+
*/
|
|
21945
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21946
|
+
"not-attached",
|
|
21947
|
+
"battery-asleep",
|
|
21948
|
+
"not-watching",
|
|
21949
|
+
"already-bursting"
|
|
21950
|
+
]);
|
|
21796
21951
|
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({
|
|
21952
|
+
deviceId: number(),
|
|
21953
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21954
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21955
|
+
frames: number().int().positive().optional(),
|
|
21956
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21957
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21958
|
+
reason: string()
|
|
21959
|
+
}), object({
|
|
21960
|
+
started: boolean(),
|
|
21961
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21962
|
+
}), {
|
|
21963
|
+
auth: "admin",
|
|
21964
|
+
kind: "mutation"
|
|
21965
|
+
}), method(object({
|
|
21797
21966
|
handle: FrameHandleSchema,
|
|
21798
21967
|
bbox: NativeCropBboxSchema,
|
|
21799
21968
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28735,11 +28904,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28735
28904
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28736
28905
|
/**
|
|
28737
28906
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28738
|
-
*
|
|
28739
|
-
*
|
|
28907
|
+
*
|
|
28908
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28909
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28910
|
+
* other detection choice is made. `geometry` on
|
|
28911
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28912
|
+
* choice would buy this particular camera.
|
|
28740
28913
|
*/
|
|
28741
28914
|
enabled: boolean()
|
|
28742
28915
|
});
|
|
28916
|
+
/**
|
|
28917
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28918
|
+
*
|
|
28919
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28920
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28921
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28922
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28923
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28924
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28925
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28926
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28927
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28928
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28929
|
+
* tracker as motion and no further.
|
|
28930
|
+
*
|
|
28931
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28932
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28933
|
+
* derived form is only as honest as `getOptions`).
|
|
28934
|
+
*/
|
|
28935
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28936
|
+
"boxed",
|
|
28937
|
+
"while-streaming",
|
|
28938
|
+
"flag-only"
|
|
28939
|
+
]);
|
|
28940
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28941
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28942
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28943
|
+
/** What a detection from this camera carries. */
|
|
28944
|
+
geometry: NativeObjectGeometryEnum
|
|
28945
|
+
});
|
|
28946
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28743
28947
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28744
28948
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28745
28949
|
lastFetchedAt: number() });
|
|
@@ -28749,13 +28953,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28749
28953
|
deviceNative: true,
|
|
28750
28954
|
mode: "singleton",
|
|
28751
28955
|
deviceTypes: [DeviceType.Camera],
|
|
28752
|
-
methods: {
|
|
28753
|
-
deviceId: number(),
|
|
28754
|
-
|
|
28755
|
-
|
|
28756
|
-
|
|
28757
|
-
|
|
28758
|
-
|
|
28956
|
+
methods: {
|
|
28957
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28958
|
+
setSettings: method(object({
|
|
28959
|
+
deviceId: number(),
|
|
28960
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28961
|
+
}), _void(), {
|
|
28962
|
+
kind: "mutation",
|
|
28963
|
+
auth: "admin"
|
|
28964
|
+
}),
|
|
28965
|
+
setEnabled: method(object({
|
|
28966
|
+
deviceId: number(),
|
|
28967
|
+
enabled: boolean()
|
|
28968
|
+
}), _void(), {
|
|
28969
|
+
kind: "mutation",
|
|
28970
|
+
auth: "admin"
|
|
28971
|
+
})
|
|
28972
|
+
},
|
|
28759
28973
|
events: { onDetected: { data: object({
|
|
28760
28974
|
deviceId: number(),
|
|
28761
28975
|
detection: NativeDetectionSchema
|
|
@@ -33603,7 +33817,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33603
33817
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33604
33818
|
totalObjects: number().int().nonnegative(),
|
|
33605
33819
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33606
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33820
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33821
|
+
/**
|
|
33822
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33823
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33824
|
+
*
|
|
33825
|
+
* The operator's question about a scene has two halves and they answer
|
|
33826
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33827
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33828
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33829
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33830
|
+
*
|
|
33831
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33832
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33833
|
+
*
|
|
33834
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33835
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33836
|
+
* parked objects here" about a camera whose lot is full.
|
|
33837
|
+
*/
|
|
33838
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33839
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33840
|
+
* same absence rule. */
|
|
33841
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33607
33842
|
});
|
|
33608
33843
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33609
33844
|
zoneId: string(),
|
|
@@ -33726,6 +33961,23 @@ var HistoryPointSchema = object({
|
|
|
33726
33961
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33727
33962
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33728
33963
|
* combinatorial coverage the operator UI requested.
|
|
33964
|
+
*
|
|
33965
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33966
|
+
*
|
|
33967
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33968
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33969
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33970
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33971
|
+
* horizon rather than to answer a question.
|
|
33972
|
+
*
|
|
33973
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33974
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33975
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33976
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33977
|
+
* function the writer uses, so the two cannot drift.
|
|
33978
|
+
*
|
|
33979
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33980
|
+
* it. Do not add a fourth caller.
|
|
33729
33981
|
*/
|
|
33730
33982
|
var zoneAnalyticsCapability = {
|
|
33731
33983
|
name: "zone-analytics",
|
|
@@ -38125,12 +38377,24 @@ Object.freeze({
|
|
|
38125
38377
|
addonId: null,
|
|
38126
38378
|
access: "create"
|
|
38127
38379
|
},
|
|
38380
|
+
"nativeObjectDetection.getOptions": {
|
|
38381
|
+
capName: "native-object-detection",
|
|
38382
|
+
capScope: "device",
|
|
38383
|
+
addonId: null,
|
|
38384
|
+
access: "view"
|
|
38385
|
+
},
|
|
38128
38386
|
"nativeObjectDetection.setEnabled": {
|
|
38129
38387
|
capName: "native-object-detection",
|
|
38130
38388
|
capScope: "device",
|
|
38131
38389
|
addonId: null,
|
|
38132
38390
|
access: "create"
|
|
38133
38391
|
},
|
|
38392
|
+
"nativeObjectDetection.setSettings": {
|
|
38393
|
+
capName: "native-object-detection",
|
|
38394
|
+
capScope: "device",
|
|
38395
|
+
addonId: null,
|
|
38396
|
+
access: "create"
|
|
38397
|
+
},
|
|
38134
38398
|
"navigation.getFeatures": {
|
|
38135
38399
|
capName: "navigation",
|
|
38136
38400
|
capScope: "device",
|
|
@@ -38395,6 +38659,12 @@ Object.freeze({
|
|
|
38395
38659
|
addonId: null,
|
|
38396
38660
|
access: "view"
|
|
38397
38661
|
},
|
|
38662
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38663
|
+
capName: "notification-rules",
|
|
38664
|
+
capScope: "system",
|
|
38665
|
+
addonId: null,
|
|
38666
|
+
access: "view"
|
|
38667
|
+
},
|
|
38398
38668
|
"notificationRules.getConditionCatalog": {
|
|
38399
38669
|
capName: "notification-rules",
|
|
38400
38670
|
capScope: "system",
|
|
@@ -38905,6 +39175,12 @@ Object.freeze({
|
|
|
38905
39175
|
addonId: null,
|
|
38906
39176
|
access: "create"
|
|
38907
39177
|
},
|
|
39178
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39179
|
+
capName: "pipeline-analytics",
|
|
39180
|
+
capScope: "device",
|
|
39181
|
+
addonId: null,
|
|
39182
|
+
access: "view"
|
|
39183
|
+
},
|
|
38908
39184
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38909
39185
|
capName: "pipeline-analytics",
|
|
38910
39186
|
capScope: "device",
|
|
@@ -39577,6 +39853,12 @@ Object.freeze({
|
|
|
39577
39853
|
addonId: null,
|
|
39578
39854
|
access: "create"
|
|
39579
39855
|
},
|
|
39856
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39857
|
+
capName: "pipeline-runner",
|
|
39858
|
+
capScope: "system",
|
|
39859
|
+
addonId: null,
|
|
39860
|
+
access: "create"
|
|
39861
|
+
},
|
|
39580
39862
|
"pipelineRunner.runDetailSubtree": {
|
|
39581
39863
|
capName: "pipeline-runner",
|
|
39582
39864
|
capScope: "system",
|
|
@@ -42357,11 +42639,21 @@ Object.freeze({
|
|
|
42357
42639
|
form: "single",
|
|
42358
42640
|
optional: false
|
|
42359
42641
|
}],
|
|
42642
|
+
"nativeObjectDetection.getOptions": [{
|
|
42643
|
+
name: "deviceId",
|
|
42644
|
+
form: "single",
|
|
42645
|
+
optional: false
|
|
42646
|
+
}],
|
|
42360
42647
|
"nativeObjectDetection.setEnabled": [{
|
|
42361
42648
|
name: "deviceId",
|
|
42362
42649
|
form: "single",
|
|
42363
42650
|
optional: false
|
|
42364
42651
|
}],
|
|
42652
|
+
"nativeObjectDetection.setSettings": [{
|
|
42653
|
+
name: "deviceId",
|
|
42654
|
+
form: "single",
|
|
42655
|
+
optional: false
|
|
42656
|
+
}],
|
|
42365
42657
|
"navigation.getFeatures": [{
|
|
42366
42658
|
name: "deviceId",
|
|
42367
42659
|
form: "single",
|
|
@@ -42711,6 +43003,11 @@ Object.freeze({
|
|
|
42711
43003
|
form: "single",
|
|
42712
43004
|
optional: false
|
|
42713
43005
|
}],
|
|
43006
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43007
|
+
name: "deviceId",
|
|
43008
|
+
form: "single",
|
|
43009
|
+
optional: false
|
|
43010
|
+
}],
|
|
42714
43011
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42715
43012
|
name: "deviceId",
|
|
42716
43013
|
form: "single",
|
|
@@ -42901,6 +43198,11 @@ Object.freeze({
|
|
|
42901
43198
|
form: "single",
|
|
42902
43199
|
optional: false
|
|
42903
43200
|
}],
|
|
43201
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43202
|
+
name: "deviceId",
|
|
43203
|
+
form: "single",
|
|
43204
|
+
optional: false
|
|
43205
|
+
}],
|
|
42904
43206
|
"pipelineRunner.runDetailSubtree": [{
|
|
42905
43207
|
name: "deviceId",
|
|
42906
43208
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-wyze",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.107",
|
|
4
4
|
"description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"dev": "vite build --watch",
|
|
72
72
|
"typecheck": "tsc --noEmit",
|
|
73
73
|
"test": "vitest run",
|
|
74
|
-
"publish": "npm publish --access public"
|
|
74
|
+
"publish:npm": "npm publish --access public"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@apocaliss92/wyze-bridge-js": "file:./vendor/apocaliss92-wyze-bridge-js-0.1.2.tgz",
|