@camstack/addon-provider-tuya 0.2.113 → 0.2.114

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-Bs3xPtSh.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,114 @@ 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 — which is exactly where the
29753
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
29754
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
29755
+ * all use it): the framework emits the structural section and the widget
29756
+ * self-persists through the cap's own mutations.
29757
+ *
29758
+ * ## Why one addon may implement it
29759
+ *
29760
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29761
+ * itself. Nothing else declares a composite camera, so nothing else has a
29762
+ * layout — and the device-scoped route means the widget asks THE camera, not
29763
+ * "the camera-grid addon", which is what let the old custom-action pair be
29764
+ * reached only by a caller that already knew the addon id.
29765
+ *
29766
+ * ## The tab
29767
+ *
29768
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29769
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29770
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29771
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29772
+ * next to "PTZ").
29773
+ */
29774
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29775
+ var GridNormalizedRectSchema = object({
29776
+ x: number().min(0).max(1),
29777
+ y: number().min(0).max(1),
29778
+ width: number().gt(0).max(1),
29779
+ height: number().gt(0).max(1)
29780
+ });
29781
+ /**
29782
+ * One source camera, the part of its picture taken, and where that part lands.
29783
+ *
29784
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29785
+ * — a profile switch, a firmware update, a substream that comes back different
29786
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29787
+ * which is the class of bug nobody files.
29788
+ */
29789
+ var GridLayoutCellSchema = object({
29790
+ deviceId: number().int().positive(),
29791
+ /** The part of the SOURCE taken, normalized against the source. */
29792
+ source: GridNormalizedRectSchema,
29793
+ /** Where it lands, normalized against the CANVAS. */
29794
+ cell: GridNormalizedRectSchema
29795
+ });
29796
+ /**
29797
+ * Which profiles this grid can actually compose, and why not.
29798
+ *
29799
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29800
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29801
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29802
+ * low" is, and it is the one an operator can act on.
29803
+ */
29804
+ var GridProfileOfferSchema = object({
29805
+ profile: _enum([
29806
+ "high",
29807
+ "mid",
29808
+ "low"
29809
+ ]),
29810
+ offered: boolean(),
29811
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29812
+ missingSources: array(number().int().positive())
29813
+ });
29814
+ var GridLayoutViewSchema = object({
29815
+ /** The persisted grid row this camera was declared from. */
29816
+ instanceId: string(),
29817
+ deviceId: number().int().nonnegative(),
29818
+ name: string(),
29819
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29820
+ width: number().int(),
29821
+ height: number().int(),
29822
+ fps: number().int(),
29823
+ cells: array(GridLayoutCellSchema),
29824
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29825
+ profiles: array(GridProfileOfferSchema)
29826
+ });
29827
+ var GridLayoutPatchSchema = object({
29828
+ deviceId: number().int().nonnegative(),
29829
+ name: string().min(1).max(160).optional(),
29830
+ width: number().int().min(160).max(7680).optional(),
29831
+ height: number().int().min(120).max(4320).optional(),
29832
+ fps: number().int().min(1).max(60).optional(),
29833
+ /**
29834
+ * The whole cell list at once. A per-cell patch would need an ordering the
29835
+ * editor does not have, and a half-applied layout is a picture nobody asked
29836
+ * for.
29837
+ */
29838
+ cells: array(GridLayoutCellSchema).max(16)
29839
+ });
29840
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29841
+ kind: "mutation",
29842
+ auth: "admin"
29843
+ });
29844
+ /**
29719
29845
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
29720
29846
  * on-camera motion-detection mask is a single `grid` region (a row-major
29721
29847
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -37442,6 +37568,18 @@ Object.freeze({
37442
37568
  addonId: null,
37443
37569
  access: "view"
37444
37570
  },
37571
+ "cameraGridLayout.getLayout": {
37572
+ capName: "camera-grid-layout",
37573
+ capScope: "device",
37574
+ addonId: null,
37575
+ access: "view"
37576
+ },
37577
+ "cameraGridLayout.saveLayout": {
37578
+ capName: "camera-grid-layout",
37579
+ capScope: "device",
37580
+ addonId: null,
37581
+ access: "create"
37582
+ },
37445
37583
  "cameraStreams.getBrokerStreams": {
37446
37584
  capName: "camera-streams",
37447
37585
  capScope: "device",
@@ -43141,6 +43279,21 @@ Object.freeze({
43141
43279
  form: "single",
43142
43280
  optional: false
43143
43281
  }],
43282
+ "cameraGridLayout.getLayout": [{
43283
+ name: "deviceId",
43284
+ form: "single",
43285
+ optional: false
43286
+ }],
43287
+ "cameraGridLayout.saveLayout": [{
43288
+ name: "cells",
43289
+ form: "object-array",
43290
+ optional: false,
43291
+ itemField: "deviceId"
43292
+ }, {
43293
+ name: "deviceId",
43294
+ form: "single",
43295
+ optional: false
43296
+ }],
43144
43297
  "cameraStreams.getBrokerStreams": [{
43145
43298
  name: "deviceId",
43146
43299
  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-Bs3xPtSh.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,114 @@ 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 — which is exactly where the
29752
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
29753
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
29754
+ * all use it): the framework emits the structural section and the widget
29755
+ * self-persists through the cap's own mutations.
29756
+ *
29757
+ * ## Why one addon may implement it
29758
+ *
29759
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29760
+ * itself. Nothing else declares a composite camera, so nothing else has a
29761
+ * layout — and the device-scoped route means the widget asks THE camera, not
29762
+ * "the camera-grid addon", which is what let the old custom-action pair be
29763
+ * reached only by a caller that already knew the addon id.
29764
+ *
29765
+ * ## The tab
29766
+ *
29767
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29768
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29769
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29770
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29771
+ * next to "PTZ").
29772
+ */
29773
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29774
+ var GridNormalizedRectSchema = object({
29775
+ x: number().min(0).max(1),
29776
+ y: number().min(0).max(1),
29777
+ width: number().gt(0).max(1),
29778
+ height: number().gt(0).max(1)
29779
+ });
29780
+ /**
29781
+ * One source camera, the part of its picture taken, and where that part lands.
29782
+ *
29783
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29784
+ * — a profile switch, a firmware update, a substream that comes back different
29785
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29786
+ * which is the class of bug nobody files.
29787
+ */
29788
+ var GridLayoutCellSchema = object({
29789
+ deviceId: number().int().positive(),
29790
+ /** The part of the SOURCE taken, normalized against the source. */
29791
+ source: GridNormalizedRectSchema,
29792
+ /** Where it lands, normalized against the CANVAS. */
29793
+ cell: GridNormalizedRectSchema
29794
+ });
29795
+ /**
29796
+ * Which profiles this grid can actually compose, and why not.
29797
+ *
29798
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29799
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29800
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29801
+ * low" is, and it is the one an operator can act on.
29802
+ */
29803
+ var GridProfileOfferSchema = object({
29804
+ profile: _enum([
29805
+ "high",
29806
+ "mid",
29807
+ "low"
29808
+ ]),
29809
+ offered: boolean(),
29810
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29811
+ missingSources: array(number().int().positive())
29812
+ });
29813
+ var GridLayoutViewSchema = object({
29814
+ /** The persisted grid row this camera was declared from. */
29815
+ instanceId: string(),
29816
+ deviceId: number().int().nonnegative(),
29817
+ name: string(),
29818
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29819
+ width: number().int(),
29820
+ height: number().int(),
29821
+ fps: number().int(),
29822
+ cells: array(GridLayoutCellSchema),
29823
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29824
+ profiles: array(GridProfileOfferSchema)
29825
+ });
29826
+ var GridLayoutPatchSchema = object({
29827
+ deviceId: number().int().nonnegative(),
29828
+ name: string().min(1).max(160).optional(),
29829
+ width: number().int().min(160).max(7680).optional(),
29830
+ height: number().int().min(120).max(4320).optional(),
29831
+ fps: number().int().min(1).max(60).optional(),
29832
+ /**
29833
+ * The whole cell list at once. A per-cell patch would need an ordering the
29834
+ * editor does not have, and a half-applied layout is a picture nobody asked
29835
+ * for.
29836
+ */
29837
+ cells: array(GridLayoutCellSchema).max(16)
29838
+ });
29839
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29840
+ kind: "mutation",
29841
+ auth: "admin"
29842
+ });
29843
+ /**
29718
29844
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
29719
29845
  * on-camera motion-detection mask is a single `grid` region (a row-major
29720
29846
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -37441,6 +37567,18 @@ Object.freeze({
37441
37567
  addonId: null,
37442
37568
  access: "view"
37443
37569
  },
37570
+ "cameraGridLayout.getLayout": {
37571
+ capName: "camera-grid-layout",
37572
+ capScope: "device",
37573
+ addonId: null,
37574
+ access: "view"
37575
+ },
37576
+ "cameraGridLayout.saveLayout": {
37577
+ capName: "camera-grid-layout",
37578
+ capScope: "device",
37579
+ addonId: null,
37580
+ access: "create"
37581
+ },
37444
37582
  "cameraStreams.getBrokerStreams": {
37445
37583
  capName: "camera-streams",
37446
37584
  capScope: "device",
@@ -43140,6 +43278,21 @@ Object.freeze({
43140
43278
  form: "single",
43141
43279
  optional: false
43142
43280
  }],
43281
+ "cameraGridLayout.getLayout": [{
43282
+ name: "deviceId",
43283
+ form: "single",
43284
+ optional: false
43285
+ }],
43286
+ "cameraGridLayout.saveLayout": [{
43287
+ name: "cells",
43288
+ form: "object-array",
43289
+ optional: false,
43290
+ itemField: "deviceId"
43291
+ }, {
43292
+ name: "deviceId",
43293
+ form: "single",
43294
+ optional: false
43295
+ }],
43143
43296
  "cameraStreams.getBrokerStreams": [{
43144
43297
  name: "deviceId",
43145
43298
  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.114",
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",