@camstack/addon-provider-onvif 1.2.100 → 1.2.101
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 +173 -8
- package/dist/addon.mjs +173 -8
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
4
4
|
//#endregion
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -619,6 +619,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
619
619
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
620
620
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
621
621
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
622
|
+
/**
|
|
623
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
624
|
+
*
|
|
625
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
626
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
627
|
+
* destinations would be told three times. And a run where two of three
|
|
628
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
629
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
630
|
+
* carried here and the message says both.
|
|
631
|
+
*
|
|
632
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
633
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
634
|
+
*/
|
|
635
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
622
636
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
623
637
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
624
638
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5349,7 +5363,7 @@ var ZodIssueCode = {
|
|
|
5349
5363
|
var ZodFirstPartyTypeKind;
|
|
5350
5364
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5351
5365
|
//#endregion
|
|
5352
|
-
//#region ../types/dist/sleep-
|
|
5366
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5353
5367
|
/**
|
|
5354
5368
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5355
5369
|
* window to float samples (D455).
|
|
@@ -11489,6 +11503,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11489
11503
|
auth: "admin"
|
|
11490
11504
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11491
11505
|
DeviceType.Camera;
|
|
11506
|
+
/**
|
|
11507
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11508
|
+
*
|
|
11509
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11510
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11511
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11512
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11513
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11514
|
+
* itself, with no stream running.
|
|
11515
|
+
*
|
|
11516
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11517
|
+
*
|
|
11518
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11519
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11520
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11521
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11522
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11523
|
+
*
|
|
11524
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11525
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11526
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11527
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11528
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11529
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11530
|
+
* camera. Two questions, two authorities.
|
|
11531
|
+
*
|
|
11532
|
+
* ## Availability is not permission
|
|
11533
|
+
*
|
|
11534
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11535
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11536
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11537
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11538
|
+
*/
|
|
11539
|
+
/** One signal a device can emit. */
|
|
11540
|
+
var StreamSignalSchema = object({
|
|
11541
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11542
|
+
code: string().min(1),
|
|
11543
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11544
|
+
label: string().min(1),
|
|
11545
|
+
/**
|
|
11546
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11547
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11548
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11549
|
+
* both of its own.
|
|
11550
|
+
*/
|
|
11551
|
+
recommended: boolean()
|
|
11552
|
+
});
|
|
11553
|
+
object({
|
|
11554
|
+
signals: array(StreamSignalSchema),
|
|
11555
|
+
lastFetchedAt: number()
|
|
11556
|
+
});
|
|
11557
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11492
11558
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11493
11559
|
var StreamFormatSchema = _enum([
|
|
11494
11560
|
"webrtc",
|
|
@@ -11885,6 +11951,22 @@ var EgressTranscodeSchema = object({
|
|
|
11885
11951
|
camStreamId: string().nullable()
|
|
11886
11952
|
});
|
|
11887
11953
|
method(object({
|
|
11954
|
+
deviceId: number().int().nonnegative(),
|
|
11955
|
+
/** The provider's signal code. */
|
|
11956
|
+
code: string().min(1),
|
|
11957
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11958
|
+
at: number().optional()
|
|
11959
|
+
}), object({
|
|
11960
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11961
|
+
accepted: boolean(),
|
|
11962
|
+
reason: _enum([
|
|
11963
|
+
"woke",
|
|
11964
|
+
"hold-extended",
|
|
11965
|
+
"not-enabled",
|
|
11966
|
+
"no-consumer",
|
|
11967
|
+
"unknown-code"
|
|
11968
|
+
])
|
|
11969
|
+
}), { kind: "mutation" }), method(object({
|
|
11888
11970
|
deviceId: number().int().nonnegative(),
|
|
11889
11971
|
camStreamId: string().min(1),
|
|
11890
11972
|
kind: CamStreamKindSchema,
|
|
@@ -12139,6 +12221,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12139
12221
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12140
12222
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12141
12223
|
minHeight: number().int().positive().optional(),
|
|
12224
|
+
/**
|
|
12225
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12226
|
+
*
|
|
12227
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12228
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12229
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12230
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12231
|
+
* gets born.
|
|
12232
|
+
*/
|
|
12233
|
+
maxHeight: number().int().positive().optional(),
|
|
12142
12234
|
/** Minimum horizontal resolution. */
|
|
12143
12235
|
minWidth: number().int().positive().optional(),
|
|
12144
12236
|
/**
|
|
@@ -12155,7 +12247,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12155
12247
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12156
12248
|
* codec end-to-end, there's nothing to optimise.
|
|
12157
12249
|
*/
|
|
12158
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12250
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12251
|
+
/**
|
|
12252
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12253
|
+
* understanding that it will be transcoded.
|
|
12254
|
+
*
|
|
12255
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12256
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12257
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12258
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12259
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12260
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12261
|
+
*
|
|
12262
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12263
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12264
|
+
*/
|
|
12265
|
+
allowTranscode: boolean().optional()
|
|
12159
12266
|
}).readonly();
|
|
12160
12267
|
var PickStreamPreferencesSchema = object({
|
|
12161
12268
|
/**
|
|
@@ -12169,12 +12276,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12169
12276
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12170
12277
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12171
12278
|
*/
|
|
12172
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12279
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12280
|
+
/**
|
|
12281
|
+
* The height the consumer actually wants to DELIVER.
|
|
12282
|
+
*
|
|
12283
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12284
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12285
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12286
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12287
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12288
|
+
*
|
|
12289
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12290
|
+
*/
|
|
12291
|
+
targetHeight: number().int().positive().optional()
|
|
12173
12292
|
}).readonly();
|
|
12174
12293
|
var PickedCamStreamSchema = object({
|
|
12175
12294
|
camStreamId: string(),
|
|
12176
12295
|
codec: string().optional(),
|
|
12177
12296
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12297
|
+
/**
|
|
12298
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12299
|
+
*
|
|
12300
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12301
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12302
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12303
|
+
*/
|
|
12304
|
+
transcodes: boolean(),
|
|
12178
12305
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12179
12306
|
reason: string()
|
|
12180
12307
|
});
|
|
@@ -16444,6 +16571,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16444
16571
|
"device-enabled",
|
|
16445
16572
|
"device-battery-low",
|
|
16446
16573
|
"device-battery-normal",
|
|
16574
|
+
"device-consumable-low",
|
|
16575
|
+
"device-consumable-normal",
|
|
16447
16576
|
"stream-online",
|
|
16448
16577
|
"stream-offline",
|
|
16449
16578
|
"node-online",
|
|
@@ -16462,6 +16591,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16462
16591
|
"addon-updated",
|
|
16463
16592
|
"server-updated",
|
|
16464
16593
|
"export-completed",
|
|
16594
|
+
"backup-completed",
|
|
16465
16595
|
"camera-online",
|
|
16466
16596
|
"camera-offline",
|
|
16467
16597
|
"camera-disabled",
|
|
@@ -23807,10 +23937,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23807
23937
|
}), boolean()), method(object({
|
|
23808
23938
|
deviceId: number().int().nonnegative(),
|
|
23809
23939
|
sessionId: string()
|
|
23810
|
-
}), object({
|
|
23811
|
-
|
|
23812
|
-
|
|
23813
|
-
|
|
23940
|
+
}), object({
|
|
23941
|
+
pendingRenegotiation: object({
|
|
23942
|
+
target: WebrtcStreamTargetSchema,
|
|
23943
|
+
epoch: number()
|
|
23944
|
+
}).nullable(),
|
|
23945
|
+
/**
|
|
23946
|
+
* Whether the session still EXISTS.
|
|
23947
|
+
*
|
|
23948
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
23949
|
+
* be able to ask, because a session does not always end the way it
|
|
23950
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
23951
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
23952
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
23953
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
23954
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
23955
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
23956
|
+
*
|
|
23957
|
+
* `false` for a session id the provider has never heard of, which is
|
|
23958
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
23959
|
+
*/
|
|
23960
|
+
alive: boolean()
|
|
23961
|
+
}));
|
|
23814
23962
|
object({
|
|
23815
23963
|
/** All accessory children of the parent. */
|
|
23816
23964
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -37182,6 +37330,12 @@ Object.freeze({
|
|
|
37182
37330
|
addonId: null,
|
|
37183
37331
|
access: "create"
|
|
37184
37332
|
},
|
|
37333
|
+
"streamBroker.reportStreamSignal": {
|
|
37334
|
+
capName: "stream-broker",
|
|
37335
|
+
capScope: "system",
|
|
37336
|
+
addonId: null,
|
|
37337
|
+
access: "create"
|
|
37338
|
+
},
|
|
37185
37339
|
"streamBroker.restartProfile": {
|
|
37186
37340
|
capName: "stream-broker",
|
|
37187
37341
|
capScope: "system",
|
|
@@ -37266,6 +37420,12 @@ Object.freeze({
|
|
|
37266
37420
|
addonId: null,
|
|
37267
37421
|
access: "create"
|
|
37268
37422
|
},
|
|
37423
|
+
"streamSignals.listSignals": {
|
|
37424
|
+
capName: "stream-signals",
|
|
37425
|
+
capScope: "device",
|
|
37426
|
+
addonId: null,
|
|
37427
|
+
access: "view"
|
|
37428
|
+
},
|
|
37269
37429
|
"switch.setState": {
|
|
37270
37430
|
capName: "switch",
|
|
37271
37431
|
capScope: "device",
|
|
@@ -39638,6 +39798,11 @@ Object.freeze({
|
|
|
39638
39798
|
form: "single",
|
|
39639
39799
|
optional: false
|
|
39640
39800
|
}],
|
|
39801
|
+
"streamBroker.reportStreamSignal": [{
|
|
39802
|
+
name: "deviceId",
|
|
39803
|
+
form: "single",
|
|
39804
|
+
optional: false
|
|
39805
|
+
}],
|
|
39641
39806
|
"streamBroker.restartProfile": [{
|
|
39642
39807
|
name: "deviceId",
|
|
39643
39808
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
|
|
|
3
3
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
4
4
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
5
5
|
//#endregion
|
|
6
|
-
//#region ../types/dist/event-category-
|
|
6
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
7
7
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
8
8
|
EventCategory["SystemBoot"] = "system.boot";
|
|
9
9
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -620,6 +620,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
620
620
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
621
621
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
622
622
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
623
|
+
/**
|
|
624
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
625
|
+
*
|
|
626
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
627
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
628
|
+
* destinations would be told three times. And a run where two of three
|
|
629
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
630
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
631
|
+
* carried here and the message says both.
|
|
632
|
+
*
|
|
633
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
634
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
635
|
+
*/
|
|
636
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
623
637
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
624
638
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
625
639
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5350,7 +5364,7 @@ var ZodIssueCode = {
|
|
|
5350
5364
|
var ZodFirstPartyTypeKind;
|
|
5351
5365
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5352
5366
|
//#endregion
|
|
5353
|
-
//#region ../types/dist/sleep-
|
|
5367
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5354
5368
|
/**
|
|
5355
5369
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5356
5370
|
* window to float samples (D455).
|
|
@@ -11490,6 +11504,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11490
11504
|
auth: "admin"
|
|
11491
11505
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11492
11506
|
DeviceType.Camera;
|
|
11507
|
+
/**
|
|
11508
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11509
|
+
*
|
|
11510
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11511
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11512
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11513
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11514
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11515
|
+
* itself, with no stream running.
|
|
11516
|
+
*
|
|
11517
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11518
|
+
*
|
|
11519
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11520
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11521
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11522
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11523
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11524
|
+
*
|
|
11525
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11526
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11527
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11528
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11529
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11530
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11531
|
+
* camera. Two questions, two authorities.
|
|
11532
|
+
*
|
|
11533
|
+
* ## Availability is not permission
|
|
11534
|
+
*
|
|
11535
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11536
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11537
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11538
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11539
|
+
*/
|
|
11540
|
+
/** One signal a device can emit. */
|
|
11541
|
+
var StreamSignalSchema = object({
|
|
11542
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11543
|
+
code: string().min(1),
|
|
11544
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11545
|
+
label: string().min(1),
|
|
11546
|
+
/**
|
|
11547
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11548
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11549
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11550
|
+
* both of its own.
|
|
11551
|
+
*/
|
|
11552
|
+
recommended: boolean()
|
|
11553
|
+
});
|
|
11554
|
+
object({
|
|
11555
|
+
signals: array(StreamSignalSchema),
|
|
11556
|
+
lastFetchedAt: number()
|
|
11557
|
+
});
|
|
11558
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11493
11559
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11494
11560
|
var StreamFormatSchema = _enum([
|
|
11495
11561
|
"webrtc",
|
|
@@ -11886,6 +11952,22 @@ var EgressTranscodeSchema = object({
|
|
|
11886
11952
|
camStreamId: string().nullable()
|
|
11887
11953
|
});
|
|
11888
11954
|
method(object({
|
|
11955
|
+
deviceId: number().int().nonnegative(),
|
|
11956
|
+
/** The provider's signal code. */
|
|
11957
|
+
code: string().min(1),
|
|
11958
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11959
|
+
at: number().optional()
|
|
11960
|
+
}), object({
|
|
11961
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11962
|
+
accepted: boolean(),
|
|
11963
|
+
reason: _enum([
|
|
11964
|
+
"woke",
|
|
11965
|
+
"hold-extended",
|
|
11966
|
+
"not-enabled",
|
|
11967
|
+
"no-consumer",
|
|
11968
|
+
"unknown-code"
|
|
11969
|
+
])
|
|
11970
|
+
}), { kind: "mutation" }), method(object({
|
|
11889
11971
|
deviceId: number().int().nonnegative(),
|
|
11890
11972
|
camStreamId: string().min(1),
|
|
11891
11973
|
kind: CamStreamKindSchema,
|
|
@@ -12140,6 +12222,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12140
12222
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12141
12223
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12142
12224
|
minHeight: number().int().positive().optional(),
|
|
12225
|
+
/**
|
|
12226
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12227
|
+
*
|
|
12228
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12229
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12230
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12231
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12232
|
+
* gets born.
|
|
12233
|
+
*/
|
|
12234
|
+
maxHeight: number().int().positive().optional(),
|
|
12143
12235
|
/** Minimum horizontal resolution. */
|
|
12144
12236
|
minWidth: number().int().positive().optional(),
|
|
12145
12237
|
/**
|
|
@@ -12156,7 +12248,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12156
12248
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12157
12249
|
* codec end-to-end, there's nothing to optimise.
|
|
12158
12250
|
*/
|
|
12159
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12251
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12252
|
+
/**
|
|
12253
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12254
|
+
* understanding that it will be transcoded.
|
|
12255
|
+
*
|
|
12256
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12257
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12258
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12259
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12260
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12261
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12262
|
+
*
|
|
12263
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12264
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12265
|
+
*/
|
|
12266
|
+
allowTranscode: boolean().optional()
|
|
12160
12267
|
}).readonly();
|
|
12161
12268
|
var PickStreamPreferencesSchema = object({
|
|
12162
12269
|
/**
|
|
@@ -12170,12 +12277,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12170
12277
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12171
12278
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12172
12279
|
*/
|
|
12173
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12280
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12281
|
+
/**
|
|
12282
|
+
* The height the consumer actually wants to DELIVER.
|
|
12283
|
+
*
|
|
12284
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12285
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12286
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12287
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12288
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12289
|
+
*
|
|
12290
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12291
|
+
*/
|
|
12292
|
+
targetHeight: number().int().positive().optional()
|
|
12174
12293
|
}).readonly();
|
|
12175
12294
|
var PickedCamStreamSchema = object({
|
|
12176
12295
|
camStreamId: string(),
|
|
12177
12296
|
codec: string().optional(),
|
|
12178
12297
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12298
|
+
/**
|
|
12299
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12300
|
+
*
|
|
12301
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12302
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12303
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12304
|
+
*/
|
|
12305
|
+
transcodes: boolean(),
|
|
12179
12306
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12180
12307
|
reason: string()
|
|
12181
12308
|
});
|
|
@@ -16445,6 +16572,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16445
16572
|
"device-enabled",
|
|
16446
16573
|
"device-battery-low",
|
|
16447
16574
|
"device-battery-normal",
|
|
16575
|
+
"device-consumable-low",
|
|
16576
|
+
"device-consumable-normal",
|
|
16448
16577
|
"stream-online",
|
|
16449
16578
|
"stream-offline",
|
|
16450
16579
|
"node-online",
|
|
@@ -16463,6 +16592,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16463
16592
|
"addon-updated",
|
|
16464
16593
|
"server-updated",
|
|
16465
16594
|
"export-completed",
|
|
16595
|
+
"backup-completed",
|
|
16466
16596
|
"camera-online",
|
|
16467
16597
|
"camera-offline",
|
|
16468
16598
|
"camera-disabled",
|
|
@@ -23808,10 +23938,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23808
23938
|
}), boolean()), method(object({
|
|
23809
23939
|
deviceId: number().int().nonnegative(),
|
|
23810
23940
|
sessionId: string()
|
|
23811
|
-
}), object({
|
|
23812
|
-
|
|
23813
|
-
|
|
23814
|
-
|
|
23941
|
+
}), object({
|
|
23942
|
+
pendingRenegotiation: object({
|
|
23943
|
+
target: WebrtcStreamTargetSchema,
|
|
23944
|
+
epoch: number()
|
|
23945
|
+
}).nullable(),
|
|
23946
|
+
/**
|
|
23947
|
+
* Whether the session still EXISTS.
|
|
23948
|
+
*
|
|
23949
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
23950
|
+
* be able to ask, because a session does not always end the way it
|
|
23951
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
23952
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
23953
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
23954
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
23955
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
23956
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
23957
|
+
*
|
|
23958
|
+
* `false` for a session id the provider has never heard of, which is
|
|
23959
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
23960
|
+
*/
|
|
23961
|
+
alive: boolean()
|
|
23962
|
+
}));
|
|
23815
23963
|
object({
|
|
23816
23964
|
/** All accessory children of the parent. */
|
|
23817
23965
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -37183,6 +37331,12 @@ Object.freeze({
|
|
|
37183
37331
|
addonId: null,
|
|
37184
37332
|
access: "create"
|
|
37185
37333
|
},
|
|
37334
|
+
"streamBroker.reportStreamSignal": {
|
|
37335
|
+
capName: "stream-broker",
|
|
37336
|
+
capScope: "system",
|
|
37337
|
+
addonId: null,
|
|
37338
|
+
access: "create"
|
|
37339
|
+
},
|
|
37186
37340
|
"streamBroker.restartProfile": {
|
|
37187
37341
|
capName: "stream-broker",
|
|
37188
37342
|
capScope: "system",
|
|
@@ -37267,6 +37421,12 @@ Object.freeze({
|
|
|
37267
37421
|
addonId: null,
|
|
37268
37422
|
access: "create"
|
|
37269
37423
|
},
|
|
37424
|
+
"streamSignals.listSignals": {
|
|
37425
|
+
capName: "stream-signals",
|
|
37426
|
+
capScope: "device",
|
|
37427
|
+
addonId: null,
|
|
37428
|
+
access: "view"
|
|
37429
|
+
},
|
|
37270
37430
|
"switch.setState": {
|
|
37271
37431
|
capName: "switch",
|
|
37272
37432
|
capScope: "device",
|
|
@@ -39639,6 +39799,11 @@ Object.freeze({
|
|
|
39639
39799
|
form: "single",
|
|
39640
39800
|
optional: false
|
|
39641
39801
|
}],
|
|
39802
|
+
"streamBroker.reportStreamSignal": [{
|
|
39803
|
+
name: "deviceId",
|
|
39804
|
+
form: "single",
|
|
39805
|
+
optional: false
|
|
39806
|
+
}],
|
|
39642
39807
|
"streamBroker.restartProfile": [{
|
|
39643
39808
|
name: "deviceId",
|
|
39644
39809
|
form: "single",
|