@camstack/addon-export-hap 1.2.125 → 1.2.127

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.
@@ -5445,7 +5445,7 @@ var ZodIssueCode = {
5445
5445
  var ZodFirstPartyTypeKind;
5446
5446
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5447
5447
  //#endregion
5448
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5448
+ //#region ../types/dist/sleep-GU_us3DG.mjs
5449
5449
  /**
5450
5450
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5451
5451
  * window to float samples (D455).
@@ -12655,6 +12655,24 @@ var GetStreamWithCodecInputSchema = object({
12655
12655
  });
12656
12656
  var RtpSourceSchema = object({
12657
12657
  url: string(),
12658
+ /**
12659
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
12660
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
12661
+ *
12662
+ * The broker answers it because the broker is the only thing that can:
12663
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
12664
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
12665
+ * cap bindings would be a second authority, and two authorities on the same
12666
+ * question is how a composite camera ends up dialling a sleeping camera
12667
+ * because its own copy of the rule was a release behind.
12668
+ *
12669
+ * `null` is a real answer and is never a live url in disguise: a consumer
12670
+ * that silently fell back to {@link url} would perform exactly the wake this
12671
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
12672
+ * transcode hands back an egress the broker is feeding itself, which has no
12673
+ * sentry counterpart.
12674
+ */
12675
+ sentryUrl: string().nullable().optional(),
12658
12676
  videoCodec: _enum(["H264", "H265"]),
12659
12677
  audioCodec: string(),
12660
12678
  resolution: object({
@@ -28114,6 +28132,118 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
28114
28132
  lastChangedAt: number()
28115
28133
  });
28116
28134
  /**
28135
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28136
+ * page.
28137
+ *
28138
+ * ## Why this is a capability and not an addon settings schema
28139
+ *
28140
+ * It was one, and it did not render. The addon declared the editor as a
28141
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28142
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28143
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28144
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28145
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
28146
+ * not on it "falls off silently".
28147
+ *
28148
+ * Adding a fifth name to that list would have been the wrong fix twice over:
28149
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
28150
+ * beside PTZ and motion zones on the camera itself. The device page is
28151
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
28152
+ * and this cap carries its section the way `recording` does, by RETURNING it
28153
+ * from `getDeviceSettingsContribution`.
28154
+ *
28155
+ * Seven other widgets are still declared the other way, through a
28156
+ * `deviceConfig.ui` block the framework derives a section from. That route
28157
+ * gives the addon no say in where its own panel lands and no way to decline
28158
+ * for a device the panel does not suit, which is why this one does not use it.
28159
+ *
28160
+ * ## Why one addon may implement it
28161
+ *
28162
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
28163
+ * itself. Nothing else declares a composite camera, so nothing else has a
28164
+ * layout — and the device-scoped route means the widget asks THE camera, not
28165
+ * "the camera-grid addon", which is what let the old custom-action pair be
28166
+ * reached only by a caller that already knew the addon id.
28167
+ *
28168
+ * ## The tab
28169
+ *
28170
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28171
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28172
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28173
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28174
+ * next to "PTZ").
28175
+ */
28176
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28177
+ var GridNormalizedRectSchema = object({
28178
+ x: number().min(0).max(1),
28179
+ y: number().min(0).max(1),
28180
+ width: number().gt(0).max(1),
28181
+ height: number().gt(0).max(1)
28182
+ });
28183
+ /**
28184
+ * One source camera, the part of its picture taken, and where that part lands.
28185
+ *
28186
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28187
+ * — a profile switch, a firmware update, a substream that comes back different
28188
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28189
+ * which is the class of bug nobody files.
28190
+ */
28191
+ var GridLayoutCellSchema = object({
28192
+ deviceId: number().int().positive(),
28193
+ /** The part of the SOURCE taken, normalized against the source. */
28194
+ source: GridNormalizedRectSchema,
28195
+ /** Where it lands, normalized against the CANVAS. */
28196
+ cell: GridNormalizedRectSchema
28197
+ });
28198
+ /**
28199
+ * Which profiles this grid can actually compose, and why not.
28200
+ *
28201
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28202
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
28203
+ * the sources, because "this grid has no low" is not a finding — "615 has no
28204
+ * low" is, and it is the one an operator can act on.
28205
+ */
28206
+ var GridProfileOfferSchema = object({
28207
+ profile: _enum([
28208
+ "high",
28209
+ "mid",
28210
+ "low"
28211
+ ]),
28212
+ offered: boolean(),
28213
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28214
+ missingSources: array(number().int().positive())
28215
+ });
28216
+ var GridLayoutViewSchema = object({
28217
+ /** The persisted grid row this camera was declared from. */
28218
+ instanceId: string(),
28219
+ deviceId: number().int().nonnegative(),
28220
+ name: string(),
28221
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
28222
+ width: number().int(),
28223
+ height: number().int(),
28224
+ fps: number().int(),
28225
+ cells: array(GridLayoutCellSchema),
28226
+ /** What the catalog will publish, and what it refuses to. Read-only. */
28227
+ profiles: array(GridProfileOfferSchema)
28228
+ });
28229
+ var GridLayoutPatchSchema = object({
28230
+ deviceId: number().int().nonnegative(),
28231
+ name: string().min(1).max(160).optional(),
28232
+ width: number().int().min(160).max(7680).optional(),
28233
+ height: number().int().min(120).max(4320).optional(),
28234
+ fps: number().int().min(1).max(60).optional(),
28235
+ /**
28236
+ * The whole cell list at once. A per-cell patch would need an ordering the
28237
+ * editor does not have, and a half-applied layout is a picture nobody asked
28238
+ * for.
28239
+ */
28240
+ cells: array(GridLayoutCellSchema).max(16)
28241
+ });
28242
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
28243
+ kind: "mutation",
28244
+ auth: "admin"
28245
+ });
28246
+ /**
28117
28247
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28118
28248
  * on-camera motion-detection mask is a single `grid` region (a row-major
28119
28249
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -33167,6 +33297,18 @@ Object.freeze({
33167
33297
  addonId: null,
33168
33298
  access: "view"
33169
33299
  },
33300
+ "cameraGridLayout.getLayout": {
33301
+ capName: "camera-grid-layout",
33302
+ capScope: "device",
33303
+ addonId: null,
33304
+ access: "view"
33305
+ },
33306
+ "cameraGridLayout.saveLayout": {
33307
+ capName: "camera-grid-layout",
33308
+ capScope: "device",
33309
+ addonId: null,
33310
+ access: "create"
33311
+ },
33170
33312
  "cameraStreams.getBrokerStreams": {
33171
33313
  capName: "camera-streams",
33172
33314
  capScope: "device",
@@ -38866,6 +39008,21 @@ Object.freeze({
38866
39008
  form: "single",
38867
39009
  optional: false
38868
39010
  }],
39011
+ "cameraGridLayout.getLayout": [{
39012
+ name: "deviceId",
39013
+ form: "single",
39014
+ optional: false
39015
+ }],
39016
+ "cameraGridLayout.saveLayout": [{
39017
+ name: "cells",
39018
+ form: "object-array",
39019
+ optional: false,
39020
+ itemField: "deviceId"
39021
+ }, {
39022
+ name: "deviceId",
39023
+ form: "single",
39024
+ optional: false
39025
+ }],
38869
39026
  "cameraStreams.getBrokerStreams": [{
38870
39027
  name: "deviceId",
38871
39028
  form: "single",
@@ -5433,7 +5433,7 @@ var ZodIssueCode = {
5433
5433
  var ZodFirstPartyTypeKind;
5434
5434
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5435
5435
  //#endregion
5436
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5436
+ //#region ../types/dist/sleep-GU_us3DG.mjs
5437
5437
  /**
5438
5438
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5439
5439
  * window to float samples (D455).
@@ -12643,6 +12643,24 @@ var GetStreamWithCodecInputSchema = object({
12643
12643
  });
12644
12644
  var RtpSourceSchema = object({
12645
12645
  url: string(),
12646
+ /**
12647
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
12648
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
12649
+ *
12650
+ * The broker answers it because the broker is the only thing that can:
12651
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
12652
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
12653
+ * cap bindings would be a second authority, and two authorities on the same
12654
+ * question is how a composite camera ends up dialling a sleeping camera
12655
+ * because its own copy of the rule was a release behind.
12656
+ *
12657
+ * `null` is a real answer and is never a live url in disguise: a consumer
12658
+ * that silently fell back to {@link url} would perform exactly the wake this
12659
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
12660
+ * transcode hands back an egress the broker is feeding itself, which has no
12661
+ * sentry counterpart.
12662
+ */
12663
+ sentryUrl: string().nullable().optional(),
12646
12664
  videoCodec: _enum(["H264", "H265"]),
