@camstack/addon-decoder-ffmpeg 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/index.js +218 -4
- package/dist/index.mjs +218 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8019,6 +8019,20 @@ var RelocateJobSchema = object({
|
|
|
8019
8019
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8020
8020
|
*/
|
|
8021
8021
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8022
|
+
/**
|
|
8023
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8024
|
+
*
|
|
8025
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8026
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8027
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8028
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8029
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8030
|
+
* the same failure as one that quietly skips them (D295).
|
|
8031
|
+
*
|
|
8032
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8033
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8034
|
+
*/
|
|
8035
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8022
8036
|
startedAt: number(),
|
|
8023
8037
|
finishedAt: number().nullable(),
|
|
8024
8038
|
error: string().nullable()
|
|
@@ -8382,6 +8396,91 @@ var RelocateResidueSchema = object({
|
|
|
8382
8396
|
segments: number().int().nonnegative(),
|
|
8383
8397
|
bytes: number().int().nonnegative()
|
|
8384
8398
|
}).nullable();
|
|
8399
|
+
/**
|
|
8400
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8401
|
+
* (D319).
|
|
8402
|
+
*
|
|
8403
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8404
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8405
|
+
* destructive run before authorising it.
|
|
8406
|
+
*/
|
|
8407
|
+
var LedgerWalkInputSchema = object({
|
|
8408
|
+
locationId: string().min(1),
|
|
8409
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8410
|
+
apply: boolean().optional(),
|
|
8411
|
+
/** Narrow to one camera. */
|
|
8412
|
+
deviceId: number().int().positive().optional(),
|
|
8413
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8414
|
+
profiles: array(string().min(1)).optional()
|
|
8415
|
+
});
|
|
8416
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8417
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8418
|
+
"location-unknown",
|
|
8419
|
+
"source-writable",
|
|
8420
|
+
"no-ledger",
|
|
8421
|
+
"archive-unreadable",
|
|
8422
|
+
"anchor-absent",
|
|
8423
|
+
"anchor-unreadable",
|
|
8424
|
+
"anchor-moved"
|
|
8425
|
+
]);
|
|
8426
|
+
_enum([
|
|
8427
|
+
"live-tail",
|
|
8428
|
+
"listing-error",
|
|
8429
|
+
"path-mismatch",
|
|
8430
|
+
"durable-refused"
|
|
8431
|
+
]);
|
|
8432
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8433
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8434
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8435
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8436
|
+
"live-tail": number().int().nonnegative(),
|
|
8437
|
+
"listing-error": number().int().nonnegative(),
|
|
8438
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8439
|
+
"durable-refused": number().int().nonnegative()
|
|
8440
|
+
});
|
|
8441
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8442
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8443
|
+
deviceId: number().int(),
|
|
8444
|
+
hoursWalked: number().int().nonnegative(),
|
|
8445
|
+
hoursMissing: number().int().nonnegative(),
|
|
8446
|
+
ghostSegments: number().int().nonnegative(),
|
|
8447
|
+
ghostBytes: number().int().nonnegative(),
|
|
8448
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8449
|
+
orphanFiles: number().int().nonnegative()
|
|
8450
|
+
});
|
|
8451
|
+
/**
|
|
8452
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8453
|
+
*
|
|
8454
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8455
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8456
|
+
* than in the absence of one.
|
|
8457
|
+
*/
|
|
8458
|
+
var LedgerWalkReportSchema = object({
|
|
8459
|
+
locationId: string(),
|
|
8460
|
+
applied: boolean(),
|
|
8461
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8462
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8463
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8464
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8465
|
+
hoursWalked: number().int().nonnegative(),
|
|
8466
|
+
hoursMissing: number().int().nonnegative(),
|
|
8467
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8468
|
+
listings: number().int().nonnegative(),
|
|
8469
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8470
|
+
ghostSegments: number().int().nonnegative(),
|
|
8471
|
+
ghostBytes: number().int().nonnegative(),
|
|
8472
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8473
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8474
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8475
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8476
|
+
orphanFiles: number().int().nonnegative(),
|
|
8477
|
+
orphanSample: array(string()).readonly(),
|
|
8478
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8479
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8480
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8481
|
+
bounded: boolean(),
|
|
8482
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8483
|
+
});
|
|
8385
8484
|
/** How many rows a media pass would still act on against a given target — the
|
|
8386
8485
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8387
8486
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -18785,13 +18884,15 @@ var ListGroupsPageSchema = object({
|
|
|
18785
18884
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
18786
18885
|
nextCursor: string().nullable()
|
|
18787
18886
|
});
|
|
18887
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
18888
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
18788
18889
|
var KeyEventQueryInput = object({
|
|
18789
18890
|
deviceId: number(),
|
|
18790
18891
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
18791
18892
|
since: number(),
|
|
18792
18893
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
18793
18894
|
until: number(),
|
|
18794
|
-
limit: number().int().min(1).max(
|
|
18895
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18795
18896
|
/** Drop tracks scoring below this importance. */
|
|
18796
18897
|
minImportance: number().min(0).max(1).optional(),
|
|
18797
18898
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -18813,6 +18914,32 @@ var KeyEventSchema = object({
|
|
|
18813
18914
|
...TrackFlagFields,
|
|
18814
18915
|
...TrackRetrainFields
|
|
18815
18916
|
});
|
|
18917
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
18918
|
+
var KeyEventBatchQueryInput = object({
|
|
18919
|
+
deviceIds: array(number()).min(1).max(200),
|
|
18920
|
+
since: number(),
|
|
18921
|
+
until: number(),
|
|
18922
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
18923
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
18924
|
+
* rows and change what the merged feed contains. */
|
|
18925
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18926
|
+
minImportance: number().min(0).max(1).optional(),
|
|
18927
|
+
classFilter: string().optional()
|
|
18928
|
+
});
|
|
18929
|
+
/**
|
|
18930
|
+
* One camera's key events in a batch answer.
|
|
18931
|
+
*
|
|
18932
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
18933
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
18934
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
18935
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
18936
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
18937
|
+
* key, which only worked because there was one query per camera).
|
|
18938
|
+
*/
|
|
18939
|
+
var KeyEventsForDeviceSchema = object({
|
|
18940
|
+
deviceId: number(),
|
|
18941
|
+
events: array(KeyEventSchema).readonly()
|
|
18942
|
+
});
|
|
18816
18943
|
object({
|
|
18817
18944
|
trackId: string(),
|
|
18818
18945
|
className: string(),
|
|
@@ -19082,7 +19209,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19082
19209
|
until: number().optional(),
|
|
19083
19210
|
kinds: array(string()).optional(),
|
|
19084
19211
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19085
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19212
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19086
19213
|
deviceId: number(),
|
|
19087
19214
|
since: number(),
|
|
19088
19215
|
until: number(),
|
|
@@ -26734,6 +26861,9 @@ method(object({
|
|
|
26734
26861
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26735
26862
|
kind: "query",
|
|
26736
26863
|
auth: "admin"
|
|
26864
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
26865
|
+
kind: "mutation",
|
|
26866
|
+
auth: "admin"
|
|
26737
26867
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26738
26868
|
kind: "mutation",
|
|
26739
26869
|
auth: "admin"
|
|
@@ -27125,7 +27255,26 @@ var SceneMonitorStatusSchema = object({
|
|
|
27125
27255
|
monitors: array(SceneMonitorSchema),
|
|
27126
27256
|
lastFetchedAt: number()
|
|
27127
27257
|
});
|
|
27128
|
-
|
|
27258
|
+
/**
|
|
27259
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
27260
|
+
*
|
|
27261
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
27262
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
27263
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
27264
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
27265
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
27266
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
27267
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
27268
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
27269
|
+
*
|
|
27270
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
27271
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
27272
|
+
*/
|
|
27273
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
27274
|
+
deviceId: number(),
|
|
27275
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
27276
|
+
});
|
|
27277
|
+
DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
|
|
27129
27278
|
deviceId: number(),
|
|
27130
27279
|
label: string(),
|
|
27131
27280
|
roi: MaskRectShapeSchema,
|
|
@@ -28449,6 +28598,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
28449
28598
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
28450
28599
|
});
|
|
28451
28600
|
/**
|
|
28601
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
28602
|
+
*
|
|
28603
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
28604
|
+
* because `snapshot: null` was already spoken for:
|
|
28605
|
+
*
|
|
28606
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
28607
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
28608
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
28609
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
28610
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
28611
|
+
*
|
|
28612
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
28613
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
28614
|
+
* which is a definite claim about a camera nobody could read.
|
|
28615
|
+
*/
|
|
28616
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
28617
|
+
deviceId: number(),
|
|
28618
|
+
read: _enum(["read", "unreadable"]),
|
|
28619
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
28620
|
+
});
|
|
28621
|
+
/**
|
|
28452
28622
|
* Time-series resolution. The history methods return one bucket per
|
|
28453
28623
|
* step over the requested range. Smaller resolutions cost more
|
|
28454
28624
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -28472,7 +28642,7 @@ var HistoryPointSchema = object({
|
|
|
28472
28642
|
/** Object count averaged over the bucket (rounded to nearest integer). */
|
|
28473
28643
|
count: number().int().nonnegative()
|
|
28474
28644
|
});
|
|
28475
|
-
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
|
|
28645
|
+
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
|
|
28476
28646
|
deviceId: number(),
|
|
28477
28647
|
zoneId: string(),
|
|
28478
28648
|
className: string().optional()
|
|
@@ -31777,6 +31947,12 @@ Object.freeze({
|
|
|
31777
31947
|
addonId: null,
|
|
31778
31948
|
access: "view"
|
|
31779
31949
|
},
|
|
31950
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
31951
|
+
capName: "pipeline-analytics",
|
|
31952
|
+
capScope: "device",
|
|
31953
|
+
addonId: null,
|
|
31954
|
+
access: "view"
|
|
31955
|
+
},
|
|
31780
31956
|
"pipelineAnalytics.getMotionEvents": {
|
|
31781
31957
|
capName: "pipeline-analytics",
|
|
31782
31958
|
capScope: "device",
|
|
@@ -32953,6 +33129,12 @@ Object.freeze({
|
|
|
32953
33129
|
addonId: null,
|
|
32954
33130
|
access: "view"
|
|
32955
33131
|
},
|
|
33132
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
33133
|
+
capName: "recording",
|
|
33134
|
+
capScope: "system",
|
|
33135
|
+
addonId: null,
|
|
33136
|
+
access: "create"
|
|
33137
|
+
},
|
|
32956
33138
|
"recording.refreshStorageLocationsForMigration": {
|
|
32957
33139
|
capName: "recording",
|
|
32958
33140
|
capScope: "system",
|
|
@@ -33079,6 +33261,12 @@ Object.freeze({
|
|
|
33079
33261
|
addonId: null,
|
|
33080
33262
|
access: "view"
|
|
33081
33263
|
},
|
|
33264
|
+
"sceneMonitor.listScenesBatch": {
|
|
33265
|
+
capName: "scene-monitor",
|
|
33266
|
+
capScope: "device",
|
|
33267
|
+
addonId: null,
|
|
33268
|
+
access: "view"
|
|
33269
|
+
},
|
|
33082
33270
|
"sceneMonitor.recheckNow": {
|
|
33083
33271
|
capName: "scene-monitor",
|
|
33084
33272
|
capScope: "device",
|
|
@@ -34435,6 +34623,12 @@ Object.freeze({
|
|
|
34435
34623
|
addonId: null,
|
|
34436
34624
|
access: "view"
|
|
34437
34625
|
},
|
|
34626
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
34627
|
+
capName: "zone-analytics",
|
|
34628
|
+
capScope: "device",
|
|
34629
|
+
addonId: null,
|
|
34630
|
+
access: "view"
|
|
34631
|
+
},
|
|
34438
34632
|
"zoneAnalytics.getUnzonedHistory": {
|
|
34439
34633
|
capName: "zone-analytics",
|
|
34440
34634
|
capScope: "device",
|
|
@@ -35439,6 +35633,11 @@ Object.freeze({
|
|
|
35439
35633
|
form: "single",
|
|
35440
35634
|
optional: false
|
|
35441
35635
|
}],
|
|
35636
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
35637
|
+
name: "deviceIds",
|
|
35638
|
+
form: "array",
|
|
35639
|
+
optional: false
|
|
35640
|
+
}],
|
|
35442
35641
|
"pipelineAnalytics.getMotionEvents": [{
|
|
35443
35642
|
name: "deviceId",
|
|
35444
35643
|
form: "single",
|
|
@@ -35879,6 +36078,11 @@ Object.freeze({
|
|
|
35879
36078
|
form: "single",
|
|
35880
36079
|
optional: false
|
|
35881
36080
|
}],
|
|
36081
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
36082
|
+
name: "deviceId",
|
|
36083
|
+
form: "single",
|
|
36084
|
+
optional: true
|
|
36085
|
+
}],
|
|
35882
36086
|
"recording.relocateFootage": [{
|
|
35883
36087
|
name: "deviceId",
|
|
35884
36088
|
form: "single",
|
|
@@ -35944,6 +36148,11 @@ Object.freeze({
|
|
|
35944
36148
|
form: "single",
|
|
35945
36149
|
optional: false
|
|
35946
36150
|
}],
|
|
36151
|
+
"sceneMonitor.listScenesBatch": [{
|
|
36152
|
+
name: "deviceIds",
|
|
36153
|
+
form: "array",
|
|
36154
|
+
optional: false
|
|
36155
|
+
}],
|
|
35947
36156
|
"sceneMonitor.recheckNow": [{
|
|
35948
36157
|
name: "deviceId",
|
|
35949
36158
|
form: "single",
|
|
@@ -36205,6 +36414,11 @@ Object.freeze({
|
|
|
36205
36414
|
form: "single",
|
|
36206
36415
|
optional: false
|
|
36207
36416
|
}],
|
|
36417
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
36418
|
+
name: "deviceIds",
|
|
36419
|
+
form: "array",
|
|
36420
|
+
optional: false
|
|
36421
|
+
}],
|
|
36208
36422
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
36209
36423
|
name: "deviceId",
|
|
36210
36424
|
form: "single",
|
package/dist/index.mjs
CHANGED
|
@@ -8015,6 +8015,20 @@ var RelocateJobSchema = object({
|
|
|
8015
8015
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8016
8016
|
*/
|
|
8017
8017
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8018
|
+
/**
|
|
8019
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8020
|
+
*
|
|
8021
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8022
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8023
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8024
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8025
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8026
|
+
* the same failure as one that quietly skips them (D295).
|
|
8027
|
+
*
|
|
8028
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8029
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8030
|
+
*/
|
|
8031
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8018
8032
|
startedAt: number(),
|
|
8019
8033
|
finishedAt: number().nullable(),
|
|
8020
8034
|
error: string().nullable()
|
|
@@ -8378,6 +8392,91 @@ var RelocateResidueSchema = object({
|
|
|
8378
8392
|
segments: number().int().nonnegative(),
|
|
8379
8393
|
bytes: number().int().nonnegative()
|
|
8380
8394
|
}).nullable();
|
|
8395
|
+
/**
|
|
8396
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8397
|
+
* (D319).
|
|
8398
|
+
*
|
|
8399
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8400
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8401
|
+
* destructive run before authorising it.
|
|
8402
|
+
*/
|
|
8403
|
+
var LedgerWalkInputSchema = object({
|
|
8404
|
+
locationId: string().min(1),
|
|
8405
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8406
|
+
apply: boolean().optional(),
|
|
8407
|
+
/** Narrow to one camera. */
|
|
8408
|
+
deviceId: number().int().positive().optional(),
|
|
8409
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8410
|
+
profiles: array(string().min(1)).optional()
|
|
8411
|
+
});
|
|
8412
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8413
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8414
|
+
"location-unknown",
|
|
8415
|
+
"source-writable",
|
|
8416
|
+
"no-ledger",
|
|
8417
|
+
"archive-unreadable",
|
|
8418
|
+
"anchor-absent",
|
|
8419
|
+
"anchor-unreadable",
|
|
8420
|
+
"anchor-moved"
|
|
8421
|
+
]);
|
|
8422
|
+
_enum([
|
|
8423
|
+
"live-tail",
|
|
8424
|
+
"listing-error",
|
|
8425
|
+
"path-mismatch",
|
|
8426
|
+
"durable-refused"
|
|
8427
|
+
]);
|
|
8428
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8429
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8430
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8431
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8432
|
+
"live-tail": number().int().nonnegative(),
|
|
8433
|
+
"listing-error": number().int().nonnegative(),
|
|
8434
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8435
|
+
"durable-refused": number().int().nonnegative()
|
|
8436
|
+
});
|
|
8437
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8438
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8439
|
+
deviceId: number().int(),
|
|
8440
|
+
hoursWalked: number().int().nonnegative(),
|
|
8441
|
+
hoursMissing: number().int().nonnegative(),
|
|
8442
|
+
ghostSegments: number().int().nonnegative(),
|
|
8443
|
+
ghostBytes: number().int().nonnegative(),
|
|
8444
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8445
|
+
orphanFiles: number().int().nonnegative()
|
|
8446
|
+
});
|
|
8447
|
+
/**
|
|
8448
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8449
|
+
*
|
|
8450
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8451
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8452
|
+
* than in the absence of one.
|
|
8453
|
+
*/
|
|
8454
|
+
var LedgerWalkReportSchema = object({
|
|
8455
|
+
locationId: string(),
|
|
8456
|
+
applied: boolean(),
|
|
8457
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8458
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8459
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8460
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8461
|
+
hoursWalked: number().int().nonnegative(),
|
|
8462
|
+
hoursMissing: number().int().nonnegative(),
|
|
8463
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8464
|
+
listings: number().int().nonnegative(),
|
|
8465
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8466
|
+
ghostSegments: number().int().nonnegative(),
|
|
8467
|
+
ghostBytes: number().int().nonnegative(),
|
|
8468
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8469
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8470
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8471
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8472
|
+
orphanFiles: number().int().nonnegative(),
|
|
8473
|
+
orphanSample: array(string()).readonly(),
|
|
8474
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8475
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8476
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8477
|
+
bounded: boolean(),
|
|
8478
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8479
|
+
});
|
|
8381
8480
|
/** How many rows a media pass would still act on against a given target — the
|
|
8382
8481
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8383
8482
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -18781,13 +18880,15 @@ var ListGroupsPageSchema = object({
|
|
|
18781
18880
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
18782
18881
|
nextCursor: string().nullable()
|
|
18783
18882
|
});
|
|
18883
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
18884
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
18784
18885
|
var KeyEventQueryInput = object({
|
|
18785
18886
|
deviceId: number(),
|
|
18786
18887
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
18787
18888
|
since: number(),
|
|
18788
18889
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
18789
18890
|
until: number(),
|
|
18790
|
-
limit: number().int().min(1).max(
|
|
18891
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18791
18892
|
/** Drop tracks scoring below this importance. */
|
|
18792
18893
|
minImportance: number().min(0).max(1).optional(),
|
|
18793
18894
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -18809,6 +18910,32 @@ var KeyEventSchema = object({
|
|
|
18809
18910
|
...TrackFlagFields,
|
|
18810
18911
|
...TrackRetrainFields
|
|
18811
18912
|
});
|
|
18913
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
18914
|
+
var KeyEventBatchQueryInput = object({
|
|
18915
|
+
deviceIds: array(number()).min(1).max(200),
|
|
18916
|
+
since: number(),
|
|
18917
|
+
until: number(),
|
|
18918
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
18919
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
18920
|
+
* rows and change what the merged feed contains. */
|
|
18921
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18922
|
+
minImportance: number().min(0).max(1).optional(),
|
|
18923
|
+
classFilter: string().optional()
|
|
18924
|
+
});
|
|
18925
|
+
/**
|
|
18926
|
+
* One camera's key events in a batch answer.
|
|
18927
|
+
*
|
|
18928
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
18929
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
18930
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
18931
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
18932
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
18933
|
+
* key, which only worked because there was one query per camera).
|
|
18934
|
+
*/
|
|
18935
|
+
var KeyEventsForDeviceSchema = object({
|
|
18936
|
+
deviceId: number(),
|
|
18937
|
+
events: array(KeyEventSchema).readonly()
|
|
18938
|
+
});
|
|
18812
18939
|
object({
|
|
18813
18940
|
trackId: string(),
|
|
18814
18941
|
className: string(),
|
|
@@ -19078,7 +19205,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19078
19205
|
until: number().optional(),
|
|
19079
19206
|
kinds: array(string()).optional(),
|
|
19080
19207
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19081
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19208
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19082
19209
|
deviceId: number(),
|
|
19083
19210
|
since: number(),
|
|
19084
19211
|
until: number(),
|
|
@@ -26730,6 +26857,9 @@ method(object({
|
|
|
26730
26857
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26731
26858
|
kind: "query",
|
|
26732
26859
|
auth: "admin"
|
|
26860
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
26861
|
+
kind: "mutation",
|
|
26862
|
+
auth: "admin"
|
|
26733
26863
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26734
26864
|
kind: "mutation",
|
|
26735
26865
|
auth: "admin"
|
|
@@ -27121,7 +27251,26 @@ var SceneMonitorStatusSchema = object({
|
|
|
27121
27251
|
monitors: array(SceneMonitorSchema),
|
|
27122
27252
|
lastFetchedAt: number()
|
|
27123
27253
|
});
|
|
27124
|
-
|
|
27254
|
+
/**
|
|
27255
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
27256
|
+
*
|
|
27257
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
27258
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
27259
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
27260
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
27261
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
27262
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
27263
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
27264
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
27265
|
+
*
|
|
27266
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
27267
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
27268
|
+
*/
|
|
27269
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
27270
|
+
deviceId: number(),
|
|
27271
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
27272
|
+
});
|
|
27273
|
+
DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
|
|
27125
27274
|
deviceId: number(),
|
|
27126
27275
|
label: string(),
|
|
27127
27276
|
roi: MaskRectShapeSchema,
|
|
@@ -28445,6 +28594,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
28445
28594
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
28446
28595
|
});
|
|
28447
28596
|
/**
|
|
28597
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
28598
|
+
*
|
|
28599
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
28600
|
+
* because `snapshot: null` was already spoken for:
|
|
28601
|
+
*
|
|
28602
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
28603
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
28604
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
28605
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
28606
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
28607
|
+
*
|
|
28608
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
28609
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
28610
|
+
* which is a definite claim about a camera nobody could read.
|
|
28611
|
+
*/
|
|
28612
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
28613
|
+
deviceId: number(),
|
|
28614
|
+
read: _enum(["read", "unreadable"]),
|
|
28615
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
28616
|
+
});
|
|
28617
|
+
/**
|
|
28448
28618
|
* Time-series resolution. The history methods return one bucket per
|
|
28449
28619
|
* step over the requested range. Smaller resolutions cost more
|
|
28450
28620
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -28468,7 +28638,7 @@ var HistoryPointSchema = object({
|
|
|
28468
28638
|
/** Object count averaged over the bucket (rounded to nearest integer). */
|
|
28469
28639
|
count: number().int().nonnegative()
|
|
28470
28640
|
});
|
|
28471
|
-
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
|
|
28641
|
+
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
|
|
28472
28642
|
deviceId: number(),
|
|
28473
28643
|
zoneId: string(),
|
|
28474
28644
|
className: string().optional()
|
|
@@ -31773,6 +31943,12 @@ Object.freeze({
|
|
|
31773
31943
|
addonId: null,
|
|
31774
31944
|
access: "view"
|
|
31775
31945
|
},
|
|
31946
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
31947
|
+
capName: "pipeline-analytics",
|
|
31948
|
+
capScope: "device",
|
|
31949
|
+
addonId: null,
|
|
31950
|
+
access: "view"
|
|
31951
|
+
},
|
|
31776
31952
|
"pipelineAnalytics.getMotionEvents": {
|
|
31777
31953
|
capName: "pipeline-analytics",
|
|
31778
31954
|
capScope: "device",
|
|
@@ -32949,6 +33125,12 @@ Object.freeze({
|
|
|
32949
33125
|
addonId: null,
|
|
32950
33126
|
access: "view"
|
|
32951
33127
|
},
|
|
33128
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
33129
|
+
capName: "recording",
|
|
33130
|
+
capScope: "system",
|
|
33131
|
+
addonId: null,
|
|
33132
|
+
access: "create"
|
|
33133
|
+
},
|
|
32952
33134
|
"recording.refreshStorageLocationsForMigration": {
|
|
32953
33135
|
capName: "recording",
|
|
32954
33136
|
capScope: "system",
|
|
@@ -33075,6 +33257,12 @@ Object.freeze({
|
|
|
33075
33257
|
addonId: null,
|
|
33076
33258
|
access: "view"
|
|
33077
33259
|
},
|
|
33260
|
+
"sceneMonitor.listScenesBatch": {
|
|
33261
|
+
capName: "scene-monitor",
|
|
33262
|
+
capScope: "device",
|
|
33263
|
+
addonId: null,
|
|
33264
|
+
access: "view"
|
|
33265
|
+
},
|
|
33078
33266
|
"sceneMonitor.recheckNow": {
|
|
33079
33267
|
capName: "scene-monitor",
|
|
33080
33268
|
capScope: "device",
|
|
@@ -34431,6 +34619,12 @@ Object.freeze({
|
|
|
34431
34619
|
addonId: null,
|
|
34432
34620
|
access: "view"
|
|
34433
34621
|
},
|
|
34622
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
34623
|
+
capName: "zone-analytics",
|
|
34624
|
+
capScope: "device",
|
|
34625
|
+
addonId: null,
|
|
34626
|
+
access: "view"
|
|
34627
|
+
},
|
|
34434
34628
|
"zoneAnalytics.getUnzonedHistory": {
|
|
34435
34629
|
capName: "zone-analytics",
|
|
34436
34630
|
capScope: "device",
|
|
@@ -35435,6 +35629,11 @@ Object.freeze({
|
|
|
35435
35629
|
form: "single",
|
|
35436
35630
|
optional: false
|
|
35437
35631
|
}],
|
|
35632
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
35633
|
+
name: "deviceIds",
|
|
35634
|
+
form: "array",
|
|
35635
|
+
optional: false
|
|
35636
|
+
}],
|
|
35438
35637
|
"pipelineAnalytics.getMotionEvents": [{
|
|
35439
35638
|
name: "deviceId",
|
|
35440
35639
|
form: "single",
|
|
@@ -35875,6 +36074,11 @@ Object.freeze({
|
|
|
35875
36074
|
form: "single",
|
|
35876
36075
|
optional: false
|
|
35877
36076
|
}],
|
|
36077
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
36078
|
+
name: "deviceId",
|
|
36079
|
+
form: "single",
|
|
36080
|
+
optional: true
|
|
36081
|
+
}],
|
|
35878
36082
|
"recording.relocateFootage": [{
|
|
35879
36083
|
name: "deviceId",
|
|
35880
36084
|
form: "single",
|
|
@@ -35940,6 +36144,11 @@ Object.freeze({
|
|
|
35940
36144
|
form: "single",
|
|
35941
36145
|
optional: false
|
|
35942
36146
|
}],
|
|
36147
|
+
"sceneMonitor.listScenesBatch": [{
|
|
36148
|
+
name: "deviceIds",
|
|
36149
|
+
form: "array",
|
|
36150
|
+
optional: false
|
|
36151
|
+
}],
|
|
35943
36152
|
"sceneMonitor.recheckNow": [{
|
|
35944
36153
|
name: "deviceId",
|
|
35945
36154
|
form: "single",
|
|
@@ -36201,6 +36410,11 @@ Object.freeze({
|
|
|
36201
36410
|
form: "single",
|
|
36202
36411
|
optional: false
|
|
36203
36412
|
}],
|
|
36413
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
36414
|
+
name: "deviceIds",
|
|
36415
|
+
form: "array",
|
|
36416
|
+
optional: false
|
|
36417
|
+
}],
|
|
36204
36418
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
36205
36419
|
name: "deviceId",
|
|
36206
36420
|
form: "single",
|