@camstack/addon-provider-petkit 0.2.47 → 0.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/addon.js +318 -2
- package/dist/addon.mjs +318 -2
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -9120,6 +9120,20 @@ var RelocateJobSchema = object({
|
|
|
9120
9120
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
9121
9121
|
*/
|
|
9122
9122
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
9123
|
+
/**
|
|
9124
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
9125
|
+
*
|
|
9126
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
9127
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
9128
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
9129
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
9130
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
9131
|
+
* the same failure as one that quietly skips them (D295).
|
|
9132
|
+
*
|
|
9133
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
9134
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
9135
|
+
*/
|
|
9136
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
9123
9137
|
startedAt: number(),
|
|
9124
9138
|
finishedAt: number().nullable(),
|
|
9125
9139
|
error: string().nullable()
|
|
@@ -9483,6 +9497,91 @@ var RelocateResidueSchema = object({
|
|
|
9483
9497
|
segments: number().int().nonnegative(),
|
|
9484
9498
|
bytes: number().int().nonnegative()
|
|
9485
9499
|
}).nullable();
|
|
9500
|
+
/**
|
|
9501
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
9502
|
+
* (D319).
|
|
9503
|
+
*
|
|
9504
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
9505
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
9506
|
+
* destructive run before authorising it.
|
|
9507
|
+
*/
|
|
9508
|
+
var LedgerWalkInputSchema = object({
|
|
9509
|
+
locationId: string().min(1),
|
|
9510
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
9511
|
+
apply: boolean().optional(),
|
|
9512
|
+
/** Narrow to one camera. */
|
|
9513
|
+
deviceId: number().int().positive().optional(),
|
|
9514
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
9515
|
+
profiles: array(string().min(1)).optional()
|
|
9516
|
+
});
|
|
9517
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
9518
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
9519
|
+
"location-unknown",
|
|
9520
|
+
"source-writable",
|
|
9521
|
+
"no-ledger",
|
|
9522
|
+
"archive-unreadable",
|
|
9523
|
+
"anchor-absent",
|
|
9524
|
+
"anchor-unreadable",
|
|
9525
|
+
"anchor-moved"
|
|
9526
|
+
]);
|
|
9527
|
+
_enum([
|
|
9528
|
+
"live-tail",
|
|
9529
|
+
"listing-error",
|
|
9530
|
+
"path-mismatch",
|
|
9531
|
+
"durable-refused"
|
|
9532
|
+
]);
|
|
9533
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
9534
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
9535
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
9536
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
9537
|
+
"live-tail": number().int().nonnegative(),
|
|
9538
|
+
"listing-error": number().int().nonnegative(),
|
|
9539
|
+
"path-mismatch": number().int().nonnegative(),
|
|
9540
|
+
"durable-refused": number().int().nonnegative()
|
|
9541
|
+
});
|
|
9542
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
9543
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
9544
|
+
deviceId: number().int(),
|
|
9545
|
+
hoursWalked: number().int().nonnegative(),
|
|
9546
|
+
hoursMissing: number().int().nonnegative(),
|
|
9547
|
+
ghostSegments: number().int().nonnegative(),
|
|
9548
|
+
ghostBytes: number().int().nonnegative(),
|
|
9549
|
+
forgottenSegments: number().int().nonnegative(),
|
|
9550
|
+
orphanFiles: number().int().nonnegative()
|
|
9551
|
+
});
|
|
9552
|
+
/**
|
|
9553
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
9554
|
+
*
|
|
9555
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
9556
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
9557
|
+
* than in the absence of one.
|
|
9558
|
+
*/
|
|
9559
|
+
var LedgerWalkReportSchema = object({
|
|
9560
|
+
locationId: string(),
|
|
9561
|
+
applied: boolean(),
|
|
9562
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
9563
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
9564
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
9565
|
+
hoursClaimed: number().int().nonnegative(),
|
|
9566
|
+
hoursWalked: number().int().nonnegative(),
|
|
9567
|
+
hoursMissing: number().int().nonnegative(),
|
|
9568
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
9569
|
+
listings: number().int().nonnegative(),
|
|
9570
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
9571
|
+
ghostSegments: number().int().nonnegative(),
|
|
9572
|
+
ghostBytes: number().int().nonnegative(),
|
|
9573
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
9574
|
+
forgottenSegments: number().int().nonnegative(),
|
|
9575
|
+
forgottenBytes: number().int().nonnegative(),
|
|
9576
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
9577
|
+
orphanFiles: number().int().nonnegative(),
|
|
9578
|
+
orphanSample: array(string()).readonly(),
|
|
9579
|
+
hoursSkipped: number().int().nonnegative(),
|
|
9580
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
9581
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
9582
|
+
bounded: boolean(),
|
|
9583
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
9584
|
+
});
|
|
9486
9585
|
/** How many rows a media pass would still act on against a given target — the
|
|
9487
9586
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
9488
9587
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -20115,13 +20214,15 @@ var ListGroupsPageSchema = object({
|
|
|
20115
20214
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
20116
20215
|
nextCursor: string().nullable()
|
|
20117
20216
|
});
|
|
20217
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
20218
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
20118
20219
|
var KeyEventQueryInput = object({
|
|
20119
20220
|
deviceId: number(),
|
|
20120
20221
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
20121
20222
|
since: number(),
|
|
20122
20223
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
20123
20224
|
until: number(),
|
|
20124
|
-
limit: number().int().min(1).max(
|
|
20225
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
20125
20226
|
/** Drop tracks scoring below this importance. */
|
|
20126
20227
|
minImportance: number().min(0).max(1).optional(),
|
|
20127
20228
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -20143,6 +20244,32 @@ var KeyEventSchema = object({
|
|
|
20143
20244
|
...TrackFlagFields,
|
|
20144
20245
|
...TrackRetrainFields
|
|
20145
20246
|
});
|
|
20247
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
20248
|
+
var KeyEventBatchQueryInput = object({
|
|
20249
|
+
deviceIds: array(number()).min(1).max(200),
|
|
20250
|
+
since: number(),
|
|
20251
|
+
until: number(),
|
|
20252
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
20253
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
20254
|
+
* rows and change what the merged feed contains. */
|
|
20255
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
20256
|
+
minImportance: number().min(0).max(1).optional(),
|
|
20257
|
+
classFilter: string().optional()
|
|
20258
|
+
});
|
|
20259
|
+
/**
|
|
20260
|
+
* One camera's key events in a batch answer.
|
|
20261
|
+
*
|
|
20262
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
20263
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
20264
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
20265
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
20266
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
20267
|
+
* key, which only worked because there was one query per camera).
|
|
20268
|
+
*/
|
|
20269
|
+
var KeyEventsForDeviceSchema = object({
|
|
20270
|
+
deviceId: number(),
|
|
20271
|
+
events: array(KeyEventSchema).readonly()
|
|
20272
|
+
});
|
|
20146
20273
|
object({
|
|
20147
20274
|
trackId: string(),
|
|
20148
20275
|
className: string(),
|
|
@@ -20214,6 +20341,50 @@ var EventStoreFootprintSchema = object({
|
|
|
20214
20341
|
totalBytes: number().int(),
|
|
20215
20342
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
20216
20343
|
});
|
|
20344
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
20345
|
+
var EventMediaKindFootprintSchema = object({
|
|
20346
|
+
kind: MediaFileKindEnum,
|
|
20347
|
+
/** Media rows of this kind. */
|
|
20348
|
+
rows: number().int(),
|
|
20349
|
+
/** Bytes on disk held by those rows. */
|
|
20350
|
+
bytes: number().int()
|
|
20351
|
+
});
|
|
20352
|
+
/**
|
|
20353
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
20354
|
+
* actually turns on.
|
|
20355
|
+
*
|
|
20356
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
20357
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
20358
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
20359
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
20360
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
20361
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
20362
|
+
*
|
|
20363
|
+
* ## Why `unaccounted*` exists
|
|
20364
|
+
*
|
|
20365
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
20366
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
20367
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
20368
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
20369
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
20370
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
20371
|
+
* against a denominator smaller than the disk.
|
|
20372
|
+
*
|
|
20373
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
20374
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
20375
|
+
*/
|
|
20376
|
+
var EventMediaKindBreakdownSchema = object({
|
|
20377
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
20378
|
+
totalRows: number().int(),
|
|
20379
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
20380
|
+
totalBytes: number().int(),
|
|
20381
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
20382
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
20383
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
20384
|
+
unaccountedRows: number().int(),
|
|
20385
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
20386
|
+
unaccountedBytes: number().int()
|
|
20387
|
+
});
|
|
20217
20388
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
20218
20389
|
var EventPruneCountsSchema = object({
|
|
20219
20390
|
motion: number().int(),
|
|
@@ -20368,7 +20539,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20368
20539
|
until: number().optional(),
|
|
20369
20540
|
kinds: array(string()).optional(),
|
|
20370
20541
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20371
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
20542
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20372
20543
|
deviceId: number(),
|
|
20373
20544
|
since: number(),
|
|
20374
20545
|
until: number(),
|
|
@@ -20417,6 +20588,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20417
20588
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
20418
20589
|
kind: "query",
|
|
20419
20590
|
auth: "admin"
|
|
20591
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
20592
|
+
kind: "query",
|
|
20593
|
+
auth: "admin"
|
|
20420
20594
|
}), method(object({
|
|
20421
20595
|
olderThanMs: number(),
|
|
20422
20596
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -22368,6 +22542,20 @@ method(object({
|
|
|
22368
22542
|
error: string().optional()
|
|
22369
22543
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
22370
22544
|
providerId: string(),
|
|
22545
|
+
/**
|
|
22546
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
22547
|
+
*
|
|
22548
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
22549
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
22550
|
+
* credential the operator did not retype — and posting that here
|
|
22551
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
22552
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
22553
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
22554
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
22555
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
22556
|
+
* every value was typed just now and nothing is stored yet.
|
|
22557
|
+
*/
|
|
22558
|
+
locationId: string().optional(),
|
|
22371
22559
|
config: record(string(), unknown())
|
|
22372
22560
|
}), object({
|
|
22373
22561
|
ok: boolean(),
|
|
@@ -29726,6 +29914,9 @@ method(object({
|
|
|
29726
29914
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
29727
29915
|
kind: "query",
|
|
29728
29916
|
auth: "admin"
|
|
29917
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
29918
|
+
kind: "mutation",
|
|
29919
|
+
auth: "admin"
|
|
29729
29920
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
29730
29921
|
kind: "mutation",
|
|
29731
29922
|
auth: "admin"
|
|
@@ -30117,6 +30308,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
30117
30308
|
monitors: array(SceneMonitorSchema),
|
|
30118
30309
|
lastFetchedAt: number()
|
|
30119
30310
|
});
|
|
30311
|
+
/**
|
|
30312
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
30313
|
+
*
|
|
30314
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
30315
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
30316
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
30317
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
30318
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
30319
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
30320
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
30321
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
30322
|
+
*
|
|
30323
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
30324
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
30325
|
+
*/
|
|
30326
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
30327
|
+
deviceId: number(),
|
|
30328
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
30329
|
+
});
|
|
30120
30330
|
var sceneMonitorCapability = {
|
|
30121
30331
|
name: "scene-monitor",
|
|
30122
30332
|
scope: "device",
|
|
@@ -30126,6 +30336,22 @@ var sceneMonitorCapability = {
|
|
|
30126
30336
|
deviceTypes: [DeviceType.Camera],
|
|
30127
30337
|
methods: {
|
|
30128
30338
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
30339
|
+
/**
|
|
30340
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
30341
|
+
*
|
|
30342
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
30343
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
30344
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
30345
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
30346
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
30347
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
30348
|
+
*
|
|
30349
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
30350
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
30351
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
30352
|
+
* tell which two are missing, or that any are.
|
|
30353
|
+
*/
|
|
30354
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
30129
30355
|
createScene: method(object({
|
|
30130
30356
|
deviceId: number(),
|
|
30131
30357
|
label: string(),
|
|
@@ -31961,6 +32187,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
31961
32187
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
31962
32188
|
});
|
|
31963
32189
|
/**
|
|
32190
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
32191
|
+
*
|
|
32192
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
32193
|
+
* because `snapshot: null` was already spoken for:
|
|
32194
|
+
*
|
|
32195
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
32196
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
32197
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
32198
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
32199
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
32200
|
+
*
|
|
32201
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
32202
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
32203
|
+
* which is a definite claim about a camera nobody could read.
|
|
32204
|
+
*/
|
|
32205
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
32206
|
+
deviceId: number(),
|
|
32207
|
+
read: _enum(["read", "unreadable"]),
|
|
32208
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
32209
|
+
});
|
|
32210
|
+
/**
|
|
31964
32211
|
* Time-series resolution. The history methods return one bucket per
|
|
31965
32212
|
* step over the requested range. Smaller resolutions cost more
|
|
31966
32213
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -32017,6 +32264,20 @@ var zoneAnalyticsCapability = {
|
|
|
32017
32264
|
* (no inference result emitted since boot or since binding was
|
|
32018
32265
|
* activated). */
|
|
32019
32266
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
32267
|
+
/**
|
|
32268
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
32269
|
+
*
|
|
32270
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
32271
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
32272
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
32273
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
32274
|
+
* work is unchanged.
|
|
32275
|
+
*
|
|
32276
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
32277
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
32278
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
32279
|
+
*/
|
|
32280
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
32020
32281
|
/** Time-series object count inside one zone. `className` optional —
|
|
32021
32282
|
* omit to count every class in the zone. */
|
|
32022
32283
|
getZoneHistory: method(object({
|
|
@@ -36414,6 +36675,12 @@ Object.freeze({
|
|
|
36414
36675
|
addonId: null,
|
|
36415
36676
|
access: "view"
|
|
36416
36677
|
},
|
|
36678
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
36679
|
+
capName: "pipeline-analytics",
|
|
36680
|
+
capScope: "device",
|
|
36681
|
+
addonId: null,
|
|
36682
|
+
access: "view"
|
|
36683
|
+
},
|
|
36417
36684
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
36418
36685
|
capName: "pipeline-analytics",
|
|
36419
36686
|
capScope: "device",
|
|
@@ -36432,6 +36699,12 @@ Object.freeze({
|
|
|
36432
36699
|
addonId: null,
|
|
36433
36700
|
access: "view"
|
|
36434
36701
|
},
|
|
36702
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
36703
|
+
capName: "pipeline-analytics",
|
|
36704
|
+
capScope: "device",
|
|
36705
|
+
addonId: null,
|
|
36706
|
+
access: "view"
|
|
36707
|
+
},
|
|
36435
36708
|
"pipelineAnalytics.getMotionEvents": {
|
|
36436
36709
|
capName: "pipeline-analytics",
|
|
36437
36710
|
capScope: "device",
|
|
@@ -37608,6 +37881,12 @@ Object.freeze({
|
|
|
37608
37881
|
addonId: null,
|
|
37609
37882
|
access: "view"
|
|
37610
37883
|
},
|
|
37884
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
37885
|
+
capName: "recording",
|
|
37886
|
+
capScope: "system",
|
|
37887
|
+
addonId: null,
|
|
37888
|
+
access: "create"
|
|
37889
|
+
},
|
|
37611
37890
|
"recording.refreshStorageLocationsForMigration": {
|
|
37612
37891
|
capName: "recording",
|
|
37613
37892
|
capScope: "system",
|
|
@@ -37734,6 +38013,12 @@ Object.freeze({
|
|
|
37734
38013
|
addonId: null,
|
|
37735
38014
|
access: "view"
|
|
37736
38015
|
},
|
|
38016
|
+
"sceneMonitor.listScenesBatch": {
|
|
38017
|
+
capName: "scene-monitor",
|
|
38018
|
+
capScope: "device",
|
|
38019
|
+
addonId: null,
|
|
38020
|
+
access: "view"
|
|
38021
|
+
},
|
|
37737
38022
|
"sceneMonitor.recheckNow": {
|
|
37738
38023
|
capName: "scene-monitor",
|
|
37739
38024
|
capScope: "device",
|
|
@@ -39090,6 +39375,12 @@ Object.freeze({
|
|
|
39090
39375
|
addonId: null,
|
|
39091
39376
|
access: "view"
|
|
39092
39377
|
},
|
|
39378
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
39379
|
+
capName: "zone-analytics",
|
|
39380
|
+
capScope: "device",
|
|
39381
|
+
addonId: null,
|
|
39382
|
+
access: "view"
|
|
39383
|
+
},
|
|
39093
39384
|
"zoneAnalytics.getUnzonedHistory": {
|
|
39094
39385
|
capName: "zone-analytics",
|
|
39095
39386
|
capScope: "device",
|
|
@@ -40079,6 +40370,11 @@ Object.freeze({
|
|
|
40079
40370
|
form: "single",
|
|
40080
40371
|
optional: false
|
|
40081
40372
|
}],
|
|
40373
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
40374
|
+
name: "deviceId",
|
|
40375
|
+
form: "single",
|
|
40376
|
+
optional: true
|
|
40377
|
+
}],
|
|
40082
40378
|
"pipelineAnalytics.getGroup": [{
|
|
40083
40379
|
name: "deviceId",
|
|
40084
40380
|
form: "single",
|
|
@@ -40089,6 +40385,11 @@ Object.freeze({
|
|
|
40089
40385
|
form: "single",
|
|
40090
40386
|
optional: false
|
|
40091
40387
|
}],
|
|
40388
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
40389
|
+
name: "deviceIds",
|
|
40390
|
+
form: "array",
|
|
40391
|
+
optional: false
|
|
40392
|
+
}],
|
|
40092
40393
|
"pipelineAnalytics.getMotionEvents": [{
|
|
40093
40394
|
name: "deviceId",
|
|
40094
40395
|
form: "single",
|
|
@@ -40529,6 +40830,11 @@ Object.freeze({
|
|
|
40529
40830
|
form: "single",
|
|
40530
40831
|
optional: false
|
|
40531
40832
|
}],
|
|
40833
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
40834
|
+
name: "deviceId",
|
|
40835
|
+
form: "single",
|
|
40836
|
+
optional: true
|
|
40837
|
+
}],
|
|
40532
40838
|
"recording.relocateFootage": [{
|
|
40533
40839
|
name: "deviceId",
|
|
40534
40840
|
form: "single",
|
|
@@ -40594,6 +40900,11 @@ Object.freeze({
|
|
|
40594
40900
|
form: "single",
|
|
40595
40901
|
optional: false
|
|
40596
40902
|
}],
|
|
40903
|
+
"sceneMonitor.listScenesBatch": [{
|
|
40904
|
+
name: "deviceIds",
|
|
40905
|
+
form: "array",
|
|
40906
|
+
optional: false
|
|
40907
|
+
}],
|
|
40597
40908
|
"sceneMonitor.recheckNow": [{
|
|
40598
40909
|
name: "deviceId",
|
|
40599
40910
|
form: "single",
|
|
@@ -40855,6 +41166,11 @@ Object.freeze({
|
|
|
40855
41166
|
form: "single",
|
|
40856
41167
|
optional: false
|
|
40857
41168
|
}],
|
|
41169
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
41170
|
+
name: "deviceIds",
|
|
41171
|
+
form: "array",
|
|
41172
|
+
optional: false
|
|
41173
|
+
}],
|
|
40858
41174
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
40859
41175
|
name: "deviceId",
|
|
40860
41176
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -9119,6 +9119,20 @@ var RelocateJobSchema = object({
|
|
|
9119
9119
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
9120
9120
|
*/
|
|
9121
9121
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
9122
|
+
/**
|
|
9123
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
9124
|
+
*
|
|
9125
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
9126
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
9127
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
9128
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
9129
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
9130
|
+
* the same failure as one that quietly skips them (D295).
|
|
9131
|
+
*
|
|
9132
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
9133
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
9134
|
+
*/
|
|
9135
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
9122
9136
|
startedAt: number(),
|
|
9123
9137
|
finishedAt: number().nullable(),
|
|
9124
9138
|
error: string().nullable()
|
|
@@ -9482,6 +9496,91 @@ var RelocateResidueSchema = object({
|
|
|
9482
9496
|
segments: number().int().nonnegative(),
|
|
9483
9497
|
bytes: number().int().nonnegative()
|
|
9484
9498
|
}).nullable();
|
|
9499
|
+
/**
|
|
9500
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
9501
|
+
* (D319).
|
|
9502
|
+
*
|
|
9503
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
9504
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
9505
|
+
* destructive run before authorising it.
|
|
9506
|
+
*/
|
|
9507
|
+
var LedgerWalkInputSchema = object({
|
|
9508
|
+
locationId: string().min(1),
|
|
9509
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
9510
|
+
apply: boolean().optional(),
|
|
9511
|
+
/** Narrow to one camera. */
|
|
9512
|
+
deviceId: number().int().positive().optional(),
|
|
9513
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
9514
|
+
profiles: array(string().min(1)).optional()
|
|
9515
|
+
});
|
|
9516
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
9517
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
9518
|
+
"location-unknown",
|
|
9519
|
+
"source-writable",
|
|
9520
|
+
"no-ledger",
|
|
9521
|
+
"archive-unreadable",
|
|
9522
|
+
"anchor-absent",
|
|
9523
|
+
"anchor-unreadable",
|
|
9524
|
+
"anchor-moved"
|
|
9525
|
+
]);
|
|
9526
|
+
_enum([
|
|
9527
|
+
"live-tail",
|
|
9528
|
+
"listing-error",
|
|
9529
|
+
"path-mismatch",
|
|
9530
|
+
"durable-refused"
|
|
9531
|
+
]);
|
|
9532
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
9533
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
9534
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
9535
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
9536
|
+
"live-tail": number().int().nonnegative(),
|
|
9537
|
+
"listing-error": number().int().nonnegative(),
|
|
9538
|
+
"path-mismatch": number().int().nonnegative(),
|
|
9539
|
+
"durable-refused": number().int().nonnegative()
|
|
9540
|
+
});
|
|
9541
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
9542
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
9543
|
+
deviceId: number().int(),
|
|
9544
|
+
hoursWalked: number().int().nonnegative(),
|
|
9545
|
+
hoursMissing: number().int().nonnegative(),
|
|
9546
|
+
ghostSegments: number().int().nonnegative(),
|
|
9547
|
+
ghostBytes: number().int().nonnegative(),
|
|
9548
|
+
forgottenSegments: number().int().nonnegative(),
|
|
9549
|
+
orphanFiles: number().int().nonnegative()
|
|
9550
|
+
});
|
|
9551
|
+
/**
|
|
9552
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
9553
|
+
*
|
|
9554
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
9555
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
9556
|
+
* than in the absence of one.
|
|
9557
|
+
*/
|
|
9558
|
+
var LedgerWalkReportSchema = object({
|
|
9559
|
+
locationId: string(),
|
|
9560
|
+
applied: boolean(),
|
|
9561
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
9562
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
9563
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
9564
|
+
hoursClaimed: number().int().nonnegative(),
|
|
9565
|
+
hoursWalked: number().int().nonnegative(),
|
|
9566
|
+
hoursMissing: number().int().nonnegative(),
|
|
9567
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
9568
|
+
listings: number().int().nonnegative(),
|
|
9569
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
9570
|
+
ghostSegments: number().int().nonnegative(),
|
|
9571
|
+
ghostBytes: number().int().nonnegative(),
|
|
9572
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
9573
|
+
forgottenSegments: number().int().nonnegative(),
|
|
9574
|
+
forgottenBytes: number().int().nonnegative(),
|
|
9575
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
9576
|
+
orphanFiles: number().int().nonnegative(),
|
|
9577
|
+
orphanSample: array(string()).readonly(),
|
|
9578
|
+
hoursSkipped: number().int().nonnegative(),
|
|
9579
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
9580
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
9581
|
+
bounded: boolean(),
|
|
9582
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
9583
|
+
});
|
|
9485
9584
|
/** How many rows a media pass would still act on against a given target — the
|
|
9486
9585
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
9487
9586
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -20114,13 +20213,15 @@ var ListGroupsPageSchema = object({
|
|
|
20114
20213
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
20115
20214
|
nextCursor: string().nullable()
|
|
20116
20215
|
});
|
|
20216
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
20217
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
20117
20218
|
var KeyEventQueryInput = object({
|
|
20118
20219
|
deviceId: number(),
|
|
20119
20220
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
20120
20221
|
since: number(),
|
|
20121
20222
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
20122
20223
|
until: number(),
|
|
20123
|
-
limit: number().int().min(1).max(
|
|
20224
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
20124
20225
|
/** Drop tracks scoring below this importance. */
|
|
20125
20226
|
minImportance: number().min(0).max(1).optional(),
|
|
20126
20227
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -20142,6 +20243,32 @@ var KeyEventSchema = object({
|
|
|
20142
20243
|
...TrackFlagFields,
|
|
20143
20244
|
...TrackRetrainFields
|
|
20144
20245
|
});
|
|
20246
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
20247
|
+
var KeyEventBatchQueryInput = object({
|
|
20248
|
+
deviceIds: array(number()).min(1).max(200),
|
|
20249
|
+
since: number(),
|
|
20250
|
+
until: number(),
|
|
20251
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
20252
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
20253
|
+
* rows and change what the merged feed contains. */
|
|
20254
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
20255
|
+
minImportance: number().min(0).max(1).optional(),
|
|
20256
|
+
classFilter: string().optional()
|
|
20257
|
+
});
|
|
20258
|
+
/**
|
|
20259
|
+
* One camera's key events in a batch answer.
|
|
20260
|
+
*
|
|
20261
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
20262
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
20263
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
20264
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
20265
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
20266
|
+
* key, which only worked because there was one query per camera).
|
|
20267
|
+
*/
|
|
20268
|
+
var KeyEventsForDeviceSchema = object({
|
|
20269
|
+
deviceId: number(),
|
|
20270
|
+
events: array(KeyEventSchema).readonly()
|
|
20271
|
+
});
|
|
20145
20272
|
object({
|
|
20146
20273
|
trackId: string(),
|
|
20147
20274
|
className: string(),
|
|
@@ -20213,6 +20340,50 @@ var EventStoreFootprintSchema = object({
|
|
|
20213
20340
|
totalBytes: number().int(),
|
|
20214
20341
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
20215
20342
|
});
|
|
20343
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
20344
|
+
var EventMediaKindFootprintSchema = object({
|
|
20345
|
+
kind: MediaFileKindEnum,
|
|
20346
|
+
/** Media rows of this kind. */
|
|
20347
|
+
rows: number().int(),
|
|
20348
|
+
/** Bytes on disk held by those rows. */
|
|
20349
|
+
bytes: number().int()
|
|
20350
|
+
});
|
|
20351
|
+
/**
|
|
20352
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
20353
|
+
* actually turns on.
|
|
20354
|
+
*
|
|
20355
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
20356
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
20357
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
20358
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
20359
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
20360
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
20361
|
+
*
|
|
20362
|
+
* ## Why `unaccounted*` exists
|
|
20363
|
+
*
|
|
20364
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
20365
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
20366
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
20367
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
20368
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
20369
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
20370
|
+
* against a denominator smaller than the disk.
|
|
20371
|
+
*
|
|
20372
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
20373
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
20374
|
+
*/
|
|
20375
|
+
var EventMediaKindBreakdownSchema = object({
|
|
20376
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
20377
|
+
totalRows: number().int(),
|
|
20378
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
20379
|
+
totalBytes: number().int(),
|
|
20380
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
20381
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
20382
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
20383
|
+
unaccountedRows: number().int(),
|
|
20384
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
20385
|
+
unaccountedBytes: number().int()
|
|
20386
|
+
});
|
|
20216
20387
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
20217
20388
|
var EventPruneCountsSchema = object({
|
|
20218
20389
|
motion: number().int(),
|
|
@@ -20367,7 +20538,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20367
20538
|
until: number().optional(),
|
|
20368
20539
|
kinds: array(string()).optional(),
|
|
20369
20540
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20370
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
20541
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20371
20542
|
deviceId: number(),
|
|
20372
20543
|
since: number(),
|
|
20373
20544
|
until: number(),
|
|
@@ -20416,6 +20587,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20416
20587
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
20417
20588
|
kind: "query",
|
|
20418
20589
|
auth: "admin"
|
|
20590
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
20591
|
+
kind: "query",
|
|
20592
|
+
auth: "admin"
|
|
20419
20593
|
}), method(object({
|
|
20420
20594
|
olderThanMs: number(),
|
|
20421
20595
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -22367,6 +22541,20 @@ method(object({
|
|
|
22367
22541
|
error: string().optional()
|
|
22368
22542
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
22369
22543
|
providerId: string(),
|
|
22544
|
+
/**
|
|
22545
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
22546
|
+
*
|
|
22547
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
22548
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
22549
|
+
* credential the operator did not retype — and posting that here
|
|
22550
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
22551
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
22552
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
22553
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
22554
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
22555
|
+
* every value was typed just now and nothing is stored yet.
|
|
22556
|
+
*/
|
|
22557
|
+
locationId: string().optional(),
|
|
22370
22558
|
config: record(string(), unknown())
|
|
22371
22559
|
}), object({
|
|
22372
22560
|
ok: boolean(),
|
|
@@ -29725,6 +29913,9 @@ method(object({
|
|
|
29725
29913
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
29726
29914
|
kind: "query",
|
|
29727
29915
|
auth: "admin"
|
|
29916
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
29917
|
+
kind: "mutation",
|
|
29918
|
+
auth: "admin"
|
|
29728
29919
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
29729
29920
|
kind: "mutation",
|
|
29730
29921
|
auth: "admin"
|
|
@@ -30116,6 +30307,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
30116
30307
|
monitors: array(SceneMonitorSchema),
|
|
30117
30308
|
lastFetchedAt: number()
|
|
30118
30309
|
});
|
|
30310
|
+
/**
|
|
30311
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
30312
|
+
*
|
|
30313
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
30314
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
30315
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
30316
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
30317
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
30318
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
30319
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
30320
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
30321
|
+
*
|
|
30322
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
30323
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
30324
|
+
*/
|
|
30325
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
30326
|
+
deviceId: number(),
|
|
30327
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
30328
|
+
});
|
|
30119
30329
|
var sceneMonitorCapability = {
|
|
30120
30330
|
name: "scene-monitor",
|
|
30121
30331
|
scope: "device",
|
|
@@ -30125,6 +30335,22 @@ var sceneMonitorCapability = {
|
|
|
30125
30335
|
deviceTypes: [DeviceType.Camera],
|
|
30126
30336
|
methods: {
|
|
30127
30337
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
30338
|
+
/**
|
|
30339
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
30340
|
+
*
|
|
30341
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
30342
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
30343
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
30344
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
30345
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
30346
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
30347
|
+
*
|
|
30348
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
30349
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
30350
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
30351
|
+
* tell which two are missing, or that any are.
|
|
30352
|
+
*/
|
|
30353
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
30128
30354
|
createScene: method(object({
|
|
30129
30355
|
deviceId: number(),
|
|
30130
30356
|
label: string(),
|
|
@@ -31960,6 +32186,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
31960
32186
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
31961
32187
|
});
|
|
31962
32188
|
/**
|
|
32189
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
32190
|
+
*
|
|
32191
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
32192
|
+
* because `snapshot: null` was already spoken for:
|
|
32193
|
+
*
|
|
32194
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
32195
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
32196
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
32197
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
32198
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
32199
|
+
*
|
|
32200
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
32201
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
32202
|
+
* which is a definite claim about a camera nobody could read.
|
|
32203
|
+
*/
|
|
32204
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
32205
|
+
deviceId: number(),
|
|
32206
|
+
read: _enum(["read", "unreadable"]),
|
|
32207
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
32208
|
+
});
|
|
32209
|
+
/**
|
|
31963
32210
|
* Time-series resolution. The history methods return one bucket per
|
|
31964
32211
|
* step over the requested range. Smaller resolutions cost more
|
|
31965
32212
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -32016,6 +32263,20 @@ var zoneAnalyticsCapability = {
|
|
|
32016
32263
|
* (no inference result emitted since boot or since binding was
|
|
32017
32264
|
* activated). */
|
|
32018
32265
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
32266
|
+
/**
|
|
32267
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
32268
|
+
*
|
|
32269
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
32270
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
32271
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
32272
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
32273
|
+
* work is unchanged.
|
|
32274
|
+
*
|
|
32275
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
32276
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
32277
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
32278
|
+
*/
|
|
32279
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
32019
32280
|
/** Time-series object count inside one zone. `className` optional —
|
|
32020
32281
|
* omit to count every class in the zone. */
|
|
32021
32282
|
getZoneHistory: method(object({
|
|
@@ -36413,6 +36674,12 @@ Object.freeze({
|
|
|
36413
36674
|
addonId: null,
|
|
36414
36675
|
access: "view"
|
|
36415
36676
|
},
|
|
36677
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
36678
|
+
capName: "pipeline-analytics",
|
|
36679
|
+
capScope: "device",
|
|
36680
|
+
addonId: null,
|
|
36681
|
+
access: "view"
|
|
36682
|
+
},
|
|
36416
36683
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
36417
36684
|
capName: "pipeline-analytics",
|
|
36418
36685
|
capScope: "device",
|
|
@@ -36431,6 +36698,12 @@ Object.freeze({
|
|
|
36431
36698
|
addonId: null,
|
|
36432
36699
|
access: "view"
|
|
36433
36700
|
},
|
|
36701
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
36702
|
+
capName: "pipeline-analytics",
|
|
36703
|
+
capScope: "device",
|
|
36704
|
+
addonId: null,
|
|
36705
|
+
access: "view"
|
|
36706
|
+
},
|
|
36434
36707
|
"pipelineAnalytics.getMotionEvents": {
|
|
36435
36708
|
capName: "pipeline-analytics",
|
|
36436
36709
|
capScope: "device",
|
|
@@ -37607,6 +37880,12 @@ Object.freeze({
|
|
|
37607
37880
|
addonId: null,
|
|
37608
37881
|
access: "view"
|
|
37609
37882
|
},
|
|
37883
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
37884
|
+
capName: "recording",
|
|
37885
|
+
capScope: "system",
|
|
37886
|
+
addonId: null,
|
|
37887
|
+
access: "create"
|
|
37888
|
+
},
|
|
37610
37889
|
"recording.refreshStorageLocationsForMigration": {
|
|
37611
37890
|
capName: "recording",
|
|
37612
37891
|
capScope: "system",
|
|
@@ -37733,6 +38012,12 @@ Object.freeze({
|
|
|
37733
38012
|
addonId: null,
|
|
37734
38013
|
access: "view"
|
|
37735
38014
|
},
|
|
38015
|
+
"sceneMonitor.listScenesBatch": {
|
|
38016
|
+
capName: "scene-monitor",
|
|
38017
|
+
capScope: "device",
|
|
38018
|
+
addonId: null,
|
|
38019
|
+
access: "view"
|
|
38020
|
+
},
|
|
37736
38021
|
"sceneMonitor.recheckNow": {
|
|
37737
38022
|
capName: "scene-monitor",
|
|
37738
38023
|
capScope: "device",
|
|
@@ -39089,6 +39374,12 @@ Object.freeze({
|
|
|
39089
39374
|
addonId: null,
|
|
39090
39375
|
access: "view"
|
|
39091
39376
|
},
|
|
39377
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
39378
|
+
capName: "zone-analytics",
|
|
39379
|
+
capScope: "device",
|
|
39380
|
+
addonId: null,
|
|
39381
|
+
access: "view"
|
|
39382
|
+
},
|
|
39092
39383
|
"zoneAnalytics.getUnzonedHistory": {
|
|
39093
39384
|
capName: "zone-analytics",
|
|
39094
39385
|
capScope: "device",
|
|
@@ -40078,6 +40369,11 @@ Object.freeze({
|
|
|
40078
40369
|
form: "single",
|
|
40079
40370
|
optional: false
|
|
40080
40371
|
}],
|
|
40372
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
40373
|
+
name: "deviceId",
|
|
40374
|
+
form: "single",
|
|
40375
|
+
optional: true
|
|
40376
|
+
}],
|
|
40081
40377
|
"pipelineAnalytics.getGroup": [{
|
|
40082
40378
|
name: "deviceId",
|
|
40083
40379
|
form: "single",
|
|
@@ -40088,6 +40384,11 @@ Object.freeze({
|
|
|
40088
40384
|
form: "single",
|
|
40089
40385
|
optional: false
|
|
40090
40386
|
}],
|
|
40387
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
40388
|
+
name: "deviceIds",
|
|
40389
|
+
form: "array",
|
|
40390
|
+
optional: false
|
|
40391
|
+
}],
|
|
40091
40392
|
"pipelineAnalytics.getMotionEvents": [{
|
|
40092
40393
|
name: "deviceId",
|
|
40093
40394
|
form: "single",
|
|
@@ -40528,6 +40829,11 @@ Object.freeze({
|
|
|
40528
40829
|
form: "single",
|
|
40529
40830
|
optional: false
|
|
40530
40831
|
}],
|
|
40832
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
40833
|
+
name: "deviceId",
|
|
40834
|
+
form: "single",
|
|
40835
|
+
optional: true
|
|
40836
|
+
}],
|
|
40531
40837
|
"recording.relocateFootage": [{
|
|
40532
40838
|
name: "deviceId",
|
|
40533
40839
|
form: "single",
|
|
@@ -40593,6 +40899,11 @@ Object.freeze({
|
|
|
40593
40899
|
form: "single",
|
|
40594
40900
|
optional: false
|
|
40595
40901
|
}],
|
|
40902
|
+
"sceneMonitor.listScenesBatch": [{
|
|
40903
|
+
name: "deviceIds",
|
|
40904
|
+
form: "array",
|
|
40905
|
+
optional: false
|
|
40906
|
+
}],
|
|
40596
40907
|
"sceneMonitor.recheckNow": [{
|
|
40597
40908
|
name: "deviceId",
|
|
40598
40909
|
form: "single",
|
|
@@ -40854,6 +41165,11 @@ Object.freeze({
|
|
|
40854
41165
|
form: "single",
|
|
40855
41166
|
optional: false
|
|
40856
41167
|
}],
|
|
41168
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
41169
|
+
name: "deviceIds",
|
|
41170
|
+
form: "array",
|
|
41171
|
+
optional: false
|
|
41172
|
+
}],
|
|
40857
41173
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
40858
41174
|
name: "deviceId",
|
|
40859
41175
|
form: "single",
|
package/package.json
CHANGED