@camstack/addon-mqtt-broker 1.2.48 → 1.2.49
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/mqtt-broker.addon.js +218 -4
- package/dist/mqtt-broker.addon.mjs +218 -4
- package/package.json +1 -1
|
@@ -8047,6 +8047,20 @@ var RelocateJobSchema = object({
|
|
|
8047
8047
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8048
8048
|
*/
|
|
8049
8049
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8050
|
+
/**
|
|
8051
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8052
|
+
*
|
|
8053
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8054
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8055
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8056
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8057
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8058
|
+
* the same failure as one that quietly skips them (D295).
|
|
8059
|
+
*
|
|
8060
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8061
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8062
|
+
*/
|
|
8063
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8050
8064
|
startedAt: number(),
|
|
8051
8065
|
finishedAt: number().nullable(),
|
|
8052
8066
|
error: string().nullable()
|
|
@@ -8410,6 +8424,91 @@ var RelocateResidueSchema = object({
|
|
|
8410
8424
|
segments: number().int().nonnegative(),
|
|
8411
8425
|
bytes: number().int().nonnegative()
|
|
8412
8426
|
}).nullable();
|
|
8427
|
+
/**
|
|
8428
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8429
|
+
* (D319).
|
|
8430
|
+
*
|
|
8431
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8432
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8433
|
+
* destructive run before authorising it.
|
|
8434
|
+
*/
|
|
8435
|
+
var LedgerWalkInputSchema = object({
|
|
8436
|
+
locationId: string().min(1),
|
|
8437
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8438
|
+
apply: boolean().optional(),
|
|
8439
|
+
/** Narrow to one camera. */
|
|
8440
|
+
deviceId: number().int().positive().optional(),
|
|
8441
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8442
|
+
profiles: array(string().min(1)).optional()
|
|
8443
|
+
});
|
|
8444
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8445
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8446
|
+
"location-unknown",
|
|
8447
|
+
"source-writable",
|
|
8448
|
+
"no-ledger",
|
|
8449
|
+
"archive-unreadable",
|
|
8450
|
+
"anchor-absent",
|
|
8451
|
+
"anchor-unreadable",
|
|
8452
|
+
"anchor-moved"
|
|
8453
|
+
]);
|
|
8454
|
+
_enum([
|
|
8455
|
+
"live-tail",
|
|
8456
|
+
"listing-error",
|
|
8457
|
+
"path-mismatch",
|
|
8458
|
+
"durable-refused"
|
|
8459
|
+
]);
|
|
8460
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8461
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8462
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8463
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8464
|
+
"live-tail": number().int().nonnegative(),
|
|
8465
|
+
"listing-error": number().int().nonnegative(),
|
|
8466
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8467
|
+
"durable-refused": number().int().nonnegative()
|
|
8468
|
+
});
|
|
8469
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8470
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8471
|
+
deviceId: number().int(),
|
|
8472
|
+
hoursWalked: number().int().nonnegative(),
|
|
8473
|
+
hoursMissing: number().int().nonnegative(),
|
|
8474
|
+
ghostSegments: number().int().nonnegative(),
|
|
8475
|
+
ghostBytes: number().int().nonnegative(),
|
|
8476
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8477
|
+
orphanFiles: number().int().nonnegative()
|
|
8478
|
+
});
|
|
8479
|
+
/**
|
|
8480
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8481
|
+
*
|
|
8482
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8483
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8484
|
+
* than in the absence of one.
|
|
8485
|
+
*/
|
|
8486
|
+
var LedgerWalkReportSchema = object({
|
|
8487
|
+
locationId: string(),
|
|
8488
|
+
applied: boolean(),
|
|
8489
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8490
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8491
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8492
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8493
|
+
hoursWalked: number().int().nonnegative(),
|
|
8494
|
+
hoursMissing: number().int().nonnegative(),
|
|
8495
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8496
|
+
listings: number().int().nonnegative(),
|
|
8497
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8498
|
+
ghostSegments: number().int().nonnegative(),
|
|
8499
|
+
ghostBytes: number().int().nonnegative(),
|
|
8500
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8501
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8502
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8503
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8504
|
+
orphanFiles: number().int().nonnegative(),
|
|
8505
|
+
orphanSample: array(string()).readonly(),
|
|
8506
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8507
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8508
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8509
|
+
bounded: boolean(),
|
|
8510
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8511
|
+
});
|
|
8413
8512
|
/** How many rows a media pass would still act on against a given target — the
|
|
8414
8513
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8415
8514
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -18751,13 +18850,15 @@ var ListGroupsPageSchema = object({
|
|
|
18751
18850
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
18752
18851
|
nextCursor: string().nullable()
|
|
18753
18852
|
});
|
|
18853
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
18854
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
18754
18855
|
var KeyEventQueryInput = object({
|
|
18755
18856
|
deviceId: number(),
|
|
18756
18857
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
18757
18858
|
since: number(),
|
|
18758
18859
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
18759
18860
|
until: number(),
|
|
18760
|
-
limit: number().int().min(1).max(
|
|
18861
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18761
18862
|
/** Drop tracks scoring below this importance. */
|
|
18762
18863
|
minImportance: number().min(0).max(1).optional(),
|
|
18763
18864
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -18779,6 +18880,32 @@ var KeyEventSchema = object({
|
|
|
18779
18880
|
...TrackFlagFields,
|
|
18780
18881
|
...TrackRetrainFields
|
|
18781
18882
|
});
|
|
18883
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
18884
|
+
var KeyEventBatchQueryInput = object({
|
|
18885
|
+
deviceIds: array(number()).min(1).max(200),
|
|
18886
|
+
since: number(),
|
|
18887
|
+
until: number(),
|
|
18888
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
18889
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
18890
|
+
* rows and change what the merged feed contains. */
|
|
18891
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18892
|
+
minImportance: number().min(0).max(1).optional(),
|
|
18893
|
+
classFilter: string().optional()
|
|
18894
|
+
});
|
|
18895
|
+
/**
|
|
18896
|
+
* One camera's key events in a batch answer.
|
|
18897
|
+
*
|
|
18898
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
18899
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
18900
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
18901
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
18902
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
18903
|
+
* key, which only worked because there was one query per camera).
|
|
18904
|
+
*/
|
|
18905
|
+
var KeyEventsForDeviceSchema = object({
|
|
18906
|
+
deviceId: number(),
|
|
18907
|
+
events: array(KeyEventSchema).readonly()
|
|
18908
|
+
});
|
|
18782
18909
|
object({
|
|
18783
18910
|
trackId: string(),
|
|
18784
18911
|
className: string(),
|
|
@@ -19048,7 +19175,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19048
19175
|
until: number().optional(),
|
|
19049
19176
|
kinds: array(string()).optional(),
|
|
19050
19177
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19051
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19178
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19052
19179
|
deviceId: number(),
|
|
19053
19180
|
since: number(),
|
|
19054
19181
|
until: number(),
|
|
@@ -26700,6 +26827,9 @@ method(object({
|
|
|
26700
26827
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26701
26828
|
kind: "query",
|
|
26702
26829
|
auth: "admin"
|
|
26830
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
26831
|
+
kind: "mutation",
|
|
26832
|
+
auth: "admin"
|
|
26703
26833
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26704
26834
|
kind: "mutation",
|
|
26705
26835
|
auth: "admin"
|
|
@@ -27091,7 +27221,26 @@ var SceneMonitorStatusSchema = object({
|
|
|
27091
27221
|
monitors: array(SceneMonitorSchema),
|
|
27092
27222
|
lastFetchedAt: number()
|
|
27093
27223
|
});
|
|
27094
|
-
|
|
27224
|
+
/**
|
|
27225
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
27226
|
+
*
|
|
27227
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
27228
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
27229
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
27230
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
27231
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
27232
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
27233
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
27234
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
27235
|
+
*
|
|
27236
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
27237
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
27238
|
+
*/
|
|
27239
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
27240
|
+
deviceId: number(),
|
|
27241
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
27242
|
+
});
|
|
27243
|
+
DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
|
|
27095
27244
|
deviceId: number(),
|
|
27096
27245
|
label: string(),
|
|
27097
27246
|
roi: MaskRectShapeSchema,
|
|
@@ -28415,6 +28564,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
28415
28564
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
28416
28565
|
});
|
|
28417
28566
|
/**
|
|
28567
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
28568
|
+
*
|
|
28569
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
28570
|
+
* because `snapshot: null` was already spoken for:
|
|
28571
|
+
*
|
|
28572
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
28573
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
28574
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
28575
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
28576
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
28577
|
+
*
|
|
28578
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
28579
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
28580
|
+
* which is a definite claim about a camera nobody could read.
|
|
28581
|
+
*/
|
|
28582
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
28583
|
+
deviceId: number(),
|
|
28584
|
+
read: _enum(["read", "unreadable"]),
|
|
28585
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
28586
|
+
});
|
|
28587
|
+
/**
|
|
28418
28588
|
* Time-series resolution. The history methods return one bucket per
|
|
28419
28589
|
* step over the requested range. Smaller resolutions cost more
|
|
28420
28590
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -28438,7 +28608,7 @@ var HistoryPointSchema = object({
|
|
|
28438
28608
|
/** Object count averaged over the bucket (rounded to nearest integer). */
|
|
28439
28609
|
count: number().int().nonnegative()
|
|
28440
28610
|
});
|
|
28441
|
-
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
|
|
28611
|
+
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
|
|
28442
28612
|
deviceId: number(),
|
|
28443
28613
|
zoneId: string(),
|
|
28444
28614
|
className: string().optional()
|
|
@@ -31743,6 +31913,12 @@ Object.freeze({
|
|
|
31743
31913
|
addonId: null,
|
|
31744
31914
|
access: "view"
|
|
31745
31915
|
},
|
|
31916
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
31917
|
+
capName: "pipeline-analytics",
|
|
31918
|
+
capScope: "device",
|
|
31919
|
+
addonId: null,
|
|
31920
|
+
access: "view"
|
|
31921
|
+
},
|
|
31746
31922
|
"pipelineAnalytics.getMotionEvents": {
|
|
31747
31923
|
capName: "pipeline-analytics",
|
|
31748
31924
|
capScope: "device",
|
|
@@ -32919,6 +33095,12 @@ Object.freeze({
|
|
|
32919
33095
|
addonId: null,
|
|
32920
33096
|
access: "view"
|
|
32921
33097
|
},
|
|
33098
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
33099
|
+
capName: "recording",
|
|
33100
|
+
capScope: "system",
|
|
33101
|
+
addonId: null,
|
|
33102
|
+
access: "create"
|
|
33103
|
+
},
|
|
32922
33104
|
"recording.refreshStorageLocationsForMigration": {
|
|
32923
33105
|
capName: "recording",
|
|
32924
33106
|
capScope: "system",
|
|
@@ -33045,6 +33227,12 @@ Object.freeze({
|
|
|
33045
33227
|
addonId: null,
|
|
33046
33228
|
access: "view"
|
|
33047
33229
|
},
|
|
33230
|
+
"sceneMonitor.listScenesBatch": {
|
|
33231
|
+
capName: "scene-monitor",
|
|
33232
|
+
capScope: "device",
|
|
33233
|
+
addonId: null,
|
|
33234
|
+
access: "view"
|
|
33235
|
+
},
|
|
33048
33236
|
"sceneMonitor.recheckNow": {
|
|
33049
33237
|
capName: "scene-monitor",
|
|
33050
33238
|
capScope: "device",
|
|
@@ -34401,6 +34589,12 @@ Object.freeze({
|
|
|
34401
34589
|
addonId: null,
|
|
34402
34590
|
access: "view"
|
|
34403
34591
|
},
|
|
34592
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
34593
|
+
capName: "zone-analytics",
|
|
34594
|
+
capScope: "device",
|
|
34595
|
+
addonId: null,
|
|
34596
|
+
access: "view"
|
|
34597
|
+
},
|
|
34404
34598
|
"zoneAnalytics.getUnzonedHistory": {
|
|
34405
34599
|
capName: "zone-analytics",
|
|
34406
34600
|
capScope: "device",
|
|
@@ -35405,6 +35599,11 @@ Object.freeze({
|
|
|
35405
35599
|
form: "single",
|
|
35406
35600
|
optional: false
|
|
35407
35601
|
}],
|
|
35602
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
35603
|
+
name: "deviceIds",
|
|
35604
|
+
form: "array",
|
|
35605
|
+
optional: false
|
|
35606
|
+
}],
|
|
35408
35607
|
"pipelineAnalytics.getMotionEvents": [{
|
|
35409
35608
|
name: "deviceId",
|
|
35410
35609
|
form: "single",
|
|
@@ -35845,6 +36044,11 @@ Object.freeze({
|
|
|
35845
36044
|
form: "single",
|
|
35846
36045
|
optional: false
|
|
35847
36046
|
}],
|
|
36047
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
36048
|
+
name: "deviceId",
|
|
36049
|
+
form: "single",
|
|
36050
|
+
optional: true
|
|
36051
|
+
}],
|
|
35848
36052
|
"recording.relocateFootage": [{
|
|
35849
36053
|
name: "deviceId",
|
|
35850
36054
|
form: "single",
|
|
@@ -35910,6 +36114,11 @@ Object.freeze({
|
|
|
35910
36114
|
form: "single",
|
|
35911
36115
|
optional: false
|
|
35912
36116
|
}],
|
|
36117
|
+
"sceneMonitor.listScenesBatch": [{
|
|
36118
|
+
name: "deviceIds",
|
|
36119
|
+
form: "array",
|
|
36120
|
+
optional: false
|
|
36121
|
+
}],
|
|
35913
36122
|
"sceneMonitor.recheckNow": [{
|
|
35914
36123
|
name: "deviceId",
|
|
35915
36124
|
form: "single",
|
|
@@ -36171,6 +36380,11 @@ Object.freeze({
|
|
|
36171
36380
|
form: "single",
|
|
36172
36381
|
optional: false
|
|
36173
36382
|
}],
|
|
36383
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
36384
|
+
name: "deviceIds",
|
|
36385
|
+
form: "array",
|
|
36386
|
+
optional: false
|
|
36387
|
+
}],
|
|
36174
36388
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
36175
36389
|
name: "deviceId",
|
|
36176
36390
|
form: "single",
|
|
@@ -8042,6 +8042,20 @@ var RelocateJobSchema = object({
|
|
|
8042
8042
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8043
8043
|
*/
|
|
8044
8044
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8045
|
+
/**
|
|
8046
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8047
|
+
*
|
|
8048
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8049
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8050
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8051
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8052
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8053
|
+
* the same failure as one that quietly skips them (D295).
|
|
8054
|
+
*
|
|
8055
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8056
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8057
|
+
*/
|
|
8058
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8045
8059
|
startedAt: number(),
|
|
8046
8060
|
finishedAt: number().nullable(),
|
|
8047
8061
|
error: string().nullable()
|
|
@@ -8405,6 +8419,91 @@ var RelocateResidueSchema = object({
|
|
|
8405
8419
|
segments: number().int().nonnegative(),
|
|
8406
8420
|
bytes: number().int().nonnegative()
|
|
8407
8421
|
}).nullable();
|
|
8422
|
+
/**
|
|
8423
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8424
|
+
* (D319).
|
|
8425
|
+
*
|
|
8426
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8427
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8428
|
+
* destructive run before authorising it.
|
|
8429
|
+
*/
|
|
8430
|
+
var LedgerWalkInputSchema = object({
|
|
8431
|
+
locationId: string().min(1),
|
|
8432
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8433
|
+
apply: boolean().optional(),
|
|
8434
|
+
/** Narrow to one camera. */
|
|
8435
|
+
deviceId: number().int().positive().optional(),
|
|
8436
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8437
|
+
profiles: array(string().min(1)).optional()
|
|
8438
|
+
});
|
|
8439
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8440
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8441
|
+
"location-unknown",
|
|
8442
|
+
"source-writable",
|
|
8443
|
+
"no-ledger",
|
|
8444
|
+
"archive-unreadable",
|
|
8445
|
+
"anchor-absent",
|
|
8446
|
+
"anchor-unreadable",
|
|
8447
|
+
"anchor-moved"
|
|
8448
|
+
]);
|
|
8449
|
+
_enum([
|
|
8450
|
+
"live-tail",
|
|
8451
|
+
"listing-error",
|
|
8452
|
+
"path-mismatch",
|
|
8453
|
+
"durable-refused"
|
|
8454
|
+
]);
|
|
8455
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8456
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8457
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8458
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8459
|
+
"live-tail": number().int().nonnegative(),
|
|
8460
|
+
"listing-error": number().int().nonnegative(),
|
|
8461
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8462
|
+
"durable-refused": number().int().nonnegative()
|
|
8463
|
+
});
|
|
8464
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8465
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8466
|
+
deviceId: number().int(),
|
|
8467
|
+
hoursWalked: number().int().nonnegative(),
|
|
8468
|
+
hoursMissing: number().int().nonnegative(),
|
|
8469
|
+
ghostSegments: number().int().nonnegative(),
|
|
8470
|
+
ghostBytes: number().int().nonnegative(),
|
|
8471
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8472
|
+
orphanFiles: number().int().nonnegative()
|
|
8473
|
+
});
|
|
8474
|
+
/**
|
|
8475
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8476
|
+
*
|
|
8477
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8478
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8479
|
+
* than in the absence of one.
|
|
8480
|
+
*/
|
|
8481
|
+
var LedgerWalkReportSchema = object({
|
|
8482
|
+
locationId: string(),
|
|
8483
|
+
applied: boolean(),
|
|
8484
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8485
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8486
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8487
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8488
|
+
hoursWalked: number().int().nonnegative(),
|
|
8489
|
+
hoursMissing: number().int().nonnegative(),
|
|
8490
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8491
|
+
listings: number().int().nonnegative(),
|
|
8492
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8493
|
+
ghostSegments: number().int().nonnegative(),
|
|
8494
|
+
ghostBytes: number().int().nonnegative(),
|
|
8495
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8496
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8497
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8498
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8499
|
+
orphanFiles: number().int().nonnegative(),
|
|
8500
|
+
orphanSample: array(string()).readonly(),
|
|
8501
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8502
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8503
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8504
|
+
bounded: boolean(),
|
|
8505
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8506
|
+
});
|
|
8408
8507
|
/** How many rows a media pass would still act on against a given target — the
|
|
8409
8508
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8410
8509
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -18746,13 +18845,15 @@ var ListGroupsPageSchema = object({
|
|
|
18746
18845
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
18747
18846
|
nextCursor: string().nullable()
|
|
18748
18847
|
});
|
|
18848
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
18849
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
18749
18850
|
var KeyEventQueryInput = object({
|
|
18750
18851
|
deviceId: number(),
|
|
18751
18852
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
18752
18853
|
since: number(),
|
|
18753
18854
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
18754
18855
|
until: number(),
|
|
18755
|
-
limit: number().int().min(1).max(
|
|
18856
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18756
18857
|
/** Drop tracks scoring below this importance. */
|
|
18757
18858
|
minImportance: number().min(0).max(1).optional(),
|
|
18758
18859
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -18774,6 +18875,32 @@ var KeyEventSchema = object({
|
|
|
18774
18875
|
...TrackFlagFields,
|
|
18775
18876
|
...TrackRetrainFields
|
|
18776
18877
|
});
|
|
18878
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
18879
|
+
var KeyEventBatchQueryInput = object({
|
|
18880
|
+
deviceIds: array(number()).min(1).max(200),
|
|
18881
|
+
since: number(),
|
|
18882
|
+
until: number(),
|
|
18883
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
18884
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
18885
|
+
* rows and change what the merged feed contains. */
|
|
18886
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18887
|
+
minImportance: number().min(0).max(1).optional(),
|
|
18888
|
+
classFilter: string().optional()
|
|
18889
|
+
});
|
|
18890
|
+
/**
|
|
18891
|
+
* One camera's key events in a batch answer.
|
|
18892
|
+
*
|
|
18893
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
18894
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
18895
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
18896
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
18897
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
18898
|
+
* key, which only worked because there was one query per camera).
|
|
18899
|
+
*/
|
|
18900
|
+
var KeyEventsForDeviceSchema = object({
|
|
18901
|
+
deviceId: number(),
|
|
18902
|
+
events: array(KeyEventSchema).readonly()
|
|
18903
|
+
});
|
|
18777
18904
|
object({
|
|
18778
18905
|
trackId: string(),
|
|
18779
18906
|
className: string(),
|
|
@@ -19043,7 +19170,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19043
19170
|
until: number().optional(),
|
|
19044
19171
|
kinds: array(string()).optional(),
|
|
19045
19172
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19046
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19173
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19047
19174
|
deviceId: number(),
|
|
19048
19175
|
since: number(),
|
|
19049
19176
|
until: number(),
|
|
@@ -26695,6 +26822,9 @@ method(object({
|
|
|
26695
26822
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26696
26823
|
kind: "query",
|
|
26697
26824
|
auth: "admin"
|
|
26825
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
26826
|
+
kind: "mutation",
|
|
26827
|
+
auth: "admin"
|
|
26698
26828
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26699
26829
|
kind: "mutation",
|
|
26700
26830
|
auth: "admin"
|
|
@@ -27086,7 +27216,26 @@ var SceneMonitorStatusSchema = object({
|
|
|
27086
27216
|
monitors: array(SceneMonitorSchema),
|
|
27087
27217
|
lastFetchedAt: number()
|
|
27088
27218
|
});
|
|
27089
|
-
|
|
27219
|
+
/**
|
|
27220
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
27221
|
+
*
|
|
27222
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
27223
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
27224
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
27225
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
27226
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
27227
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
27228
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
27229
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
27230
|
+
*
|
|
27231
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
27232
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
27233
|
+
*/
|
|
27234
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
27235
|
+
deviceId: number(),
|
|
27236
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
27237
|
+
});
|
|
27238
|
+
DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
|
|
27090
27239
|
deviceId: number(),
|
|
27091
27240
|
label: string(),
|
|
27092
27241
|
roi: MaskRectShapeSchema,
|
|
@@ -28410,6 +28559,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
28410
28559
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
28411
28560
|
});
|
|
28412
28561
|
/**
|
|
28562
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
28563
|
+
*
|
|
28564
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
28565
|
+
* because `snapshot: null` was already spoken for:
|
|
28566
|
+
*
|
|
28567
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
28568
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
28569
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
28570
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
28571
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
28572
|
+
*
|
|
28573
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
28574
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
28575
|
+
* which is a definite claim about a camera nobody could read.
|
|
28576
|
+
*/
|
|
28577
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
28578
|
+
deviceId: number(),
|
|
28579
|
+
read: _enum(["read", "unreadable"]),
|
|
28580
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
28581
|
+
});
|
|
28582
|
+
/**
|
|
28413
28583
|
* Time-series resolution. The history methods return one bucket per
|
|
28414
28584
|
* step over the requested range. Smaller resolutions cost more
|
|
28415
28585
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -28433,7 +28603,7 @@ var HistoryPointSchema = object({
|
|
|
28433
28603
|
/** Object count averaged over the bucket (rounded to nearest integer). */
|
|
28434
28604
|
count: number().int().nonnegative()
|
|
28435
28605
|
});
|
|
28436
|
-
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
|
|
28606
|
+
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
|
|
28437
28607
|
deviceId: number(),
|
|
28438
28608
|
zoneId: string(),
|
|
28439
28609
|
className: string().optional()
|
|
@@ -31738,6 +31908,12 @@ Object.freeze({
|
|
|
31738
31908
|
addonId: null,
|
|
31739
31909
|
access: "view"
|
|
31740
31910
|
},
|
|
31911
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
31912
|
+
capName: "pipeline-analytics",
|
|
31913
|
+
capScope: "device",
|
|
31914
|
+
addonId: null,
|
|
31915
|
+
access: "view"
|
|
31916
|
+
},
|
|
31741
31917
|
"pipelineAnalytics.getMotionEvents": {
|
|
31742
31918
|
capName: "pipeline-analytics",
|
|
31743
31919
|
capScope: "device",
|
|
@@ -32914,6 +33090,12 @@ Object.freeze({
|
|
|
32914
33090
|
addonId: null,
|
|
32915
33091
|
access: "view"
|
|
32916
33092
|
},
|
|
33093
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
33094
|
+
capName: "recording",
|
|
33095
|
+
capScope: "system",
|
|
33096
|
+
addonId: null,
|
|
33097
|
+
access: "create"
|
|
33098
|
+
},
|
|
32917
33099
|
"recording.refreshStorageLocationsForMigration": {
|
|
32918
33100
|
capName: "recording",
|
|
32919
33101
|
capScope: "system",
|
|
@@ -33040,6 +33222,12 @@ Object.freeze({
|
|
|
33040
33222
|
addonId: null,
|
|
33041
33223
|
access: "view"
|
|
33042
33224
|
},
|
|
33225
|
+
"sceneMonitor.listScenesBatch": {
|
|
33226
|
+
capName: "scene-monitor",
|
|
33227
|
+
capScope: "device",
|
|
33228
|
+
addonId: null,
|
|
33229
|
+
access: "view"
|
|
33230
|
+
},
|
|
33043
33231
|
"sceneMonitor.recheckNow": {
|
|
33044
33232
|
capName: "scene-monitor",
|
|
33045
33233
|
capScope: "device",
|
|
@@ -34396,6 +34584,12 @@ Object.freeze({
|
|
|
34396
34584
|
addonId: null,
|
|
34397
34585
|
access: "view"
|
|
34398
34586
|
},
|
|
34587
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
34588
|
+
capName: "zone-analytics",
|
|
34589
|
+
capScope: "device",
|
|
34590
|
+
addonId: null,
|
|
34591
|
+
access: "view"
|
|
34592
|
+
},
|
|
34399
34593
|
"zoneAnalytics.getUnzonedHistory": {
|
|
34400
34594
|
capName: "zone-analytics",
|
|
34401
34595
|
capScope: "device",
|
|
@@ -35400,6 +35594,11 @@ Object.freeze({
|
|
|
35400
35594
|
form: "single",
|
|
35401
35595
|
optional: false
|
|
35402
35596
|
}],
|
|
35597
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
35598
|
+
name: "deviceIds",
|
|
35599
|
+
form: "array",
|
|
35600
|
+
optional: false
|
|
35601
|
+
}],
|
|
35403
35602
|
"pipelineAnalytics.getMotionEvents": [{
|
|
35404
35603
|
name: "deviceId",
|
|
35405
35604
|
form: "single",
|
|
@@ -35840,6 +36039,11 @@ Object.freeze({
|
|
|
35840
36039
|
form: "single",
|
|
35841
36040
|
optional: false
|
|
35842
36041
|
}],
|
|
36042
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
36043
|
+
name: "deviceId",
|
|
36044
|
+
form: "single",
|
|
36045
|
+
optional: true
|
|
36046
|
+
}],
|
|
35843
36047
|
"recording.relocateFootage": [{
|
|
35844
36048
|
name: "deviceId",
|
|
35845
36049
|
form: "single",
|
|
@@ -35905,6 +36109,11 @@ Object.freeze({
|
|
|
35905
36109
|
form: "single",
|
|
35906
36110
|
optional: false
|
|
35907
36111
|
}],
|
|
36112
|
+
"sceneMonitor.listScenesBatch": [{
|
|
36113
|
+
name: "deviceIds",
|
|
36114
|
+
form: "array",
|
|
36115
|
+
optional: false
|
|
36116
|
+
}],
|
|
35908
36117
|
"sceneMonitor.recheckNow": [{
|
|
35909
36118
|
name: "deviceId",
|
|
35910
36119
|
form: "single",
|
|
@@ -36166,6 +36375,11 @@ Object.freeze({
|
|
|
36166
36375
|
form: "single",
|
|
36167
36376
|
optional: false
|
|
36168
36377
|
}],
|
|
36378
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
36379
|
+
name: "deviceIds",
|
|
36380
|
+
form: "array",
|
|
36381
|
+
optional: false
|
|
36382
|
+
}],
|
|
36169
36383
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
36170
36384
|
name: "deviceId",
|
|
36171
36385
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.49",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|