12647
12665
  audioCodec: string(),
12648
12666
  resolution: object({
@@ -28102,6 +28120,118 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
28102
28120
  lastChangedAt: number()
28103
28121
  });
28104
28122
  /**
28123
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28124
+ * page.
28125
+ *
28126
+ * ## Why this is a capability and not an addon settings schema
28127
+ *
28128
+ * It was one, and it did not render. The addon declared the editor as a
28129
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28130
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28131
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28132
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28133
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
28134
+ * not on it "falls off silently".
28135
+ *
28136
+ * Adding a fifth name to that list would have been the wrong fix twice over:
28137
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
28138
+ * beside PTZ and motion zones on the camera itself. The device page is
28139
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
28140
+ * and this cap carries its section the way `recording` does, by RETURNING it
28141
+ * from `getDeviceSettingsContribution`.
28142
+ *
28143
+ * Seven other widgets are still declared the other way, through a
28144
+ * `deviceConfig.ui` block the framework derives a section from. That route
28145
+ * gives the addon no say in where its own panel lands and no way to decline
28146
+ * for a device the panel does not suit, which is why this one does not use it.
28147
+ *
28148
+ * ## Why one addon may implement it
28149
+ *
28150
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
28151
+ * itself. Nothing else declares a composite camera, so nothing else has a
28152
+ * layout — and the device-scoped route means the widget asks THE camera, not
28153
+ * "the camera-grid addon", which is what let the old custom-action pair be
28154
+ * reached only by a caller that already knew the addon id.
28155
+ *
28156
+ * ## The tab
28157
+ *
28158
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28159
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28160
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28161
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28162
+ * next to "PTZ").
28163
+ */
28164
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28165
+ var GridNormalizedRectSchema = object({
28166
+ x: number().min(0).max(1),
28167
+ y: number().min(0).max(1),
28168
+ width: number().gt(0).max(1),
28169
+ height: number().gt(0).max(1)
28170
+ });
28171
+ /**
28172
+ * One source camera, the part of its picture taken, and where that part lands.
28173
+ *
28174
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28175
+ * — a profile switch, a firmware update, a substream that comes back different
28176
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28177
+ * which is the class of bug nobody files.
28178
+ */
28179
+ var GridLayoutCellSchema = object({
28180
+ deviceId: number().int().positive(),
28181
+ /** The part of the SOURCE taken, normalized against the source. */
28182
+ source: GridNormalizedRectSchema,
28183
+ /** Where it lands, normalized against the CANVAS. */
28184
+ cell: GridNormalizedRectSchema
28185
+ });
28186
+ /**
28187
+ * Which profiles this grid can actually compose, and why not.
28188
+ *
28189
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28190
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
28191
+ * the sources, because "this grid has no low" is not a finding — "615 has no
28192
+ * low" is, and it is the one an operator can act on.
28193
+ */
28194
+ var GridProfileOfferSchema = object({
28195
+ profile: _enum([
28196
+ "high",
28197
+ "mid",
28198
+ "low"
28199
+ ]),
28200
+ offered: boolean(),
28201
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28202
+ missingSources: array(number().int().positive())
28203
+ });
28204
+ var GridLayoutViewSchema = object({
28205
+ /** The persisted grid row this camera was declared from. */
28206
+ instanceId: string(),
28207
+ deviceId: number().int().nonnegative(),
28208
+ name: string(),
28209
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
28210
+ width: number().int(),
28211
+ height: number().int(),
28212
+ fps: number().int(),
28213
+ cells: array(GridLayoutCellSchema),
28214
+ /** What the catalog will publish, and what it refuses to. Read-only. */
28215
+ profiles: array(GridProfileOfferSchema)
28216
+ });
28217
+ var GridLayoutPatchSchema = object({
28218
+ deviceId: number().int().nonnegative(),
28219
+ name: string().min(1).max(160).optional(),
28220
+ width: number().int().min(160).max(7680).optional(),
28221
+ height: number().int().min(120).max(4320).optional(),
28222
+ fps: number().int().min(1).max(60).optional(),
28223
+ /**
28224
+ * The whole cell list at once. A per-cell patch would need an ordering the
28225
+ * editor does not have, and a half-applied layout is a picture nobody asked
28226
+ * for.
28227
+ */
28228
+ cells: array(GridLayoutCellSchema).max(16)
28229
+ });
28230
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
28231
+ kind: "mutation",
28232
+ auth: "admin"
28233
+ });
28234
+ /**
28105
28235
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28106
28236
  * on-camera motion-detection mask is a single `grid` region (a row-major
28107
28237
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -33155,6 +33285,18 @@ Object.freeze({
33155
33285
  addonId: null,
33156
33286
  access: "view"
33157
33287
  },
33288
+ "cameraGridLayout.getLayout": {
33289
+ capName: "camera-grid-layout",
33290
+ capScope: "device",
33291
+ addonId: null,
33292
+ access: "view"
33293
+ },
33294
+ "cameraGridLayout.saveLayout": {
33295
+ capName: "camera-grid-layout",
33296
+ capScope: "device",
33297
+ addonId: null,
33298
+ access: "create"
33299
+ },
33158
33300
  "cameraStreams.getBrokerStreams": {
33159
33301
  capName: "camera-streams",
33160
33302
  capScope: "device",
@@ -38854,6 +38996,21 @@ Object.freeze({
38854
38996
  form: "single",
38855
38997
  optional: false
38856
38998
  }],
38999
+ "cameraGridLayout.getLayout": [{
39000
+ name: "deviceId",
39001
+ form: "single",
39002
+ optional: false
39003
+ }],
39004
+ "cameraGridLayout.saveLayout": [{
39005
+ name: "cells",
39006
+ form: "object-array",
39007
+ optional: false,
39008
+ itemField: "deviceId"
39009
+ }, {
39010
+ name: "deviceId",
39011
+ form: "single",
39012
+ optional: false
39013
+ }],
38857
39014
  "cameraStreams.getBrokerStreams": [{
38858
39015
  name: "deviceId",
38859
39016
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.125",
3
+ "version": "1.2.127",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",