@camstack/addon-provider-petkit 0.2.102 → 0.2.103
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
|
@@ -6462,7 +6462,7 @@ var ZodIssueCode = {
|
|
|
6462
6462
|
var ZodFirstPartyTypeKind;
|
|
6463
6463
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6464
6464
|
//#endregion
|
|
6465
|
-
//#region ../types/dist/sleep-
|
|
6465
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
6466
6466
|
/**
|
|
6467
6467
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6468
6468
|
* window to float samples (D455).
|
|
@@ -12664,6 +12664,21 @@ var streamSignalsCapability = {
|
|
|
12664
12664
|
mode: "singleton",
|
|
12665
12665
|
deviceTypes: Object.values(DeviceType),
|
|
12666
12666
|
runtimeState: StreamSignalsStatusSchema,
|
|
12667
|
+
/**
|
|
12668
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
12669
|
+
*
|
|
12670
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
12671
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
12672
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
12673
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
12674
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
12675
|
+
* class the camera really detected stayed missing for the life of the row
|
|
12676
|
+
* because the fix could not reach it.
|
|
12677
|
+
*
|
|
12678
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
12679
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
12680
|
+
*/
|
|
12681
|
+
durability: "session",
|
|
12667
12682
|
methods: {
|
|
12668
12683
|
/**
|
|
12669
12684
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -19295,6 +19310,48 @@ var NcAlarmConfigSchema = object({
|
|
|
19295
19310
|
settings: NcAlarmSettingsSchema,
|
|
19296
19311
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
19297
19312
|
});
|
|
19313
|
+
/**
|
|
19314
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
19315
|
+
*
|
|
19316
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
19317
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
19318
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
19319
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
19320
|
+
* a different thing from never having been told, and only the envelope
|
|
19321
|
+
* (`rulesLoaded`) can tell those apart.
|
|
19322
|
+
*/
|
|
19323
|
+
var NcClipRetentionAskSchema = object({
|
|
19324
|
+
/**
|
|
19325
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
19326
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
19327
|
+
* asking everywhere.
|
|
19328
|
+
*/
|
|
19329
|
+
deviceId: number().int().nonnegative().optional(),
|
|
19330
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
19331
|
+
* needs nothing produces no ask at all. */
|
|
19332
|
+
seconds: number().min(0).max(60),
|
|
19333
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
19334
|
+
* assigned, which is what the cut defaults to. */
|
|
19335
|
+
profile: CamProfileSchema.optional(),
|
|
19336
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
19337
|
+
ruleId: string(),
|
|
19338
|
+
ruleName: string(),
|
|
19339
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
19340
|
+
reason: _enum(["window", "occupancy"])
|
|
19341
|
+
});
|
|
19342
|
+
/**
|
|
19343
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
19344
|
+
*
|
|
19345
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
19346
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
19347
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
19348
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
19349
|
+
* footage this mechanism exists to keep.
|
|
19350
|
+
*/
|
|
19351
|
+
var NcClipRetentionPlanSchema = object({
|
|
19352
|
+
rulesLoaded: boolean(),
|
|
19353
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
19354
|
+
});
|
|
19298
19355
|
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 }), {
|
|
19299
19356
|
kind: "mutation",
|
|
19300
19357
|
auth: "admin",
|
|
@@ -19315,7 +19372,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
19315
19372
|
}), object({ success: literal(true) }), {
|
|
19316
19373
|
kind: "mutation",
|
|
19317
19374
|
auth: "admin"
|
|
19318
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
19375
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
19319
19376
|
deviceId: number().int(),
|
|
19320
19377
|
muted: boolean()
|
|
19321
19378
|
}), object({ success: literal(true) }), {
|
|
@@ -21889,6 +21946,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
21889
21946
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21890
21947
|
framesMatched: number().int()
|
|
21891
21948
|
})).readonly() });
|
|
21949
|
+
/**
|
|
21950
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21951
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
21952
|
+
* is an alias of this, not a second list.
|
|
21953
|
+
*/
|
|
21954
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
21955
|
+
"motion",
|
|
21956
|
+
"audio-dbfs",
|
|
21957
|
+
"battery",
|
|
21958
|
+
"occupancy"
|
|
21959
|
+
]);
|
|
21960
|
+
/**
|
|
21961
|
+
* One closed 5-minute bucket of a long-term series.
|
|
21962
|
+
*
|
|
21963
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
21964
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
21965
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
21966
|
+
* different claim from zero and the reason this is a sparse series.
|
|
21967
|
+
*/
|
|
21968
|
+
var LtsBucketSchema = object({
|
|
21969
|
+
scope: string(),
|
|
21970
|
+
bucketStart: number().int(),
|
|
21971
|
+
samples: number().int().nonnegative(),
|
|
21972
|
+
sum: number(),
|
|
21973
|
+
min: number(),
|
|
21974
|
+
max: number()
|
|
21975
|
+
});
|
|
21892
21976
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
21893
21977
|
deviceId: number(),
|
|
21894
21978
|
trackId: string()
|
|
@@ -21935,6 +22019,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21935
22019
|
kinds: array(string()).optional(),
|
|
21936
22020
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
21937
22021
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
22022
|
+
deviceId: number(),
|
|
22023
|
+
series: AnalyticsLtsSeriesSchema,
|
|
22024
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
22025
|
+
scope: string().optional(),
|
|
22026
|
+
from: number(),
|
|
22027
|
+
to: number(),
|
|
22028
|
+
limit: number().int().positive().optional()
|
|
22029
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
21938
22030
|
deviceId: number(),
|
|
21939
22031
|
since: number(),
|
|
21940
22032
|
until: number(),
|
|
@@ -22553,6 +22645,14 @@ var MotionSourceEnum = _enum([
|
|
|
22553
22645
|
*/
|
|
22554
22646
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
22555
22647
|
/**
|
|
22648
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
22649
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
22650
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
22651
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
22652
|
+
* row.
|
|
22653
|
+
*/
|
|
22654
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
22655
|
+
/**
|
|
22556
22656
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
22557
22657
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
22558
22658
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -22703,6 +22803,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
22703
22803
|
* events; the orchestrator forwards to `reportMotion`.
|
|
22704
22804
|
*/
|
|
22705
22805
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
22806
|
+
/**
|
|
22807
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
22808
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
22809
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
22810
|
+
*
|
|
22811
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
22812
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
22813
|
+
* here. Its boxes reach post-analysis on the same
|
|
22814
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
22815
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
22816
|
+
* subtree (face / plate / embedding).
|
|
22817
|
+
*
|
|
22818
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
22819
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
22820
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
22821
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
22822
|
+
*
|
|
22823
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
22824
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
22825
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
22826
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
22827
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
22828
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
22829
|
+
*
|
|
22830
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
22831
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
22832
|
+
* default.
|
|
22833
|
+
*/
|
|
22834
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
22706
22835
|
pipelineEnabled: boolean().default(true),
|
|
22707
22836
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
22708
22837
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -22884,7 +23013,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
22884
23013
|
queueDepth: number(),
|
|
22885
23014
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
22886
23015
|
});
|
|
23016
|
+
/**
|
|
23017
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
23018
|
+
*
|
|
23019
|
+
* One instance per node. Receives camera assignments from
|
|
23020
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
23021
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
23022
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
23023
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
23024
|
+
* the bus.
|
|
23025
|
+
*
|
|
23026
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
23027
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
23028
|
+
* makes assignment decisions itself.
|
|
23029
|
+
*/
|
|
23030
|
+
/**
|
|
23031
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
23032
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
23033
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
23034
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
23035
|
+
*/
|
|
23036
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
23037
|
+
"not-attached",
|
|
23038
|
+
"battery-asleep",
|
|
23039
|
+
"not-watching",
|
|
23040
|
+
"already-bursting"
|
|
23041
|
+
]);
|
|
22887
23042
|
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({
|
|
23043
|
+
deviceId: number(),
|
|
23044
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
23045
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
23046
|
+
frames: number().int().positive().optional(),
|
|
23047
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
23048
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
23049
|
+
reason: string()
|
|
23050
|
+
}), object({
|
|
23051
|
+
started: boolean(),
|
|
23052
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
23053
|
+
}), {
|
|
23054
|
+
auth: "admin",
|
|
23055
|
+
kind: "mutation"
|
|
23056
|
+
}), method(object({
|
|
22888
23057
|
handle: FrameHandleSchema,
|
|
22889
23058
|
bbox: NativeCropBboxSchema,
|
|
22890
23059
|
maxWidth: number().int().positive().optional(),
|
|
@@ -29722,11 +29891,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
29722
29891
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
29723
29892
|
/**
|
|
29724
29893
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
29725
|
-
*
|
|
29726
|
-
*
|
|
29894
|
+
*
|
|
29895
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
29896
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
29897
|
+
* other detection choice is made. `geometry` on
|
|
29898
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
29899
|
+
* choice would buy this particular camera.
|
|
29727
29900
|
*/
|
|
29728
29901
|
enabled: boolean()
|
|
29729
29902
|
});
|
|
29903
|
+
/**
|
|
29904
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
29905
|
+
*
|
|
29906
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
29907
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
29908
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
29909
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
29910
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
29911
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
29912
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
29913
|
+
* something is in front of it, and its stream is already being pulled.
|
|
29914
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
29915
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
29916
|
+
* tracker as motion and no further.
|
|
29917
|
+
*
|
|
29918
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
29919
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
29920
|
+
* derived form is only as honest as `getOptions`).
|
|
29921
|
+
*/
|
|
29922
|
+
var NativeObjectGeometryEnum = _enum([
|
|
29923
|
+
"boxed",
|
|
29924
|
+
"while-streaming",
|
|
29925
|
+
"flag-only"
|
|
29926
|
+
]);
|
|
29927
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
29928
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
29929
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
29930
|
+
/** What a detection from this camera carries. */
|
|
29931
|
+
geometry: NativeObjectGeometryEnum
|
|
29932
|
+
});
|
|
29933
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
29730
29934
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
29731
29935
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
29732
29936
|
lastFetchedAt: number() });
|
|
@@ -29736,13 +29940,23 @@ var nativeObjectDetectionCapability = {
|
|
|
29736
29940
|
deviceNative: true,
|
|
29737
29941
|
mode: "singleton",
|
|
29738
29942
|
deviceTypes: [DeviceType.Camera],
|
|
29739
|
-
methods: {
|
|
29740
|
-
deviceId: number(),
|
|
29741
|
-
|
|
29742
|
-
|
|
29743
|
-
|
|
29744
|
-
|
|
29745
|
-
|
|
29943
|
+
methods: {
|
|
29944
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
29945
|
+
setSettings: method(object({
|
|
29946
|
+
deviceId: number(),
|
|
29947
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
29948
|
+
}), _void(), {
|
|
29949
|
+
kind: "mutation",
|
|
29950
|
+
auth: "admin"
|
|
29951
|
+
}),
|
|
29952
|
+
setEnabled: method(object({
|
|
29953
|
+
deviceId: number(),
|
|
29954
|
+
enabled: boolean()
|
|
29955
|
+
}), _void(), {
|
|
29956
|
+
kind: "mutation",
|
|
29957
|
+
auth: "admin"
|
|
29958
|
+
})
|
|
29959
|
+
},
|
|
29746
29960
|
events: { onDetected: { data: object({
|
|
29747
29961
|
deviceId: number(),
|
|
29748
29962
|
detection: NativeDetectionSchema
|
|
@@ -34590,7 +34804,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
34590
34804
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
34591
34805
|
totalObjects: number().int().nonnegative(),
|
|
34592
34806
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
34593
|
-
byClass: record(string(), number().int().nonnegative())
|
|
34807
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
34808
|
+
/**
|
|
34809
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
34810
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
34811
|
+
*
|
|
34812
|
+
* The operator's question about a scene has two halves and they answer
|
|
34813
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
34814
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
34815
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
34816
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
34817
|
+
*
|
|
34818
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
34819
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
34820
|
+
*
|
|
34821
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
34822
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
34823
|
+
* parked objects here" about a camera whose lot is full.
|
|
34824
|
+
*/
|
|
34825
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
34826
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
34827
|
+
* same absence rule. */
|
|
34828
|
+
transientObjects: number().int().nonnegative().optional()
|
|
34594
34829
|
});
|
|
34595
34830
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
34596
34831
|
zoneId: string(),
|
|
@@ -34713,6 +34948,23 @@ var HistoryPointSchema = object({
|
|
|
34713
34948
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
34714
34949
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
34715
34950
|
* combinatorial coverage the operator UI requested.
|
|
34951
|
+
*
|
|
34952
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34953
|
+
*
|
|
34954
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34955
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34956
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34957
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34958
|
+
* horizon rather than to answer a question.
|
|
34959
|
+
*
|
|
34960
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34961
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34962
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34963
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34964
|
+
* function the writer uses, so the two cannot drift.
|
|
34965
|
+
*
|
|
34966
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34967
|
+
* it. Do not add a fourth caller.
|
|
34716
34968
|
*/
|
|
34717
34969
|
var zoneAnalyticsCapability = {
|
|
34718
34970
|
name: "zone-analytics",
|
|
@@ -39112,12 +39364,24 @@ Object.freeze({
|
|
|
39112
39364
|
addonId: null,
|
|
39113
39365
|
access: "create"
|
|
39114
39366
|
},
|
|
39367
|
+
"nativeObjectDetection.getOptions": {
|
|
39368
|
+
capName: "native-object-detection",
|
|
39369
|
+
capScope: "device",
|
|
39370
|
+
addonId: null,
|
|
39371
|
+
access: "view"
|
|
39372
|
+
},
|
|
39115
39373
|
"nativeObjectDetection.setEnabled": {
|
|
39116
39374
|
capName: "native-object-detection",
|
|
39117
39375
|
capScope: "device",
|
|
39118
39376
|
addonId: null,
|
|
39119
39377
|
access: "create"
|
|
39120
39378
|
},
|
|
39379
|
+
"nativeObjectDetection.setSettings": {
|
|
39380
|
+
capName: "native-object-detection",
|
|
39381
|
+
capScope: "device",
|
|
39382
|
+
addonId: null,
|
|
39383
|
+
access: "create"
|
|
39384
|
+
},
|
|
39121
39385
|
"navigation.getFeatures": {
|
|
39122
39386
|
capName: "navigation",
|
|
39123
39387
|
capScope: "device",
|
|
@@ -39382,6 +39646,12 @@ Object.freeze({
|
|
|
39382
39646
|
addonId: null,
|
|
39383
39647
|
access: "view"
|
|
39384
39648
|
},
|
|
39649
|
+
"notificationRules.getClipRetentionAsks": {
|
|
39650
|
+
capName: "notification-rules",
|
|
39651
|
+
capScope: "system",
|
|
39652
|
+
addonId: null,
|
|
39653
|
+
access: "view"
|
|
39654
|
+
},
|
|
39385
39655
|
"notificationRules.getConditionCatalog": {
|
|
39386
39656
|
capName: "notification-rules",
|
|
39387
39657
|
capScope: "system",
|
|
@@ -39892,6 +40162,12 @@ Object.freeze({
|
|
|
39892
40162
|
addonId: null,
|
|
39893
40163
|
access: "create"
|
|
39894
40164
|
},
|
|
40165
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
40166
|
+
capName: "pipeline-analytics",
|
|
40167
|
+
capScope: "device",
|
|
40168
|
+
addonId: null,
|
|
40169
|
+
access: "view"
|
|
40170
|
+
},
|
|
39895
40171
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
39896
40172
|
capName: "pipeline-analytics",
|
|
39897
40173
|
capScope: "device",
|
|
@@ -40564,6 +40840,12 @@ Object.freeze({
|
|
|
40564
40840
|
addonId: null,
|
|
40565
40841
|
access: "create"
|
|
40566
40842
|
},
|
|
40843
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
40844
|
+
capName: "pipeline-runner",
|
|
40845
|
+
capScope: "system",
|
|
40846
|
+
addonId: null,
|
|
40847
|
+
access: "create"
|
|
40848
|
+
},
|
|
40567
40849
|
"pipelineRunner.runDetailSubtree": {
|
|
40568
40850
|
capName: "pipeline-runner",
|
|
40569
40851
|
capScope: "system",
|
|
@@ -43344,11 +43626,21 @@ Object.freeze({
|
|
|
43344
43626
|
form: "single",
|
|
43345
43627
|
optional: false
|
|
43346
43628
|
}],
|
|
43629
|
+
"nativeObjectDetection.getOptions": [{
|
|
43630
|
+
name: "deviceId",
|
|
43631
|
+
form: "single",
|
|
43632
|
+
optional: false
|
|
43633
|
+
}],
|
|
43347
43634
|
"nativeObjectDetection.setEnabled": [{
|
|
43348
43635
|
name: "deviceId",
|
|
43349
43636
|
form: "single",
|
|
43350
43637
|
optional: false
|
|
43351
43638
|
}],
|
|
43639
|
+
"nativeObjectDetection.setSettings": [{
|
|
43640
|
+
name: "deviceId",
|
|
43641
|
+
form: "single",
|
|
43642
|
+
optional: false
|
|
43643
|
+
}],
|
|
43352
43644
|
"navigation.getFeatures": [{
|
|
43353
43645
|
name: "deviceId",
|
|
43354
43646
|
form: "single",
|
|
@@ -43698,6 +43990,11 @@ Object.freeze({
|
|
|
43698
43990
|
form: "single",
|
|
43699
43991
|
optional: false
|
|
43700
43992
|
}],
|
|
43993
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43994
|
+
name: "deviceId",
|
|
43995
|
+
form: "single",
|
|
43996
|
+
optional: false
|
|
43997
|
+
}],
|
|
43701
43998
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
43702
43999
|
name: "deviceId",
|
|
43703
44000
|
form: "single",
|
|
@@ -43888,6 +44185,11 @@ Object.freeze({
|
|
|
43888
44185
|
form: "single",
|
|
43889
44186
|
optional: false
|
|
43890
44187
|
}],
|
|
44188
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
44189
|
+
name: "deviceId",
|
|
44190
|
+
form: "single",
|
|
44191
|
+
optional: false
|
|
44192
|
+
}],
|
|
43891
44193
|
"pipelineRunner.runDetailSubtree": [{
|
|
43892
44194
|
name: "deviceId",
|
|
43893
44195
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -6461,7 +6461,7 @@ var ZodIssueCode = {
|
|
|
6461
6461
|
var ZodFirstPartyTypeKind;
|
|
6462
6462
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6463
6463
|
//#endregion
|
|
6464
|
-
//#region ../types/dist/sleep-
|
|
6464
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
6465
6465
|
/**
|
|
6466
6466
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6467
6467
|
* window to float samples (D455).
|
|
@@ -12663,6 +12663,21 @@ var streamSignalsCapability = {
|
|
|
12663
12663
|
mode: "singleton",
|
|
12664
12664
|
deviceTypes: Object.values(DeviceType),
|
|
12665
12665
|
runtimeState: StreamSignalsStatusSchema,
|
|
12666
|
+
/**
|
|
12667
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
12668
|
+
*
|
|
12669
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
12670
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
12671
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
12672
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
12673
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
12674
|
+
* class the camera really detected stayed missing for the life of the row
|
|
12675
|
+
* because the fix could not reach it.
|
|
12676
|
+
*
|
|
12677
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
12678
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
12679
|
+
*/
|
|
12680
|
+
durability: "session",
|
|
12666
12681
|
methods: {
|
|
12667
12682
|
/**
|
|
12668
12683
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -19294,6 +19309,48 @@ var NcAlarmConfigSchema = object({
|
|
|
19294
19309
|
settings: NcAlarmSettingsSchema,
|
|
19295
19310
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
19296
19311
|
});
|
|
19312
|
+
/**
|
|
19313
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
19314
|
+
*
|
|
19315
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
19316
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
19317
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
19318
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
19319
|
+
* a different thing from never having been told, and only the envelope
|
|
19320
|
+
* (`rulesLoaded`) can tell those apart.
|
|
19321
|
+
*/
|
|
19322
|
+
var NcClipRetentionAskSchema = object({
|
|
19323
|
+
/**
|
|
19324
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
19325
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
19326
|
+
* asking everywhere.
|
|
19327
|
+
*/
|
|
19328
|
+
deviceId: number().int().nonnegative().optional(),
|
|
19329
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
19330
|
+
* needs nothing produces no ask at all. */
|
|
19331
|
+
seconds: number().min(0).max(60),
|
|
19332
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
19333
|
+
* assigned, which is what the cut defaults to. */
|
|
19334
|
+
profile: CamProfileSchema.optional(),
|
|
19335
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
19336
|
+
ruleId: string(),
|
|
19337
|
+
ruleName: string(),
|
|
19338
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
19339
|
+
reason: _enum(["window", "occupancy"])
|
|
19340
|
+
});
|
|
19341
|
+
/**
|
|
19342
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
19343
|
+
*
|
|
19344
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
19345
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
19346
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
19347
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
19348
|
+
* footage this mechanism exists to keep.
|
|
19349
|
+
*/
|
|
19350
|
+
var NcClipRetentionPlanSchema = object({
|
|
19351
|
+
rulesLoaded: boolean(),
|
|
19352
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
19353
|
+
});
|
|
19297
19354
|
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 }), {
|
|
19298
19355
|
kind: "mutation",
|
|
19299
19356
|
auth: "admin",
|
|
@@ -19314,7 +19371,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
19314
19371
|
}), object({ success: literal(true) }), {
|
|
19315
19372
|
kind: "mutation",
|
|
19316
19373
|
auth: "admin"
|
|
19317
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
19374
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
19318
19375
|
deviceId: number().int(),
|
|
19319
19376
|
muted: boolean()
|
|
19320
19377
|
}), object({ success: literal(true) }), {
|
|
@@ -21888,6 +21945,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
21888
21945
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21889
21946
|
framesMatched: number().int()
|
|
21890
21947
|
})).readonly() });
|
|
21948
|
+
/**
|
|
21949
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21950
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
21951
|
+
* is an alias of this, not a second list.
|
|
21952
|
+
*/
|
|
21953
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
21954
|
+
"motion",
|
|
21955
|
+
"audio-dbfs",
|
|
21956
|
+
"battery",
|
|
21957
|
+
"occupancy"
|
|
21958
|
+
]);
|
|
21959
|
+
/**
|
|
21960
|
+
* One closed 5-minute bucket of a long-term series.
|
|
21961
|
+
*
|
|
21962
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
21963
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
21964
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
21965
|
+
* different claim from zero and the reason this is a sparse series.
|
|
21966
|
+
*/
|
|
21967
|
+
var LtsBucketSchema = object({
|
|
21968
|
+
scope: string(),
|
|
21969
|
+
bucketStart: number().int(),
|
|
21970
|
+
samples: number().int().nonnegative(),
|
|
21971
|
+
sum: number(),
|
|
21972
|
+
min: number(),
|
|
21973
|
+
max: number()
|
|
21974
|
+
});
|
|
21891
21975
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
21892
21976
|
deviceId: number(),
|
|
21893
21977
|
trackId: string()
|
|
@@ -21934,6 +22018,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21934
22018
|
kinds: array(string()).optional(),
|
|
21935
22019
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
21936
22020
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
22021
|
+
deviceId: number(),
|
|
22022
|
+
series: AnalyticsLtsSeriesSchema,
|
|
22023
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
22024
|
+
scope: string().optional(),
|
|
22025
|
+
from: number(),
|
|
22026
|
+
to: number(),
|
|
22027
|
+
limit: number().int().positive().optional()
|
|
22028
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
21937
22029
|
deviceId: number(),
|
|
21938
22030
|
since: number(),
|
|
21939
22031
|
until: number(),
|
|
@@ -22552,6 +22644,14 @@ var MotionSourceEnum = _enum([
|
|
|
22552
22644
|
*/
|
|
22553
22645
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
22554
22646
|
/**
|
|
22647
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
22648
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
22649
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
22650
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
22651
|
+
* row.
|
|
22652
|
+
*/
|
|
22653
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
22654
|
+
/**
|
|
22555
22655
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
22556
22656
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
22557
22657
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -22702,6 +22802,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
22702
22802
|
* events; the orchestrator forwards to `reportMotion`.
|
|
22703
22803
|
*/
|
|
22704
22804
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
22805
|
+
/**
|
|
22806
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
22807
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
22808
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
22809
|
+
*
|
|
22810
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
22811
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
22812
|
+
* here. Its boxes reach post-analysis on the same
|
|
22813
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
22814
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
22815
|
+
* subtree (face / plate / embedding).
|
|
22816
|
+
*
|
|
22817
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
22818
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
22819
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
22820
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
22821
|
+
*
|
|
22822
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
22823
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
22824
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
22825
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
22826
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
22827
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
22828
|
+
*
|
|
22829
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
22830
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
22831
|
+
* default.
|
|
22832
|
+
*/
|
|
22833
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
22705
22834
|
pipelineEnabled: boolean().default(true),
|
|
22706
22835
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
22707
22836
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -22883,7 +23012,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
22883
23012
|
queueDepth: number(),
|
|
22884
23013
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
22885
23014
|
});
|
|
23015
|
+
/**
|
|
23016
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
23017
|
+
*
|
|
23018
|
+
* One instance per node. Receives camera assignments from
|
|
23019
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
23020
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
23021
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
23022
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
23023
|
+
* the bus.
|
|
23024
|
+
*
|
|
23025
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
23026
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
23027
|
+
* makes assignment decisions itself.
|
|
23028
|
+
*/
|
|
23029
|
+
/**
|
|
23030
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
23031
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
23032
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
23033
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
23034
|
+
*/
|
|
23035
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
23036
|
+
"not-attached",
|
|
23037
|
+
"battery-asleep",
|
|
23038
|
+
"not-watching",
|
|
23039
|
+
"already-bursting"
|
|
23040
|
+
]);
|
|
22886
23041
|
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({
|
|
23042
|
+
deviceId: number(),
|
|
23043
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
23044
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
23045
|
+
frames: number().int().positive().optional(),
|
|
23046
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
23047
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
23048
|
+
reason: string()
|
|
23049
|
+
}), object({
|
|
23050
|
+
started: boolean(),
|
|
23051
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
23052
|
+
}), {
|
|
23053
|
+
auth: "admin",
|
|
23054
|
+
kind: "mutation"
|
|
23055
|
+
}), method(object({
|
|
22887
23056
|
handle: FrameHandleSchema,
|
|
22888
23057
|
bbox: NativeCropBboxSchema,
|
|
22889
23058
|
maxWidth: number().int().positive().optional(),
|
|
@@ -29721,11 +29890,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
29721
29890
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
29722
29891
|
/**
|
|
29723
29892
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
29724
|
-
*
|
|
29725
|
-
*
|
|
29893
|
+
*
|
|
29894
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
29895
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
29896
|
+
* other detection choice is made. `geometry` on
|
|
29897
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
29898
|
+
* choice would buy this particular camera.
|
|
29726
29899
|
*/
|
|
29727
29900
|
enabled: boolean()
|
|
29728
29901
|
});
|
|
29902
|
+
/**
|
|
29903
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
29904
|
+
*
|
|
29905
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
29906
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
29907
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
29908
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
29909
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
29910
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
29911
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
29912
|
+
* something is in front of it, and its stream is already being pulled.
|
|
29913
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
29914
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
29915
|
+
* tracker as motion and no further.
|
|
29916
|
+
*
|
|
29917
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
29918
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
29919
|
+
* derived form is only as honest as `getOptions`).
|
|
29920
|
+
*/
|
|
29921
|
+
var NativeObjectGeometryEnum = _enum([
|
|
29922
|
+
"boxed",
|
|
29923
|
+
"while-streaming",
|
|
29924
|
+
"flag-only"
|
|
29925
|
+
]);
|
|
29926
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
29927
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
29928
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
29929
|
+
/** What a detection from this camera carries. */
|
|
29930
|
+
geometry: NativeObjectGeometryEnum
|
|
29931
|
+
});
|
|
29932
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
29729
29933
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
29730
29934
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
29731
29935
|
lastFetchedAt: number() });
|
|
@@ -29735,13 +29939,23 @@ var nativeObjectDetectionCapability = {
|
|
|
29735
29939
|
deviceNative: true,
|
|
29736
29940
|
mode: "singleton",
|
|
29737
29941
|
deviceTypes: [DeviceType.Camera],
|
|
29738
|
-
methods: {
|
|
29739
|
-
deviceId: number(),
|
|
29740
|
-
|
|
29741
|
-
|
|
29742
|
-
|
|
29743
|
-
|
|
29744
|
-
|
|
29942
|
+
methods: {
|
|
29943
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
29944
|
+
setSettings: method(object({
|
|
29945
|
+
deviceId: number(),
|
|
29946
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
29947
|
+
}), _void(), {
|
|
29948
|
+
kind: "mutation",
|
|
29949
|
+
auth: "admin"
|
|
29950
|
+
}),
|
|
29951
|
+
setEnabled: method(object({
|
|
29952
|
+
deviceId: number(),
|
|
29953
|
+
enabled: boolean()
|
|
29954
|
+
}), _void(), {
|
|
29955
|
+
kind: "mutation",
|
|
29956
|
+
auth: "admin"
|
|
29957
|
+
})
|
|
29958
|
+
},
|
|
29745
29959
|
events: { onDetected: { data: object({
|
|
29746
29960
|
deviceId: number(),
|
|
29747
29961
|
detection: NativeDetectionSchema
|
|
@@ -34589,7 +34803,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
34589
34803
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
34590
34804
|
totalObjects: number().int().nonnegative(),
|
|
34591
34805
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
34592
|
-
byClass: record(string(), number().int().nonnegative())
|
|
34806
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
34807
|
+
/**
|
|
34808
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
34809
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
34810
|
+
*
|
|
34811
|
+
* The operator's question about a scene has two halves and they answer
|
|
34812
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
34813
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
34814
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
34815
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
34816
|
+
*
|
|
34817
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
34818
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
34819
|
+
*
|
|
34820
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
34821
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
34822
|
+
* parked objects here" about a camera whose lot is full.
|
|
34823
|
+
*/
|
|
34824
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
34825
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
34826
|
+
* same absence rule. */
|
|
34827
|
+
transientObjects: number().int().nonnegative().optional()
|
|
34593
34828
|
});
|
|
34594
34829
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
34595
34830
|
zoneId: string(),
|
|
@@ -34712,6 +34947,23 @@ var HistoryPointSchema = object({
|
|
|
34712
34947
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
34713
34948
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
34714
34949
|
* combinatorial coverage the operator UI requested.
|
|
34950
|
+
*
|
|
34951
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34952
|
+
*
|
|
34953
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34954
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34955
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34956
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34957
|
+
* horizon rather than to answer a question.
|
|
34958
|
+
*
|
|
34959
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34960
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34961
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34962
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34963
|
+
* function the writer uses, so the two cannot drift.
|
|
34964
|
+
*
|
|
34965
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34966
|
+
* it. Do not add a fourth caller.
|
|
34715
34967
|
*/
|
|
34716
34968
|
var zoneAnalyticsCapability = {
|
|
34717
34969
|
name: "zone-analytics",
|
|
@@ -39111,12 +39363,24 @@ Object.freeze({
|
|
|
39111
39363
|
addonId: null,
|
|
39112
39364
|
access: "create"
|
|
39113
39365
|
},
|
|
39366
|
+
"nativeObjectDetection.getOptions": {
|
|
39367
|
+
capName: "native-object-detection",
|
|
39368
|
+
capScope: "device",
|
|
39369
|
+
addonId: null,
|
|
39370
|
+
access: "view"
|
|
39371
|
+
},
|
|
39114
39372
|
"nativeObjectDetection.setEnabled": {
|
|
39115
39373
|
capName: "native-object-detection",
|
|
39116
39374
|
capScope: "device",
|
|
39117
39375
|
addonId: null,
|
|
39118
39376
|
access: "create"
|
|
39119
39377
|
},
|
|
39378
|
+
"nativeObjectDetection.setSettings": {
|
|
39379
|
+
capName: "native-object-detection",
|
|
39380
|
+
capScope: "device",
|
|
39381
|
+
addonId: null,
|
|
39382
|
+
access: "create"
|
|
39383
|
+
},
|
|
39120
39384
|
"navigation.getFeatures": {
|
|
39121
39385
|
capName: "navigation",
|
|
39122
39386
|
capScope: "device",
|
|
@@ -39381,6 +39645,12 @@ Object.freeze({
|
|
|
39381
39645
|
addonId: null,
|
|
39382
39646
|
access: "view"
|
|
39383
39647
|
},
|
|
39648
|
+
"notificationRules.getClipRetentionAsks": {
|
|
39649
|
+
capName: "notification-rules",
|
|
39650
|
+
capScope: "system",
|
|
39651
|
+
addonId: null,
|
|
39652
|
+
access: "view"
|
|
39653
|
+
},
|
|
39384
39654
|
"notificationRules.getConditionCatalog": {
|
|
39385
39655
|
capName: "notification-rules",
|
|
39386
39656
|
capScope: "system",
|
|
@@ -39891,6 +40161,12 @@ Object.freeze({
|
|
|
39891
40161
|
addonId: null,
|
|
39892
40162
|
access: "create"
|
|
39893
40163
|
},
|
|
40164
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
40165
|
+
capName: "pipeline-analytics",
|
|
40166
|
+
capScope: "device",
|
|
40167
|
+
addonId: null,
|
|
40168
|
+
access: "view"
|
|
40169
|
+
},
|
|
39894
40170
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
39895
40171
|
capName: "pipeline-analytics",
|
|
39896
40172
|
capScope: "device",
|
|
@@ -40563,6 +40839,12 @@ Object.freeze({
|
|
|
40563
40839
|
addonId: null,
|
|
40564
40840
|
access: "create"
|
|
40565
40841
|
},
|
|
40842
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
40843
|
+
capName: "pipeline-runner",
|
|
40844
|
+
capScope: "system",
|
|
40845
|
+
addonId: null,
|
|
40846
|
+
access: "create"
|
|
40847
|
+
},
|
|
40566
40848
|
"pipelineRunner.runDetailSubtree": {
|
|
40567
40849
|
capName: "pipeline-runner",
|
|
40568
40850
|
capScope: "system",
|
|
@@ -43343,11 +43625,21 @@ Object.freeze({
|
|
|
43343
43625
|
form: "single",
|
|
43344
43626
|
optional: false
|
|
43345
43627
|
}],
|
|
43628
|
+
"nativeObjectDetection.getOptions": [{
|
|
43629
|
+
name: "deviceId",
|
|
43630
|
+
form: "single",
|
|
43631
|
+
optional: false
|
|
43632
|
+
}],
|
|
43346
43633
|
"nativeObjectDetection.setEnabled": [{
|
|
43347
43634
|
name: "deviceId",
|
|
43348
43635
|
form: "single",
|
|
43349
43636
|
optional: false
|
|
43350
43637
|
}],
|
|
43638
|
+
"nativeObjectDetection.setSettings": [{
|
|
43639
|
+
name: "deviceId",
|
|
43640
|
+
form: "single",
|
|
43641
|
+
optional: false
|
|
43642
|
+
}],
|
|
43351
43643
|
"navigation.getFeatures": [{
|
|
43352
43644
|
name: "deviceId",
|
|
43353
43645
|
form: "single",
|
|
@@ -43697,6 +43989,11 @@ Object.freeze({
|
|
|
43697
43989
|
form: "single",
|
|
43698
43990
|
optional: false
|
|
43699
43991
|
}],
|
|
43992
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43993
|
+
name: "deviceId",
|
|
43994
|
+
form: "single",
|
|
43995
|
+
optional: false
|
|
43996
|
+
}],
|
|
43700
43997
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
43701
43998
|
name: "deviceId",
|
|
43702
43999
|
form: "single",
|
|
@@ -43887,6 +44184,11 @@ Object.freeze({
|
|
|
43887
44184
|
form: "single",
|
|
43888
44185
|
optional: false
|
|
43889
44186
|
}],
|
|
44187
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
44188
|
+
name: "deviceId",
|
|
44189
|
+
form: "single",
|
|
44190
|
+
optional: false
|
|
44191
|
+
}],
|
|
43890
44192
|
"pipelineRunner.runDetailSubtree": [{
|
|
43891
44193
|
name: "deviceId",
|
|
43892
44194
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-petkit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.103",
|
|
4
4
|
"description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"dev": "vite build --watch",
|
|
71
71
|
"typecheck": "tsc --noEmit",
|
|
72
72
|
"test": "vitest run",
|
|
73
|
-
"publish": "npm publish --access public"
|
|
73
|
+
"publish:npm": "npm publish --access public"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@apocaliss92/nodepetkit": "0.1.0",
|