@camstack/addon-provider-petkit 0.2.101 → 0.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/addon.js +188 -8
- package/dist/addon.mjs +188 -8
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1101,7 +1101,7 @@ var Nodepetkit = class {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
1103
|
//#endregion
|
|
1104
|
-
//#region ../types/dist/event-category-
|
|
1104
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
1105
1105
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
1106
1106
|
EventCategory["SystemBoot"] = "system.boot";
|
|
1107
1107
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -1718,6 +1718,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1718
1718
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
1719
1719
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
1720
1720
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
1721
|
+
/**
|
|
1722
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
1723
|
+
*
|
|
1724
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
1725
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
1726
|
+
* destinations would be told three times. And a run where two of three
|
|
1727
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
1728
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
1729
|
+
* carried here and the message says both.
|
|
1730
|
+
*
|
|
1731
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
1732
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
1733
|
+
*/
|
|
1734
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
1721
1735
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
1722
1736
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
1723
1737
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -6448,7 +6462,7 @@ var ZodIssueCode = {
|
|
|
6448
6462
|
var ZodFirstPartyTypeKind;
|
|
6449
6463
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6450
6464
|
//#endregion
|
|
6451
|
-
//#region ../types/dist/sleep-
|
|
6465
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
6452
6466
|
/**
|
|
6453
6467
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6454
6468
|
* window to float samples (D455).
|
|
@@ -12592,6 +12606,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
12592
12606
|
auth: "admin"
|
|
12593
12607
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
12594
12608
|
DeviceType.Camera;
|
|
12609
|
+
/**
|
|
12610
|
+
* The signals a device can emit to WAKE its own stream.
|
|
12611
|
+
*
|
|
12612
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
12613
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
12614
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
12615
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
12616
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
12617
|
+
* itself, with no stream running.
|
|
12618
|
+
*
|
|
12619
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
12620
|
+
*
|
|
12621
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
12622
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
12623
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
12624
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
12625
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
12626
|
+
*
|
|
12627
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
12628
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
12629
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
12630
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
12631
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
12632
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
12633
|
+
* camera. Two questions, two authorities.
|
|
12634
|
+
*
|
|
12635
|
+
* ## Availability is not permission
|
|
12636
|
+
*
|
|
12637
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
12638
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
12639
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
12640
|
+
* provider declaring a signal is not a provider enabling it.
|
|
12641
|
+
*/
|
|
12642
|
+
/** One signal a device can emit. */
|
|
12643
|
+
var StreamSignalSchema = object({
|
|
12644
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
12645
|
+
code: string().min(1),
|
|
12646
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
12647
|
+
label: string().min(1),
|
|
12648
|
+
/**
|
|
12649
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
12650
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
12651
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
12652
|
+
* both of its own.
|
|
12653
|
+
*/
|
|
12654
|
+
recommended: boolean()
|
|
12655
|
+
});
|
|
12656
|
+
var StreamSignalsStatusSchema = object({
|
|
12657
|
+
signals: array(StreamSignalSchema),
|
|
12658
|
+
lastFetchedAt: number()
|
|
12659
|
+
});
|
|
12660
|
+
var streamSignalsCapability = {
|
|
12661
|
+
name: "stream-signals",
|
|
12662
|
+
scope: "device",
|
|
12663
|
+
deviceNative: true,
|
|
12664
|
+
mode: "singleton",
|
|
12665
|
+
deviceTypes: Object.values(DeviceType),
|
|
12666
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
12667
|
+
methods: {
|
|
12668
|
+
/**
|
|
12669
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
12670
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
12671
|
+
* broker's picker show nothing rather than a false choice.
|
|
12672
|
+
*/
|
|
12673
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
12674
|
+
};
|
|
12595
12675
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
12596
12676
|
var StreamFormatSchema = _enum([
|
|
12597
12677
|
"webrtc",
|
|
@@ -12988,6 +13068,22 @@ var EgressTranscodeSchema = object({
|
|
|
12988
13068
|
camStreamId: string().nullable()
|
|
12989
13069
|
});
|
|
12990
13070
|
method(object({
|
|
13071
|
+
deviceId: number().int().nonnegative(),
|
|
13072
|
+
/** The provider's signal code. */
|
|
13073
|
+
code: string().min(1),
|
|
13074
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
13075
|
+
at: number().optional()
|
|
13076
|
+
}), object({
|
|
13077
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
13078
|
+
accepted: boolean(),
|
|
13079
|
+
reason: _enum([
|
|
13080
|
+
"woke",
|
|
13081
|
+
"hold-extended",
|
|
13082
|
+
"not-enabled",
|
|
13083
|
+
"no-consumer",
|
|
13084
|
+
"unknown-code"
|
|
13085
|
+
])
|
|
13086
|
+
}), { kind: "mutation" }), method(object({
|
|
12991
13087
|
deviceId: number().int().nonnegative(),
|
|
12992
13088
|
camStreamId: string().min(1),
|
|
12993
13089
|
kind: CamStreamKindSchema,
|
|
@@ -13242,6 +13338,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
13242
13338
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
13243
13339
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
13244
13340
|
minHeight: number().int().positive().optional(),
|
|
13341
|
+
/**
|
|
13342
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
13343
|
+
*
|
|
13344
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
13345
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
13346
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
13347
|
+
* one caller implementing it privately is how a second scoring authority
|
|
13348
|
+
* gets born.
|
|
13349
|
+
*/
|
|
13350
|
+
maxHeight: number().int().positive().optional(),
|
|
13245
13351
|
/** Minimum horizontal resolution. */
|
|
13246
13352
|
minWidth: number().int().positive().optional(),
|
|
13247
13353
|
/**
|
|
@@ -13258,7 +13364,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
13258
13364
|
* transcoded" guard: if the device is already serving the consumer's
|
|
13259
13365
|
* codec end-to-end, there's nothing to optimise.
|
|
13260
13366
|
*/
|
|
13261
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
13367
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
13368
|
+
/**
|
|
13369
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
13370
|
+
* understanding that it will be transcoded.
|
|
13371
|
+
*
|
|
13372
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
13373
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
13374
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
13375
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
13376
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
13377
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
13378
|
+
*
|
|
13379
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
13380
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
13381
|
+
*/
|
|
13382
|
+
allowTranscode: boolean().optional()
|
|
13262
13383
|
}).readonly();
|
|
13263
13384
|
var PickStreamPreferencesSchema = object({
|
|
13264
13385
|
/**
|
|
@@ -13272,12 +13393,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
13272
13393
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
13273
13394
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
13274
13395
|
*/
|
|
13275
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
13396
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
13397
|
+
/**
|
|
13398
|
+
* The height the consumer actually wants to DELIVER.
|
|
13399
|
+
*
|
|
13400
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
13401
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
13402
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
13403
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
13404
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
13405
|
+
*
|
|
13406
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
13407
|
+
*/
|
|
13408
|
+
targetHeight: number().int().positive().optional()
|
|
13276
13409
|
}).readonly();
|
|
13277
13410
|
var PickedCamStreamSchema = object({
|
|
13278
13411
|
camStreamId: string(),
|
|
13279
13412
|
codec: string().optional(),
|
|
13280
13413
|
resolution: CamStreamResolutionSchema.optional(),
|
|
13414
|
+
/**
|
|
13415
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
13416
|
+
*
|
|
13417
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
13418
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
13419
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
13420
|
+
*/
|
|
13421
|
+
transcodes: boolean(),
|
|
13281
13422
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
13282
13423
|
reason: string()
|
|
13283
13424
|
});
|
|
@@ -17811,6 +17952,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17811
17952
|
"device-enabled",
|
|
17812
17953
|
"device-battery-low",
|
|
17813
17954
|
"device-battery-normal",
|
|
17955
|
+
"device-consumable-low",
|
|
17956
|
+
"device-consumable-normal",
|
|
17814
17957
|
"stream-online",
|
|
17815
17958
|
"stream-offline",
|
|
17816
17959
|
"node-online",
|
|
@@ -17829,6 +17972,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17829
17972
|
"addon-updated",
|
|
17830
17973
|
"server-updated",
|
|
17831
17974
|
"export-completed",
|
|
17975
|
+
"backup-completed",
|
|
17832
17976
|
"camera-online",
|
|
17833
17977
|
"camera-offline",
|
|
17834
17978
|
"camera-disabled",
|
|
@@ -25110,10 +25254,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
25110
25254
|
}), boolean()), method(object({
|
|
25111
25255
|
deviceId: number().int().nonnegative(),
|
|
25112
25256
|
sessionId: string()
|
|
25113
|
-
}), object({
|
|
25114
|
-
|
|
25115
|
-
|
|
25116
|
-
|
|
25257
|
+
}), object({
|
|
25258
|
+
pendingRenegotiation: object({
|
|
25259
|
+
target: WebrtcStreamTargetSchema,
|
|
25260
|
+
epoch: number()
|
|
25261
|
+
}).nullable(),
|
|
25262
|
+
/**
|
|
25263
|
+
* Whether the session still EXISTS.
|
|
25264
|
+
*
|
|
25265
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
25266
|
+
* be able to ask, because a session does not always end the way it
|
|
25267
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
25268
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
25269
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
25270
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
25271
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
25272
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
25273
|
+
*
|
|
25274
|
+
* `false` for a session id the provider has never heard of, which is
|
|
25275
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
25276
|
+
*/
|
|
25277
|
+
alive: boolean()
|
|
25278
|
+
}));
|
|
25117
25279
|
object({
|
|
25118
25280
|
/** All accessory children of the parent. */
|
|
25119
25281
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -35040,6 +35202,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
35040
35202
|
smoke: smokeCapability,
|
|
35041
35203
|
streamCatalog: streamCatalogCapability,
|
|
35042
35204
|
streamParams: streamParamsCapability,
|
|
35205
|
+
streamSignals: streamSignalsCapability,
|
|
35043
35206
|
switch: switchCapability,
|
|
35044
35207
|
tamper: tamperCapability,
|
|
35045
35208
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -41613,6 +41776,12 @@ Object.freeze({
|
|
|
41613
41776
|
addonId: null,
|
|
41614
41777
|
access: "create"
|
|
41615
41778
|
},
|
|
41779
|
+
"streamBroker.reportStreamSignal": {
|
|
41780
|
+
capName: "stream-broker",
|
|
41781
|
+
capScope: "system",
|
|
41782
|
+
addonId: null,
|
|
41783
|
+
access: "create"
|
|
41784
|
+
},
|
|
41616
41785
|
"streamBroker.restartProfile": {
|
|
41617
41786
|
capName: "stream-broker",
|
|
41618
41787
|
capScope: "system",
|
|
@@ -41697,6 +41866,12 @@ Object.freeze({
|
|
|
41697
41866
|
addonId: null,
|
|
41698
41867
|
access: "create"
|
|
41699
41868
|
},
|
|
41869
|
+
"streamSignals.listSignals": {
|
|
41870
|
+
capName: "stream-signals",
|
|
41871
|
+
capScope: "device",
|
|
41872
|
+
addonId: null,
|
|
41873
|
+
access: "view"
|
|
41874
|
+
},
|
|
41700
41875
|
"switch.setState": {
|
|
41701
41876
|
capName: "switch",
|
|
41702
41877
|
capScope: "device",
|
|
@@ -44069,6 +44244,11 @@ Object.freeze({
|
|
|
44069
44244
|
form: "single",
|
|
44070
44245
|
optional: false
|
|
44071
44246
|
}],
|
|
44247
|
+
"streamBroker.reportStreamSignal": [{
|
|
44248
|
+
name: "deviceId",
|
|
44249
|
+
form: "single",
|
|
44250
|
+
optional: false
|
|
44251
|
+
}],
|
|
44072
44252
|
"streamBroker.restartProfile": [{
|
|
44073
44253
|
name: "deviceId",
|
|
44074
44254
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -1100,7 +1100,7 @@ var Nodepetkit = class {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
};
|
|
1102
1102
|
//#endregion
|
|
1103
|
-
//#region ../types/dist/event-category-
|
|
1103
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
1104
1104
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
1105
1105
|
EventCategory["SystemBoot"] = "system.boot";
|
|
1106
1106
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -1717,6 +1717,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1717
1717
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
1718
1718
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
1719
1719
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
1720
|
+
/**
|
|
1721
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
1722
|
+
*
|
|
1723
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
1724
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
1725
|
+
* destinations would be told three times. And a run where two of three
|
|
1726
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
1727
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
1728
|
+
* carried here and the message says both.
|
|
1729
|
+
*
|
|
1730
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
1731
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
1732
|
+
*/
|
|
1733
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
1720
1734
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
1721
1735
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
1722
1736
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -6447,7 +6461,7 @@ var ZodIssueCode = {
|
|
|
6447
6461
|
var ZodFirstPartyTypeKind;
|
|
6448
6462
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6449
6463
|
//#endregion
|
|
6450
|
-
//#region ../types/dist/sleep-
|
|
6464
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
6451
6465
|
/**
|
|
6452
6466
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6453
6467
|
* window to float samples (D455).
|
|
@@ -12591,6 +12605,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
12591
12605
|
auth: "admin"
|
|
12592
12606
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
12593
12607
|
DeviceType.Camera;
|
|
12608
|
+
/**
|
|
12609
|
+
* The signals a device can emit to WAKE its own stream.
|
|
12610
|
+
*
|
|
12611
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
12612
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
12613
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
12614
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
12615
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
12616
|
+
* itself, with no stream running.
|
|
12617
|
+
*
|
|
12618
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
12619
|
+
*
|
|
12620
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
12621
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
12622
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
12623
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
12624
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
12625
|
+
*
|
|
12626
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
12627
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
12628
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
12629
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
12630
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
12631
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
12632
|
+
* camera. Two questions, two authorities.
|
|
12633
|
+
*
|
|
12634
|
+
* ## Availability is not permission
|
|
12635
|
+
*
|
|
12636
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
12637
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
12638
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
12639
|
+
* provider declaring a signal is not a provider enabling it.
|
|
12640
|
+
*/
|
|
12641
|
+
/** One signal a device can emit. */
|
|
12642
|
+
var StreamSignalSchema = object({
|
|
12643
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
12644
|
+
code: string().min(1),
|
|
12645
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
12646
|
+
label: string().min(1),
|
|
12647
|
+
/**
|
|
12648
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
12649
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
12650
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
12651
|
+
* both of its own.
|
|
12652
|
+
*/
|
|
12653
|
+
recommended: boolean()
|
|
12654
|
+
});
|
|
12655
|
+
var StreamSignalsStatusSchema = object({
|
|
12656
|
+
signals: array(StreamSignalSchema),
|
|
12657
|
+
lastFetchedAt: number()
|
|
12658
|
+
});
|
|
12659
|
+
var streamSignalsCapability = {
|
|
12660
|
+
name: "stream-signals",
|
|
12661
|
+
scope: "device",
|
|
12662
|
+
deviceNative: true,
|
|
12663
|
+
mode: "singleton",
|
|
12664
|
+
deviceTypes: Object.values(DeviceType),
|
|
12665
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
12666
|
+
methods: {
|
|
12667
|
+
/**
|
|
12668
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
12669
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
12670
|
+
* broker's picker show nothing rather than a false choice.
|
|
12671
|
+
*/
|
|
12672
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
12673
|
+
};
|
|
12594
12674
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
12595
12675
|
var StreamFormatSchema = _enum([
|
|
12596
12676
|
"webrtc",
|
|
@@ -12987,6 +13067,22 @@ var EgressTranscodeSchema = object({
|
|
|
12987
13067
|
camStreamId: string().nullable()
|
|
12988
13068
|
});
|
|
12989
13069
|
method(object({
|
|
13070
|
+
deviceId: number().int().nonnegative(),
|
|
13071
|
+
/** The provider's signal code. */
|
|
13072
|
+
code: string().min(1),
|
|
13073
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
13074
|
+
at: number().optional()
|
|
13075
|
+
}), object({
|
|
13076
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
13077
|
+
accepted: boolean(),
|
|
13078
|
+
reason: _enum([
|
|
13079
|
+
"woke",
|
|
13080
|
+
"hold-extended",
|
|
13081
|
+
"not-enabled",
|
|
13082
|
+
"no-consumer",
|
|
13083
|
+
"unknown-code"
|
|
13084
|
+
])
|
|
13085
|
+
}), { kind: "mutation" }), method(object({
|
|
12990
13086
|
deviceId: number().int().nonnegative(),
|
|
12991
13087
|
camStreamId: string().min(1),
|
|
12992
13088
|
kind: CamStreamKindSchema,
|
|
@@ -13241,6 +13337,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
13241
13337
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
13242
13338
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
13243
13339
|
minHeight: number().int().positive().optional(),
|
|
13340
|
+
/**
|
|
13341
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
13342
|
+
*
|
|
13343
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
13344
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
13345
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
13346
|
+
* one caller implementing it privately is how a second scoring authority
|
|
13347
|
+
* gets born.
|
|
13348
|
+
*/
|
|
13349
|
+
maxHeight: number().int().positive().optional(),
|
|
13244
13350
|
/** Minimum horizontal resolution. */
|
|
13245
13351
|
minWidth: number().int().positive().optional(),
|
|
13246
13352
|
/**
|
|
@@ -13257,7 +13363,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
13257
13363
|
* transcoded" guard: if the device is already serving the consumer's
|
|
13258
13364
|
* codec end-to-end, there's nothing to optimise.
|
|
13259
13365
|
*/
|
|
13260
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
13366
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
13367
|
+
/**
|
|
13368
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
13369
|
+
* understanding that it will be transcoded.
|
|
13370
|
+
*
|
|
13371
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
13372
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
13373
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
13374
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
13375
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
13376
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
13377
|
+
*
|
|
13378
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
13379
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
13380
|
+
*/
|
|
13381
|
+
allowTranscode: boolean().optional()
|
|
13261
13382
|
}).readonly();
|
|
13262
13383
|
var PickStreamPreferencesSchema = object({
|
|
13263
13384
|
/**
|
|
@@ -13271,12 +13392,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
13271
13392
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
13272
13393
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
13273
13394
|
*/
|
|
13274
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
13395
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
13396
|
+
/**
|
|
13397
|
+
* The height the consumer actually wants to DELIVER.
|
|
13398
|
+
*
|
|
13399
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
13400
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
13401
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
13402
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
13403
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
13404
|
+
*
|
|
13405
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
13406
|
+
*/
|
|
13407
|
+
targetHeight: number().int().positive().optional()
|
|
13275
13408
|
}).readonly();
|
|
13276
13409
|
var PickedCamStreamSchema = object({
|
|
13277
13410
|
camStreamId: string(),
|
|
13278
13411
|
codec: string().optional(),
|
|
13279
13412
|
resolution: CamStreamResolutionSchema.optional(),
|
|
13413
|
+
/**
|
|
13414
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
13415
|
+
*
|
|
13416
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
13417
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
13418
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
13419
|
+
*/
|
|
13420
|
+
transcodes: boolean(),
|
|
13280
13421
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
13281
13422
|
reason: string()
|
|
13282
13423
|
});
|
|
@@ -17810,6 +17951,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17810
17951
|
"device-enabled",
|
|
17811
17952
|
"device-battery-low",
|
|
17812
17953
|
"device-battery-normal",
|
|
17954
|
+
"device-consumable-low",
|
|
17955
|
+
"device-consumable-normal",
|
|
17813
17956
|
"stream-online",
|
|
17814
17957
|
"stream-offline",
|
|
17815
17958
|
"node-online",
|
|
@@ -17828,6 +17971,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17828
17971
|
"addon-updated",
|
|
17829
17972
|
"server-updated",
|
|
17830
17973
|
"export-completed",
|
|
17974
|
+
"backup-completed",
|
|
17831
17975
|
"camera-online",
|
|
17832
17976
|
"camera-offline",
|
|
17833
17977
|
"camera-disabled",
|
|
@@ -25109,10 +25253,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
25109
25253
|
}), boolean()), method(object({
|
|
25110
25254
|
deviceId: number().int().nonnegative(),
|
|
25111
25255
|
sessionId: string()
|
|
25112
|
-
}), object({
|
|
25113
|
-
|
|
25114
|
-
|
|
25115
|
-
|
|
25256
|
+
}), object({
|
|
25257
|
+
pendingRenegotiation: object({
|
|
25258
|
+
target: WebrtcStreamTargetSchema,
|
|
25259
|
+
epoch: number()
|
|
25260
|
+
}).nullable(),
|
|
25261
|
+
/**
|
|
25262
|
+
* Whether the session still EXISTS.
|
|
25263
|
+
*
|
|
25264
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
25265
|
+
* be able to ask, because a session does not always end the way it
|
|
25266
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
25267
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
25268
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
25269
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
25270
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
25271
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
25272
|
+
*
|
|
25273
|
+
* `false` for a session id the provider has never heard of, which is
|
|
25274
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
25275
|
+
*/
|
|
25276
|
+
alive: boolean()
|
|
25277
|
+
}));
|
|
25116
25278
|
object({
|
|
25117
25279
|
/** All accessory children of the parent. */
|
|
25118
25280
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -35039,6 +35201,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
35039
35201
|
smoke: smokeCapability,
|
|
35040
35202
|
streamCatalog: streamCatalogCapability,
|
|
35041
35203
|
streamParams: streamParamsCapability,
|
|
35204
|
+
streamSignals: streamSignalsCapability,
|
|
35042
35205
|
switch: switchCapability,
|
|
35043
35206
|
tamper: tamperCapability,
|
|
35044
35207
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -41612,6 +41775,12 @@ Object.freeze({
|
|
|
41612
41775
|
addonId: null,
|
|
41613
41776
|
access: "create"
|
|
41614
41777
|
},
|
|
41778
|
+
"streamBroker.reportStreamSignal": {
|
|
41779
|
+
capName: "stream-broker",
|
|
41780
|
+
capScope: "system",
|
|
41781
|
+
addonId: null,
|
|
41782
|
+
access: "create"
|
|
41783
|
+
},
|
|
41615
41784
|
"streamBroker.restartProfile": {
|
|
41616
41785
|
capName: "stream-broker",
|
|
41617
41786
|
capScope: "system",
|
|
@@ -41696,6 +41865,12 @@ Object.freeze({
|
|
|
41696
41865
|
addonId: null,
|
|
41697
41866
|
access: "create"
|
|
41698
41867
|
},
|
|
41868
|
+
"streamSignals.listSignals": {
|
|
41869
|
+
capName: "stream-signals",
|
|
41870
|
+
capScope: "device",
|
|
41871
|
+
addonId: null,
|
|
41872
|
+
access: "view"
|
|
41873
|
+
},
|
|
41699
41874
|
"switch.setState": {
|
|
41700
41875
|
capName: "switch",
|
|
41701
41876
|
capScope: "device",
|
|
@@ -44068,6 +44243,11 @@ Object.freeze({
|
|
|
44068
44243
|
form: "single",
|
|
44069
44244
|
optional: false
|
|
44070
44245
|
}],
|
|
44246
|
+
"streamBroker.reportStreamSignal": [{
|
|
44247
|
+
name: "deviceId",
|
|
44248
|
+
form: "single",
|
|
44249
|
+
optional: false
|
|
44250
|
+
}],
|
|
44071
44251
|
"streamBroker.restartProfile": [{
|
|
44072
44252
|
name: "deviceId",
|
|
44073
44253
|
form: "single",
|
package/package.json
CHANGED