@camstack/addon-mqtt-broker 1.2.113 → 1.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.
@@ -5405,7 +5405,7 @@ var ZodIssueCode = {
5405
5405
  var ZodFirstPartyTypeKind;
5406
5406
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5407
5407
  //#endregion
5408
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5408
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5409
5409
  /**
5410
5410
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5411
5411
  * window to float samples (D455).
@@ -11899,6 +11899,24 @@ var GetStreamWithCodecInputSchema = object({
11899
11899
  });
11900
11900
  var RtpSourceSchema = object({
11901
11901
  url: string(),
11902
+ /**
11903
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11904
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11905
+ *
11906
+ * The broker answers it because the broker is the only thing that can:
11907
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11908
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11909
+ * cap bindings would be a second authority, and two authorities on the same
11910
+ * question is how a composite camera ends up dialling a sleeping camera
11911
+ * because its own copy of the rule was a release behind.
11912
+ *
11913
+ * `null` is a real answer and is never a live url in disguise: a consumer
11914
+ * that silently fell back to {@link url} would perform exactly the wake this
11915
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11916
+ * transcode hands back an egress the broker is feeding itself, which has no
11917
+ * sentry counterpart.
11918
+ */
11919
+ sentryUrl: string().nullable().optional(),
11902
11920
  videoCodec: _enum(["H264", "H265"]),
11903
11921
  audioCodec: string(),
11904
11922
  resolution: object({
@@ -27260,6 +27278,114 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
27260
27278
  lastChangedAt: number()
27261
27279
  });
27262
27280
  /**
27281
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
27282
+ * page.
27283
+ *
27284
+ * ## Why this is a capability and not an addon settings schema
27285
+ *
27286
+ * It was one, and it did not render. The addon declared the editor as a
27287
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
27288
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
27289
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
27290
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
27291
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
27292
+ * not on it "falls off silently".
27293
+ *
27294
+ * Adding a fifth name to that list would have been the wrong fix twice over:
27295
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
27296
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
27297
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
27298
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
27299
+ * all use it): the framework emits the structural section and the widget
27300
+ * self-persists through the cap's own mutations.
27301
+ *
27302
+ * ## Why one addon may implement it
27303
+ *
27304
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
27305
+ * itself. Nothing else declares a composite camera, so nothing else has a
27306
+ * layout — and the device-scoped route means the widget asks THE camera, not
27307
+ * "the camera-grid addon", which is what let the old custom-action pair be
27308
+ * reached only by a caller that already knew the addon id.
27309
+ *
27310
+ * ## The tab
27311
+ *
27312
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
27313
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
27314
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
27315
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
27316
+ * next to "PTZ").
27317
+ */
27318
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
27319
+ var GridNormalizedRectSchema = object({
27320
+ x: number().min(0).max(1),
27321
+ y: number().min(0).max(1),
27322
+ width: number().gt(0).max(1),
27323
+ height: number().gt(0).max(1)
27324
+ });
27325
+ /**
27326
+ * One source camera, the part of its picture taken, and where that part lands.
27327
+ *
27328
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
27329
+ * — a profile switch, a firmware update, a substream that comes back different
27330
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
27331
+ * which is the class of bug nobody files.
27332
+ */
27333
+ var GridLayoutCellSchema = object({
27334
+ deviceId: number().int().positive(),
27335
+ /** The part of the SOURCE taken, normalized against the source. */
27336
+ source: GridNormalizedRectSchema,
27337
+ /** Where it lands, normalized against the CANVAS. */
27338
+ cell: GridNormalizedRectSchema
27339
+ });
27340
+ /**
27341
+ * Which profiles this grid can actually compose, and why not.
27342
+ *
27343
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
27344
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
27345
+ * the sources, because "this grid has no low" is not a finding — "615 has no
27346
+ * low" is, and it is the one an operator can act on.
27347
+ */
27348
+ var GridProfileOfferSchema = object({
27349
+ profile: _enum([
27350
+ "high",
27351
+ "mid",
27352
+ "low"
27353
+ ]),
27354
+ offered: boolean(),
27355
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
27356
+ missingSources: array(number().int().positive())
27357
+ });
27358
+ var GridLayoutViewSchema = object({
27359
+ /** The persisted grid row this camera was declared from. */
27360
+ instanceId: string(),
27361
+ deviceId: number().int().nonnegative(),
27362
+ name: string(),
27363
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
27364
+ width: number().int(),
27365
+ height: number().int(),
27366
+ fps: number().int(),
27367
+ cells: array(GridLayoutCellSchema),
27368
+ /** What the catalog will publish, and what it refuses to. Read-only. */
27369
+ profiles: array(GridProfileOfferSchema)
27370
+ });
27371
+ var GridLayoutPatchSchema = object({
27372
+ deviceId: number().int().nonnegative(),
27373
+ name: string().min(1).max(160).optional(),
27374
+ width: number().int().min(160).max(7680).optional(),
27375
+ height: number().int().min(120).max(4320).optional(),
27376
+ fps: number().int().min(1).max(60).optional(),
27377
+ /**
27378
+ * The whole cell list at once. A per-cell patch would need an ordering the
27379
+ * editor does not have, and a half-applied layout is a picture nobody asked
27380
+ * for.
27381
+ */
27382
+ cells: array(GridLayoutCellSchema).max(16)
27383
+ });
27384
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
27385
+ kind: "mutation",
27386
+ auth: "admin"
27387
+ });
27388
+ /**
27263
27389
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
27264
27390
  * on-camera motion-detection mask is a single `grid` region (a row-major
27265
27391
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -32288,6 +32414,18 @@ Object.freeze({
32288
32414
  addonId: null,
32289
32415
  access: "view"
32290
32416
  },
32417
+ "cameraGridLayout.getLayout": {
32418
+ capName: "camera-grid-layout",
32419
+ capScope: "device",
32420
+ addonId: null,
32421
+ access: "view"
32422
+ },
32423
+ "cameraGridLayout.saveLayout": {
32424
+ capName: "camera-grid-layout",
32425
+ capScope: "device",
32426
+ addonId: null,
32427
+ access: "create"
32428
+ },
32291
32429
  "cameraStreams.getBrokerStreams": {
32292
32430
  capName: "camera-streams",
32293
32431
  capScope: "device",
@@ -37987,6 +38125,21 @@ Object.freeze({
37987
38125
  form: "single",
37988
38126
  optional: false
37989
38127
  }],
38128
+ "cameraGridLayout.getLayout": [{
38129
+ name: "deviceId",
38130
+ form: "single",
38131
+ optional: false
38132
+ }],
38133
+ "cameraGridLayout.saveLayout": [{
38134
+ name: "cells",
38135
+ form: "object-array",
38136
+ optional: false,
38137
+ itemField: "deviceId"
38138
+ }, {
38139
+ name: "deviceId",
38140
+ form: "single",
38141
+ optional: false
38142
+ }],
37990
38143
  "cameraStreams.getBrokerStreams": [{
37991
38144
  name: "deviceId",
37992
38145
  form: "single",
@@ -5400,7 +5400,7 @@ var ZodIssueCode = {
5400
5400
  var ZodFirstPartyTypeKind;
5401
5401
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5402
5402
  //#endregion
5403
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5403
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5404
5404
  /**
5405
5405
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5406
5406
  * window to float samples (D455).
@@ -11894,6 +11894,24 @@ var GetStreamWithCodecInputSchema = object({
11894
11894
  });
11895
11895
  var RtpSourceSchema = object({
11896
11896
  url: string(),
11897
+ /**
11898
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11899
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11900
+ *
11901
+ * The broker answers it because the broker is the only thing that can:
11902
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11903
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11904
+ * cap bindings would be a second authority, and two authorities on the same
11905
+ * question is how a composite camera ends up dialling a sleeping camera
11906
+ * because its own copy of the rule was a release behind.
11907
+ *
11908
+ * `null` is a real answer and is never a live url in disguise: a consumer
11909
+ * that silently fell back to {@link url} would perform exactly the wake this
11910
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11911
+ * transcode hands back an egress the broker is feeding itself, which has no
11912
+ * sentry counterpart.
11913
+ */
11914
+ sentryUrl: string().nullable().optional(),
11897
11915
  videoCodec: _enum(["H264", "H265"]),
