@camstack/addon-matter-broker 0.2.112 → 0.2.113

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
@@ -5374,7 +5374,7 @@ var ZodIssueCode = {
5374
5374
  var ZodFirstPartyTypeKind;
5375
5375
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5376
5376
  //#endregion
5377
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5377
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5378
5378
  /**
5379
5379
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5380
5380
  * window to float samples (D455).
@@ -11913,6 +11913,24 @@ var GetStreamWithCodecInputSchema = object({
11913
11913
  });
11914
11914
  var RtpSourceSchema = object({
11915
11915
  url: string$2(),
11916
+ /**
11917
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11918
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11919
+ *
11920
+ * The broker answers it because the broker is the only thing that can:
11921
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11922
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11923
+ * cap bindings would be a second authority, and two authorities on the same
11924
+ * question is how a composite camera ends up dialling a sleeping camera
11925
+ * because its own copy of the rule was a release behind.
11926
+ *
11927
+ * `null` is a real answer and is never a live url in disguise: a consumer
11928
+ * that silently fell back to {@link url} would perform exactly the wake this
11929
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11930
+ * transcode hands back an egress the broker is feeding itself, which has no
11931
+ * sentry counterpart.
11932
+ */
11933
+ sentryUrl: string$2().nullable().optional(),
11916
11934
  videoCodec: _enum(["H264", "H265"]),
11917
11935
  audioCodec: string$2(),
11918
11936
  resolution: object({
@@ -28968,6 +28986,114 @@ var motionTriggerCapability = {
28968
28986
  durability: "session"
28969
28987
  };
28970
28988
  /**
28989
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28990
+ * page.
28991
+ *
28992
+ * ## Why this is a capability and not an addon settings schema
28993
+ *
28994
+ * It was one, and it did not render. The addon declared the editor as a
28995
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28996
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28997
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28998
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28999
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
29000
+ * not on it "falls off silently".
29001
+ *
29002
+ * Adding a fifth name to that list would have been the wrong fix twice over:
29003
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
29004
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
29005
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
29006
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
29007
+ * all use it): the framework emits the structural section and the widget
29008
+ * self-persists through the cap's own mutations.
29009
+ *
29010
+ * ## Why one addon may implement it
29011
+ *
29012
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29013
+ * itself. Nothing else declares a composite camera, so nothing else has a
29014
+ * layout — and the device-scoped route means the widget asks THE camera, not
29015
+ * "the camera-grid addon", which is what let the old custom-action pair be
29016
+ * reached only by a caller that already knew the addon id.
29017
+ *
29018
+ * ## The tab
29019
+ *
29020
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29021
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29022
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29023
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29024
+ * next to "PTZ").
29025
+ */
29026
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29027
+ var GridNormalizedRectSchema = object({
29028
+ x: number().min(0).max(1),
29029
+ y: number().min(0).max(1),
29030
+ width: number().gt(0).max(1),
29031
+ height: number().gt(0).max(1)
29032
+ });
29033
+ /**
29034
+ * One source camera, the part of its picture taken, and where that part lands.
29035
+ *
29036
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29037
+ * — a profile switch, a firmware update, a substream that comes back different
29038
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29039
+ * which is the class of bug nobody files.
29040
+ */
29041
+ var GridLayoutCellSchema = object({
29042
+ deviceId: number().int().positive(),
29043
+ /** The part of the SOURCE taken, normalized against the source. */
29044
+ source: GridNormalizedRectSchema,
29045
+ /** Where it lands, normalized against the CANVAS. */
29046
+ cell: GridNormalizedRectSchema
29047
+ });
29048
+ /**
29049
+ * Which profiles this grid can actually compose, and why not.
29050
+ *
29051
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29052
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29053
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29054
+ * low" is, and it is the one an operator can act on.
29055
+ */
29056
+ var GridProfileOfferSchema = object({
29057
+ profile: _enum([
29058
+ "high",
29059
+ "mid",
29060
+ "low"
29061
+ ]),
29062
+ offered: boolean(),
29063
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29064
+ missingSources: array(number().int().positive())
29065
+ });
29066
+ var GridLayoutViewSchema = object({
29067
+ /** The persisted grid row this camera was declared from. */
29068
+ instanceId: string$2(),
29069
+ deviceId: number().int().nonnegative(),
29070
+ name: string$2(),
29071
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29072
+ width: number().int(),
29073
+ height: number().int(),
29074
+ fps: number().int(),
29075
+ cells: array(GridLayoutCellSchema),
29076
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29077
+ profiles: array(GridProfileOfferSchema)
29078
+ });
29079
+ var GridLayoutPatchSchema = object({
29080
+ deviceId: number().int().nonnegative(),
29081
+ name: string$2().min(1).max(160).optional(),
29082
+ width: number().int().min(160).max(7680).optional(),
29083
+ height: number().int().min(120).max(4320).optional(),
29084
+ fps: number().int().min(1).max(60).optional(),
29085
+ /**
29086
+ * The whole cell list at once. A per-cell patch would need an ordering the
29087
+ * editor does not have, and a half-applied layout is a picture nobody asked
29088
+ * for.
29089
+ */
29090
+ cells: array(GridLayoutCellSchema).max(16)
29091
+ });
29092
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29093
+ kind: "mutation",
29094
+ auth: "admin"
29095
+ });
29096
+ /**
28971
29097
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28972
29098
  * on-camera motion-detection mask is a single `grid` region (a row-major
28973
29099
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -36694,6 +36820,18 @@ Object.freeze({
36694
36820
  addonId: null,
36695
36821
  access: "view"
36696
36822
  },
36823
+ "cameraGridLayout.getLayout": {
36824
+ capName: "camera-grid-layout",
36825
+ capScope: "device",
36826
+ addonId: null,
36827
+ access: "view"
36828
+ },
36829
+ "cameraGridLayout.saveLayout": {
36830
+ capName: "camera-grid-layout",
36831
+ capScope: "device",
36832
+ addonId: null,
36833
+ access: "create"
36834
+ },
36697
36835
  "cameraStreams.getBrokerStreams": {
36698
36836
  capName: "camera-streams",
36699
36837
  capScope: "device",
@@ -42393,6 +42531,21 @@ Object.freeze({
42393
42531
  form: "single",
42394
42532
  optional: false
42395
42533
  }],
42534
+ "cameraGridLayout.getLayout": [{
42535
+ name: "deviceId",
42536
+ form: "single",
42537
+ optional: false
42538
+ }],
42539
+ "cameraGridLayout.saveLayout": [{
42540
+ name: "cells",
42541
+ form: "object-array",
42542
+ optional: false,
42543
+ itemField: "deviceId"
42544
+ }, {
42545
+ name: "deviceId",
42546
+ form: "single",
42547
+ optional: false
42548
+ }],
42396
42549
  "cameraStreams.getBrokerStreams": [{
42397
42550
  name: "deviceId",
42398
42551
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5372,7 +5372,7 @@ var ZodIssueCode = {
5372
5372
  var ZodFirstPartyTypeKind;
5373
5373
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5374
5374
  //#endregion
5375
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5375
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5376
5376
  /**
5377
5377
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5378
5378
  * window to float samples (D455).
@@ -11911,6 +11911,24 @@ var GetStreamWithCodecInputSchema = object({
11911
11911
  });
11912
11912
  var RtpSourceSchema = object({
11913
11913
  url: string$2(),
11914
+ /**
11915
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11916
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11917
+ *
11918
+ * The broker answers it because the broker is the only thing that can:
11919
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11920
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11921
+ * cap bindings would be a second authority, and two authorities on the same
11922
+ * question is how a composite camera ends up dialling a sleeping camera
11923
+ * because its own copy of the rule was a release behind.
11924
+ *
11925
+ * `null` is a real answer and is never a live url in disguise: a consumer
11926
+ * that silently fell back to {@link url} would perform exactly the wake this
11927
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11928
+ * transcode hands back an egress the broker is feeding itself, which has no
11929
+ * sentry counterpart.
11930
+ */
11931
+ sentryUrl: string$2().nullable().optional(),
11914
11932
  videoCodec: _enum(["H264", "H265"]),
11915
11933
  audioCodec: string$2(),
11916
11934
  resolution: object({
@@ -28966,6 +28984,114 @@ var motionTriggerCapability = {
28966
28984
  durability: "session"
28967
28985
  };
28968
28986
  /**
28987
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28988
+ * page.
28989
+ *
28990
+ * ## Why this is a capability and not an addon settings schema
28991
+ *
28992
+ * It was one, and it did not render. The addon declared the editor as a
28993
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28994
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28995
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28996
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28997
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
28998
+ * not on it "falls off silently".
28999
+ *
29000
+ * Adding a fifth name to that list would have been the wrong fix twice over:
29001
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
29002
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
29003
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
29004
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
29005
+ * all use it): the framework emits the structural section and the widget
29006
+ * self-persists through the cap's own mutations.
29007
+ *
29008
+ * ## Why one addon may implement it
29009
+ *
29010
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29011
+ * itself. Nothing else declares a composite camera, so nothing else has a
29012
+ * layout — and the device-scoped route means the widget asks THE camera, not
29013
+ * "the camera-grid addon", which is what let the old custom-action pair be
29014
+ * reached only by a caller that already knew the addon id.
29015
+ *
29016
+ * ## The tab
29017
+ *
29018
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29019
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29020
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29021
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29022
+ * next to "PTZ").
29023
+ */
29024
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29025
+ var GridNormalizedRectSchema = object({
29026
+ x: number().min(0).max(1),
29027
+ y: number().min(0).max(1),
29028
+ width: number().gt(0).max(1),
29029
+ height: number().gt(0).max(1)
29030
+ });
29031
+ /**
29032
+ * One source camera, the part of its picture taken, and where that part lands.
29033
+ *
29034
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29035
+ * — a profile switch, a firmware update, a substream that comes back different
29036
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29037
+ * which is the class of bug nobody files.
29038
+ */
29039
+ var GridLayoutCellSchema = object({
29040
+ deviceId: number().int().positive(),
29041
+ /** The part of the SOURCE taken, normalized against the source. */
29042
+ source: GridNormalizedRectSchema,
29043
+ /** Where it lands, normalized against the CANVAS. */
29044
+ cell: GridNormalizedRectSchema
29045
+ });
29046
+ /**
29047
+ * Which profiles this grid can actually compose, and why not.
29048
+ *
29049
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29050
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29051
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29052
+ * low" is, and it is the one an operator can act on.
29053
+ */
29054
+ var GridProfileOfferSchema = object({
29055
+ profile: _enum([
29056
+ "high",
29057
+ "mid",
29058
+ "low"
29059
+ ]),
29060
+ offered: boolean(),
29061
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29062
+ missingSources: array(number().int().positive())
29063
+ });
29064
+ var GridLayoutViewSchema = object({
29065
+ /** The persisted grid row this camera was declared from. */
29066
+ instanceId: string$2(),
29067
+ deviceId: number().int().nonnegative(),
29068
+ name: string$2(),
29069
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29070
+ width: number().int(),
29071
+ height: number().int(),
29072
+ fps: number().int(),
29073
+ cells: array(GridLayoutCellSchema),
29074
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29075
+ profiles: array(GridProfileOfferSchema)
29076
+ });
29077
+ var GridLayoutPatchSchema = object({
29078
+ deviceId: number().int().nonnegative(),
29079
+ name: string$2().min(1).max(160).optional(),
29080
+ width: number().int().min(160).max(7680).optional(),
29081
+ height: number().int().min(120).max(4320).optional(),
29082
+ fps: number().int().min(1).max(60).optional(),
29083
+ /**
29084
+ * The whole cell list at once. A per-cell patch would need an ordering the
29085
+ * editor does not have, and a half-applied layout is a picture nobody asked
29086
+ * for.
29087
+ */
29088
+ cells: array(GridLayoutCellSchema).max(16)
29089
+ });
29090
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29091
+ kind: "mutation",
29092
+ auth: "admin"
29093
+ });
29094
+ /**
28969
29095
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28970
29096
  * on-camera motion-detection mask is a single `grid` region (a row-major
28971
29097
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -36692,6 +36818,18 @@ Object.freeze({
36692
36818
  addonId: null,
36693
36819
  access: "view"
36694
36820
  },
36821
+ "cameraGridLayout.getLayout": {
36822
+ capName: "camera-grid-layout",
36823
+ capScope: "device",
36824
+ addonId: null,
36825
+ access: "view"
36826
+ },
36827
+ "cameraGridLayout.saveLayout": {
36828
+ capName: "camera-grid-layout",
36829
+ capScope: "device",
36830
+ addonId: null,
36831
+ access: "create"
36832
+ },
36695
36833
  "cameraStreams.getBrokerStreams": {
36696
36834
  capName: "camera-streams",
36697
36835
  capScope: "device",
@@ -42391,6 +42529,21 @@ Object.freeze({
42391
42529
  form: "single",
42392
42530
  optional: false
42393
42531
  }],
42532
+ "cameraGridLayout.getLayout": [{
42533
+ name: "deviceId",
42534
+ form: "single",
42535
+ optional: false
42536
+ }],
42537
+ "cameraGridLayout.saveLayout": [{
42538
+ name: "cells",
42539
+ form: "object-array",
42540
+ optional: false,
42541
+ itemField: "deviceId"
42542
+ }, {
42543
+ name: "deviceId",
42544
+ form: "single",
42545
+ optional: false
42546
+ }],
42394
42547
  "cameraStreams.getBrokerStreams": [{
42395
42548
  name: "deviceId",
42396
42549
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-matter-broker",
3
- "version": "0.2.112",
3
+ "version": "0.2.113",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",