@camstack/addon-notifiers 1.2.52 → 1.2.53
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 +218 -4
- package/dist/addon.mjs +218 -4
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8151,6 +8151,20 @@ var RelocateJobSchema = object({
|
|
|
8151
8151
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8152
8152
|
*/
|
|
8153
8153
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8154
|
+
/**
|
|
8155
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8156
|
+
*
|
|
8157
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8158
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8159
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8160
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8161
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8162
|
+
* the same failure as one that quietly skips them (D295).
|
|
8163
|
+
*
|
|
8164
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8165
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8166
|
+
*/
|
|
8167
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8154
8168
|
startedAt: number(),
|
|
8155
8169
|
finishedAt: number().nullable(),
|
|
8156
8170
|
error: string().nullable()
|
|
@@ -8514,6 +8528,91 @@ var RelocateResidueSchema = object({
|
|
|
8514
8528
|
segments: number().int().nonnegative(),
|
|
8515
8529
|
bytes: number().int().nonnegative()
|
|
8516
8530
|
}).nullable();
|
|
8531
|
+
/**
|
|
8532
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8533
|
+
* (D319).
|
|
8534
|
+
*
|
|
8535
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8536
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8537
|
+
* destructive run before authorising it.
|
|
8538
|
+
*/
|
|
8539
|
+
var LedgerWalkInputSchema = object({
|
|
8540
|
+
locationId: string().min(1),
|
|
8541
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8542
|
+
apply: boolean().optional(),
|
|
8543
|
+
/** Narrow to one camera. */
|
|
8544
|
+
deviceId: number().int().positive().optional(),
|
|
8545
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8546
|
+
profiles: array(string().min(1)).optional()
|
|
8547
|
+
});
|
|
8548
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8549
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8550
|
+
"location-unknown",
|
|
8551
|
+
"source-writable",
|
|
8552
|
+
"no-ledger",
|
|
8553
|
+
"archive-unreadable",
|
|
8554
|
+
"anchor-absent",
|
|
8555
|
+
"anchor-unreadable",
|
|
8556
|
+
"anchor-moved"
|
|
8557
|
+
]);
|
|
8558
|
+
_enum([
|
|
8559
|
+
"live-tail",
|
|
8560
|
+
"listing-error",
|
|
8561
|
+
"path-mismatch",
|
|
8562
|
+
"durable-refused"
|
|
8563
|
+
]);
|
|
8564
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8565
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8566
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8567
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8568
|
+
"live-tail": number().int().nonnegative(),
|
|
8569
|
+
"listing-error": number().int().nonnegative(),
|
|
8570
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8571
|
+
"durable-refused": number().int().nonnegative()
|
|
8572
|
+
});
|
|
8573
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8574
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8575
|
+
deviceId: number().int(),
|
|
8576
|
+
hoursWalked: number().int().nonnegative(),
|
|
8577
|
+
hoursMissing: number().int().nonnegative(),
|
|
8578
|
+
ghostSegments: number().int().nonnegative(),
|
|
8579
|
+
ghostBytes: number().int().nonnegative(),
|
|
8580
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8581
|
+
orphanFiles: number().int().nonnegative()
|
|
8582
|
+
});
|
|
8583
|
+
/**
|
|
8584
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8585
|
+
*
|
|
8586
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8587
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8588
|
+
* than in the absence of one.
|
|
8589
|
+
*/
|
|
8590
|
+
var LedgerWalkReportSchema = object({
|
|
8591
|
+
locationId: string(),
|
|
8592
|
+
applied: boolean(),
|
|
8593
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8594
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8595
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8596
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8597
|
+
hoursWalked: number().int().nonnegative(),
|
|
8598
|
+
hoursMissing: number().int().nonnegative(),
|
|
8599
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8600
|
+
listings: number().int().nonnegative(),
|
|
8601
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8602
|
+
ghostSegments: number().int().nonnegative(),
|
|
8603
|
+
ghostBytes: number().int().nonnegative(),
|
|
8604
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8605
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8606
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8607
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8608
|
+
orphanFiles: number().int().nonnegative(),
|
|
8609
|
+
orphanSample: array(string()).readonly(),
|
|
8610
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8611
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8612
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8613
|
+
bounded: boolean(),
|
|
8614
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8615
|
+
});
|
|
8517
8616
|
/** How many rows a media pass would still act on against a given target — the
|
|
8518
8617
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8519
8618
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -18842,13 +18941,15 @@ var ListGroupsPageSchema = object({
|
|
|
18842
18941
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
18843
18942
|
nextCursor: string().nullable()
|
|
18844
18943
|
});
|
|
18944
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
18945
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
18845
18946
|
var KeyEventQueryInput = object({
|
|
18846
18947
|
deviceId: number(),
|
|
18847
18948
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
18848
18949
|
since: number(),
|
|
18849
18950
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
18850
18951
|
until: number(),
|
|
18851
|
-
limit: number().int().min(1).max(
|
|
18952
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18852
18953
|
/** Drop tracks scoring below this importance. */
|
|
18853
18954
|
minImportance: number().min(0).max(1).optional(),
|
|
18854
18955
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -18870,6 +18971,32 @@ var KeyEventSchema = object({
|
|
|
18870
18971
|
...TrackFlagFields,
|
|
18871
18972
|
...TrackRetrainFields
|
|
18872
18973
|
});
|
|
18974
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
18975
|
+
var KeyEventBatchQueryInput = object({
|
|
18976
|
+
deviceIds: array(number()).min(1).max(200),
|
|
18977
|
+
since: number(),
|
|
18978
|
+
until: number(),
|
|
18979
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
18980
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
18981
|
+
* rows and change what the merged feed contains. */
|
|
18982
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18983
|
+
minImportance: number().min(0).max(1).optional(),
|
|
18984
|
+
classFilter: string().optional()
|
|
18985
|
+
});
|
|
18986
|
+
/**
|
|
18987
|
+
* One camera's key events in a batch answer.
|
|
18988
|
+
*
|
|
18989
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
18990
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
18991
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
18992
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
18993
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
18994
|
+
* key, which only worked because there was one query per camera).
|
|
18995
|
+
*/
|
|
18996
|
+
var KeyEventsForDeviceSchema = object({
|
|
18997
|
+
deviceId: number(),
|
|
18998
|
+
events: array(KeyEventSchema).readonly()
|
|
18999
|
+
});
|
|
18873
19000
|
object({
|
|
18874
19001
|
trackId: string(),
|
|
18875
19002
|
className: string(),
|
|
@@ -19139,7 +19266,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19139
19266
|
until: number().optional(),
|
|
19140
19267
|
kinds: array(string()).optional(),
|
|
19141
19268
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19142
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19269
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19143
19270
|
deviceId: number(),
|
|
19144
19271
|
since: number(),
|
|
19145
19272
|
until: number(),
|
|
@@ -26791,6 +26918,9 @@ method(object({
|
|
|
26791
26918
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26792
26919
|
kind: "query",
|
|
26793
26920
|
auth: "admin"
|
|
26921
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
26922
|
+
kind: "mutation",
|
|
26923
|
+
auth: "admin"
|
|
26794
26924
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26795
26925
|
kind: "mutation",
|
|
26796
26926
|
auth: "admin"
|
|
@@ -27182,7 +27312,26 @@ var SceneMonitorStatusSchema = object({
|
|
|
27182
27312
|
monitors: array(SceneMonitorSchema),
|
|
27183
27313
|
lastFetchedAt: number()
|
|
27184
27314
|
});
|
|
27185
|
-
|
|
27315
|
+
/**
|
|
27316
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
27317
|
+
*
|
|
27318
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
27319
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
27320
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
27321
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
27322
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
27323
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
27324
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
27325
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
27326
|
+
*
|
|
27327
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
27328
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
27329
|
+
*/
|
|
27330
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
27331
|
+
deviceId: number(),
|
|
27332
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
27333
|
+
});
|
|
27334
|
+
DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
|
|
27186
27335
|
deviceId: number(),
|
|
27187
27336
|
label: string(),
|
|
27188
27337
|
roi: MaskRectShapeSchema,
|
|
@@ -28506,6 +28655,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
28506
28655
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
28507
28656
|
});
|
|
28508
28657
|
/**
|
|
28658
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
28659
|
+
*
|
|
28660
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
28661
|
+
* because `snapshot: null` was already spoken for:
|
|
28662
|
+
*
|
|
28663
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
28664
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
28665
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
28666
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
28667
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
28668
|
+
*
|
|
28669
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
28670
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
28671
|
+
* which is a definite claim about a camera nobody could read.
|
|
28672
|
+
*/
|
|
28673
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
28674
|
+
deviceId: number(),
|
|
28675
|
+
read: _enum(["read", "unreadable"]),
|
|
28676
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
28677
|
+
});
|
|
28678
|
+
/**
|
|
28509
28679
|
* Time-series resolution. The history methods return one bucket per
|
|
28510
28680
|
* step over the requested range. Smaller resolutions cost more
|
|
28511
28681
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -28529,7 +28699,7 @@ var HistoryPointSchema = object({
|
|
|
28529
28699
|
/** Object count averaged over the bucket (rounded to nearest integer). */
|
|
28530
28700
|
count: number().int().nonnegative()
|
|
28531
28701
|
});
|
|
28532
|
-
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
|
|
28702
|
+
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
|
|
28533
28703
|
deviceId: number(),
|
|
28534
28704
|
zoneId: string(),
|
|
28535
28705
|
className: string().optional()
|
|
@@ -31834,6 +32004,12 @@ Object.freeze({
|
|
|
31834
32004
|
addonId: null,
|
|
31835
32005
|
access: "view"
|
|
31836
32006
|
},
|
|
32007
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
32008
|
+
capName: "pipeline-analytics",
|
|
32009
|
+
capScope: "device",
|
|
32010
|
+
addonId: null,
|
|
32011
|
+
access: "view"
|
|
32012
|
+
},
|
|
31837
32013
|
"pipelineAnalytics.getMotionEvents": {
|
|
31838
32014
|
capName: "pipeline-analytics",
|
|
31839
32015
|
capScope: "device",
|
|
@@ -33010,6 +33186,12 @@ Object.freeze({
|
|
|
33010
33186
|
addonId: null,
|
|
33011
33187
|
access: "view"
|
|
33012
33188
|
},
|
|
33189
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
33190
|
+
capName: "recording",
|
|
33191
|
+
capScope: "system",
|
|
33192
|
+
addonId: null,
|
|
33193
|
+
access: "create"
|
|
33194
|
+
},
|
|
33013
33195
|
"recording.refreshStorageLocationsForMigration": {
|
|
33014
33196
|
capName: "recording",
|
|
33015
33197
|
capScope: "system",
|
|
@@ -33136,6 +33318,12 @@ Object.freeze({
|
|
|
33136
33318
|
addonId: null,
|
|
33137
33319
|
access: "view"
|
|
33138
33320
|
},
|
|
33321
|
+
"sceneMonitor.listScenesBatch": {
|
|
33322
|
+
capName: "scene-monitor",
|
|
33323
|
+
capScope: "device",
|
|
33324
|
+
addonId: null,
|
|
33325
|
+
access: "view"
|
|
33326
|
+
},
|
|
33139
33327
|
"sceneMonitor.recheckNow": {
|
|
33140
33328
|
capName: "scene-monitor",
|
|
33141
33329
|
capScope: "device",
|
|
@@ -34492,6 +34680,12 @@ Object.freeze({
|
|
|
34492
34680
|
addonId: null,
|
|
34493
34681
|
access: "view"
|
|
34494
34682
|
},
|
|
34683
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
34684
|
+
capName: "zone-analytics",
|
|
34685
|
+
capScope: "device",
|
|
34686
|
+
addonId: null,
|
|
34687
|
+
access: "view"
|
|
34688
|
+
},
|
|
34495
34689
|
"zoneAnalytics.getUnzonedHistory": {
|
|
34496
34690
|
capName: "zone-analytics",
|
|
34497
34691
|
capScope: "device",
|
|
@@ -35496,6 +35690,11 @@ Object.freeze({
|
|
|
35496
35690
|
form: "single",
|
|
35497
35691
|
optional: false
|
|
35498
35692
|
}],
|
|
35693
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
35694
|
+
name: "deviceIds",
|
|
35695
|
+
form: "array",
|
|
35696
|
+
optional: false
|
|
35697
|
+
}],
|
|
35499
35698
|
"pipelineAnalytics.getMotionEvents": [{
|
|
35500
35699
|
name: "deviceId",
|
|
35501
35700
|
form: "single",
|
|
@@ -35936,6 +36135,11 @@ Object.freeze({
|
|
|
35936
36135
|
form: "single",
|
|
35937
36136
|
optional: false
|
|
35938
36137
|
}],
|
|
36138
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
36139
|
+
name: "deviceId",
|
|
36140
|
+
form: "single",
|
|
36141
|
+
optional: true
|
|
36142
|
+
}],
|
|
35939
36143
|
"recording.relocateFootage": [{
|
|
35940
36144
|
name: "deviceId",
|
|
35941
36145
|
form: "single",
|
|
@@ -36001,6 +36205,11 @@ Object.freeze({
|
|
|
36001
36205
|
form: "single",
|
|
36002
36206
|
optional: false
|
|
36003
36207
|
}],
|
|
36208
|
+
"sceneMonitor.listScenesBatch": [{
|
|
36209
|
+
name: "deviceIds",
|
|
36210
|
+
form: "array",
|
|
36211
|
+
optional: false
|
|
36212
|
+
}],
|
|
36004
36213
|
"sceneMonitor.recheckNow": [{
|
|
36005
36214
|
name: "deviceId",
|
|
36006
36215
|
form: "single",
|
|
@@ -36262,6 +36471,11 @@ Object.freeze({
|
|
|
36262
36471
|
form: "single",
|
|
36263
36472
|
optional: false
|
|
36264
36473
|
}],
|
|
36474
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
36475
|
+
name: "deviceIds",
|
|
36476
|
+
form: "array",
|
|
36477
|
+
optional: false
|
|
36478
|
+
}],
|
|
36265
36479
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
36266
36480
|
name: "deviceId",
|
|
36267
36481
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -8124,6 +8124,20 @@ var RelocateJobSchema = object({
|
|
|
8124
8124
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8125
8125
|
*/
|
|
8126
8126
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8127
|
+
/**
|
|
8128
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8129
|
+
*
|
|
8130
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8131
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8132
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8133
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8134
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8135
|
+
* the same failure as one that quietly skips them (D295).
|
|
8136
|
+
*
|
|
8137
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8138
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8139
|
+
*/
|
|
8140
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8127
8141
|
startedAt: number(),
|
|
8128
8142
|
finishedAt: number().nullable(),
|
|
8129
8143
|
error: string().nullable()
|
|
@@ -8487,6 +8501,91 @@ var RelocateResidueSchema = object({
|
|
|
8487
8501
|
segments: number().int().nonnegative(),
|
|
8488
8502
|
bytes: number().int().nonnegative()
|
|
8489
8503
|
}).nullable();
|
|
8504
|
+
/**
|
|
8505
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8506
|
+
* (D319).
|
|
8507
|
+
*
|
|
8508
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8509
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8510
|
+
* destructive run before authorising it.
|
|
8511
|
+
*/
|
|
8512
|
+
var LedgerWalkInputSchema = object({
|
|
8513
|
+
locationId: string().min(1),
|
|
8514
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8515
|
+
apply: boolean().optional(),
|
|
8516
|
+
/** Narrow to one camera. */
|
|
8517
|
+
deviceId: number().int().positive().optional(),
|
|
8518
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8519
|
+
profiles: array(string().min(1)).optional()
|
|
8520
|
+
});
|
|
8521
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8522
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8523
|
+
"location-unknown",
|
|
8524
|
+
"source-writable",
|
|
8525
|
+
"no-ledger",
|
|
8526
|
+
"archive-unreadable",
|
|
8527
|
+
"anchor-absent",
|
|
8528
|
+
"anchor-unreadable",
|
|
8529
|
+
"anchor-moved"
|
|
8530
|
+
]);
|
|
8531
|
+
_enum([
|
|
8532
|
+
"live-tail",
|
|
8533
|
+
"listing-error",
|
|
8534
|
+
"path-mismatch",
|
|
8535
|
+
"durable-refused"
|
|
8536
|
+
]);
|
|
8537
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8538
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8539
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8540
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8541
|
+
"live-tail": number().int().nonnegative(),
|
|
8542
|
+
"listing-error": number().int().nonnegative(),
|
|
8543
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8544
|
+
"durable-refused": number().int().nonnegative()
|
|
8545
|
+
});
|
|
8546
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8547
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8548
|
+
deviceId: number().int(),
|
|
8549
|
+
hoursWalked: number().int().nonnegative(),
|
|
8550
|
+
hoursMissing: number().int().nonnegative(),
|
|
8551
|
+
ghostSegments: number().int().nonnegative(),
|
|
8552
|
+
ghostBytes: number().int().nonnegative(),
|
|
8553
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8554
|
+
orphanFiles: number().int().nonnegative()
|
|
8555
|
+
});
|
|
8556
|
+
/**
|
|
8557
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8558
|
+
*
|
|
8559
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8560
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8561
|
+
* than in the absence of one.
|
|
8562
|
+
*/
|
|
8563
|
+
var LedgerWalkReportSchema = object({
|
|
8564
|
+
locationId: string(),
|
|
8565
|
+
applied: boolean(),
|
|
8566
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8567
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8568
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8569
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8570
|
+
hoursWalked: number().int().nonnegative(),
|
|
8571
|
+
hoursMissing: number().int().nonnegative(),
|
|
8572
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8573
|
+
listings: number().int().nonnegative(),
|
|
8574
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8575
|
+
ghostSegments: number().int().nonnegative(),
|
|
8576
|
+
ghostBytes: number().int().nonnegative(),
|
|
8577
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8578
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8579
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8580
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8581
|
+
orphanFiles: number().int().nonnegative(),
|
|
8582
|
+
orphanSample: array(string()).readonly(),
|
|
8583
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8584
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8585
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8586
|
+
bounded: boolean(),
|
|
8587
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8588
|
+
});
|
|
8490
8589
|
/** How many rows a media pass would still act on against a given target — the
|
|
8491
8590
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8492
8591
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -18815,13 +18914,15 @@ var ListGroupsPageSchema = object({
|
|
|
18815
18914
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
18816
18915
|
nextCursor: string().nullable()
|
|
18817
18916
|
});
|
|
18917
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
18918
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
18818
18919
|
var KeyEventQueryInput = object({
|
|
18819
18920
|
deviceId: number(),
|
|
18820
18921
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
18821
18922
|
since: number(),
|
|
18822
18923
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
18823
18924
|
until: number(),
|
|
18824
|
-
limit: number().int().min(1).max(
|
|
18925
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18825
18926
|
/** Drop tracks scoring below this importance. */
|
|
18826
18927
|
minImportance: number().min(0).max(1).optional(),
|
|
18827
18928
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -18843,6 +18944,32 @@ var KeyEventSchema = object({
|
|
|
18843
18944
|
...TrackFlagFields,
|
|
18844
18945
|
...TrackRetrainFields
|
|
18845
18946
|
});
|
|
18947
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
18948
|
+
var KeyEventBatchQueryInput = object({
|
|
18949
|
+
deviceIds: array(number()).min(1).max(200),
|
|
18950
|
+
since: number(),
|
|
18951
|
+
until: number(),
|
|
18952
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
18953
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
18954
|
+
* rows and change what the merged feed contains. */
|
|
18955
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18956
|
+
minImportance: number().min(0).max(1).optional(),
|
|
18957
|
+
classFilter: string().optional()
|
|
18958
|
+
});
|
|
18959
|
+
/**
|
|
18960
|
+
* One camera's key events in a batch answer.
|
|
18961
|
+
*
|
|
18962
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
18963
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
18964
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
18965
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
18966
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
18967
|
+
* key, which only worked because there was one query per camera).
|
|
18968
|
+
*/
|
|
18969
|
+
var KeyEventsForDeviceSchema = object({
|
|
18970
|
+
deviceId: number(),
|
|
18971
|
+
events: array(KeyEventSchema).readonly()
|
|
18972
|
+
});
|
|
18846
18973
|
object({
|
|
18847
18974
|
trackId: string(),
|
|
18848
18975
|
className: string(),
|
|
@@ -19112,7 +19239,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19112
19239
|
until: number().optional(),
|
|
19113
19240
|
kinds: array(string()).optional(),
|
|
19114
19241
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19115
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19242
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19116
19243
|
deviceId: number(),
|
|
19117
19244
|
since: number(),
|
|
19118
19245
|
until: number(),
|
|
@@ -26764,6 +26891,9 @@ method(object({
|
|
|
26764
26891
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26765
26892
|
kind: "query",
|
|
26766
26893
|
auth: "admin"
|
|
26894
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
26895
|
+
kind: "mutation",
|
|
26896
|
+
auth: "admin"
|
|
26767
26897
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26768
26898
|
kind: "mutation",
|
|
26769
26899
|
auth: "admin"
|
|
@@ -27155,7 +27285,26 @@ var SceneMonitorStatusSchema = object({
|
|
|
27155
27285
|
monitors: array(SceneMonitorSchema),
|
|
27156
27286
|
lastFetchedAt: number()
|
|
27157
27287
|
});
|
|
27158
|
-
|
|
27288
|
+
/**
|
|
27289
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
27290
|
+
*
|
|
27291
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
27292
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
27293
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
27294
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
27295
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
27296
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
27297
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
27298
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
27299
|
+
*
|
|
27300
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
27301
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
27302
|
+
*/
|
|
27303
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
27304
|
+
deviceId: number(),
|
|
27305
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
27306
|
+
});
|
|
27307
|
+
DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
|
|
27159
27308
|
deviceId: number(),
|
|
27160
27309
|
label: string(),
|
|
27161
27310
|
roi: MaskRectShapeSchema,
|
|
@@ -28479,6 +28628,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
28479
28628
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
28480
28629
|
});
|
|
28481
28630
|
/**
|
|
28631
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
28632
|
+
*
|
|
28633
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
28634
|
+
* because `snapshot: null` was already spoken for:
|
|
28635
|
+
*
|
|
28636
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
28637
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
28638
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
28639
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
28640
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
28641
|
+
*
|
|
28642
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
28643
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
28644
|
+
* which is a definite claim about a camera nobody could read.
|
|
28645
|
+
*/
|
|
28646
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
28647
|
+
deviceId: number(),
|
|
28648
|
+
read: _enum(["read", "unreadable"]),
|
|
28649
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
28650
|
+
});
|
|
28651
|
+
/**
|
|
28482
28652
|
* Time-series resolution. The history methods return one bucket per
|
|
28483
28653
|
* step over the requested range. Smaller resolutions cost more
|
|
28484
28654
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -28502,7 +28672,7 @@ var HistoryPointSchema = object({
|
|
|
28502
28672
|
/** Object count averaged over the bucket (rounded to nearest integer). */
|
|
28503
28673
|
count: number().int().nonnegative()
|
|
28504
28674
|
});
|
|
28505
|
-
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
|
|
28675
|
+
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
|
|
28506
28676
|
deviceId: number(),
|
|
28507
28677
|
zoneId: string(),
|
|
28508
28678
|
className: string().optional()
|
|
@@ -31807,6 +31977,12 @@ Object.freeze({
|
|
|
31807
31977
|
addonId: null,
|
|
31808
31978
|
access: "view"
|
|
31809
31979
|
},
|
|
31980
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
31981
|
+
capName: "pipeline-analytics",
|
|
31982
|
+
capScope: "device",
|
|
31983
|
+
addonId: null,
|
|
31984
|
+
access: "view"
|
|
31985
|
+
},
|
|
31810
31986
|
"pipelineAnalytics.getMotionEvents": {
|
|
31811
31987
|
capName: "pipeline-analytics",
|
|
31812
31988
|
capScope: "device",
|
|
@@ -32983,6 +33159,12 @@ Object.freeze({
|
|
|
32983
33159
|
addonId: null,
|
|
32984
33160
|
access: "view"
|
|
32985
33161
|
},
|
|
33162
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
33163
|
+
capName: "recording",
|
|
33164
|
+
capScope: "system",
|
|
33165
|
+
addonId: null,
|
|
33166
|
+
access: "create"
|
|
33167
|
+
},
|
|
32986
33168
|
"recording.refreshStorageLocationsForMigration": {
|
|
32987
33169
|
capName: "recording",
|
|
32988
33170
|
capScope: "system",
|
|
@@ -33109,6 +33291,12 @@ Object.freeze({
|
|
|
33109
33291
|
addonId: null,
|
|
33110
33292
|
access: "view"
|
|
33111
33293
|
},
|
|
33294
|
+
"sceneMonitor.listScenesBatch": {
|
|
33295
|
+
capName: "scene-monitor",
|
|
33296
|
+
capScope: "device",
|
|
33297
|
+
addonId: null,
|
|
33298
|
+
access: "view"
|
|
33299
|
+
},
|
|
33112
33300
|
"sceneMonitor.recheckNow": {
|
|
33113
33301
|
capName: "scene-monitor",
|
|
33114
33302
|
capScope: "device",
|
|
@@ -34465,6 +34653,12 @@ Object.freeze({
|
|
|
34465
34653
|
addonId: null,
|
|
34466
34654
|
access: "view"
|
|
34467
34655
|
},
|
|
34656
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
34657
|
+
capName: "zone-analytics",
|
|
34658
|
+
capScope: "device",
|
|
34659
|
+
addonId: null,
|
|
34660
|
+
access: "view"
|
|
34661
|
+
},
|
|
34468
34662
|
"zoneAnalytics.getUnzonedHistory": {
|
|
34469
34663
|
capName: "zone-analytics",
|
|
34470
34664
|
capScope: "device",
|
|
@@ -35469,6 +35663,11 @@ Object.freeze({
|
|
|
35469
35663
|
form: "single",
|
|
35470
35664
|
optional: false
|
|
35471
35665
|
}],
|
|
35666
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
35667
|
+
name: "deviceIds",
|
|
35668
|
+
form: "array",
|
|
35669
|
+
optional: false
|
|
35670
|
+
}],
|
|
35472
35671
|
"pipelineAnalytics.getMotionEvents": [{
|
|
35473
35672
|
name: "deviceId",
|
|
35474
35673
|
form: "single",
|
|
@@ -35909,6 +36108,11 @@ Object.freeze({
|
|
|
35909
36108
|
form: "single",
|
|
35910
36109
|
optional: false
|
|
35911
36110
|
}],
|
|
36111
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
36112
|
+
name: "deviceId",
|
|
36113
|
+
form: "single",
|
|
36114
|
+
optional: true
|
|
36115
|
+
}],
|
|
35912
36116
|
"recording.relocateFootage": [{
|
|
35913
36117
|
name: "deviceId",
|
|
35914
36118
|
form: "single",
|
|
@@ -35974,6 +36178,11 @@ Object.freeze({
|
|
|
35974
36178
|
form: "single",
|
|
35975
36179
|
optional: false
|
|
35976
36180
|
}],
|
|
36181
|
+
"sceneMonitor.listScenesBatch": [{
|
|
36182
|
+
name: "deviceIds",
|
|
36183
|
+
form: "array",
|
|
36184
|
+
optional: false
|
|
36185
|
+
}],
|
|
35977
36186
|
"sceneMonitor.recheckNow": [{
|
|
35978
36187
|
name: "deviceId",
|
|
35979
36188
|
form: "single",
|
|
@@ -36235,6 +36444,11 @@ Object.freeze({
|
|
|
36235
36444
|
form: "single",
|
|
36236
36445
|
optional: false
|
|
36237
36446
|
}],
|
|
36447
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
36448
|
+
name: "deviceIds",
|
|
36449
|
+
form: "array",
|
|
36450
|
+
optional: false
|
|
36451
|
+
}],
|
|
36238
36452
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
36239
36453
|
name: "deviceId",
|
|
36240
36454
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-notifiers",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.53",
|
|
4
4
|
"description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|