@camstack/addon-provider-tuya 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
|
@@ -8838,6 +8838,20 @@ var RelocateJobSchema = object({
|
|
|
8838
8838
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8839
8839
|
*/
|
|
8840
8840
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8841
|
+
/**
|
|
8842
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8843
|
+
*
|
|
8844
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8845
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8846
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8847
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8848
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8849
|
+
* the same failure as one that quietly skips them (D295).
|
|
8850
|
+
*
|
|
8851
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8852
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8853
|
+
*/
|
|
8854
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8841
8855
|
startedAt: number(),
|
|
8842
8856
|
finishedAt: number().nullable(),
|
|
8843
8857
|
error: string().nullable()
|
|
@@ -9201,6 +9215,91 @@ var RelocateResidueSchema = object({
|
|
|
9201
9215
|
segments: number().int().nonnegative(),
|
|
9202
9216
|
bytes: number().int().nonnegative()
|
|
9203
9217
|
}).nullable();
|
|
9218
|
+
/**
|
|
9219
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
9220
|
+
* (D319).
|
|
9221
|
+
*
|
|
9222
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
9223
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
9224
|
+
* destructive run before authorising it.
|
|
9225
|
+
*/
|
|
9226
|
+
var LedgerWalkInputSchema = object({
|
|
9227
|
+
locationId: string().min(1),
|
|
9228
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
9229
|
+
apply: boolean().optional(),
|
|
9230
|
+
/** Narrow to one camera. */
|
|
9231
|
+
deviceId: number().int().positive().optional(),
|
|
9232
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
9233
|
+
profiles: array(string().min(1)).optional()
|
|
9234
|
+
});
|
|
9235
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
9236
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
9237
|
+
"location-unknown",
|
|
9238
|
+
"source-writable",
|
|
9239
|
+
"no-ledger",
|
|
9240
|
+
"archive-unreadable",
|
|
9241
|
+
"anchor-absent",
|
|
9242
|
+
"anchor-unreadable",
|
|
9243
|
+
"anchor-moved"
|
|
9244
|
+
]);
|
|
9245
|
+
_enum([
|
|
9246
|
+
"live-tail",
|
|
9247
|
+
"listing-error",
|
|
9248
|
+
"path-mismatch",
|
|
9249
|
+
"durable-refused"
|
|
9250
|
+
]);
|
|
9251
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
9252
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
9253
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
9254
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
9255
|
+
"live-tail": number().int().nonnegative(),
|
|
9256
|
+
"listing-error": number().int().nonnegative(),
|
|
9257
|
+
"path-mismatch": number().int().nonnegative(),
|
|
9258
|
+
"durable-refused": number().int().nonnegative()
|
|
9259
|
+
});
|
|
9260
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
9261
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
9262
|
+
deviceId: number().int(),
|
|
9263
|
+
hoursWalked: number().int().nonnegative(),
|
|
9264
|
+
hoursMissing: number().int().nonnegative(),
|
|
9265
|
+
ghostSegments: number().int().nonnegative(),
|
|
9266
|
+
ghostBytes: number().int().nonnegative(),
|
|
9267
|
+
forgottenSegments: number().int().nonnegative(),
|
|
9268
|
+
orphanFiles: number().int().nonnegative()
|
|
9269
|
+
});
|
|
9270
|
+
/**
|
|
9271
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
9272
|
+
*
|
|
9273
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
9274
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
9275
|
+
* than in the absence of one.
|
|
9276
|
+
*/
|
|
9277
|
+
var LedgerWalkReportSchema = object({
|
|
9278
|
+
locationId: string(),
|
|
9279
|
+
applied: boolean(),
|
|
9280
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
9281
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
9282
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
9283
|
+
hoursClaimed: number().int().nonnegative(),
|
|
9284
|
+
hoursWalked: number().int().nonnegative(),
|
|
9285
|
+
hoursMissing: number().int().nonnegative(),
|
|
9286
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
9287
|
+
listings: number().int().nonnegative(),
|
|
9288
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
9289
|
+
ghostSegments: number().int().nonnegative(),
|
|
9290
|
+
ghostBytes: number().int().nonnegative(),
|
|
9291
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
9292
|
+
forgottenSegments: number().int().nonnegative(),
|
|
9293
|
+
forgottenBytes: number().int().nonnegative(),
|
|
9294
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
9295
|
+
orphanFiles: number().int().nonnegative(),
|
|
9296
|
+
orphanSample: array(string()).readonly(),
|
|
9297
|
+
hoursSkipped: number().int().nonnegative(),
|
|
9298
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
9299
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
9300
|
+
bounded: boolean(),
|
|
9301
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
9302
|
+
});
|
|
9204
9303
|
/** How many rows a media pass would still act on against a given target — the
|
|
9205
9304
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
9206
9305
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -19833,13 +19932,15 @@ var ListGroupsPageSchema = object({
|
|
|
19833
19932
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
19834
19933
|
nextCursor: string().nullable()
|
|
19835
19934
|
});
|
|
19935
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
19936
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
19836
19937
|
var KeyEventQueryInput = object({
|
|
19837
19938
|
deviceId: number(),
|
|
19838
19939
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
19839
19940
|
since: number(),
|
|
19840
19941
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
19841
19942
|
until: number(),
|
|
19842
|
-
limit: number().int().min(1).max(
|
|
19943
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19843
19944
|
/** Drop tracks scoring below this importance. */
|
|
19844
19945
|
minImportance: number().min(0).max(1).optional(),
|
|
19845
19946
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -19861,6 +19962,32 @@ var KeyEventSchema = object({
|
|
|
19861
19962
|
...TrackFlagFields,
|
|
19862
19963
|
...TrackRetrainFields
|
|
19863
19964
|
});
|
|
19965
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
19966
|
+
var KeyEventBatchQueryInput = object({
|
|
19967
|
+
deviceIds: array(number()).min(1).max(200),
|
|
19968
|
+
since: number(),
|
|
19969
|
+
until: number(),
|
|
19970
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
19971
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
19972
|
+
* rows and change what the merged feed contains. */
|
|
19973
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19974
|
+
minImportance: number().min(0).max(1).optional(),
|
|
19975
|
+
classFilter: string().optional()
|
|
19976
|
+
});
|
|
19977
|
+
/**
|
|
19978
|
+
* One camera's key events in a batch answer.
|
|
19979
|
+
*
|
|
19980
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
19981
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
19982
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
19983
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
19984
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
19985
|
+
* key, which only worked because there was one query per camera).
|
|
19986
|
+
*/
|
|
19987
|
+
var KeyEventsForDeviceSchema = object({
|
|
19988
|
+
deviceId: number(),
|
|
19989
|
+
events: array(KeyEventSchema).readonly()
|
|
19990
|
+
});
|
|
19864
19991
|
object({
|
|
19865
19992
|
trackId: string(),
|
|
19866
19993
|
className: string(),
|
|
@@ -19932,6 +20059,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19932
20059
|
totalBytes: number().int(),
|
|
19933
20060
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19934
20061
|
});
|
|
20062
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
20063
|
+
var EventMediaKindFootprintSchema = object({
|
|
20064
|
+
kind: MediaFileKindEnum,
|
|
20065
|
+
/** Media rows of this kind. */
|
|
20066
|
+
rows: number().int(),
|
|
20067
|
+
/** Bytes on disk held by those rows. */
|
|
20068
|
+
bytes: number().int()
|
|
20069
|
+
});
|
|
20070
|
+
/**
|
|
20071
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
20072
|
+
* actually turns on.
|
|
20073
|
+
*
|
|
20074
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
20075
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
20076
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
20077
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
20078
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
20079
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
20080
|
+
*
|
|
20081
|
+
* ## Why `unaccounted*` exists
|
|
20082
|
+
*
|
|
20083
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
20084
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
20085
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
20086
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
20087
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
20088
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
20089
|
+
* against a denominator smaller than the disk.
|
|
20090
|
+
*
|
|
20091
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
20092
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
20093
|
+
*/
|
|
20094
|
+
var EventMediaKindBreakdownSchema = object({
|
|
20095
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
20096
|
+
totalRows: number().int(),
|
|
20097
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
20098
|
+
totalBytes: number().int(),
|
|
20099
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
20100
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
20101
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
20102
|
+
unaccountedRows: number().int(),
|
|
20103
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
20104
|
+
unaccountedBytes: number().int()
|
|
20105
|
+
});
|
|
19935
20106
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19936
20107
|
var EventPruneCountsSchema = object({
|
|
19937
20108
|
motion: number().int(),
|
|
@@ -20086,7 +20257,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20086
20257
|
until: number().optional(),
|
|
20087
20258
|
kinds: array(string()).optional(),
|
|
20088
20259
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20089
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
20260
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20090
20261
|
deviceId: number(),
|
|
20091
20262
|
since: number(),
|
|
20092
20263
|
until: number(),
|
|
@@ -20135,6 +20306,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20135
20306
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
20136
20307
|
kind: "query",
|
|
20137
20308
|
auth: "admin"
|
|
20309
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
20310
|
+
kind: "query",
|
|
20311
|
+
auth: "admin"
|
|
20138
20312
|
}), method(object({
|
|
20139
20313
|
olderThanMs: number(),
|
|
20140
20314
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -22086,6 +22260,20 @@ method(object({
|
|
|
22086
22260
|
error: string().optional()
|
|
22087
22261
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
22088
22262
|
providerId: string(),
|
|
22263
|
+
/**
|
|
22264
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
22265
|
+
*
|
|
22266
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
22267
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
22268
|
+
* credential the operator did not retype — and posting that here
|
|
22269
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
22270
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
22271
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
22272
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
22273
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
22274
|
+
* every value was typed just now and nothing is stored yet.
|
|
22275
|
+
*/
|
|
22276
|
+
locationId: string().optional(),
|
|
22089
22277
|
config: record(string(), unknown())
|
|
22090
22278
|
}), object({
|
|
22091
22279
|
ok: boolean(),
|
|
@@ -29444,6 +29632,9 @@ method(object({
|
|
|
29444
29632
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
29445
29633
|
kind: "query",
|
|
29446
29634
|
auth: "admin"
|
|
29635
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
29636
|
+
kind: "mutation",
|
|
29637
|
+
auth: "admin"
|
|
29447
29638
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
29448
29639
|
kind: "mutation",
|
|
29449
29640
|
auth: "admin"
|
|
@@ -29835,6 +30026,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
29835
30026
|
monitors: array(SceneMonitorSchema),
|
|
29836
30027
|
lastFetchedAt: number()
|
|
29837
30028
|
});
|
|
30029
|
+
/**
|
|
30030
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
30031
|
+
*
|
|
30032
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
30033
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
30034
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
30035
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
30036
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
30037
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
30038
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
30039
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
30040
|
+
*
|
|
30041
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
30042
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
30043
|
+
*/
|
|
30044
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
30045
|
+
deviceId: number(),
|
|
30046
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
30047
|
+
});
|
|
29838
30048
|
var sceneMonitorCapability = {
|
|
29839
30049
|
name: "scene-monitor",
|
|
29840
30050
|
scope: "device",
|
|
@@ -29844,6 +30054,22 @@ var sceneMonitorCapability = {
|
|
|
29844
30054
|
deviceTypes: [DeviceType.Camera],
|
|
29845
30055
|
methods: {
|
|
29846
30056
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
30057
|
+
/**
|
|
30058
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
30059
|
+
*
|
|
30060
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
30061
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
30062
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
30063
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
30064
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
30065
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
30066
|
+
*
|
|
30067
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
30068
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
30069
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
30070
|
+
* tell which two are missing, or that any are.
|
|
30071
|
+
*/
|
|
30072
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
29847
30073
|
createScene: method(object({
|
|
29848
30074
|
deviceId: number(),
|
|
29849
30075
|
label: string(),
|
|
@@ -31679,6 +31905,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
31679
31905
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
31680
31906
|
});
|
|
31681
31907
|
/**
|
|
31908
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
31909
|
+
*
|
|
31910
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
31911
|
+
* because `snapshot: null` was already spoken for:
|
|
31912
|
+
*
|
|
31913
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
31914
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
31915
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
31916
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
31917
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
31918
|
+
*
|
|
31919
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
31920
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
31921
|
+
* which is a definite claim about a camera nobody could read.
|
|
31922
|
+
*/
|
|
31923
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
31924
|
+
deviceId: number(),
|
|
31925
|
+
read: _enum(["read", "unreadable"]),
|
|
31926
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
31927
|
+
});
|
|
31928
|
+
/**
|
|
31682
31929
|
* Time-series resolution. The history methods return one bucket per
|
|
31683
31930
|
* step over the requested range. Smaller resolutions cost more
|
|
31684
31931
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -31735,6 +31982,20 @@ var zoneAnalyticsCapability = {
|
|
|
31735
31982
|
* (no inference result emitted since boot or since binding was
|
|
31736
31983
|
* activated). */
|
|
31737
31984
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
31985
|
+
/**
|
|
31986
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
31987
|
+
*
|
|
31988
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
31989
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
31990
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
31991
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
31992
|
+
* work is unchanged.
|
|
31993
|
+
*
|
|
31994
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
31995
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
31996
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
31997
|
+
*/
|
|
31998
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
31738
31999
|
/** Time-series object count inside one zone. `className` optional —
|
|
31739
32000
|
* omit to count every class in the zone. */
|
|
31740
32001
|
getZoneHistory: method(object({
|
|
@@ -36132,6 +36393,12 @@ Object.freeze({
|
|
|
36132
36393
|
addonId: null,
|
|
36133
36394
|
access: "view"
|
|
36134
36395
|
},
|
|
36396
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
36397
|
+
capName: "pipeline-analytics",
|
|
36398
|
+
capScope: "device",
|
|
36399
|
+
addonId: null,
|
|
36400
|
+
access: "view"
|
|
36401
|
+
},
|
|
36135
36402
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
36136
36403
|
capName: "pipeline-analytics",
|
|
36137
36404
|
capScope: "device",
|
|
@@ -36150,6 +36417,12 @@ Object.freeze({
|
|
|
36150
36417
|
addonId: null,
|
|
36151
36418
|
access: "view"
|
|
36152
36419
|
},
|
|
36420
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
36421
|
+
capName: "pipeline-analytics",
|
|
36422
|
+
capScope: "device",
|
|
36423
|
+
addonId: null,
|
|
36424
|
+
access: "view"
|
|
36425
|
+
},
|
|
36153
36426
|
"pipelineAnalytics.getMotionEvents": {
|
|
36154
36427
|
capName: "pipeline-analytics",
|
|
36155
36428
|
capScope: "device",
|
|
@@ -37326,6 +37599,12 @@ Object.freeze({
|
|
|
37326
37599
|
addonId: null,
|
|
37327
37600
|
access: "view"
|
|
37328
37601
|
},
|
|
37602
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
37603
|
+
capName: "recording",
|
|
37604
|
+
capScope: "system",
|
|
37605
|
+
addonId: null,
|
|
37606
|
+
access: "create"
|
|
37607
|
+
},
|
|
37329
37608
|
"recording.refreshStorageLocationsForMigration": {
|
|
37330
37609
|
capName: "recording",
|
|
37331
37610
|
capScope: "system",
|
|
@@ -37452,6 +37731,12 @@ Object.freeze({
|
|
|
37452
37731
|
addonId: null,
|
|
37453
37732
|
access: "view"
|
|
37454
37733
|
},
|
|
37734
|
+
"sceneMonitor.listScenesBatch": {
|
|
37735
|
+
capName: "scene-monitor",
|
|
37736
|
+
capScope: "device",
|
|
37737
|
+
addonId: null,
|
|
37738
|
+
access: "view"
|
|
37739
|
+
},
|
|
37455
37740
|
"sceneMonitor.recheckNow": {
|
|
37456
37741
|
capName: "scene-monitor",
|
|
37457
37742
|
capScope: "device",
|
|
@@ -38808,6 +39093,12 @@ Object.freeze({
|
|
|
38808
39093
|
addonId: null,
|
|
38809
39094
|
access: "view"
|
|
38810
39095
|
},
|
|
39096
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
39097
|
+
capName: "zone-analytics",
|
|
39098
|
+
capScope: "device",
|
|
39099
|
+
addonId: null,
|
|
39100
|
+
access: "view"
|
|
39101
|
+
},
|
|
38811
39102
|
"zoneAnalytics.getUnzonedHistory": {
|
|
38812
39103
|
capName: "zone-analytics",
|
|
38813
39104
|
capScope: "device",
|
|
@@ -39797,6 +40088,11 @@ Object.freeze({
|
|
|
39797
40088
|
form: "single",
|
|
39798
40089
|
optional: false
|
|
39799
40090
|
}],
|
|
40091
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
40092
|
+
name: "deviceId",
|
|
40093
|
+
form: "single",
|
|
40094
|
+
optional: true
|
|
40095
|
+
}],
|
|
39800
40096
|
"pipelineAnalytics.getGroup": [{
|
|
39801
40097
|
name: "deviceId",
|
|
39802
40098
|
form: "single",
|
|
@@ -39807,6 +40103,11 @@ Object.freeze({
|
|
|
39807
40103
|
form: "single",
|
|
39808
40104
|
optional: false
|
|
39809
40105
|
}],
|
|
40106
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
40107
|
+
name: "deviceIds",
|
|
40108
|
+
form: "array",
|
|
40109
|
+
optional: false
|
|
40110
|
+
}],
|
|
39810
40111
|
"pipelineAnalytics.getMotionEvents": [{
|
|
39811
40112
|
name: "deviceId",
|
|
39812
40113
|
form: "single",
|
|
@@ -40247,6 +40548,11 @@ Object.freeze({
|
|
|
40247
40548
|
form: "single",
|
|
40248
40549
|
optional: false
|
|
40249
40550
|
}],
|
|
40551
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
40552
|
+
name: "deviceId",
|
|
40553
|
+
form: "single",
|
|
40554
|
+
optional: true
|
|
40555
|
+
}],
|
|
40250
40556
|
"recording.relocateFootage": [{
|
|
40251
40557
|
name: "deviceId",
|
|
40252
40558
|
form: "single",
|
|
@@ -40312,6 +40618,11 @@ Object.freeze({
|
|
|
40312
40618
|
form: "single",
|
|
40313
40619
|
optional: false
|
|
40314
40620
|
}],
|
|
40621
|
+
"sceneMonitor.listScenesBatch": [{
|
|
40622
|
+
name: "deviceIds",
|
|
40623
|
+
form: "array",
|
|
40624
|
+
optional: false
|
|
40625
|
+
}],
|
|
40315
40626
|
"sceneMonitor.recheckNow": [{
|
|
40316
40627
|
name: "deviceId",
|
|
40317
40628
|
form: "single",
|
|
@@ -40573,6 +40884,11 @@ Object.freeze({
|
|
|
40573
40884
|
form: "single",
|
|
40574
40885
|
optional: false
|
|
40575
40886
|
}],
|
|
40887
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
40888
|
+
name: "deviceIds",
|
|
40889
|
+
form: "array",
|
|
40890
|
+
optional: false
|
|
40891
|
+
}],
|
|
40576
40892
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
40577
40893
|
name: "deviceId",
|
|
40578
40894
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -8837,6 +8837,20 @@ var RelocateJobSchema = object({
|
|
|
8837
8837
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8838
8838
|
*/
|
|
8839
8839
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8840
|
+
/**
|
|
8841
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8842
|
+
*
|
|
8843
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8844
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8845
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8846
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8847
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8848
|
+
* the same failure as one that quietly skips them (D295).
|
|
8849
|
+
*
|
|
8850
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8851
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8852
|
+
*/
|
|
8853
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8840
8854
|
startedAt: number(),
|
|
8841
8855
|
finishedAt: number().nullable(),
|
|
8842
8856
|
error: string().nullable()
|
|
@@ -9200,6 +9214,91 @@ var RelocateResidueSchema = object({
|
|
|
9200
9214
|
segments: number().int().nonnegative(),
|
|
9201
9215
|
bytes: number().int().nonnegative()
|
|
9202
9216
|
}).nullable();
|
|
9217
|
+
/**
|
|
9218
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
9219
|
+
* (D319).
|
|
9220
|
+
*
|
|
9221
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
9222
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
9223
|
+
* destructive run before authorising it.
|
|
9224
|
+
*/
|
|
9225
|
+
var LedgerWalkInputSchema = object({
|
|
9226
|
+
locationId: string().min(1),
|
|
9227
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
9228
|
+
apply: boolean().optional(),
|
|
9229
|
+
/** Narrow to one camera. */
|
|
9230
|
+
deviceId: number().int().positive().optional(),
|
|
9231
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
9232
|
+
profiles: array(string().min(1)).optional()
|
|
9233
|
+
});
|
|
9234
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
9235
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
9236
|
+
"location-unknown",
|
|
9237
|
+
"source-writable",
|
|
9238
|
+
"no-ledger",
|
|
9239
|
+
"archive-unreadable",
|
|
9240
|
+
"anchor-absent",
|
|
9241
|
+
"anchor-unreadable",
|
|
9242
|
+
"anchor-moved"
|
|
9243
|
+
]);
|
|
9244
|
+
_enum([
|
|
9245
|
+
"live-tail",
|
|
9246
|
+
"listing-error",
|
|
9247
|
+
"path-mismatch",
|
|
9248
|
+
"durable-refused"
|
|
9249
|
+
]);
|
|
9250
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
9251
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
9252
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
9253
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
9254
|
+
"live-tail": number().int().nonnegative(),
|
|
9255
|
+
"listing-error": number().int().nonnegative(),
|
|
9256
|
+
"path-mismatch": number().int().nonnegative(),
|
|
9257
|
+
"durable-refused": number().int().nonnegative()
|
|
9258
|
+
});
|
|
9259
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
9260
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
9261
|
+
deviceId: number().int(),
|
|
9262
|
+
hoursWalked: number().int().nonnegative(),
|
|
9263
|
+
hoursMissing: number().int().nonnegative(),
|
|
9264
|
+
ghostSegments: number().int().nonnegative(),
|
|
9265
|
+
ghostBytes: number().int().nonnegative(),
|
|
9266
|
+
forgottenSegments: number().int().nonnegative(),
|
|
9267
|
+
orphanFiles: number().int().nonnegative()
|
|
9268
|
+
});
|
|
9269
|
+
/**
|
|
9270
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
9271
|
+
*
|
|
9272
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
9273
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
9274
|
+
* than in the absence of one.
|
|
9275
|
+
*/
|
|
9276
|
+
var LedgerWalkReportSchema = object({
|
|
9277
|
+
locationId: string(),
|
|
9278
|
+
applied: boolean(),
|
|
9279
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
9280
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
9281
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
9282
|
+
hoursClaimed: number().int().nonnegative(),
|
|
9283
|
+
hoursWalked: number().int().nonnegative(),
|
|
9284
|
+
hoursMissing: number().int().nonnegative(),
|
|
9285
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
9286
|
+
listings: number().int().nonnegative(),
|
|
9287
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
9288
|
+
ghostSegments: number().int().nonnegative(),
|
|
9289
|
+
ghostBytes: number().int().nonnegative(),
|
|
9290
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
9291
|
+
forgottenSegments: number().int().nonnegative(),
|
|
9292
|
+
forgottenBytes: number().int().nonnegative(),
|
|
9293
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
9294
|
+
orphanFiles: number().int().nonnegative(),
|
|
9295
|
+
orphanSample: array(string()).readonly(),
|
|
9296
|
+
hoursSkipped: number().int().nonnegative(),
|
|
9297
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
9298
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
9299
|
+
bounded: boolean(),
|
|
9300
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
9301
|
+
});
|
|
9203
9302
|
/** How many rows a media pass would still act on against a given target — the
|
|
9204
9303
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
9205
9304
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -19832,13 +19931,15 @@ var ListGroupsPageSchema = object({
|
|
|
19832
19931
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
19833
19932
|
nextCursor: string().nullable()
|
|
19834
19933
|
});
|
|
19934
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
19935
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
19835
19936
|
var KeyEventQueryInput = object({
|
|
19836
19937
|
deviceId: number(),
|
|
19837
19938
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
19838
19939
|
since: number(),
|
|
19839
19940
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
19840
19941
|
until: number(),
|
|
19841
|
-
limit: number().int().min(1).max(
|
|
19942
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19842
19943
|
/** Drop tracks scoring below this importance. */
|
|
19843
19944
|
minImportance: number().min(0).max(1).optional(),
|
|
19844
19945
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -19860,6 +19961,32 @@ var KeyEventSchema = object({
|
|
|
19860
19961
|
...TrackFlagFields,
|
|
19861
19962
|
...TrackRetrainFields
|
|
19862
19963
|
});
|
|
19964
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
19965
|
+
var KeyEventBatchQueryInput = object({
|
|
19966
|
+
deviceIds: array(number()).min(1).max(200),
|
|
19967
|
+
since: number(),
|
|
19968
|
+
until: number(),
|
|
19969
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
19970
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
19971
|
+
* rows and change what the merged feed contains. */
|
|
19972
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19973
|
+
minImportance: number().min(0).max(1).optional(),
|
|
19974
|
+
classFilter: string().optional()
|
|
19975
|
+
});
|
|
19976
|
+
/**
|
|
19977
|
+
* One camera's key events in a batch answer.
|
|
19978
|
+
*
|
|
19979
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
19980
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
19981
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
19982
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
19983
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
19984
|
+
* key, which only worked because there was one query per camera).
|
|
19985
|
+
*/
|
|
19986
|
+
var KeyEventsForDeviceSchema = object({
|
|
19987
|
+
deviceId: number(),
|
|
19988
|
+
events: array(KeyEventSchema).readonly()
|
|
19989
|
+
});
|
|
19863
19990
|
object({
|
|
19864
19991
|
trackId: string(),
|
|
19865
19992
|
className: string(),
|
|
@@ -19931,6 +20058,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19931
20058
|
totalBytes: number().int(),
|
|
19932
20059
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19933
20060
|
});
|
|
20061
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
20062
|
+
var EventMediaKindFootprintSchema = object({
|
|
20063
|
+
kind: MediaFileKindEnum,
|
|
20064
|
+
/** Media rows of this kind. */
|
|
20065
|
+
rows: number().int(),
|
|
20066
|
+
/** Bytes on disk held by those rows. */
|
|
20067
|
+
bytes: number().int()
|
|
20068
|
+
});
|
|
20069
|
+
/**
|
|
20070
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
20071
|
+
* actually turns on.
|
|
20072
|
+
*
|
|
20073
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
20074
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
20075
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
20076
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
20077
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
20078
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
20079
|
+
*
|
|
20080
|
+
* ## Why `unaccounted*` exists
|
|
20081
|
+
*
|
|
20082
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
20083
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
20084
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
20085
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
20086
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
20087
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
20088
|
+
* against a denominator smaller than the disk.
|
|
20089
|
+
*
|
|
20090
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
20091
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
20092
|
+
*/
|
|
20093
|
+
var EventMediaKindBreakdownSchema = object({
|
|
20094
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
20095
|
+
totalRows: number().int(),
|
|
20096
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
20097
|
+
totalBytes: number().int(),
|
|
20098
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
20099
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
20100
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
20101
|
+
unaccountedRows: number().int(),
|
|
20102
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
20103
|
+
unaccountedBytes: number().int()
|
|
20104
|
+
});
|
|
19934
20105
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19935
20106
|
var EventPruneCountsSchema = object({
|
|
19936
20107
|
motion: number().int(),
|
|
@@ -20085,7 +20256,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20085
20256
|
until: number().optional(),
|
|
20086
20257
|
kinds: array(string()).optional(),
|
|
20087
20258
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
20088
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
20259
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
20089
20260
|
deviceId: number(),
|
|
20090
20261
|
since: number(),
|
|
20091
20262
|
until: number(),
|
|
@@ -20134,6 +20305,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20134
20305
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
20135
20306
|
kind: "query",
|
|
20136
20307
|
auth: "admin"
|
|
20308
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
20309
|
+
kind: "query",
|
|
20310
|
+
auth: "admin"
|
|
20137
20311
|
}), method(object({
|
|
20138
20312
|
olderThanMs: number(),
|
|
20139
20313
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -22085,6 +22259,20 @@ method(object({
|
|
|
22085
22259
|
error: string().optional()
|
|
22086
22260
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
22087
22261
|
providerId: string(),
|
|
22262
|
+
/**
|
|
22263
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
22264
|
+
*
|
|
22265
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
22266
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
22267
|
+
* credential the operator did not retype — and posting that here
|
|
22268
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
22269
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
22270
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
22271
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
22272
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
22273
|
+
* every value was typed just now and nothing is stored yet.
|
|
22274
|
+
*/
|
|
22275
|
+
locationId: string().optional(),
|
|
22088
22276
|
config: record(string(), unknown())
|
|
22089
22277
|
}), object({
|
|
22090
22278
|
ok: boolean(),
|
|
@@ -29443,6 +29631,9 @@ method(object({
|
|
|
29443
29631
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
29444
29632
|
kind: "query",
|
|
29445
29633
|
auth: "admin"
|
|
29634
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
29635
|
+
kind: "mutation",
|
|
29636
|
+
auth: "admin"
|
|
29446
29637
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
29447
29638
|
kind: "mutation",
|
|
29448
29639
|
auth: "admin"
|
|
@@ -29834,6 +30025,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
29834
30025
|
monitors: array(SceneMonitorSchema),
|
|
29835
30026
|
lastFetchedAt: number()
|
|
29836
30027
|
});
|
|
30028
|
+
/**
|
|
30029
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
30030
|
+
*
|
|
30031
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
30032
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
30033
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
30034
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
30035
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
30036
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
30037
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
30038
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
30039
|
+
*
|
|
30040
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
30041
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
30042
|
+
*/
|
|
30043
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
30044
|
+
deviceId: number(),
|
|
30045
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
30046
|
+
});
|
|
29837
30047
|
var sceneMonitorCapability = {
|
|
29838
30048
|
name: "scene-monitor",
|
|
29839
30049
|
scope: "device",
|
|
@@ -29843,6 +30053,22 @@ var sceneMonitorCapability = {
|
|
|
29843
30053
|
deviceTypes: [DeviceType.Camera],
|
|
29844
30054
|
methods: {
|
|
29845
30055
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
30056
|
+
/**
|
|
30057
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
30058
|
+
*
|
|
30059
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
30060
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
30061
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
30062
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
30063
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
30064
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
30065
|
+
*
|
|
30066
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
30067
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
30068
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
30069
|
+
* tell which two are missing, or that any are.
|
|
30070
|
+
*/
|
|
30071
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
29846
30072
|
createScene: method(object({
|
|
29847
30073
|
deviceId: number(),
|
|
29848
30074
|
label: string(),
|
|
@@ -31678,6 +31904,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
31678
31904
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
31679
31905
|
});
|
|
31680
31906
|
/**
|
|
31907
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
31908
|
+
*
|
|
31909
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
31910
|
+
* because `snapshot: null` was already spoken for:
|
|
31911
|
+
*
|
|
31912
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
31913
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
31914
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
31915
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
31916
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
31917
|
+
*
|
|
31918
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
31919
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
31920
|
+
* which is a definite claim about a camera nobody could read.
|
|
31921
|
+
*/
|
|
31922
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
31923
|
+
deviceId: number(),
|
|
31924
|
+
read: _enum(["read", "unreadable"]),
|
|
31925
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
31926
|
+
});
|
|
31927
|
+
/**
|
|
31681
31928
|
* Time-series resolution. The history methods return one bucket per
|
|
31682
31929
|
* step over the requested range. Smaller resolutions cost more
|
|
31683
31930
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -31734,6 +31981,20 @@ var zoneAnalyticsCapability = {
|
|
|
31734
31981
|
* (no inference result emitted since boot or since binding was
|
|
31735
31982
|
* activated). */
|
|
31736
31983
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
31984
|
+
/**
|
|
31985
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
31986
|
+
*
|
|
31987
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
31988
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
31989
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
31990
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
31991
|
+
* work is unchanged.
|
|
31992
|
+
*
|
|
31993
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
31994
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
31995
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
31996
|
+
*/
|
|
31997
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
31737
31998
|
/** Time-series object count inside one zone. `className` optional —
|
|
31738
31999
|
* omit to count every class in the zone. */
|
|
31739
32000
|
getZoneHistory: method(object({
|
|
@@ -36131,6 +36392,12 @@ Object.freeze({
|
|
|
36131
36392
|
addonId: null,
|
|
36132
36393
|
access: "view"
|
|
36133
36394
|
},
|
|
36395
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
36396
|
+
capName: "pipeline-analytics",
|
|
36397
|
+
capScope: "device",
|
|
36398
|
+
addonId: null,
|
|
36399
|
+
access: "view"
|
|
36400
|
+
},
|
|
36134
36401
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
36135
36402
|
capName: "pipeline-analytics",
|
|
36136
36403
|
capScope: "device",
|
|
@@ -36149,6 +36416,12 @@ Object.freeze({
|
|
|
36149
36416
|
addonId: null,
|
|
36150
36417
|
access: "view"
|
|
36151
36418
|
},
|
|
36419
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
36420
|
+
capName: "pipeline-analytics",
|
|
36421
|
+
capScope: "device",
|
|
36422
|
+
addonId: null,
|
|
36423
|
+
access: "view"
|
|
36424
|
+
},
|
|
36152
36425
|
"pipelineAnalytics.getMotionEvents": {
|
|
36153
36426
|
capName: "pipeline-analytics",
|
|
36154
36427
|
capScope: "device",
|
|
@@ -37325,6 +37598,12 @@ Object.freeze({
|
|
|
37325
37598
|
addonId: null,
|
|
37326
37599
|
access: "view"
|
|
37327
37600
|
},
|
|
37601
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
37602
|
+
capName: "recording",
|
|
37603
|
+
capScope: "system",
|
|
37604
|
+
addonId: null,
|
|
37605
|
+
access: "create"
|
|
37606
|
+
},
|
|
37328
37607
|
"recording.refreshStorageLocationsForMigration": {
|
|
37329
37608
|
capName: "recording",
|
|
37330
37609
|
capScope: "system",
|
|
@@ -37451,6 +37730,12 @@ Object.freeze({
|
|
|
37451
37730
|
addonId: null,
|
|
37452
37731
|
access: "view"
|
|
37453
37732
|
},
|
|
37733
|
+
"sceneMonitor.listScenesBatch": {
|
|
37734
|
+
capName: "scene-monitor",
|
|
37735
|
+
capScope: "device",
|
|
37736
|
+
addonId: null,
|
|
37737
|
+
access: "view"
|
|
37738
|
+
},
|
|
37454
37739
|
"sceneMonitor.recheckNow": {
|
|
37455
37740
|
capName: "scene-monitor",
|
|
37456
37741
|
capScope: "device",
|
|
@@ -38807,6 +39092,12 @@ Object.freeze({
|
|
|
38807
39092
|
addonId: null,
|
|
38808
39093
|
access: "view"
|
|
38809
39094
|
},
|
|
39095
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
39096
|
+
capName: "zone-analytics",
|
|
39097
|
+
capScope: "device",
|
|
39098
|
+
addonId: null,
|
|
39099
|
+
access: "view"
|
|
39100
|
+
},
|
|
38810
39101
|
"zoneAnalytics.getUnzonedHistory": {
|
|
38811
39102
|
capName: "zone-analytics",
|
|
38812
39103
|
capScope: "device",
|
|
@@ -39796,6 +40087,11 @@ Object.freeze({
|
|
|
39796
40087
|
form: "single",
|
|
39797
40088
|
optional: false
|
|
39798
40089
|
}],
|
|
40090
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
40091
|
+
name: "deviceId",
|
|
40092
|
+
form: "single",
|
|
40093
|
+
optional: true
|
|
40094
|
+
}],
|
|
39799
40095
|
"pipelineAnalytics.getGroup": [{
|
|
39800
40096
|
name: "deviceId",
|
|
39801
40097
|
form: "single",
|
|
@@ -39806,6 +40102,11 @@ Object.freeze({
|
|
|
39806
40102
|
form: "single",
|
|
39807
40103
|
optional: false
|
|
39808
40104
|
}],
|
|
40105
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
40106
|
+
name: "deviceIds",
|
|
40107
|
+
form: "array",
|
|
40108
|
+
optional: false
|
|
40109
|
+
}],
|
|
39809
40110
|
"pipelineAnalytics.getMotionEvents": [{
|
|
39810
40111
|
name: "deviceId",
|
|
39811
40112
|
form: "single",
|
|
@@ -40246,6 +40547,11 @@ Object.freeze({
|
|
|
40246
40547
|
form: "single",
|
|
40247
40548
|
optional: false
|
|
40248
40549
|
}],
|
|
40550
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
40551
|
+
name: "deviceId",
|
|
40552
|
+
form: "single",
|
|
40553
|
+
optional: true
|
|
40554
|
+
}],
|
|
40249
40555
|
"recording.relocateFootage": [{
|
|
40250
40556
|
name: "deviceId",
|
|
40251
40557
|
form: "single",
|
|
@@ -40311,6 +40617,11 @@ Object.freeze({
|
|
|
40311
40617
|
form: "single",
|
|
40312
40618
|
optional: false
|
|
40313
40619
|
}],
|
|
40620
|
+
"sceneMonitor.listScenesBatch": [{
|
|
40621
|
+
name: "deviceIds",
|
|
40622
|
+
form: "array",
|
|
40623
|
+
optional: false
|
|
40624
|
+
}],
|
|
40314
40625
|
"sceneMonitor.recheckNow": [{
|
|
40315
40626
|
name: "deviceId",
|
|
40316
40627
|
form: "single",
|
|
@@ -40572,6 +40883,11 @@ Object.freeze({
|
|
|
40572
40883
|
form: "single",
|
|
40573
40884
|
optional: false
|
|
40574
40885
|
}],
|
|
40886
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
40887
|
+
name: "deviceIds",
|
|
40888
|
+
form: "array",
|
|
40889
|
+
optional: false
|
|
40890
|
+
}],
|
|
40575
40891
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
40576
40892
|
name: "deviceId",
|
|
40577
40893
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|