@camstack/addon-mqtt-broker 1.2.101 → 1.2.102
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/mqtt-broker.addon.js +173 -8
- package/dist/mqtt-broker.addon.mjs +173 -8
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@ let crypto$10 = __toESM(crypto$1, 1);
|
|
|
44
44
|
crypto$1 = __toESM(crypto$1);
|
|
45
45
|
let node_fs = require("node:fs");
|
|
46
46
|
let node_path = require("node:path");
|
|
47
|
-
//#region ../types/dist/event-category-
|
|
47
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
48
48
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
49
49
|
EventCategory["SystemBoot"] = "system.boot";
|
|
50
50
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -661,6 +661,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
661
661
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
662
662
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
663
663
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
664
|
+
/**
|
|
665
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
666
|
+
*
|
|
667
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
668
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
669
|
+
* destinations would be told three times. And a run where two of three
|
|
670
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
671
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
672
|
+
* carried here and the message says both.
|
|
673
|
+
*
|
|
674
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
675
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
676
|
+
*/
|
|
677
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
664
678
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
665
679
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
666
680
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5391,7 +5405,7 @@ var ZodIssueCode = {
|
|
|
5391
5405
|
var ZodFirstPartyTypeKind;
|
|
5392
5406
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5393
5407
|
//#endregion
|
|
5394
|
-
//#region ../types/dist/sleep-
|
|
5408
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5395
5409
|
/**
|
|
5396
5410
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5397
5411
|
* window to float samples (D455).
|
|
@@ -11568,6 +11582,58 @@ var brokerCapability = {
|
|
|
11568
11582
|
}
|
|
11569
11583
|
};
|
|
11570
11584
|
DeviceType.Camera;
|
|
11585
|
+
/**
|
|
11586
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11587
|
+
*
|
|
11588
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11589
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11590
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11591
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11592
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11593
|
+
* itself, with no stream running.
|
|
11594
|
+
*
|
|
11595
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11596
|
+
*
|
|
11597
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11598
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11599
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11600
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11601
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11602
|
+
*
|
|
11603
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11604
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11605
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11606
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11607
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11608
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11609
|
+
* camera. Two questions, two authorities.
|
|
11610
|
+
*
|
|
11611
|
+
* ## Availability is not permission
|
|
11612
|
+
*
|
|
11613
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11614
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11615
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11616
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11617
|
+
*/
|
|
11618
|
+
/** One signal a device can emit. */
|
|
11619
|
+
var StreamSignalSchema = object({
|
|
11620
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11621
|
+
code: string().min(1),
|
|
11622
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11623
|
+
label: string().min(1),
|
|
11624
|
+
/**
|
|
11625
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11626
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11627
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11628
|
+
* both of its own.
|
|
11629
|
+
*/
|
|
11630
|
+
recommended: boolean()
|
|
11631
|
+
});
|
|
11632
|
+
object({
|
|
11633
|
+
signals: array(StreamSignalSchema),
|
|
11634
|
+
lastFetchedAt: number()
|
|
11635
|
+
});
|
|
11636
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11571
11637
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11572
11638
|
var StreamFormatSchema = _enum([
|
|
11573
11639
|
"webrtc",
|
|
@@ -11964,6 +12030,22 @@ var EgressTranscodeSchema = object({
|
|
|
11964
12030
|
camStreamId: string().nullable()
|
|
11965
12031
|
});
|
|
11966
12032
|
method(object({
|
|
12033
|
+
deviceId: number().int().nonnegative(),
|
|
12034
|
+
/** The provider's signal code. */
|
|
12035
|
+
code: string().min(1),
|
|
12036
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12037
|
+
at: number().optional()
|
|
12038
|
+
}), object({
|
|
12039
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12040
|
+
accepted: boolean(),
|
|
12041
|
+
reason: _enum([
|
|
12042
|
+
"woke",
|
|
12043
|
+
"hold-extended",
|
|
12044
|
+
"not-enabled",
|
|
12045
|
+
"no-consumer",
|
|
12046
|
+
"unknown-code"
|
|
12047
|
+
])
|
|
12048
|
+
}), { kind: "mutation" }), method(object({
|
|
11967
12049
|
deviceId: number().int().nonnegative(),
|
|
11968
12050
|
camStreamId: string().min(1),
|
|
11969
12051
|
kind: CamStreamKindSchema,
|
|
@@ -12218,6 +12300,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12218
12300
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12219
12301
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12220
12302
|
minHeight: number().int().positive().optional(),
|
|
12303
|
+
/**
|
|
12304
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12305
|
+
*
|
|
12306
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12307
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12308
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12309
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12310
|
+
* gets born.
|
|
12311
|
+
*/
|
|
12312
|
+
maxHeight: number().int().positive().optional(),
|
|
12221
12313
|
/** Minimum horizontal resolution. */
|
|
12222
12314
|
minWidth: number().int().positive().optional(),
|
|
12223
12315
|
/**
|
|
@@ -12234,7 +12326,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12234
12326
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12235
12327
|
* codec end-to-end, there's nothing to optimise.
|
|
12236
12328
|
*/
|
|
12237
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12329
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12330
|
+
/**
|
|
12331
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12332
|
+
* understanding that it will be transcoded.
|
|
12333
|
+
*
|
|
12334
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12335
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12336
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12337
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12338
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12339
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12340
|
+
*
|
|
12341
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12342
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12343
|
+
*/
|
|
12344
|
+
allowTranscode: boolean().optional()
|
|
12238
12345
|
}).readonly();
|
|
12239
12346
|
var PickStreamPreferencesSchema = object({
|
|
12240
12347
|
/**
|
|
@@ -12248,12 +12355,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12248
12355
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12249
12356
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12250
12357
|
*/
|
|
12251
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12358
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12359
|
+
/**
|
|
12360
|
+
* The height the consumer actually wants to DELIVER.
|
|
12361
|
+
*
|
|
12362
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12363
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12364
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12365
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12366
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12367
|
+
*
|
|
12368
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12369
|
+
*/
|
|
12370
|
+
targetHeight: number().int().positive().optional()
|
|
12252
12371
|
}).readonly();
|
|
12253
12372
|
var PickedCamStreamSchema = object({
|
|
12254
12373
|
camStreamId: string(),
|
|
12255
12374
|
codec: string().optional(),
|
|
12256
12375
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12376
|
+
/**
|
|
12377
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12378
|
+
*
|
|
12379
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12380
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12381
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12382
|
+
*/
|
|
12383
|
+
transcodes: boolean(),
|
|
12257
12384
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12258
12385
|
reason: string()
|
|
12259
12386
|
});
|
|
@@ -16461,6 +16588,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16461
16588
|
"device-enabled",
|
|
16462
16589
|
"device-battery-low",
|
|
16463
16590
|
"device-battery-normal",
|
|
16591
|
+
"device-consumable-low",
|
|
16592
|
+
"device-consumable-normal",
|
|
16464
16593
|
"stream-online",
|
|
16465
16594
|
"stream-offline",
|
|
16466
16595
|
"node-online",
|
|
@@ -16479,6 +16608,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16479
16608
|
"addon-updated",
|
|
16480
16609
|
"server-updated",
|
|
16481
16610
|
"export-completed",
|
|
16611
|
+
"backup-completed",
|
|
16482
16612
|
"camera-online",
|
|
16483
16613
|
"camera-offline",
|
|
16484
16614
|
"camera-disabled",
|
|
@@ -23720,10 +23850,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23720
23850
|
}), boolean()), method(object({
|
|
23721
23851
|
deviceId: number().int().nonnegative(),
|
|
23722
23852
|
sessionId: string()
|
|
23723
|
-
}), object({
|
|
23724
|
-
|
|
23725
|
-
|
|
23726
|
-
|
|
23853
|
+
}), object({
|
|
23854
|
+
pendingRenegotiation: object({
|
|
23855
|
+
target: WebrtcStreamTargetSchema,
|
|
23856
|
+
epoch: number()
|
|
23857
|
+
}).nullable(),
|
|
23858
|
+
/**
|
|
23859
|
+
* Whether the session still EXISTS.
|
|
23860
|
+
*
|
|
23861
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
23862
|
+
* be able to ask, because a session does not always end the way it
|
|
23863
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
23864
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
23865
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
23866
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
23867
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
23868
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
23869
|
+
*
|
|
23870
|
+
* `false` for a session id the provider has never heard of, which is
|
|
23871
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
23872
|
+
*/
|
|
23873
|
+
alive: boolean()
|
|
23874
|
+
}));
|
|
23727
23875
|
object({
|
|
23728
23876
|
/** All accessory children of the parent. */
|
|
23729
23877
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -36227,6 +36375,12 @@ Object.freeze({
|
|
|
36227
36375
|
addonId: null,
|
|
36228
36376
|
access: "create"
|
|
36229
36377
|
},
|
|
36378
|
+
"streamBroker.reportStreamSignal": {
|
|
36379
|
+
capName: "stream-broker",
|
|
36380
|
+
capScope: "system",
|
|
36381
|
+
addonId: null,
|
|
36382
|
+
access: "create"
|
|
36383
|
+
},
|
|
36230
36384
|
"streamBroker.restartProfile": {
|
|
36231
36385
|
capName: "stream-broker",
|
|
36232
36386
|
capScope: "system",
|
|
@@ -36311,6 +36465,12 @@ Object.freeze({
|
|
|
36311
36465
|
addonId: null,
|
|
36312
36466
|
access: "create"
|
|
36313
36467
|
},
|
|
36468
|
+
"streamSignals.listSignals": {
|
|
36469
|
+
capName: "stream-signals",
|
|
36470
|
+
capScope: "device",
|
|
36471
|
+
addonId: null,
|
|
36472
|
+
access: "view"
|
|
36473
|
+
},
|
|
36314
36474
|
"switch.setState": {
|
|
36315
36475
|
capName: "switch",
|
|
36316
36476
|
capScope: "device",
|
|
@@ -38683,6 +38843,11 @@ Object.freeze({
|
|
|
38683
38843
|
form: "single",
|
|
38684
38844
|
optional: false
|
|
38685
38845
|
}],
|
|
38846
|
+
"streamBroker.reportStreamSignal": [{
|
|
38847
|
+
name: "deviceId",
|
|
38848
|
+
form: "single",
|
|
38849
|
+
optional: false
|
|
38850
|
+
}],
|
|
38686
38851
|
"streamBroker.restartProfile": [{
|
|
38687
38852
|
name: "deviceId",
|
|
38688
38853
|
form: "single",
|
|
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
39
39
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), 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";
|
|
@@ -5386,7 +5400,7 @@ var ZodIssueCode = {
|
|
|
5386
5400
|
var ZodFirstPartyTypeKind;
|
|
5387
5401
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5388
5402
|
//#endregion
|
|
5389
|
-
//#region ../types/dist/sleep-
|
|
5403
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5390
5404
|
/**
|
|
5391
5405
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5392
5406
|
* window to float samples (D455).
|
|
@@ -11563,6 +11577,58 @@ var brokerCapability = {
|
|
|
11563
11577
|
}
|
|
11564
11578
|
};
|
|
11565
11579
|
DeviceType.Camera;
|
|
11580
|
+
/**
|
|
11581
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11582
|
+
*
|
|
11583
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11584
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11585
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11586
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11587
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11588
|
+
* itself, with no stream running.
|
|
11589
|
+
*
|
|
11590
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11591
|
+
*
|
|
11592
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11593
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11594
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11595
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11596
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11597
|
+
*
|
|
11598
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11599
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11600
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11601
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11602
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11603
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11604
|
+
* camera. Two questions, two authorities.
|
|
11605
|
+
*
|
|
11606
|
+
* ## Availability is not permission
|
|
11607
|
+
*
|
|
11608
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11609
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11610
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11611
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11612
|
+
*/
|
|
11613
|
+
/** One signal a device can emit. */
|
|
11614
|
+
var StreamSignalSchema = object({
|
|
11615
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11616
|
+
code: string().min(1),
|
|
11617
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11618
|
+
label: string().min(1),
|
|
11619
|
+
/**
|
|
11620
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11621
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11622
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11623
|
+
* both of its own.
|
|
11624
|
+
*/
|
|
11625
|
+
recommended: boolean()
|
|
11626
|
+
});
|
|
11627
|
+
object({
|
|
11628
|
+
signals: array(StreamSignalSchema),
|
|
11629
|
+
lastFetchedAt: number()
|
|
11630
|
+
});
|
|
11631
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11566
11632
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11567
11633
|
var StreamFormatSchema = _enum([
|
|
11568
11634
|
"webrtc",
|
|
@@ -11959,6 +12025,22 @@ var EgressTranscodeSchema = object({
|
|
|
11959
12025
|
camStreamId: string().nullable()
|
|
11960
12026
|
});
|
|
11961
12027
|
method(object({
|
|
12028
|
+
deviceId: number().int().nonnegative(),
|
|
12029
|
+
/** The provider's signal code. */
|
|
12030
|
+
code: string().min(1),
|
|
12031
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12032
|
+
at: number().optional()
|
|
12033
|
+
}), object({
|
|
12034
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12035
|
+
accepted: boolean(),
|
|
12036
|
+
reason: _enum([
|
|
12037
|
+
"woke",
|
|
12038
|
+
"hold-extended",
|
|
12039
|
+
"not-enabled",
|
|
12040
|
+
"no-consumer",
|
|
12041
|
+
"unknown-code"
|
|
12042
|
+
])
|
|
12043
|
+
}), { kind: "mutation" }), method(object({
|
|
11962
12044
|
deviceId: number().int().nonnegative(),
|
|
11963
12045
|
camStreamId: string().min(1),
|
|
11964
12046
|
kind: CamStreamKindSchema,
|
|
@@ -12213,6 +12295,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12213
12295
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12214
12296
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12215
12297
|
minHeight: number().int().positive().optional(),
|
|
12298
|
+
/**
|
|
12299
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12300
|
+
*
|
|
12301
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12302
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12303
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12304
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12305
|
+
* gets born.
|
|
12306
|
+
*/
|
|
12307
|
+
maxHeight: number().int().positive().optional(),
|
|
12216
12308
|
/** Minimum horizontal resolution. */
|
|
12217
12309
|
minWidth: number().int().positive().optional(),
|
|
12218
12310
|
/**
|
|
@@ -12229,7 +12321,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12229
12321
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12230
12322
|
* codec end-to-end, there's nothing to optimise.
|
|
12231
12323
|
*/
|
|
12232
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12324
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12325
|
+
/**
|
|
12326
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12327
|
+
* understanding that it will be transcoded.
|
|
12328
|
+
*
|
|
12329
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12330
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12331
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12332
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12333
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12334
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12335
|
+
*
|
|
12336
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12337
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12338
|
+
*/
|
|
12339
|
+
allowTranscode: boolean().optional()
|
|
12233
12340
|
}).readonly();
|
|
12234
12341
|
var PickStreamPreferencesSchema = object({
|
|
12235
12342
|
/**
|
|
@@ -12243,12 +12350,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12243
12350
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12244
12351
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12245
12352
|
*/
|
|
12246
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12353
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12354
|
+
/**
|
|
12355
|
+
* The height the consumer actually wants to DELIVER.
|
|
12356
|
+
*
|
|
12357
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12358
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12359
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12360
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12361
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12362
|
+
*
|
|
12363
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12364
|
+
*/
|
|
12365
|
+
targetHeight: number().int().positive().optional()
|
|
12247
12366
|
}).readonly();
|
|
12248
12367
|
var PickedCamStreamSchema = object({
|
|
12249
12368
|
camStreamId: string(),
|
|
12250
12369
|
codec: string().optional(),
|
|
12251
12370
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12371
|
+
/**
|
|
12372
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12373
|
+
*
|
|
12374
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12375
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12376
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12377
|
+
*/
|
|
12378
|
+
transcodes: boolean(),
|
|
12252
12379
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12253
12380
|
reason: string()
|
|
12254
12381
|
});
|
|
@@ -16456,6 +16583,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16456
16583
|
"device-enabled",
|
|
16457
16584
|
"device-battery-low",
|
|
16458
16585
|
"device-battery-normal",
|
|
16586
|
+
"device-consumable-low",
|
|
16587
|
+
"device-consumable-normal",
|
|
16459
16588
|
"stream-online",
|
|
16460
16589
|
"stream-offline",
|
|
16461
16590
|
"node-online",
|
|
@@ -16474,6 +16603,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16474
16603
|
"addon-updated",
|
|
16475
16604
|
"server-updated",
|
|
16476
16605
|
"export-completed",
|
|
16606
|
+
"backup-completed",
|
|
16477
16607
|
"camera-online",
|
|
16478
16608
|
"camera-offline",
|
|
16479
16609
|
"camera-disabled",
|
|
@@ -23715,10 +23845,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23715
23845
|
}), boolean()), method(object({
|
|
23716
23846
|
deviceId: number().int().nonnegative(),
|
|
23717
23847
|
sessionId: string()
|
|
23718
|
-
}), object({
|
|
23719
|
-
|
|
23720
|
-
|
|
23721
|
-
|
|
23848
|
+
}), object({
|
|
23849
|
+
pendingRenegotiation: object({
|
|
23850
|
+
target: WebrtcStreamTargetSchema,
|
|
23851
|
+
epoch: number()
|
|
23852
|
+
}).nullable(),
|
|
23853
|
+
/**
|
|
23854
|
+
* Whether the session still EXISTS.
|
|
23855
|
+
*
|
|
23856
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
23857
|
+
* be able to ask, because a session does not always end the way it
|
|
23858
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
23859
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
23860
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
23861
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
23862
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
23863
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
23864
|
+
*
|
|
23865
|
+
* `false` for a session id the provider has never heard of, which is
|
|
23866
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
23867
|
+
*/
|
|
23868
|
+
alive: boolean()
|
|
23869
|
+
}));
|
|
23722
23870
|
object({
|
|
23723
23871
|
/** All accessory children of the parent. */
|
|
23724
23872
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -36222,6 +36370,12 @@ Object.freeze({
|
|
|
36222
36370
|
addonId: null,
|
|
36223
36371
|
access: "create"
|
|
36224
36372
|
},
|
|
36373
|
+
"streamBroker.reportStreamSignal": {
|
|
36374
|
+
capName: "stream-broker",
|
|
36375
|
+
capScope: "system",
|
|
36376
|
+
addonId: null,
|
|
36377
|
+
access: "create"
|
|
36378
|
+
},
|
|
36225
36379
|
"streamBroker.restartProfile": {
|
|
36226
36380
|
capName: "stream-broker",
|
|
36227
36381
|
capScope: "system",
|
|
@@ -36306,6 +36460,12 @@ Object.freeze({
|
|
|
36306
36460
|
addonId: null,
|
|
36307
36461
|
access: "create"
|
|
36308
36462
|
},
|
|
36463
|
+
"streamSignals.listSignals": {
|
|
36464
|
+
capName: "stream-signals",
|
|
36465
|
+
capScope: "device",
|
|
36466
|
+
addonId: null,
|
|
36467
|
+
access: "view"
|
|
36468
|
+
},
|
|
36309
36469
|
"switch.setState": {
|
|
36310
36470
|
capName: "switch",
|
|
36311
36471
|
capScope: "device",
|
|
@@ -38678,6 +38838,11 @@ Object.freeze({
|
|
|
38678
38838
|
form: "single",
|
|
38679
38839
|
optional: false
|
|
38680
38840
|
}],
|
|
38841
|
+
"streamBroker.reportStreamSignal": [{
|
|
38842
|
+
name: "deviceId",
|
|
38843
|
+
form: "single",
|
|
38844
|
+
optional: false
|
|
38845
|
+
}],
|
|
38681
38846
|
"streamBroker.restartProfile": [{
|
|
38682
38847
|
name: "deviceId",
|
|
38683
38848
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.102",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|