@camstack/addon-agent-ui 1.2.117 → 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.
- package/dist/addon.js +181 -7
- 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-
|
|
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
|
|
@@ -28865,6 +28991,26 @@ var PtzHomePresetSchema = object({
|
|
|
28865
28991
|
"none"
|
|
28866
28992
|
])
|
|
28867
28993
|
});
|
|
28994
|
+
/**
|
|
28995
|
+
* The camera's own idle-return behaviour: whether it goes home by itself, and
|
|
28996
|
+
* after how long.
|
|
28997
|
+
*
|
|
28998
|
+
* ONE shape, not two scalars, because on the camera they are ONE fact —
|
|
28999
|
+
* Reolink's guard point carries `benable` and `timeout` in the same element,
|
|
29000
|
+
* written by the same command. Reading them apart means two round-trips that
|
|
29001
|
+
* can disagree.
|
|
29002
|
+
*
|
|
29003
|
+
* `enabled` and `seconds` are INDEPENDENT: a camera can hold a 68 s delay with
|
|
29004
|
+
* the behaviour switched off, which is exactly what the vendor app leaves when
|
|
29005
|
+
* you turn the guard point off without clearing it. The first version of this
|
|
29006
|
+
* cap reported only the delay, so that state was invisible — a camera could be
|
|
29007
|
+
* configured to return after 68 seconds with no way to say whether it should
|
|
29008
|
+
* return at all.
|
|
29009
|
+
*/
|
|
29010
|
+
var PtzHomeReturnSchema = object({
|
|
29011
|
+
enabled: boolean(),
|
|
29012
|
+
seconds: number().int()
|
|
29013
|
+
});
|
|
28868
29014
|
DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
|
|
28869
29015
|
deviceId: number(),
|
|
28870
29016
|
presetId: string()
|
|
@@ -28890,8 +29036,9 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
28890
29036
|
}), method(object({ deviceId: number() }), _void(), {
|
|
28891
29037
|
kind: "mutation",
|
|
28892
29038
|
auth: "admin"
|
|
28893
|
-
}), method(object({ deviceId: number() }),
|
|
29039
|
+
}), method(object({ deviceId: number() }), PtzHomeReturnSchema.nullable()), method(object({
|
|
28894
29040
|
deviceId: number(),
|
|
29041
|
+
enabled: boolean(),
|
|
28895
29042
|
seconds: number().int().min(0).max(3600)
|
|
28896
29043
|
}), _void(), {
|
|
28897
29044
|
kind: "mutation",
|
|
@@ -32173,6 +32320,18 @@ Object.freeze({
|
|
|
32173
32320
|
addonId: null,
|
|
32174
32321
|
access: "view"
|
|
32175
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
|
+
},
|
|
32176
32335
|
"cameraStreams.getBrokerStreams": {
|
|
32177
32336
|
capName: "camera-streams",
|
|
32178
32337
|
capScope: "device",
|
|
@@ -35923,7 +36082,7 @@ Object.freeze({
|
|
|
35923
36082
|
addonId: null,
|
|
35924
36083
|
access: "view"
|
|
35925
36084
|
},
|
|
35926
|
-
"ptz.
|
|
36085
|
+
"ptz.getHomeReturn": {
|
|
35927
36086
|
capName: "ptz",
|
|
35928
36087
|
capScope: "device",
|
|
35929
36088
|
addonId: null,
|
|
@@ -35983,7 +36142,7 @@ Object.freeze({
|
|
|
35983
36142
|
addonId: null,
|
|
35984
36143
|
access: "create"
|
|
35985
36144
|
},
|
|
35986
|
-
"ptz.
|
|
36145
|
+
"ptz.setHomeReturn": {
|
|
35987
36146
|
capName: "ptz",
|
|
35988
36147
|
capScope: "device",
|
|
35989
36148
|
addonId: null,
|
|
@@ -37872,6 +38031,21 @@ Object.freeze({
|
|
|
37872
38031
|
form: "single",
|
|
37873
38032
|
optional: false
|
|
37874
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
|
+
}],
|
|
37875
38049
|
"cameraStreams.getBrokerStreams": [{
|
|
37876
38050
|
name: "deviceId",
|
|
37877
38051
|
form: "single",
|
|
@@ -39172,7 +39346,7 @@ Object.freeze({
|
|
|
39172
39346
|
form: "single",
|
|
39173
39347
|
optional: false
|
|
39174
39348
|
}],
|
|
39175
|
-
"ptz.
|
|
39349
|
+
"ptz.getHomeReturn": [{
|
|
39176
39350
|
name: "deviceId",
|
|
39177
39351
|
form: "single",
|
|
39178
39352
|
optional: false
|
|
@@ -39222,7 +39396,7 @@ Object.freeze({
|
|
|
39222
39396
|
form: "single",
|
|
39223
39397
|
optional: false
|
|
39224
39398
|
}],
|
|
39225
|
-
"ptz.
|
|
39399
|
+
"ptz.setHomeReturn": [{
|
|
39226
39400
|
name: "deviceId",
|
|
39227
39401
|
form: "single",
|
|
39228
39402
|
optional: false
|
|
@@ -40282,7 +40456,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
40282
40456
|
capability: adminUiCapability,
|
|
40283
40457
|
provider: {
|
|
40284
40458
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
40285
|
-
getVersion: async () => ({ version: "1.2.
|
|
40459
|
+
getVersion: async () => ({ version: "1.2.119" })
|
|
40286
40460
|
}
|
|
40287
40461
|
}];
|
|
40288
40462
|
}
|