@camstack/addon-export-hap 1.2.125 → 1.2.126

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-Bs3xPtSh.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,114 @@ 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 — which is exactly where the
28151
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
28152
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
28153
+ * all use it): the framework emits the structural section and the widget
28154
+ * self-persists through the cap's own mutations.
28155
+ *
28156
+ * ## Why one addon may implement it
28157
+ *
28158
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
28159
+ * itself. Nothing else declares a composite camera, so nothing else has a
28160
+ * layout — and the device-scoped route means the widget asks THE camera, not
28161
+ * "the camera-grid addon", which is what let the old custom-action pair be
28162
+ * reached only by a caller that already knew the addon id.
28163
+ *
28164
+ * ## The tab
28165
+ *
28166
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28167
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28168
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28169
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28170
+ * next to "PTZ").
28171
+ */
28172
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28173
+ var GridNormalizedRectSchema = object({
28174
+ x: number().min(0).max(1),
28175
+ y: number().min(0).max(1),
28176
+ width: number().gt(0).max(1),
28177
+ height: number().gt(0).max(1)
28178
+ });
28179
+ /**
28180
+ * One source camera, the part of its picture taken, and where that part lands.
28181
+ *
28182
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28183
+ * — a profile switch, a firmware update, a substream that comes back different
28184
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28185
+ * which is the class of bug nobody files.
28186
+ */
28187
+ var GridLayoutCellSchema = object({
28188
+ deviceId: number().int().positive(),
28189
+ /** The part of the SOURCE taken, normalized against the source. */
28190
+ source: GridNormalizedRectSchema,
28191
+ /** Where it lands, normalized against the CANVAS. */
28192
+ cell: GridNormalizedRectSchema
28193
+ });
28194
+ /**
28195
+ * Which profiles this grid can actually compose, and why not.
28196
+ *
28197
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28198
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
28199
+ * the sources, because "this grid has no low" is not a finding — "615 has no
28200
+ * low" is, and it is the one an operator can act on.
28201
+ */
28202
+ var GridProfileOfferSchema = object({
28203
+ profile: _enum([
28204
+ "high",
28205
+ "mid",
28206
+ "low"
28207
+ ]),
28208
+ offered: boolean(),
28209
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28210
+ missingSources: array(number().int().positive())
28211
+ });
28212
+ var GridLayoutViewSchema = object({
28213
+ /** The persisted grid row this camera was declared from. */
28214
+ instanceId: string(),
28215
+ deviceId: number().int().nonnegative(),
28216
+ name: string(),
28217
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
28218
+ width: number().int(),
28219
+ height: number().int(),
28220
+ fps: number().int(),
28221
+ cells: array(GridLayoutCellSchema),
28222
+ /** What the catalog will publish, and what it refuses to. Read-only. */
28223
+ profiles: array(GridProfileOfferSchema)
28224
+ });
28225
+ var GridLayoutPatchSchema = object({
28226
+ deviceId: number().int().nonnegative(),
28227
+ name: string().min(1).max(160).optional(),
28228
+ width: number().int().min(160).max(7680).optional(),
28229
+ height: number().int().min(120).max(4320).optional(),
28230
+ fps: number().int().min(1).max(60).optional(),
28231
+ /**
28232
+ * The whole cell list at once. A per-cell patch would need an ordering the
28233
+ * editor does not have, and a half-applied layout is a picture nobody asked
28234
+ * for.
28235
+ */
28236
+ cells: array(GridLayoutCellSchema).max(16)
28237
+ });
28238
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
28239
+ kind: "mutation",
28240
+ auth: "admin"
28241
+ });
28242
+ /**
28117
28243
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28118
28244
  * on-camera motion-detection mask is a single `grid` region (a row-major
28119
28245
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -33167,6 +33293,18 @@ Object.freeze({
33167
33293
  addonId: null,
33168
33294
  access: "view"
33169
33295
  },
33296
+ "cameraGridLayout.getLayout": {
33297
+ capName: "camera-grid-layout",
33298
+ capScope: "device",
33299
+ addonId: null,
33300
+ access: "view"
33301
+ },
33302
+ "cameraGridLayout.saveLayout": {
33303
+ capName: "camera-grid-layout",
33304
+ capScope: "device",
33305
+ addonId: null,
33306
+ access: "create"
33307
+ },
33170
33308
  "cameraStreams.getBrokerStreams": {
33171
33309
  capName: "camera-streams",
33172
33310
  capScope: "device",
@@ -38866,6 +39004,21 @@ Object.freeze({
38866
39004
  form: "single",
38867
39005
  optional: false
38868
39006
  }],
39007
+ "cameraGridLayout.getLayout": [{
39008
+ name: "deviceId",
39009
+ form: "single",
39010
+ optional: false
39011
+ }],
39012
+ "cameraGridLayout.saveLayout": [{
39013
+ name: "cells",
39014
+ form: "object-array",
39015
+ optional: false,
39016
+ itemField: "deviceId"
39017
+ }, {
39018
+ name: "deviceId",
39019
+ form: "single",
39020
+ optional: false
39021
+ }],
38869
39022
  "cameraStreams.getBrokerStreams": [{
38870
39023
  name: "deviceId",
38871
39024
  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-Bs3xPtSh.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,114 @@ 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 — which is exactly where the
28139
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
28140
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
28141
+ * all use it): the framework emits the structural section and the widget
28142
+ * self-persists through the cap's own mutations.
28143
+ *
28144
+ * ## Why one addon may implement it
28145
+ *
28146
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
28147
+ * itself. Nothing else declares a composite camera, so nothing else has a
28148
+ * layout — and the device-scoped route means the widget asks THE camera, not
28149
+ * "the camera-grid addon", which is what let the old custom-action pair be
28150
+ * reached only by a caller that already knew the addon id.
28151
+ *
28152
+ * ## The tab
28153
+ *
28154
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28155
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28156
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28157
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28158
+ * next to "PTZ").
28159
+ */
28160
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28161
+ var GridNormalizedRectSchema = object({
28162
+ x: number().min(0).max(1),
28163
+ y: number().min(0).max(1),
28164
+ width: number().gt(0).max(1),
28165
+ height: number().gt(0).max(1)
28166
+ });
28167
+ /**
28168
+ * One source camera, the part of its picture taken, and where that part lands.
28169
+ *
28170
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28171
+ * — a profile switch, a firmware update, a substream that comes back different
28172
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28173
+ * which is the class of bug nobody files.
28174
+ */
28175
+ var GridLayoutCellSchema = object({
28176
+ deviceId: number().int().positive(),
28177
+ /** The part of the SOURCE taken, normalized against the source. */
28178
+ source: GridNormalizedRectSchema,
28179
+ /** Where it lands, normalized against the CANVAS. */
28180
+ cell: GridNormalizedRectSchema
28181
+ });
28182
+ /**
28183
+ * Which profiles this grid can actually compose, and why not.
28184
+ *
28185
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28186
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
28187
+ * the sources, because "this grid has no low" is not a finding — "615 has no
28188
+ * low" is, and it is the one an operator can act on.
28189
+ */
28190
+ var GridProfileOfferSchema = object({
28191
+ profile: _enum([
28192
+ "high",
28193
+ "mid",
28194
+ "low"
28195
+ ]),
28196
+ offered: boolean(),
28197
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28198
+ missingSources: array(number().int().positive())
28199
+ });
28200
+ var GridLayoutViewSchema = object({
28201
+ /** The persisted grid row this camera was declared from. */
28202
+ instanceId: string(),
28203
+ deviceId: number().int().nonnegative(),
28204
+ name: string(),
28205
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
28206
+ width: number().int(),
28207
+ height: number().int(),
28208
+ fps: number().int(),
28209
+ cells: array(GridLayoutCellSchema),
28210
+ /** What the catalog will publish, and what it refuses to. Read-only. */
28211
+ profiles: array(GridProfileOfferSchema)
28212
+ });
28213
+ var GridLayoutPatchSchema = object({
28214
+ deviceId: number().int().nonnegative(),
28215
+ name: string().min(1).max(160).optional(),
28216
+ width: number().int().min(160).max(7680).optional(),
28217
+ height: number().int().min(120).max(4320).optional(),
28218
+ fps: number().int().min(1).max(60).optional(),
28219
+ /**
28220
+ * The whole cell list at once. A per-cell patch would need an ordering the
28221
+ * editor does not have, and a half-applied layout is a picture nobody asked
28222
+ * for.
28223
+ */
28224
+ cells: array(GridLayoutCellSchema).max(16)
28225
+ });
28226
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
28227
+ kind: "mutation",
28228
+ auth: "admin"
28229
+ });
28230
+ /**
28105
28231
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28106
28232
  * on-camera motion-detection mask is a single `grid` region (a row-major
28107
28233
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -33155,6 +33281,18 @@ Object.freeze({
33155
33281
  addonId: null,
33156
33282
  access: "view"
33157
33283
  },
33284
+ "cameraGridLayout.getLayout": {
33285
+ capName: "camera-grid-layout",
33286
+ capScope: "device",
33287
+ addonId: null,
33288
+ access: "view"
33289
+ },
33290
+ "cameraGridLayout.saveLayout": {
33291
+ capName: "camera-grid-layout",
33292
+ capScope: "device",
33293
+ addonId: null,
33294
+ access: "create"
33295
+ },
33158
33296
  "cameraStreams.getBrokerStreams": {
33159
33297
  capName: "camera-streams",
33160
33298
  capScope: "device",
@@ -38854,6 +38992,21 @@ Object.freeze({
38854
38992
  form: "single",
38855
38993
  optional: false
38856
38994
  }],
38995
+ "cameraGridLayout.getLayout": [{
38996
+ name: "deviceId",
38997
+ form: "single",
38998
+ optional: false
38999
+ }],
39000
+ "cameraGridLayout.saveLayout": [{
39001
+ name: "cells",
39002
+ form: "object-array",
39003
+ optional: false,
39004
+ itemField: "deviceId"
39005
+ }, {
39006
+ name: "deviceId",
39007
+ form: "single",
39008
+ optional: false
39009
+ }],
38857
39010
  "cameraStreams.getBrokerStreams": [{
38858
39011
  name: "deviceId",
38859
39012
  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.126",
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",