@camstack/addon-provider-gree 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
|
@@ -5363,7 +5363,7 @@ var ZodIssueCode = {
|
|
|
5363
5363
|
var ZodFirstPartyTypeKind;
|
|
5364
5364
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5365
5365
|
//#endregion
|
|
5366
|
-
//#region ../types/dist/sleep-
|
|
5366
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5367
5367
|
/**
|
|
5368
5368
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5369
5369
|
* window to float samples (D455).
|
|
@@ -11565,6 +11565,21 @@ var streamSignalsCapability = {
|
|
|
11565
11565
|
mode: "singleton",
|
|
11566
11566
|
deviceTypes: Object.values(DeviceType),
|
|
11567
11567
|
runtimeState: StreamSignalsStatusSchema,
|
|
11568
|
+
/**
|
|
11569
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11570
|
+
*
|
|
11571
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11572
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11573
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11574
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11575
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11576
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11577
|
+
* because the fix could not reach it.
|
|
11578
|
+
*
|
|
11579
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11580
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11581
|
+
*/
|
|
11582
|
+
durability: "session",
|
|
11568
11583
|
methods: {
|
|
11569
11584
|
/**
|
|
11570
11585
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18179,6 +18194,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18179
18194
|
settings: NcAlarmSettingsSchema,
|
|
18180
18195
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18181
18196
|
});
|
|
18197
|
+
/**
|
|
18198
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18199
|
+
*
|
|
18200
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18201
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18202
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18203
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18204
|
+
* a different thing from never having been told, and only the envelope
|
|
18205
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18206
|
+
*/
|
|
18207
|
+
var NcClipRetentionAskSchema = object({
|
|
18208
|
+
/**
|
|
18209
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18210
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18211
|
+
* asking everywhere.
|
|
18212
|
+
*/
|
|
18213
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18214
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18215
|
+
* needs nothing produces no ask at all. */
|
|
18216
|
+
seconds: number().min(0).max(60),
|
|
18217
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18218
|
+
* assigned, which is what the cut defaults to. */
|
|
18219
|
+
profile: CamProfileSchema.optional(),
|
|
18220
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18221
|
+
ruleId: string(),
|
|
18222
|
+
ruleName: string(),
|
|
18223
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18224
|
+
reason: _enum(["window", "occupancy"])
|
|
18225
|
+
});
|
|
18226
|
+
/**
|
|
18227
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18228
|
+
*
|
|
18229
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18230
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18231
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18232
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18233
|
+
* footage this mechanism exists to keep.
|
|
18234
|
+
*/
|
|
18235
|
+
var NcClipRetentionPlanSchema = object({
|
|
18236
|
+
rulesLoaded: boolean(),
|
|
18237
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18238
|
+
});
|
|
18182
18239
|
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 }), {
|
|
18183
18240
|
kind: "mutation",
|
|
18184
18241
|
auth: "admin",
|
|
@@ -18199,7 +18256,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18199
18256
|
}), object({ success: literal(true) }), {
|
|
18200
18257
|
kind: "mutation",
|
|
18201
18258
|
auth: "admin"
|
|
18202
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18259
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18203
18260
|
deviceId: number().int(),
|
|
18204
18261
|
muted: boolean()
|
|
18205
18262
|
}), object({ success: literal(true) }), {
|
|
@@ -20773,6 +20830,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20773
20830
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20774
20831
|
framesMatched: number().int()
|
|
20775
20832
|
})).readonly() });
|
|
20833
|
+
/**
|
|
20834
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20835
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20836
|
+
* is an alias of this, not a second list.
|
|
20837
|
+
*/
|
|
20838
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20839
|
+
"motion",
|
|
20840
|
+
"audio-dbfs",
|
|
20841
|
+
"battery",
|
|
20842
|
+
"occupancy"
|
|
20843
|
+
]);
|
|
20844
|
+
/**
|
|
20845
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20846
|
+
*
|
|
20847
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20848
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20849
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20850
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20851
|
+
*/
|
|
20852
|
+
var LtsBucketSchema = object({
|
|
20853
|
+
scope: string(),
|
|
20854
|
+
bucketStart: number().int(),
|
|
20855
|
+
samples: number().int().nonnegative(),
|
|
20856
|
+
sum: number(),
|
|
20857
|
+
min: number(),
|
|
20858
|
+
max: number()
|
|
20859
|
+
});
|
|
20776
20860
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20777
20861
|
deviceId: number(),
|
|
20778
20862
|
trackId: string()
|
|
@@ -20819,6 +20903,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20819
20903
|
kinds: array(string()).optional(),
|
|
20820
20904
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20821
20905
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20906
|
+
deviceId: number(),
|
|
20907
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20908
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20909
|
+
scope: string().optional(),
|
|
20910
|
+
from: number(),
|
|
20911
|
+
to: number(),
|
|
20912
|
+
limit: number().int().positive().optional()
|
|
20913
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20822
20914
|
deviceId: number(),
|
|
20823
20915
|
since: number(),
|
|
20824
20916
|
until: number(),
|
|
@@ -21437,6 +21529,14 @@ var MotionSourceEnum = _enum([
|
|
|
21437
21529
|
*/
|
|
21438
21530
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21439
21531
|
/**
|
|
21532
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21533
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21534
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21535
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21536
|
+
* row.
|
|
21537
|
+
*/
|
|
21538
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21539
|
+
/**
|
|
21440
21540
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21441
21541
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21442
21542
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21587,6 +21687,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21587
21687
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21588
21688
|
*/
|
|
21589
21689
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21690
|
+
/**
|
|
21691
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21692
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21693
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21694
|
+
*
|
|
21695
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21696
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21697
|
+
* here. Its boxes reach post-analysis on the same
|
|
21698
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21699
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21700
|
+
* subtree (face / plate / embedding).
|
|
21701
|
+
*
|
|
21702
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21703
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21704
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21705
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21706
|
+
*
|
|
21707
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21708
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21709
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21710
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21711
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21712
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21713
|
+
*
|
|
21714
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21715
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21716
|
+
* default.
|
|
21717
|
+
*/
|
|
21718
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21590
21719
|
pipelineEnabled: boolean().default(true),
|
|
21591
21720
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21592
21721
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21768,7 +21897,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21768
21897
|
queueDepth: number(),
|
|
21769
21898
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21770
21899
|
});
|
|
21900
|
+
/**
|
|
21901
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21902
|
+
*
|
|
21903
|
+
* One instance per node. Receives camera assignments from
|
|
21904
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21905
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21906
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21907
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21908
|
+
* the bus.
|
|
21909
|
+
*
|
|
21910
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21911
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21912
|
+
* makes assignment decisions itself.
|
|
21913
|
+
*/
|
|
21914
|
+
/**
|
|
21915
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21916
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21917
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21918
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21919
|
+
*/
|
|
21920
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21921
|
+
"not-attached",
|
|
21922
|
+
"battery-asleep",
|
|
21923
|
+
"not-watching",
|
|
21924
|
+
"already-bursting"
|
|
21925
|
+
]);
|
|
21771
21926
|
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({
|
|
21927
|
+
deviceId: number(),
|
|
21928
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21929
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21930
|
+
frames: number().int().positive().optional(),
|
|
21931
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21932
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21933
|
+
reason: string()
|
|
21934
|
+
}), object({
|
|
21935
|
+
started: boolean(),
|
|
21936
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21937
|
+
}), {
|
|
21938
|
+
auth: "admin",
|
|
21939
|
+
kind: "mutation"
|
|
21940
|
+
}), method(object({
|
|
21772
21941
|
handle: FrameHandleSchema,
|
|
21773
21942
|
bbox: NativeCropBboxSchema,
|
|
21774
21943
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28598,11 +28767,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28598
28767
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28599
28768
|
/**
|
|
28600
28769
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28601
|
-
*
|
|
28602
|
-
*
|
|
28770
|
+
*
|
|
28771
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28772
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28773
|
+
* other detection choice is made. `geometry` on
|
|
28774
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28775
|
+
* choice would buy this particular camera.
|
|
28603
28776
|
*/
|
|
28604
28777
|
enabled: boolean()
|
|
28605
28778
|
});
|
|
28779
|
+
/**
|
|
28780
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28781
|
+
*
|
|
28782
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28783
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28784
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28785
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28786
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28787
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28788
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28789
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28790
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28791
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28792
|
+
* tracker as motion and no further.
|
|
28793
|
+
*
|
|
28794
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28795
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28796
|
+
* derived form is only as honest as `getOptions`).
|
|
28797
|
+
*/
|
|
28798
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28799
|
+
"boxed",
|
|
28800
|
+
"while-streaming",
|
|
28801
|
+
"flag-only"
|
|
28802
|
+
]);
|
|
28803
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28804
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28805
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28806
|
+
/** What a detection from this camera carries. */
|
|
28807
|
+
geometry: NativeObjectGeometryEnum
|
|
28808
|
+
});
|
|
28809
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28606
28810
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28607
28811
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28608
28812
|
lastFetchedAt: number() });
|
|
@@ -28612,13 +28816,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28612
28816
|
deviceNative: true,
|
|
28613
28817
|
mode: "singleton",
|
|
28614
28818
|
deviceTypes: [DeviceType.Camera],
|
|
28615
|
-
methods: {
|
|
28616
|
-
deviceId: number(),
|
|
28617
|
-
|
|
28618
|
-
|
|
28619
|
-
|
|
28620
|
-
|
|
28621
|
-
|
|
28819
|
+
methods: {
|
|
28820
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28821
|
+
setSettings: method(object({
|
|
28822
|
+
deviceId: number(),
|
|
28823
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28824
|
+
}), _void(), {
|
|
28825
|
+
kind: "mutation",
|
|
28826
|
+
auth: "admin"
|
|
28827
|
+
}),
|
|
28828
|
+
setEnabled: method(object({
|
|
28829
|
+
deviceId: number(),
|
|
28830
|
+
enabled: boolean()
|
|
28831
|
+
}), _void(), {
|
|
28832
|
+
kind: "mutation",
|
|
28833
|
+
auth: "admin"
|
|
28834
|
+
})
|
|
28835
|
+
},
|
|
28622
28836
|
events: { onDetected: { data: object({
|
|
28623
28837
|
deviceId: number(),
|
|
28624
28838
|
detection: NativeDetectionSchema
|
|
@@ -33466,7 +33680,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33466
33680
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33467
33681
|
totalObjects: number().int().nonnegative(),
|
|
33468
33682
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33469
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33683
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33684
|
+
/**
|
|
33685
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33686
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33687
|
+
*
|
|
33688
|
+
* The operator's question about a scene has two halves and they answer
|
|
33689
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33690
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33691
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33692
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33693
|
+
*
|
|
33694
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33695
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33696
|
+
*
|
|
33697
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33698
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33699
|
+
* parked objects here" about a camera whose lot is full.
|
|
33700
|
+
*/
|
|
33701
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33702
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33703
|
+
* same absence rule. */
|
|
33704
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33470
33705
|
});
|
|
33471
33706
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33472
33707
|
zoneId: string(),
|
|
@@ -33589,6 +33824,23 @@ var HistoryPointSchema = object({
|
|
|
33589
33824
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33590
33825
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33591
33826
|
* combinatorial coverage the operator UI requested.
|
|
33827
|
+
*
|
|
33828
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33829
|
+
*
|
|
33830
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33831
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33832
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33833
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33834
|
+
* horizon rather than to answer a question.
|
|
33835
|
+
*
|
|
33836
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33837
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33838
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33839
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33840
|
+
* function the writer uses, so the two cannot drift.
|
|
33841
|
+
*
|
|
33842
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33843
|
+
* it. Do not add a fourth caller.
|
|
33592
33844
|
*/
|
|
33593
33845
|
var zoneAnalyticsCapability = {
|
|
33594
33846
|
name: "zone-analytics",
|
|
@@ -37988,12 +38240,24 @@ Object.freeze({
|
|
|
37988
38240
|
addonId: null,
|
|
37989
38241
|
access: "create"
|
|
37990
38242
|
},
|
|
38243
|
+
"nativeObjectDetection.getOptions": {
|
|
38244
|
+
capName: "native-object-detection",
|
|
38245
|
+
capScope: "device",
|
|
38246
|
+
addonId: null,
|
|
38247
|
+
access: "view"
|
|
38248
|
+
},
|
|
37991
38249
|
"nativeObjectDetection.setEnabled": {
|
|
37992
38250
|
capName: "native-object-detection",
|
|
37993
38251
|
capScope: "device",
|
|
37994
38252
|
addonId: null,
|
|
37995
38253
|
access: "create"
|
|
37996
38254
|
},
|
|
38255
|
+
"nativeObjectDetection.setSettings": {
|
|
38256
|
+
capName: "native-object-detection",
|
|
38257
|
+
capScope: "device",
|
|
38258
|
+
addonId: null,
|
|
38259
|
+
access: "create"
|
|
38260
|
+
},
|
|
37997
38261
|
"navigation.getFeatures": {
|
|
37998
38262
|
capName: "navigation",
|
|
37999
38263
|
capScope: "device",
|
|
@@ -38258,6 +38522,12 @@ Object.freeze({
|
|
|
38258
38522
|
addonId: null,
|
|
38259
38523
|
access: "view"
|
|
38260
38524
|
},
|
|
38525
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38526
|
+
capName: "notification-rules",
|
|
38527
|
+
capScope: "system",
|
|
38528
|
+
addonId: null,
|
|
38529
|
+
access: "view"
|
|
38530
|
+
},
|
|
38261
38531
|
"notificationRules.getConditionCatalog": {
|
|
38262
38532
|
capName: "notification-rules",
|
|
38263
38533
|
capScope: "system",
|
|
@@ -38768,6 +39038,12 @@ Object.freeze({
|
|
|
38768
39038
|
addonId: null,
|
|
38769
39039
|
access: "create"
|
|
38770
39040
|
},
|
|
39041
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39042
|
+
capName: "pipeline-analytics",
|
|
39043
|
+
capScope: "device",
|
|
39044
|
+
addonId: null,
|
|
39045
|
+
access: "view"
|
|
39046
|
+
},
|
|
38771
39047
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38772
39048
|
capName: "pipeline-analytics",
|
|
38773
39049
|
capScope: "device",
|
|
@@ -39440,6 +39716,12 @@ Object.freeze({
|
|
|
39440
39716
|
addonId: null,
|
|
39441
39717
|
access: "create"
|
|
39442
39718
|
},
|
|
39719
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39720
|
+
capName: "pipeline-runner",
|
|
39721
|
+
capScope: "system",
|
|
39722
|
+
addonId: null,
|
|
39723
|
+
access: "create"
|
|
39724
|
+
},
|
|
39443
39725
|
"pipelineRunner.runDetailSubtree": {
|
|
39444
39726
|
capName: "pipeline-runner",
|
|
39445
39727
|
capScope: "system",
|
|
@@ -42220,11 +42502,21 @@ Object.freeze({
|
|
|
42220
42502
|
form: "single",
|
|
42221
42503
|
optional: false
|
|
42222
42504
|
}],
|
|
42505
|
+
"nativeObjectDetection.getOptions": [{
|
|
42506
|
+
name: "deviceId",
|
|
42507
|
+
form: "single",
|
|
42508
|
+
optional: false
|
|
42509
|
+
}],
|
|
42223
42510
|
"nativeObjectDetection.setEnabled": [{
|
|
42224
42511
|
name: "deviceId",
|
|
42225
42512
|
form: "single",
|
|
42226
42513
|
optional: false
|
|
42227
42514
|
}],
|
|
42515
|
+
"nativeObjectDetection.setSettings": [{
|
|
42516
|
+
name: "deviceId",
|
|
42517
|
+
form: "single",
|
|
42518
|
+
optional: false
|
|
42519
|
+
}],
|
|
42228
42520
|
"navigation.getFeatures": [{
|
|
42229
42521
|
name: "deviceId",
|
|
42230
42522
|
form: "single",
|
|
@@ -42574,6 +42866,11 @@ Object.freeze({
|
|
|
42574
42866
|
form: "single",
|
|
42575
42867
|
optional: false
|
|
42576
42868
|
}],
|
|
42869
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42870
|
+
name: "deviceId",
|
|
42871
|
+
form: "single",
|
|
42872
|
+
optional: false
|
|
42873
|
+
}],
|
|
42577
42874
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42578
42875
|
name: "deviceId",
|
|
42579
42876
|
form: "single",
|
|
@@ -42764,6 +43061,11 @@ Object.freeze({
|
|
|
42764
43061
|
form: "single",
|
|
42765
43062
|
optional: false
|
|
42766
43063
|
}],
|
|
43064
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43065
|
+
name: "deviceId",
|
|
43066
|
+
form: "single",
|
|
43067
|
+
optional: false
|
|
43068
|
+
}],
|
|
42767
43069
|
"pipelineRunner.runDetailSubtree": [{
|
|
42768
43070
|
name: "deviceId",
|
|
42769
43071
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5362,7 +5362,7 @@ var ZodIssueCode = {
|
|
|
5362
5362
|
var ZodFirstPartyTypeKind;
|
|
5363
5363
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5364
5364
|
//#endregion
|
|
5365
|
-
//#region ../types/dist/sleep-
|
|
5365
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5366
5366
|
/**
|
|
5367
5367
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5368
5368
|
* window to float samples (D455).
|
|
@@ -11564,6 +11564,21 @@ var streamSignalsCapability = {
|
|
|
11564
11564
|
mode: "singleton",
|
|
11565
11565
|
deviceTypes: Object.values(DeviceType),
|
|
11566
11566
|
runtimeState: StreamSignalsStatusSchema,
|
|
11567
|
+
/**
|
|
11568
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11569
|
+
*
|
|
11570
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11571
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11572
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11573
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11574
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11575
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11576
|
+
* because the fix could not reach it.
|
|
11577
|
+
*
|
|
11578
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11579
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11580
|
+
*/
|
|
11581
|
+
durability: "session",
|
|
11567
11582
|
methods: {
|
|
11568
11583
|
/**
|
|
11569
11584
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18178,6 +18193,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18178
18193
|
settings: NcAlarmSettingsSchema,
|
|
18179
18194
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18180
18195
|
});
|
|
18196
|
+
/**
|
|
18197
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18198
|
+
*
|
|
18199
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18200
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18201
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18202
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18203
|
+
* a different thing from never having been told, and only the envelope
|
|
18204
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18205
|
+
*/
|
|
18206
|
+
var NcClipRetentionAskSchema = object({
|
|
18207
|
+
/**
|
|
18208
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18209
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18210
|
+
* asking everywhere.
|
|
18211
|
+
*/
|
|
18212
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18213
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18214
|
+
* needs nothing produces no ask at all. */
|
|
18215
|
+
seconds: number().min(0).max(60),
|
|
18216
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18217
|
+
* assigned, which is what the cut defaults to. */
|
|
18218
|
+
profile: CamProfileSchema.optional(),
|
|
18219
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18220
|
+
ruleId: string(),
|
|
18221
|
+
ruleName: string(),
|
|
18222
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18223
|
+
reason: _enum(["window", "occupancy"])
|
|
18224
|
+
});
|
|
18225
|
+
/**
|
|
18226
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18227
|
+
*
|
|
18228
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18229
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18230
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18231
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18232
|
+
* footage this mechanism exists to keep.
|
|
18233
|
+
*/
|
|
18234
|
+
var NcClipRetentionPlanSchema = object({
|
|
18235
|
+
rulesLoaded: boolean(),
|
|
18236
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18237
|
+
});
|
|
18181
18238
|
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 }), {
|
|
18182
18239
|
kind: "mutation",
|
|
18183
18240
|
auth: "admin",
|
|
@@ -18198,7 +18255,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18198
18255
|
}), object({ success: literal(true) }), {
|
|
18199
18256
|
kind: "mutation",
|
|
18200
18257
|
auth: "admin"
|
|
18201
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18258
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18202
18259
|
deviceId: number().int(),
|
|
18203
18260
|
muted: boolean()
|
|
18204
18261
|
}), object({ success: literal(true) }), {
|
|
@@ -20772,6 +20829,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20772
20829
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20773
20830
|
framesMatched: number().int()
|
|
20774
20831
|
})).readonly() });
|
|
20832
|
+
/**
|
|
20833
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20834
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20835
|
+
* is an alias of this, not a second list.
|
|
20836
|
+
*/
|
|
20837
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20838
|
+
"motion",
|
|
20839
|
+
"audio-dbfs",
|
|
20840
|
+
"battery",
|
|
20841
|
+
"occupancy"
|
|
20842
|
+
]);
|
|
20843
|
+
/**
|
|
20844
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20845
|
+
*
|
|
20846
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20847
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20848
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20849
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20850
|
+
*/
|
|
20851
|
+
var LtsBucketSchema = object({
|
|
20852
|
+
scope: string(),
|
|
20853
|
+
bucketStart: number().int(),
|
|
20854
|
+
samples: number().int().nonnegative(),
|
|
20855
|
+
sum: number(),
|
|
20856
|
+
min: number(),
|
|
20857
|
+
max: number()
|
|
20858
|
+
});
|
|
20775
20859
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20776
20860
|
deviceId: number(),
|
|
20777
20861
|
trackId: string()
|
|
@@ -20818,6 +20902,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20818
20902
|
kinds: array(string()).optional(),
|
|
20819
20903
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20820
20904
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20905
|
+
deviceId: number(),
|
|
20906
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20907
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20908
|
+
scope: string().optional(),
|
|
20909
|
+
from: number(),
|
|
20910
|
+
to: number(),
|
|
20911
|
+
limit: number().int().positive().optional()
|
|
20912
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20821
20913
|
deviceId: number(),
|
|
20822
20914
|
since: number(),
|
|
20823
20915
|
until: number(),
|
|
@@ -21436,6 +21528,14 @@ var MotionSourceEnum = _enum([
|
|
|
21436
21528
|
*/
|
|
21437
21529
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21438
21530
|
/**
|
|
21531
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21532
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21533
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21534
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21535
|
+
* row.
|
|
21536
|
+
*/
|
|
21537
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21538
|
+
/**
|
|
21439
21539
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21440
21540
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21441
21541
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21586,6 +21686,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21586
21686
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21587
21687
|
*/
|
|
21588
21688
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21689
|
+
/**
|
|
21690
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21691
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21692
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21693
|
+
*
|
|
21694
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21695
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21696
|
+
* here. Its boxes reach post-analysis on the same
|
|
21697
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21698
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21699
|
+
* subtree (face / plate / embedding).
|
|
21700
|
+
*
|
|
21701
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21702
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21703
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21704
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21705
|
+
*
|
|
21706
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21707
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21708
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21709
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21710
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21711
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21712
|
+
*
|
|
21713
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21714
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21715
|
+
* default.
|
|
21716
|
+
*/
|
|
21717
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21589
21718
|
pipelineEnabled: boolean().default(true),
|
|
21590
21719
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21591
21720
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21767,7 +21896,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21767
21896
|
queueDepth: number(),
|
|
21768
21897
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21769
21898
|
});
|
|
21899
|
+
/**
|
|
21900
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21901
|
+
*
|
|
21902
|
+
* One instance per node. Receives camera assignments from
|
|
21903
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21904
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21905
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21906
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21907
|
+
* the bus.
|
|
21908
|
+
*
|
|
21909
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21910
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21911
|
+
* makes assignment decisions itself.
|
|
21912
|
+
*/
|
|
21913
|
+
/**
|
|
21914
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21915
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21916
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21917
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21918
|
+
*/
|
|
21919
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21920
|
+
"not-attached",
|
|
21921
|
+
"battery-asleep",
|
|
21922
|
+
"not-watching",
|
|
21923
|
+
"already-bursting"
|
|
21924
|
+
]);
|
|
21770
21925
|
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({
|
|
21926
|
+
deviceId: number(),
|
|
21927
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21928
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21929
|
+
frames: number().int().positive().optional(),
|
|
21930
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21931
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21932
|
+
reason: string()
|
|
21933
|
+
}), object({
|
|
21934
|
+
started: boolean(),
|
|
21935
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21936
|
+
}), {
|
|
21937
|
+
auth: "admin",
|
|
21938
|
+
kind: "mutation"
|
|
21939
|
+
}), method(object({
|
|
21771
21940
|
handle: FrameHandleSchema,
|
|
21772
21941
|
bbox: NativeCropBboxSchema,
|
|
21773
21942
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28597,11 +28766,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28597
28766
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28598
28767
|
/**
|
|
28599
28768
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28600
|
-
*
|
|
28601
|
-
*
|
|
28769
|
+
*
|
|
28770
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28771
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28772
|
+
* other detection choice is made. `geometry` on
|
|
28773
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28774
|
+
* choice would buy this particular camera.
|
|
28602
28775
|
*/
|
|
28603
28776
|
enabled: boolean()
|
|
28604
28777
|
});
|
|
28778
|
+
/**
|
|
28779
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28780
|
+
*
|
|
28781
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28782
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28783
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28784
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28785
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28786
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28787
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28788
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28789
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28790
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28791
|
+
* tracker as motion and no further.
|
|
28792
|
+
*
|
|
28793
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28794
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28795
|
+
* derived form is only as honest as `getOptions`).
|
|
28796
|
+
*/
|
|
28797
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28798
|
+
"boxed",
|
|
28799
|
+
"while-streaming",
|
|
28800
|
+
"flag-only"
|
|
28801
|
+
]);
|
|
28802
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28803
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28804
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28805
|
+
/** What a detection from this camera carries. */
|
|
28806
|
+
geometry: NativeObjectGeometryEnum
|
|
28807
|
+
});
|
|
28808
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28605
28809
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28606
28810
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28607
28811
|
lastFetchedAt: number() });
|
|
@@ -28611,13 +28815,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28611
28815
|
deviceNative: true,
|
|
28612
28816
|
mode: "singleton",
|
|
28613
28817
|
deviceTypes: [DeviceType.Camera],
|
|
28614
|
-
methods: {
|
|
28615
|
-
deviceId: number(),
|
|
28616
|
-
|
|
28617
|
-
|
|
28618
|
-
|
|
28619
|
-
|
|
28620
|
-
|
|
28818
|
+
methods: {
|
|
28819
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28820
|
+
setSettings: method(object({
|
|
28821
|
+
deviceId: number(),
|
|
28822
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28823
|
+
}), _void(), {
|
|
28824
|
+
kind: "mutation",
|
|
28825
|
+
auth: "admin"
|
|
28826
|
+
}),
|
|
28827
|
+
setEnabled: method(object({
|
|
28828
|
+
deviceId: number(),
|
|
28829
|
+
enabled: boolean()
|
|
28830
|
+
}), _void(), {
|
|
28831
|
+
kind: "mutation",
|
|
28832
|
+
auth: "admin"
|
|
28833
|
+
})
|
|
28834
|
+
},
|
|
28621
28835
|
events: { onDetected: { data: object({
|
|
28622
28836
|
deviceId: number(),
|
|
28623
28837
|
detection: NativeDetectionSchema
|
|
@@ -33465,7 +33679,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33465
33679
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33466
33680
|
totalObjects: number().int().nonnegative(),
|
|
33467
33681
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33468
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33682
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33683
|
+
/**
|
|
33684
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33685
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33686
|
+
*
|
|
33687
|
+
* The operator's question about a scene has two halves and they answer
|
|
33688
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33689
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33690
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33691
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33692
|
+
*
|
|
33693
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33694
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33695
|
+
*
|
|
33696
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33697
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33698
|
+
* parked objects here" about a camera whose lot is full.
|
|
33699
|
+
*/
|
|
33700
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33701
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33702
|
+
* same absence rule. */
|
|
33703
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33469
33704
|
});
|
|
33470
33705
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33471
33706
|
zoneId: string(),
|
|
@@ -33588,6 +33823,23 @@ var HistoryPointSchema = object({
|
|
|
33588
33823
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33589
33824
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33590
33825
|
* combinatorial coverage the operator UI requested.
|
|
33826
|
+
*
|
|
33827
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33828
|
+
*
|
|
33829
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33830
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33831
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33832
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33833
|
+
* horizon rather than to answer a question.
|
|
33834
|
+
*
|
|
33835
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33836
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33837
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33838
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33839
|
+
* function the writer uses, so the two cannot drift.
|
|
33840
|
+
*
|
|
33841
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33842
|
+
* it. Do not add a fourth caller.
|
|
33591
33843
|
*/
|
|
33592
33844
|
var zoneAnalyticsCapability = {
|
|
33593
33845
|
name: "zone-analytics",
|
|
@@ -37987,12 +38239,24 @@ Object.freeze({
|
|
|
37987
38239
|
addonId: null,
|
|
37988
38240
|
access: "create"
|
|
37989
38241
|
},
|
|
38242
|
+
"nativeObjectDetection.getOptions": {
|
|
38243
|
+
capName: "native-object-detection",
|
|
38244
|
+
capScope: "device",
|
|
38245
|
+
addonId: null,
|
|
38246
|
+
access: "view"
|
|
38247
|
+
},
|
|
37990
38248
|
"nativeObjectDetection.setEnabled": {
|
|
37991
38249
|
capName: "native-object-detection",
|
|
37992
38250
|
capScope: "device",
|
|
37993
38251
|
addonId: null,
|
|
37994
38252
|
access: "create"
|
|
37995
38253
|
},
|
|
38254
|
+
"nativeObjectDetection.setSettings": {
|
|
38255
|
+
capName: "native-object-detection",
|
|
38256
|
+
capScope: "device",
|
|
38257
|
+
addonId: null,
|
|
38258
|
+
access: "create"
|
|
38259
|
+
},
|
|
37996
38260
|
"navigation.getFeatures": {
|
|
37997
38261
|
capName: "navigation",
|
|
37998
38262
|
capScope: "device",
|
|
@@ -38257,6 +38521,12 @@ Object.freeze({
|
|
|
38257
38521
|
addonId: null,
|
|
38258
38522
|
access: "view"
|
|
38259
38523
|
},
|
|
38524
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38525
|
+
capName: "notification-rules",
|
|
38526
|
+
capScope: "system",
|
|
38527
|
+
addonId: null,
|
|
38528
|
+
access: "view"
|
|
38529
|
+
},
|
|
38260
38530
|
"notificationRules.getConditionCatalog": {
|
|
38261
38531
|
capName: "notification-rules",
|
|
38262
38532
|
capScope: "system",
|
|
@@ -38767,6 +39037,12 @@ Object.freeze({
|
|
|
38767
39037
|
addonId: null,
|
|
38768
39038
|
access: "create"
|
|
38769
39039
|
},
|
|
39040
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39041
|
+
capName: "pipeline-analytics",
|
|
39042
|
+
capScope: "device",
|
|
39043
|
+
addonId: null,
|
|
39044
|
+
access: "view"
|
|
39045
|
+
},
|
|
38770
39046
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38771
39047
|
capName: "pipeline-analytics",
|
|
38772
39048
|
capScope: "device",
|
|
@@ -39439,6 +39715,12 @@ Object.freeze({
|
|
|
39439
39715
|
addonId: null,
|
|
39440
39716
|
access: "create"
|
|
39441
39717
|
},
|
|
39718
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39719
|
+
capName: "pipeline-runner",
|
|
39720
|
+
capScope: "system",
|
|
39721
|
+
addonId: null,
|
|
39722
|
+
access: "create"
|
|
39723
|
+
},
|
|
39442
39724
|
"pipelineRunner.runDetailSubtree": {
|
|
39443
39725
|
capName: "pipeline-runner",
|
|
39444
39726
|
capScope: "system",
|
|
@@ -42219,11 +42501,21 @@ Object.freeze({
|
|
|
42219
42501
|
form: "single",
|
|
42220
42502
|
optional: false
|
|
42221
42503
|
}],
|
|
42504
|
+
"nativeObjectDetection.getOptions": [{
|
|
42505
|
+
name: "deviceId",
|
|
42506
|
+
form: "single",
|
|
42507
|
+
optional: false
|
|
42508
|
+
}],
|
|
42222
42509
|
"nativeObjectDetection.setEnabled": [{
|
|
42223
42510
|
name: "deviceId",
|
|
42224
42511
|
form: "single",
|
|
42225
42512
|
optional: false
|
|
42226
42513
|
}],
|
|
42514
|
+
"nativeObjectDetection.setSettings": [{
|
|
42515
|
+
name: "deviceId",
|
|
42516
|
+
form: "single",
|
|
42517
|
+
optional: false
|
|
42518
|
+
}],
|
|
42227
42519
|
"navigation.getFeatures": [{
|
|
42228
42520
|
name: "deviceId",
|
|
42229
42521
|
form: "single",
|
|
@@ -42573,6 +42865,11 @@ Object.freeze({
|
|
|
42573
42865
|
form: "single",
|
|
42574
42866
|
optional: false
|
|
42575
42867
|
}],
|
|
42868
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42869
|
+
name: "deviceId",
|
|
42870
|
+
form: "single",
|
|
42871
|
+
optional: false
|
|
42872
|
+
}],
|
|
42576
42873
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42577
42874
|
name: "deviceId",
|
|
42578
42875
|
form: "single",
|
|
@@ -42763,6 +43060,11 @@ Object.freeze({
|
|
|
42763
43060
|
form: "single",
|
|
42764
43061
|
optional: false
|
|
42765
43062
|
}],
|
|
43063
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43064
|
+
name: "deviceId",
|
|
43065
|
+
form: "single",
|
|
43066
|
+
optional: false
|
|
43067
|
+
}],
|
|
42766
43068
|
"pipelineRunner.runDetailSubtree": [{
|
|
42767
43069
|
name: "deviceId",
|
|
42768
43070
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-gree",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.102",
|
|
4
4
|
"description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"dev": "vite build --watch",
|
|
64
64
|
"typecheck": "tsc --noEmit",
|
|
65
65
|
"test": "vitest run",
|
|
66
|
-
"publish": "npm publish --access public"
|
|
66
|
+
"publish:npm": "npm publish --access public"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@apocaliss92/nodegree": "file:./vendor/apocaliss92-nodegree-0.1.0.tgz",
|