@camstack/addon-provider-dreo 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 CHANGED
@@ -35,7 +35,7 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
35
35
  //#endregion
36
36
  let crypto$1 = require("crypto");
37
37
  let events = require("events");
38
- //#region ../types/dist/event-category-ZyX6jcse.mjs
38
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
39
39
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
40
40
  EventCategory["SystemBoot"] = "system.boot";
41
41
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -652,6 +652,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
652
652
  * pull-reconcile from the provider's `getStatus` on reconnect. */
653
653
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
654
654
  EventCategory["BackupCompleted"] = "backup.completed";
655
+ /**
656
+ * A whole backup RUN finished — every destination attempted, win or lose.
657
+ *
658
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
659
+ * a progress UI and the wrong one for a notification: an operator with three
660
+ * destinations would be told three times. And a run where two of three
661
+ * destinations succeeded is not a clean success — a single "backup
662
+ * completed" that hid the failed one would be a lie, so the count of each is
663
+ * carried here and the message says both.
664
+ *
665
+ * Emitted by the backup orchestrator only after the destination loop, so a
666
+ * run that dies during the BUILD phase produces no completion at all.
667
+ */
668
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
655
669
  EventCategory["BackupRestored"] = "backup.restored";
656
670
  EventCategory["NotificationDispatched"] = "notification.dispatched";
