@camstack/addon-provider-wyze 0.2.105 → 0.2.106

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 CHANGED
@@ -31,7 +31,7 @@ let net = require("net");
31
31
  net = __toESM(net, 1);
32
32
  let node_child_process = require("node:child_process");
33
33
  let node_tls = require("node:tls");
34
- //#region ../types/dist/event-category-ZyX6jcse.mjs
34
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
35
35
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
36
36
  EventCategory["SystemBoot"] = "system.boot";
37
37
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -648,6 +648,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
648
648
  * pull-reconcile from the provider's `getStatus` on reconnect. */
649
649
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
650
650
  EventCategory["BackupCompleted"] = "backup.completed";
651
+ /**
652
+ * A whole backup RUN finished — every destination attempted, win or lose.
653
+ *
654
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
655
+ * a progress UI and the wrong one for a notification: an operator with three
656
+ * destinations would be told three times. And a run where two of three
657
+ * destinations succeeded is not a clean success — a single "backup
658
+ * completed" that hid the failed one would be a lie, so the count of each is
659
+ * carried here and the message says both.
660
+ *
661
+ * Emitted by the backup orchestrator only after the destination loop, so a
662
+ * run that dies during the BUILD phase produces no completion at all.
663
+ */
664
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
651
665
  EventCategory["BackupRestored"] = "backup.restored";
652
666
  EventCategory["NotificationDispatched"] = "notification.dispatched";
