@camstack/addon-provider-homematic 1.2.48 → 1.2.50
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
|
@@ -8027,6 +8027,20 @@ var RelocateJobSchema = object({
|
|
|
8027
8027
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8028
8028
|
*/
|
|
8029
8029
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8030
|
+
/**
|
|
8031
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8032
|
+
*
|
|
8033
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8034
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8035
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8036
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8037
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8038
|
+
* the same failure as one that quietly skips them (D295).
|
|
8039
|
+
*
|
|
8040
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8041
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8042
|
+
*/
|
|
8043
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8030
8044
|
startedAt: number(),
|
|
8031
8045
|
finishedAt: number().nullable(),
|
|
8032
8046
|
error: string().nullable()
|
|
@@ -8390,6 +8404,91 @@ var RelocateResidueSchema = object({
|
|
|
8390
8404
|
segments: number().int().nonnegative(),
|
|
8391
8405
|
bytes: number().int().nonnegative()
|
|
8392
8406
|
}).nullable();
|
|
8407
|
+
/**
|
|
8408
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8409
|
+
* (D319).
|
|
8410
|
+
*
|
|
8411
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8412
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8413
|
+
* destructive run before authorising it.
|
|
8414
|
+
*/
|
|
8415
|
+
var LedgerWalkInputSchema = object({
|
|
8416
|
+
locationId: string().min(1),
|
|
8417
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8418
|
+
apply: boolean().optional(),
|
|
8419
|
+
/** Narrow to one camera. */
|
|
8420
|
+
deviceId: number().int().positive().optional(),
|
|
8421
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8422
|
+
profiles: array(string().min(1)).optional()
|
|
8423
|
+
});
|
|
8424
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8425
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8426
|
+
"location-unknown",
|
|
8427
|
+
"source-writable",
|
|
8428
|
+
"no-ledger",
|
|
8429
|
+
"archive-unreadable",
|
|
8430
|
+
"anchor-absent",
|
|
8431
|
+
"anchor-unreadable",
|
|
8432
|
+
"anchor-moved"
|
|
8433
|
+
]);
|
|
8434
|
+
_enum([
|
|
8435
|
+
"live-tail",
|
|
8436
|
+
"listing-error",
|
|
8437
|
+
"path-mismatch",
|
|
8438
|
+
"durable-refused"
|
|
8439
|
+
]);
|
|
8440
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8441
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8442
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8443
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8444
|
+
"live-tail": number().int().nonnegative(),
|
|
8445
|
+
"listing-error": number().int().nonnegative(),
|
|
8446
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8447
|
+
"durable-refused": number().int().nonnegative()
|
|
8448
|
+
});
|
|
8449
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8450
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8451
|
+
deviceId: number().int(),
|
|
8452
|
+
hoursWalked: number().int().nonnegative(),
|
|
8453
|
+
hoursMissing: number().int().nonnegative(),
|
|
8454
|
+
ghostSegments: number().int().nonnegative(),
|
|
8455
|
+
ghostBytes: number().int().nonnegative(),
|
|
8456
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8457
|
+
orphanFiles: number().int().nonnegative()
|
|
8458
|
+
});
|
|
8459
|
+
/**
|
|
8460
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8461
|
+
*
|
|
8462
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8463
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8464
|
+
* than in the absence of one.
|
|
8465
|
+
*/
|
|
8466
|
+
var LedgerWalkReportSchema = object({
|
|
8467
|
+
locationId: string(),
|
|
8468
|
+
applied: boolean(),
|
|
8469
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8470
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8471
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8472
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8473
|
+
hoursWalked: number().int().nonnegative(),
|
|
8474
|
+
hoursMissing: number().int().nonnegative(),
|
|
8475
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8476
|
+
listings: number().int().nonnegative(),
|
|
8477
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8478
|
+
ghostSegments: number().int().nonnegative(),
|
|
8479
|
+
ghostBytes: number().int().nonnegative(),
|
|
8480
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8481
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8482
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8483
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8484
|
+
orphanFiles: number().int().nonnegative(),
|
|
8485
|
+
orphanSample: array(string()).readonly(),
|
|
8486
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8487
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8488
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8489
|
+
bounded: boolean(),
|
|
8490
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8491
|
+
});
|
|
8393
8492
|
/** How many rows a media pass would still act on against a given target — the
|
|
8394
8493
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8395
8494
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -19071,13 +19170,15 @@ var ListGroupsPageSchema = object({
|
|
|
19071
19170
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
19072
19171
|
nextCursor: string().nullable()
|
|
19073
19172
|
});
|
|
19173
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
19174
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
19074
19175
|
var KeyEventQueryInput = object({
|
|
19075
19176
|
deviceId: number(),
|
|
19076
19177
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
19077
19178
|
since: number(),
|
|
19078
19179
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
19079
19180
|
until: number(),
|
|
19080
|
-
limit: number().int().min(1).max(
|
|
19181
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19081
19182
|
/** Drop tracks scoring below this importance. */
|
|
19082
19183
|
minImportance: number().min(0).max(1).optional(),
|
|
19083
19184
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -19099,6 +19200,32 @@ var KeyEventSchema = object({
|
|
|
19099
19200
|
...TrackFlagFields,
|
|
19100
19201
|
...TrackRetrainFields
|
|
19101
19202
|
});
|
|
19203
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
19204
|
+
var KeyEventBatchQueryInput = object({
|
|
19205
|
+
deviceIds: array(number()).min(1).max(200),
|
|
19206
|
+
since: number(),
|
|
19207
|
+
until: number(),
|
|
19208
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
19209
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
19210
|
+
* rows and change what the merged feed contains. */
|
|
19211
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19212
|
+
minImportance: number().min(0).max(1).optional(),
|
|
19213
|
+
classFilter: string().optional()
|
|
19214
|
+
});
|
|
19215
|
+
/**
|
|
19216
|
+
* One camera's key events in a batch answer.
|
|
19217
|
+
*
|
|
19218
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
19219
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
19220
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
19221
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
19222
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
19223
|
+
* key, which only worked because there was one query per camera).
|
|
19224
|
+
*/
|
|
19225
|
+
var KeyEventsForDeviceSchema = object({
|
|
19226
|
+
deviceId: number(),
|
|
19227
|
+
events: array(KeyEventSchema).readonly()
|
|
19228
|
+
});
|
|
19102
19229
|
object({
|
|
19103
19230
|
trackId: string(),
|
|
19104
19231
|
className: string(),
|
|
@@ -19170,6 +19297,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19170
19297
|
totalBytes: number().int(),
|
|
19171
19298
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19172
19299
|
});
|
|
19300
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19301
|
+
var EventMediaKindFootprintSchema = object({
|
|
19302
|
+
kind: MediaFileKindEnum,
|
|
19303
|
+
/** Media rows of this kind. */
|
|
19304
|
+
rows: number().int(),
|
|
19305
|
+
/** Bytes on disk held by those rows. */
|
|
19306
|
+
bytes: number().int()
|
|
19307
|
+
});
|
|
19308
|
+
/**
|
|
19309
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19310
|
+
* actually turns on.
|
|
19311
|
+
*
|
|
19312
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19313
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19314
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19315
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19316
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19317
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19318
|
+
*
|
|
19319
|
+
* ## Why `unaccounted*` exists
|
|
19320
|
+
*
|
|
19321
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19322
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19323
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19324
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19325
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19326
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19327
|
+
* against a denominator smaller than the disk.
|
|
19328
|
+
*
|
|
19329
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19330
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19331
|
+
*/
|
|
19332
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19333
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19334
|
+
totalRows: number().int(),
|
|
19335
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19336
|
+
totalBytes: number().int(),
|
|
19337
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19338
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19339
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19340
|
+
unaccountedRows: number().int(),
|
|
19341
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19342
|
+
unaccountedBytes: number().int()
|
|
19343
|
+
});
|
|
19173
19344
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19174
19345
|
var EventPruneCountsSchema = object({
|
|
19175
19346
|
motion: number().int(),
|
|
@@ -19324,7 +19495,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19324
19495
|
until: number().optional(),
|
|
19325
19496
|
kinds: array(string()).optional(),
|
|
19326
19497
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19327
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19498
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19328
19499
|
deviceId: number(),
|
|
19329
19500
|
since: number(),
|
|
19330
19501
|
until: number(),
|
|
@@ -19373,6 +19544,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19373
19544
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19374
19545
|
kind: "query",
|
|
19375
19546
|
auth: "admin"
|
|
19547
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19548
|
+
kind: "query",
|
|
19549
|
+
auth: "admin"
|
|
19376
19550
|
}), method(object({
|
|
19377
19551
|
olderThanMs: number(),
|
|
19378
19552
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21324,6 +21498,20 @@ method(object({
|
|
|
21324
21498
|
error: string().optional()
|
|
21325
21499
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21326
21500
|
providerId: string(),
|
|
21501
|
+
/**
|
|
21502
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21503
|
+
*
|
|
21504
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21505
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21506
|
+
* credential the operator did not retype — and posting that here
|
|
21507
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21508
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21509
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21510
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21511
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21512
|
+
* every value was typed just now and nothing is stored yet.
|
|
21513
|
+
*/
|
|
21514
|
+
locationId: string().optional(),
|
|
21327
21515
|
config: record(string(), unknown())
|
|
21328
21516
|
}), object({
|
|
21329
21517
|
ok: boolean(),
|
|
@@ -28674,6 +28862,9 @@ method(object({
|
|
|
28674
28862
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
28675
28863
|
kind: "query",
|
|
28676
28864
|
auth: "admin"
|
|
28865
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
28866
|
+
kind: "mutation",
|
|
28867
|
+
auth: "admin"
|
|
28677
28868
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
28678
28869
|
kind: "mutation",
|
|
28679
28870
|
auth: "admin"
|
|
@@ -29065,6 +29256,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
29065
29256
|
monitors: array(SceneMonitorSchema),
|
|
29066
29257
|
lastFetchedAt: number()
|
|
29067
29258
|
});
|
|
29259
|
+
/**
|
|
29260
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
29261
|
+
*
|
|
29262
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
29263
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
29264
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
29265
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
29266
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
29267
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
29268
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
29269
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
29270
|
+
*
|
|
29271
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
29272
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
29273
|
+
*/
|
|
29274
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
29275
|
+
deviceId: number(),
|
|
29276
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
29277
|
+
});
|
|
29068
29278
|
var sceneMonitorCapability = {
|
|
29069
29279
|
name: "scene-monitor",
|
|
29070
29280
|
scope: "device",
|
|
@@ -29074,6 +29284,22 @@ var sceneMonitorCapability = {
|
|
|
29074
29284
|
deviceTypes: [DeviceType.Camera],
|
|
29075
29285
|
methods: {
|
|
29076
29286
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
29287
|
+
/**
|
|
29288
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
29289
|
+
*
|
|
29290
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
29291
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
29292
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
29293
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
29294
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
29295
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
29296
|
+
*
|
|
29297
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
29298
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
29299
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
29300
|
+
* tell which two are missing, or that any are.
|
|
29301
|
+
*/
|
|
29302
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
29077
29303
|
createScene: method(object({
|
|
29078
29304
|
deviceId: number(),
|
|
29079
29305
|
label: string(),
|
|
@@ -30909,6 +31135,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
30909
31135
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
30910
31136
|
});
|
|
30911
31137
|
/**
|
|
31138
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
31139
|
+
*
|
|
31140
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
31141
|
+
* because `snapshot: null` was already spoken for:
|
|
31142
|
+
*
|
|
31143
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
31144
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
31145
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
31146
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
31147
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
31148
|
+
*
|
|
31149
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
31150
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
31151
|
+
* which is a definite claim about a camera nobody could read.
|
|
31152
|
+
*/
|
|
31153
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
31154
|
+
deviceId: number(),
|
|
31155
|
+
read: _enum(["read", "unreadable"]),
|
|
31156
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
31157
|
+
});
|
|
31158
|
+
/**
|
|
30912
31159
|
* Time-series resolution. The history methods return one bucket per
|
|
30913
31160
|
* step over the requested range. Smaller resolutions cost more
|
|
30914
31161
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -30965,6 +31212,20 @@ var zoneAnalyticsCapability = {
|
|
|
30965
31212
|
* (no inference result emitted since boot or since binding was
|
|
30966
31213
|
* activated). */
|
|
30967
31214
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
31215
|
+
/**
|
|
31216
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
31217
|
+
*
|
|
31218
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
31219
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
31220
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
31221
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
31222
|
+
* work is unchanged.
|
|
31223
|
+
*
|
|
31224
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
31225
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
31226
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
31227
|
+
*/
|
|
31228
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
30968
31229
|
/** Time-series object count inside one zone. `className` optional —
|
|
30969
31230
|
* omit to count every class in the zone. */
|
|
30970
31231
|
getZoneHistory: method(object({
|
|
@@ -35362,6 +35623,12 @@ Object.freeze({
|
|
|
35362
35623
|
addonId: null,
|
|
35363
35624
|
access: "view"
|
|
35364
35625
|
},
|
|
35626
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35627
|
+
capName: "pipeline-analytics",
|
|
35628
|
+
capScope: "device",
|
|
35629
|
+
addonId: null,
|
|
35630
|
+
access: "view"
|
|
35631
|
+
},
|
|
35365
35632
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35366
35633
|
capName: "pipeline-analytics",
|
|
35367
35634
|
capScope: "device",
|
|
@@ -35380,6 +35647,12 @@ Object.freeze({
|
|
|
35380
35647
|
addonId: null,
|
|
35381
35648
|
access: "view"
|
|
35382
35649
|
},
|
|
35650
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
35651
|
+
capName: "pipeline-analytics",
|
|
35652
|
+
capScope: "device",
|
|
35653
|
+
addonId: null,
|
|
35654
|
+
access: "view"
|
|
35655
|
+
},
|
|
35383
35656
|
"pipelineAnalytics.getMotionEvents": {
|
|
35384
35657
|
capName: "pipeline-analytics",
|
|
35385
35658
|
capScope: "device",
|
|
@@ -36556,6 +36829,12 @@ Object.freeze({
|
|
|
36556
36829
|
addonId: null,
|
|
36557
36830
|
access: "view"
|
|
36558
36831
|
},
|
|
36832
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
36833
|
+
capName: "recording",
|
|
36834
|
+
capScope: "system",
|
|
36835
|
+
addonId: null,
|
|
36836
|
+
access: "create"
|
|
36837
|
+
},
|
|
36559
36838
|
"recording.refreshStorageLocationsForMigration": {
|
|
36560
36839
|
capName: "recording",
|
|
36561
36840
|
capScope: "system",
|
|
@@ -36682,6 +36961,12 @@ Object.freeze({
|
|
|
36682
36961
|
addonId: null,
|
|
36683
36962
|
access: "view"
|
|
36684
36963
|
},
|
|
36964
|
+
"sceneMonitor.listScenesBatch": {
|
|
36965
|
+
capName: "scene-monitor",
|
|
36966
|
+
capScope: "device",
|
|
36967
|
+
addonId: null,
|
|
36968
|
+
access: "view"
|
|
36969
|
+
},
|
|
36685
36970
|
"sceneMonitor.recheckNow": {
|
|
36686
36971
|
capName: "scene-monitor",
|
|
36687
36972
|
capScope: "device",
|
|
@@ -38038,6 +38323,12 @@ Object.freeze({
|
|
|
38038
38323
|
addonId: null,
|
|
38039
38324
|
access: "view"
|
|
38040
38325
|
},
|
|
38326
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
38327
|
+
capName: "zone-analytics",
|
|
38328
|
+
capScope: "device",
|
|
38329
|
+
addonId: null,
|
|
38330
|
+
access: "view"
|
|
38331
|
+
},
|
|
38041
38332
|
"zoneAnalytics.getUnzonedHistory": {
|
|
38042
38333
|
capName: "zone-analytics",
|
|
38043
38334
|
capScope: "device",
|
|
@@ -39027,6 +39318,11 @@ Object.freeze({
|
|
|
39027
39318
|
form: "single",
|
|
39028
39319
|
optional: false
|
|
39029
39320
|
}],
|
|
39321
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39322
|
+
name: "deviceId",
|
|
39323
|
+
form: "single",
|
|
39324
|
+
optional: true
|
|
39325
|
+
}],
|
|
39030
39326
|
"pipelineAnalytics.getGroup": [{
|
|
39031
39327
|
name: "deviceId",
|
|
39032
39328
|
form: "single",
|
|
@@ -39037,6 +39333,11 @@ Object.freeze({
|
|
|
39037
39333
|
form: "single",
|
|
39038
39334
|
optional: false
|
|
39039
39335
|
}],
|
|
39336
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
39337
|
+
name: "deviceIds",
|
|
39338
|
+
form: "array",
|
|
39339
|
+
optional: false
|
|
39340
|
+
}],
|
|
39040
39341
|
"pipelineAnalytics.getMotionEvents": [{
|
|
39041
39342
|
name: "deviceId",
|
|
39042
39343
|
form: "single",
|
|
@@ -39477,6 +39778,11 @@ Object.freeze({
|
|
|
39477
39778
|
form: "single",
|
|
39478
39779
|
optional: false
|
|
39479
39780
|
}],
|
|
39781
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
39782
|
+
name: "deviceId",
|
|
39783
|
+
form: "single",
|
|
39784
|
+
optional: true
|
|
39785
|
+
}],
|
|
39480
39786
|
"recording.relocateFootage": [{
|
|
39481
39787
|
name: "deviceId",
|
|
39482
39788
|
form: "single",
|
|
@@ -39542,6 +39848,11 @@ Object.freeze({
|
|
|
39542
39848
|
form: "single",
|
|
39543
39849
|
optional: false
|
|
39544
39850
|
}],
|
|
39851
|
+
"sceneMonitor.listScenesBatch": [{
|
|
39852
|
+
name: "deviceIds",
|
|
39853
|
+
form: "array",
|
|
39854
|
+
optional: false
|
|
39855
|
+
}],
|
|
39545
39856
|
"sceneMonitor.recheckNow": [{
|
|
39546
39857
|
name: "deviceId",
|
|
39547
39858
|
form: "single",
|
|
@@ -39803,6 +40114,11 @@ Object.freeze({
|
|
|
39803
40114
|
form: "single",
|
|
39804
40115
|
optional: false
|
|
39805
40116
|
}],
|
|
40117
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
40118
|
+
name: "deviceIds",
|
|
40119
|
+
form: "array",
|
|
40120
|
+
optional: false
|
|
40121
|
+
}],
|
|
39806
40122
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
39807
40123
|
name: "deviceId",
|
|
39808
40124
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -8028,6 +8028,20 @@ var RelocateJobSchema = object({
|
|
|
8028
8028
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8029
8029
|
*/
|
|
8030
8030
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8031
|
+
/**
|
|
8032
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8033
|
+
*
|
|
8034
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8035
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8036
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8037
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8038
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8039
|
+
* the same failure as one that quietly skips them (D295).
|
|
8040
|
+
*
|
|
8041
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8042
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8043
|
+
*/
|
|
8044
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8031
8045
|
startedAt: number(),
|
|
8032
8046
|
finishedAt: number().nullable(),
|
|
8033
8047
|
error: string().nullable()
|
|
@@ -8391,6 +8405,91 @@ var RelocateResidueSchema = object({
|
|
|
8391
8405
|
segments: number().int().nonnegative(),
|
|
8392
8406
|
bytes: number().int().nonnegative()
|
|
8393
8407
|
}).nullable();
|
|
8408
|
+
/**
|
|
8409
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8410
|
+
* (D319).
|
|
8411
|
+
*
|
|
8412
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8413
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8414
|
+
* destructive run before authorising it.
|
|
8415
|
+
*/
|
|
8416
|
+
var LedgerWalkInputSchema = object({
|
|
8417
|
+
locationId: string().min(1),
|
|
8418
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8419
|
+
apply: boolean().optional(),
|
|
8420
|
+
/** Narrow to one camera. */
|
|
8421
|
+
deviceId: number().int().positive().optional(),
|
|
8422
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8423
|
+
profiles: array(string().min(1)).optional()
|
|
8424
|
+
});
|
|
8425
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8426
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8427
|
+
"location-unknown",
|
|
8428
|
+
"source-writable",
|
|
8429
|
+
"no-ledger",
|
|
8430
|
+
"archive-unreadable",
|
|
8431
|
+
"anchor-absent",
|
|
8432
|
+
"anchor-unreadable",
|
|
8433
|
+
"anchor-moved"
|
|
8434
|
+
]);
|
|
8435
|
+
_enum([
|
|
8436
|
+
"live-tail",
|
|
8437
|
+
"listing-error",
|
|
8438
|
+
"path-mismatch",
|
|
8439
|
+
"durable-refused"
|
|
8440
|
+
]);
|
|
8441
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8442
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8443
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8444
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8445
|
+
"live-tail": number().int().nonnegative(),
|
|
8446
|
+
"listing-error": number().int().nonnegative(),
|
|
8447
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8448
|
+
"durable-refused": number().int().nonnegative()
|
|
8449
|
+
});
|
|
8450
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8451
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8452
|
+
deviceId: number().int(),
|
|
8453
|
+
hoursWalked: number().int().nonnegative(),
|
|
8454
|
+
hoursMissing: number().int().nonnegative(),
|
|
8455
|
+
ghostSegments: number().int().nonnegative(),
|
|
8456
|
+
ghostBytes: number().int().nonnegative(),
|
|
8457
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8458
|
+
orphanFiles: number().int().nonnegative()
|
|
8459
|
+
});
|
|
8460
|
+
/**
|
|
8461
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8462
|
+
*
|
|
8463
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8464
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8465
|
+
* than in the absence of one.
|
|
8466
|
+
*/
|
|
8467
|
+
var LedgerWalkReportSchema = object({
|
|
8468
|
+
locationId: string(),
|
|
8469
|
+
applied: boolean(),
|
|
8470
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8471
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8472
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8473
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8474
|
+
hoursWalked: number().int().nonnegative(),
|
|
8475
|
+
hoursMissing: number().int().nonnegative(),
|
|
8476
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8477
|
+
listings: number().int().nonnegative(),
|
|
8478
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8479
|
+
ghostSegments: number().int().nonnegative(),
|
|
8480
|
+
ghostBytes: number().int().nonnegative(),
|
|
8481
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8482
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8483
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8484
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8485
|
+
orphanFiles: number().int().nonnegative(),
|
|
8486
|
+
orphanSample: array(string()).readonly(),
|
|
8487
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8488
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8489
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8490
|
+
bounded: boolean(),
|
|
8491
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8492
|
+
});
|
|
8394
8493
|
/** How many rows a media pass would still act on against a given target — the
|
|
8395
8494
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8396
8495
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -19072,13 +19171,15 @@ var ListGroupsPageSchema = object({
|
|
|
19072
19171
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
19073
19172
|
nextCursor: string().nullable()
|
|
19074
19173
|
});
|
|
19174
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
19175
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
19075
19176
|
var KeyEventQueryInput = object({
|
|
19076
19177
|
deviceId: number(),
|
|
19077
19178
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
19078
19179
|
since: number(),
|
|
19079
19180
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
19080
19181
|
until: number(),
|
|
19081
|
-
limit: number().int().min(1).max(
|
|
19182
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19082
19183
|
/** Drop tracks scoring below this importance. */
|
|
19083
19184
|
minImportance: number().min(0).max(1).optional(),
|
|
19084
19185
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -19100,6 +19201,32 @@ var KeyEventSchema = object({
|
|
|
19100
19201
|
...TrackFlagFields,
|
|
19101
19202
|
...TrackRetrainFields
|
|
19102
19203
|
});
|
|
19204
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
19205
|
+
var KeyEventBatchQueryInput = object({
|
|
19206
|
+
deviceIds: array(number()).min(1).max(200),
|
|
19207
|
+
since: number(),
|
|
19208
|
+
until: number(),
|
|
19209
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
19210
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
19211
|
+
* rows and change what the merged feed contains. */
|
|
19212
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19213
|
+
minImportance: number().min(0).max(1).optional(),
|
|
19214
|
+
classFilter: string().optional()
|
|
19215
|
+
});
|
|
19216
|
+
/**
|
|
19217
|
+
* One camera's key events in a batch answer.
|
|
19218
|
+
*
|
|
19219
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
19220
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
19221
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
19222
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
19223
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
19224
|
+
* key, which only worked because there was one query per camera).
|
|
19225
|
+
*/
|
|
19226
|
+
var KeyEventsForDeviceSchema = object({
|
|
19227
|
+
deviceId: number(),
|
|
19228
|
+
events: array(KeyEventSchema).readonly()
|
|
19229
|
+
});
|
|
19103
19230
|
object({
|
|
19104
19231
|
trackId: string(),
|
|
19105
19232
|
className: string(),
|
|
@@ -19171,6 +19298,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19171
19298
|
totalBytes: number().int(),
|
|
19172
19299
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19173
19300
|
});
|
|
19301
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19302
|
+
var EventMediaKindFootprintSchema = object({
|
|
19303
|
+
kind: MediaFileKindEnum,
|
|
19304
|
+
/** Media rows of this kind. */
|
|
19305
|
+
rows: number().int(),
|
|
19306
|
+
/** Bytes on disk held by those rows. */
|
|
19307
|
+
bytes: number().int()
|
|
19308
|
+
});
|
|
19309
|
+
/**
|
|
19310
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19311
|
+
* actually turns on.
|
|
19312
|
+
*
|
|
19313
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19314
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19315
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19316
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19317
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19318
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19319
|
+
*
|
|
19320
|
+
* ## Why `unaccounted*` exists
|
|
19321
|
+
*
|
|
19322
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19323
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19324
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19325
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19326
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19327
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19328
|
+
* against a denominator smaller than the disk.
|
|
19329
|
+
*
|
|
19330
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19331
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19332
|
+
*/
|
|
19333
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19334
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19335
|
+
totalRows: number().int(),
|
|
19336
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19337
|
+
totalBytes: number().int(),
|
|
19338
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19339
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19340
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19341
|
+
unaccountedRows: number().int(),
|
|
19342
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19343
|
+
unaccountedBytes: number().int()
|
|
19344
|
+
});
|
|
19174
19345
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19175
19346
|
var EventPruneCountsSchema = object({
|
|
19176
19347
|
motion: number().int(),
|
|
@@ -19325,7 +19496,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19325
19496
|
until: number().optional(),
|
|
19326
19497
|
kinds: array(string()).optional(),
|
|
19327
19498
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19328
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19499
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19329
19500
|
deviceId: number(),
|
|
19330
19501
|
since: number(),
|
|
19331
19502
|
until: number(),
|
|
@@ -19374,6 +19545,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19374
19545
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19375
19546
|
kind: "query",
|
|
19376
19547
|
auth: "admin"
|
|
19548
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19549
|
+
kind: "query",
|
|
19550
|
+
auth: "admin"
|
|
19377
19551
|
}), method(object({
|
|
19378
19552
|
olderThanMs: number(),
|
|
19379
19553
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21325,6 +21499,20 @@ method(object({
|
|
|
21325
21499
|
error: string().optional()
|
|
21326
21500
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21327
21501
|
providerId: string(),
|
|
21502
|
+
/**
|
|
21503
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21504
|
+
*
|
|
21505
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21506
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21507
|
+
* credential the operator did not retype — and posting that here
|
|
21508
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21509
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21510
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21511
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21512
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21513
|
+
* every value was typed just now and nothing is stored yet.
|
|
21514
|
+
*/
|
|
21515
|
+
locationId: string().optional(),
|
|
21328
21516
|
config: record(string(), unknown())
|
|
21329
21517
|
}), object({
|
|
21330
21518
|
ok: boolean(),
|
|
@@ -28675,6 +28863,9 @@ method(object({
|
|
|
28675
28863
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
28676
28864
|
kind: "query",
|
|
28677
28865
|
auth: "admin"
|
|
28866
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
28867
|
+
kind: "mutation",
|
|
28868
|
+
auth: "admin"
|
|
28678
28869
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
28679
28870
|
kind: "mutation",
|
|
28680
28871
|
auth: "admin"
|
|
@@ -29066,6 +29257,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
29066
29257
|
monitors: array(SceneMonitorSchema),
|
|
29067
29258
|
lastFetchedAt: number()
|
|
29068
29259
|
});
|
|
29260
|
+
/**
|
|
29261
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
29262
|
+
*
|
|
29263
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
29264
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
29265
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
29266
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
29267
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
29268
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
29269
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
29270
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
29271
|
+
*
|
|
29272
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
29273
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
29274
|
+
*/
|
|
29275
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
29276
|
+
deviceId: number(),
|
|
29277
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
29278
|
+
});
|
|
29069
29279
|
var sceneMonitorCapability = {
|
|
29070
29280
|
name: "scene-monitor",
|
|
29071
29281
|
scope: "device",
|
|
@@ -29075,6 +29285,22 @@ var sceneMonitorCapability = {
|
|
|
29075
29285
|
deviceTypes: [DeviceType.Camera],
|
|
29076
29286
|
methods: {
|
|
29077
29287
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
29288
|
+
/**
|
|
29289
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
29290
|
+
*
|
|
29291
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
29292
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
29293
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
29294
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
29295
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
29296
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
29297
|
+
*
|
|
29298
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
29299
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
29300
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
29301
|
+
* tell which two are missing, or that any are.
|
|
29302
|
+
*/
|
|
29303
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
29078
29304
|
createScene: method(object({
|
|
29079
29305
|
deviceId: number(),
|
|
29080
29306
|
label: string(),
|
|
@@ -30910,6 +31136,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
30910
31136
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
30911
31137
|
});
|
|
30912
31138
|
/**
|
|
31139
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
31140
|
+
*
|
|
31141
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
31142
|
+
* because `snapshot: null` was already spoken for:
|
|
31143
|
+
*
|
|
31144
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
31145
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
31146
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
31147
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
31148
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
31149
|
+
*
|
|
31150
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
31151
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
31152
|
+
* which is a definite claim about a camera nobody could read.
|
|
31153
|
+
*/
|
|
31154
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
31155
|
+
deviceId: number(),
|
|
31156
|
+
read: _enum(["read", "unreadable"]),
|
|
31157
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
31158
|
+
});
|
|
31159
|
+
/**
|
|
30913
31160
|
* Time-series resolution. The history methods return one bucket per
|
|
30914
31161
|
* step over the requested range. Smaller resolutions cost more
|
|
30915
31162
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -30966,6 +31213,20 @@ var zoneAnalyticsCapability = {
|
|
|
30966
31213
|
* (no inference result emitted since boot or since binding was
|
|
30967
31214
|
* activated). */
|
|
30968
31215
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
31216
|
+
/**
|
|
31217
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
31218
|
+
*
|
|
31219
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
31220
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
31221
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
31222
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
31223
|
+
* work is unchanged.
|
|
31224
|
+
*
|
|
31225
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
31226
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
31227
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
31228
|
+
*/
|
|
31229
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
30969
31230
|
/** Time-series object count inside one zone. `className` optional —
|
|
30970
31231
|
* omit to count every class in the zone. */
|
|
30971
31232
|
getZoneHistory: method(object({
|
|
@@ -35363,6 +35624,12 @@ Object.freeze({
|
|
|
35363
35624
|
addonId: null,
|
|
35364
35625
|
access: "view"
|
|
35365
35626
|
},
|
|
35627
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35628
|
+
capName: "pipeline-analytics",
|
|
35629
|
+
capScope: "device",
|
|
35630
|
+
addonId: null,
|
|
35631
|
+
access: "view"
|
|
35632
|
+
},
|
|
35366
35633
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35367
35634
|
capName: "pipeline-analytics",
|
|
35368
35635
|
capScope: "device",
|
|
@@ -35381,6 +35648,12 @@ Object.freeze({
|
|
|
35381
35648
|
addonId: null,
|
|
35382
35649
|
access: "view"
|
|
35383
35650
|
},
|
|
35651
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
35652
|
+
capName: "pipeline-analytics",
|
|
35653
|
+
capScope: "device",
|
|
35654
|
+
addonId: null,
|
|
35655
|
+
access: "view"
|
|
35656
|
+
},
|
|
35384
35657
|
"pipelineAnalytics.getMotionEvents": {
|
|
35385
35658
|
capName: "pipeline-analytics",
|
|
35386
35659
|
capScope: "device",
|
|
@@ -36557,6 +36830,12 @@ Object.freeze({
|
|
|
36557
36830
|
addonId: null,
|
|
36558
36831
|
access: "view"
|
|
36559
36832
|
},
|
|
36833
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
36834
|
+
capName: "recording",
|
|
36835
|
+
capScope: "system",
|
|
36836
|
+
addonId: null,
|
|
36837
|
+
access: "create"
|
|
36838
|
+
},
|
|
36560
36839
|
"recording.refreshStorageLocationsForMigration": {
|
|
36561
36840
|
capName: "recording",
|
|
36562
36841
|
capScope: "system",
|
|
@@ -36683,6 +36962,12 @@ Object.freeze({
|
|
|
36683
36962
|
addonId: null,
|
|
36684
36963
|
access: "view"
|
|
36685
36964
|
},
|
|
36965
|
+
"sceneMonitor.listScenesBatch": {
|
|
36966
|
+
capName: "scene-monitor",
|
|
36967
|
+
capScope: "device",
|
|
36968
|
+
addonId: null,
|
|
36969
|
+
access: "view"
|
|
36970
|
+
},
|
|
36686
36971
|
"sceneMonitor.recheckNow": {
|
|
36687
36972
|
capName: "scene-monitor",
|
|
36688
36973
|
capScope: "device",
|
|
@@ -38039,6 +38324,12 @@ Object.freeze({
|
|
|
38039
38324
|
addonId: null,
|
|
38040
38325
|
access: "view"
|
|
38041
38326
|
},
|
|
38327
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
38328
|
+
capName: "zone-analytics",
|
|
38329
|
+
capScope: "device",
|
|
38330
|
+
addonId: null,
|
|
38331
|
+
access: "view"
|
|
38332
|
+
},
|
|
38042
38333
|
"zoneAnalytics.getUnzonedHistory": {
|
|
38043
38334
|
capName: "zone-analytics",
|
|
38044
38335
|
capScope: "device",
|
|
@@ -39028,6 +39319,11 @@ Object.freeze({
|
|
|
39028
39319
|
form: "single",
|
|
39029
39320
|
optional: false
|
|
39030
39321
|
}],
|
|
39322
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39323
|
+
name: "deviceId",
|
|
39324
|
+
form: "single",
|
|
39325
|
+
optional: true
|
|
39326
|
+
}],
|
|
39031
39327
|
"pipelineAnalytics.getGroup": [{
|
|
39032
39328
|
name: "deviceId",
|
|
39033
39329
|
form: "single",
|
|
@@ -39038,6 +39334,11 @@ Object.freeze({
|
|
|
39038
39334
|
form: "single",
|
|
39039
39335
|
optional: false
|
|
39040
39336
|
}],
|
|
39337
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
39338
|
+
name: "deviceIds",
|
|
39339
|
+
form: "array",
|
|
39340
|
+
optional: false
|
|
39341
|
+
}],
|
|
39041
39342
|
"pipelineAnalytics.getMotionEvents": [{
|
|
39042
39343
|
name: "deviceId",
|
|
39043
39344
|
form: "single",
|
|
@@ -39478,6 +39779,11 @@ Object.freeze({
|
|
|
39478
39779
|
form: "single",
|
|
39479
39780
|
optional: false
|
|
39480
39781
|
}],
|
|
39782
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
39783
|
+
name: "deviceId",
|
|
39784
|
+
form: "single",
|
|
39785
|
+
optional: true
|
|
39786
|
+
}],
|
|
39481
39787
|
"recording.relocateFootage": [{
|
|
39482
39788
|
name: "deviceId",
|
|
39483
39789
|
form: "single",
|
|
@@ -39543,6 +39849,11 @@ Object.freeze({
|
|
|
39543
39849
|
form: "single",
|
|
39544
39850
|
optional: false
|
|
39545
39851
|
}],
|
|
39852
|
+
"sceneMonitor.listScenesBatch": [{
|
|
39853
|
+
name: "deviceIds",
|
|
39854
|
+
form: "array",
|
|
39855
|
+
optional: false
|
|
39856
|
+
}],
|
|
39546
39857
|
"sceneMonitor.recheckNow": [{
|
|
39547
39858
|
name: "deviceId",
|
|
39548
39859
|
form: "single",
|
|
@@ -39804,6 +40115,11 @@ Object.freeze({
|
|
|
39804
40115
|
form: "single",
|
|
39805
40116
|
optional: false
|
|
39806
40117
|
}],
|
|
40118
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
40119
|
+
name: "deviceIds",
|
|
40120
|
+
form: "array",
|
|
40121
|
+
optional: false
|
|
40122
|
+
}],
|
|
39807
40123
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
39808
40124
|
name: "deviceId",
|
|
39809
40125
|
form: "single",
|
package/package.json
CHANGED