@camstack/addon-provider-tuya 0.2.107 → 0.2.109

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
@@ -13112,7 +13112,23 @@ var PickStreamRequirementsSchema = object({
13112
13112
  * This is what lets one picker serve both the bypass and the full source
13113
13113
  * choice, instead of a consumer scoring privately when the bypass misses.
13114
13114
  */
13115
- allowTranscode: boolean().optional()
13115
+ allowTranscode: boolean().optional(),
13116
+ /**
13117
+ * Consider ONLY streams the broker has bound to a profile slot.
13118
+ *
13119
+ * A consumer that dials the broker — which is every exporter, since none
13120
+ * of them may open the camera's own URL — can do nothing with a source
13121
+ * that has no slot: there is no restream to dial. Without this the picker
13122
+ * can name such a stream, and each consumer discovers the dead end for
13123
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
13124
+ * falls back, and HomeKit would have had to grow the same function again.
13125
+ *
13126
+ * Default `false`, and deliberately so: the BROKER itself picks through
13127
+ * here when it decides which source to BIND to a slot
13128
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
13129
+ * could never bind them.
13130
+ */
13131
+ requireProfileBound: boolean().optional()
13116
13132
  }).readonly();
13117
13133
  var PickStreamPreferencesSchema = object({
13118
13134
  /**
@@ -13153,7 +13169,43 @@ var PickedCamStreamSchema = object({
13153
13169
  */
13154
13170
  transcodes: boolean(),
13155
13171
  /** One-line explanation of why this stream won — for logs / debug UI. */
13156
- reason: string()
13172
+ reason: string(),
13173
+ /**
13174
+ * The broker profile slot this source is bound to, when it is bound.
13175
+ *
13176
+ * Answered HERE because every consumer needs it and none of them can get it
13177
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
13178
+ * a second cap read plus a `null` branch — and HomeKit was about to write
13179
+ * the same function a second time.
13180
+ *
13181
+ * Absent when the source has no slot, which a caller passing
13182
+ * `requireProfileBound` can never see.
13183
+ */
13184
+ profile: CamProfileSchema.optional(),
13185
+ /** The broker id of that slot, for logs that must name what was dialled. */
13186
+ brokerId: string().optional(),
13187
+ /**
13188
+ * The broker restream URL to dial for this stream.
13189
+ *
13190
+ * An exporter must never open the camera's own URL — the broker is the one
13191
+ * that dials the camera, and every consumer goes through its restream. So
13192
+ * the picker answers with the thing a consumer may actually use, instead of
13193
+ * naming a source and leaving each caller to look the URL up.
13194
+ */
13195
+ url: string().optional(),
13196
+ /**
13197
+ * Frames per second this stream really delivers, and where the number came
13198
+ * from.
13199
+ *
13200
+ * It is here because getting it wrong is expensive and silent: a HomeKit
13201
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
13202
+ * and the controller rendered nothing at all. The source is carried with the
13203
+ * value for the same reason the bitrate evidence is: `published` is what the
13204
+ * publisher declares and `measured` is what the broker observed, and they
13205
+ * are not interchangeable.
13206
+ */
13207
+ fps: number().positive().optional(),
13208
+ fpsSource: _enum(["published", "measured"]).optional()
13157
13209
  });
13158
13210
  /**
13159
13211
  * Camera streams — device-scoped facade over the system `stream-broker`.
package/dist/addon.mjs CHANGED
@@ -13111,7 +13111,23 @@ var PickStreamRequirementsSchema = object({
13111
13111
  * This is what lets one picker serve both the bypass and the full source
13112
13112
  * choice, instead of a consumer scoring privately when the bypass misses.
13113
13113
  */
13114
- allowTranscode: boolean().optional()
13114
+ allowTranscode: boolean().optional(),
13115
+ /**
13116
+ * Consider ONLY streams the broker has bound to a profile slot.
13117
+ *
13118
+ * A consumer that dials the broker — which is every exporter, since none
13119
+ * of them may open the camera's own URL — can do nothing with a source
13120
+ * that has no slot: there is no restream to dial. Without this the picker
13121
+ * can name such a stream, and each consumer discovers the dead end for
13122
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
13123
+ * falls back, and HomeKit would have had to grow the same function again.
13124
+ *
13125
+ * Default `false`, and deliberately so: the BROKER itself picks through
13126
+ * here when it decides which source to BIND to a slot
13127
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
13128
+ * could never bind them.
13129
+ */
13130
+ requireProfileBound: boolean().optional()
13115
13131
  }).readonly();
13116
13132
  var PickStreamPreferencesSchema = object({
13117
13133
  /**
@@ -13152,7 +13168,43 @@ var PickedCamStreamSchema = object({
13152
13168
  */
13153
13169
  transcodes: boolean(),
13154
13170
  /** One-line explanation of why this stream won — for logs / debug UI. */
13155
- reason: string()
13171
+ reason: string(),
13172
+ /**
13173
+ * The broker profile slot this source is bound to, when it is bound.
13174
+ *
13175
+ * Answered HERE because every consumer needs it and none of them can get it
13176
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
13177
+ * a second cap read plus a `null` branch — and HomeKit was about to write
13178
+ * the same function a second time.
13179
+ *
13180
+ * Absent when the source has no slot, which a caller passing
13181
+ * `requireProfileBound` can never see.
13182
+ */
13183
+ profile: CamProfileSchema.optional(),
13184
+ /** The broker id of that slot, for logs that must name what was dialled. */
13185
+ brokerId: string().optional(),
13186
+ /**
13187
+ * The broker restream URL to dial for this stream.
13188
+ *
13189
+ * An exporter must never open the camera's own URL — the broker is the one
13190
+ * that dials the camera, and every consumer goes through its restream. So
13191
+ * the picker answers with the thing a consumer may actually use, instead of
13192
+ * naming a source and leaving each caller to look the URL up.
13193
+ */
13194
+ url: string().optional(),
13195
+ /**
13196
+ * Frames per second this stream really delivers, and where the number came
13197
+ * from.
13198
+ *
13199
+ * It is here because getting it wrong is expensive and silent: a HomeKit
13200
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
13201
+ * and the controller rendered nothing at all. The source is carried with the
13202
+ * value for the same reason the bitrate evidence is: `published` is what the
13203
+ * publisher declares and `measured` is what the broker observed, and they
13204
+ * are not interchangeable.
13205
+ */
13206
+ fps: number().positive().optional(),
13207
+ fpsSource: _enum(["published", "measured"]).optional()
13156
13208
  });
13157
13209
  /**
13158
13210
  * 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-provider-tuya",
3
- "version": "0.2.107",
3
+ "version": "0.2.109",
4
4
  "description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
5
5
  "keywords": [
6
6
  "camstack",