@camstack/addon-terminal 0.1.107 → 0.1.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +314 -12
- package/dist/addon.mjs +314 -12
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -5392,7 +5392,7 @@ var ZodIssueCode = {
|
|
|
5392
5392
|
var ZodFirstPartyTypeKind;
|
|
5393
5393
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5394
5394
|
//#endregion
|
|
5395
|
-
//#region ../types/dist/sleep-
|
|
5395
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5396
5396
|
/**
|
|
5397
5397
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5398
5398
|
* window to float samples (D455).
|
|
@@ -11661,6 +11661,21 @@ var streamSignalsCapability = {
|
|
|
11661
11661
|
mode: "singleton",
|
|
11662
11662
|
deviceTypes: Object.values(DeviceType),
|
|
11663
11663
|
runtimeState: StreamSignalsStatusSchema,
|
|
11664
|
+
/**
|
|
11665
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11666
|
+
*
|
|
11667
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11668
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11669
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11670
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11671
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11672
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11673
|
+
* because the fix could not reach it.
|
|
11674
|
+
*
|
|
11675
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11676
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11677
|
+
*/
|
|
11678
|
+
durability: "session",
|
|
11664
11679
|
methods: {
|
|
11665
11680
|
/**
|
|
11666
11681
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18194,6 +18209,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18194
18209
|
settings: NcAlarmSettingsSchema,
|
|
18195
18210
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18196
18211
|
});
|
|
18212
|
+
/**
|
|
18213
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18214
|
+
*
|
|
18215
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18216
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18217
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18218
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18219
|
+
* a different thing from never having been told, and only the envelope
|
|
18220
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18221
|
+
*/
|
|
18222
|
+
var NcClipRetentionAskSchema = object({
|
|
18223
|
+
/**
|
|
18224
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18225
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18226
|
+
* asking everywhere.
|
|
18227
|
+
*/
|
|
18228
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18229
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18230
|
+
* needs nothing produces no ask at all. */
|
|
18231
|
+
seconds: number().min(0).max(60),
|
|
18232
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18233
|
+
* assigned, which is what the cut defaults to. */
|
|
18234
|
+
profile: CamProfileSchema.optional(),
|
|
18235
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18236
|
+
ruleId: string(),
|
|
18237
|
+
ruleName: string(),
|
|
18238
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18239
|
+
reason: _enum(["window", "occupancy"])
|
|
18240
|
+
});
|
|
18241
|
+
/**
|
|
18242
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18243
|
+
*
|
|
18244
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18245
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18246
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18247
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18248
|
+
* footage this mechanism exists to keep.
|
|
18249
|
+
*/
|
|
18250
|
+
var NcClipRetentionPlanSchema = object({
|
|
18251
|
+
rulesLoaded: boolean(),
|
|
18252
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18253
|
+
});
|
|
18197
18254
|
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 }), {
|
|
18198
18255
|
kind: "mutation",
|
|
18199
18256
|
auth: "admin",
|
|
@@ -18214,7 +18271,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18214
18271
|
}), object({ success: literal(true) }), {
|
|
18215
18272
|
kind: "mutation",
|
|
18216
18273
|
auth: "admin"
|
|
18217
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18274
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18218
18275
|
deviceId: number().int(),
|
|
18219
18276
|
muted: boolean()
|
|
18220
18277
|
}), object({ success: literal(true) }), {
|
|
@@ -20788,6 +20845,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20788
20845
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20789
20846
|
framesMatched: number().int()
|
|
20790
20847
|
})).readonly() });
|
|
20848
|
+
/**
|
|
20849
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20850
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20851
|
+
* is an alias of this, not a second list.
|
|
20852
|
+
*/
|
|
20853
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20854
|
+
"motion",
|
|
20855
|
+
"audio-dbfs",
|
|
20856
|
+
"battery",
|
|
20857
|
+
"occupancy"
|
|
20858
|
+
]);
|
|
20859
|
+
/**
|
|
20860
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20861
|
+
*
|
|
20862
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20863
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20864
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20865
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20866
|
+
*/
|
|
20867
|
+
var LtsBucketSchema = object({
|
|
20868
|
+
scope: string(),
|
|
20869
|
+
bucketStart: number().int(),
|
|
20870
|
+
samples: number().int().nonnegative(),
|
|
20871
|
+
sum: number(),
|
|
20872
|
+
min: number(),
|
|
20873
|
+
max: number()
|
|
20874
|
+
});
|
|
20791
20875
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20792
20876
|
deviceId: number(),
|
|
20793
20877
|
trackId: string()
|
|
@@ -20834,6 +20918,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20834
20918
|
kinds: array(string()).optional(),
|
|
20835
20919
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20836
20920
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20921
|
+
deviceId: number(),
|
|
20922
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20923
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20924
|
+
scope: string().optional(),
|
|
20925
|
+
from: number(),
|
|
20926
|
+
to: number(),
|
|
20927
|
+
limit: number().int().positive().optional()
|
|
20928
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20837
20929
|
deviceId: number(),
|
|
20838
20930
|
since: number(),
|
|
20839
20931
|
until: number(),
|
|
@@ -21452,6 +21544,14 @@ var MotionSourceEnum = _enum([
|
|
|
21452
21544
|
*/
|
|
21453
21545
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21454
21546
|
/**
|
|
21547
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21548
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21549
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21550
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21551
|
+
* row.
|
|
21552
|
+
*/
|
|
21553
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21554
|
+
/**
|
|
21455
21555
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21456
21556
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21457
21557
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21602,6 +21702,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21602
21702
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21603
21703
|
*/
|
|
21604
21704
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21705
|
+
/**
|
|
21706
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21707
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21708
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21709
|
+
*
|
|
21710
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21711
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21712
|
+
* here. Its boxes reach post-analysis on the same
|
|
21713
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21714
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21715
|
+
* subtree (face / plate / embedding).
|
|
21716
|
+
*
|
|
21717
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21718
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21719
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21720
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21721
|
+
*
|
|
21722
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21723
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21724
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21725
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21726
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21727
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21728
|
+
*
|
|
21729
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21730
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21731
|
+
* default.
|
|
21732
|
+
*/
|
|
21733
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21605
21734
|
pipelineEnabled: boolean().default(true),
|
|
21606
21735
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21607
21736
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21783,7 +21912,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21783
21912
|
queueDepth: number(),
|
|
21784
21913
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21785
21914
|
});
|
|
21915
|
+
/**
|
|
21916
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21917
|
+
*
|
|
21918
|
+
* One instance per node. Receives camera assignments from
|
|
21919
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21920
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21921
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21922
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21923
|
+
* the bus.
|
|
21924
|
+
*
|
|
21925
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21926
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21927
|
+
* makes assignment decisions itself.
|
|
21928
|
+
*/
|
|
21929
|
+
/**
|
|
21930
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21931
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21932
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21933
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21934
|
+
*/
|
|
21935
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21936
|
+
"not-attached",
|
|
21937
|
+
"battery-asleep",
|
|
21938
|
+
"not-watching",
|
|
21939
|
+
"already-bursting"
|
|
21940
|
+
]);
|
|
21786
21941
|
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({
|
|
21942
|
+
deviceId: number(),
|
|
21943
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21944
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21945
|
+
frames: number().int().positive().optional(),
|
|
21946
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21947
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21948
|
+
reason: string()
|
|
21949
|
+
}), object({
|
|
21950
|
+
started: boolean(),
|
|
21951
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21952
|
+
}), {
|
|
21953
|
+
auth: "admin",
|
|
21954
|
+
kind: "mutation"
|
|
21955
|
+
}), method(object({
|
|
21787
21956
|
handle: FrameHandleSchema,
|
|
21788
21957
|
bbox: NativeCropBboxSchema,
|
|
21789
21958
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28761,11 +28930,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28761
28930
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28762
28931
|
/**
|
|
28763
28932
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28764
|
-
*
|
|
28765
|
-
*
|
|
28933
|
+
*
|
|
28934
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28935
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28936
|
+
* other detection choice is made. `geometry` on
|
|
28937
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28938
|
+
* choice would buy this particular camera.
|
|
28766
28939
|
*/
|
|
28767
28940
|
enabled: boolean()
|
|
28768
28941
|
});
|
|
28942
|
+
/**
|
|
28943
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28944
|
+
*
|
|
28945
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28946
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28947
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28948
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28949
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28950
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28951
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28952
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28953
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28954
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28955
|
+
* tracker as motion and no further.
|
|
28956
|
+
*
|
|
28957
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28958
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28959
|
+
* derived form is only as honest as `getOptions`).
|
|
28960
|
+
*/
|
|
28961
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28962
|
+
"boxed",
|
|
28963
|
+
"while-streaming",
|
|
28964
|
+
"flag-only"
|
|
28965
|
+
]);
|
|
28966
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28967
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28968
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28969
|
+
/** What a detection from this camera carries. */
|
|
28970
|
+
geometry: NativeObjectGeometryEnum
|
|
28971
|
+
});
|
|
28972
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28769
28973
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28770
28974
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28771
28975
|
lastFetchedAt: number() });
|
|
@@ -28775,13 +28979,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28775
28979
|
deviceNative: true,
|
|
28776
28980
|
mode: "singleton",
|
|
28777
28981
|
deviceTypes: [DeviceType.Camera],
|
|
28778
|
-
methods: {
|
|
28779
|
-
deviceId: number(),
|
|
28780
|
-
|
|
28781
|
-
|
|
28782
|
-
|
|
28783
|
-
|
|
28784
|
-
|
|
28982
|
+
methods: {
|
|
28983
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28984
|
+
setSettings: method(object({
|
|
28985
|
+
deviceId: number(),
|
|
28986
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28987
|
+
}), _void(), {
|
|
28988
|
+
kind: "mutation",
|
|
28989
|
+
auth: "admin"
|
|
28990
|
+
}),
|
|
28991
|
+
setEnabled: method(object({
|
|
28992
|
+
deviceId: number(),
|
|
28993
|
+
enabled: boolean()
|
|
28994
|
+
}), _void(), {
|
|
28995
|
+
kind: "mutation",
|
|
28996
|
+
auth: "admin"
|
|
28997
|
+
})
|
|
28998
|
+
},
|
|
28785
28999
|
events: { onDetected: { data: object({
|
|
28786
29000
|
deviceId: number(),
|
|
28787
29001
|
detection: NativeDetectionSchema
|
|
@@ -33629,7 +33843,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33629
33843
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33630
33844
|
totalObjects: number().int().nonnegative(),
|
|
33631
33845
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33632
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33846
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33847
|
+
/**
|
|
33848
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33849
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33850
|
+
*
|
|
33851
|
+
* The operator's question about a scene has two halves and they answer
|
|
33852
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33853
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33854
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33855
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33856
|
+
*
|
|
33857
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33858
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33859
|
+
*
|
|
33860
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33861
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33862
|
+
* parked objects here" about a camera whose lot is full.
|
|
33863
|
+
*/
|
|
33864
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33865
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33866
|
+
* same absence rule. */
|
|
33867
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33633
33868
|
});
|
|
33634
33869
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33635
33870
|
zoneId: string(),
|
|
@@ -33752,6 +33987,23 @@ var HistoryPointSchema = object({
|
|
|
33752
33987
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33753
33988
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33754
33989
|
* combinatorial coverage the operator UI requested.
|
|
33990
|
+
*
|
|
33991
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33992
|
+
*
|
|
33993
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33994
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33995
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33996
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33997
|
+
* horizon rather than to answer a question.
|
|
33998
|
+
*
|
|
33999
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34000
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34001
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34002
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34003
|
+
* function the writer uses, so the two cannot drift.
|
|
34004
|
+
*
|
|
34005
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34006
|
+
* it. Do not add a fourth caller.
|
|
33755
34007
|
*/
|
|
33756
34008
|
var zoneAnalyticsCapability = {
|
|
33757
34009
|
name: "zone-analytics",
|
|
@@ -37733,12 +37985,24 @@ Object.freeze({
|
|
|
37733
37985
|
addonId: null,
|
|
37734
37986
|
access: "create"
|
|
37735
37987
|
},
|
|
37988
|
+
"nativeObjectDetection.getOptions": {
|
|
37989
|
+
capName: "native-object-detection",
|
|
37990
|
+
capScope: "device",
|
|
37991
|
+
addonId: null,
|
|
37992
|
+
access: "view"
|
|
37993
|
+
},
|
|
37736
37994
|
"nativeObjectDetection.setEnabled": {
|
|
37737
37995
|
capName: "native-object-detection",
|
|
37738
37996
|
capScope: "device",
|
|
37739
37997
|
addonId: null,
|
|
37740
37998
|
access: "create"
|
|
37741
37999
|
},
|
|
38000
|
+
"nativeObjectDetection.setSettings": {
|
|
38001
|
+
capName: "native-object-detection",
|
|
38002
|
+
capScope: "device",
|
|
38003
|
+
addonId: null,
|
|
38004
|
+
access: "create"
|
|
38005
|
+
},
|
|
37742
38006
|
"navigation.getFeatures": {
|
|
37743
38007
|
capName: "navigation",
|
|
37744
38008
|
capScope: "device",
|
|
@@ -38003,6 +38267,12 @@ Object.freeze({
|
|
|
38003
38267
|
addonId: null,
|
|
38004
38268
|
access: "view"
|
|
38005
38269
|
},
|
|
38270
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38271
|
+
capName: "notification-rules",
|
|
38272
|
+
capScope: "system",
|
|
38273
|
+
addonId: null,
|
|
38274
|
+
access: "view"
|
|
38275
|
+
},
|
|
38006
38276
|
"notificationRules.getConditionCatalog": {
|
|
38007
38277
|
capName: "notification-rules",
|
|
38008
38278
|
capScope: "system",
|
|
@@ -38513,6 +38783,12 @@ Object.freeze({
|
|
|
38513
38783
|
addonId: null,
|
|
38514
38784
|
access: "create"
|
|
38515
38785
|
},
|
|
38786
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
38787
|
+
capName: "pipeline-analytics",
|
|
38788
|
+
capScope: "device",
|
|
38789
|
+
addonId: null,
|
|
38790
|
+
access: "view"
|
|
38791
|
+
},
|
|
38516
38792
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38517
38793
|
capName: "pipeline-analytics",
|
|
38518
38794
|
capScope: "device",
|
|
@@ -39185,6 +39461,12 @@ Object.freeze({
|
|
|
39185
39461
|
addonId: null,
|
|
39186
39462
|
access: "create"
|
|
39187
39463
|
},
|
|
39464
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39465
|
+
capName: "pipeline-runner",
|
|
39466
|
+
capScope: "system",
|
|
39467
|
+
addonId: null,
|
|
39468
|
+
access: "create"
|
|
39469
|
+
},
|
|
39188
39470
|
"pipelineRunner.runDetailSubtree": {
|
|
39189
39471
|
capName: "pipeline-runner",
|
|
39190
39472
|
capScope: "system",
|
|
@@ -41965,11 +42247,21 @@ Object.freeze({
|
|
|
41965
42247
|
form: "single",
|
|
41966
42248
|
optional: false
|
|
41967
42249
|
}],
|
|
42250
|
+
"nativeObjectDetection.getOptions": [{
|
|
42251
|
+
name: "deviceId",
|
|
42252
|
+
form: "single",
|
|
42253
|
+
optional: false
|
|
42254
|
+
}],
|
|
41968
42255
|
"nativeObjectDetection.setEnabled": [{
|
|
41969
42256
|
name: "deviceId",
|
|
41970
42257
|
form: "single",
|
|
41971
42258
|
optional: false
|
|
41972
42259
|
}],
|
|
42260
|
+
"nativeObjectDetection.setSettings": [{
|
|
42261
|
+
name: "deviceId",
|
|
42262
|
+
form: "single",
|
|
42263
|
+
optional: false
|
|
42264
|
+
}],
|
|
41973
42265
|
"navigation.getFeatures": [{
|
|
41974
42266
|
name: "deviceId",
|
|
41975
42267
|
form: "single",
|
|
@@ -42319,6 +42611,11 @@ Object.freeze({
|
|
|
42319
42611
|
form: "single",
|
|
42320
42612
|
optional: false
|
|
42321
42613
|
}],
|
|
42614
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42615
|
+
name: "deviceId",
|
|
42616
|
+
form: "single",
|
|
42617
|
+
optional: false
|
|
42618
|
+
}],
|
|
42322
42619
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42323
42620
|
name: "deviceId",
|
|
42324
42621
|
form: "single",
|
|
@@ -42509,6 +42806,11 @@ Object.freeze({
|
|
|
42509
42806
|
form: "single",
|
|
42510
42807
|
optional: false
|
|
42511
42808
|
}],
|
|
42809
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
42810
|
+
name: "deviceId",
|
|
42811
|
+
form: "single",
|
|
42812
|
+
optional: false
|
|
42813
|
+
}],
|
|
42512
42814
|
"pipelineRunner.runDetailSubtree": [{
|
|
42513
42815
|
name: "deviceId",
|
|
42514
42816
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5369,7 +5369,7 @@ var ZodIssueCode = {
|
|
|
5369
5369
|
var ZodFirstPartyTypeKind;
|
|
5370
5370
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5371
5371
|
//#endregion
|
|
5372
|
-
//#region ../types/dist/sleep-
|
|
5372
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5373
5373
|
/**
|
|
5374
5374
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5375
5375
|
* window to float samples (D455).
|
|
@@ -11638,6 +11638,21 @@ var streamSignalsCapability = {
|
|
|
11638
11638
|
mode: "singleton",
|
|
11639
11639
|
deviceTypes: Object.values(DeviceType),
|
|
11640
11640
|
runtimeState: StreamSignalsStatusSchema,
|
|
11641
|
+
/**
|
|
11642
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11643
|
+
*
|
|
11644
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11645
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11646
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11647
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11648
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11649
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11650
|
+
* because the fix could not reach it.
|
|
11651
|
+
*
|
|
11652
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11653
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11654
|
+
*/
|
|
11655
|
+
durability: "session",
|
|
11641
11656
|
methods: {
|
|
11642
11657
|
/**
|
|
11643
11658
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18171,6 +18186,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18171
18186
|
settings: NcAlarmSettingsSchema,
|
|
18172
18187
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18173
18188
|
});
|
|
18189
|
+
/**
|
|
18190
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18191
|
+
*
|
|
18192
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18193
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18194
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18195
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18196
|
+
* a different thing from never having been told, and only the envelope
|
|
18197
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18198
|
+
*/
|
|
18199
|
+
var NcClipRetentionAskSchema = object({
|
|
18200
|
+
/**
|
|
18201
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18202
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18203
|
+
* asking everywhere.
|
|
18204
|
+
*/
|
|
18205
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18206
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18207
|
+
* needs nothing produces no ask at all. */
|
|
18208
|
+
seconds: number().min(0).max(60),
|
|
18209
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18210
|
+
* assigned, which is what the cut defaults to. */
|
|
18211
|
+
profile: CamProfileSchema.optional(),
|
|
18212
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18213
|
+
ruleId: string(),
|
|
18214
|
+
ruleName: string(),
|
|
18215
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18216
|
+
reason: _enum(["window", "occupancy"])
|
|
18217
|
+
});
|
|
18218
|
+
/**
|
|
18219
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18220
|
+
*
|
|
18221
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18222
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18223
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18224
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18225
|
+
* footage this mechanism exists to keep.
|
|
18226
|
+
*/
|
|
18227
|
+
var NcClipRetentionPlanSchema = object({
|
|
18228
|
+
rulesLoaded: boolean(),
|
|
18229
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18230
|
+
});
|
|
18174
18231
|
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 }), {
|
|
18175
18232
|
kind: "mutation",
|
|
18176
18233
|
auth: "admin",
|
|
@@ -18191,7 +18248,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18191
18248
|
}), object({ success: literal(true) }), {
|
|
18192
18249
|
kind: "mutation",
|
|
18193
18250
|
auth: "admin"
|
|
18194
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18251
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18195
18252
|
deviceId: number().int(),
|
|
18196
18253
|
muted: boolean()
|
|
18197
18254
|
}), object({ success: literal(true) }), {
|
|
@@ -20765,6 +20822,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20765
20822
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20766
20823
|
framesMatched: number().int()
|
|
20767
20824
|
})).readonly() });
|
|
20825
|
+
/**
|
|
20826
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20827
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20828
|
+
* is an alias of this, not a second list.
|
|
20829
|
+
*/
|
|
20830
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20831
|
+
"motion",
|
|
20832
|
+
"audio-dbfs",
|
|
20833
|
+
"battery",
|
|
20834
|
+
"occupancy"
|
|
20835
|
+
]);
|
|
20836
|
+
/**
|
|
20837
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20838
|
+
*
|
|
20839
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20840
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20841
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20842
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20843
|
+
*/
|
|
20844
|
+
var LtsBucketSchema = object({
|
|
20845
|
+
scope: string(),
|
|
20846
|
+
bucketStart: number().int(),
|
|
20847
|
+
samples: number().int().nonnegative(),
|
|
20848
|
+
sum: number(),
|
|
20849
|
+
min: number(),
|
|
20850
|
+
max: number()
|
|
20851
|
+
});
|
|
20768
20852
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
20769
20853
|
deviceId: number(),
|
|
20770
20854
|
trackId: string()
|
|
@@ -20811,6 +20895,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20811
20895
|
kinds: array(string()).optional(),
|
|
20812
20896
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20813
20897
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20898
|
+
deviceId: number(),
|
|
20899
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20900
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20901
|
+
scope: string().optional(),
|
|
20902
|
+
from: number(),
|
|
20903
|
+
to: number(),
|
|
20904
|
+
limit: number().int().positive().optional()
|
|
20905
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20814
20906
|
deviceId: number(),
|
|
20815
20907
|
since: number(),
|
|
20816
20908
|
until: number(),
|
|
@@ -21429,6 +21521,14 @@ var MotionSourceEnum = _enum([
|
|
|
21429
21521
|
*/
|
|
21430
21522
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21431
21523
|
/**
|
|
21524
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21525
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21526
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21527
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21528
|
+
* row.
|
|
21529
|
+
*/
|
|
21530
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21531
|
+
/**
|
|
21432
21532
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21433
21533
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21434
21534
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21579,6 +21679,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21579
21679
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21580
21680
|
*/
|
|
21581
21681
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21682
|
+
/**
|
|
21683
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21684
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21685
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21686
|
+
*
|
|
21687
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21688
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21689
|
+
* here. Its boxes reach post-analysis on the same
|
|
21690
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21691
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21692
|
+
* subtree (face / plate / embedding).
|
|
21693
|
+
*
|
|
21694
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21695
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21696
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21697
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21698
|
+
*
|
|
21699
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21700
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21701
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21702
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21703
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21704
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21705
|
+
*
|
|
21706
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21707
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21708
|
+
* default.
|
|
21709
|
+
*/
|
|
21710
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21582
21711
|
pipelineEnabled: boolean().default(true),
|
|
21583
21712
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21584
21713
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21760,7 +21889,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21760
21889
|
queueDepth: number(),
|
|
21761
21890
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21762
21891
|
});
|
|
21892
|
+
/**
|
|
21893
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21894
|
+
*
|
|
21895
|
+
* One instance per node. Receives camera assignments from
|
|
21896
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21897
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21898
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21899
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21900
|
+
* the bus.
|
|
21901
|
+
*
|
|
21902
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21903
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21904
|
+
* makes assignment decisions itself.
|
|
21905
|
+
*/
|
|
21906
|
+
/**
|
|
21907
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21908
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21909
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21910
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21911
|
+
*/
|
|
21912
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21913
|
+
"not-attached",
|
|
21914
|
+
"battery-asleep",
|
|
21915
|
+
"not-watching",
|
|
21916
|
+
"already-bursting"
|
|
21917
|
+
]);
|
|
21763
21918
|
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({
|
|
21919
|
+
deviceId: number(),
|
|
21920
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21921
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21922
|
+
frames: number().int().positive().optional(),
|
|
21923
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21924
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21925
|
+
reason: string()
|
|
21926
|
+
}), object({
|
|
21927
|
+
started: boolean(),
|
|
21928
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21929
|
+
}), {
|
|
21930
|
+
auth: "admin",
|
|
21931
|
+
kind: "mutation"
|
|
21932
|
+
}), method(object({
|
|
21764
21933
|
handle: FrameHandleSchema,
|
|
21765
21934
|
bbox: NativeCropBboxSchema,
|
|
21766
21935
|
maxWidth: number().int().positive().optional(),
|
|
@@ -28738,11 +28907,46 @@ var NativeObjectDetectionStatusSchema = object({
|
|
|
28738
28907
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28739
28908
|
/**
|
|
28740
28909
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
28741
|
-
*
|
|
28742
|
-
*
|
|
28910
|
+
*
|
|
28911
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
28912
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
28913
|
+
* other detection choice is made. `geometry` on
|
|
28914
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
28915
|
+
* choice would buy this particular camera.
|
|
28743
28916
|
*/
|
|
28744
28917
|
enabled: boolean()
|
|
28745
28918
|
});
|
|
28919
|
+
/**
|
|
28920
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
28921
|
+
*
|
|
28922
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
28923
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
28924
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
28925
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
28926
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
28927
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
28928
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
28929
|
+
* something is in front of it, and its stream is already being pulled.
|
|
28930
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
28931
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
28932
|
+
* tracker as motion and no further.
|
|
28933
|
+
*
|
|
28934
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
28935
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
28936
|
+
* derived form is only as honest as `getOptions`).
|
|
28937
|
+
*/
|
|
28938
|
+
var NativeObjectGeometryEnum = _enum([
|
|
28939
|
+
"boxed",
|
|
28940
|
+
"while-streaming",
|
|
28941
|
+
"flag-only"
|
|
28942
|
+
]);
|
|
28943
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
28944
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
28945
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
28946
|
+
/** What a detection from this camera carries. */
|
|
28947
|
+
geometry: NativeObjectGeometryEnum
|
|
28948
|
+
});
|
|
28949
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
28746
28950
|
var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
|
|
28747
28951
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
28748
28952
|
lastFetchedAt: number() });
|
|
@@ -28752,13 +28956,23 @@ var nativeObjectDetectionCapability = {
|
|
|
28752
28956
|
deviceNative: true,
|
|
28753
28957
|
mode: "singleton",
|
|
28754
28958
|
deviceTypes: [DeviceType.Camera],
|
|
28755
|
-
methods: {
|
|
28756
|
-
deviceId: number(),
|
|
28757
|
-
|
|
28758
|
-
|
|
28759
|
-
|
|
28760
|
-
|
|
28761
|
-
|
|
28959
|
+
methods: {
|
|
28960
|
+
getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
|
|
28961
|
+
setSettings: method(object({
|
|
28962
|
+
deviceId: number(),
|
|
28963
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
28964
|
+
}), _void(), {
|
|
28965
|
+
kind: "mutation",
|
|
28966
|
+
auth: "admin"
|
|
28967
|
+
}),
|
|
28968
|
+
setEnabled: method(object({
|
|
28969
|
+
deviceId: number(),
|
|
28970
|
+
enabled: boolean()
|
|
28971
|
+
}), _void(), {
|
|
28972
|
+
kind: "mutation",
|
|
28973
|
+
auth: "admin"
|
|
28974
|
+
})
|
|
28975
|
+
},
|
|
28762
28976
|
events: { onDetected: { data: object({
|
|
28763
28977
|
deviceId: number(),
|
|
28764
28978
|
detection: NativeDetectionSchema
|
|
@@ -33606,7 +33820,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
33606
33820
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
33607
33821
|
totalObjects: number().int().nonnegative(),
|
|
33608
33822
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
33609
|
-
byClass: record(string(), number().int().nonnegative())
|
|
33823
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
33824
|
+
/**
|
|
33825
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
33826
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
33827
|
+
*
|
|
33828
|
+
* The operator's question about a scene has two halves and they answer
|
|
33829
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
33830
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
33831
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
33832
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
33833
|
+
*
|
|
33834
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
33835
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
33836
|
+
*
|
|
33837
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
33838
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
33839
|
+
* parked objects here" about a camera whose lot is full.
|
|
33840
|
+
*/
|
|
33841
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
33842
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
33843
|
+
* same absence rule. */
|
|
33844
|
+
transientObjects: number().int().nonnegative().optional()
|
|
33610
33845
|
});
|
|
33611
33846
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
33612
33847
|
zoneId: string(),
|
|
@@ -33729,6 +33964,23 @@ var HistoryPointSchema = object({
|
|
|
33729
33964
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
33730
33965
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
33731
33966
|
* combinatorial coverage the operator UI requested.
|
|
33967
|
+
*
|
|
33968
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
33969
|
+
*
|
|
33970
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
33971
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
33972
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
33973
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
33974
|
+
* horizon rather than to answer a question.
|
|
33975
|
+
*
|
|
33976
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
33977
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
33978
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
33979
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
33980
|
+
* function the writer uses, so the two cannot drift.
|
|
33981
|
+
*
|
|
33982
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
33983
|
+
* it. Do not add a fourth caller.
|
|
33732
33984
|
*/
|
|
33733
33985
|
var zoneAnalyticsCapability = {
|
|
33734
33986
|
name: "zone-analytics",
|
|
@@ -37710,12 +37962,24 @@ Object.freeze({
|
|
|
37710
37962
|
addonId: null,
|
|
37711
37963
|
access: "create"
|
|
37712
37964
|
},
|
|
37965
|
+
"nativeObjectDetection.getOptions": {
|
|
37966
|
+
capName: "native-object-detection",
|
|
37967
|
+
capScope: "device",
|
|
37968
|
+
addonId: null,
|
|
37969
|
+
access: "view"
|
|
37970
|
+
},
|
|
37713
37971
|
"nativeObjectDetection.setEnabled": {
|
|
37714
37972
|
capName: "native-object-detection",
|
|
37715
37973
|
capScope: "device",
|
|
37716
37974
|
addonId: null,
|
|
37717
37975
|
access: "create"
|
|
37718
37976
|
},
|
|
37977
|
+
"nativeObjectDetection.setSettings": {
|
|
37978
|
+
capName: "native-object-detection",
|
|
37979
|
+
capScope: "device",
|
|
37980
|
+
addonId: null,
|
|
37981
|
+
access: "create"
|
|
37982
|
+
},
|
|
37719
37983
|
"navigation.getFeatures": {
|
|
37720
37984
|
capName: "navigation",
|
|
37721
37985
|
capScope: "device",
|
|
@@ -37980,6 +38244,12 @@ Object.freeze({
|
|
|
37980
38244
|
addonId: null,
|
|
37981
38245
|
access: "view"
|
|
37982
38246
|
},
|
|
38247
|
+
"notificationRules.getClipRetentionAsks": {
|
|
38248
|
+
capName: "notification-rules",
|
|
38249
|
+
capScope: "system",
|
|
38250
|
+
addonId: null,
|
|
38251
|
+
access: "view"
|
|
38252
|
+
},
|
|
37983
38253
|
"notificationRules.getConditionCatalog": {
|
|
37984
38254
|
capName: "notification-rules",
|
|
37985
38255
|
capScope: "system",
|
|
@@ -38490,6 +38760,12 @@ Object.freeze({
|
|
|
38490
38760
|
addonId: null,
|
|
38491
38761
|
access: "create"
|
|
38492
38762
|
},
|
|
38763
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
38764
|
+
capName: "pipeline-analytics",
|
|
38765
|
+
capScope: "device",
|
|
38766
|
+
addonId: null,
|
|
38767
|
+
access: "view"
|
|
38768
|
+
},
|
|
38493
38769
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
38494
38770
|
capName: "pipeline-analytics",
|
|
38495
38771
|
capScope: "device",
|
|
@@ -39162,6 +39438,12 @@ Object.freeze({
|
|
|
39162
39438
|
addonId: null,
|
|
39163
39439
|
access: "create"
|
|
39164
39440
|
},
|
|
39441
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
39442
|
+
capName: "pipeline-runner",
|
|
39443
|
+
capScope: "system",
|
|
39444
|
+
addonId: null,
|
|
39445
|
+
access: "create"
|
|
39446
|
+
},
|
|
39165
39447
|
"pipelineRunner.runDetailSubtree": {
|
|
39166
39448
|
capName: "pipeline-runner",
|
|
39167
39449
|
capScope: "system",
|
|
@@ -41942,11 +42224,21 @@ Object.freeze({
|
|
|
41942
42224
|
form: "single",
|
|
41943
42225
|
optional: false
|
|
41944
42226
|
}],
|
|
42227
|
+
"nativeObjectDetection.getOptions": [{
|
|
42228
|
+
name: "deviceId",
|
|
42229
|
+
form: "single",
|
|
42230
|
+
optional: false
|
|
42231
|
+
}],
|
|
41945
42232
|
"nativeObjectDetection.setEnabled": [{
|
|
41946
42233
|
name: "deviceId",
|
|
41947
42234
|
form: "single",
|
|
41948
42235
|
optional: false
|
|
41949
42236
|
}],
|
|
42237
|
+
"nativeObjectDetection.setSettings": [{
|
|
42238
|
+
name: "deviceId",
|
|
42239
|
+
form: "single",
|
|
42240
|
+
optional: false
|
|
42241
|
+
}],
|
|
41950
42242
|
"navigation.getFeatures": [{
|
|
41951
42243
|
name: "deviceId",
|
|
41952
42244
|
form: "single",
|
|
@@ -42296,6 +42588,11 @@ Object.freeze({
|
|
|
42296
42588
|
form: "single",
|
|
42297
42589
|
optional: false
|
|
42298
42590
|
}],
|
|
42591
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
42592
|
+
name: "deviceId",
|
|
42593
|
+
form: "single",
|
|
42594
|
+
optional: false
|
|
42595
|
+
}],
|
|
42299
42596
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
42300
42597
|
name: "deviceId",
|
|
42301
42598
|
form: "single",
|
|
@@ -42486,6 +42783,11 @@ Object.freeze({
|
|
|
42486
42783
|
form: "single",
|
|
42487
42784
|
optional: false
|
|
42488
42785
|
}],
|
|
42786
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
42787
|
+
name: "deviceId",
|
|
42788
|
+
form: "single",
|
|
42789
|
+
optional: false
|
|
42790
|
+
}],
|
|
42489
42791
|
"pipelineRunner.runDetailSubtree": [{
|
|
42490
42792
|
name: "deviceId",
|
|
42491
42793
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-terminal",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.108",
|
|
4
4
|
"description": "Interactive terminal sessions (pty + xterm) as a CamStack addon",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"dev": "vite build --watch",
|
|
65
65
|
"typecheck": "tsc --noEmit",
|
|
66
66
|
"test": "vitest run",
|
|
67
|
-
"publish": "npm publish --access public"
|
|
67
|
+
"publish:npm": "npm publish --access public"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@xterm/addon-serialize": "^0.13.0",
|