@camstack/addon-agent-ui 1.2.118 → 1.2.120

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.
Files changed (2) hide show
  1. package/dist/addon.js +159 -2
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5361,7 +5361,7 @@ var ZodIssueCode = {
5361
5361
  var ZodFirstPartyTypeKind;
5362
5362
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5363
5363
  //#endregion
5364
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5364
+ //#region ../types/dist/sleep-GU_us3DG.mjs
5365
5365
  /**
5366
5366
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5367
5367
  * window to float samples (D455).
@@ -11824,6 +11824,24 @@ var GetStreamWithCodecInputSchema = object({
11824
11824
  });
11825
11825
  var RtpSourceSchema = object({
11826
11826
  url: string(),
11827
+ /**
11828
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11829
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11830
+ *
11831
+ * The broker answers it because the broker is the only thing that can:
11832
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11833
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11834
+ * cap bindings would be a second authority, and two authorities on the same
11835
+ * question is how a composite camera ends up dialling a sleeping camera
11836
+ * because its own copy of the rule was a release behind.
11837
+ *
11838
+ * `null` is a real answer and is never a live url in disguise: a consumer
11839
+ * that silently fell back to {@link url} would perform exactly the wake this
11840
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11841
+ * transcode hands back an egress the broker is feeding itself, which has no
11842
+ * sentry counterpart.
11843
+ */
11844
+ sentryUrl: string().nullable().optional(),
11827
11845
  videoCodec: _enum(["H264", "H265"]),
11828
11846
  audioCodec: string(),
11829
11847
  resolution: object({
@@ -27166,6 +27184,118 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
27166
27184
  lastChangedAt: number()
27167
27185
  });
27168
27186
  /**
27187
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
27188
+ * page.
27189
+ *
27190
+ * ## Why this is a capability and not an addon settings schema
27191
+ *
27192
+ * It was one, and it did not render. The addon declared the editor as a
27193
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
27194
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
27195
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
27196
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
27197
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
27198
+ * not on it "falls off silently".
27199
+ *
27200
+ * Adding a fifth name to that list would have been the wrong fix twice over:
27201
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
27202
+ * beside PTZ and motion zones on the camera itself. The device page is
27203
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
27204
+ * and this cap carries its section the way `recording` does, by RETURNING it
27205
+ * from `getDeviceSettingsContribution`.
27206
+ *
27207
+ * Seven other widgets are still declared the other way, through a
27208
+ * `deviceConfig.ui` block the framework derives a section from. That route
27209
+ * gives the addon no say in where its own panel lands and no way to decline
27210
+ * for a device the panel does not suit, which is why this one does not use it.
27211
+ *
27212
+ * ## Why one addon may implement it
27213
+ *
27214
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
27215
+ * itself. Nothing else declares a composite camera, so nothing else has a
27216
+ * layout — and the device-scoped route means the widget asks THE camera, not
27217
+ * "the camera-grid addon", which is what let the old custom-action pair be
27218
+ * reached only by a caller that already knew the addon id.
27219
+ *
27220
+ * ## The tab
27221
+ *
27222
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
27223
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
27224
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
27225
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
27226
+ * next to "PTZ").
27227
+ */
27228
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
27229
+ var GridNormalizedRectSchema = object({
27230
+ x: number().min(0).max(1),
27231
+ y: number().min(0).max(1),
27232
+ width: number().gt(0).max(1),
27233
+ height: number().gt(0).max(1)
27234
+ });
27235
+ /**
27236
+ * One source camera, the part of its picture taken, and where that part lands.
27237
+ *
27238
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
27239
+ * — a profile switch, a firmware update, a substream that comes back different
27240
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
27241
+ * which is the class of bug nobody files.
27242
+ */
27243
+ var GridLayoutCellSchema = object({
27244
+ deviceId: number().int().positive(),
27245
+ /** The part of the SOURCE taken, normalized against the source. */
27246
+ source: GridNormalizedRectSchema,
27247
+ /** Where it lands, normalized against the CANVAS. */
27248
+ cell: GridNormalizedRectSchema
27249
+ });
27250
+ /**
27251
+ * Which profiles this grid can actually compose, and why not.
27252
+ *
27253
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
27254
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
27255
+ * the sources, because "this grid has no low" is not a finding — "615 has no
27256
+ * low" is, and it is the one an operator can act on.
27257
+ */
27258
+ var GridProfileOfferSchema = object({
27259
+ profile: _enum([
27260
+ "high",
27261
+ "mid",
27262
+ "low"
27263
+ ]),
27264
+ offered: boolean(),
27265
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
27266
+ missingSources: array(number().int().positive())
27267
+ });
27268
+ var GridLayoutViewSchema = object({
27269
+ /** The persisted grid row this camera was declared from. */
27270
+ instanceId: string(),
27271
+ deviceId: number().int().nonnegative(),
27272
+ name: string(),
27273
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
27274
+ width: number().int(),
27275
+ height: number().int(),
27276
+ fps: number().int(),
27277
+ cells: array(GridLayoutCellSchema),
27278
+ /** What the catalog will publish, and what it refuses to. Read-only. */
27279
+ profiles: array(GridProfileOfferSchema)
27280
+ });
27281
+ var GridLayoutPatchSchema = object({
27282
+ deviceId: number().int().nonnegative(),
27283
+ name: string().min(1).max(160).optional(),
27284
+ width: number().int().min(160).max(7680).optional(),
27285
+ height: number().int().min(120).max(4320).optional(),
27286
+ fps: number().int().min(1).max(60).optional(),
27287
+ /**
27288
+ * The whole cell list at once. A per-cell patch would need an ordering the
27289
+ * editor does not have, and a half-applied layout is a picture nobody asked
27290
+ * for.
27291
+ */
27292
+ cells: array(GridLayoutCellSchema).max(16)
27293
+ });
27294
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
27295
+ kind: "mutation",
27296
+ auth: "admin"
27297
+ });
27298
+ /**
27169
27299
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
27170
27300
  * on-camera motion-detection mask is a single `grid` region (a row-major
27171
27301
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -32194,6 +32324,18 @@ Object.freeze({
32194
32324
  addonId: null,
32195
32325
  access: "view"
32196
32326
  },
32327
+ "cameraGridLayout.getLayout": {
32328
+ capName: "camera-grid-layout",
32329
+ capScope: "device",
32330
+ addonId: null,
32331
+ access: "view"
32332
+ },
32333
+ "cameraGridLayout.saveLayout": {
32334
+ capName: "camera-grid-layout",
32335
+ capScope: "device",
32336
+ addonId: null,
32337
+ access: "create"
32338
+ },
32197
32339
  "cameraStreams.getBrokerStreams": {
32198
32340
  capName: "camera-streams",
32199
32341
  capScope: "device",
@@ -37893,6 +38035,21 @@ Object.freeze({
37893
38035
  form: "single",
37894
38036
  optional: false
37895
38037
  }],
38038
+ "cameraGridLayout.getLayout": [{
38039
+ name: "deviceId",
38040
+ form: "single",
38041
+ optional: false
38042
+ }],
38043
+ "cameraGridLayout.saveLayout": [{
38044
+ name: "cells",
38045
+ form: "object-array",
38046
+ optional: false,
38047
+ itemField: "deviceId"
38048
+ }, {
38049
+ name: "deviceId",
38050
+ form: "single",
38051
+ optional: false
38052
+ }],
37896
38053
  "cameraStreams.getBrokerStreams": [{
37897
38054
  name: "deviceId",
37898
38055
  form: "single",
@@ -40303,7 +40460,7 @@ var AgentUIAddon = class extends BaseAddon {
40303
40460
  capability: adminUiCapability,
40304
40461
  provider: {
40305
40462
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
40306
- getVersion: async () => ({ version: "1.2.118" })
40463
+ getVersion: async () => ({ version: "1.2.120" })
40307
40464
  }
40308
40465
  }];
40309
40466
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.118",
3
+ "version": "1.2.120",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",