@camstack/addon-provider-tuya 0.2.113 → 0.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.
package/dist/addon.js CHANGED
@@ -6180,7 +6180,7 @@ var ZodIssueCode = {
6180
6180
  var ZodFirstPartyTypeKind;
6181
6181
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6182
6182
  //#endregion
6183
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
6183
+ //#region ../types/dist/sleep-GU_us3DG.mjs
6184
6184
  /**
6185
6185
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6186
6186
  * window to float samples (D455).
@@ -12670,6 +12670,24 @@ var GetStreamWithCodecInputSchema = object({
12670
12670
  });
12671
12671
  var RtpSourceSchema = object({
12672
12672
  url: string(),
12673
+ /**
12674
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
12675
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
12676
+ *
12677
+ * The broker answers it because the broker is the only thing that can:
12678
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
12679
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
12680
+ * cap bindings would be a second authority, and two authorities on the same
12681
+ * question is how a composite camera ends up dialling a sleeping camera
12682
+ * because its own copy of the rule was a release behind.
12683
+ *
12684
+ * `null` is a real answer and is never a live url in disguise: a consumer
12685
+ * that silently fell back to {@link url} would perform exactly the wake this
12686
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
12687
+ * transcode hands back an egress the broker is feeding itself, which has no
12688
+ * sentry counterpart.
12689
+ */
12690
+ sentryUrl: string().nullable().optional(),
12673
12691
  videoCodec: _enum(["H264", "H265"]),
12674
12692
  audioCodec: string(),
12675
12693
  resolution: object({
@@ -29716,6 +29734,118 @@ var motionTriggerCapability = {
29716
29734
  durability: "session"
29717
29735
  };
29718
29736
  /**
29737
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
29738
+ * page.
29739
+ *
29740
+ * ## Why this is a capability and not an addon settings schema
29741
+ *
29742
+ * It was one, and it did not render. The addon declared the editor as a
29743
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
29744
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
29745
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
29746
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
29747
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
29748
+ * not on it "falls off silently".
29749
+ *
29750
+ * Adding a fifth name to that list would have been the wrong fix twice over:
29751
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
29752
+ * beside PTZ and motion zones on the camera itself. The device page is
29753
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
29754
+ * and this cap carries its section the way `recording` does, by RETURNING it
29755
+ * from `getDeviceSettingsContribution`.
29756
+ *
29757
+ * Seven other widgets are still declared the other way, through a
29758
+ * `deviceConfig.ui` block the framework derives a section from. That route
29759
+ * gives the addon no say in where its own panel lands and no way to decline
29760
+ * for a device the panel does not suit, which is why this one does not use it.
29761
+ *
29762
+ * ## Why one addon may implement it
29763
+ *
29764
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29765
+ * itself. Nothing else declares a composite camera, so nothing else has a
29766
+ * layout — and the device-scoped route means the widget asks THE camera, not
29767
+ * "the camera-grid addon", which is what let the old custom-action pair be
29768
+ * reached only by a caller that already knew the addon id.
29769
+ *
29770
+ * ## The tab
29771
+ *
29772
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29773
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29774
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29775
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29776
+ * next to "PTZ").
29777
+ */
29778
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29779
+ var GridNormalizedRectSchema = object({
29780
+ x: number().min(0).max(1),
29781
+ y: number().min(0).max(1),
29782
+ width: number().gt(0).max(1),
29783
+ height: number().gt(0).max(1)
29784
+ });
29785
+ /**
29786
+ * One source camera, the part of its picture taken, and where that part lands.
29787
+ *
29788
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29789
+ * — a profile switch, a firmware update, a substream that comes back different
29790
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29791
+ * which is the class of bug nobody files.
29792
+ */
29793
+ var GridLayoutCellSchema = object({
29794
+ deviceId: number().int().positive(),
29795
+ /** The part of the SOURCE taken, normalized against the source. */
29796
+ source: GridNormalizedRectSchema,
29797
+ /** Where it lands, normalized against the CANVAS. */
29798
+ cell: GridNormalizedRectSchema
29799
+ });
29800
+ /**
29801
+ * Which profiles this grid can actually compose, and why not.
29802
+ *
29803
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29804
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29805
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29806
+ * low" is, and it is the one an operator can act on.
29807
+ */
29808
+ var GridProfileOfferSchema = object({
29809
+ profile: _enum([
29810
+ "high",
29811
+ "mid",
29812
+ "low"
29813
+ ]),
29814
+ offered: boolean(),
29815
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29816
+ missingSources: array(number().int().positive())
29817
+ });
29818
+ var GridLayoutViewSchema = object({
29819
+ /** The persisted grid row this camera was declared from. */
29820
+ instanceId: string(),
29821
+ deviceId: number().int().nonnegative(),
29822
+ name: string(),
29823
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29824
+ width: number().int(),
29825
+ height: number().int(),
29826
+ fps: number().int(),
29827
+ cells: array(GridLayoutCellSchema),
29828
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29829
+ profiles: array(GridProfileOfferSchema)
29830
+ });
29831
+ var GridLayoutPatchSchema = object({
29832
+ deviceId: number().int().nonnegative(),
29833
+ name: string().min(1).max(160).optional(),
29834
+ width: number().int().min(160).max(7680).optional(),
29835
+ height: number().int().min(120).max(4320).optional(),
29836
+ fps: number().int().min(1).max(60).optional(),
29837
+ /**
29838
+ * The whole cell list at once. A per-cell patch would need an ordering the
29839
+ * editor does not have, and a half-applied layout is a picture nobody asked
29840
+ * for.
29841
+ */
29842
+ cells: array(GridLayoutCellSchema).max(16)
29843
+ });
29844
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29845
+ kind: "mutation",
29846
+ auth: "admin"
29847
+ });
29848
+ /**
29719
29849
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
29720
29850
  * on-camera motion-detection mask is a single `grid` region (a row-major
29721
29851
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -37442,6 +37572,18 @@ Object.freeze({
37442
37572
  addonId: null,
37443
37573
  access: "view"
37444
37574
  },
37575
+ "cameraGridLayout.getLayout": {
37576
+ capName: "camera-grid-layout",
37577
+ capScope: "device",
37578
+ addonId: null,
37579
+ access: "view"
37580
+ },
37581
+ "cameraGridLayout.saveLayout": {
37582
+ capName: "camera-grid-layout",
37583
+ capScope: "device",
37584
+ addonId: null,
37585
+ access: "create"
37586
+ },
37445
37587
  "cameraStreams.getBrokerStreams": {
37446
37588
  capName: "camera-streams",
37447
37589
  capScope: "device",
@@ -43141,6 +43283,21 @@ Object.freeze({
43141
43283
  form: "single",
43142
43284
  optional: false
43143
43285
  }],
43286
+ "cameraGridLayout.getLayout": [{
43287
+ name: "deviceId",
43288
+ form: "single",
43289
+ optional: false
43290
+ }],
43291
+ "cameraGridLayout.saveLayout": [{
43292
+ name: "cells",
43293
+ form: "object-array",
43294
+ optional: false,
43295
+ itemField: "deviceId"
43296
+ }, {
43297
+ name: "deviceId",
43298
+ form: "single",
43299
+ optional: false
43300
+ }],
43144
43301
  "cameraStreams.getBrokerStreams": [{
43145
43302
  name: "deviceId",
43146
43303
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6179,7 +6179,7 @@ var ZodIssueCode = {
6179
6179
  var ZodFirstPartyTypeKind;
6180
6180
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6181
6181
  //#endregion
6182
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
6182
+ //#region ../types/dist/sleep-GU_us3DG.mjs
6183
6183
  /**
6184
6184
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6185
6185
  * window to float samples (D455).
@@ -12669,6 +12669,24 @@ var GetStreamWithCodecInputSchema = object({
12669
12669
  });
12670
12670
  var RtpSourceSchema = object({
12671
12671
  url: string(),
12672
+ /**
12673
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
12674
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
12675
+ *
12676
+ * The broker answers it because the broker is the only thing that can:
12677
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
12678
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
12679
+ * cap bindings would be a second authority, and two authorities on the same
12680
+ * question is how a composite camera ends up dialling a sleeping camera
12681
+ * because its own copy of the rule was a release behind.
12682
+ *
12683
+ * `null` is a real answer and is never a live url in disguise: a consumer
12684
+ * that silently fell back to {@link url} would perform exactly the wake this
12685
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
12686
+ * transcode hands back an egress the broker is feeding itself, which has no
12687
+ * sentry counterpart.
12688
+ */
12689
+ sentryUrl: string().nullable().optional(),
12672
12690
  videoCodec: _enum(["H264", "H265"]),
12673
12691
  audioCodec: string(),
12674
12692
  resolution: object({
@@ -29715,6 +29733,118 @@ var motionTriggerCapability = {
29715
29733
  durability: "session"
29716
29734
  };
29717
29735
  /**
29736
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
29737
+ * page.
29738
+ *
29739
+ * ## Why this is a capability and not an addon settings schema
29740
+ *
29741
+ * It was one, and it did not render. The addon declared the editor as a
29742
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
29743
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
29744
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
29745
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
29746
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
29747
+ * not on it "falls off silently".
29748
+ *
29749
+ * Adding a fifth name to that list would have been the wrong fix twice over:
29750
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
29751
+ * beside PTZ and motion zones on the camera itself. The device page is
29752
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
29753
+ * and this cap carries its section the way `recording` does, by RETURNING it
29754
+ * from `getDeviceSettingsContribution`.
29755
+ *
29756
+ * Seven other widgets are still declared the other way, through a
29757
+ * `deviceConfig.ui` block the framework derives a section from. That route
29758
+ * gives the addon no say in where its own panel lands and no way to decline
29759
+ * for a device the panel does not suit, which is why this one does not use it.
29760
+ *
29761
+ * ## Why one addon may implement it
29762
+ *
29763
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29764
+ * itself. Nothing else declares a composite camera, so nothing else has a
29765
+ * layout — and the device-scoped route means the widget asks THE camera, not
29766
+ * "the camera-grid addon", which is what let the old custom-action pair be
29767
+ * reached only by a caller that already knew the addon id.
29768
+ *
29769
+ * ## The tab
29770
+ *
29771
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29772
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29773
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29774
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29775
+ * next to "PTZ").
29776
+ */
29777
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29778
+ var GridNormalizedRectSchema = object({
29779
+ x: number().min(0).max(1),
29780
+ y: number().min(0).max(1),
29781
+ width: number().gt(0).max(1),
29782
+ height: number().gt(0).max(1)
29783
+ });
29784
+ /**
29785
+ * One source camera, the part of its picture taken, and where that part lands.
29786
+ *
29787
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29788
+ * — a profile switch, a firmware update, a substream that comes back different
29789
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29790
+ * which is the class of bug nobody files.
29791
+ */
29792
+ var GridLayoutCellSchema = object({
29793
+ deviceId: number().int().positive(),
29794
+ /** The part of the SOURCE taken, normalized against the source. */
29795
+ source: GridNormalizedRectSchema,
29796
+ /** Where it lands, normalized against the CANVAS. */
29797
+ cell: GridNormalizedRectSchema
29798
+ });
29799
+ /**
29800
+ * Which profiles this grid can actually compose, and why not.
29801
+ *
29802
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29803
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29804
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29805
+ * low" is, and it is the one an operator can act on.
29806
+ */
29807
+ var GridProfileOfferSchema = object({
29808
+ profile: _enum([
29809
+ "high",
29810
+ "mid",
29811
+ "low"
29812
+ ]),
29813
+ offered: boolean(),
29814
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29815
+ missingSources: array(number().int().positive())
29816
+ });
29817
+ var GridLayoutViewSchema = object({
29818
+ /** The persisted grid row this camera was declared from. */
29819
+ instanceId: string(),
29820
+ deviceId: number().int().nonnegative(),
29821
+ name: string(),
29822
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29823
+ width: number().int(),
29824
+ height: number().int(),
29825
+ fps: number().int(),
29826
+ cells: array(GridLayoutCellSchema),
29827
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29828
+ profiles: array(GridProfileOfferSchema)
29829
+ });
29830
+ var GridLayoutPatchSchema = object({
29831
+ deviceId: number().int().nonnegative(),
29832
+ name: string().min(1).max(160).optional(),
29833
+ width: number().int().min(160).max(7680).optional(),
29834
+ height: number().int().min(120).max(4320).optional(),
29835
+ fps: number().int().min(1).max(60).optional(),
29836
+ /**
29837
+ * The whole cell list at once. A per-cell patch would need an ordering the
29838
+ * editor does not have, and a half-applied layout is a picture nobody asked
29839
+ * for.
29840
+ */
29841
+ cells: array(GridLayoutCellSchema).max(16)
29842
+ });
29843
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29844
+ kind: "mutation",
29845
+ auth: "admin"
29846
+ });
29847
+ /**
29718
29848
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
29719
29849
  * on-camera motion-detection mask is a single `grid` region (a row-major
29720
29850
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -37441,6 +37571,18 @@ Object.freeze({
37441
37571
  addonId: null,
37442
37572
  access: "view"
37443
37573
  },
37574
+ "cameraGridLayout.getLayout": {
37575
+ capName: "camera-grid-layout",
37576
+ capScope: "device",
37577
+ addonId: null,
37578
+ access: "view"
37579
+ },
37580
+ "cameraGridLayout.saveLayout": {
37581
+ capName: "camera-grid-layout",
37582
+ capScope: "device",
37583
+ addonId: null,
37584
+ access: "create"
37585
+ },
37444
37586
  "cameraStreams.getBrokerStreams": {
37445
37587
  capName: "camera-streams",
37446
37588
  capScope: "device",
@@ -43140,6 +43282,21 @@ Object.freeze({
43140
43282
  form: "single",
43141
43283
  optional: false
43142
43284
  }],
43285
+ "cameraGridLayout.getLayout": [{
43286
+ name: "deviceId",
43287
+ form: "single",
43288
+ optional: false
43289
+ }],
43290
+ "cameraGridLayout.saveLayout": [{
43291
+ name: "cells",
43292
+ form: "object-array",
43293
+ optional: false,
43294
+ itemField: "deviceId"
43295
+ }, {
43296
+ name: "deviceId",
43297
+ form: "single",
43298
+ optional: false
43299
+ }],
43143
43300
  "cameraStreams.getBrokerStreams": [{
43144
43301
  name: "deviceId",
43145
43302
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-tuya",
3
- "version": "0.2.113",
3
+ "version": "0.2.115",
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",