@camstack/addon-provider-amcrest 0.2.115 → 0.2.117

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-GU_us3DG.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,118 @@ 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. The device page is
29032
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
29033
+ * and this cap carries its section the way `recording` does, by RETURNING it
29034
+ * from `getDeviceSettingsContribution`.
29035
+ *
29036
+ * Seven other widgets are still declared the other way, through a
29037
+ * `deviceConfig.ui` block the framework derives a section from. That route
29038
+ * gives the addon no say in where its own panel lands and no way to decline
29039
+ * for a device the panel does not suit, which is why this one does not use it.
29040
+ *
29041
+ * ## Why one addon may implement it
29042
+ *
29043
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29044
+ * itself. Nothing else declares a composite camera, so nothing else has a
29045
+ * layout — and the device-scoped route means the widget asks THE camera, not
29046
+ * "the camera-grid addon", which is what let the old custom-action pair be
29047
+ * reached only by a caller that already knew the addon id.
29048
+ *
29049
+ * ## The tab
29050
+ *
29051
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29052
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29053
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29054
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29055
+ * next to "PTZ").
29056
+ */
29057
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29058
+ var GridNormalizedRectSchema = object({
29059
+ x: number().min(0).max(1),
29060
+ y: number().min(0).max(1),
29061
+ width: number().gt(0).max(1),
29062
+ height: number().gt(0).max(1)
29063
+ });
29064
+ /**
29065
+ * One source camera, the part of its picture taken, and where that part lands.
29066
+ *
29067
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29068
+ * — a profile switch, a firmware update, a substream that comes back different
29069
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29070
+ * which is the class of bug nobody files.
29071
+ */
29072
+ var GridLayoutCellSchema = object({
29073
+ deviceId: number().int().positive(),
29074
+ /** The part of the SOURCE taken, normalized against the source. */
29075
+ source: GridNormalizedRectSchema,
29076
+ /** Where it lands, normalized against the CANVAS. */
29077
+ cell: GridNormalizedRectSchema
29078
+ });
29079
+ /**
29080
+ * Which profiles this grid can actually compose, and why not.
29081
+ *
29082
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29083
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29084
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29085
+ * low" is, and it is the one an operator can act on.
29086
+ */
29087
+ var GridProfileOfferSchema = object({
29088
+ profile: _enum([
29089
+ "high",
29090
+ "mid",
29091
+ "low"
29092
+ ]),
29093
+ offered: boolean(),
29094
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29095
+ missingSources: array(number().int().positive())
29096
+ });
29097
+ var GridLayoutViewSchema = object({
29098
+ /** The persisted grid row this camera was declared from. */
29099
+ instanceId: string(),
29100
+ deviceId: number().int().nonnegative(),
29101
+ name: string(),
29102
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29103
+ width: number().int(),
29104
+ height: number().int(),
29105
+ fps: number().int(),
29106
+ cells: array(GridLayoutCellSchema),
29107
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29108
+ profiles: array(GridProfileOfferSchema)
29109
+ });
29110
+ var GridLayoutPatchSchema = object({
29111
+ deviceId: number().int().nonnegative(),
29112
+ name: string().min(1).max(160).optional(),
29113
+ width: number().int().min(160).max(7680).optional(),
29114
+ height: number().int().min(120).max(4320).optional(),
29115
+ fps: number().int().min(1).max(60).optional(),
29116
+ /**
29117
+ * The whole cell list at once. A per-cell patch would need an ordering the
29118
+ * editor does not have, and a half-applied layout is a picture nobody asked
29119
+ * for.
29120
+ */
29121
+ cells: array(GridLayoutCellSchema).max(16)
29122
+ });
29123
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29124
+ kind: "mutation",
29125
+ auth: "admin"
29126
+ });
29127
+ /**
28998
29128
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28999
29129
  * on-camera motion-detection mask is a single `grid` region (a row-major
29000
29130
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -37283,6 +37413,18 @@ Object.freeze({
37283
37413
  addonId: null,
37284
37414
  access: "view"
37285
37415
  },
37416
+ "cameraGridLayout.getLayout": {
37417
+ capName: "camera-grid-layout",
37418
+ capScope: "device",
37419
+ addonId: null,
37420
+ access: "view"
37421
+ },
37422
+ "cameraGridLayout.saveLayout": {
37423
+ capName: "camera-grid-layout",
37424
+ capScope: "device",
37425
+ addonId: null,
37426
+ access: "create"
37427
+ },
37286
37428
  "cameraStreams.getBrokerStreams": {
37287
37429
  capName: "camera-streams",
37288
37430
  capScope: "device",
@@ -42982,6 +43124,21 @@ Object.freeze({
42982
43124
  form: "single",
42983
43125
  optional: false
42984
43126
  }],
43127
+ "cameraGridLayout.getLayout": [{
43128
+ name: "deviceId",
43129
+ form: "single",
43130
+ optional: false
43131
+ }],
43132
+ "cameraGridLayout.saveLayout": [{
43133
+ name: "cells",
43134
+ form: "object-array",
43135
+ optional: false,
43136
+ itemField: "deviceId"
43137
+ }, {
43138
+ name: "deviceId",
43139
+ form: "single",
43140
+ optional: false
43141
+ }],
42985
43142
  "cameraStreams.getBrokerStreams": [{
42986
43143
  name: "deviceId",
42987
43144
  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-GU_us3DG.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,118 @@ 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. The device page is
29033
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
29034
+ * and this cap carries its section the way `recording` does, by RETURNING it
29035
+ * from `getDeviceSettingsContribution`.
29036
+ *
29037
+ * Seven other widgets are still declared the other way, through a
29038
+ * `deviceConfig.ui` block the framework derives a section from. That route
29039
+ * gives the addon no say in where its own panel lands and no way to decline
29040
+ * for a device the panel does not suit, which is why this one does not use it.
29041
+ *
29042
+ * ## Why one addon may implement it
29043
+ *
29044
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
29045
+ * itself. Nothing else declares a composite camera, so nothing else has a
29046
+ * layout — and the device-scoped route means the widget asks THE camera, not
29047
+ * "the camera-grid addon", which is what let the old custom-action pair be
29048
+ * reached only by a caller that already knew the addon id.
29049
+ *
29050
+ * ## The tab
29051
+ *
29052
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29053
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29054
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29055
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29056
+ * next to "PTZ").
29057
+ */
29058
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29059
+ var GridNormalizedRectSchema = object({
29060
+ x: number().min(0).max(1),
29061
+ y: number().min(0).max(1),
29062
+ width: number().gt(0).max(1),
29063
+ height: number().gt(0).max(1)
29064
+ });
29065
+ /**
29066
+ * One source camera, the part of its picture taken, and where that part lands.
29067
+ *
29068
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29069
+ * — a profile switch, a firmware update, a substream that comes back different
29070
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29071
+ * which is the class of bug nobody files.
29072
+ */
29073
+ var GridLayoutCellSchema = object({
29074
+ deviceId: number().int().positive(),
29075
+ /** The part of the SOURCE taken, normalized against the source. */
29076
+ source: GridNormalizedRectSchema,
29077
+ /** Where it lands, normalized against the CANVAS. */
29078
+ cell: GridNormalizedRectSchema
29079
+ });
29080
+ /**
29081
+ * Which profiles this grid can actually compose, and why not.
29082
+ *
29083
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29084
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
29085
+ * the sources, because "this grid has no low" is not a finding — "615 has no
29086
+ * low" is, and it is the one an operator can act on.
29087
+ */
29088
+ var GridProfileOfferSchema = object({
29089
+ profile: _enum([
29090
+ "high",
29091
+ "mid",
29092
+ "low"
29093
+ ]),
29094
+ offered: boolean(),
29095
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29096
+ missingSources: array(number().int().positive())
29097
+ });
29098
+ var GridLayoutViewSchema = object({
29099
+ /** The persisted grid row this camera was declared from. */
29100
+ instanceId: string(),
29101
+ deviceId: number().int().nonnegative(),
29102
+ name: string(),
29103
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
29104
+ width: number().int(),
29105
+ height: number().int(),
29106
+ fps: number().int(),
29107
+ cells: array(GridLayoutCellSchema),
29108
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29109
+ profiles: array(GridProfileOfferSchema)
29110
+ });
29111
+ var GridLayoutPatchSchema = object({
29112
+ deviceId: number().int().nonnegative(),
29113
+ name: string().min(1).max(160).optional(),
29114
+ width: number().int().min(160).max(7680).optional(),
29115
+ height: number().int().min(120).max(4320).optional(),
29116
+ fps: number().int().min(1).max(60).optional(),
29117
+ /**
29118
+ * The whole cell list at once. A per-cell patch would need an ordering the
29119
+ * editor does not have, and a half-applied layout is a picture nobody asked
29120
+ * for.
29121
+ */
29122
+ cells: array(GridLayoutCellSchema).max(16)
29123
+ });
29124
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29125
+ kind: "mutation",
29126
+ auth: "admin"
29127
+ });
29128
+ /**
28999
29129
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
29000
29130
  * on-camera motion-detection mask is a single `grid` region (a row-major
29001
29131
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -37284,6 +37414,18 @@ Object.freeze({
37284
37414
  addonId: null,
37285
37415
  access: "view"
37286
37416
  },
37417
+ "cameraGridLayout.getLayout": {
37418
+ capName: "camera-grid-layout",
37419
+ capScope: "device",
37420
+ addonId: null,
37421
+ access: "view"
37422
+ },
37423
+ "cameraGridLayout.saveLayout": {
37424
+ capName: "camera-grid-layout",
37425
+ capScope: "device",
37426
+ addonId: null,
37427
+ access: "create"
37428
+ },
37287
37429
  "cameraStreams.getBrokerStreams": {
37288
37430
  capName: "camera-streams",
37289
37431
  capScope: "device",
@@ -42983,6 +43125,21 @@ Object.freeze({
42983
43125
  form: "single",
42984
43126
  optional: false
42985
43127
  }],
43128
+ "cameraGridLayout.getLayout": [{
43129
+ name: "deviceId",
43130
+ form: "single",
43131
+ optional: false
43132
+ }],
43133
+ "cameraGridLayout.saveLayout": [{
43134
+ name: "cells",
43135
+ form: "object-array",
43136
+ optional: false,
43137
+ itemField: "deviceId"
43138
+ }, {
43139
+ name: "deviceId",
43140
+ form: "single",
43141
+ optional: false
43142
+ }],
42986
43143
  "cameraStreams.getBrokerStreams": [{
42987
43144
  name: "deviceId",
42988
43145
  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.117",
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",