@camstack/addon-agent-ui 1.2.118 → 1.2.119

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 +155 -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-Bs3xPtSh.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,114 @@ 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 — which is exactly where the
27203
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
27204
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
27205
+ * all use it): the framework emits the structural section and the widget
27206
+ * self-persists through the cap's own mutations.
27207
+ *
27208
+ * ## Why one addon may implement it
27209
+ *
27210
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
27211
+ * itself. Nothing else declares a composite camera, so nothing else has a
27212
+ * layout — and the device-scoped route means the widget asks THE camera, not
27213
+ * "the camera-grid addon", which is what let the old custom-action pair be
27214
+ * reached only by a caller that already knew the addon id.
27215
+ *
27216
+ * ## The tab
27217
+ *
27218
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
27219
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
27220
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
27221
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
27222
+ * next to "PTZ").
27223
+ */
27224
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
27225
+ var GridNormalizedRectSchema = object({
27226
+ x: number().min(0).max(1),
27227
+ y: number().min(0).max(1),
27228
+ width: number().gt(0).max(1),
27229
+ height: number().gt(0).max(1)
27230
+ });
27231
+ /**
27232
+ * One source camera, the part of its picture taken, and where that part lands.
27233
+ *
27234
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
27235
+ * — a profile switch, a firmware update, a substream that comes back different
27236
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
27237
+ * which is the class of bug nobody files.
27238
+ */
27239
+ var GridLayoutCellSchema = object({
27240
+ deviceId: number().int().positive(),
27241
+ /** The part of the SOURCE taken, normalized against the source. */
27242
+ source: GridNormalizedRectSchema,
27243
+ /** Where it lands, normalized against the CANVAS. */
27244
+ cell: GridNormalizedRectSchema
27245
+ });
27246
+ /**
27247
+ * Which profiles this grid can actually compose, and why not.
27248
+ *
27249
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
27250
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
27251
+ * the sources, because "this grid has no low" is not a finding — "615 has no
27252
+ * low" is, and it is the one an operator can act on.
27253
+ */
27254
+ var GridProfileOfferSchema = object({
27255
+ profile: _enum([
27256
+ "high",
27257
+ "mid",
27258
+ "low"
27259
+ ]),
27260
+ offered: boolean(),
27261
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
27262
+ missingSources: array(number().int().positive())
27263
+ });
27264
+ var GridLayoutViewSchema = object({
27265
+ /** The persisted grid row this camera was declared from. */
27266
+ instanceId: string(),
27267
+ deviceId: number().int().nonnegative(),
27268
+ name: string(),
27269
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
27270
+ width: number().int(),
27271
+ height: number().int(),
27272
+ fps: number().int(),
27273
+ cells: array(GridLayoutCellSchema),
27274
+ /** What the catalog will publish, and what it refuses to. Read-only. */
27275
+ profiles: array(GridProfileOfferSchema)
27276
+ });
27277
+ var GridLayoutPatchSchema = object({
27278
+ deviceId: number().int().nonnegative(),
27279
+ name: string().min(1).max(160).optional(),
27280
+ width: number().int().min(160).max(7680).optional(),
27281
+ height: number().int().min(120).max(4320).optional(),
27282
+ fps: number().int().min(1).max(60).optional(),
27283
+ /**
27284
+ * The whole cell list at once. A per-cell patch would need an ordering the
27285
+ * editor does not have, and a half-applied layout is a picture nobody asked
27286
+ * for.
27287
+ */
27288
+ cells: array(GridLayoutCellSchema).max(16)
27289
+ });
27290
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
27291
+ kind: "mutation",
27292
+ auth: "admin"
27293
+ });
27294
+ /**
27169
27295
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
27170
27296
  * on-camera motion-detection mask is a single `grid` region (a row-major
27171
27297
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -32194,6 +32320,18 @@ Object.freeze({
32194
32320
  addonId: null,
32195
32321
  access: "view"
32196
32322
  },
32323
+ "cameraGridLayout.getLayout": {
32324
+ capName: "camera-grid-layout",
32325
+ capScope: "device",
32326
+ addonId: null,
32327
+ access: "view"
32328
+ },
32329
+ "cameraGridLayout.saveLayout": {
32330
+ capName: "camera-grid-layout",
32331
+ capScope: "device",
32332
+ addonId: null,
32333
+ access: "create"
32334
+ },
32197
32335
  "cameraStreams.getBrokerStreams": {
32198
32336
  capName: "camera-streams",
32199
32337
  capScope: "device",
@@ -37893,6 +38031,21 @@ Object.freeze({
37893
38031
  form: "single",
37894
38032
  optional: false
37895
38033
  }],
38034
+ "cameraGridLayout.getLayout": [{
38035
+ name: "deviceId",
38036
+ form: "single",
38037
+ optional: false
38038
+ }],
38039
+ "cameraGridLayout.saveLayout": [{
38040
+ name: "cells",
38041
+ form: "object-array",
38042
+ optional: false,
38043
+ itemField: "deviceId"
38044
+ }, {
38045
+ name: "deviceId",
38046
+ form: "single",
38047
+ optional: false
38048
+ }],
37896
38049
  "cameraStreams.getBrokerStreams": [{
37897
38050
  name: "deviceId",
37898
38051
  form: "single",
@@ -40303,7 +40456,7 @@ var AgentUIAddon = class extends BaseAddon {
40303
40456
  capability: adminUiCapability,
40304
40457
  provider: {
40305
40458
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
40306
- getVersion: async () => ({ version: "1.2.118" })
40459
+ getVersion: async () => ({ version: "1.2.119" })
40307
40460
  }
40308
40461
  }];
40309
40462
  }
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.119",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",