@camstack/addon-provider-hikvision 1.2.110 → 1.2.111
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 +326 -24
- package/dist/addon.mjs +326 -24
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -5367,7 +5367,7 @@ var ZodIssueCode = {
|
|
|
5367
5367
|
var ZodFirstPartyTypeKind;
|
|
5368
5368
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5369
5369
|
//#endregion
|
|
5370
|
-
//#region ../types/dist/sleep-
|
|
5370
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5371
5371
|
/**
|
|
5372
5372
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5373
5373
|
* window to float samples (D455).
|
|
@@ -7252,6 +7252,18 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
7252
7252
|
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
7253
7253
|
return DeviceRole;
|
|
7254
7254
|
}({});
|
|
7255
|
+
function deviceCustomAction(input, output, options) {
|
|
7256
|
+
return {
|
|
7257
|
+
input,
|
|
7258
|
+
output,
|
|
7259
|
+
kind: options?.kind ?? "query",
|
|
7260
|
+
auth: options?.auth ?? "protected",
|
|
7261
|
+
scope: {
|
|
7262
|
+
kind: "device",
|
|
7263
|
+
...options?.deviceTypes ? { deviceTypes: options.deviceTypes } : {}
|
|
7264
|
+
}
|
|
7265
|
+
};
|
|
7266
|
+
}
|
|
7255
7267
|
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
7256
7268
|
var VersionOutputSchema = object({ version: string() });
|
|
7257
7269
|
method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
|
|
@@ -11838,6 +11850,21 @@ var streamSignalsCapability = {
|
|
|
11838
11850
|
mode: "singleton",
|
|
11839
11851
|
deviceTypes: Object.values(DeviceType),
|
|
11840
11852
|
runtimeState: StreamSignalsStatusSchema,
|
|
11853
|
+
/**
|
|
11854
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11855
|
+
*
|
|
11856
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11857
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11858
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11859
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11860
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11861
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11862
|
+
* because the fix could not reach it.
|
|
11863
|
+
*
|
|
11864
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11865
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11866
|
+
*/
|
|
11867
|
+
durability: "session",
|
|
11841
11868
|
methods: {
|
|
11842
11869
|
/**
|
|
11843
11870
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -12811,18 +12838,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
12811
12838
|
filePath: string(),
|
|
12812
12839
|
content: string()
|
|
12813
12840
|
})) }), { auth: "admin" });
|
|
12814
|
-
function deviceCustomAction(input, output, options) {
|
|
12815
|
-
return {
|
|
12816
|
-
input,
|
|
12817
|
-
output,
|
|
12818
|
-
kind: options?.kind ?? "query",
|
|
12819
|
-
auth: options?.auth ?? "protected",
|
|
12820
|
-
scope: {
|
|
12821
|
-
kind: "device",
|
|
12822
|
-
...options?.deviceTypes ? { deviceTypes: options.deviceTypes } : {}
|
|
12823
|
-
}
|
|
12824
|
-
};
|
|
12825
|
-
}
|
|
12826
12841
|
/**
|
|
12827
12842
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
12828
12843
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -18483,6 +18498,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18483
18498
|
settings: NcAlarmSettingsSchema,
|
|
18484
18499
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18485
18500
|
});
|
|
18501
|
+
/**
|
|
18502
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18503
|
+
*
|
|
18504
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18505
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18506
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18507
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18508
|
+
* a different thing from never having been told, and only the envelope
|
|
18509
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18510
|
+
*/
|
|
18511
|
+
var NcClipRetentionAskSchema = object({
|
|
18512
|
+
/**
|
|
18513
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18514
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18515
|
+
* asking everywhere.
|
|
18516
|
+
*/
|
|
18517
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18518
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18519
|
+
* needs nothing produces no ask at all. */
|
|
18520
|
+
seconds: number().min(0).max(60),
|
|
18521
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18522
|
+
* assigned, which is what the cut defaults to. */
|
|
18523
|
+
profile: CamProfileSchema.optional(),
|
|
18524
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18525
|
+
ruleId: string(),
|
|
18526
|
+
ruleName: string(),
|
|
18527
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18528
|
+
reason: _enum(["window", "occupancy"])
|
|
18529
|
+
});
|
|
18530
|
+
/**
|
|
18531
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18532
|
+
*
|
|
18533
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18534
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18535
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18536
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18537
|
+
* footage this mechanism exists to keep.
|
|
18538
|
+
*/
|
|
18539
|
+
var NcClipRetentionPlanSchema = object({
|
|
18540
|
+
rulesLoaded: boolean(),
|
|
18541
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18542
|
+
});
|
|
18486
18543
|
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 }), {
|
|
18487
18544
|
kind: "mutation",
|
|
18488
18545
|
auth: "admin",
|
|
@@ -18503,7 +18560,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18503
18560
|
}), object({ success: literal(true) }), {
|
|
18504
18561
|
kind: "mutation",
|
|
18505
18562
|
auth: "admin"
|
|
18506
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18563
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18507
18564
|
deviceId: number().int(),
|
|
18508
18565
|
muted: boolean()
|
|
18509
18566
|
}), object({ success: literal(true) }), {
|
|
@@ -21077,6 +21134,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
21077
21134
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21078
21135
|
framesMatched: number().int()
|
|
21079
21136
|
})).readonly() });
|
|
21137
|
+
/**
|
|
21138
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21139
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
21140
|
+
* is an alias of this, not a second list.
|
|
21141
|
+
*/
|
|
21142
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
21143
|
+
"motion",
|
|
21144
|
+
"audio-dbfs",
|
|
21145
|
+
"battery",
|
|
21146
|
+
"occupancy"
|
|
21147
|
+
]);
|
|
21148
|
+
/**
|
|
21149
|
+
* One closed 5-minute bucket of a long-term series.
|
|
21150
|
+
*
|
|
21151
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
21152
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
21153
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
21154
|
+
* different claim from zero and the reason this is a sparse series.
|
|
21155
|
+
*/
|
|
21156
|
+
var LtsBucketSchema = object({
|
|
21157
|
+
scope: string(),
|
|
21158
|
+
bucketStart: number().int(),
|
|
21159
|
+
samples: number().int().nonnegative(),
|
|
21160
|
+
sum: number(),
|
|
21161
|
+
min: number(),
|
|
21162
|
+
max: number()
|
|
21163
|
+
});
|
|
21080
21164
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
21081
21165
|
deviceId: number(),
|
|
21082
21166
|
trackId: string()
|
|
@@ -21123,6 +21207,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21123
21207
|
kinds: array(string()).optional(),
|
|
21124
21208
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
21125
21209
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
21210
|
+
deviceId: number(),
|
|
21211
|
+
series: AnalyticsLtsSeriesSchema,
|
|
21212
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
21213
|
+
scope: string().optional(),
|
|
21214
|
+
from: number(),
|
|
21215
|
+
to: number(),
|
|
21216
|
+
limit: number().int().positive().optional()
|
|
21217
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
21126
21218
|
deviceId: number(),
|
|
21127
21219
|
since: number(),
|
|
21128
21220
|
until: number(),
|
|
@@ -21741,6 +21833,14 @@ var MotionSourceEnum = _enum([
|
|
|
21741
21833
|
*/
|
|
21742
21834
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21743
21835
|
/**
|
|
21836
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21837
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21838
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21839
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21840
|
+
* row.
|
|
21841
|
+
*/
|
|
21842
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21843
|
+
/**
|
|
21744
21844
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21745
21845
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21746
21846
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21891,6 +21991,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21891
21991
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21892
21992
|
*/
|
|
21893
21993
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21994
|
+
/**
|
|
21995
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21996
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21997
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21998
|
+
*
|
|
21999
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
22000
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
22001
|
+
* here. Its boxes reach post-analysis on the same
|
|
22002
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
22003
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
22004
|
+
* subtree (face / plate / embedding).
|
|
22005
|
+
*
|
|
22006
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
22007
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
22008
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
22009
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
22010
|
+
*
|
|
22011
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
22012
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
22013
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
22014
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
22015
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
22016
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
22017
|
+
*
|
|
22018
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
22019
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
22020
|
+
* default.
|
|
22021
|
+
*/
|
|
22022
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21894
22023
|
pipelineEnabled: boolean().default(true),
|
|
21895
22024
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21896
22025
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -22072,7 +22201,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
22072
22201
|
queueDepth: number(),
|
|
22073
22202
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
22074
22203
|
});
|
|
22204
|
+
/**
|
|
22205
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
22206
|
+
*
|
|
22207
|
+
* One instance per node. Receives camera assignments from
|
|
22208
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
22209
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
22210
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
22211
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
22212
|
+
* the bus.
|
|
22213
|
+
*
|
|
22214
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
22215
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
22216
|
+
* makes assignment decisions itself.
|
|
22217
|
+
*/
|
|
22218
|
+
/**
|
|
22219
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
22220
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
22221
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
22222
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
22223
|
+
*/
|
|
22224
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
22225
|
+
"not-attached",
|
|
22226
|
+
"battery-asleep",
|
|
22227
|
+
"not-watching",
|
|
22228
|
+
"already-bursting"
|
|
22229
|
+
]);
|
|
22075
22230
|
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({
|
|
22231
|
+
deviceId: number(),
|
|
22232
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22233
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22234
|
+
frames: number().int().positive().optional(),
|
|
22235
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22236
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22237
|
+
reason: string()
|
|
22238
|
+
}), object({
|
|
22239
|
+
started: boolean(),
|
|
22240
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22241
|
+
}), {
|
|
22242
|
+
auth: "admin",
|
|
22243
|
+
kind: "mutation"
|
|
22244
|
+
}), method(object({
|
|
22076
22245
|
handle: FrameHandleSchema,
|
|
22077
22246
|
bbox: NativeCropBboxSchema,
|
|
22078
22247
|
maxWidth: number().int().positive().optional(),
|
|
@@ -29031,11 +29200,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
29031
29200
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
29032
29201
|
/**
|
|
29033
29202
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
29034
|
-
*
|
|
29035
|
-
*
|
|
29203
|
+
*
|
|
29204
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
29205
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
29206
|
+
* other detection choice is made. `geometry` on
|
|
29207
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
29208
|
+
* choice would buy this particular camera.
|
|
29036
29209
|
*/
|
|
29037
29210
|
enabled: boolean()
|
|
29038
29211
|
});
|
|
29212
|
+
/**
|
|
29213
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
29214
|
+
*
|
|
29215
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
29216
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
29217
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
29218
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
29219
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
29220
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
29221
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
29222
|
+
* something is in front of it, and its stream is already being pulled.
|
|
29223
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
29224
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
29225
|
+
* tracker as motion and no further.
|
|
29226
|
+
*
|
|
29227
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
29228
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
29229
|
+
* derived form is only as honest as `getOptions`).
|
|
29230
|
+
*/
|
|
29231
|
+
var NativeObjectGeometryEnum = _enum([
|
|
29232
|
+
"boxed",
|
|
29233
|
+
"while-streaming",
|
|
29234
|
+
"flag-only"
|
|
29235
|
+
]);
|
|
29236
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
29237
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
29238
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
29239
|
+
/** What a detection from this camera carries. */
|
|
29240
|
+
geometry: NativeObjectGeometryEnum
|
|
29241
|
+
});
|
|
29242
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
29039
29243
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
29040
29244
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
29041
29245
|
lastFetchedAt: number() });
|
|
@@ -29045,13 +29249,23 @@ var nativeObjectDetectionCapability = {
|
|
|
29045
29249
|
deviceNative: true,
|
|
29046
29250
|
mode: "singleton",
|
|
29047
29251
|
deviceTypes: [DeviceType.Camera],
|
|
29048
|
-
methods: {
|
|
29049
|
-
deviceId: number(),
|
|
29050
|
-
|
|
29051
|
-
|
|
29052
|
-
|
|
29053
|
-
|
|
29054
|
-
|
|
29252
|
+
methods: {
|
|
29253
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
29254
|
+
setSettings: method(object({
|
|
29255
|
+
deviceId: number(),
|
|
29256
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
29257
|
+
}), _void(), {
|
|
29258
|
+
kind: "mutation",
|
|
29259
|
+
auth: "admin"
|
|
29260
|
+
}),
|
|
29261
|
+
setEnabled: method(object({
|
|
29262
|
+
deviceId: number(),
|
|
29263
|
+
enabled: boolean()
|
|
29264
|
+
}), _void(), {
|
|
29265
|
+
kind: "mutation",
|
|
29266
|
+
auth: "admin"
|
|
29267
|
+
})
|
|
29268
|
+
},
|
|
29055
29269
|
events: { onDetected: { data: object({
|
|
29056
29270
|
deviceId: number(),
|
|
29057
29271
|
detection: NativeDetectionSchema
|
|
@@ -34230,7 +34444,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
34230
34444
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
34231
34445
|
totalObjects: number().int().nonnegative(),
|
|
34232
34446
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
34233
|
-
byClass: record(string(), number().int().nonnegative())
|
|
34447
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
34448
|
+
/**
|
|
34449
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
34450
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
34451
|
+
*
|
|
34452
|
+
* The operator's question about a scene has two halves and they answer
|
|
34453
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
34454
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
34455
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
34456
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
34457
|
+
*
|
|
34458
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
34459
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
34460
|
+
*
|
|
34461
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
34462
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
34463
|
+
* parked objects here" about a camera whose lot is full.
|
|
34464
|
+
*/
|
|
34465
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
34466
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
34467
|
+
* same absence rule. */
|
|
34468
|
+
transientObjects: number().int().nonnegative().optional()
|
|
34234
34469
|
});
|
|
34235
34470
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
34236
34471
|
zoneId: string(),
|
|
@@ -34353,6 +34588,23 @@ var HistoryPointSchema = object({
|
|
|
34353
34588
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
34354
34589
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
34355
34590
|
* combinatorial coverage the operator UI requested.
|
|
34591
|
+
*
|
|
34592
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34593
|
+
*
|
|
34594
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34595
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34596
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34597
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34598
|
+
* horizon rather than to answer a question.
|
|
34599
|
+
*
|
|
34600
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34601
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34602
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34603
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34604
|
+
* function the writer uses, so the two cannot drift.
|
|
34605
|
+
*
|
|
34606
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34607
|
+
* it. Do not add a fourth caller.
|
|
34356
34608
|
*/
|
|
34357
34609
|
var zoneAnalyticsCapability = {
|
|
34358
34610
|
name: "zone-analytics",
|
|
@@ -38985,12 +39237,24 @@ Object.freeze({
|
|
|
38985
39237
|
addonId: null,
|
|
38986
39238
|
access: "create"
|
|
38987
39239
|
},
|
|
39240
|
+
"nativeObjectDetection.getOptions": {
|
|
39241
|
+
capName: "native-object-detection",
|
|
39242
|
+
capScope: "device",
|
|
39243
|
+
addonId: null,
|
|
39244
|
+
access: "view"
|
|
39245
|
+
},
|
|
38988
39246
|
"nativeObjectDetection.setEnabled": {
|
|
38989
39247
|
capName: "native-object-detection",
|
|
38990
39248
|
capScope: "device",
|
|
38991
39249
|
addonId: null,
|
|
38992
39250
|
access: "create"
|
|
38993
39251
|
},
|
|
39252
|
+
"nativeObjectDetection.setSettings": {
|
|
39253
|
+
capName: "native-object-detection",
|
|
39254
|
+
capScope: "device",
|
|
39255
|
+
addonId: null,
|
|
39256
|
+
access: "create"
|
|
39257
|
+
},
|
|
38994
39258
|
"navigation.getFeatures": {
|
|
38995
39259
|
capName: "navigation",
|
|
38996
39260
|
capScope: "device",
|
|
@@ -39255,6 +39519,12 @@ Object.freeze({
|
|
|
39255
39519
|
addonId: null,
|
|
39256
39520
|
access: "view"
|
|
39257
39521
|
},
|
|
39522
|
+
"notificationRules.getClipRetentionAsks": {
|
|
39523
|
+
capName: "notification-rules",
|
|
39524
|
+
capScope: "system",
|
|
39525
|
+
addonId: null,
|
|
39526
|
+
access: "view"
|
|
39527
|
+
},
|
|
39258
39528
|
"notificationRules.getConditionCatalog": {
|
|
39259
39529
|
capName: "notification-rules",
|
|
39260
39530
|
capScope: "system",
|
|
@@ -39765,6 +40035,12 @@ Object.freeze({
|
|
|
39765
40035
|
addonId: null,
|
|
39766
40036
|
access: "create"
|
|
39767
40037
|
},
|
|
40038
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
40039
|
+
capName: "pipeline-analytics",
|
|
40040
|
+
capScope: "device",
|
|
40041
|
+
addonId: null,
|
|
40042
|
+
access: "view"
|
|
40043
|
+
},
|
|
39768
40044
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
39769
40045
|
capName: "pipeline-analytics",
|
|
39770
40046
|
capScope: "device",
|
|
@@ -40437,6 +40713,12 @@ Object.freeze({
|
|
|
40437
40713
|
addonId: null,
|
|
40438
40714
|
access: "create"
|
|
40439
40715
|
},
|
|
40716
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
40717
|
+
capName: "pipeline-runner",
|
|
40718
|
+
capScope: "system",
|
|
40719
|
+
addonId: null,
|
|
40720
|
+
access: "create"
|
|
40721
|
+
},
|
|
40440
40722
|
"pipelineRunner.runDetailSubtree": {
|
|
40441
40723
|
capName: "pipeline-runner",
|
|
40442
40724
|
capScope: "system",
|
|
@@ -43217,11 +43499,21 @@ Object.freeze({
|
|
|
43217
43499
|
form: "single",
|
|
43218
43500
|
optional: false
|
|
43219
43501
|
}],
|
|
43502
|
+
"nativeObjectDetection.getOptions": [{
|
|
43503
|
+
name: "deviceId",
|
|
43504
|
+
form: "single",
|
|
43505
|
+
optional: false
|
|
43506
|
+
}],
|
|
43220
43507
|
"nativeObjectDetection.setEnabled": [{
|
|
43221
43508
|
name: "deviceId",
|
|
43222
43509
|
form: "single",
|
|
43223
43510
|
optional: false
|
|
43224
43511
|
}],
|
|
43512
|
+
"nativeObjectDetection.setSettings": [{
|
|
43513
|
+
name: "deviceId",
|
|
43514
|
+
form: "single",
|
|
43515
|
+
optional: false
|
|
43516
|
+
}],
|
|
43225
43517
|
"navigation.getFeatures": [{
|
|
43226
43518
|
name: "deviceId",
|
|
43227
43519
|
form: "single",
|
|
@@ -43571,6 +43863,11 @@ Object.freeze({
|
|
|
43571
43863
|
form: "single",
|
|
43572
43864
|
optional: false
|
|
43573
43865
|
}],
|
|
43866
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43867
|
+
name: "deviceId",
|
|
43868
|
+
form: "single",
|
|
43869
|
+
optional: false
|
|
43870
|
+
}],
|
|
43574
43871
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
43575
43872
|
name: "deviceId",
|
|
43576
43873
|
form: "single",
|
|
@@ -43761,6 +44058,11 @@ Object.freeze({
|
|
|
43761
44058
|
form: "single",
|
|
43762
44059
|
optional: false
|
|
43763
44060
|
}],
|
|
44061
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
44062
|
+
name: "deviceId",
|
|
44063
|
+
form: "single",
|
|
44064
|
+
optional: false
|
|
44065
|
+
}],
|
|
43764
44066
|
"pipelineRunner.runDetailSubtree": [{
|
|
43765
44067
|
name: "deviceId",
|
|
43766
44068
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5368,7 +5368,7 @@ var ZodIssueCode = {
|
|
|
5368
5368
|
var ZodFirstPartyTypeKind;
|
|
5369
5369
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5370
5370
|
//#endregion
|
|
5371
|
-
//#region ../types/dist/sleep-
|
|
5371
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5372
5372
|
/**
|
|
5373
5373
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5374
5374
|
* window to float samples (D455).
|
|
@@ -7253,6 +7253,18 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
7253
7253
|
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
7254
7254
|
return DeviceRole;
|
|
7255
7255
|
}({});
|
|
7256
|
+
function deviceCustomAction(input, output, options) {
|
|
7257
|
+
return {
|
|
7258
|
+
input,
|
|
7259
|
+
output,
|
|
7260
|
+
kind: options?.kind ?? "query",
|
|
7261
|
+
auth: options?.auth ?? "protected",
|
|
7262
|
+
scope: {
|
|
7263
|
+
kind: "device",
|
|
7264
|
+
...options?.deviceTypes ? { deviceTypes: options.deviceTypes } : {}
|
|
7265
|
+
}
|
|
7266
|
+
};
|
|
7267
|
+
}
|
|
7256
7268
|
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
7257
7269
|
var VersionOutputSchema = object({ version: string() });
|
|
7258
7270
|
method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
|
|
@@ -11839,6 +11851,21 @@ var streamSignalsCapability = {
|
|
|
11839
11851
|
mode: "singleton",
|
|
11840
11852
|
deviceTypes: Object.values(DeviceType),
|
|
11841
11853
|
runtimeState: StreamSignalsStatusSchema,
|
|
11854
|
+
/**
|
|
11855
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11856
|
+
*
|
|
11857
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11858
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11859
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11860
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11861
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11862
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11863
|
+
* because the fix could not reach it.
|
|
11864
|
+
*
|
|
11865
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11866
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11867
|
+
*/
|
|
11868
|
+
durability: "session",
|
|
11842
11869
|
methods: {
|
|
11843
11870
|
/**
|
|
11844
11871
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -12812,18 +12839,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
12812
12839
|
filePath: string(),
|
|
12813
12840
|
content: string()
|
|
12814
12841
|
})) }), { auth: "admin" });
|
|
12815
|
-
function deviceCustomAction(input, output, options) {
|
|
12816
|
-
return {
|
|
12817
|
-
input,
|
|
12818
|
-
output,
|
|
12819
|
-
kind: options?.kind ?? "query",
|
|
12820
|
-
auth: options?.auth ?? "protected",
|
|
12821
|
-
scope: {
|
|
12822
|
-
kind: "device",
|
|
12823
|
-
...options?.deviceTypes ? { deviceTypes: options.deviceTypes } : {}
|
|
12824
|
-
}
|
|
12825
|
-
};
|
|
12826
|
-
}
|
|
12827
12842
|
/**
|
|
12828
12843
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
12829
12844
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -18484,6 +18499,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18484
18499
|
settings: NcAlarmSettingsSchema,
|
|
18485
18500
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18486
18501
|
});
|
|
18502
|
+
/**
|
|
18503
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18504
|
+
*
|
|
18505
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18506
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18507
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18508
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18509
|
+
* a different thing from never having been told, and only the envelope
|
|
18510
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18511
|
+
*/
|
|
18512
|
+
var NcClipRetentionAskSchema = object({
|
|
18513
|
+
/**
|
|
18514
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18515
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18516
|
+
* asking everywhere.
|
|
18517
|
+
*/
|
|
18518
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18519
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18520
|
+
* needs nothing produces no ask at all. */
|
|
18521
|
+
seconds: number().min(0).max(60),
|
|
18522
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18523
|
+
* assigned, which is what the cut defaults to. */
|
|
18524
|
+
profile: CamProfileSchema.optional(),
|
|
18525
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18526
|
+
ruleId: string(),
|
|
18527
|
+
ruleName: string(),
|
|
18528
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18529
|
+
reason: _enum(["window", "occupancy"])
|
|
18530
|
+
});
|
|
18531
|
+
/**
|
|
18532
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18533
|
+
*
|
|
18534
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18535
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18536
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18537
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18538
|
+
* footage this mechanism exists to keep.
|
|
18539
|
+
*/
|
|
18540
|
+
var NcClipRetentionPlanSchema = object({
|
|
18541
|
+
rulesLoaded: boolean(),
|
|
18542
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18543
|
+
});
|
|
18487
18544
|
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 }), {
|
|
18488
18545
|
kind: "mutation",
|
|
18489
18546
|
auth: "admin",
|
|
@@ -18504,7 +18561,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18504
18561
|
}), object({ success: literal(true) }), {
|
|
18505
18562
|
kind: "mutation",
|
|
18506
18563
|
auth: "admin"
|
|
18507
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18564
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18508
18565
|
deviceId: number().int(),
|
|
18509
18566
|
muted: boolean()
|
|
18510
18567
|
}), object({ success: literal(true) }), {
|
|
@@ -21078,6 +21135,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
21078
21135
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21079
21136
|
framesMatched: number().int()
|
|
21080
21137
|
})).readonly() });
|
|
21138
|
+
/**
|
|
21139
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21140
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
21141
|
+
* is an alias of this, not a second list.
|
|
21142
|
+
*/
|
|
21143
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
21144
|
+
"motion",
|
|
21145
|
+
"audio-dbfs",
|
|
21146
|
+
"battery",
|
|
21147
|
+
"occupancy"
|
|
21148
|
+
]);
|
|
21149
|
+
/**
|
|
21150
|
+
* One closed 5-minute bucket of a long-term series.
|
|
21151
|
+
*
|
|
21152
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
21153
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
21154
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
21155
|
+
* different claim from zero and the reason this is a sparse series.
|
|
21156
|
+
*/
|
|
21157
|
+
var LtsBucketSchema = object({
|
|
21158
|
+
scope: string(),
|
|
21159
|
+
bucketStart: number().int(),
|
|
21160
|
+
samples: number().int().nonnegative(),
|
|
21161
|
+
sum: number(),
|
|
21162
|
+
min: number(),
|
|
21163
|
+
max: number()
|
|
21164
|
+
});
|
|
21081
21165
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
21082
21166
|
deviceId: number(),
|
|
21083
21167
|
trackId: string()
|
|
@@ -21124,6 +21208,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21124
21208
|
kinds: array(string()).optional(),
|
|
21125
21209
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
21126
21210
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
21211
|
+
deviceId: number(),
|
|
21212
|
+
series: AnalyticsLtsSeriesSchema,
|
|
21213
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
21214
|
+
scope: string().optional(),
|
|
21215
|
+
from: number(),
|
|
21216
|
+
to: number(),
|
|
21217
|
+
limit: number().int().positive().optional()
|
|
21218
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
21127
21219
|
deviceId: number(),
|
|
21128
21220
|
since: number(),
|
|
21129
21221
|
until: number(),
|
|
@@ -21742,6 +21834,14 @@ var MotionSourceEnum = _enum([
|
|
|
21742
21834
|
*/
|
|
21743
21835
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21744
21836
|
/**
|
|
21837
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21838
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21839
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21840
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21841
|
+
* row.
|
|
21842
|
+
*/
|
|
21843
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21844
|
+
/**
|
|
21745
21845
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21746
21846
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21747
21847
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21892,6 +21992,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21892
21992
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21893
21993
|
*/
|
|
21894
21994
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21995
|
+
/**
|
|
21996
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21997
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21998
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21999
|
+
*
|
|
22000
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
22001
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
22002
|
+
* here. Its boxes reach post-analysis on the same
|
|
22003
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
22004
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
22005
|
+
* subtree (face / plate / embedding).
|
|
22006
|
+
*
|
|
22007
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
22008
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
22009
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
22010
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
22011
|
+
*
|
|
22012
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
22013
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
22014
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
22015
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
22016
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
22017
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
22018
|
+
*
|
|
22019
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
22020
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
22021
|
+
* default.
|
|
22022
|
+
*/
|
|
22023
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21895
22024
|
pipelineEnabled: boolean().default(true),
|
|
21896
22025
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21897
22026
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -22073,7 +22202,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
22073
22202
|
queueDepth: number(),
|
|
22074
22203
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
22075
22204
|
});
|
|
22205
|
+
/**
|
|
22206
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
22207
|
+
*
|
|
22208
|
+
* One instance per node. Receives camera assignments from
|
|
22209
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
22210
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
22211
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
22212
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
22213
|
+
* the bus.
|
|
22214
|
+
*
|
|
22215
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
22216
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
22217
|
+
* makes assignment decisions itself.
|
|
22218
|
+
*/
|
|
22219
|
+
/**
|
|
22220
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
22221
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
22222
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
22223
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
22224
|
+
*/
|
|
22225
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
22226
|
+
"not-attached",
|
|
22227
|
+
"battery-asleep",
|
|
22228
|
+
"not-watching",
|
|
22229
|
+
"already-bursting"
|
|
22230
|
+
]);
|
|
22076
22231
|
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({
|
|
22232
|
+
deviceId: number(),
|
|
22233
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22234
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22235
|
+
frames: number().int().positive().optional(),
|
|
22236
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22237
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22238
|
+
reason: string()
|
|
22239
|
+
}), object({
|
|
22240
|
+
started: boolean(),
|
|
22241
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22242
|
+
}), {
|
|
22243
|
+
auth: "admin",
|
|
22244
|
+
kind: "mutation"
|
|
22245
|
+
}), method(object({
|
|
22077
22246
|
handle: FrameHandleSchema,
|
|
22078
22247
|
bbox: NativeCropBboxSchema,
|
|
22079
22248
|
maxWidth: number().int().positive().optional(),
|
|
@@ -29032,11 +29201,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
29032
29201
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
29033
29202
|
/**
|
|
29034
29203
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
29035
|
-
*
|
|
29036
|
-
*
|
|
29204
|
+
*
|
|
29205
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
29206
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
29207
|
+
* other detection choice is made. `geometry` on
|
|
29208
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
29209
|
+
* choice would buy this particular camera.
|
|
29037
29210
|
*/
|
|
29038
29211
|
enabled: boolean()
|
|
29039
29212
|
});
|
|
29213
|
+
/**
|
|
29214
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
29215
|
+
*
|
|
29216
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
29217
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
29218
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
29219
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
29220
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
29221
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
29222
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
29223
|
+
* something is in front of it, and its stream is already being pulled.
|
|
29224
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
29225
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
29226
|
+
* tracker as motion and no further.
|
|
29227
|
+
*
|
|
29228
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
29229
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
29230
|
+
* derived form is only as honest as `getOptions`).
|
|
29231
|
+
*/
|
|
29232
|
+
var NativeObjectGeometryEnum = _enum([
|
|
29233
|
+
"boxed",
|
|
29234
|
+
"while-streaming",
|
|
29235
|
+
"flag-only"
|
|
29236
|
+
]);
|
|
29237
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
29238
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
29239
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
29240
|
+
/** What a detection from this camera carries. */
|
|
29241
|
+
geometry: NativeObjectGeometryEnum
|
|
29242
|
+
});
|
|
29243
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
29040
29244
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
29041
29245
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
29042
29246
|
lastFetchedAt: number() });
|
|
@@ -29046,13 +29250,23 @@ var nativeObjectDetectionCapability = {
|
|
|
29046
29250
|
deviceNative: true,
|
|
29047
29251
|
mode: "singleton",
|
|
29048
29252
|
deviceTypes: [DeviceType.Camera],
|
|
29049
|
-
methods: {
|
|
29050
|
-
deviceId: number(),
|
|
29051
|
-
|
|
29052
|
-
|
|
29053
|
-
|
|
29054
|
-
|
|
29055
|
-
|
|
29253
|
+
methods: {
|
|
29254
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
29255
|
+
setSettings: method(object({
|
|
29256
|
+
deviceId: number(),
|
|
29257
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
29258
|
+
}), _void(), {
|
|
29259
|
+
kind: "mutation",
|
|
29260
|
+
auth: "admin"
|
|
29261
|
+
}),
|
|
29262
|
+
setEnabled: method(object({
|
|
29263
|
+
deviceId: number(),
|
|
29264
|
+
enabled: boolean()
|
|
29265
|
+
}), _void(), {
|
|
29266
|
+
kind: "mutation",
|
|
29267
|
+
auth: "admin"
|
|
29268
|
+
})
|
|
29269
|
+
},
|
|
29056
29270
|
events: { onDetected: { data: object({
|
|
29057
29271
|
deviceId: number(),
|
|
29058
29272
|
detection: NativeDetectionSchema
|
|
@@ -34231,7 +34445,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
34231
34445
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
34232
34446
|
totalObjects: number().int().nonnegative(),
|
|
34233
34447
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
34234
|
-
byClass: record(string(), number().int().nonnegative())
|
|
34448
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
34449
|
+
/**
|
|
34450
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
34451
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
34452
|
+
*
|
|
34453
|
+
* The operator's question about a scene has two halves and they answer
|
|
34454
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
34455
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
34456
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
34457
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
34458
|
+
*
|
|
34459
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
34460
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
34461
|
+
*
|
|
34462
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
34463
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
34464
|
+
* parked objects here" about a camera whose lot is full.
|
|
34465
|
+
*/
|
|
34466
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
34467
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
34468
|
+
* same absence rule. */
|
|
34469
|
+
transientObjects: number().int().nonnegative().optional()
|
|
34235
34470
|
});
|
|
34236
34471
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
34237
34472
|
zoneId: string(),
|
|
@@ -34354,6 +34589,23 @@ var HistoryPointSchema = object({
|
|
|
34354
34589
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
34355
34590
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
34356
34591
|
* combinatorial coverage the operator UI requested.
|
|
34592
|
+
*
|
|
34593
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34594
|
+
*
|
|
34595
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34596
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34597
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34598
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34599
|
+
* horizon rather than to answer a question.
|
|
34600
|
+
*
|
|
34601
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34602
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34603
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34604
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34605
|
+
* function the writer uses, so the two cannot drift.
|
|
34606
|
+
*
|
|
34607
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34608
|
+
* it. Do not add a fourth caller.
|
|
34357
34609
|
*/
|
|
34358
34610
|
var zoneAnalyticsCapability = {
|
|
34359
34611
|
name: "zone-analytics",
|
|
@@ -38986,12 +39238,24 @@ Object.freeze({
|
|
|
38986
39238
|
addonId: null,
|
|
38987
39239
|
access: "create"
|
|
38988
39240
|
},
|
|
39241
|
+
"nativeObjectDetection.getOptions": {
|
|
39242
|
+
capName: "native-object-detection",
|
|
39243
|
+
capScope: "device",
|
|
39244
|
+
addonId: null,
|
|
39245
|
+
access: "view"
|
|
39246
|
+
},
|
|
38989
39247
|
"nativeObjectDetection.setEnabled": {
|
|
38990
39248
|
capName: "native-object-detection",
|
|
38991
39249
|
capScope: "device",
|
|
38992
39250
|
addonId: null,
|
|
38993
39251
|
access: "create"
|
|
38994
39252
|
},
|
|
39253
|
+
"nativeObjectDetection.setSettings": {
|
|
39254
|
+
capName: "native-object-detection",
|
|
39255
|
+
capScope: "device",
|
|
39256
|
+
addonId: null,
|
|
39257
|
+
access: "create"
|
|
39258
|
+
},
|
|
38995
39259
|
"navigation.getFeatures": {
|
|
38996
39260
|
capName: "navigation",
|
|
38997
39261
|
capScope: "device",
|
|
@@ -39256,6 +39520,12 @@ Object.freeze({
|
|
|
39256
39520
|
addonId: null,
|
|
39257
39521
|
access: "view"
|
|
39258
39522
|
},
|
|
39523
|
+
"notificationRules.getClipRetentionAsks": {
|
|
39524
|
+
capName: "notification-rules",
|
|
39525
|
+
capScope: "system",
|
|
39526
|
+
addonId: null,
|
|
39527
|
+
access: "view"
|
|
39528
|
+
},
|
|
39259
39529
|
"notificationRules.getConditionCatalog": {
|
|
39260
39530
|
capName: "notification-rules",
|
|
39261
39531
|
capScope: "system",
|
|
@@ -39766,6 +40036,12 @@ Object.freeze({
|
|
|
39766
40036
|
addonId: null,
|
|
39767
40037
|
access: "create"
|
|
39768
40038
|
},
|
|
40039
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
40040
|
+
capName: "pipeline-analytics",
|
|
40041
|
+
capScope: "device",
|
|
40042
|
+
addonId: null,
|
|
40043
|
+
access: "view"
|
|
40044
|
+
},
|
|
39769
40045
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
39770
40046
|
capName: "pipeline-analytics",
|
|
39771
40047
|
capScope: "device",
|
|
@@ -40438,6 +40714,12 @@ Object.freeze({
|
|
|
40438
40714
|
addonId: null,
|
|
40439
40715
|
access: "create"
|
|
40440
40716
|
},
|
|
40717
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
40718
|
+
capName: "pipeline-runner",
|
|
40719
|
+
capScope: "system",
|
|
40720
|
+
addonId: null,
|
|
40721
|
+
access: "create"
|
|
40722
|
+
},
|
|
40441
40723
|
"pipelineRunner.runDetailSubtree": {
|
|
40442
40724
|
capName: "pipeline-runner",
|
|
40443
40725
|
capScope: "system",
|
|
@@ -43218,11 +43500,21 @@ Object.freeze({
|
|
|
43218
43500
|
form: "single",
|
|
43219
43501
|
optional: false
|
|
43220
43502
|
}],
|
|
43503
|
+
"nativeObjectDetection.getOptions": [{
|
|
43504
|
+
name: "deviceId",
|
|
43505
|
+
form: "single",
|
|
43506
|
+
optional: false
|
|
43507
|
+
}],
|
|
43221
43508
|
"nativeObjectDetection.setEnabled": [{
|
|
43222
43509
|
name: "deviceId",
|
|
43223
43510
|
form: "single",
|
|
43224
43511
|
optional: false
|
|
43225
43512
|
}],
|
|
43513
|
+
"nativeObjectDetection.setSettings": [{
|
|
43514
|
+
name: "deviceId",
|
|
43515
|
+
form: "single",
|
|
43516
|
+
optional: false
|
|
43517
|
+
}],
|
|
43226
43518
|
"navigation.getFeatures": [{
|
|
43227
43519
|
name: "deviceId",
|
|
43228
43520
|
form: "single",
|
|
@@ -43572,6 +43864,11 @@ Object.freeze({
|
|
|
43572
43864
|
form: "single",
|
|
43573
43865
|
optional: false
|
|
43574
43866
|
}],
|
|
43867
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43868
|
+
name: "deviceId",
|
|
43869
|
+
form: "single",
|
|
43870
|
+
optional: false
|
|
43871
|
+
}],
|
|
43575
43872
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
43576
43873
|
name: "deviceId",
|
|
43577
43874
|
form: "single",
|
|
@@ -43762,6 +44059,11 @@ Object.freeze({
|
|
|
43762
44059
|
form: "single",
|
|
43763
44060
|
optional: false
|
|
43764
44061
|
}],
|
|
44062
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
44063
|
+
name: "deviceId",
|
|
44064
|
+
form: "single",
|
|
44065
|
+
optional: false
|
|
44066
|
+
}],
|
|
43765
44067
|
"pipelineRunner.runDetailSubtree": [{
|
|
43766
44068
|
name: "deviceId",
|
|
43767
44069
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-hikvision",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.111",
|
|
4
4
|
"description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"build": "vite build",
|
|
84
84
|
"dev": "vite build --watch",
|
|
85
85
|
"typecheck": "tsc --noEmit",
|
|
86
|
-
"publish": "npm publish --access public"
|
|
86
|
+
"publish:npm": "npm publish --access public"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"werift": "0.22.9"
|