653
667
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5378,7 +5392,7 @@ var ZodIssueCode = {
5378
5392
  var ZodFirstPartyTypeKind;
5379
5393
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5380
5394
  //#endregion
5381
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5395
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5382
5396
  /**
5383
5397
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5384
5398
  * window to float samples (D455).
@@ -11522,6 +11536,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11522
11536
  auth: "admin"
11523
11537
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11524
11538
  DeviceType.Camera;
11539
+ /**
11540
+ * The signals a device can emit to WAKE its own stream.
11541
+ *
11542
+ * A camera whose stream is built on demand sleeps until something asks for it,
11543
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11544
+ * puller holds a session open for ever, and treating that as demand would keep
11545
+ * a battery camera awake for ever, which is the whole thing the battery is for
11546
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11547
+ * itself, with no stream running.
11548
+ *
11549
+ * ## The vocabulary is the PROVIDER'S, not ours
11550
+ *
11551
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11552
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11553
+ * Reolink offers motion and camera-native detection; another provider may offer
11554
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11555
+ * yet. A fixed enum here would mean every new signal is a framework release.
11556
+ *
11557
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11558
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11559
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11560
+ * binding — but both answer "what drives the detection pipeline", which is a
11561
+ * different question from "what may wake a sleeping stream". A camera can do
11562
+ * the first and not be trusted with the second, and the operator picks per
11563
+ * camera. Two questions, two authorities.
11564
+ *
11565
+ * ## Availability is not permission
11566
+ *
11567
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11568
+ * wakes the stream is the operator's per-camera choice, held by the broker
11569
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11570
+ * provider declaring a signal is not a provider enabling it.
11571
+ */
11572
+ /** One signal a device can emit. */
11573
+ var StreamSignalSchema = object({
11574
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11575
+ code: string().min(1),
11576
+ /** What an operator reads in the picker. The provider's own wording. */
11577
+ label: string().min(1),
11578
+ /**
11579
+ * Whether the provider recommends this signal ON when a camera is first set
11580
+ * up. A provider knows which of its signals are cheap and reliable; an
11581
+ * operator should not have to discover that by trial. Reolink recommends
11582
+ * both of its own.
11583
+ */
11584
+ recommended: boolean()
11585
+ });
11586
+ var StreamSignalsStatusSchema = object({
11587
+ signals: array(StreamSignalSchema),
11588
+ lastFetchedAt: number()
11589
+ });
11590
+ var streamSignalsCapability = {
11591
+ name: "stream-signals",
11592
+ scope: "device",
11593
+ deviceNative: true,
11594
+ mode: "singleton",
11595
+ deviceTypes: Object.values(DeviceType),
11596
+ runtimeState: StreamSignalsStatusSchema,
11597
+ methods: {
11598
+ /**
11599
+ * What this device can emit. Empty is a valid and common answer — most
11600
+ * cameras have nothing to offer here, and an empty list is what makes the
11601
+ * broker's picker show nothing rather than a false choice.
11602
+ */
11603
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11604
+ };
11525
11605
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11526
11606
  var StreamFormatSchema = _enum([
11527
11607
  "webrtc",
@@ -11918,6 +11998,22 @@ var EgressTranscodeSchema = object({
11918
11998
  camStreamId: string().nullable()
11919
11999
  });
11920
12000
  method(object({
12001
+ deviceId: number().int().nonnegative(),
12002
+ /** The provider's signal code. */
12003
+ code: string().min(1),
12004
+ /** Ms epoch. Absent ⇒ now. */
12005
+ at: number().optional()
12006
+ }), object({
12007
+ /** Whether the broker acted on it, and if not, why. */
12008
+ accepted: boolean(),
12009
+ reason: _enum([
12010
+ "woke",
12011
+ "hold-extended",
12012
+ "not-enabled",
12013
+ "no-consumer",
12014
+ "unknown-code"
12015
+ ])
12016
+ }), { kind: "mutation" }), method(object({
11921
12017
  deviceId: number().int().nonnegative(),
11922
12018
  camStreamId: string().min(1),
11923
12019
  kind: CamStreamKindSchema,
@@ -12172,6 +12268,16 @@ var PickStreamRequirementsSchema = object({
12172
12268
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12173
12269
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12174
12270
  minHeight: number().int().positive().optional(),
12271
+ /**
12272
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12273
+ *
12274
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12275
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12276
+ * Without this the ceiling had to be re-implemented by every caller — and
12277
+ * one caller implementing it privately is how a second scoring authority
12278
+ * gets born.
12279
+ */
12280
+ maxHeight: number().int().positive().optional(),
12175
12281
  /** Minimum horizontal resolution. */
12176
12282
  minWidth: number().int().positive().optional(),
12177
12283
  /**
@@ -12188,7 +12294,22 @@ var PickStreamRequirementsSchema = object({
12188
12294
  * transcoded" guard: if the device is already serving the consumer's
12189
12295
  * codec end-to-end, there's nothing to optimise.
12190
12296
  */
12191
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12297
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12298
+ /**
12299
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12300
+ * understanding that it will be transcoded.
12301
+ *
12302
+ * Default `false` — today's behaviour, and the right one for a bypass
12303
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12304
+ * ask the larger question: "what is the best stream for me, transcoding if
12305
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12306
+ * does not, so a passthrough is never lost to a transcode; the answer says
12307
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12308
+ *
12309
+ * This is what lets one picker serve both the bypass and the full source
12310
+ * choice, instead of a consumer scoring privately when the bypass misses.
12311
+ */
12312
+ allowTranscode: boolean().optional()
12192
12313
  }).readonly();
12193
12314
  var PickStreamPreferencesSchema = object({
12194
12315
  /**
@@ -12202,12 +12323,32 @@ var PickStreamPreferencesSchema = object({
12202
12323
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12203
12324
  * memory-constrained consumers / Apple Home guest sessions).
12204
12325
  */
12205
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12326
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12327
+ /**
12328
+ * The height the consumer actually wants to DELIVER.
12329
+ *
12330
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12331
+ * above the target wins, and only if nothing reaches it does the tallest
12332
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12333
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12334
+ * express that: it says "as big as possible", which is a different wish.
12335
+ *
12336
+ * Ignored when absent, so every existing caller keeps its ordering.
12337
+ */
12338
+ targetHeight: number().int().positive().optional()
12206
12339
  }).readonly();
12207
12340
  var PickedCamStreamSchema = object({
12208
12341
  camStreamId: string(),
12209
12342
  codec: string().optional(),
12210
12343
  resolution: CamStreamResolutionSchema.optional(),
12344
+ /**
12345
+ * Whether serving this stream requires a decode + re-encode.
12346
+ *
12347
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12348
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12349
+ * not ask cannot be handed a cost it never agreed to pay.
12350
+ */
12351
+ transcodes: boolean(),
12211
12352
  /** One-line explanation of why this stream won — for logs / debug UI. */
12212
12353
  reason: string()
12213
12354
  });
@@ -16741,6 +16882,8 @@ var NcSystemEventKindSchema = _enum([
16741
16882
  "device-enabled",
16742
16883
  "device-battery-low",
16743
16884
  "device-battery-normal",
16885
+ "device-consumable-low",
16886
+ "device-consumable-normal",
16744
16887
  "stream-online",
16745
16888
  "stream-offline",
16746
16889
  "node-online",
@@ -16759,6 +16902,7 @@ var NcSystemEventKindSchema = _enum([
16759
16902
  "addon-updated",
16760
16903
  "server-updated",
16761
16904
  "export-completed",
16905
+ "backup-completed",
16762
16906
  "camera-online",
16763
16907
  "camera-offline",
16764
16908
  "camera-disabled",
@@ -24144,10 +24288,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24144
24288
  }), boolean()), method(object({
24145
24289
  deviceId: number().int().nonnegative(),
24146
24290
  sessionId: string()
24147
- }), object({ pendingRenegotiation: object({
24148
- target: WebrtcStreamTargetSchema,
24149
- epoch: number()
24150
- }).nullable() }));
24291
+ }), object({
24292
+ pendingRenegotiation: object({
24293
+ target: WebrtcStreamTargetSchema,
24294
+ epoch: number()
24295
+ }).nullable(),
24296
+ /**
24297
+ * Whether the session still EXISTS.
24298
+ *
24299
+ * A consumer that holds a resource for the life of a session needs to
24300
+ * be able to ask, because a session does not always end the way it
24301
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24302
+ * sent `SessionDisconnected`, so the Alexa exporter's
24303
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24304
+ * H.264 transcode kept running for NOBODY for more than twenty
24305
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24306
+ * minutes earlier — the broker knew; the holder had no way to ask.
24307
+ *
24308
+ * `false` for a session id the provider has never heard of, which is
24309
+ * the same answer as "it ended": either way nothing is holding it up.
24310
+ */
24311
+ alive: boolean()
24312
+ }));
24151
24313
  object({
24152
24314
  /** All accessory children of the parent. */
24153
24315
  childDeviceIds: array(number()).readonly(),
@@ -34074,6 +34236,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
34074
34236
  smoke: smokeCapability,
34075
34237
  streamCatalog: streamCatalogCapability,
34076
34238
  streamParams: streamParamsCapability,
34239
+ streamSignals: streamSignalsCapability,
34077
34240
  switch: switchCapability,
34078
34241
  tamper: tamperCapability,
34079
34242
  temperatureSensor: temperatureSensorCapability,
@@ -40647,6 +40810,12 @@ Object.freeze({
40647
40810
  addonId: null,
40648
40811
  access: "create"
40649
40812
  },
40813
+ "streamBroker.reportStreamSignal": {
40814
+ capName: "stream-broker",
40815
+ capScope: "system",
40816
+ addonId: null,
40817
+ access: "create"
40818
+ },
40650
40819
  "streamBroker.restartProfile": {
40651
40820
  capName: "stream-broker",
40652
40821
  capScope: "system",
@@ -40731,6 +40900,12 @@ Object.freeze({
40731
40900
  addonId: null,
40732
40901
  access: "create"
40733
40902
  },
40903
+ "streamSignals.listSignals": {
40904
+ capName: "stream-signals",
40905
+ capScope: "device",
40906
+ addonId: null,
40907
+ access: "view"
40908
+ },
40734
40909
  "switch.setState": {
40735
40910
  capName: "switch",
40736
40911
  capScope: "device",
@@ -43103,6 +43278,11 @@ Object.freeze({
43103
43278
  form: "single",
43104
43279
  optional: false
43105
43280
  }],
43281
+ "streamBroker.reportStreamSignal": [{
43282
+ name: "deviceId",
43283
+ form: "single",
43284
+ optional: false
43285
+ }],
43106
43286
  "streamBroker.restartProfile": [{
43107
43287
  name: "deviceId",
43108
43288
  form: "single",
package/dist/addon.mjs CHANGED
@@ -10,7 +10,7 @@ import { getCACertificates, setDefaultCACertificates } from "node:tls";
10
10
  //#region \0rolldown/runtime.js
11
11
  var __require$1 = /* @__PURE__ */ createRequire(import.meta.url);
12
12
  //#endregion
13
- //#region ../types/dist/event-category-ZyX6jcse.mjs
13
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
14
14
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
15
15
  EventCategory["SystemBoot"] = "system.boot";
16
16
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -627,6 +627,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
627
627
  * pull-reconcile from the provider's `getStatus` on reconnect. */
628
628
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
629
629
  EventCategory["BackupCompleted"] = "backup.completed";
630
+ /**
631
+ * A whole backup RUN finished — every destination attempted, win or lose.
632
+ *
633
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
634
+ * a progress UI and the wrong one for a notification: an operator with three
635
+ * destinations would be told three times. And a run where two of three
636
+ * destinations succeeded is not a clean success — a single "backup
637
+ * completed" that hid the failed one would be a lie, so the count of each is
638
+ * carried here and the message says both.
639
+ *
640
+ * Emitted by the backup orchestrator only after the destination loop, so a
641
+ * run that dies during the BUILD phase produces no completion at all.
642
+ */
643
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
630
644
  EventCategory["BackupRestored"] = "backup.restored";
631
645
  EventCategory["NotificationDispatched"] = "notification.dispatched";
632
646
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5357,7 +5371,7 @@ var ZodIssueCode = {
5357
5371
  var ZodFirstPartyTypeKind;
5358
5372
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5359
5373
  //#endregion
5360
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5374
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5361
5375
  /**
5362
5376
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5363
5377
  * window to float samples (D455).
@@ -11501,6 +11515,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11501
11515
  auth: "admin"
11502
11516
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11503
11517
  DeviceType.Camera;
11518
+ /**
11519
+ * The signals a device can emit to WAKE its own stream.
11520
+ *
11521
+ * A camera whose stream is built on demand sleeps until something asks for it,
11522
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11523
+ * puller holds a session open for ever, and treating that as demand would keep
11524
+ * a battery camera awake for ever, which is the whole thing the battery is for
11525
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11526
+ * itself, with no stream running.
11527
+ *
11528
+ * ## The vocabulary is the PROVIDER'S, not ours
11529
+ *
11530
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11531
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11532
+ * Reolink offers motion and camera-native detection; another provider may offer
11533
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11534
+ * yet. A fixed enum here would mean every new signal is a framework release.
11535
+ *
11536
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11537
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11538
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11539
+ * binding — but both answer "what drives the detection pipeline", which is a
11540
+ * different question from "what may wake a sleeping stream". A camera can do
11541
+ * the first and not be trusted with the second, and the operator picks per
11542
+ * camera. Two questions, two authorities.
11543
+ *
11544
+ * ## Availability is not permission
11545
+ *
11546
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11547
+ * wakes the stream is the operator's per-camera choice, held by the broker
11548
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11549
+ * provider declaring a signal is not a provider enabling it.
11550
+ */
11551
+ /** One signal a device can emit. */
11552
+ var StreamSignalSchema = object({
11553
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11554
+ code: string().min(1),
11555
+ /** What an operator reads in the picker. The provider's own wording. */
11556
+ label: string().min(1),
11557
+ /**
11558
+ * Whether the provider recommends this signal ON when a camera is first set
11559
+ * up. A provider knows which of its signals are cheap and reliable; an
11560
+ * operator should not have to discover that by trial. Reolink recommends
11561
+ * both of its own.
11562
+ */
11563
+ recommended: boolean()
11564
+ });
11565
+ var StreamSignalsStatusSchema = object({
11566
+ signals: array(StreamSignalSchema),
11567
+ lastFetchedAt: number()
11568
+ });
11569
+ var streamSignalsCapability = {
11570
+ name: "stream-signals",
11571
+ scope: "device",
11572
+ deviceNative: true,
11573
+ mode: "singleton",
11574
+ deviceTypes: Object.values(DeviceType),
11575
+ runtimeState: StreamSignalsStatusSchema,
11576
+ methods: {
11577
+ /**
11578
+ * What this device can emit. Empty is a valid and common answer — most
11579
+ * cameras have nothing to offer here, and an empty list is what makes the
11580
+ * broker's picker show nothing rather than a false choice.
11581
+ */
11582
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11583
+ };
11504
11584
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11505
11585
  var StreamFormatSchema = _enum([
11506
11586
  "webrtc",
@@ -11897,6 +11977,22 @@ var EgressTranscodeSchema = object({
11897
11977
  camStreamId: string().nullable()
11898
11978
  });
11899
11979
  method(object({
11980
+ deviceId: number().int().nonnegative(),
11981
+ /** The provider's signal code. */
11982
+ code: string().min(1),
11983
+ /** Ms epoch. Absent ⇒ now. */
11984
+ at: number().optional()
11985
+ }), object({
11986
+ /** Whether the broker acted on it, and if not, why. */
11987
+ accepted: boolean(),
11988
+ reason: _enum([
11989
+ "woke",
11990
+ "hold-extended",
11991
+ "not-enabled",
11992
+ "no-consumer",
11993
+ "unknown-code"
11994
+ ])
11995
+ }), { kind: "mutation" }), method(object({
11900
11996
  deviceId: number().int().nonnegative(),
11901
11997
  camStreamId: string().min(1),
11902
11998
  kind: CamStreamKindSchema,
@@ -12151,6 +12247,16 @@ var PickStreamRequirementsSchema = object({
12151
12247
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12152
12248
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12153
12249
  minHeight: number().int().positive().optional(),
12250
+ /**
12251
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12252
+ *
12253
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12254
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12255
+ * Without this the ceiling had to be re-implemented by every caller — and
12256
+ * one caller implementing it privately is how a second scoring authority
12257
+ * gets born.
12258
+ */
12259
+ maxHeight: number().int().positive().optional(),
12154
12260
  /** Minimum horizontal resolution. */
12155
12261
  minWidth: number().int().positive().optional(),
12156
12262
  /**
@@ -12167,7 +12273,22 @@ var PickStreamRequirementsSchema = object({
12167
12273
  * transcoded" guard: if the device is already serving the consumer's
12168
12274
  * codec end-to-end, there's nothing to optimise.
12169
12275
  */
12170
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12276
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12277
+ /**
12278
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12279
+ * understanding that it will be transcoded.
12280
+ *
12281
+ * Default `false` — today's behaviour, and the right one for a bypass
12282
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12283
+ * ask the larger question: "what is the best stream for me, transcoding if
12284
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12285
+ * does not, so a passthrough is never lost to a transcode; the answer says
12286
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12287
+ *
12288
+ * This is what lets one picker serve both the bypass and the full source
12289
+ * choice, instead of a consumer scoring privately when the bypass misses.
12290
+ */
12291
+ allowTranscode: boolean().optional()
12171
12292
  }).readonly();
12172
12293
  var PickStreamPreferencesSchema = object({
12173
12294
  /**
@@ -12181,12 +12302,32 @@ var PickStreamPreferencesSchema = object({
12181
12302
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12182
12303
  * memory-constrained consumers / Apple Home guest sessions).
12183
12304
  */
12184
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12305
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12306
+ /**
12307
+ * The height the consumer actually wants to DELIVER.
12308
+ *
12309
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12310
+ * above the target wins, and only if nothing reaches it does the tallest
12311
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12312
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12313
+ * express that: it says "as big as possible", which is a different wish.
12314
+ *
12315
+ * Ignored when absent, so every existing caller keeps its ordering.
12316
+ */
12317
+ targetHeight: number().int().positive().optional()
12185
12318
  }).readonly();
12186
12319
  var PickedCamStreamSchema = object({
12187
12320
  camStreamId: string(),
12188
12321
  codec: string().optional(),
12189
12322
  resolution: CamStreamResolutionSchema.optional(),
12323
+ /**
12324
+ * Whether serving this stream requires a decode + re-encode.
12325
+ *
12326
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12327
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12328
+ * not ask cannot be handed a cost it never agreed to pay.
12329
+ */
12330
+ transcodes: boolean(),
12190
12331
  /** One-line explanation of why this stream won — for logs / debug UI. */
12191
12332
  reason: string()
12192
12333
  });
@@ -16720,6 +16861,8 @@ var NcSystemEventKindSchema = _enum([
16720
16861
  "device-enabled",
16721
16862
  "device-battery-low",
16722
16863
  "device-battery-normal",
16864
+ "device-consumable-low",
16865
+ "device-consumable-normal",
16723
16866
  "stream-online",
16724
16867
  "stream-offline",
16725
16868
  "node-online",
@@ -16738,6 +16881,7 @@ var NcSystemEventKindSchema = _enum([
16738
16881
  "addon-updated",
16739
16882
  "server-updated",
16740
16883
  "export-completed",
16884
+ "backup-completed",
16741
16885
  "camera-online",
16742
16886
  "camera-offline",
16743
16887
  "camera-disabled",
@@ -24123,10 +24267,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24123
24267
  }), boolean()), method(object({
24124
24268
  deviceId: number().int().nonnegative(),
24125
24269
  sessionId: string()
24126
- }), object({ pendingRenegotiation: object({
24127
- target: WebrtcStreamTargetSchema,
24128
- epoch: number()
24129
- }).nullable() }));
24270
+ }), object({
24271
+ pendingRenegotiation: object({
24272
+ target: WebrtcStreamTargetSchema,
24273
+ epoch: number()
24274
+ }).nullable(),
24275
+ /**
24276
+ * Whether the session still EXISTS.
24277
+ *
24278
+ * A consumer that holds a resource for the life of a session needs to
24279
+ * be able to ask, because a session does not always end the way it
24280
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24281
+ * sent `SessionDisconnected`, so the Alexa exporter's
24282
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24283
+ * H.264 transcode kept running for NOBODY for more than twenty
24284
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24285
+ * minutes earlier — the broker knew; the holder had no way to ask.
24286
+ *
24287
+ * `false` for a session id the provider has never heard of, which is
24288
+ * the same answer as "it ended": either way nothing is holding it up.
24289
+ */
24290
+ alive: boolean()
24291
+ }));
24130
24292
  object({
24131
24293
  /** All accessory children of the parent. */
24132
24294
  childDeviceIds: array(number()).readonly(),
@@ -34053,6 +34215,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
34053
34215
  smoke: smokeCapability,
34054
34216
  streamCatalog: streamCatalogCapability,
34055
34217
  streamParams: streamParamsCapability,
34218
+ streamSignals: streamSignalsCapability,
34056
34219
  switch: switchCapability,
34057
34220
  tamper: tamperCapability,
34058
34221
  temperatureSensor: temperatureSensorCapability,
@@ -40626,6 +40789,12 @@ Object.freeze({
40626
40789
  addonId: null,
40627
40790
  access: "create"
40628
40791
  },
40792
+ "streamBroker.reportStreamSignal": {
40793
+ capName: "stream-broker",
40794
+ capScope: "system",
40795
+ addonId: null,
40796
+ access: "create"
40797
+ },
40629
40798
  "streamBroker.restartProfile": {
40630
40799
  capName: "stream-broker",
40631
40800
  capScope: "system",
@@ -40710,6 +40879,12 @@ Object.freeze({
40710
40879
  addonId: null,
40711
40880
  access: "create"
40712
40881
  },
40882
+ "streamSignals.listSignals": {
40883
+ capName: "stream-signals",
40884
+ capScope: "device",
40885
+ addonId: null,
40886
+ access: "view"
40887
+ },
40713
40888
  "switch.setState": {
40714
40889
  capName: "switch",
40715
40890
  capScope: "device",
@@ -43082,6 +43257,11 @@ Object.freeze({
43082
43257
  form: "single",
43083
43258
  optional: false
43084
43259
  }],
43260
+ "streamBroker.reportStreamSignal": [{
43261
+ name: "deviceId",
43262
+ form: "single",
43263
+ optional: false
43264
+ }],
43085
43265
  "streamBroker.restartProfile": [{
43086
43266
  name: "deviceId",
43087
43267
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.105",
3
+ "version": "0.2.106",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",