@camstack/addon-ai 0.4.106 → 0.4.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 +447 -15
- package/dist/addon.mjs +447 -15
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -12,7 +12,7 @@ let _camstack_system_addon_utils = require("@camstack/system/addon-utils");
|
|
|
12
12
|
let node_fs_promises = require("node:fs/promises");
|
|
13
13
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
14
14
|
let node_child_process = require("node:child_process");
|
|
15
|
-
//#region ../types/dist/event-category-
|
|
15
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
16
16
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
17
17
|
EventCategory["SystemBoot"] = "system.boot";
|
|
18
18
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -629,6 +629,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
629
629
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
630
630
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
631
631
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
632
|
+
/**
|
|
633
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
634
|
+
*
|
|
635
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
636
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
637
|
+
* destinations would be told three times. And a run where two of three
|
|
638
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
639
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
640
|
+
* carried here and the message says both.
|
|
641
|
+
*
|
|
642
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
643
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
644
|
+
*/
|
|
645
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
632
646
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
633
647
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
634
648
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5506,7 +5520,7 @@ function number(params) {
|
|
|
5506
5520
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
5507
5521
|
}
|
|
5508
5522
|
//#endregion
|
|
5509
|
-
//#region ../types/dist/sleep-
|
|
5523
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5510
5524
|
/**
|
|
5511
5525
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5512
5526
|
* window to float samples (D455).
|
|
@@ -11693,6 +11707,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11693
11707
|
auth: "admin"
|
|
11694
11708
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11695
11709
|
DeviceType.Camera;
|
|
11710
|
+
/**
|
|
11711
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11712
|
+
*
|
|
11713
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11714
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11715
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11716
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11717
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11718
|
+
* itself, with no stream running.
|
|
11719
|
+
*
|
|
11720
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11721
|
+
*
|
|
11722
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11723
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11724
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11725
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11726
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11727
|
+
*
|
|
11728
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11729
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11730
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11731
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11732
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11733
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11734
|
+
* camera. Two questions, two authorities.
|
|
11735
|
+
*
|
|
11736
|
+
* ## Availability is not permission
|
|
11737
|
+
*
|
|
11738
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11739
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11740
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11741
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11742
|
+
*/
|
|
11743
|
+
/** One signal a device can emit. */
|
|
11744
|
+
var StreamSignalSchema = object({
|
|
11745
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11746
|
+
code: string().min(1),
|
|
11747
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11748
|
+
label: string().min(1),
|
|
11749
|
+
/**
|
|
11750
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11751
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11752
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11753
|
+
* both of its own.
|
|
11754
|
+
*/
|
|
11755
|
+
recommended: boolean()
|
|
11756
|
+
});
|
|
11757
|
+
object({
|
|
11758
|
+
signals: array(StreamSignalSchema),
|
|
11759
|
+
lastFetchedAt: number$1()
|
|
11760
|
+
});
|
|
11761
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11696
11762
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11697
11763
|
var StreamFormatSchema = _enum([
|
|
11698
11764
|
"webrtc",
|
|
@@ -12089,6 +12155,22 @@ var EgressTranscodeSchema = object({
|
|
|
12089
12155
|
camStreamId: string().nullable()
|
|
12090
12156
|
});
|
|
12091
12157
|
method(object({
|
|
12158
|
+
deviceId: number$1().int().nonnegative(),
|
|
12159
|
+
/** The provider's signal code. */
|
|
12160
|
+
code: string().min(1),
|
|
12161
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12162
|
+
at: number$1().optional()
|
|
12163
|
+
}), object({
|
|
12164
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12165
|
+
accepted: boolean(),
|
|
12166
|
+
reason: _enum([
|
|
12167
|
+
"woke",
|
|
12168
|
+
"hold-extended",
|
|
12169
|
+
"not-enabled",
|
|
12170
|
+
"no-consumer",
|
|
12171
|
+
"unknown-code"
|
|
12172
|
+
])
|
|
12173
|
+
}), { kind: "mutation" }), method(object({
|
|
12092
12174
|
deviceId: number$1().int().nonnegative(),
|
|
12093
12175
|
camStreamId: string().min(1),
|
|
12094
12176
|
kind: CamStreamKindSchema,
|
|
@@ -12343,6 +12425,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12343
12425
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12344
12426
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12345
12427
|
minHeight: number$1().int().positive().optional(),
|
|
12428
|
+
/**
|
|
12429
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12430
|
+
*
|
|
12431
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12432
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12433
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12434
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12435
|
+
* gets born.
|
|
12436
|
+
*/
|
|
12437
|
+
maxHeight: number$1().int().positive().optional(),
|
|
12346
12438
|
/** Minimum horizontal resolution. */
|
|
12347
12439
|
minWidth: number$1().int().positive().optional(),
|
|
12348
12440
|
/**
|
|
@@ -12359,7 +12451,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12359
12451
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12360
12452
|
* codec end-to-end, there's nothing to optimise.
|
|
12361
12453
|
*/
|
|
12362
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12454
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12455
|
+
/**
|
|
12456
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12457
|
+
* understanding that it will be transcoded.
|
|
12458
|
+
*
|
|
12459
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12460
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12461
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12462
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12463
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12464
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12465
|
+
*
|
|
12466
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12467
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12468
|
+
*/
|
|
12469
|
+
allowTranscode: boolean().optional()
|
|
12363
12470
|
}).readonly();
|
|
12364
12471
|
var PickStreamPreferencesSchema = object({
|
|
12365
12472
|
/**
|
|
@@ -12373,12 +12480,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12373
12480
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12374
12481
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12375
12482
|
*/
|
|
12376
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12483
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12484
|
+
/**
|
|
12485
|
+
* The height the consumer actually wants to DELIVER.
|
|
12486
|
+
*
|
|
12487
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12488
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12489
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12490
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12491
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12492
|
+
*
|
|
12493
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12494
|
+
*/
|
|
12495
|
+
targetHeight: number$1().int().positive().optional()
|
|
12377
12496
|
}).readonly();
|
|
12378
12497
|
var PickedCamStreamSchema = object({
|
|
12379
12498
|
camStreamId: string(),
|
|
12380
12499
|
codec: string().optional(),
|
|
12381
12500
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12501
|
+
/**
|
|
12502
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12503
|
+
*
|
|
12504
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12505
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12506
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12507
|
+
*/
|
|
12508
|
+
transcodes: boolean(),
|
|
12382
12509
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12383
12510
|
reason: string()
|
|
12384
12511
|
});
|
|
@@ -16661,6 +16788,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16661
16788
|
"device-enabled",
|
|
16662
16789
|
"device-battery-low",
|
|
16663
16790
|
"device-battery-normal",
|
|
16791
|
+
"device-consumable-low",
|
|
16792
|
+
"device-consumable-normal",
|
|
16664
16793
|
"stream-online",
|
|
16665
16794
|
"stream-offline",
|
|
16666
16795
|
"node-online",
|
|
@@ -16679,6 +16808,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16679
16808
|
"addon-updated",
|
|
16680
16809
|
"server-updated",
|
|
16681
16810
|
"export-completed",
|
|
16811
|
+
"backup-completed",
|
|
16682
16812
|
"camera-online",
|
|
16683
16813
|
"camera-offline",
|
|
16684
16814
|
"camera-disabled",
|
|
@@ -18001,6 +18131,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18001
18131
|
settings: NcAlarmSettingsSchema,
|
|
18002
18132
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18003
18133
|
});
|
|
18134
|
+
/**
|
|
18135
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18136
|
+
*
|
|
18137
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18138
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18139
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18140
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18141
|
+
* a different thing from never having been told, and only the envelope
|
|
18142
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18143
|
+
*/
|
|
18144
|
+
var NcClipRetentionAskSchema = object({
|
|
18145
|
+
/**
|
|
18146
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18147
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18148
|
+
* asking everywhere.
|
|
18149
|
+
*/
|
|
18150
|
+
deviceId: number$1().int().nonnegative().optional(),
|
|
18151
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18152
|
+
* needs nothing produces no ask at all. */
|
|
18153
|
+
seconds: number$1().min(0).max(60),
|
|
18154
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18155
|
+
* assigned, which is what the cut defaults to. */
|
|
18156
|
+
profile: CamProfileSchema.optional(),
|
|
18157
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18158
|
+
ruleId: string(),
|
|
18159
|
+
ruleName: string(),
|
|
18160
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18161
|
+
reason: _enum(["window", "occupancy"])
|
|
18162
|
+
});
|
|
18163
|
+
/**
|
|
18164
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18165
|
+
*
|
|
18166
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18167
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18168
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18169
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18170
|
+
* footage this mechanism exists to keep.
|
|
18171
|
+
*/
|
|
18172
|
+
var NcClipRetentionPlanSchema = object({
|
|
18173
|
+
rulesLoaded: boolean(),
|
|
18174
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18175
|
+
});
|
|
18004
18176
|
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 }), {
|
|
18005
18177
|
kind: "mutation",
|
|
18006
18178
|
auth: "admin",
|
|
@@ -18021,7 +18193,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18021
18193
|
}), object({ success: literal(true) }), {
|
|
18022
18194
|
kind: "mutation",
|
|
18023
18195
|
auth: "admin"
|
|
18024
|
-
}), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18196
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18025
18197
|
deviceId: number$1().int(),
|
|
18026
18198
|
muted: boolean()
|
|
18027
18199
|
}), object({ success: literal(true) }), {
|
|
@@ -20555,6 +20727,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20555
20727
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20556
20728
|
framesMatched: number$1().int()
|
|
20557
20729
|
})).readonly() });
|
|
20730
|
+
/**
|
|
20731
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20732
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20733
|
+
* is an alias of this, not a second list.
|
|
20734
|
+
*/
|
|
20735
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20736
|
+
"motion",
|
|
20737
|
+
"audio-dbfs",
|
|
20738
|
+
"battery",
|
|
20739
|
+
"occupancy"
|
|
20740
|
+
]);
|
|
20741
|
+
/**
|
|
20742
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20743
|
+
*
|
|
20744
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20745
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20746
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20747
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20748
|
+
*/
|
|
20749
|
+
var LtsBucketSchema = object({
|
|
20750
|
+
scope: string(),
|
|
20751
|
+
bucketStart: number$1().int(),
|
|
20752
|
+
samples: number$1().int().nonnegative(),
|
|
20753
|
+
sum: number$1(),
|
|
20754
|
+
min: number$1(),
|
|
20755
|
+
max: number$1()
|
|
20756
|
+
});
|
|
20558
20757
|
DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).readonly()), method(object({
|
|
20559
20758
|
deviceId: number$1(),
|
|
20560
20759
|
trackId: string()
|
|
@@ -20601,6 +20800,14 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
|
|
|
20601
20800
|
kinds: array(string()).optional(),
|
|
20602
20801
|
limit: number$1().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20603
20802
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20803
|
+
deviceId: number$1(),
|
|
20804
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20805
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20806
|
+
scope: string().optional(),
|
|
20807
|
+
from: number$1(),
|
|
20808
|
+
to: number$1(),
|
|
20809
|
+
limit: number$1().int().positive().optional()
|
|
20810
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20604
20811
|
deviceId: number$1(),
|
|
20605
20812
|
since: number$1(),
|
|
20606
20813
|
until: number$1(),
|
|
@@ -21219,6 +21426,14 @@ var MotionSourceEnum = _enum([
|
|
|
21219
21426
|
*/
|
|
21220
21427
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21221
21428
|
/**
|
|
21429
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21430
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21431
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21432
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21433
|
+
* row.
|
|
21434
|
+
*/
|
|
21435
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21436
|
+
/**
|
|
21222
21437
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21223
21438
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21224
21439
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21369,6 +21584,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21369
21584
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21370
21585
|
*/
|
|
21371
21586
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21587
|
+
/**
|
|
21588
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21589
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21590
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21591
|
+
*
|
|
21592
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21593
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21594
|
+
* here. Its boxes reach post-analysis on the same
|
|
21595
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21596
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21597
|
+
* subtree (face / plate / embedding).
|
|
21598
|
+
*
|
|
21599
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21600
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21601
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21602
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21603
|
+
*
|
|
21604
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21605
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21606
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21607
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21608
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21609
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21610
|
+
*
|
|
21611
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21612
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21613
|
+
* default.
|
|
21614
|
+
*/
|
|
21615
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21372
21616
|
pipelineEnabled: boolean().default(true),
|
|
21373
21617
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21374
21618
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21550,7 +21794,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21550
21794
|
queueDepth: number$1(),
|
|
21551
21795
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21552
21796
|
});
|
|
21797
|
+
/**
|
|
21798
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21799
|
+
*
|
|
21800
|
+
* One instance per node. Receives camera assignments from
|
|
21801
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21802
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21803
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21804
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21805
|
+
* the bus.
|
|
21806
|
+
*
|
|
21807
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21808
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21809
|
+
* makes assignment decisions itself.
|
|
21810
|
+
*/
|
|
21811
|
+
/**
|
|
21812
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21813
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21814
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21815
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21816
|
+
*/
|
|
21817
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21818
|
+
"not-attached",
|
|
21819
|
+
"battery-asleep",
|
|
21820
|
+
"not-watching",
|
|
21821
|
+
"already-bursting"
|
|
21822
|
+
]);
|
|
21553
21823
|
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number$1() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number$1() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number$1()).readonly()), method(object({
|
|
21824
|
+
deviceId: number$1(),
|
|
21825
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21826
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21827
|
+
frames: number$1().int().positive().optional(),
|
|
21828
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21829
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21830
|
+
reason: string()
|
|
21831
|
+
}), object({
|
|
21832
|
+
started: boolean(),
|
|
21833
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21834
|
+
}), {
|
|
21835
|
+
auth: "admin",
|
|
21836
|
+
kind: "mutation"
|
|
21837
|
+
}), method(object({
|
|
21554
21838
|
handle: FrameHandleSchema,
|
|
21555
21839
|
bbox: NativeCropBboxSchema,
|
|
21556
21840
|
maxWidth: number$1().int().positive().optional(),
|
|
@@ -23920,10 +24204,28 @@ DeviceType.Camera, method(object({ deviceId: number$1().int().nonnegative() }),
|
|
|
23920
24204
|
}), boolean()), method(object({
|
|
23921
24205
|
deviceId: number$1().int().nonnegative(),
|
|
23922
24206
|
sessionId: string()
|
|
23923
|
-
}), object({
|
|
23924
|
-
|
|
23925
|
-
|
|
23926
|
-
|
|
24207
|
+
}), object({
|
|
24208
|
+
pendingRenegotiation: object({
|
|
24209
|
+
target: WebrtcStreamTargetSchema,
|
|
24210
|
+
epoch: number$1()
|
|
24211
|
+
}).nullable(),
|
|
24212
|
+
/**
|
|
24213
|
+
* Whether the session still EXISTS.
|
|
24214
|
+
*
|
|
24215
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24216
|
+
* be able to ask, because a session does not always end the way it
|
|
24217
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24218
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24219
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24220
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24221
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24222
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24223
|
+
*
|
|
24224
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24225
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24226
|
+
*/
|
|
24227
|
+
alive: boolean()
|
|
24228
|
+
}));
|
|
23927
24229
|
object({
|
|
23928
24230
|
/** All accessory children of the parent. */
|
|
23929
24231
|
childDeviceIds: array(number$1()).readonly(),
|
|
@@ -27001,7 +27303,7 @@ var NativeDetectionSchema = object({
|
|
|
27001
27303
|
/** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
|
|
27002
27304
|
confidence: number$1().min(0).max(1).optional()
|
|
27003
27305
|
});
|
|
27004
|
-
object({
|
|
27306
|
+
var NativeObjectDetectionStatusSchema = object({
|
|
27005
27307
|
/**
|
|
27006
27308
|
* Last observed instance per class. Missing entries mean the class
|
|
27007
27309
|
* is supported but nothing has been seen since the provider started.
|
|
@@ -27018,14 +27320,56 @@ object({
|
|
|
27018
27320
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
27019
27321
|
/**
|
|
27020
27322
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
27021
|
-
*
|
|
27022
|
-
*
|
|
27323
|
+
*
|
|
27324
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
27325
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
27326
|
+
* other detection choice is made. `geometry` on
|
|
27327
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
27328
|
+
* choice would buy this particular camera.
|
|
27023
27329
|
*/
|
|
27024
27330
|
enabled: boolean()
|
|
27025
|
-
})
|
|
27331
|
+
});
|
|
27332
|
+
/**
|
|
27333
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
27334
|
+
*
|
|
27335
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
27336
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
27337
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
27338
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
27339
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
27340
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
27341
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
27342
|
+
* something is in front of it, and its stream is already being pulled.
|
|
27343
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
27344
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
27345
|
+
* tracker as motion and no further.
|
|
27346
|
+
*
|
|
27347
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
27348
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
27349
|
+
* derived form is only as honest as `getOptions`).
|
|
27350
|
+
*/
|
|
27351
|
+
var NativeObjectGeometryEnum = _enum([
|
|
27352
|
+
"boxed",
|
|
27353
|
+
"while-streaming",
|
|
27354
|
+
"flag-only"
|
|
27355
|
+
]);
|
|
27356
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
27357
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
27358
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
27359
|
+
/** What a detection from this camera carries. */
|
|
27360
|
+
geometry: NativeObjectGeometryEnum
|
|
27361
|
+
});
|
|
27362
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
27363
|
+
NativeObjectDetectionStatusSchema.extend({
|
|
27026
27364
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
27027
27365
|
lastFetchedAt: number$1() });
|
|
27028
|
-
DeviceType.Camera, method(object({
|
|
27366
|
+
DeviceType.Camera, method(object({ deviceId: number$1() }), NativeObjectDetectionOptionsSchema), method(object({
|
|
27367
|
+
deviceId: number$1(),
|
|
27368
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
27369
|
+
}), _void(), {
|
|
27370
|
+
kind: "mutation",
|
|
27371
|
+
auth: "admin"
|
|
27372
|
+
}), method(object({
|
|
27029
27373
|
deviceId: number$1(),
|
|
27030
27374
|
enabled: boolean()
|
|
27031
27375
|
}), _void(), {
|
|
@@ -30824,7 +31168,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
30824
31168
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
30825
31169
|
totalObjects: number$1().int().nonnegative(),
|
|
30826
31170
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
30827
|
-
byClass: record(string(), number$1().int().nonnegative())
|
|
31171
|
+
byClass: record(string(), number$1().int().nonnegative()),
|
|
31172
|
+
/**
|
|
31173
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
31174
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
31175
|
+
*
|
|
31176
|
+
* The operator's question about a scene has two halves and they answer
|
|
31177
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
31178
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
31179
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
31180
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
31181
|
+
*
|
|
31182
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
31183
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
31184
|
+
*
|
|
31185
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
31186
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
31187
|
+
* parked objects here" about a camera whose lot is full.
|
|
31188
|
+
*/
|
|
31189
|
+
standingObjects: number$1().int().nonnegative().optional(),
|
|
31190
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
31191
|
+
* same absence rule. */
|
|
31192
|
+
transientObjects: number$1().int().nonnegative().optional()
|
|
30828
31193
|
});
|
|
30829
31194
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
30830
31195
|
zoneId: string(),
|
|
@@ -33763,12 +34128,24 @@ Object.freeze({
|
|
|
33763
34128
|
addonId: null,
|
|
33764
34129
|
access: "create"
|
|
33765
34130
|
},
|
|
34131
|
+
"nativeObjectDetection.getOptions": {
|
|
34132
|
+
capName: "native-object-detection",
|
|
34133
|
+
capScope: "device",
|
|
34134
|
+
addonId: null,
|
|
34135
|
+
access: "view"
|
|
34136
|
+
},
|
|
33766
34137
|
"nativeObjectDetection.setEnabled": {
|
|
33767
34138
|
capName: "native-object-detection",
|
|
33768
34139
|
capScope: "device",
|
|
33769
34140
|
addonId: null,
|
|
33770
34141
|
access: "create"
|
|
33771
34142
|
},
|
|
34143
|
+
"nativeObjectDetection.setSettings": {
|
|
34144
|
+
capName: "native-object-detection",
|
|
34145
|
+
capScope: "device",
|
|
34146
|
+
addonId: null,
|
|
34147
|
+
access: "create"
|
|
34148
|
+
},
|
|
33772
34149
|
"navigation.getFeatures": {
|
|
33773
34150
|
capName: "navigation",
|
|
33774
34151
|
capScope: "device",
|
|
@@ -34033,6 +34410,12 @@ Object.freeze({
|
|
|
34033
34410
|
addonId: null,
|
|
34034
34411
|
access: "view"
|
|
34035
34412
|
},
|
|
34413
|
+
"notificationRules.getClipRetentionAsks": {
|
|
34414
|
+
capName: "notification-rules",
|
|
34415
|
+
capScope: "system",
|
|
34416
|
+
addonId: null,
|
|
34417
|
+
access: "view"
|
|
34418
|
+
},
|
|
34036
34419
|
"notificationRules.getConditionCatalog": {
|
|
34037
34420
|
capName: "notification-rules",
|
|
34038
34421
|
capScope: "system",
|
|
@@ -34543,6 +34926,12 @@ Object.freeze({
|
|
|
34543
34926
|
addonId: null,
|
|
34544
34927
|
access: "create"
|
|
34545
34928
|
},
|
|
34929
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
34930
|
+
capName: "pipeline-analytics",
|
|
34931
|
+
capScope: "device",
|
|
34932
|
+
addonId: null,
|
|
34933
|
+
access: "view"
|
|
34934
|
+
},
|
|
34546
34935
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
34547
34936
|
capName: "pipeline-analytics",
|
|
34548
34937
|
capScope: "device",
|
|
@@ -35215,6 +35604,12 @@ Object.freeze({
|
|
|
35215
35604
|
addonId: null,
|
|
35216
35605
|
access: "create"
|
|
35217
35606
|
},
|
|
35607
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
35608
|
+
capName: "pipeline-runner",
|
|
35609
|
+
capScope: "system",
|
|
35610
|
+
addonId: null,
|
|
35611
|
+
access: "create"
|
|
35612
|
+
},
|
|
35218
35613
|
"pipelineRunner.runDetailSubtree": {
|
|
35219
35614
|
capName: "pipeline-runner",
|
|
35220
35615
|
capScope: "system",
|
|
@@ -36427,6 +36822,12 @@ Object.freeze({
|
|
|
36427
36822
|
addonId: null,
|
|
36428
36823
|
access: "create"
|
|
36429
36824
|
},
|
|
36825
|
+
"streamBroker.reportStreamSignal": {
|
|
36826
|
+
capName: "stream-broker",
|
|
36827
|
+
capScope: "system",
|
|
36828
|
+
addonId: null,
|
|
36829
|
+
access: "create"
|
|
36830
|
+
},
|
|
36430
36831
|
"streamBroker.restartProfile": {
|
|
36431
36832
|
capName: "stream-broker",
|
|
36432
36833
|
capScope: "system",
|
|
@@ -36511,6 +36912,12 @@ Object.freeze({
|
|
|
36511
36912
|
addonId: null,
|
|
36512
36913
|
access: "create"
|
|
36513
36914
|
},
|
|
36915
|
+
"streamSignals.listSignals": {
|
|
36916
|
+
capName: "stream-signals",
|
|
36917
|
+
capScope: "device",
|
|
36918
|
+
addonId: null,
|
|
36919
|
+
access: "view"
|
|
36920
|
+
},
|
|
36514
36921
|
"switch.setState": {
|
|
36515
36922
|
capName: "switch",
|
|
36516
36923
|
capScope: "device",
|
|
@@ -37983,11 +38390,21 @@ Object.freeze({
|
|
|
37983
38390
|
form: "single",
|
|
37984
38391
|
optional: false
|
|
37985
38392
|
}],
|
|
38393
|
+
"nativeObjectDetection.getOptions": [{
|
|
38394
|
+
name: "deviceId",
|
|
38395
|
+
form: "single",
|
|
38396
|
+
optional: false
|
|
38397
|
+
}],
|
|
37986
38398
|
"nativeObjectDetection.setEnabled": [{
|
|
37987
38399
|
name: "deviceId",
|
|
37988
38400
|
form: "single",
|
|
37989
38401
|
optional: false
|
|
37990
38402
|
}],
|
|
38403
|
+
"nativeObjectDetection.setSettings": [{
|
|
38404
|
+
name: "deviceId",
|
|
38405
|
+
form: "single",
|
|
38406
|
+
optional: false
|
|
38407
|
+
}],
|
|
37991
38408
|
"navigation.getFeatures": [{
|
|
37992
38409
|
name: "deviceId",
|
|
37993
38410
|
form: "single",
|
|
@@ -38337,6 +38754,11 @@ Object.freeze({
|
|
|
38337
38754
|
form: "single",
|
|
38338
38755
|
optional: false
|
|
38339
38756
|
}],
|
|
38757
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
38758
|
+
name: "deviceId",
|
|
38759
|
+
form: "single",
|
|
38760
|
+
optional: false
|
|
38761
|
+
}],
|
|
38340
38762
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
38341
38763
|
name: "deviceId",
|
|
38342
38764
|
form: "single",
|
|
@@ -38527,6 +38949,11 @@ Object.freeze({
|
|
|
38527
38949
|
form: "single",
|
|
38528
38950
|
optional: false
|
|
38529
38951
|
}],
|
|
38952
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
38953
|
+
name: "deviceId",
|
|
38954
|
+
form: "single",
|
|
38955
|
+
optional: false
|
|
38956
|
+
}],
|
|
38530
38957
|
"pipelineRunner.runDetailSubtree": [{
|
|
38531
38958
|
name: "deviceId",
|
|
38532
38959
|
form: "single",
|
|
@@ -38883,6 +39310,11 @@ Object.freeze({
|
|
|
38883
39310
|
form: "single",
|
|
38884
39311
|
optional: false
|
|
38885
39312
|
}],
|
|
39313
|
+
"streamBroker.reportStreamSignal": [{
|
|
39314
|
+
name: "deviceId",
|
|
39315
|
+
form: "single",
|
|
39316
|
+
optional: false
|
|
39317
|
+
}],
|
|
38886
39318
|
"streamBroker.restartProfile": [{
|
|
38887
39319
|
name: "deviceId",
|
|
38888
39320
|
form: "single",
|