@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.mjs
CHANGED
|
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
39
39
|
}) : target, mod));
|
|
40
40
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
41
41
|
//#endregion
|
|
42
|
-
//#region ../types/dist/event-category-
|
|
42
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
43
43
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
44
44
|
EventCategory["SystemBoot"] = "system.boot";
|
|
45
45
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -656,6 +656,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
656
656
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
657
657
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
658
658
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
659
|
+
/**
|
|
660
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
661
|
+
*
|
|
662
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
663
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
664
|
+
* destinations would be told three times. And a run where two of three
|
|
665
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
666
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
667
|
+
* carried here and the message says both.
|
|
668
|
+
*
|
|
669
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
670
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
671
|
+
*/
|
|
672
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
659
673
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
660
674
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
661
675
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5533,7 +5547,7 @@ function number(params) {
|
|
|
5533
5547
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
5534
5548
|
}
|
|
5535
5549
|
//#endregion
|
|
5536
|
-
//#region ../types/dist/sleep-
|
|
5550
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5537
5551
|
/**
|
|
5538
5552
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5539
5553
|
* window to float samples (D455).
|
|
@@ -11720,6 +11734,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11720
11734
|
auth: "admin"
|
|
11721
11735
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11722
11736
|
DeviceType.Camera;
|
|
11737
|
+
/**
|
|
11738
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11739
|
+
*
|
|
11740
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11741
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11742
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11743
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11744
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11745
|
+
* itself, with no stream running.
|
|
11746
|
+
*
|
|
11747
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11748
|
+
*
|
|
11749
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11750
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11751
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11752
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11753
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11754
|
+
*
|
|
11755
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11756
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11757
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11758
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11759
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11760
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11761
|
+
* camera. Two questions, two authorities.
|
|
11762
|
+
*
|
|
11763
|
+
* ## Availability is not permission
|
|
11764
|
+
*
|
|
11765
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11766
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11767
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11768
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11769
|
+
*/
|
|
11770
|
+
/** One signal a device can emit. */
|
|
11771
|
+
var StreamSignalSchema = object({
|
|
11772
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11773
|
+
code: string().min(1),
|
|
11774
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11775
|
+
label: string().min(1),
|
|
11776
|
+
/**
|
|
11777
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11778
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11779
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11780
|
+
* both of its own.
|
|
11781
|
+
*/
|
|
11782
|
+
recommended: boolean()
|
|
11783
|
+
});
|
|
11784
|
+
object({
|
|
11785
|
+
signals: array(StreamSignalSchema),
|
|
11786
|
+
lastFetchedAt: number$1()
|
|
11787
|
+
});
|
|
11788
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11723
11789
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11724
11790
|
var StreamFormatSchema = _enum([
|
|
11725
11791
|
"webrtc",
|
|
@@ -12116,6 +12182,22 @@ var EgressTranscodeSchema = object({
|
|
|
12116
12182
|
camStreamId: string().nullable()
|
|
12117
12183
|
});
|
|
12118
12184
|
method(object({
|
|
12185
|
+
deviceId: number$1().int().nonnegative(),
|
|
12186
|
+
/** The provider's signal code. */
|
|
12187
|
+
code: string().min(1),
|
|
12188
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12189
|
+
at: number$1().optional()
|
|
12190
|
+
}), object({
|
|
12191
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12192
|
+
accepted: boolean(),
|
|
12193
|
+
reason: _enum([
|
|
12194
|
+
"woke",
|
|
12195
|
+
"hold-extended",
|
|
12196
|
+
"not-enabled",
|
|
12197
|
+
"no-consumer",
|
|
12198
|
+
"unknown-code"
|
|
12199
|
+
])
|
|
12200
|
+
}), { kind: "mutation" }), method(object({
|
|
12119
12201
|
deviceId: number$1().int().nonnegative(),
|
|
12120
12202
|
camStreamId: string().min(1),
|
|
12121
12203
|
kind: CamStreamKindSchema,
|
|
@@ -12370,6 +12452,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12370
12452
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12371
12453
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12372
12454
|
minHeight: number$1().int().positive().optional(),
|
|
12455
|
+
/**
|
|
12456
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12457
|
+
*
|
|
12458
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12459
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12460
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12461
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12462
|
+
* gets born.
|
|
12463
|
+
*/
|
|
12464
|
+
maxHeight: number$1().int().positive().optional(),
|
|
12373
12465
|
/** Minimum horizontal resolution. */
|
|
12374
12466
|
minWidth: number$1().int().positive().optional(),
|
|
12375
12467
|
/**
|
|
@@ -12386,7 +12478,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12386
12478
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12387
12479
|
* codec end-to-end, there's nothing to optimise.
|
|
12388
12480
|
*/
|
|
12389
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12481
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12482
|
+
/**
|
|
12483
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12484
|
+
* understanding that it will be transcoded.
|
|
12485
|
+
*
|
|
12486
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12487
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12488
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12489
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12490
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12491
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12492
|
+
*
|
|
12493
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12494
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12495
|
+
*/
|
|
12496
|
+
allowTranscode: boolean().optional()
|
|
12390
12497
|
}).readonly();
|
|
12391
12498
|
var PickStreamPreferencesSchema = object({
|
|
12392
12499
|
/**
|
|
@@ -12400,12 +12507,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12400
12507
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12401
12508
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12402
12509
|
*/
|
|
12403
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12510
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12511
|
+
/**
|
|
12512
|
+
* The height the consumer actually wants to DELIVER.
|
|
12513
|
+
*
|
|
12514
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12515
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12516
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12517
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12518
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12519
|
+
*
|
|
12520
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12521
|
+
*/
|
|
12522
|
+
targetHeight: number$1().int().positive().optional()
|
|
12404
12523
|
}).readonly();
|
|
12405
12524
|
var PickedCamStreamSchema = object({
|
|
12406
12525
|
camStreamId: string(),
|
|
12407
12526
|
codec: string().optional(),
|
|
12408
12527
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12528
|
+
/**
|
|
12529
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12530
|
+
*
|
|
12531
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12532
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12533
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12534
|
+
*/
|
|
12535
|
+
transcodes: boolean(),
|
|
12409
12536
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12410
12537
|
reason: string()
|
|
12411
12538
|
});
|
|
@@ -16688,6 +16815,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16688
16815
|
"device-enabled",
|
|
16689
16816
|
"device-battery-low",
|
|
16690
16817
|
"device-battery-normal",
|
|
16818
|
+
"device-consumable-low",
|
|
16819
|
+
"device-consumable-normal",
|
|
16691
16820
|
"stream-online",
|
|
16692
16821
|
"stream-offline",
|
|
16693
16822
|
"node-online",
|
|
@@ -16706,6 +16835,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16706
16835
|
"addon-updated",
|
|
16707
16836
|
"server-updated",
|
|
16708
16837
|
"export-completed",
|
|
16838
|
+
"backup-completed",
|
|
16709
16839
|
"camera-online",
|
|
16710
16840
|
"camera-offline",
|
|
16711
16841
|
"camera-disabled",
|
|
@@ -18028,6 +18158,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18028
18158
|
settings: NcAlarmSettingsSchema,
|
|
18029
18159
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18030
18160
|
});
|
|
18161
|
+
/**
|
|
18162
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18163
|
+
*
|
|
18164
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18165
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18166
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18167
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18168
|
+
* a different thing from never having been told, and only the envelope
|
|
18169
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18170
|
+
*/
|
|
18171
|
+
var NcClipRetentionAskSchema = object({
|
|
18172
|
+
/**
|
|
18173
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18174
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18175
|
+
* asking everywhere.
|
|
18176
|
+
*/
|
|
18177
|
+
deviceId: number$1().int().nonnegative().optional(),
|
|
18178
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18179
|
+
* needs nothing produces no ask at all. */
|
|
18180
|
+
seconds: number$1().min(0).max(60),
|
|
18181
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18182
|
+
* assigned, which is what the cut defaults to. */
|
|
18183
|
+
profile: CamProfileSchema.optional(),
|
|
18184
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18185
|
+
ruleId: string(),
|
|
18186
|
+
ruleName: string(),
|
|
18187
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18188
|
+
reason: _enum(["window", "occupancy"])
|
|
18189
|
+
});
|
|
18190
|
+
/**
|
|
18191
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18192
|
+
*
|
|
18193
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18194
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18195
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18196
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18197
|
+
* footage this mechanism exists to keep.
|
|
18198
|
+
*/
|
|
18199
|
+
var NcClipRetentionPlanSchema = object({
|
|
18200
|
+
rulesLoaded: boolean(),
|
|
18201
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18202
|
+
});
|
|
18031
18203
|
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 }), {
|
|
18032
18204
|
kind: "mutation",
|
|
18033
18205
|
auth: "admin",
|
|
@@ -18048,7 +18220,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18048
18220
|
}), object({ success: literal(true) }), {
|
|
18049
18221
|
kind: "mutation",
|
|
18050
18222
|
auth: "admin"
|
|
18051
|
-
}), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18223
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18052
18224
|
deviceId: number$1().int(),
|
|
18053
18225
|
muted: boolean()
|
|
18054
18226
|
}), object({ success: literal(true) }), {
|
|
@@ -20582,6 +20754,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
20582
20754
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
20583
20755
|
framesMatched: number$1().int()
|
|
20584
20756
|
})).readonly() });
|
|
20757
|
+
/**
|
|
20758
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
20759
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
20760
|
+
* is an alias of this, not a second list.
|
|
20761
|
+
*/
|
|
20762
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
20763
|
+
"motion",
|
|
20764
|
+
"audio-dbfs",
|
|
20765
|
+
"battery",
|
|
20766
|
+
"occupancy"
|
|
20767
|
+
]);
|
|
20768
|
+
/**
|
|
20769
|
+
* One closed 5-minute bucket of a long-term series.
|
|
20770
|
+
*
|
|
20771
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
20772
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
20773
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
20774
|
+
* different claim from zero and the reason this is a sparse series.
|
|
20775
|
+
*/
|
|
20776
|
+
var LtsBucketSchema = object({
|
|
20777
|
+
scope: string(),
|
|
20778
|
+
bucketStart: number$1().int(),
|
|
20779
|
+
samples: number$1().int().nonnegative(),
|
|
20780
|
+
sum: number$1(),
|
|
20781
|
+
min: number$1(),
|
|
20782
|
+
max: number$1()
|
|
20783
|
+
});
|
|
20585
20784
|
DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).readonly()), method(object({
|
|
20586
20785
|
deviceId: number$1(),
|
|
20587
20786
|
trackId: string()
|
|
@@ -20628,6 +20827,14 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
|
|
|
20628
20827
|
kinds: array(string()).optional(),
|
|
20629
20828
|
limit: number$1().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20630
20829
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20830
|
+
deviceId: number$1(),
|
|
20831
|
+
series: AnalyticsLtsSeriesSchema,
|
|
20832
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
20833
|
+
scope: string().optional(),
|
|
20834
|
+
from: number$1(),
|
|
20835
|
+
to: number$1(),
|
|
20836
|
+
limit: number$1().int().positive().optional()
|
|
20837
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
20631
20838
|
deviceId: number$1(),
|
|
20632
20839
|
since: number$1(),
|
|
20633
20840
|
until: number$1(),
|
|
@@ -21246,6 +21453,14 @@ var MotionSourceEnum = _enum([
|
|
|
21246
21453
|
*/
|
|
21247
21454
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21248
21455
|
/**
|
|
21456
|
+
* Which root detectors a camera runs. Deliberately the SAME vocabulary
|
|
21457
|
+
* post-analysis already tags every detection with (`DetectionSource`) rather
|
|
21458
|
+
* than a second spelling of the same two ideas — the value an operator picks
|
|
21459
|
+
* here is the value that comes back on the track, the overlay and the debug
|
|
21460
|
+
* row.
|
|
21461
|
+
*/
|
|
21462
|
+
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21463
|
+
/**
|
|
21249
21464
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21250
21465
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
21251
21466
|
* cap implementation, tests) can reuse the type instead of redeclaring
|
|
@@ -21396,6 +21611,35 @@ var RunnerCameraConfigSchema = object({
|
|
|
21396
21611
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21397
21612
|
*/
|
|
21398
21613
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
21614
|
+
/**
|
|
21615
|
+
* WHICH root detector runs for this camera. The detection counterpart of
|
|
21616
|
+
* {@link motionSources}, same shape and same discipline: a per-camera list
|
|
21617
|
+
* of sources the system understands, vendor-agnostic, owned here.
|
|
21618
|
+
*
|
|
21619
|
+
* - `pipeline` — this runner's own root step on decoded pixels (`steps`).
|
|
21620
|
+
* - `onboard` — the CAMERA's own detector, admitted only when it is named
|
|
21621
|
+
* here. Its boxes reach post-analysis on the same
|
|
21622
|
+
* `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
|
|
21623
|
+
* track gets the same tracker, the same overlay and the same detail
|
|
21624
|
+
* subtree (face / plate / embedding).
|
|
21625
|
+
*
|
|
21626
|
+
* `['onboard']` alone is the REPLACEMENT: this runner's root step does not
|
|
21627
|
+
* run, and that is where a camera with a usable onboard detector buys back
|
|
21628
|
+
* its share of the accelerator. It saves the root inference, not the decode
|
|
21629
|
+
* — the detail subtree still needs pixels to cut crops from.
|
|
21630
|
+
*
|
|
21631
|
+
* A camera whose onboard detections carry no geometry cannot serve as a root
|
|
21632
|
+
* step at all (there is nothing to track), and the cap that knows this says
|
|
21633
|
+
* so on `native-object-detection.getOptions().geometry`. On Reolink that is
|
|
21634
|
+
* every battery camera: the boxes ride a sub-stream a battery camera never
|
|
21635
|
+
* attaches, so such a camera stays on `['pipeline']` and its onboard AI is
|
|
21636
|
+
* worth exactly what it already is — a wake signal with a class.
|
|
21637
|
+
*
|
|
21638
|
+
* Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
|
|
21639
|
+
* vendor never turns a detector on for the operator, and neither does a
|
|
21640
|
+
* default.
|
|
21641
|
+
*/
|
|
21642
|
+
detectionSources: DetectionSourcesSchema.default(["pipeline"]),
|
|
21399
21643
|
pipelineEnabled: boolean().default(true),
|
|
21400
21644
|
/** Ordered tree of video steps. Absent → runner skips video detection. */
|
|
21401
21645
|
steps: array(PipelineStepInputSchema).readonly().optional(),
|
|
@@ -21577,7 +21821,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
21577
21821
|
queueDepth: number$1(),
|
|
21578
21822
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
21579
21823
|
});
|
|
21824
|
+
/**
|
|
21825
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
21826
|
+
*
|
|
21827
|
+
* One instance per node. Receives camera assignments from
|
|
21828
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
21829
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
21830
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
21831
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
21832
|
+
* the bus.
|
|
21833
|
+
*
|
|
21834
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
21835
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
21836
|
+
* makes assignment decisions itself.
|
|
21837
|
+
*/
|
|
21838
|
+
/**
|
|
21839
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
21840
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
21841
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
21842
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
21843
|
+
*/
|
|
21844
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
21845
|
+
"not-attached",
|
|
21846
|
+
"battery-asleep",
|
|
21847
|
+
"not-watching",
|
|
21848
|
+
"already-bursting"
|
|
21849
|
+
]);
|
|
21580
21850
|
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({
|
|
21851
|
+
deviceId: number$1(),
|
|
21852
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
21853
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
21854
|
+
frames: number$1().int().positive().optional(),
|
|
21855
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
21856
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
21857
|
+
reason: string()
|
|
21858
|
+
}), object({
|
|
21859
|
+
started: boolean(),
|
|
21860
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
21861
|
+
}), {
|
|
21862
|
+
auth: "admin",
|
|
21863
|
+
kind: "mutation"
|
|
21864
|
+
}), method(object({
|
|
21581
21865
|
handle: FrameHandleSchema,
|
|
21582
21866
|
bbox: NativeCropBboxSchema,
|
|
21583
21867
|
maxWidth: number$1().int().positive().optional(),
|
|
@@ -23947,10 +24231,28 @@ DeviceType.Camera, method(object({ deviceId: number$1().int().nonnegative() }),
|
|
|
23947
24231
|
}), boolean()), method(object({
|
|
23948
24232
|
deviceId: number$1().int().nonnegative(),
|
|
23949
24233
|
sessionId: string()
|
|
23950
|
-
}), object({
|
|
23951
|
-
|
|
23952
|
-
|
|
23953
|
-
|
|
24234
|
+
}), object({
|
|
24235
|
+
pendingRenegotiation: object({
|
|
24236
|
+
target: WebrtcStreamTargetSchema,
|
|
24237
|
+
epoch: number$1()
|
|
24238
|
+
}).nullable(),
|
|
24239
|
+
/**
|
|
24240
|
+
* Whether the session still EXISTS.
|
|
24241
|
+
*
|
|
24242
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24243
|
+
* be able to ask, because a session does not always end the way it
|
|
24244
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24245
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24246
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24247
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24248
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24249
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24250
|
+
*
|
|
24251
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24252
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24253
|
+
*/
|
|
24254
|
+
alive: boolean()
|
|
24255
|
+
}));
|
|
23954
24256
|
object({
|
|
23955
24257
|
/** All accessory children of the parent. */
|
|
23956
24258
|
childDeviceIds: array(number$1()).readonly(),
|
|
@@ -27028,7 +27330,7 @@ var NativeDetectionSchema = object({
|
|
|
27028
27330
|
/** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
|
|
27029
27331
|
confidence: number$1().min(0).max(1).optional()
|
|
27030
27332
|
});
|
|
27031
|
-
object({
|
|
27333
|
+
var NativeObjectDetectionStatusSchema = object({
|
|
27032
27334
|
/**
|
|
27033
27335
|
* Last observed instance per class. Missing entries mean the class
|
|
27034
27336
|
* is supported but nothing has been seen since the provider started.
|
|
@@ -27045,14 +27347,56 @@ object({
|
|
|
27045
27347
|
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
27046
27348
|
/**
|
|
27047
27349
|
* Whether forwarding of onboard AI detections is enabled for this device.
|
|
27048
|
-
*
|
|
27049
|
-
*
|
|
27350
|
+
*
|
|
27351
|
+
* Cold-start OFF on every camera. A vendor does not decide which detector a
|
|
27352
|
+
* camera runs — that is the operator's choice, and it is made where every
|
|
27353
|
+
* other detection choice is made. `geometry` on
|
|
27354
|
+
* {@link NativeObjectDetectionOptionsSchema} is how the form says what the
|
|
27355
|
+
* choice would buy this particular camera.
|
|
27050
27356
|
*/
|
|
27051
27357
|
enabled: boolean()
|
|
27052
|
-
})
|
|
27358
|
+
});
|
|
27359
|
+
/**
|
|
27360
|
+
* WHEN a camera's onboard detections carry geometry.
|
|
27361
|
+
*
|
|
27362
|
+
* - `boxed` — always. The provider holds a standing channel for the boxes, so
|
|
27363
|
+
* a detection is a trackable subject whenever the camera sees one.
|
|
27364
|
+
* - `while-streaming` — only while some stream of this camera is already open.
|
|
27365
|
+
* The boxes ride the video's own side-channel rather than a feed of their
|
|
27366
|
+
* own, so they cost nothing and they exist only when something is pulling.
|
|
27367
|
+
* On Reolink this is every BATTERY camera: a persistent second feed is real
|
|
27368
|
+
* radio drain, but a camera that is awake is awake precisely because
|
|
27369
|
+
* something is in front of it, and its stream is already being pulled.
|
|
27370
|
+
* - `flag-only` — never. The firmware ships the class and nothing else; the
|
|
27371
|
+
* pipeline needs geometry to make a subject, so such a push reaches the
|
|
27372
|
+
* tracker as motion and no further.
|
|
27373
|
+
*
|
|
27374
|
+
* Reported and not inferred, because the operator's question in front of the
|
|
27375
|
+
* picker is "what do I get", and these are three different answers (D14: the
|
|
27376
|
+
* derived form is only as honest as `getOptions`).
|
|
27377
|
+
*/
|
|
27378
|
+
var NativeObjectGeometryEnum = _enum([
|
|
27379
|
+
"boxed",
|
|
27380
|
+
"while-streaming",
|
|
27381
|
+
"flag-only"
|
|
27382
|
+
]);
|
|
27383
|
+
var NativeObjectDetectionOptionsSchema = object({
|
|
27384
|
+
/** Classes this firmware can detect — the same list the status reports. */
|
|
27385
|
+
supportedClasses: array(NativeObjectClassEnum).readonly(),
|
|
27386
|
+
/** What a detection from this camera carries. */
|
|
27387
|
+
geometry: NativeObjectGeometryEnum
|
|
27388
|
+
});
|
|
27389
|
+
var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
|
|
27390
|
+
NativeObjectDetectionStatusSchema.extend({
|
|
27053
27391
|
/** Required by createRuntimeStateBridge — epoch ms of last refresh. */
|
|
27054
27392
|
lastFetchedAt: number$1() });
|
|
27055
|
-
DeviceType.Camera, method(object({
|
|
27393
|
+
DeviceType.Camera, method(object({ deviceId: number$1() }), NativeObjectDetectionOptionsSchema), method(object({
|
|
27394
|
+
deviceId: number$1(),
|
|
27395
|
+
settings: NativeObjectDetectionSettingsPatchSchema
|
|
27396
|
+
}), _void(), {
|
|
27397
|
+
kind: "mutation",
|
|
27398
|
+
auth: "admin"
|
|
27399
|
+
}), method(object({
|
|
27056
27400
|
deviceId: number$1(),
|
|
27057
27401
|
enabled: boolean()
|
|
27058
27402
|
}), _void(), {
|
|
@@ -30851,7 +31195,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
30851
31195
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
30852
31196
|
totalObjects: number$1().int().nonnegative(),
|
|
30853
31197
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
30854
|
-
byClass: record(string(), number$1().int().nonnegative())
|
|
31198
|
+
byClass: record(string(), number$1().int().nonnegative()),
|
|
31199
|
+
/**
|
|
31200
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
31201
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
31202
|
+
*
|
|
31203
|
+
* The operator's question about a scene has two halves and they answer
|
|
31204
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
31205
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
31206
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
31207
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
31208
|
+
*
|
|
31209
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
31210
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
31211
|
+
*
|
|
31212
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
31213
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
31214
|
+
* parked objects here" about a camera whose lot is full.
|
|
31215
|
+
*/
|
|
31216
|
+
standingObjects: number$1().int().nonnegative().optional(),
|
|
31217
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
31218
|
+
* same absence rule. */
|
|
31219
|
+
transientObjects: number$1().int().nonnegative().optional()
|
|
30855
31220
|
});
|
|
30856
31221
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
30857
31222
|
zoneId: string(),
|
|
@@ -33790,12 +34155,24 @@ Object.freeze({
|
|
|
33790
34155
|
addonId: null,
|
|
33791
34156
|
access: "create"
|
|
33792
34157
|
},
|
|
34158
|
+
"nativeObjectDetection.getOptions": {
|
|
34159
|
+
capName: "native-object-detection",
|
|
34160
|
+
capScope: "device",
|
|
34161
|
+
addonId: null,
|
|
34162
|
+
access: "view"
|
|
34163
|
+
},
|
|
33793
34164
|
"nativeObjectDetection.setEnabled": {
|
|
33794
34165
|
capName: "native-object-detection",
|
|
33795
34166
|
capScope: "device",
|
|
33796
34167
|
addonId: null,
|
|
33797
34168
|
access: "create"
|
|
33798
34169
|
},
|
|
34170
|
+
"nativeObjectDetection.setSettings": {
|
|
34171
|
+
capName: "native-object-detection",
|
|
34172
|
+
capScope: "device",
|
|
34173
|
+
addonId: null,
|
|
34174
|
+
access: "create"
|
|
34175
|
+
},
|
|
33799
34176
|
"navigation.getFeatures": {
|
|
33800
34177
|
capName: "navigation",
|
|
33801
34178
|
capScope: "device",
|
|
@@ -34060,6 +34437,12 @@ Object.freeze({
|
|
|
34060
34437
|
addonId: null,
|
|
34061
34438
|
access: "view"
|
|
34062
34439
|
},
|
|
34440
|
+
"notificationRules.getClipRetentionAsks": {
|
|
34441
|
+
capName: "notification-rules",
|
|
34442
|
+
capScope: "system",
|
|
34443
|
+
addonId: null,
|
|
34444
|
+
access: "view"
|
|
34445
|
+
},
|
|
34063
34446
|
"notificationRules.getConditionCatalog": {
|
|
34064
34447
|
capName: "notification-rules",
|
|
34065
34448
|
capScope: "system",
|
|
@@ -34570,6 +34953,12 @@ Object.freeze({
|
|
|
34570
34953
|
addonId: null,
|
|
34571
34954
|
access: "create"
|
|
34572
34955
|
},
|
|
34956
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
34957
|
+
capName: "pipeline-analytics",
|
|
34958
|
+
capScope: "device",
|
|
34959
|
+
addonId: null,
|
|
34960
|
+
access: "view"
|
|
34961
|
+
},
|
|
34573
34962
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
34574
34963
|
capName: "pipeline-analytics",
|
|
34575
34964
|
capScope: "device",
|
|
@@ -35242,6 +35631,12 @@ Object.freeze({
|
|
|
35242
35631
|
addonId: null,
|
|
35243
35632
|
access: "create"
|
|
35244
35633
|
},
|
|
35634
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
35635
|
+
capName: "pipeline-runner",
|
|
35636
|
+
capScope: "system",
|
|
35637
|
+
addonId: null,
|
|
35638
|
+
access: "create"
|
|
35639
|
+
},
|
|
35245
35640
|
"pipelineRunner.runDetailSubtree": {
|
|
35246
35641
|
capName: "pipeline-runner",
|
|
35247
35642
|
capScope: "system",
|
|
@@ -36454,6 +36849,12 @@ Object.freeze({
|
|
|
36454
36849
|
addonId: null,
|
|
36455
36850
|
access: "create"
|
|
36456
36851
|
},
|
|
36852
|
+
"streamBroker.reportStreamSignal": {
|
|
36853
|
+
capName: "stream-broker",
|
|
36854
|
+
capScope: "system",
|
|
36855
|
+
addonId: null,
|
|
36856
|
+
access: "create"
|
|
36857
|
+
},
|
|
36457
36858
|
"streamBroker.restartProfile": {
|
|
36458
36859
|
capName: "stream-broker",
|
|
36459
36860
|
capScope: "system",
|
|
@@ -36538,6 +36939,12 @@ Object.freeze({
|
|
|
36538
36939
|
addonId: null,
|
|
36539
36940
|
access: "create"
|
|
36540
36941
|
},
|
|
36942
|
+
"streamSignals.listSignals": {
|
|
36943
|
+
capName: "stream-signals",
|
|
36944
|
+
capScope: "device",
|
|
36945
|
+
addonId: null,
|
|
36946
|
+
access: "view"
|
|
36947
|
+
},
|
|
36541
36948
|
"switch.setState": {
|
|
36542
36949
|
capName: "switch",
|
|
36543
36950
|
capScope: "device",
|
|
@@ -38010,11 +38417,21 @@ Object.freeze({
|
|
|
38010
38417
|
form: "single",
|
|
38011
38418
|
optional: false
|
|
38012
38419
|
}],
|
|
38420
|
+
"nativeObjectDetection.getOptions": [{
|
|
38421
|
+
name: "deviceId",
|
|
38422
|
+
form: "single",
|
|
38423
|
+
optional: false
|
|
38424
|
+
}],
|
|
38013
38425
|
"nativeObjectDetection.setEnabled": [{
|
|
38014
38426
|
name: "deviceId",
|
|
38015
38427
|
form: "single",
|
|
38016
38428
|
optional: false
|
|
38017
38429
|
}],
|
|
38430
|
+
"nativeObjectDetection.setSettings": [{
|
|
38431
|
+
name: "deviceId",
|
|
38432
|
+
form: "single",
|
|
38433
|
+
optional: false
|
|
38434
|
+
}],
|
|
38018
38435
|
"navigation.getFeatures": [{
|
|
38019
38436
|
name: "deviceId",
|
|
38020
38437
|
form: "single",
|
|
@@ -38364,6 +38781,11 @@ Object.freeze({
|
|
|
38364
38781
|
form: "single",
|
|
38365
38782
|
optional: false
|
|
38366
38783
|
}],
|
|
38784
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
38785
|
+
name: "deviceId",
|
|
38786
|
+
form: "single",
|
|
38787
|
+
optional: false
|
|
38788
|
+
}],
|
|
38367
38789
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
38368
38790
|
name: "deviceId",
|
|
38369
38791
|
form: "single",
|
|
@@ -38554,6 +38976,11 @@ Object.freeze({
|
|
|
38554
38976
|
form: "single",
|
|
38555
38977
|
optional: false
|
|
38556
38978
|
}],
|
|
38979
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
38980
|
+
name: "deviceId",
|
|
38981
|
+
form: "single",
|
|
38982
|
+
optional: false
|
|
38983
|
+
}],
|
|
38557
38984
|
"pipelineRunner.runDetailSubtree": [{
|
|
38558
38985
|
name: "deviceId",
|
|
38559
38986
|
form: "single",
|
|
@@ -38910,6 +39337,11 @@ Object.freeze({
|
|
|
38910
39337
|
form: "single",
|
|
38911
39338
|
optional: false
|
|
38912
39339
|
}],
|
|
39340
|
+
"streamBroker.reportStreamSignal": [{
|
|
39341
|
+
name: "deviceId",
|
|
39342
|
+
form: "single",
|
|
39343
|
+
optional: false
|
|
39344
|
+
}],
|
|
38913
39345
|
"streamBroker.restartProfile": [{
|
|
38914
39346
|
name: "deviceId",
|
|
38915
39347
|
form: "single",
|