@camstack/addon-import-alexa 0.2.106 → 0.2.107

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
@@ -12516,7 +12516,23 @@ var PickStreamRequirementsSchema = object({
12516
12516
  * This is what lets one picker serve both the bypass and the full source
12517
12517
  * choice, instead of a consumer scoring privately when the bypass misses.
12518
12518
  */
12519
- allowTranscode: boolean().optional()
12519
+ allowTranscode: boolean().optional(),
12520
+ /**
12521
+ * Consider ONLY streams the broker has bound to a profile slot.
12522
+ *
12523
+ * A consumer that dials the broker — which is every exporter, since none
12524
+ * of them may open the camera's own URL — can do nothing with a source
12525
+ * that has no slot: there is no restream to dial. Without this the picker
12526
+ * can name such a stream, and each consumer discovers the dead end for
12527
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12528
+ * falls back, and HomeKit would have had to grow the same function again.
12529
+ *
12530
+ * Default `false`, and deliberately so: the BROKER itself picks through
12531
+ * here when it decides which source to BIND to a slot
12532
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12533
+ * could never bind them.
12534
+ */
12535
+ requireProfileBound: boolean().optional()
12520
12536
  }).readonly();
12521
12537
  var PickStreamPreferencesSchema = object({
12522
12538
  /**
@@ -12557,7 +12573,43 @@ var PickedCamStreamSchema = object({
12557
12573
  */
12558
12574
  transcodes: boolean(),
12559
12575
  /** One-line explanation of why this stream won — for logs / debug UI. */
12560
- reason: string()
12576
+ reason: string(),
12577
+ /**
12578
+ * The broker profile slot this source is bound to, when it is bound.
12579
+ *
12580
+ * Answered HERE because every consumer needs it and none of them can get it
12581
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12582
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12583
+ * the same function a second time.
12584
+ *
12585
+ * Absent when the source has no slot, which a caller passing
12586
+ * `requireProfileBound` can never see.
12587
+ */
12588
+ profile: CamProfileSchema.optional(),
12589
+ /** The broker id of that slot, for logs that must name what was dialled. */
12590
+ brokerId: string().optional(),
12591
+ /**
12592
+ * The broker restream URL to dial for this stream.
12593
+ *
12594
+ * An exporter must never open the camera's own URL — the broker is the one
12595
+ * that dials the camera, and every consumer goes through its restream. So
12596
+ * the picker answers with the thing a consumer may actually use, instead of
12597
+ * naming a source and leaving each caller to look the URL up.
12598
+ */
12599
+ url: string().optional(),
12600
+ /**
12601
+ * Frames per second this stream really delivers, and where the number came
12602
+ * from.
12603
+ *
12604
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12605
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12606
+ * and the controller rendered nothing at all. The source is carried with the
12607
+ * value for the same reason the bitrate evidence is: `published` is what the
12608
+ * publisher declares and `measured` is what the broker observed, and they
12609
+ * are not interchangeable.
12610
+ */
12611
+ fps: number().positive().optional(),
12612
+ fpsSource: _enum(["published", "measured"]).optional()
12561
12613
  });
12562
12614
  /**
12563
12615
  * Camera streams — device-scoped facade over the system `stream-broker`.
package/dist/addon.mjs CHANGED
@@ -12516,7 +12516,23 @@ var PickStreamRequirementsSchema = object({
12516
12516
  * This is what lets one picker serve both the bypass and the full source
12517
12517
  * choice, instead of a consumer scoring privately when the bypass misses.
12518
12518
  */
12519
- allowTranscode: boolean().optional()
12519
+ allowTranscode: boolean().optional(),
12520
+ /**
12521
+ * Consider ONLY streams the broker has bound to a profile slot.
12522
+ *
12523
+ * A consumer that dials the broker — which is every exporter, since none
12524
+ * of them may open the camera's own URL — can do nothing with a source
12525
+ * that has no slot: there is no restream to dial. Without this the picker
12526
+ * can name such a stream, and each consumer discovers the dead end for
12527
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12528
+ * falls back, and HomeKit would have had to grow the same function again.
12529
+ *
12530
+ * Default `false`, and deliberately so: the BROKER itself picks through
12531
+ * here when it decides which source to BIND to a slot
12532
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12533
+ * could never bind them.
12534
+ */
12535
+ requireProfileBound: boolean().optional()
12520
12536
  }).readonly();
12521
12537
  var PickStreamPreferencesSchema = object({
12522
12538
  /**
@@ -12557,7 +12573,43 @@ var PickedCamStreamSchema = object({
12557
12573
  */
12558
12574
  transcodes: boolean(),
12559
12575
  /** One-line explanation of why this stream won — for logs / debug UI. */
12560
- reason: string()
12576
+ reason: string(),
12577
+ /**
12578
+ * The broker profile slot this source is bound to, when it is bound.
12579
+ *
12580
+ * Answered HERE because every consumer needs it and none of them can get it
12581
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12582
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12583
+ * the same function a second time.
12584
+ *
12585
+ * Absent when the source has no slot, which a caller passing
12586
+ * `requireProfileBound` can never see.
12587
+ */
12588
+ profile: CamProfileSchema.optional(),
12589
+ /** The broker id of that slot, for logs that must name what was dialled. */
12590
+ brokerId: string().optional(),
12591
+ /**
12592
+ * The broker restream URL to dial for this stream.
12593
+ *
12594
+ * An exporter must never open the camera's own URL — the broker is the one
12595
+ * that dials the camera, and every consumer goes through its restream. So
12596
+ * the picker answers with the thing a consumer may actually use, instead of
12597
+ * naming a source and leaving each caller to look the URL up.
12598
+ */
12599
+ url: string().optional(),
12600
+ /**
12601
+ * Frames per second this stream really delivers, and where the number came
12602
+ * from.
12603
+ *
12604
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12605
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12606
+ * and the controller rendered nothing at all. The source is carried with the
12607
+ * value for the same reason the bitrate evidence is: `published` is what the
12608
+ * publisher declares and `measured` is what the broker observed, and they
12609
+ * are not interchangeable.
12610
+ */
12611
+ fps: number().positive().optional(),
12612
+ fpsSource: _enum(["published", "measured"]).optional()
12561
12613
  });
12562
12614
  /**
12563
12615
  * Camera streams — device-scoped facade over the system `stream-broker`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.106",
3
+ "version": "0.2.107",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",