11898
11916
  audioCodec: string(),
11899
11917
  resolution: object({
@@ -27255,6 +27273,114 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
27255
27273
  lastChangedAt: number()
27256
27274
  });
27257
27275
  /**
27276
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
27277
+ * page.
27278
+ *
27279
+ * ## Why this is a capability and not an addon settings schema
27280
+ *
27281
+ * It was one, and it did not render. The addon declared the editor as a
27282
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
27283
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
27284
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
27285
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
27286
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
27287
+ * not on it "falls off silently".
27288
+ *
27289
+ * Adding a fifth name to that list would have been the wrong fix twice over:
27290
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
27291
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
27292
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
27293
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
27294
+ * all use it): the framework emits the structural section and the widget
27295
+ * self-persists through the cap's own mutations.
27296
+ *
27297
+ * ## Why one addon may implement it
27298
+ *
27299
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
27300
+ * itself. Nothing else declares a composite camera, so nothing else has a
27301
+ * layout — and the device-scoped route means the widget asks THE camera, not
27302
+ * "the camera-grid addon", which is what let the old custom-action pair be
27303
+ * reached only by a caller that already knew the addon id.
27304
+ *
27305
+ * ## The tab
27306
+ *
27307
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
27308
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
27309
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
27310
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
27311
+ * next to "PTZ").
27312
+ */
27313
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
27314
+ var GridNormalizedRectSchema = object({
27315
+ x: number().min(0).max(1),
27316
+ y: number().min(0).max(1),
27317
+ width: number().gt(0).max(1),
27318
+ height: number().gt(0).max(1)
27319
+ });
27320
+ /**
27321
+ * One source camera, the part of its picture taken, and where that part lands.
27322
+ *
27323
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
27324
+ * — a profile switch, a firmware update, a substream that comes back different
27325
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
27326
+ * which is the class of bug nobody files.
27327
+ */
27328
+ var GridLayoutCellSchema = object({
27329
+ deviceId: number().int().positive(),
27330
+ /** The part of the SOURCE taken, normalized against the source. */
27331
+ source: GridNormalizedRectSchema,
27332
+ /** Where it lands, normalized against the CANVAS. */
27333
+ cell: GridNormalizedRectSchema
27334
+ });
27335
+ /**
27336
+ * Which profiles this grid can actually compose, and why not.
27337
+ *
27338
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
27339
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
27340
+ * the sources, because "this grid has no low" is not a finding — "615 has no
27341
+ * low" is, and it is the one an operator can act on.
27342
+ */
27343
+ var GridProfileOfferSchema = object({
27344
+ profile: _enum([
27345
+ "high",
27346
+ "mid",
27347
+ "low"
27348
+ ]),
27349
+ offered: boolean(),
27350
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
27351
+ missingSources: array(number().int().positive())
27352
+ });
27353
+ var GridLayoutViewSchema = object({
27354
+ /** The persisted grid row this camera was declared from. */
27355
+ instanceId: string(),
27356
+ deviceId: number().int().nonnegative(),
27357
+ name: string(),
27358
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
27359
+ width: number().int(),
27360
+ height: number().int(),
27361
+ fps: number().int(),
27362
+ cells: array(GridLayoutCellSchema),
27363
+ /** What the catalog will publish, and what it refuses to. Read-only. */
27364
+ profiles: array(GridProfileOfferSchema)
27365
+ });
27366
+ var GridLayoutPatchSchema = object({
27367
+ deviceId: number().int().nonnegative(),
27368
+ name: string().min(1).max(160).optional(),
27369
+ width: number().int().min(160).max(7680).optional(),
27370
+ height: number().int().min(120).max(4320).optional(),
27371
+ fps: number().int().min(1).max(60).optional(),
27372
+ /**
27373
+ * The whole cell list at once. A per-cell patch would need an ordering the
27374
+ * editor does not have, and a half-applied layout is a picture nobody asked
27375
+ * for.
27376
+ */
27377
+ cells: array(GridLayoutCellSchema).max(16)
27378
+ });
27379
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
27380
+ kind: "mutation",
27381
+ auth: "admin"
27382
+ });
27383
+ /**
27258
27384
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
27259
27385
  * on-camera motion-detection mask is a single `grid` region (a row-major
27260
27386
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -32283,6 +32409,18 @@ Object.freeze({
32283
32409
  addonId: null,
32284
32410
  access: "view"
32285
32411
  },
32412
+ "cameraGridLayout.getLayout": {
32413
+ capName: "camera-grid-layout",
32414
+ capScope: "device",
32415
+ addonId: null,
32416
+ access: "view"
32417
+ },
32418
+ "cameraGridLayout.saveLayout": {
32419
+ capName: "camera-grid-layout",
32420
+ capScope: "device",
32421
+ addonId: null,
32422
+ access: "create"
32423
+ },
32286
32424
  "cameraStreams.getBrokerStreams": {
32287
32425
  capName: "camera-streams",
32288
32426
  capScope: "device",
@@ -37982,6 +38120,21 @@ Object.freeze({
37982
38120
  form: "single",
37983
38121
  optional: false
37984
38122
  }],
38123
+ "cameraGridLayout.getLayout": [{
38124
+ name: "deviceId",
38125
+ form: "single",
38126
+ optional: false
38127
+ }],
38128
+ "cameraGridLayout.saveLayout": [{
38129
+ name: "cells",
38130
+ form: "object-array",
38131
+ optional: false,
38132
+ itemField: "deviceId"
38133
+ }, {
38134
+ name: "deviceId",
38135
+ form: "single",
38136
+ optional: false
38137
+ }],
37985
38138
  "cameraStreams.getBrokerStreams": [{
37986
38139
  name: "deviceId",
37987
38140
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.2.113",
3
+ "version": "1.2.114",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",