@camstack/addon-provider-amcrest 0.2.115 → 0.2.116

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
@@ -5367,7 +5367,7 @@ var ZodIssueCode = {
5367
5367
  var ZodFirstPartyTypeKind;
5368
5368
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5369
5369
  //#endregion
5370
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5370
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5371
5371
  /**
5372
5372
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5373
5373
  * window to float samples (D455).
@@ -11845,6 +11845,24 @@ var GetStreamWithCodecInputSchema = object({
11845
11845
  });
11846
11846
  var RtpSourceSchema = object({
11847
11847
  url: string(),
11848
+ /**
11849
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11850
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11851
+ *
11852
+ * The broker answers it because the broker is the only thing that can:
11853
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11854
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11855
+ * cap bindings would be a second authority, and two authorities on the same
11856
+ * question is how a composite camera ends up dialling a sleeping camera
11857
+ * because its own copy of the rule was a release behind.
11858
+ *
11859
+ * `null` is a real answer and is never a live url in disguise: a consumer
11860
+ * that silently fell back to {@link url} would perform exactly the wake this
11861
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11862
+ * transcode hands back an egress the broker is feeding itself, which has no
11863
+ * sentry counterpart.
11864
+ */
11865
+ sentryUrl: string().nullable().optional(),
11848
11866
  videoCodec: _enum(["H264", "H265"]),
11849
11867
  audioCodec: string(),
11850
11868
  resolution: object({
@@ -28995,6 +29013,114 @@ var motionTriggerCapability = {
28995
29013
  durability: "session"
28996
29014
  };
28997
29015
  /**
29016
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
29017
+ * page.
29018
+ *
29019
+ * ## Why this is a capability and not an addon settings schema
29020
+ *
29021
+ * It was one, and it did not render. The addon declared the editor as a
29022
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
29023
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
29024
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
29025
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
29026
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
29027
+ * not on it "falls off silently".
29028
+ *
29029
+ * Adding a fifth name to that list would have been the wrong fix twice over:
29030
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
29031
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
29032
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
29033
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
29034
+ * all use it): the framework emits the structural section and the widget
29035
+ * self-persists through the cap's own mutations.
29036
+ *
29037
+ * ## Why one addon may implement it
29038
+ *
29039
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29040
+ * itself. Nothing else declares a composite camera, so nothing else has a
29041
+ * layout — and the device-scoped route means the widget asks THE camera, not
29042
+ * "the camera-grid addon", which is what let the old custom-action pair be
29043
+ * reached only by a caller that already knew the addon id.
29044
+ *
29045
+ * ## The tab
29046
+ *
29047
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29048
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29049
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29050
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29051
+ * next to "PTZ").
29052
+ */
29053
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29054
+ var GridNormalizedRectSchema = object({
29055
+ x: number().min(0).max(1),
29056
+ y: number().min(0).max(1),
29057
+ width: number().gt(0).max(1),
29058
+ height: number().gt(0).max(1)
29059
+ });
29060
+ /**
29061
+ * One source camera, the part of its picture taken, and where that part lands.
29062
+ *
29063
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29064
+ * — a profile switch, a firmware update, a substream that comes back different
29065
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29066
+ * which is the class of bug nobody files.
29067
+ */
29068
+ var GridLayoutCellSchema = object({
29069
+ deviceId: number().int().positive(),
29070
+ /** The part of the SOURCE taken, normalized against the source. */
29071
+ source: GridNormalizedRectSchema,
29072
+ /** Where it lands, normalized against the CANVAS. */
29073
+ cell: GridNormalizedRectSchema
29074
+ });
29075
+ /**
29076
+ * Which profiles this grid can actually compose, and why not.
29077
+ *
29078
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29079
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29080
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29081
+ * low" is, and it is the one an operator can act on.
29082
+ */
29083
+ var GridProfileOfferSchema = object({
29084
+ profile: _enum([
29085
+ "high",
29086
+ "mid",
29087
+ "low"
29088
+ ]),
29089
+ offered: boolean(),
29090
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29091
+ missingSources: array(number().int().positive())
29092
+ });
29093
+ var GridLayoutViewSchema = object({
29094
+ /** The persisted grid row this camera was declared from. */
29095
+ instanceId: string(),
29096
+ deviceId: number().int().nonnegative(),
29097
+ name: string(),
29098
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29099
+ width: number().int(),
29100
+ height: number().int(),
29101
+ fps: number().int(),
29102
+ cells: array(GridLayoutCellSchema),
29103
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29104
+ profiles: array(GridProfileOfferSchema)
29105
+ });
29106
+ var GridLayoutPatchSchema = object({
29107
+ deviceId: number().int().nonnegative(),
29108
+ name: string().min(1).max(160).optional(),
29109
+ width: number().int().min(160).max(7680).optional(),
29110
+ height: number().int().min(120).max(4320).optional(),
29111
+ fps: number().int().min(1).max(60).optional(),
29112
+ /**
29113
+ * The whole cell list at once. A per-cell patch would need an ordering the
29114
+ * editor does not have, and a half-applied layout is a picture nobody asked
29115
+ * for.
29116
+ */
29117
+ cells: array(GridLayoutCellSchema).max(16)
29118
+ });
29119
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29120
+ kind: "mutation",
29121
+ auth: "admin"
29122
+ });
29123
+ /**
28998
29124
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28999
29125
  * on-camera motion-detection mask is a single `grid` region (a row-major
29000
29126
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -37283,6 +37409,18 @@ Object.freeze({
37283
37409
  addonId: null,
37284
37410
  access: "view"
37285
37411
  },
37412
+ "cameraGridLayout.getLayout": {
37413
+ capName: "camera-grid-layout",
37414
+ capScope: "device",
37415
+ addonId: null,
37416
+ access: "view"
37417
+ },
37418
+ "cameraGridLayout.saveLayout": {
37419
+ capName: "camera-grid-layout",
37420
+ capScope: "device",
37421
+ addonId: null,
37422
+ access: "create"
37423
+ },
37286
37424
  "cameraStreams.getBrokerStreams": {
37287
37425
  capName: "camera-streams",
37288
37426
  capScope: "device",
@@ -42982,6 +43120,21 @@ Object.freeze({
42982
43120
  form: "single",
42983
43121
  optional: false
42984
43122
  }],
43123
+ "cameraGridLayout.getLayout": [{
43124
+ name: "deviceId",
43125
+ form: "single",
43126
+ optional: false
43127
+ }],
43128
+ "cameraGridLayout.saveLayout": [{
43129
+ name: "cells",
43130
+ form: "object-array",
43131
+ optional: false,
43132
+ itemField: "deviceId"
43133
+ }, {
43134
+ name: "deviceId",
43135
+ form: "single",
43136
+ optional: false
43137
+ }],
42985
43138
  "cameraStreams.getBrokerStreams": [{
42986
43139
  name: "deviceId",
42987
43140
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5368,7 +5368,7 @@ var ZodIssueCode = {
5368
5368
  var ZodFirstPartyTypeKind;
5369
5369
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5370
5370
  //#endregion
5371
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5371
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5372
5372
  /**
5373
5373
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5374
5374
  * window to float samples (D455).
@@ -11846,6 +11846,24 @@ var GetStreamWithCodecInputSchema = object({
11846
11846
  });
11847
11847
  var RtpSourceSchema = object({
11848
11848
  url: string(),
11849
+ /**
11850
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11851
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11852
+ *
11853
+ * The broker answers it because the broker is the only thing that can:
11854
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11855
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11856
+ * cap bindings would be a second authority, and two authorities on the same
11857
+ * question is how a composite camera ends up dialling a sleeping camera
11858
+ * because its own copy of the rule was a release behind.
11859
+ *
11860
+ * `null` is a real answer and is never a live url in disguise: a consumer
11861
+ * that silently fell back to {@link url} would perform exactly the wake this
11862
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11863
+ * transcode hands back an egress the broker is feeding itself, which has no
11864
+ * sentry counterpart.
11865
+ */
11866
+ sentryUrl: string().nullable().optional(),
11849
11867
  videoCodec: _enum(["H264", "H265"]),
11850
11868
  audioCodec: string(),
11851
11869
  resolution: object({
@@ -28996,6 +29014,114 @@ var motionTriggerCapability = {
28996
29014
  durability: "session"
28997
29015
  };
28998
29016
  /**
29017
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
29018
+ * page.
29019
+ *
29020
+ * ## Why this is a capability and not an addon settings schema
29021
+ *
29022
+ * It was one, and it did not render. The addon declared the editor as a
29023
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
29024
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
29025
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
29026
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
29027
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
29028
+ * not on it "falls off silently".
29029
+ *
29030
+ * Adding a fifth name to that list would have been the wrong fix twice over:
29031
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
29032
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
29033
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
29034
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
29035
+ * all use it): the framework emits the structural section and the widget
29036
+ * self-persists through the cap's own mutations.
29037
+ *
29038
+ * ## Why one addon may implement it
29039
+ *
29040
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29041
+ * itself. Nothing else declares a composite camera, so nothing else has a
29042
+ * layout — and the device-scoped route means the widget asks THE camera, not
29043
+ * "the camera-grid addon", which is what let the old custom-action pair be
29044
+ * reached only by a caller that already knew the addon id.
29045
+ *
29046
+ * ## The tab
29047
+ *
29048
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29049
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29050
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29051
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29052
+ * next to "PTZ").
29053
+ */
29054
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29055
+ var GridNormalizedRectSchema = object({
29056
+ x: number().min(0).max(1),
29057
+ y: number().min(0).max(1),
29058
+ width: number().gt(0).max(1),
29059
+ height: number().gt(0).max(1)
29060
+ });
29061
+ /**
29062
+ * One source camera, the part of its picture taken, and where that part lands.
29063
+ *
29064
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29065
+ * — a profile switch, a firmware update, a substream that comes back different
29066
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29067
+ * which is the class of bug nobody files.
29068
+ */
29069
+ var GridLayoutCellSchema = object({
29070
+ deviceId: number().int().positive(),
29071
+ /** The part of the SOURCE taken, normalized against the source. */
29072
+ source: GridNormalizedRectSchema,
29073
+ /** Where it lands, normalized against the CANVAS. */
29074
+ cell: GridNormalizedRectSchema
29075
+ });
29076
+ /**
29077
+ * Which profiles this grid can actually compose, and why not.
29078
+ *
29079
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29080
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29081
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29082
+ * low" is, and it is the one an operator can act on.
29083
+ */
29084
+ var GridProfileOfferSchema = object({
29085
+ profile: _enum([
29086
+ "high",
29087
+ "mid",
29088
+ "low"
29089
+ ]),
29090
+ offered: boolean(),
29091
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29092
+ missingSources: array(number().int().positive())
29093
+ });
29094
+ var GridLayoutViewSchema = object({
29095
+ /** The persisted grid row this camera was declared from. */
29096
+ instanceId: string(),
29097
+ deviceId: number().int().nonnegative(),
29098
+ name: string(),
29099
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29100
+ width: number().int(),
29101
+ height: number().int(),
29102
+ fps: number().int(),
29103
+ cells: array(GridLayoutCellSchema),
29104
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29105
+ profiles: array(GridProfileOfferSchema)
29106
+ });
29107
+ var GridLayoutPatchSchema = object({
29108
+ deviceId: number().int().nonnegative(),
29109
+ name: string().min(1).max(160).optional(),
29110
+ width: number().int().min(160).max(7680).optional(),
29111
+ height: number().int().min(120).max(4320).optional(),
29112
+ fps: number().int().min(1).max(60).optional(),
29113
+ /**
29114
+ * The whole cell list at once. A per-cell patch would need an ordering the
29115
+ * editor does not have, and a half-applied layout is a picture nobody asked
29116
+ * for.
29117
+ */
29118
+ cells: array(GridLayoutCellSchema).max(16)
29119
+ });
29120
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29121
+ kind: "mutation",
29122
+ auth: "admin"
29123
+ });
29124
+ /**
28999
29125
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
29000
29126
  * on-camera motion-detection mask is a single `grid` region (a row-major
29001
29127
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -37284,6 +37410,18 @@ Object.freeze({
37284
37410
  addonId: null,
37285
37411
  access: "view"
37286
37412
  },
37413
+ "cameraGridLayout.getLayout": {
37414
+ capName: "camera-grid-layout",
37415
+ capScope: "device",
37416
+ addonId: null,
37417
+ access: "view"
37418
+ },
37419
+ "cameraGridLayout.saveLayout": {
37420
+ capName: "camera-grid-layout",
37421
+ capScope: "device",
37422
+ addonId: null,
37423
+ access: "create"
37424
+ },
37287
37425
  "cameraStreams.getBrokerStreams": {
37288
37426
  capName: "camera-streams",
37289
37427
  capScope: "device",
@@ -42983,6 +43121,21 @@ Object.freeze({
42983
43121
  form: "single",
42984
43122
  optional: false
42985
43123
  }],
43124
+ "cameraGridLayout.getLayout": [{
43125
+ name: "deviceId",
43126
+ form: "single",
43127
+ optional: false
43128
+ }],
43129
+ "cameraGridLayout.saveLayout": [{
43130
+ name: "cells",
43131
+ form: "object-array",
43132
+ optional: false,
43133
+ itemField: "deviceId"
43134
+ }, {
43135
+ name: "deviceId",
43136
+ form: "single",
43137
+ optional: false
43138
+ }],
42986
43139
  "cameraStreams.getBrokerStreams": [{
42987
43140
  name: "deviceId",
42988
43141
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-amcrest",
3
- "version": "0.2.115",
3
+ "version": "0.2.116",
4
4
  "description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
5
5
  "keywords": [
6
6
  "camstack",