@camstack/addon-provider-unifi 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
@@ -5360,7 +5360,7 @@ var ZodIssueCode = {
5360
5360
  var ZodFirstPartyTypeKind;
5361
5361
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5362
5362
  //#endregion
5363
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5363
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5364
5364
  /**
5365
5365
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5366
5366
  * window to float samples (D455).
@@ -11850,6 +11850,24 @@ var GetStreamWithCodecInputSchema = object({
11850
11850
  });
11851
11851
  var RtpSourceSchema = object({
11852
11852
  url: string(),
11853
+ /**
11854
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11855
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11856
+ *
11857
+ * The broker answers it because the broker is the only thing that can:
11858
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11859
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11860
+ * cap bindings would be a second authority, and two authorities on the same
11861
+ * question is how a composite camera ends up dialling a sleeping camera
11862
+ * because its own copy of the rule was a release behind.
11863
+ *
11864
+ * `null` is a real answer and is never a live url in disguise: a consumer
11865
+ * that silently fell back to {@link url} would perform exactly the wake this
11866
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11867
+ * transcode hands back an egress the broker is feeding itself, which has no
11868
+ * sentry counterpart.
11869
+ */
11870
+ sentryUrl: string().nullable().optional(),
11853
11871
  videoCodec: _enum(["H264", "H265"]),
11854
11872
  audioCodec: string(),
11855
11873
  resolution: object({
@@ -28888,6 +28906,114 @@ var motionTriggerCapability = {
28888
28906
  durability: "session"
28889
28907
  };
28890
28908
  /**
28909
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28910
+ * page.
28911
+ *
28912
+ * ## Why this is a capability and not an addon settings schema
28913
+ *
28914
+ * It was one, and it did not render. The addon declared the editor as a
28915
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28916
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28917
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28918
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28919
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
28920
+ * not on it "falls off silently".
28921
+ *
28922
+ * Adding a fifth name to that list would have been the wrong fix twice over:
28923
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
28924
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
28925
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
28926
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
28927
+ * all use it): the framework emits the structural section and the widget
28928
+ * self-persists through the cap's own mutations.
28929
+ *
28930
+ * ## Why one addon may implement it
28931
+ *
28932
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
28933
+ * itself. Nothing else declares a composite camera, so nothing else has a
28934
+ * layout — and the device-scoped route means the widget asks THE camera, not
28935
+ * "the camera-grid addon", which is what let the old custom-action pair be
28936
+ * reached only by a caller that already knew the addon id.
28937
+ *
28938
+ * ## The tab
28939
+ *
28940
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28941
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28942
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28943
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28944
+ * next to "PTZ").
28945
+ */
28946
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28947
+ var GridNormalizedRectSchema = object({
28948
+ x: number().min(0).max(1),
28949
+ y: number().min(0).max(1),
28950
+ width: number().gt(0).max(1),
28951
+ height: number().gt(0).max(1)
28952
+ });
28953
+ /**
28954
+ * One source camera, the part of its picture taken, and where that part lands.
28955
+ *
28956
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28957
+ * — a profile switch, a firmware update, a substream that comes back different
28958
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28959
+ * which is the class of bug nobody files.
28960
+ */
28961
+ var GridLayoutCellSchema = object({
28962
+ deviceId: number().int().positive(),
28963
+ /** The part of the SOURCE taken, normalized against the source. */
28964
+ source: GridNormalizedRectSchema,
28965
+ /** Where it lands, normalized against the CANVAS. */
28966
+ cell: GridNormalizedRectSchema
28967
+ });
28968
+ /**
28969
+ * Which profiles this grid can actually compose, and why not.
28970
+ *
28971
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28972
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
28973
+ * the sources, because "this grid has no low" is not a finding — "615 has no
28974
+ * low" is, and it is the one an operator can act on.
28975
+ */
28976
+ var GridProfileOfferSchema = object({
28977
+ profile: _enum([
28978
+ "high",
28979
+ "mid",
28980
+ "low"
28981
+ ]),
28982
+ offered: boolean(),
28983
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28984
+ missingSources: array(number().int().positive())
28985
+ });
28986
+ var GridLayoutViewSchema = object({
28987
+ /** The persisted grid row this camera was declared from. */
28988
+ instanceId: string(),
28989
+ deviceId: number().int().nonnegative(),
28990
+ name: string(),
28991
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
28992
+ width: number().int(),
28993
+ height: number().int(),
28994
+ fps: number().int(),
28995
+ cells: array(GridLayoutCellSchema),
28996
+ /** What the catalog will publish, and what it refuses to. Read-only. */
28997
+ profiles: array(GridProfileOfferSchema)
28998
+ });
28999
+ var GridLayoutPatchSchema = object({
29000
+ deviceId: number().int().nonnegative(),
29001
+ name: string().min(1).max(160).optional(),
29002
+ width: number().int().min(160).max(7680).optional(),
29003
+ height: number().int().min(120).max(4320).optional(),
29004
+ fps: number().int().min(1).max(60).optional(),
29005
+ /**
29006
+ * The whole cell list at once. A per-cell patch would need an ordering the
29007
+ * editor does not have, and a half-applied layout is a picture nobody asked
29008
+ * for.
29009
+ */
29010
+ cells: array(GridLayoutCellSchema).max(16)
29011
+ });
29012
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29013
+ kind: "mutation",
29014
+ auth: "admin"
29015
+ });
29016
+ /**
28891
29017
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28892
29018
  * on-camera motion-detection mask is a single `grid` region (a row-major
28893
29019
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -36614,6 +36740,18 @@ Object.freeze({
36614
36740
  addonId: null,
36615
36741
  access: "view"
36616
36742
  },
36743
+ "cameraGridLayout.getLayout": {
36744
+ capName: "camera-grid-layout",
36745
+ capScope: "device",
36746
+ addonId: null,
36747
+ access: "view"
36748
+ },
36749
+ "cameraGridLayout.saveLayout": {
36750
+ capName: "camera-grid-layout",
36751
+ capScope: "device",
36752
+ addonId: null,
36753
+ access: "create"
36754
+ },
36617
36755
  "cameraStreams.getBrokerStreams": {
36618
36756
  capName: "camera-streams",
36619
36757
  capScope: "device",
@@ -42313,6 +42451,21 @@ Object.freeze({
42313
42451
  form: "single",
42314
42452
  optional: false
42315
42453
  }],
42454
+ "cameraGridLayout.getLayout": [{
42455
+ name: "deviceId",
42456
+ form: "single",
42457
+ optional: false
42458
+ }],
42459
+ "cameraGridLayout.saveLayout": [{
42460
+ name: "cells",
42461
+ form: "object-array",
42462
+ optional: false,
42463
+ itemField: "deviceId"
42464
+ }, {
42465
+ name: "deviceId",
42466
+ form: "single",
42467
+ optional: false
42468
+ }],
42316
42469
  "cameraStreams.getBrokerStreams": [{
42317
42470
  name: "deviceId",
42318
42471
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
5359
5359
  var ZodFirstPartyTypeKind;
5360
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5361
5361
  //#endregion
5362
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5362
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5363
5363
  /**
5364
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5365
5365
  * window to float samples (D455).
@@ -11849,6 +11849,24 @@ var GetStreamWithCodecInputSchema = object({
11849
11849
  });
11850
11850
  var RtpSourceSchema = object({
11851
11851
  url: string(),
11852
+ /**
11853
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11854
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11855
+ *
11856
+ * The broker answers it because the broker is the only thing that can:
11857
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11858
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11859
+ * cap bindings would be a second authority, and two authorities on the same
11860
+ * question is how a composite camera ends up dialling a sleeping camera
11861
+ * because its own copy of the rule was a release behind.
11862
+ *
11863
+ * `null` is a real answer and is never a live url in disguise: a consumer
11864
+ * that silently fell back to {@link url} would perform exactly the wake this
11865
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11866
+ * transcode hands back an egress the broker is feeding itself, which has no
11867
+ * sentry counterpart.
11868
+ */
11869
+ sentryUrl: string().nullable().optional(),
11852
11870
  videoCodec: _enum(["H264", "H265"]),
11853
11871
  audioCodec: string(),
11854
11872
  resolution: object({
@@ -28887,6 +28905,114 @@ var motionTriggerCapability = {
28887
28905
  durability: "session"
28888
28906
  };
28889
28907
  /**
28908
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28909
+ * page.
28910
+ *
28911
+ * ## Why this is a capability and not an addon settings schema
28912
+ *
28913
+ * It was one, and it did not render. The addon declared the editor as a
28914
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28915
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28916
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28917
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28918
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
28919
+ * not on it "falls off silently".
28920
+ *
28921
+ * Adding a fifth name to that list would have been the wrong fix twice over:
28922
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
28923
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
28924
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
28925
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
28926
+ * all use it): the framework emits the structural section and the widget
28927
+ * self-persists through the cap's own mutations.
28928
+ *
28929
+ * ## Why one addon may implement it
28930
+ *
28931
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
28932
+ * itself. Nothing else declares a composite camera, so nothing else has a
28933
+ * layout — and the device-scoped route means the widget asks THE camera, not
28934
+ * "the camera-grid addon", which is what let the old custom-action pair be
28935
+ * reached only by a caller that already knew the addon id.
28936
+ *
28937
+ * ## The tab
28938
+ *
28939
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28940
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28941
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28942
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28943
+ * next to "PTZ").
28944
+ */
28945
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28946
+ var GridNormalizedRectSchema = object({
28947
+ x: number().min(0).max(1),
28948
+ y: number().min(0).max(1),
28949
+ width: number().gt(0).max(1),
28950
+ height: number().gt(0).max(1)
28951
+ });
28952
+ /**
28953
+ * One source camera, the part of its picture taken, and where that part lands.
28954
+ *
28955
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28956
+ * — a profile switch, a firmware update, a substream that comes back different
28957
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28958
+ * which is the class of bug nobody files.
28959
+ */
28960
+ var GridLayoutCellSchema = object({
28961
+ deviceId: number().int().positive(),
28962
+ /** The part of the SOURCE taken, normalized against the source. */
28963
+ source: GridNormalizedRectSchema,
28964
+ /** Where it lands, normalized against the CANVAS. */
28965
+ cell: GridNormalizedRectSchema
28966
+ });
28967
+ /**
28968
+ * Which profiles this grid can actually compose, and why not.
28969
+ *
28970
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28971
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
28972
+ * the sources, because "this grid has no low" is not a finding — "615 has no
28973
+ * low" is, and it is the one an operator can act on.
28974
+ */
28975
+ var GridProfileOfferSchema = object({
28976
+ profile: _enum([
28977
+ "high",
28978
+ "mid",
28979
+ "low"
28980
+ ]),
28981
+ offered: boolean(),
28982
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28983
+ missingSources: array(number().int().positive())
28984
+ });
28985
+ var GridLayoutViewSchema = object({
28986
+ /** The persisted grid row this camera was declared from. */
28987
+ instanceId: string(),
28988
+ deviceId: number().int().nonnegative(),
28989
+ name: string(),
28990
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
28991
+ width: number().int(),
28992
+ height: number().int(),
28993
+ fps: number().int(),
28994
+ cells: array(GridLayoutCellSchema),
28995
+ /** What the catalog will publish, and what it refuses to. Read-only. */
28996
+ profiles: array(GridProfileOfferSchema)
28997
+ });
28998
+ var GridLayoutPatchSchema = object({
28999
+ deviceId: number().int().nonnegative(),
29000
+ name: string().min(1).max(160).optional(),
29001
+ width: number().int().min(160).max(7680).optional(),
29002
+ height: number().int().min(120).max(4320).optional(),
29003
+ fps: number().int().min(1).max(60).optional(),
29004
+ /**
29005
+ * The whole cell list at once. A per-cell patch would need an ordering the
29006
+ * editor does not have, and a half-applied layout is a picture nobody asked
29007
+ * for.
29008
+ */
29009
+ cells: array(GridLayoutCellSchema).max(16)
29010
+ });
29011
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29012
+ kind: "mutation",
29013
+ auth: "admin"
29014
+ });
29015
+ /**
28890
29016
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28891
29017
  * on-camera motion-detection mask is a single `grid` region (a row-major
28892
29018
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -36613,6 +36739,18 @@ Object.freeze({
36613
36739
  addonId: null,
36614
36740
  access: "view"
36615
36741
  },
36742
+ "cameraGridLayout.getLayout": {
36743
+ capName: "camera-grid-layout",
36744
+ capScope: "device",
36745
+ addonId: null,
36746
+ access: "view"
36747
+ },
36748
+ "cameraGridLayout.saveLayout": {
36749
+ capName: "camera-grid-layout",
36750
+ capScope: "device",
36751
+ addonId: null,
36752
+ access: "create"
36753
+ },
36616
36754
  "cameraStreams.getBrokerStreams": {
36617
36755
  capName: "camera-streams",
36618
36756
  capScope: "device",
@@ -42312,6 +42450,21 @@ Object.freeze({
42312
42450
  form: "single",
42313
42451
  optional: false
42314
42452
  }],
42453
+ "cameraGridLayout.getLayout": [{
42454
+ name: "deviceId",
42455
+ form: "single",
42456
+ optional: false
42457
+ }],
42458
+ "cameraGridLayout.saveLayout": [{
42459
+ name: "cells",
42460
+ form: "object-array",
42461
+ optional: false,
42462
+ itemField: "deviceId"
42463
+ }, {
42464
+ name: "deviceId",
42465
+ form: "single",
42466
+ optional: false
42467
+ }],
42315
42468
  "cameraStreams.getBrokerStreams": [{
42316
42469
  name: "deviceId",
42317
42470
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.113",
3
+ "version": "0.2.114",
4
4
  "description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
5
5
  "keywords": [
6
6
  "camstack",