@camstack/addon-provider-dreo 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
|
@@ -8054,6 +8054,20 @@ var RelocateJobSchema = object({
|
|
|
8054
8054
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8055
8055
|
*/
|
|
8056
8056
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8057
|
+
/**
|
|
8058
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8059
|
+
*
|
|
8060
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8061
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8062
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8063
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8064
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8065
|
+
* the same failure as one that quietly skips them (D295).
|
|
8066
|
+
*
|
|
8067
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8068
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8069
|
+
*/
|
|
8070
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8057
8071
|
startedAt: number(),
|
|
8058
8072
|
finishedAt: number().nullable(),
|
|
8059
8073
|
error: string().nullable()
|
|
@@ -8417,6 +8431,91 @@ var RelocateResidueSchema = object({
|
|
|
8417
8431
|
segments: number().int().nonnegative(),
|
|
8418
8432
|
bytes: number().int().nonnegative()
|
|
8419
8433
|
}).nullable();
|
|
8434
|
+
/**
|
|
8435
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8436
|
+
* (D319).
|
|
8437
|
+
*
|
|
8438
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8439
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8440
|
+
* destructive run before authorising it.
|
|
8441
|
+
*/
|
|
8442
|
+
var LedgerWalkInputSchema = object({
|
|
8443
|
+
locationId: string().min(1),
|
|
8444
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8445
|
+
apply: boolean().optional(),
|
|
8446
|
+
/** Narrow to one camera. */
|
|
8447
|
+
deviceId: number().int().positive().optional(),
|
|
8448
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8449
|
+
profiles: array(string().min(1)).optional()
|
|
8450
|
+
});
|
|
8451
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8452
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8453
|
+
"location-unknown",
|
|
8454
|
+
"source-writable",
|
|
8455
|
+
"no-ledger",
|
|
8456
|
+
"archive-unreadable",
|
|
8457
|
+
"anchor-absent",
|
|
8458
|
+
"anchor-unreadable",
|
|
8459
|
+
"anchor-moved"
|
|
8460
|
+
]);
|
|
8461
|
+
_enum([
|
|
8462
|
+
"live-tail",
|
|
8463
|
+
"listing-error",
|
|
8464
|
+
"path-mismatch",
|
|
8465
|
+
"durable-refused"
|
|
8466
|
+
]);
|
|
8467
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8468
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8469
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8470
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8471
|
+
"live-tail": number().int().nonnegative(),
|
|
8472
|
+
"listing-error": number().int().nonnegative(),
|
|
8473
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8474
|
+
"durable-refused": number().int().nonnegative()
|
|
8475
|
+
});
|
|
8476
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8477
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8478
|
+
deviceId: number().int(),
|
|
8479
|
+
hoursWalked: number().int().nonnegative(),
|
|
8480
|
+
hoursMissing: number().int().nonnegative(),
|
|
8481
|
+
ghostSegments: number().int().nonnegative(),
|
|
8482
|
+
ghostBytes: number().int().nonnegative(),
|
|
8483
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8484
|
+
orphanFiles: number().int().nonnegative()
|
|
8485
|
+
});
|
|
8486
|
+
/**
|
|
8487
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8488
|
+
*
|
|
8489
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8490
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8491
|
+
* than in the absence of one.
|
|
8492
|
+
*/
|
|
8493
|
+
var LedgerWalkReportSchema = object({
|
|
8494
|
+
locationId: string(),
|
|
8495
|
+
applied: boolean(),
|
|
8496
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8497
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8498
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8499
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8500
|
+
hoursWalked: number().int().nonnegative(),
|
|
8501
|
+
hoursMissing: number().int().nonnegative(),
|
|
8502
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8503
|
+
listings: number().int().nonnegative(),
|
|
8504
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8505
|
+
ghostSegments: number().int().nonnegative(),
|
|
8506
|
+
ghostBytes: number().int().nonnegative(),
|
|
8507
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8508
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8509
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8510
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8511
|
+
orphanFiles: number().int().nonnegative(),
|
|
8512
|
+
orphanSample: array(string()).readonly(),
|
|
8513
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8514
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8515
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8516
|
+
bounded: boolean(),
|
|
8517
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8518
|
+
});
|
|
8420
8519
|
/** How many rows a media pass would still act on against a given target — the
|
|
8421
8520
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8422
8521
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -19049,13 +19148,15 @@ var ListGroupsPageSchema = object({
|
|
|
19049
19148
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
19050
19149
|
nextCursor: string().nullable()
|
|
19051
19150
|
});
|
|
19151
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
19152
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
19052
19153
|
var KeyEventQueryInput = object({
|
|
19053
19154
|
deviceId: number(),
|
|
19054
19155
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
19055
19156
|
since: number(),
|
|
19056
19157
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
19057
19158
|
until: number(),
|
|
19058
|
-
limit: number().int().min(1).max(
|
|
19159
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19059
19160
|
/** Drop tracks scoring below this importance. */
|
|
19060
19161
|
minImportance: number().min(0).max(1).optional(),
|
|
19061
19162
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -19077,6 +19178,32 @@ var KeyEventSchema = object({
|
|
|
19077
19178
|
...TrackFlagFields,
|
|
19078
19179
|
...TrackRetrainFields
|
|
19079
19180
|
});
|
|
19181
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
19182
|
+
var KeyEventBatchQueryInput = object({
|
|
19183
|
+
deviceIds: array(number()).min(1).max(200),
|
|
19184
|
+
since: number(),
|
|
19185
|
+
until: number(),
|
|
19186
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
19187
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
19188
|
+
* rows and change what the merged feed contains. */
|
|
19189
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19190
|
+
minImportance: number().min(0).max(1).optional(),
|
|
19191
|
+
classFilter: string().optional()
|
|
19192
|
+
});
|
|
19193
|
+
/**
|
|
19194
|
+
* One camera's key events in a batch answer.
|
|
19195
|
+
*
|
|
19196
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
19197
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
19198
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
19199
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
19200
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
19201
|
+
* key, which only worked because there was one query per camera).
|
|
19202
|
+
*/
|
|
19203
|
+
var KeyEventsForDeviceSchema = object({
|
|
19204
|
+
deviceId: number(),
|
|
19205
|
+
events: array(KeyEventSchema).readonly()
|
|
19206
|
+
});
|
|
19080
19207
|
object({
|
|
19081
19208
|
trackId: string(),
|
|
19082
19209
|
className: string(),
|
|
@@ -19148,6 +19275,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19148
19275
|
totalBytes: number().int(),
|
|
19149
19276
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19150
19277
|
});
|
|
19278
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19279
|
+
var EventMediaKindFootprintSchema = object({
|
|
19280
|
+
kind: MediaFileKindEnum,
|
|
19281
|
+
/** Media rows of this kind. */
|
|
19282
|
+
rows: number().int(),
|
|
19283
|
+
/** Bytes on disk held by those rows. */
|
|
19284
|
+
bytes: number().int()
|
|
19285
|
+
});
|
|
19286
|
+
/**
|
|
19287
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19288
|
+
* actually turns on.
|
|
19289
|
+
*
|
|
19290
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19291
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19292
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19293
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19294
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19295
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19296
|
+
*
|
|
19297
|
+
* ## Why `unaccounted*` exists
|
|
19298
|
+
*
|
|
19299
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19300
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19301
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19302
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19303
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19304
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19305
|
+
* against a denominator smaller than the disk.
|
|
19306
|
+
*
|
|
19307
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19308
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19309
|
+
*/
|
|
19310
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19311
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19312
|
+
totalRows: number().int(),
|
|
19313
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19314
|
+
totalBytes: number().int(),
|
|
19315
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19316
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19317
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19318
|
+
unaccountedRows: number().int(),
|
|
19319
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19320
|
+
unaccountedBytes: number().int()
|
|
19321
|
+
});
|
|
19151
19322
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19152
19323
|
var EventPruneCountsSchema = object({
|
|
19153
19324
|
motion: number().int(),
|
|
@@ -19302,7 +19473,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19302
19473
|
until: number().optional(),
|
|
19303
19474
|
kinds: array(string()).optional(),
|
|
19304
19475
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19305
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19476
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19306
19477
|
deviceId: number(),
|
|
19307
19478
|
since: number(),
|
|
19308
19479
|
until: number(),
|
|
@@ -19351,6 +19522,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19351
19522
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19352
19523
|
kind: "query",
|
|
19353
19524
|
auth: "admin"
|
|
19525
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19526
|
+
kind: "query",
|
|
19527
|
+
auth: "admin"
|
|
19354
19528
|
}), method(object({
|
|
19355
19529
|
olderThanMs: number(),
|
|
19356
19530
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21302,6 +21476,20 @@ method(object({
|
|
|
21302
21476
|
error: string().optional()
|
|
21303
21477
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21304
21478
|
providerId: string(),
|
|
21479
|
+
/**
|
|
21480
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21481
|
+
*
|
|
21482
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21483
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21484
|
+
* credential the operator did not retype — and posting that here
|
|
21485
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21486
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21487
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21488
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21489
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21490
|
+
* every value was typed just now and nothing is stored yet.
|
|
21491
|
+
*/
|
|
21492
|
+
locationId: string().optional(),
|
|
21305
21493
|
config: record(string(), unknown())
|
|
21306
21494
|
}), object({
|
|
21307
21495
|
ok: boolean(),
|
|
@@ -28660,6 +28848,9 @@ method(object({
|
|
|
28660
28848
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
28661
28849
|
kind: "query",
|
|
28662
28850
|
auth: "admin"
|
|
28851
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
28852
|
+
kind: "mutation",
|
|
28853
|
+
auth: "admin"
|
|
28663
28854
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
28664
28855
|
kind: "mutation",
|
|
28665
28856
|
auth: "admin"
|
|
@@ -29051,6 +29242,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
29051
29242
|
monitors: array(SceneMonitorSchema),
|
|
29052
29243
|
lastFetchedAt: number()
|
|
29053
29244
|
});
|
|
29245
|
+
/**
|
|
29246
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
29247
|
+
*
|
|
29248
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
29249
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
29250
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
29251
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
29252
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
29253
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
29254
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
29255
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
29256
|
+
*
|
|
29257
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
29258
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
29259
|
+
*/
|
|
29260
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
29261
|
+
deviceId: number(),
|
|
29262
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
29263
|
+
});
|
|
29054
29264
|
var sceneMonitorCapability = {
|
|
29055
29265
|
name: "scene-monitor",
|
|
29056
29266
|
scope: "device",
|
|
@@ -29060,6 +29270,22 @@ var sceneMonitorCapability = {
|
|
|
29060
29270
|
deviceTypes: [DeviceType.Camera],
|
|
29061
29271
|
methods: {
|
|
29062
29272
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
29273
|
+
/**
|
|
29274
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
29275
|
+
*
|
|
29276
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
29277
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
29278
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
29279
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
29280
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
29281
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
29282
|
+
*
|
|
29283
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
29284
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
29285
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
29286
|
+
* tell which two are missing, or that any are.
|
|
29287
|
+
*/
|
|
29288
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
29063
29289
|
createScene: method(object({
|
|
29064
29290
|
deviceId: number(),
|
|
29065
29291
|
label: string(),
|
|
@@ -30895,6 +31121,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
30895
31121
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
30896
31122
|
});
|
|
30897
31123
|
/**
|
|
31124
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
31125
|
+
*
|
|
31126
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
31127
|
+
* because `snapshot: null` was already spoken for:
|
|
31128
|
+
*
|
|
31129
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
31130
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
31131
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
31132
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
31133
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
31134
|
+
*
|
|
31135
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
31136
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
31137
|
+
* which is a definite claim about a camera nobody could read.
|
|
31138
|
+
*/
|
|
31139
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
31140
|
+
deviceId: number(),
|
|
31141
|
+
read: _enum(["read", "unreadable"]),
|
|
31142
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
31143
|
+
});
|
|
31144
|
+
/**
|
|
30898
31145
|
* Time-series resolution. The history methods return one bucket per
|
|
30899
31146
|
* step over the requested range. Smaller resolutions cost more
|
|
30900
31147
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -30951,6 +31198,20 @@ var zoneAnalyticsCapability = {
|
|
|
30951
31198
|
* (no inference result emitted since boot or since binding was
|
|
30952
31199
|
* activated). */
|
|
30953
31200
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
31201
|
+
/**
|
|
31202
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
31203
|
+
*
|
|
31204
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
31205
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
31206
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
31207
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
31208
|
+
* work is unchanged.
|
|
31209
|
+
*
|
|
31210
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
31211
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
31212
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
31213
|
+
*/
|
|
31214
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
30954
31215
|
/** Time-series object count inside one zone. `className` optional —
|
|
30955
31216
|
* omit to count every class in the zone. */
|
|
30956
31217
|
getZoneHistory: method(object({
|
|
@@ -35348,6 +35609,12 @@ Object.freeze({
|
|
|
35348
35609
|
addonId: null,
|
|
35349
35610
|
access: "view"
|
|
35350
35611
|
},
|
|
35612
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35613
|
+
capName: "pipeline-analytics",
|
|
35614
|
+
capScope: "device",
|
|
35615
|
+
addonId: null,
|
|
35616
|
+
access: "view"
|
|
35617
|
+
},
|
|
35351
35618
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35352
35619
|
capName: "pipeline-analytics",
|
|
35353
35620
|
capScope: "device",
|
|
@@ -35366,6 +35633,12 @@ Object.freeze({
|
|
|
35366
35633
|
addonId: null,
|
|
35367
35634
|
access: "view"
|
|
35368
35635
|
},
|
|
35636
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
35637
|
+
capName: "pipeline-analytics",
|
|
35638
|
+
capScope: "device",
|
|
35639
|
+
addonId: null,
|
|
35640
|
+
access: "view"
|
|
35641
|
+
},
|
|
35369
35642
|
"pipelineAnalytics.getMotionEvents": {
|
|
35370
35643
|
capName: "pipeline-analytics",
|
|
35371
35644
|
capScope: "device",
|
|
@@ -36542,6 +36815,12 @@ Object.freeze({
|
|
|
36542
36815
|
addonId: null,
|
|
36543
36816
|
access: "view"
|
|
36544
36817
|
},
|
|
36818
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
36819
|
+
capName: "recording",
|
|
36820
|
+
capScope: "system",
|
|
36821
|
+
addonId: null,
|
|
36822
|
+
access: "create"
|
|
36823
|
+
},
|
|
36545
36824
|
"recording.refreshStorageLocationsForMigration": {
|
|
36546
36825
|
capName: "recording",
|
|
36547
36826
|
capScope: "system",
|
|
@@ -36668,6 +36947,12 @@ Object.freeze({
|
|
|
36668
36947
|
addonId: null,
|
|
36669
36948
|
access: "view"
|
|
36670
36949
|
},
|
|
36950
|
+
"sceneMonitor.listScenesBatch": {
|
|
36951
|
+
capName: "scene-monitor",
|
|
36952
|
+
capScope: "device",
|
|
36953
|
+
addonId: null,
|
|
36954
|
+
access: "view"
|
|
36955
|
+
},
|
|
36671
36956
|
"sceneMonitor.recheckNow": {
|
|
36672
36957
|
capName: "scene-monitor",
|
|
36673
36958
|
capScope: "device",
|
|
@@ -38024,6 +38309,12 @@ Object.freeze({
|
|
|
38024
38309
|
addonId: null,
|
|
38025
38310
|
access: "view"
|
|
38026
38311
|
},
|
|
38312
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
38313
|
+
capName: "zone-analytics",
|
|
38314
|
+
capScope: "device",
|
|
38315
|
+
addonId: null,
|
|
38316
|
+
access: "view"
|
|
38317
|
+
},
|
|
38027
38318
|
"zoneAnalytics.getUnzonedHistory": {
|
|
38028
38319
|
capName: "zone-analytics",
|
|
38029
38320
|
capScope: "device",
|
|
@@ -39013,6 +39304,11 @@ Object.freeze({
|
|
|
39013
39304
|
form: "single",
|
|
39014
39305
|
optional: false
|
|
39015
39306
|
}],
|
|
39307
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39308
|
+
name: "deviceId",
|
|
39309
|
+
form: "single",
|
|
39310
|
+
optional: true
|
|
39311
|
+
}],
|
|
39016
39312
|
"pipelineAnalytics.getGroup": [{
|
|
39017
39313
|
name: "deviceId",
|
|
39018
39314
|
form: "single",
|
|
@@ -39023,6 +39319,11 @@ Object.freeze({
|
|
|
39023
39319
|
form: "single",
|
|
39024
39320
|
optional: false
|
|
39025
39321
|
}],
|
|
39322
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
39323
|
+
name: "deviceIds",
|
|
39324
|
+
form: "array",
|
|
39325
|
+
optional: false
|
|
39326
|
+
}],
|
|
39026
39327
|
"pipelineAnalytics.getMotionEvents": [{
|
|
39027
39328
|
name: "deviceId",
|
|
39028
39329
|
form: "single",
|
|
@@ -39463,6 +39764,11 @@ Object.freeze({
|
|
|
39463
39764
|
form: "single",
|
|
39464
39765
|
optional: false
|
|
39465
39766
|
}],
|
|
39767
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
39768
|
+
name: "deviceId",
|
|
39769
|
+
form: "single",
|
|
39770
|
+
optional: true
|
|
39771
|
+
}],
|
|
39466
39772
|
"recording.relocateFootage": [{
|
|
39467
39773
|
name: "deviceId",
|
|
39468
39774
|
form: "single",
|
|
@@ -39528,6 +39834,11 @@ Object.freeze({
|
|
|
39528
39834
|
form: "single",
|
|
39529
39835
|
optional: false
|
|
39530
39836
|
}],
|
|
39837
|
+
"sceneMonitor.listScenesBatch": [{
|
|
39838
|
+
name: "deviceIds",
|
|
39839
|
+
form: "array",
|
|
39840
|
+
optional: false
|
|
39841
|
+
}],
|
|
39531
39842
|
"sceneMonitor.recheckNow": [{
|
|
39532
39843
|
name: "deviceId",
|
|
39533
39844
|
form: "single",
|
|
@@ -39789,6 +40100,11 @@ Object.freeze({
|
|
|
39789
40100
|
form: "single",
|
|
39790
40101
|
optional: false
|
|
39791
40102
|
}],
|
|
40103
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
40104
|
+
name: "deviceIds",
|
|
40105
|
+
form: "array",
|
|
40106
|
+
optional: false
|
|
40107
|
+
}],
|
|
39792
40108
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
39793
40109
|
name: "deviceId",
|
|
39794
40110
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -8055,6 +8055,20 @@ var RelocateJobSchema = object({
|
|
|
8055
8055
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8056
8056
|
*/
|
|
8057
8057
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8058
|
+
/**
|
|
8059
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8060
|
+
*
|
|
8061
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8062
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8063
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8064
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8065
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8066
|
+
* the same failure as one that quietly skips them (D295).
|
|
8067
|
+
*
|
|
8068
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8069
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8070
|
+
*/
|
|
8071
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8058
8072
|
startedAt: number(),
|
|
8059
8073
|
finishedAt: number().nullable(),
|
|
8060
8074
|
error: string().nullable()
|
|
@@ -8418,6 +8432,91 @@ var RelocateResidueSchema = object({
|
|
|
8418
8432
|
segments: number().int().nonnegative(),
|
|
8419
8433
|
bytes: number().int().nonnegative()
|
|
8420
8434
|
}).nullable();
|
|
8435
|
+
/**
|
|
8436
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8437
|
+
* (D319).
|
|
8438
|
+
*
|
|
8439
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8440
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8441
|
+
* destructive run before authorising it.
|
|
8442
|
+
*/
|
|
8443
|
+
var LedgerWalkInputSchema = object({
|
|
8444
|
+
locationId: string().min(1),
|
|
8445
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8446
|
+
apply: boolean().optional(),
|
|
8447
|
+
/** Narrow to one camera. */
|
|
8448
|
+
deviceId: number().int().positive().optional(),
|
|
8449
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8450
|
+
profiles: array(string().min(1)).optional()
|
|
8451
|
+
});
|
|
8452
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8453
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8454
|
+
"location-unknown",
|
|
8455
|
+
"source-writable",
|
|
8456
|
+
"no-ledger",
|
|
8457
|
+
"archive-unreadable",
|
|
8458
|
+
"anchor-absent",
|
|
8459
|
+
"anchor-unreadable",
|
|
8460
|
+
"anchor-moved"
|
|
8461
|
+
]);
|
|
8462
|
+
_enum([
|
|
8463
|
+
"live-tail",
|
|
8464
|
+
"listing-error",
|
|
8465
|
+
"path-mismatch",
|
|
8466
|
+
"durable-refused"
|
|
8467
|
+
]);
|
|
8468
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8469
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8470
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8471
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8472
|
+
"live-tail": number().int().nonnegative(),
|
|
8473
|
+
"listing-error": number().int().nonnegative(),
|
|
8474
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8475
|
+
"durable-refused": number().int().nonnegative()
|
|
8476
|
+
});
|
|
8477
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8478
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8479
|
+
deviceId: number().int(),
|
|
8480
|
+
hoursWalked: number().int().nonnegative(),
|
|
8481
|
+
hoursMissing: number().int().nonnegative(),
|
|
8482
|
+
ghostSegments: number().int().nonnegative(),
|
|
8483
|
+
ghostBytes: number().int().nonnegative(),
|
|
8484
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8485
|
+
orphanFiles: number().int().nonnegative()
|
|
8486
|
+
});
|
|
8487
|
+
/**
|
|
8488
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8489
|
+
*
|
|
8490
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8491
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8492
|
+
* than in the absence of one.
|
|
8493
|
+
*/
|
|
8494
|
+
var LedgerWalkReportSchema = object({
|
|
8495
|
+
locationId: string(),
|
|
8496
|
+
applied: boolean(),
|
|
8497
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8498
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8499
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8500
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8501
|
+
hoursWalked: number().int().nonnegative(),
|
|
8502
|
+
hoursMissing: number().int().nonnegative(),
|
|
8503
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8504
|
+
listings: number().int().nonnegative(),
|
|
8505
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8506
|
+
ghostSegments: number().int().nonnegative(),
|
|
8507
|
+
ghostBytes: number().int().nonnegative(),
|
|
8508
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8509
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8510
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8511
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8512
|
+
orphanFiles: number().int().nonnegative(),
|
|
8513
|
+
orphanSample: array(string()).readonly(),
|
|
8514
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8515
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8516
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8517
|
+
bounded: boolean(),
|
|
8518
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8519
|
+
});
|
|
8421
8520
|
/** How many rows a media pass would still act on against a given target — the
|
|
8422
8521
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8423
8522
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -19050,13 +19149,15 @@ var ListGroupsPageSchema = object({
|
|
|
19050
19149
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
19051
19150
|
nextCursor: string().nullable()
|
|
19052
19151
|
});
|
|
19152
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
19153
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
19053
19154
|
var KeyEventQueryInput = object({
|
|
19054
19155
|
deviceId: number(),
|
|
19055
19156
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
19056
19157
|
since: number(),
|
|
19057
19158
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
19058
19159
|
until: number(),
|
|
19059
|
-
limit: number().int().min(1).max(
|
|
19160
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19060
19161
|
/** Drop tracks scoring below this importance. */
|
|
19061
19162
|
minImportance: number().min(0).max(1).optional(),
|
|
19062
19163
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -19078,6 +19179,32 @@ var KeyEventSchema = object({
|
|
|
19078
19179
|
...TrackFlagFields,
|
|
19079
19180
|
...TrackRetrainFields
|
|
19080
19181
|
});
|
|
19182
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
19183
|
+
var KeyEventBatchQueryInput = object({
|
|
19184
|
+
deviceIds: array(number()).min(1).max(200),
|
|
19185
|
+
since: number(),
|
|
19186
|
+
until: number(),
|
|
19187
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
19188
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
19189
|
+
* rows and change what the merged feed contains. */
|
|
19190
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19191
|
+
minImportance: number().min(0).max(1).optional(),
|
|
19192
|
+
classFilter: string().optional()
|
|
19193
|
+
});
|
|
19194
|
+
/**
|
|
19195
|
+
* One camera's key events in a batch answer.
|
|
19196
|
+
*
|
|
19197
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
19198
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
19199
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
19200
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
19201
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
19202
|
+
* key, which only worked because there was one query per camera).
|
|
19203
|
+
*/
|
|
19204
|
+
var KeyEventsForDeviceSchema = object({
|
|
19205
|
+
deviceId: number(),
|
|
19206
|
+
events: array(KeyEventSchema).readonly()
|
|
19207
|
+
});
|
|
19081
19208
|
object({
|
|
19082
19209
|
trackId: string(),
|
|
19083
19210
|
className: string(),
|
|
@@ -19149,6 +19276,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19149
19276
|
totalBytes: number().int(),
|
|
19150
19277
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19151
19278
|
});
|
|
19279
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19280
|
+
var EventMediaKindFootprintSchema = object({
|
|
19281
|
+
kind: MediaFileKindEnum,
|
|
19282
|
+
/** Media rows of this kind. */
|
|
19283
|
+
rows: number().int(),
|
|
19284
|
+
/** Bytes on disk held by those rows. */
|
|
19285
|
+
bytes: number().int()
|
|
19286
|
+
});
|
|
19287
|
+
/**
|
|
19288
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19289
|
+
* actually turns on.
|
|
19290
|
+
*
|
|
19291
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19292
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19293
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19294
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19295
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19296
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19297
|
+
*
|
|
19298
|
+
* ## Why `unaccounted*` exists
|
|
19299
|
+
*
|
|
19300
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19301
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19302
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19303
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19304
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19305
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19306
|
+
* against a denominator smaller than the disk.
|
|
19307
|
+
*
|
|
19308
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19309
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19310
|
+
*/
|
|
19311
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19312
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19313
|
+
totalRows: number().int(),
|
|
19314
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19315
|
+
totalBytes: number().int(),
|
|
19316
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19317
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19318
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19319
|
+
unaccountedRows: number().int(),
|
|
19320
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19321
|
+
unaccountedBytes: number().int()
|
|
19322
|
+
});
|
|
19152
19323
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19153
19324
|
var EventPruneCountsSchema = object({
|
|
19154
19325
|
motion: number().int(),
|
|
@@ -19303,7 +19474,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19303
19474
|
until: number().optional(),
|
|
19304
19475
|
kinds: array(string()).optional(),
|
|
19305
19476
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19306
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19477
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19307
19478
|
deviceId: number(),
|
|
19308
19479
|
since: number(),
|
|
19309
19480
|
until: number(),
|
|
@@ -19352,6 +19523,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19352
19523
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19353
19524
|
kind: "query",
|
|
19354
19525
|
auth: "admin"
|
|
19526
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19527
|
+
kind: "query",
|
|
19528
|
+
auth: "admin"
|
|
19355
19529
|
}), method(object({
|
|
19356
19530
|
olderThanMs: number(),
|
|
19357
19531
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21303,6 +21477,20 @@ method(object({
|
|
|
21303
21477
|
error: string().optional()
|
|
21304
21478
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21305
21479
|
providerId: string(),
|
|
21480
|
+
/**
|
|
21481
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21482
|
+
*
|
|
21483
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21484
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21485
|
+
* credential the operator did not retype — and posting that here
|
|
21486
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21487
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21488
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21489
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21490
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21491
|
+
* every value was typed just now and nothing is stored yet.
|
|
21492
|
+
*/
|
|
21493
|
+
locationId: string().optional(),
|
|
21306
21494
|
config: record(string(), unknown())
|
|
21307
21495
|
}), object({
|
|
21308
21496
|
ok: boolean(),
|
|
@@ -28661,6 +28849,9 @@ method(object({
|
|
|
28661
28849
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
28662
28850
|
kind: "query",
|
|
28663
28851
|
auth: "admin"
|
|
28852
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
28853
|
+
kind: "mutation",
|
|
28854
|
+
auth: "admin"
|
|
28664
28855
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
28665
28856
|
kind: "mutation",
|
|
28666
28857
|
auth: "admin"
|
|
@@ -29052,6 +29243,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
29052
29243
|
monitors: array(SceneMonitorSchema),
|
|
29053
29244
|
lastFetchedAt: number()
|
|
29054
29245
|
});
|
|
29246
|
+
/**
|
|
29247
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
29248
|
+
*
|
|
29249
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
29250
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
29251
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
29252
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
29253
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
29254
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
29255
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
29256
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
29257
|
+
*
|
|
29258
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
29259
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
29260
|
+
*/
|
|
29261
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
29262
|
+
deviceId: number(),
|
|
29263
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
29264
|
+
});
|
|
29055
29265
|
var sceneMonitorCapability = {
|
|
29056
29266
|
name: "scene-monitor",
|
|
29057
29267
|
scope: "device",
|
|
@@ -29061,6 +29271,22 @@ var sceneMonitorCapability = {
|
|
|
29061
29271
|
deviceTypes: [DeviceType.Camera],
|
|
29062
29272
|
methods: {
|
|
29063
29273
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
29274
|
+
/**
|
|
29275
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
29276
|
+
*
|
|
29277
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
29278
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
29279
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
29280
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
29281
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
29282
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
29283
|
+
*
|
|
29284
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
29285
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
29286
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
29287
|
+
* tell which two are missing, or that any are.
|
|
29288
|
+
*/
|
|
29289
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
29064
29290
|
createScene: method(object({
|
|
29065
29291
|
deviceId: number(),
|
|
29066
29292
|
label: string(),
|
|
@@ -30896,6 +31122,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
30896
31122
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
30897
31123
|
});
|
|
30898
31124
|
/**
|
|
31125
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
31126
|
+
*
|
|
31127
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
31128
|
+
* because `snapshot: null` was already spoken for:
|
|
31129
|
+
*
|
|
31130
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
31131
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
31132
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
31133
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
31134
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
31135
|
+
*
|
|
31136
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
31137
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
31138
|
+
* which is a definite claim about a camera nobody could read.
|
|
31139
|
+
*/
|
|
31140
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
31141
|
+
deviceId: number(),
|
|
31142
|
+
read: _enum(["read", "unreadable"]),
|
|
31143
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
31144
|
+
});
|
|
31145
|
+
/**
|
|
30899
31146
|
* Time-series resolution. The history methods return one bucket per
|
|
30900
31147
|
* step over the requested range. Smaller resolutions cost more
|
|
30901
31148
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -30952,6 +31199,20 @@ var zoneAnalyticsCapability = {
|
|
|
30952
31199
|
* (no inference result emitted since boot or since binding was
|
|
30953
31200
|
* activated). */
|
|
30954
31201
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
31202
|
+
/**
|
|
31203
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
31204
|
+
*
|
|
31205
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
31206
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
31207
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
31208
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
31209
|
+
* work is unchanged.
|
|
31210
|
+
*
|
|
31211
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
31212
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
31213
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
31214
|
+
*/
|
|
31215
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
30955
31216
|
/** Time-series object count inside one zone. `className` optional —
|
|
30956
31217
|
* omit to count every class in the zone. */
|
|
30957
31218
|
getZoneHistory: method(object({
|
|
@@ -35349,6 +35610,12 @@ Object.freeze({
|
|
|
35349
35610
|
addonId: null,
|
|
35350
35611
|
access: "view"
|
|
35351
35612
|
},
|
|
35613
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35614
|
+
capName: "pipeline-analytics",
|
|
35615
|
+
capScope: "device",
|
|
35616
|
+
addonId: null,
|
|
35617
|
+
access: "view"
|
|
35618
|
+
},
|
|
35352
35619
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35353
35620
|
capName: "pipeline-analytics",
|
|
35354
35621
|
capScope: "device",
|
|
@@ -35367,6 +35634,12 @@ Object.freeze({
|
|
|
35367
35634
|
addonId: null,
|
|
35368
35635
|
access: "view"
|
|
35369
35636
|
},
|
|
35637
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
35638
|
+
capName: "pipeline-analytics",
|
|
35639
|
+
capScope: "device",
|
|
35640
|
+
addonId: null,
|
|
35641
|
+
access: "view"
|
|
35642
|
+
},
|
|
35370
35643
|
"pipelineAnalytics.getMotionEvents": {
|
|
35371
35644
|
capName: "pipeline-analytics",
|
|
35372
35645
|
capScope: "device",
|
|
@@ -36543,6 +36816,12 @@ Object.freeze({
|
|
|
36543
36816
|
addonId: null,
|
|
36544
36817
|
access: "view"
|
|
36545
36818
|
},
|
|
36819
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
36820
|
+
capName: "recording",
|
|
36821
|
+
capScope: "system",
|
|
36822
|
+
addonId: null,
|
|
36823
|
+
access: "create"
|
|
36824
|
+
},
|
|
36546
36825
|
"recording.refreshStorageLocationsForMigration": {
|
|
36547
36826
|
capName: "recording",
|
|
36548
36827
|
capScope: "system",
|
|
@@ -36669,6 +36948,12 @@ Object.freeze({
|
|
|
36669
36948
|
addonId: null,
|
|
36670
36949
|
access: "view"
|
|
36671
36950
|
},
|
|
36951
|
+
"sceneMonitor.listScenesBatch": {
|
|
36952
|
+
capName: "scene-monitor",
|
|
36953
|
+
capScope: "device",
|
|
36954
|
+
addonId: null,
|
|
36955
|
+
access: "view"
|
|
36956
|
+
},
|
|
36672
36957
|
"sceneMonitor.recheckNow": {
|
|
36673
36958
|
capName: "scene-monitor",
|
|
36674
36959
|
capScope: "device",
|
|
@@ -38025,6 +38310,12 @@ Object.freeze({
|
|
|
38025
38310
|
addonId: null,
|
|
38026
38311
|
access: "view"
|
|
38027
38312
|
},
|
|
38313
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
38314
|
+
capName: "zone-analytics",
|
|
38315
|
+
capScope: "device",
|
|
38316
|
+
addonId: null,
|
|
38317
|
+
access: "view"
|
|
38318
|
+
},
|
|
38028
38319
|
"zoneAnalytics.getUnzonedHistory": {
|
|
38029
38320
|
capName: "zone-analytics",
|
|
38030
38321
|
capScope: "device",
|
|
@@ -39014,6 +39305,11 @@ Object.freeze({
|
|
|
39014
39305
|
form: "single",
|
|
39015
39306
|
optional: false
|
|
39016
39307
|
}],
|
|
39308
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39309
|
+
name: "deviceId",
|
|
39310
|
+
form: "single",
|
|
39311
|
+
optional: true
|
|
39312
|
+
}],
|
|
39017
39313
|
"pipelineAnalytics.getGroup": [{
|
|
39018
39314
|
name: "deviceId",
|
|
39019
39315
|
form: "single",
|
|
@@ -39024,6 +39320,11 @@ Object.freeze({
|
|
|
39024
39320
|
form: "single",
|
|
39025
39321
|
optional: false
|
|
39026
39322
|
}],
|
|
39323
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
39324
|
+
name: "deviceIds",
|
|
39325
|
+
form: "array",
|
|
39326
|
+
optional: false
|
|
39327
|
+
}],
|
|
39027
39328
|
"pipelineAnalytics.getMotionEvents": [{
|
|
39028
39329
|
name: "deviceId",
|
|
39029
39330
|
form: "single",
|
|
@@ -39464,6 +39765,11 @@ Object.freeze({
|
|
|
39464
39765
|
form: "single",
|
|
39465
39766
|
optional: false
|
|
39466
39767
|
}],
|
|
39768
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
39769
|
+
name: "deviceId",
|
|
39770
|
+
form: "single",
|
|
39771
|
+
optional: true
|
|
39772
|
+
}],
|
|
39467
39773
|
"recording.relocateFootage": [{
|
|
39468
39774
|
name: "deviceId",
|
|
39469
39775
|
form: "single",
|
|
@@ -39529,6 +39835,11 @@ Object.freeze({
|
|
|
39529
39835
|
form: "single",
|
|
39530
39836
|
optional: false
|
|
39531
39837
|
}],
|
|
39838
|
+
"sceneMonitor.listScenesBatch": [{
|
|
39839
|
+
name: "deviceIds",
|
|
39840
|
+
form: "array",
|
|
39841
|
+
optional: false
|
|
39842
|
+
}],
|
|
39532
39843
|
"sceneMonitor.recheckNow": [{
|
|
39533
39844
|
name: "deviceId",
|
|
39534
39845
|
form: "single",
|
|
@@ -39790,6 +40101,11 @@ Object.freeze({
|
|
|
39790
40101
|
form: "single",
|
|
39791
40102
|
optional: false
|
|
39792
40103
|
}],
|
|
40104
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
40105
|
+
name: "deviceIds",
|
|
40106
|
+
form: "array",
|
|
40107
|
+
optional: false
|
|
40108
|
+
}],
|
|
39793
40109
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
39794
40110
|
name: "deviceId",
|
|
39795
40111
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|