657
671
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5382,7 +5396,7 @@ var ZodIssueCode = {
5382
5396
  var ZodFirstPartyTypeKind;
5383
5397
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5384
5398
  //#endregion
5385
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5399
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5386
5400
  /**
5387
5401
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5388
5402
  * window to float samples (D455).
@@ -11526,6 +11540,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11526
11540
  auth: "admin"
11527
11541
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11528
11542
  DeviceType.Camera;
11543
+ /**
11544
+ * The signals a device can emit to WAKE its own stream.
11545
+ *
11546
+ * A camera whose stream is built on demand sleeps until something asks for it,
11547
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11548
+ * puller holds a session open for ever, and treating that as demand would keep
11549
+ * a battery camera awake for ever, which is the whole thing the battery is for
11550
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11551
+ * itself, with no stream running.
11552
+ *
11553
+ * ## The vocabulary is the PROVIDER'S, not ours
11554
+ *
11555
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11556
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11557
+ * Reolink offers motion and camera-native detection; another provider may offer
11558
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11559
+ * yet. A fixed enum here would mean every new signal is a framework release.
11560
+ *
11561
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11562
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11563
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11564
+ * binding — but both answer "what drives the detection pipeline", which is a
11565
+ * different question from "what may wake a sleeping stream". A camera can do
11566
+ * the first and not be trusted with the second, and the operator picks per
11567
+ * camera. Two questions, two authorities.
11568
+ *
11569
+ * ## Availability is not permission
11570
+ *
11571
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11572
+ * wakes the stream is the operator's per-camera choice, held by the broker
11573
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11574
+ * provider declaring a signal is not a provider enabling it.
11575
+ */
11576
+ /** One signal a device can emit. */
11577
+ var StreamSignalSchema = object({
11578
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11579
+ code: string().min(1),
11580
+ /** What an operator reads in the picker. The provider's own wording. */
11581
+ label: string().min(1),
11582
+ /**
11583
+ * Whether the provider recommends this signal ON when a camera is first set
11584
+ * up. A provider knows which of its signals are cheap and reliable; an
11585
+ * operator should not have to discover that by trial. Reolink recommends
11586
+ * both of its own.
11587
+ */
11588
+ recommended: boolean()
11589
+ });
11590
+ var StreamSignalsStatusSchema = object({
11591
+ signals: array(StreamSignalSchema),
11592
+ lastFetchedAt: number()
11593
+ });
11594
+ var streamSignalsCapability = {
11595
+ name: "stream-signals",
11596
+ scope: "device",
11597
+ deviceNative: true,
11598
+ mode: "singleton",
11599
+ deviceTypes: Object.values(DeviceType),
11600
+ runtimeState: StreamSignalsStatusSchema,
11601
+ methods: {
11602
+ /**
11603
+ * What this device can emit. Empty is a valid and common answer — most
11604
+ * cameras have nothing to offer here, and an empty list is what makes the
11605
+ * broker's picker show nothing rather than a false choice.
11606
+ */
11607
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11608
+ };
11529
11609
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11530
11610
  var StreamFormatSchema = _enum([
11531
11611
  "webrtc",
@@ -11922,6 +12002,22 @@ var EgressTranscodeSchema = object({
11922
12002
  camStreamId: string().nullable()
11923
12003
  });
11924
12004
  method(object({
12005
+ deviceId: number().int().nonnegative(),
12006
+ /** The provider's signal code. */
12007
+ code: string().min(1),
12008
+ /** Ms epoch. Absent ⇒ now. */
12009
+ at: number().optional()
12010
+ }), object({
12011
+ /** Whether the broker acted on it, and if not, why. */
12012
+ accepted: boolean(),
12013
+ reason: _enum([
12014
+ "woke",
12015
+ "hold-extended",
12016
+ "not-enabled",
12017
+ "no-consumer",
12018
+ "unknown-code"
12019
+ ])
12020
+ }), { kind: "mutation" }), method(object({
11925
12021
  deviceId: number().int().nonnegative(),
11926
12022
  camStreamId: string().min(1),
11927
12023
  kind: CamStreamKindSchema,
@@ -12176,6 +12272,16 @@ var PickStreamRequirementsSchema = object({
12176
12272
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12177
12273
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12178
12274
  minHeight: number().int().positive().optional(),
12275
+ /**
12276
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12277
+ *
12278
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12279
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12280
+ * Without this the ceiling had to be re-implemented by every caller — and
12281
+ * one caller implementing it privately is how a second scoring authority
12282
+ * gets born.
12283
+ */
12284
+ maxHeight: number().int().positive().optional(),
12179
12285
  /** Minimum horizontal resolution. */
12180
12286
  minWidth: number().int().positive().optional(),
12181
12287
  /**
@@ -12192,7 +12298,22 @@ var PickStreamRequirementsSchema = object({
12192
12298
  * transcoded" guard: if the device is already serving the consumer's
12193
12299
  * codec end-to-end, there's nothing to optimise.
12194
12300
  */
12195
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12301
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12302
+ /**
12303
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12304
+ * understanding that it will be transcoded.
12305
+ *
12306
+ * Default `false` — today's behaviour, and the right one for a bypass
12307
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12308
+ * ask the larger question: "what is the best stream for me, transcoding if
12309
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12310
+ * does not, so a passthrough is never lost to a transcode; the answer says
12311
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12312
+ *
12313
+ * This is what lets one picker serve both the bypass and the full source
12314
+ * choice, instead of a consumer scoring privately when the bypass misses.
12315
+ */
12316
+ allowTranscode: boolean().optional()
12196
12317
  }).readonly();
12197
12318
  var PickStreamPreferencesSchema = object({
12198
12319
  /**
@@ -12206,12 +12327,32 @@ var PickStreamPreferencesSchema = object({
12206
12327
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12207
12328
  * memory-constrained consumers / Apple Home guest sessions).
12208
12329
  */
12209
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12330
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12331
+ /**
12332
+ * The height the consumer actually wants to DELIVER.
12333
+ *
12334
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12335
+ * above the target wins, and only if nothing reaches it does the tallest
12336
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12337
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12338
+ * express that: it says "as big as possible", which is a different wish.
12339
+ *
12340
+ * Ignored when absent, so every existing caller keeps its ordering.
12341
+ */
12342
+ targetHeight: number().int().positive().optional()
12210
12343
  }).readonly();
12211
12344
  var PickedCamStreamSchema = object({
12212
12345
  camStreamId: string(),
12213
12346
  codec: string().optional(),
12214
12347
  resolution: CamStreamResolutionSchema.optional(),
12348
+ /**
12349
+ * Whether serving this stream requires a decode + re-encode.
12350
+ *
12351
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12352
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12353
+ * not ask cannot be handed a cost it never agreed to pay.
12354
+ */
12355
+ transcodes: boolean(),
12215
12356
  /** One-line explanation of why this stream won — for logs / debug UI. */
12216
12357
  reason: string()
12217
12358
  });
@@ -16745,6 +16886,8 @@ var NcSystemEventKindSchema = _enum([
16745
16886
  "device-enabled",
16746
16887
  "device-battery-low",
16747
16888
  "device-battery-normal",
16889
+ "device-consumable-low",
16890
+ "device-consumable-normal",
16748
16891
  "stream-online",
16749
16892
  "stream-offline",
16750
16893
  "node-online",
@@ -16763,6 +16906,7 @@ var NcSystemEventKindSchema = _enum([
16763
16906
  "addon-updated",
16764
16907
  "server-updated",
16765
16908
  "export-completed",
16909
+ "backup-completed",
16766
16910
  "camera-online",
16767
16911
  "camera-offline",
16768
16912
  "camera-disabled",
@@ -24044,10 +24188,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24044
24188
  }), boolean()), method(object({
24045
24189
  deviceId: number().int().nonnegative(),
24046
24190
  sessionId: string()
24047
- }), object({ pendingRenegotiation: object({
24048
- target: WebrtcStreamTargetSchema,
24049
- epoch: number()
24050
- }).nullable() }));
24191
+ }), object({
24192
+ pendingRenegotiation: object({
24193
+ target: WebrtcStreamTargetSchema,
24194
+ epoch: number()
24195
+ }).nullable(),
24196
+ /**
24197
+ * Whether the session still EXISTS.
24198
+ *
24199
+ * A consumer that holds a resource for the life of a session needs to
24200
+ * be able to ask, because a session does not always end the way it
24201
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24202
+ * sent `SessionDisconnected`, so the Alexa exporter's
24203
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24204
+ * H.264 transcode kept running for NOBODY for more than twenty
24205
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24206
+ * minutes earlier — the broker knew; the holder had no way to ask.
24207
+ *
24208
+ * `false` for a session id the provider has never heard of, which is
24209
+ * the same answer as "it ended": either way nothing is holding it up.
24210
+ */
24211
+ alive: boolean()
24212
+ }));
24051
24213
  object({
24052
24214
  /** All accessory children of the parent. */
24053
24215
  childDeviceIds: array(number()).readonly(),
@@ -33974,6 +34136,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33974
34136
  smoke: smokeCapability,
33975
34137
  streamCatalog: streamCatalogCapability,
33976
34138
  streamParams: streamParamsCapability,
34139
+ streamSignals: streamSignalsCapability,
33977
34140
  switch: switchCapability,
33978
34141
  tamper: tamperCapability,
33979
34142
  temperatureSensor: temperatureSensorCapability,
@@ -40547,6 +40710,12 @@ Object.freeze({
40547
40710
  addonId: null,
40548
40711
  access: "create"
40549
40712
  },
40713
+ "streamBroker.reportStreamSignal": {
40714
+ capName: "stream-broker",
40715
+ capScope: "system",
40716
+ addonId: null,
40717
+ access: "create"
40718
+ },
40550
40719
  "streamBroker.restartProfile": {
40551
40720
  capName: "stream-broker",
40552
40721
  capScope: "system",
@@ -40631,6 +40800,12 @@ Object.freeze({
40631
40800
  addonId: null,
40632
40801
  access: "create"
40633
40802
  },
40803
+ "streamSignals.listSignals": {
40804
+ capName: "stream-signals",
40805
+ capScope: "device",
40806
+ addonId: null,
40807
+ access: "view"
40808
+ },
40634
40809
  "switch.setState": {
40635
40810
  capName: "switch",
40636
40811
  capScope: "device",
@@ -43003,6 +43178,11 @@ Object.freeze({
43003
43178
  form: "single",
43004
43179
  optional: false
43005
43180
  }],
43181
+ "streamBroker.reportStreamSignal": [{
43182
+ name: "deviceId",
43183
+ form: "single",
43184
+ optional: false
43185
+ }],
43006
43186
  "streamBroker.restartProfile": [{
43007
43187
  name: "deviceId",
43008
43188
  form: "single",
package/dist/addon.mjs CHANGED
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
37
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
38
38
  //#endregion
39
- //#region ../types/dist/event-category-ZyX6jcse.mjs
39
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
40
40
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
41
41
  EventCategory["SystemBoot"] = "system.boot";
42
42
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -653,6 +653,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
653
653
  * pull-reconcile from the provider's `getStatus` on reconnect. */
654
654
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
655
655
  EventCategory["BackupCompleted"] = "backup.completed";
656
+ /**
657
+ * A whole backup RUN finished — every destination attempted, win or lose.
658
+ *
659
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
660
+ * a progress UI and the wrong one for a notification: an operator with three
661
+ * destinations would be told three times. And a run where two of three
662
+ * destinations succeeded is not a clean success — a single "backup
663
+ * completed" that hid the failed one would be a lie, so the count of each is
664
+ * carried here and the message says both.
665
+ *
666
+ * Emitted by the backup orchestrator only after the destination loop, so a
667
+ * run that dies during the BUILD phase produces no completion at all.
668
+ */
669
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
656
670
  EventCategory["BackupRestored"] = "backup.restored";
657
671
  EventCategory["NotificationDispatched"] = "notification.dispatched";
658
672
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5383,7 +5397,7 @@ var ZodIssueCode = {
5383
5397
  var ZodFirstPartyTypeKind;
5384
5398
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5385
5399
  //#endregion
5386
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5400
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5387
5401
  /**
5388
5402
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5389
5403
  * window to float samples (D455).
@@ -11527,6 +11541,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11527
11541
  auth: "admin"
11528
11542
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11529
11543
  DeviceType.Camera;
11544
+ /**
11545
+ * The signals a device can emit to WAKE its own stream.
11546
+ *
11547
+ * A camera whose stream is built on demand sleeps until something asks for it,
11548
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11549
+ * puller holds a session open for ever, and treating that as demand would keep
11550
+ * a battery camera awake for ever, which is the whole thing the battery is for
11551
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11552
+ * itself, with no stream running.
11553
+ *
11554
+ * ## The vocabulary is the PROVIDER'S, not ours
11555
+ *
11556
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11557
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11558
+ * Reolink offers motion and camera-native detection; another provider may offer
11559
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11560
+ * yet. A fixed enum here would mean every new signal is a framework release.
11561
+ *
11562
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11563
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11564
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11565
+ * binding — but both answer "what drives the detection pipeline", which is a
11566
+ * different question from "what may wake a sleeping stream". A camera can do
11567
+ * the first and not be trusted with the second, and the operator picks per
11568
+ * camera. Two questions, two authorities.
11569
+ *
11570
+ * ## Availability is not permission
11571
+ *
11572
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11573
+ * wakes the stream is the operator's per-camera choice, held by the broker
11574
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11575
+ * provider declaring a signal is not a provider enabling it.
11576
+ */
11577
+ /** One signal a device can emit. */
11578
+ var StreamSignalSchema = object({
11579
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11580
+ code: string().min(1),
11581
+ /** What an operator reads in the picker. The provider's own wording. */
11582
+ label: string().min(1),
11583
+ /**
11584
+ * Whether the provider recommends this signal ON when a camera is first set
11585
+ * up. A provider knows which of its signals are cheap and reliable; an
11586
+ * operator should not have to discover that by trial. Reolink recommends
11587
+ * both of its own.
11588
+ */
11589
+ recommended: boolean()
11590
+ });
11591
+ var StreamSignalsStatusSchema = object({
11592
+ signals: array(StreamSignalSchema),
11593
+ lastFetchedAt: number()
11594
+ });
11595
+ var streamSignalsCapability = {
11596
+ name: "stream-signals",
11597
+ scope: "device",
11598
+ deviceNative: true,
11599
+ mode: "singleton",
11600
+ deviceTypes: Object.values(DeviceType),
11601
+ runtimeState: StreamSignalsStatusSchema,
11602
+ methods: {
11603
+ /**
11604
+ * What this device can emit. Empty is a valid and common answer — most
11605
+ * cameras have nothing to offer here, and an empty list is what makes the
11606
+ * broker's picker show nothing rather than a false choice.
11607
+ */
11608
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11609
+ };
11530
11610
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11531
11611
  var StreamFormatSchema = _enum([
11532
11612
  "webrtc",
@@ -11923,6 +12003,22 @@ var EgressTranscodeSchema = object({
11923
12003
  camStreamId: string().nullable()
11924
12004
  });
11925
12005
  method(object({
12006
+ deviceId: number().int().nonnegative(),
12007
+ /** The provider's signal code. */
12008
+ code: string().min(1),
12009
+ /** Ms epoch. Absent ⇒ now. */
12010
+ at: number().optional()
12011
+ }), object({
12012
+ /** Whether the broker acted on it, and if not, why. */
12013
+ accepted: boolean(),
12014
+ reason: _enum([
12015
+ "woke",
12016
+ "hold-extended",
12017
+ "not-enabled",
12018
+ "no-consumer",
12019
+ "unknown-code"
12020
+ ])
12021
+ }), { kind: "mutation" }), method(object({
11926
12022
  deviceId: number().int().nonnegative(),
11927
12023
  camStreamId: string().min(1),
11928
12024
  kind: CamStreamKindSchema,
@@ -12177,6 +12273,16 @@ var PickStreamRequirementsSchema = object({
12177
12273
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12178
12274
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12179
12275
  minHeight: number().int().positive().optional(),
12276
+ /**
12277
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12278
+ *
12279
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12280
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12281
+ * Without this the ceiling had to be re-implemented by every caller — and
12282
+ * one caller implementing it privately is how a second scoring authority
12283
+ * gets born.
12284
+ */
12285
+ maxHeight: number().int().positive().optional(),
12180
12286
  /** Minimum horizontal resolution. */
12181
12287
  minWidth: number().int().positive().optional(),
12182
12288
  /**
@@ -12193,7 +12299,22 @@ var PickStreamRequirementsSchema = object({
12193
12299
  * transcoded" guard: if the device is already serving the consumer's
12194
12300
  * codec end-to-end, there's nothing to optimise.
12195
12301
  */
12196
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12302
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12303
+ /**
12304
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12305
+ * understanding that it will be transcoded.
12306
+ *
12307
+ * Default `false` — today's behaviour, and the right one for a bypass
12308
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12309
+ * ask the larger question: "what is the best stream for me, transcoding if
12310
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12311
+ * does not, so a passthrough is never lost to a transcode; the answer says
12312
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12313
+ *
12314
+ * This is what lets one picker serve both the bypass and the full source
12315
+ * choice, instead of a consumer scoring privately when the bypass misses.
12316
+ */
12317
+ allowTranscode: boolean().optional()
12197
12318
  }).readonly();
12198
12319
  var PickStreamPreferencesSchema = object({
12199
12320
  /**
@@ -12207,12 +12328,32 @@ var PickStreamPreferencesSchema = object({
12207
12328
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12208
12329
  * memory-constrained consumers / Apple Home guest sessions).
12209
12330
  */
12210
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12331
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12332
+ /**
12333
+ * The height the consumer actually wants to DELIVER.
12334
+ *
12335
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12336
+ * above the target wins, and only if nothing reaches it does the tallest
12337
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12338
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12339
+ * express that: it says "as big as possible", which is a different wish.
12340
+ *
12341
+ * Ignored when absent, so every existing caller keeps its ordering.
12342
+ */
12343
+ targetHeight: number().int().positive().optional()
12211
12344
  }).readonly();
12212
12345
  var PickedCamStreamSchema = object({
12213
12346
  camStreamId: string(),
12214
12347
  codec: string().optional(),
12215
12348
  resolution: CamStreamResolutionSchema.optional(),
12349
+ /**
12350
+ * Whether serving this stream requires a decode + re-encode.
12351
+ *
12352
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12353
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12354
+ * not ask cannot be handed a cost it never agreed to pay.
12355
+ */
12356
+ transcodes: boolean(),
12216
12357
  /** One-line explanation of why this stream won — for logs / debug UI. */
12217
12358
  reason: string()
12218
12359
  });
@@ -16746,6 +16887,8 @@ var NcSystemEventKindSchema = _enum([
16746
16887
  "device-enabled",
16747
16888
  "device-battery-low",
16748
16889
  "device-battery-normal",
16890
+ "device-consumable-low",
16891
+ "device-consumable-normal",
16749
16892
  "stream-online",
16750
16893
  "stream-offline",
16751
16894
  "node-online",
@@ -16764,6 +16907,7 @@ var NcSystemEventKindSchema = _enum([
16764
16907
  "addon-updated",
16765
16908
  "server-updated",
16766
16909
  "export-completed",
16910
+ "backup-completed",
16767
16911
  "camera-online",
16768
16912
  "camera-offline",
16769
16913
  "camera-disabled",
@@ -24045,10 +24189,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24045
24189
  }), boolean()), method(object({
24046
24190
  deviceId: number().int().nonnegative(),
24047
24191
  sessionId: string()
24048
- }), object({ pendingRenegotiation: object({
24049
- target: WebrtcStreamTargetSchema,
24050
- epoch: number()
24051
- }).nullable() }));
24192
+ }), object({
24193
+ pendingRenegotiation: object({
24194
+ target: WebrtcStreamTargetSchema,
24195
+ epoch: number()
24196
+ }).nullable(),
24197
+ /**
24198
+ * Whether the session still EXISTS.
24199
+ *
24200
+ * A consumer that holds a resource for the life of a session needs to
24201
+ * be able to ask, because a session does not always end the way it
24202
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24203
+ * sent `SessionDisconnected`, so the Alexa exporter's
24204
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24205
+ * H.264 transcode kept running for NOBODY for more than twenty
24206
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24207
+ * minutes earlier — the broker knew; the holder had no way to ask.
24208
+ *
24209
+ * `false` for a session id the provider has never heard of, which is
24210
+ * the same answer as "it ended": either way nothing is holding it up.
24211
+ */
24212
+ alive: boolean()
24213
+ }));
24052
24214
  object({
24053
24215
  /** All accessory children of the parent. */
24054
24216
  childDeviceIds: array(number()).readonly(),
@@ -33975,6 +34137,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33975
34137
  smoke: smokeCapability,
33976
34138
  streamCatalog: streamCatalogCapability,
33977
34139
  streamParams: streamParamsCapability,
34140
+ streamSignals: streamSignalsCapability,
33978
34141
  switch: switchCapability,
33979
34142
  tamper: tamperCapability,
33980
34143
  temperatureSensor: temperatureSensorCapability,
@@ -40548,6 +40711,12 @@ Object.freeze({
40548
40711
  addonId: null,
40549
40712
  access: "create"
40550
40713
  },
40714
+ "streamBroker.reportStreamSignal": {
40715
+ capName: "stream-broker",
40716
+ capScope: "system",
40717
+ addonId: null,
40718
+ access: "create"
40719
+ },
40551
40720
  "streamBroker.restartProfile": {
40552
40721
  capName: "stream-broker",
40553
40722
  capScope: "system",
@@ -40632,6 +40801,12 @@ Object.freeze({
40632
40801
  addonId: null,
40633
40802
  access: "create"
40634
40803
  },
40804
+ "streamSignals.listSignals": {
40805
+ capName: "stream-signals",
40806
+ capScope: "device",
40807
+ addonId: null,
40808
+ access: "view"
40809
+ },
40635
40810
  "switch.setState": {
40636
40811
  capName: "switch",
40637
40812
  capScope: "device",
@@ -43004,6 +43179,11 @@ Object.freeze({
43004
43179
  form: "single",
43005
43180
  optional: false
43006
43181
  }],
43182
+ "streamBroker.reportStreamSignal": [{
43183
+ name: "deviceId",
43184
+ form: "single",
43185
+ optional: false
43186
+ }],
43007
43187
  "streamBroker.restartProfile": [{
43008
43188
  name: "deviceId",
43009
43189
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.101",
3
+ "version": "0.2.102",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",