@camstack/addon-export-alexa 1.2.114 → 1.2.115

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.
@@ -12591,7 +12591,23 @@ var PickStreamRequirementsSchema = object({
12591
12591
  * This is what lets one picker serve both the bypass and the full source
12592
12592
  * choice, instead of a consumer scoring privately when the bypass misses.
12593
12593
  */
12594
- allowTranscode: boolean().optional()
12594
+ allowTranscode: boolean().optional(),
12595
+ /**
12596
+ * Consider ONLY streams the broker has bound to a profile slot.
12597
+ *
12598
+ * A consumer that dials the broker — which is every exporter, since none
12599
+ * of them may open the camera's own URL — can do nothing with a source
12600
+ * that has no slot: there is no restream to dial. Without this the picker
12601
+ * can name such a stream, and each consumer discovers the dead end for
12602
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12603
+ * falls back, and HomeKit would have had to grow the same function again.
12604
+ *
12605
+ * Default `false`, and deliberately so: the BROKER itself picks through
12606
+ * here when it decides which source to BIND to a slot
12607
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12608
+ * could never bind them.
12609
+ */
12610
+ requireProfileBound: boolean().optional()
12595
12611
  }).readonly();
12596
12612
  var PickStreamPreferencesSchema = object({
12597
12613
  /**
@@ -12632,7 +12648,43 @@ var PickedCamStreamSchema = object({
12632
12648
  */
12633
12649
  transcodes: boolean(),
12634
12650
  /** One-line explanation of why this stream won — for logs / debug UI. */
12635
- reason: string()
12651
+ reason: string(),
12652
+ /**
12653
+ * The broker profile slot this source is bound to, when it is bound.
12654
+ *
12655
+ * Answered HERE because every consumer needs it and none of them can get it
12656
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12657
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12658
+ * the same function a second time.
12659
+ *
12660
+ * Absent when the source has no slot, which a caller passing
12661
+ * `requireProfileBound` can never see.
12662
+ */
12663
+ profile: CamProfileSchema.optional(),
12664
+ /** The broker id of that slot, for logs that must name what was dialled. */
12665
+ brokerId: string().optional(),
12666
+ /**
12667
+ * The broker restream URL to dial for this stream.
12668
+ *
12669
+ * An exporter must never open the camera's own URL — the broker is the one
12670
+ * that dials the camera, and every consumer goes through its restream. So
12671
+ * the picker answers with the thing a consumer may actually use, instead of
12672
+ * naming a source and leaving each caller to look the URL up.
12673
+ */
12674
+ url: string().optional(),
12675
+ /**
12676
+ * Frames per second this stream really delivers, and where the number came
12677
+ * from.
12678
+ *
12679
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12680
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12681
+ * and the controller rendered nothing at all. The source is carried with the
12682
+ * value for the same reason the bitrate evidence is: `published` is what the
12683
+ * publisher declares and `measured` is what the broker observed, and they
12684
+ * are not interchangeable.
12685
+ */
12686
+ fps: number().positive().optional(),
12687
+ fpsSource: _enum(["published", "measured"]).optional()
12636
12688
  });
12637
12689
  DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CameraStreamSchema).readonly()), method(object({ deviceId: number().int().nonnegative() }), array(ProfileSlotSchema).readonly()), method(object({
12638
12690
  deviceId: number().int().nonnegative(),
@@ -12564,7 +12564,23 @@ var PickStreamRequirementsSchema = object({
12564
12564
  * This is what lets one picker serve both the bypass and the full source
12565
12565
  * choice, instead of a consumer scoring privately when the bypass misses.
12566
12566
  */
12567
- allowTranscode: boolean().optional()
12567
+ allowTranscode: boolean().optional(),
12568
+ /**
12569
+ * Consider ONLY streams the broker has bound to a profile slot.
12570
+ *
12571
+ * A consumer that dials the broker — which is every exporter, since none
12572
+ * of them may open the camera's own URL — can do nothing with a source
12573
+ * that has no slot: there is no restream to dial. Without this the picker
12574
+ * can name such a stream, and each consumer discovers the dead end for
12575
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12576
+ * falls back, and HomeKit would have had to grow the same function again.
12577
+ *
12578
+ * Default `false`, and deliberately so: the BROKER itself picks through
12579
+ * here when it decides which source to BIND to a slot
12580
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12581
+ * could never bind them.
12582
+ */
12583
+ requireProfileBound: boolean().optional()
12568
12584
  }).readonly();
12569
12585
  var PickStreamPreferencesSchema = object({
12570
12586
  /**
@@ -12605,7 +12621,43 @@ var PickedCamStreamSchema = object({
12605
12621
  */
12606
12622
  transcodes: boolean(),
12607
12623
  /** One-line explanation of why this stream won — for logs / debug UI. */
12608
- reason: string()
12624
+ reason: string(),
12625
+ /**
12626
+ * The broker profile slot this source is bound to, when it is bound.
12627
+ *
12628
+ * Answered HERE because every consumer needs it and none of them can get it
12629
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12630
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12631
+ * the same function a second time.
12632
+ *
12633
+ * Absent when the source has no slot, which a caller passing
12634
+ * `requireProfileBound` can never see.
12635
+ */
12636
+ profile: CamProfileSchema.optional(),
12637
+ /** The broker id of that slot, for logs that must name what was dialled. */
12638
+ brokerId: string().optional(),
12639
+ /**
12640
+ * The broker restream URL to dial for this stream.
12641
+ *
12642
+ * An exporter must never open the camera's own URL — the broker is the one
12643
+ * that dials the camera, and every consumer goes through its restream. So
12644
+ * the picker answers with the thing a consumer may actually use, instead of
12645
+ * naming a source and leaving each caller to look the URL up.
12646
+ */
12647
+ url: string().optional(),
12648
+ /**
12649
+ * Frames per second this stream really delivers, and where the number came
12650
+ * from.
12651
+ *
12652
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12653
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12654
+ * and the controller rendered nothing at all. The source is carried with the
12655
+ * value for the same reason the bitrate evidence is: `published` is what the
12656
+ * publisher declares and `measured` is what the broker observed, and they
12657
+ * are not interchangeable.
12658
+ */
12659
+ fps: number().positive().optional(),
12660
+ fpsSource: _enum(["published", "measured"]).optional()
12609
12661
  });
12610
12662
  DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CameraStreamSchema).readonly()), method(object({ deviceId: number().int().nonnegative() }), array(ProfileSlotSchema).readonly()), method(object({
12611
12663
  deviceId: number().int().nonnegative(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.114",
3
+ "version": "1.2.115",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",